diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md deleted file mode 100644 index 0aa6661..0000000 --- a/.claude/CLAUDE.md +++ /dev/null @@ -1,159 +0,0 @@ -# Claude Code Project Guide - dash_mui_charts - -## Project Overview - -**dash_mui_charts** is a Dash component library that wraps [MUI X Charts](https://mui.com/x/react-charts/) for use in Plotly Dash applications. It provides 9 chart components with full Python type hints and interactive callbacks. - ---- - -## Components - -| Component | Purpose | License | -|-----------|---------|---------| -| **LineChart** | Line/area charts, biaxial, zoom/pan, brush, reference lines | Community / Pro | -| **BarChart** | Vertical/horizontal bars, stacking, labels, dataset mode, zoom/brush | Community / Pro | -| **CandlestickChart** | OHLC candlestick charts with volume overlay, reference lines | Community / Pro | -| **PieChart** | Pie, donut, nested pies | Community | -| **ScatterChart** | Scatter/point charts, z-axis color mapping, voronoi interaction | Community | -| **CompositeChart** | Layer scatter + line plots on a single surface | Community / Pro | -| **Heatmap** | Matrix/grid visualization | Pro | -| **SparklineChart** | Compact inline charts | Community | -| **LiveTradingChart** | Real-time streaming charts | Community / Pro | - -### BarChart Features (v1.2.0) -- **Vertical & Horizontal**: `layout='vertical'` (default) or `layout='horizontal'` -- **Stacking**: `stack` group ID, `stackOffset` ('none', 'expand', 'diverging'), `stackOrder` -- **Bar Labels**: `barLabel='value'` with `barLabelPlacement` ('center', 'outside') -- **Border Radius**: `borderRadius` prop for rounded bar corners -- **Dataset Mode**: `dataset` + `dataKey` pattern for table-format data -- **Bar Spacing**: `categoryGapRatio` (0-1) and `barGapRatio` (-1 to Inf) on band axis -- **Reference Lines**: Horizontal and vertical markers (same API as LineChart) -- **Axis Highlight**: `axisHighlight` with 'band', 'line', or 'none' -- **Tooltip Modes**: `tooltip={'trigger': 'axis'}` or `{'trigger': 'item'}` -- **Highlighting**: Controlled `highlightedItem` prop, per-series `highlightScope` -- **Click Events**: `clickData` (bar click) and `axisClickData` (axis area click) -- **Custom Colors**: `colors` palette prop, `renderer='svg-batch'` for performance -- **Pro Features** (require `licenseKey`): `initialZoom`, `showSlider`, `showToolbar`, `brushConfig`, `zoomData` output -- **Architecture**: Uses `BarChart` from `@mui/x-charts` and `BarChartPro` from `@mui/x-charts-pro` — auto-switches based on Pro feature usage - -### CandlestickChart Features (v1.2.0) -- **Custom OHLC Rendering**: Built on MUI X Charts Pro composition API with custom SVG candles -- **Array Format**: `series=[{data: [[open,high,low,close], ...], upColor, downColor}]` -- **Dataset Format**: `dataset` + `series=[{datasetKeys: {open, high, low, close}}]` -- **Volume Overlay**: `showVolume=True` with `volumeKey` (dataset) or `volume` array (series) -- **Candle Styling**: `bodyWidthRatio` (0-1, default 0.6), `wickWidth` (px, default 2) -- **OHLC Tooltip**: Built-in hover tooltip showing O/H/L/C values with vertical crosshair -- **Reference Lines**: Support/resistance levels, moving average markers -- **Click Events**: `clickData` with full OHLC values -- **Auto Y-Domain**: Computes min/max from data with 5% padding -- **Architecture**: Uses `ChartDataProviderPro` + custom `CandlePlot` SVG component (no `@mui/x-charts-premium` needed) -- **Pro Features**: Zoom, slider, toolbar via composition API - -### LineChart & CompositeChart Features (v1.1.0) -- **Built-in Date Formatting**: `dateFormat` / `dateTickFormat` props on xAxis/yAxis for time-scale axes - - `dateFormat='M/d HH:mm'` for tooltip labels, `dateTickFormat='M/d'` for compact tick labels - - Tokens: `YYYY`, `MMM`, `MM`, `M`, `dd`, `d`, `HH`, `mm` -- **Functions-as-Props**: `valueFormatter` on xAxis/yAxis accepts DMC-style `{'function': 'name', 'options': {...}}` - - Resolves from `window.dashMuiChartsFunctions` registry (users define in `assets/*.js`) - - Mirrors Dash Mantine Components pattern for JS function serialization -- **Axis Processing**: `processedXAxis` always runs (no longer skips when `showSlider=false`) - -### LineChart Features (v0.0.7) -- **Reference Lines**: Horizontal (`y`) and vertical (`x`) markers for targets, thresholds, dates -- **Brush Selection** (Pro): Range selection with `'default'` or `'values'` overlay -- **Axis Highlight**: Configurable hover highlighting (`'none'`, `'line'`, `'band'`) -- **Controlled Axis Highlight**: `highlightedAxis` prop for programmatic control of axis highlights -- **Controlled Item Highlight**: `highlightedItem` prop for programmatic control of data point highlights -- **Per-Series highlightScope**: Configure highlight/fade behavior per series -- **Toolbar** (Pro): `showToolbar=True` for zoom/export controls -- **Synchronized Tooltips**: Custom overlay pattern for showing tooltips on multiple charts simultaneously - -### ScatterChart Features (v0.0.8) -- **Multi-Series**: Multiple scatter series with individual colors and marker sizes -- **Z-Axis Color Mapping**: Color points by a third variable (continuous, piecewise, ordinal) -- **Voronoi Interaction**: `voronoiMaxRadius` for proximity-based hover/click -- **Dataset-Driven**: `dataset` + `datasetKeys` pattern for table-format data -- **Batch Renderer**: `renderer='svg-batch'` for large datasets -- **Click Events**: `clickData` with seriesId, dataIndex, x, y coordinates -- **Log/Sqrt Scales**: Full axis scaleType support - -### CompositeChart Features (v0.0.8) -- **Chart Layering**: Mix `type: 'scatter'` and `type: 'line'` series on one surface -- **Reference Lines**: Horizontal and vertical markers -- **Multi-Axis**: Scatter on left axis, line on right axis -- **Zoom/Pan** (Pro): `initialZoom`, `showSlider`, `zoomInteractionConfig` -- **Toolbar** (Pro): `showToolbar=True` for zoom/export controls - -### PieChart Features (v0.0.7) -- **Controlled Item Highlight**: `highlightedItem` now works as both input and output for synchronized highlighting - -### Synchronized Highlighting (v0.0.7) -- **Custom Tooltip Overlays**: Solution for MUI's limitation where tooltips only appear on hovered chart -- Use `tooltip={'trigger': 'none'}` + custom HTML divs for true synchronized tooltips -- See `pages/highlighting_sync.py` for complete implementation - ---- - -## Technology Stack - -### Frontend -- **React 18+** - UI rendering -- **@mui/x-charts v8.24.0** - Community charts -- **@mui/x-charts-pro v8.24.0** - Pro charts -- **@mui/material v6.5.0** - Material UI -- **Webpack 5** - Bundling - -### Backend -- **Python 3.8+** - Runtime -- **Dash 3.x** - Web framework -- **dash-generate-components** - Python wrapper generation - ---- - -## Quick Commands - -```bash -# Install dependencies -npm install -pip install -r requirements.txt - -# Build components -npm run build - -# Run demo app -python app.py - -# Run standalone example -python usage.py -``` - ---- - -## Key Files - -| File | Purpose | -|------|---------| -| `src/lib/components/*.react.js` | React component source | -| `dash_mui_charts/*.py` | Auto-generated Python wrappers | -| `assets/muiChartsFunctions.js` | Functions-as-props registry (formatDate, etc.) | -| `pages/*.py` | Demo page examples | -| `app.py` | Main Dash application | -| `setup.py` | Python package configuration | - ---- - -## Important Notes - -1. **MUI X Charts uses `seriesId`** not `seriesIndex` in callbacks - React components convert this -2. **Rebuild after changes**: Always run `npm run build` after modifying React components -3. **Unique IDs in multi-page apps**: Prefix component IDs with page name to avoid conflicts -4. **Pro features**: Require MUI X Pro license key via `licenseKey` prop - ---- - -## Resources - -- **MUI X Charts**: https://mui.com/x/react-charts/ -- **Dash Documentation**: https://dash.plotly.com -- **Project README**: See `README.md` for usage examples -- **Detailed Guide**: See `.claude/SKILLS.md` for implementation details \ No newline at end of file diff --git a/.claude/PYPI_PUBLISH_PLAN.md b/.claude/PYPI_PUBLISH_PLAN.md deleted file mode 100644 index c8908cf..0000000 --- a/.claude/PYPI_PUBLISH_PLAN.md +++ /dev/null @@ -1,331 +0,0 @@ -# PyPI Publishing Plan for dash-mui-charts - -This document outlines the steps to build and publish `dash-mui-charts` to PyPI using twine. - ---- - -## Pre-Publication Checklist - -### 1. Version Verification - -Current version in `package.json`: **0.0.5** - -Before publishing, ensure version is updated appropriately: -- Patch (0.0.x): Bug fixes -- Minor (0.x.0): New features, backward compatible -- Major (x.0.0): Breaking changes - -```bash -# Check current version -grep '"version"' package.json -``` - -### v0.0.5 Release Notes - -New features in this release: -- **LineChart Reference Lines**: Full `ChartsReferenceLine` API support -- **LineChart Brush Selection** (Pro): Range selection with `'default'` or `'values'` overlay -- **LineChart Axis Highlight**: Configurable hover highlighting -- **Type Enhancement**: `referenceLines.y` now accepts `string | number` -- **New Demo Pages**: `/linechart-brush`, `/linechart-referencelines` - -### 2. Required Files Check - -| File | Status | Purpose | -|------|--------|---------| -| `setup.py` | Required | Package configuration | -| `MANIFEST.in` | Required | Non-Python file inclusion | -| `README.md` | Required | PyPI project description | -| `LICENSE` | Required | License file | -| `CHANGELOG.md` | Recommended | Version history | - -### 3. Build Verification - -```bash -# Ensure components are built -npm run build - -# Verify generated files exist -ls -la dash_mui_charts/*.py -ls -la dash_mui_charts/*.js -``` - ---- - -## Setup for PyPI Publishing - -### 1. Install Build Tools - -```bash -pip install --upgrade pip -pip install --upgrade build twine -``` - -### 2. Configure PyPI Credentials - -Create or update `~/.pypirc`: - -```ini -[distutils] -index-servers = - pypi - testpypi - -[pypi] -username = __token__ -password = pypi-YOUR_API_TOKEN_HERE - -[testpypi] -username = __token__ -password = pypi-YOUR_TEST_API_TOKEN_HERE -``` - -**Security Note:** Use API tokens instead of username/password. Generate tokens at: -- PyPI: https://pypi.org/manage/account/token/ -- TestPyPI: https://test.pypi.org/manage/account/token/ - ---- - -## Update setup.py for PyPI - -The current `setup.py` needs enhancements for PyPI: - -```python -import json -from setuptools import setup - -with open('package.json') as f: - package = json.load(f) - -with open('README.md', encoding='utf-8') as f: - long_description = f.read() - -package_name = package['name'].replace(' ', '_').replace('-', '_') - -setup( - name=package_name, - version=package['version'], - author=package['author'], - author_email='your-email@example.com', # Add email - packages=[package_name], - include_package_data=True, - license=package['license'], - description=package.get('description', package_name), - long_description=long_description, - long_description_content_type='text/markdown', - url='https://github.com/pip-install-python/dash-mui-charts', - project_urls={ - 'Bug Reports': 'https://github.com/pip-install-python/dash-mui-charts/issues', - 'Source': 'https://github.com/pip-install-python/dash-mui-charts', - 'Documentation': 'https://github.com/pip-install-python/dash-mui-charts#readme', - }, - install_requires=['dash>=3.0.0'], - classifiers=[ - 'Development Status :: 3 - Alpha', - 'Framework :: Dash', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: MIT License', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Topic :: Scientific/Engineering :: Visualization', - ], - keywords='dash plotly charts mui material-ui visualization', - python_requires='>=3.8', -) -``` - ---- - -## Update MANIFEST.in - -Ensure all necessary files are included: - -``` -include dash_mui_charts/*.js -include dash_mui_charts/*.js.map -include dash_mui_charts/package-info.json -include dash_mui_charts/metadata.json -include README.md -include LICENSE -include CHANGELOG.md -``` - ---- - -## Build Process - -### Step 1: Clean Previous Builds - -```bash -rm -rf build/ dist/ *.egg-info/ -``` - -### Step 2: Build Source Distribution and Wheel - -```bash -python -m build -``` - -This creates: -- `dist/dash_mui_charts-0.0.5.tar.gz` (source distribution) -- `dist/dash_mui_charts-0.0.5-py3-none-any.whl` (wheel) - -### Step 3: Verify Package Contents - -```bash -# Check tarball contents -tar tzf dist/dash_mui_charts-0.0.5.tar.gz | head -30 - -# Check wheel contents -unzip -l dist/dash_mui_charts-0.0.5-py3-none-any.whl | head -30 -``` - -### Step 4: Run Twine Check - -```bash -twine check dist/* -``` - -Expected output: -``` -Checking dist/dash_mui_charts-0.0.5.tar.gz: PASSED -Checking dist/dash_mui_charts-0.0.5-py3-none-any.whl: PASSED -``` - ---- - -## Publishing - -### Option A: Test on TestPyPI First (Recommended) - -```bash -# Upload to TestPyPI -twine upload --repository testpypi dist/* - -# Test installation from TestPyPI -pip install --index-url https://test.pypi.org/simple/ \ - --extra-index-url https://pypi.org/simple/ \ - dash-mui-charts -``` - -### Option B: Publish to PyPI - -```bash -# Upload to PyPI (production) -twine upload dist/* -``` - ---- - -## Post-Publication Verification - -### 1. Install from PyPI - -```bash -pip install dash-mui-charts -``` - -### 2. Test Import - -```python -from dash_mui_charts import LineChart, PieChart, Heatmap, SparklineChart -print("All components imported successfully!") -``` - -### 3. Run Example - -```bash -python usage.py -``` - ---- - -## Version Bump Workflow - -For subsequent releases: - -### 1. Update Version - -Edit `package.json`: -```json -{ - "version": "0.0.6" -} -``` - -### 2. Update CHANGELOG.md - -Add new version section with changes. - -### 3. Rebuild and Publish - -```bash -npm run build -rm -rf build/ dist/ *.egg-info/ -python -m build -twine check dist/* -twine upload dist/* -``` - -### 4. Create Git Tag - -```bash -git add -A -git commit -m "Release v0.0.6" -git tag -a v0.0.6 -m "Version 0.0.6" -git push origin main --tags -``` - ---- - -## Troubleshooting - -### "File already exists" Error - -Each version can only be uploaded once. Bump the version number. - -### Missing Files in Package - -Check `MANIFEST.in` includes all required files. Verify with: -```bash -tar tzf dist/dash_mui_charts-*.tar.gz -``` - -### README Not Rendering on PyPI - -Ensure `long_description_content_type='text/markdown'` is set in `setup.py`. - -### Import Errors After Installation - -Verify `__init__.py` exports all components: -```python -from dash_mui_charts._imports_ import * -``` - ---- - -## Quick Reference Commands - -```bash -# Full build and publish workflow -npm run build # Build React components -rm -rf build/ dist/ *.egg-info/ # Clean old builds -python -m build # Build Python package -twine check dist/* # Verify package -twine upload --repository testpypi dist/* # Test upload -twine upload dist/* # Production upload -``` - ---- - -## Links - -- **PyPI Project**: https://pypi.org/project/dash-mui-charts/ -- **TestPyPI Project**: https://test.pypi.org/project/dash-mui-charts/ -- **GitHub Repository**: https://github.com/pip-install-python/dash-mui-charts -- **PyPI Publishing Guide**: https://packaging.python.org/tutorials/packaging-projects/ \ No newline at end of file diff --git a/.claude/SCHEDULER_PLAN.md b/.claude/SCHEDULER_PLAN.md deleted file mode 100644 index e41d7ad..0000000 --- a/.claude/SCHEDULER_PLAN.md +++ /dev/null @@ -1,354 +0,0 @@ - - -# Implementation Plan: Porting MUI X Scheduler + TimeClock into `dash_mui_charts` - -Build-ready plan grounded in the repo's verified conventions (functional React components with `setProps`, auto-generated `.py` wrappers via `dash-generate-components`, `LicenseInfo`-gated Pro components, Mantine-color-scheme `MutationObserver` dark mode, demo pages + `NAV_ITEMS`). TimeClock already exists (`src/lib/components/TimeClock.react.js`, registered in `index.js`, demo at `pages/time_clock.py`); it is the working template for the string↔dayjs boundary. - ---- - -## 1. Compatibility & the gating decision - -### The dependency reality - -| Family | Current library (X v8 / Material v6) | Scheduler requires | -|---|---|---| -| `@mui/material` | `^6.5.0` | `^7.3.0` | -| `@mui/icons-material` | `^6.5.0` | `^7.3.0` | -| `@mui/system` | `7.3.7` (already v7) | `^7.3.0` ✅ | -| MUI X core | `@mui/x-charts@8.24`, `x-tree-view@8.27`, `x-date-pickers@8.24` (v8) | `@mui/x-internals@^9.1`, `x-tree-view@^9.4`, `@mui/utils@9.0.1` (v9) | -| Base UI | none | `@base-ui/react@^1.5.0` (NEW) | -| License | `@mui/x-license@^7.24` | `@mui/x-license@^9.4` (Premium) | -| Status | stable | `@mui/x-scheduler@9.0.0-beta.0` (Preview, API may shift) | - -### The unifying move - -X v8 (charts, tree-view, date-pickers) **all declare peer support for `@mui/material@^7.0.0`**. `@mui/system` is already 7.3.7. So **bumping `@mui/material` 6→7 + `@mui/icons-material` 6→7 is non-breaking for the existing 12 components** and is the single uplift that unblocks the scheduler family. MUI X v8 (charts) and X v9 (scheduler) coexist as nested deps — webpack will resolve two copies, which is functionally fine but has two costs: - -1. **Dual `@mui/x-license` singletons.** Charts/tree-view/date-pickers use `@mui/x-license@7`; the scheduler-premium uses `@mui/x-license@9`. `LicenseInfo.setLicenseKey()` must be called against **both** singletons. The React component must import from the matching version (`import { LicenseInfo } from '@mui/x-license'` resolves per-package via node_modules nesting). Concretely: the scheduler React file calls the v9 `LicenseInfo`; existing Pro charts/tree keep calling the v7 `LicenseInfo`. The same license string is set on both. -2. **Bundle size.** Two MUI X cores + Base UI + scheduler internals. Webpack `externals` already excludes react/react-dom/plotly/prop-types only — MUI is bundled. Estimate **+450–700 KB minified** (scheduler + x-internals v9 + base-ui + virtualizer for premium). Mitigate with import-path tree-shaking (`@mui/x-scheduler/event-calendar`, not barrel) and shipping premium as a separate registered component so community users don't pull `@mui/x-scheduler-premium` + `x-virtualizer`. - -### Options - -| Option | What | Pros | Cons | Recommendation | -|---|---|---|---|---| -| **A — Full uplift** | Bump material/icons 6→7 globally, add `@mui/x-scheduler@9` (+ premium), add `@base-ui/react`. All 13 existing components + new scheduler share material v7. | One material version, cleanest long-term, no duplicate `@mui/material`. | Regression surface across all 12 chart/tree components (material v6→v7 visual + API deltas: Grid v2 default, removed deprecated APIs, sx/styled changes). Beta scheduler in production tree. | **Chosen.** Material v6→v7 is low-risk here (components use `createTheme`+`ThemeProvider`+`sx`, the stable surface). Do it behind a feature branch with the full demo-page smoke test. | -| **B — Isolate scheduler** | Keep material v6 for charts; load scheduler in an isolated bundle pinning a nested `@mui/material@7`. | Existing components untouched. | Two `@mui/material` copies → two emotion caches, doubled theme context, ThemeProvider mismatch across the page, ~1MB+ bundle, brittle. Emotion style insertion order bugs. | Reject — emotion/material duplication is a known footgun. | -| **C — Defer scheduler, ship TimeClock now** | Ship TimeClock (already built, zero new deps) this release; gate scheduler until `@mui/x-scheduler` exits beta and (ideally) declares material v8 peer compat. | Zero risk now; scheduler API stabilizes. | No calendar until GA. | **Adopt as the phasing for the scheduler portion** — ship TimeClock in the current release; do the material v7 uplift + EventCalendar in the next minor, flagged "Preview". | - -**Net decision:** Option A's dependency posture, executed on Option C's timeline. Ship TimeClock now. Land the material v7 + scheduler work on a `feat/scheduler` branch, validated against every demo page, released as a clearly-labeled **Preview** minor. - ---- - -## 2. TimeClock — confirmed unblocked - -Already built on `@mui/x-date-pickers@8.24.0` + `dayjs` (`AdapterDayjs`), peer-compatible with material v6 **and** v7 (no change needed at uplift). Existing file: `src/lib/components/TimeClock.react.js`, registered in `index.js`, demo `pages/time_clock.py` (`/time-clock`). **No work required beyond a NAV entry** (see §7). For completeness, the shipped Dash prop surface: - -| Dash prop | Type | Default | Description | -|---|---|---|---| -| `value` | `string` (ISO `"2022-04-17T15:30:00"` or time-only `"15:30"`/`"15:30:45"`) | — | Controlled value; **also OUTPUT** (full wall-time ISO on change). | -| `defaultValue` | `string` | — | Uncontrolled initial value, same formats. | -| `views` | `['hours','minutes','seconds']` subset | `['hours','minutes']` | Views to render, in order. | -| `view` | `'hours'\|'minutes'\|'seconds'` | — | Controlled visible view; **also OUTPUT**. | -| `openTo` | same enum | — | View to open first (uncontrolled). | -| `ampm` | `bool` | (locale) | Force 12h/24h. | -| `disabled` | `bool` | `false` | Disable clock. | -| `readOnly` | `bool` | `false` | Read-only. | -| `autoFocus` | `bool` | `false` | Focus on mount. | -| `minutesStep` | `number` | — | Step between selectable minutes. | -| `minTime` / `maxTime` | `string` | — | Bounds (ISO or time-only). | -| `disableFuture` / `disablePast` | `bool` | `false` | Disable future/past relative to now. | -| `disableIgnoringDatePartForTimeValidation` | `bool` | `false` | Include date part in min/max comparison. | -| `skipDisabled` | `bool` | `false` | Skip disabled times when picking default. | -| `showViewSwitcher` | `bool` | `false` | Show view-switch arrows. | -| `className` | `string` | — | Class on wrapping div. | -| `sx` | `object` | — | MUI sx (object form only). | -| **`timeData`** (OUTPUT) | `exact({hours,minutes,seconds,formatted,event_timestamp})` | — | Parsed convenience output on every change. | - -**Serialization boundary:** `parseToDayjs()` maps strings → dayjs in; `newVal.format('YYYY-MM-DDTHH:mm:ss')` maps dayjs → string out. `minTime`/`maxTime` parse the same way. - -**Function-only MUI props omitted:** `shouldDisableTime`, `shouldDisableClock`, `referenceDate` (function/Date), `slots`/`slotProps`, `onError`. These take JS functions/Date objects and are not serializable — omit (or, if demanded later, expose via a `window.dashMuiChartsFunctions` registry like the charts' `valueFormatter`). - ---- - -## 3. EventCalendar (community) — `MuiEventCalendar` Dash component - -New file `src/lib/components/MuiEventCalendar.react.js`. Imports: `import { EventCalendar } from '@mui/x-scheduler/event-calendar'`. Same dark-mode `useMantineColorScheme` hook + `ThemeProvider` as TimeClock/TreeViewPro. Wrap in a sized `
` (MUI fills the container; demos use `height:600`). - -> **Date boundary:** the scheduler accepts **ISO 8601 strings** for `start`/`end`/`visibleDate` (verified from live demos — the React layer converts to its internal adapter, Luxon `DateTime`, on the JS side). So Dash passes ISO strings throughout; the wrapper converts `visibleDate` string → adapter DateTime before passing, and serializes the change event's DateTime → ISO string before `setProps`. Event objects are passed through verbatim (already ISO-string dates). - -### 3a. Events - -| Dash prop | Type | Default | Description | -|---|---|---|---| -| `events` | `array` | `[]` | Events to render; **INPUT + OUTPUT** (round-trips on create/edit/move/resize/delete via internal `onEventsChange`). | -| `eventColor` | `oneOf(9 palette names)` | `'teal'` | Component-level fallback color (lowest priority in resolution). | -| `eventCreation` | `oneOfType([bool, exact({duration:number, interaction:oneOf(['click','double-click'])})])` | `true` | `false` disables creation; object configures default duration (minutes) + click/double-click. | - -### 3b. Resources - -| Dash prop | Type | Default | Description | -|---|---|---|---| -| `resources` | `array` | — | Resources events can link to (supports nested `children`). | -| `visibleResources` | `object` (Record) | — | Controlled visibility; **INPUT + OUTPUT**. Visible if absent or `true`. | -| `defaultVisibleResources` | `object` | `{}` | Uncontrolled initial visibility. | -| `shouldEventRequireResource` | `bool` | `false` | Require a resource on each event (hides "No resource"). | - -### 3c. Views - -| Dash prop | Type | Default | Description | -|---|---|---|---| -| `views` | `arrayOf(oneOf(['day','week','month','agenda']))` | `['day','week','month','agenda']` | Which view buttons are offered. | -| `view` | `oneOf(['day','week','month','agenda'])` | — | Controlled active view; **INPUT + OUTPUT**. | -| `defaultView` | same enum | `'week'` | Uncontrolled initial view. | - -### 3d. Navigation / visible date - -| Dash prop | Type | Default | Description | -|---|---|---|---| -| `visibleDate` | `string` (ISO) | — | Controlled visible date; **INPUT + OUTPUT**. Wrapper converts string↔DateTime. | -| `defaultVisibleDate` | `string` (ISO) | today | Uncontrolled initial visible date. | -| `goToDate` | `string` (ISO) | — | **Imperative replacement for `apiRef.setVisibleDate`** — a write-only trigger: when set, the wrapper navigates and clears it. (`apiRef` is non-serializable; we expose navigation via the controlled `visibleDate` + this trigger prop.) | - -### 3e. Drag / resize - -| Dash prop | Type | Default | Description | -|---|---|---|---| -| `areEventsDraggable` | `bool` | `true` | Allow drag-to-reschedule (per-event/per-resource overrides win). | -| `areEventsResizable` | `oneOfType([bool, oneOf(['start','end'])])` | `true` | Resize behavior. | -| `canDragEventsFromTheOutside` | `bool` | `false` | Allow external `StandaloneEvent` drops in. | -| `canDropEventsToTheOutside` | `bool` | `false` | Allow dragging events out. | - -### 3f. Editing - -| Dash prop | Type | Default | Description | -|---|---|---|---| -| `readOnly` | `bool` | `false` | Global read-only (disables create/drag/resize/dialog editing). Per-event `readOnly` and per-resource `areEventsReadOnly` override. | - -### 3g. Preferences - -| Dash prop | Type | Default | Description | -|---|---|---|---| -| `preferences` | `exact({ampm, isSidePanelOpen, showEmptyDaysInAgenda, showWeekends, showWeekNumber, weekStartsOn})` (all optional) | — | Controlled prefs; **INPUT + OUTPUT**. | -| `defaultPreferences` | same shape | `{showWeekends:true, showWeekNumber:false, isSidePanelOpen:true, showEmptyDaysInAgenda:true, ampm:true}` | Uncontrolled initial prefs. `weekStartsOn` 0=Sun..6=Sat. | -| `preferencesMenuConfig` | `oneOfType([oneOf([false]), exact({toggleAmpm, toggleWeekStartsOn, toggleWeekendVisibility, toggleWeekNumberVisibility, toggleEmptyDaysInAgenda})])` | — | `false` hides menu; object toggles items. | - -### 3h. Localization / timezone - -| Dash prop | Type | Default | Description | -|---|---|---|---| -| `displayTimezone` | `string` | `'default'` | IANA name, or `'default'`/`'locale'`/`'UTC'`. Render-only. | -| `localeText` | `object` (string→string) | — | UI label overrides. **Only string-valued keys accepted** (the ~10 function keys, e.g. `hiddenEvents`, `recurrenceMonthlyPresetLabel`, are recurrence/plural formatters — dropped or resolved from a JS registry; see flags below). | -| `dateLocale` | `string` (locale code, e.g. `'fr'`) | `'enUS'` | Wrapper maps a string code → the date-fns/Luxon locale object on the JS side via a small `{code: localeObj}` lookup. | -| `showCurrentTimeIndicator` | `bool` | `true` | Current-time line in time views. | - -### 3i. Theming - -| Dash prop | Type | Default | Description | -|---|---|---|---| -| `className` | `string` | — | Class on wrapping div. | -| `sx` | `object` | — | MUI sx (object form only). | -| `height` | `number\|string` | `600` | Height of the wrapping container (component fills it). | - -### Callback → Dash output mapping (controlled-prop write-back pattern) - -| MUI callback | Signature | Dash realization | -|---|---|---| -| `onEventsChange(newEvents)` | `(SchedulerEvent[]) => void` | `setProps({events: newEvents, lastAction: {...}})` — `events` is in+out. | -| `onViewChange(view)` | `(string) => void` | `setProps({view})`. | -| `onVisibleDateChange(dt)` | `(DateTime, ev?) => void` | `setProps({visibleDate: dt.toISO()})`. | -| `onVisibleResourcesChange(map)` | `(Record) => void` | `setProps({visibleResources: map})`. | -| `onPreferencesChange(prefs)` | `(Partial) => void` | `setProps({preferences: prefs})`. | - -### Function-only MUI props — flagged + Dash alternative - -| MUI prop | Why unserializable | Dash-friendly alternative | -|---|---|---| -| `apiRef` (`useEventCalendarApiRef`) | React ref / imperative methods | Controlled `visibleDate` + write-only `goToDate` trigger prop. | -| `dataSource` `{getEvents, persistEvents}` | JS functions (lazy loading) | Use `events` + `onEventsChange` round-trip (Phase 1). Lazy loading is a Premium concern (§4). | -| `eventModelStructure` `{field:{getter,setter}}` | JS getter/setter | **Drop.** Require canonical field names. Optionally accept a simple `{canonicalField: 'customKey'}` **string→string** remap dict and build getters client-side. | -| `resourceModelStructure` `{field:{getter}}` | JS getter | Same: drop, or accept string→string remap and synthesize getters in the wrapper. | -| `dateLocale` (date-fns/Luxon object) | non-serializable object | `dateLocale` string code → object lookup on JS side. | -| `localeText` function keys | JS `(arg)=>string` formatters | Accept only string keys; ignore/strip function keys (or resolve from `window.dashMuiChartsFunctions`). | -| `sx` function form | JS function | Object form only. | -| `classes` | (serializable, but 200+ rules) | Pass through `sx` + `className` instead; defer `classes`. | - -### Dash-friendly data models - -**SchedulerEvent (dict):** -```python -{ - "id": "1", # str|int, required - "title": "Team Meeting", # str, required - "start": "2024-01-15T10:00:00", # ISO string, required - "end": "2024-01-15T11:00:00", # ISO string, required - "resource": "team-a", # str|int, optional (resource.id) - "allDay": False, # bool, optional - "timezone": "America/New_York", # IANA str, optional - "color": "blue", # oneOf 9 palette, optional (highest priority) - "className": "highlighted", # str, optional - "draggable": True, # bool, optional per-event override - "resizable": "end", # bool|'start'|'end', optional - "readOnly": False, # bool, optional (highest priority) - # "rrule": "FREQ=WEEKLY;..." # PREMIUM only (§4) - # "description": "..." # str, dialog General tab -} -``` - -**SchedulerResource (dict):** -```python -{ - "id": "team-a", # str|int, required - "title": "Team A", # str, required (canonical; map 'name'->title in Python) - "eventColor": "pink", # oneOf 9, optional - "children": [ {...} ], # nested resources, optional - "areEventsDraggable": False, # bool, optional - "areEventsResizable": "start", # bool|'start'|'end', optional - "areEventsReadOnly": True, # bool, optional (inherited by descendants) -} -``` -Palette enum (9, default `teal`): `purple, teal, lime, orange, green, pink, indigo, amber, blue` *(the API-page list of 11 includes `grey`+`red`; the events/resources guide pages enumerate 9 — declare PropTypes against the 9 guide-confirmed names plus `grey`,`red` to be safe).* - ---- - -## 4. EventCalendarPremium additions - -New file `src/lib/components/MuiEventCalendarPremium.react.js` (or a `premium` boolean branch inside the community file selecting `EventCalendarPremium` from `@mui/x-scheduler/event-calendar-premium`). All community props/models apply. Adds: - -| Feature | Dash surface | -|---|---| -| **Recurrence** | `event.rrule` accepted as **RRULE string** (`"FREQ=WEEKLY;INTERVAL=2;BYDAY=TH"`) or object form `{freq, interval, byDay, byMonthDay, count, until}`. Both are plain-serializable — pass through verbatim. Recurrence tab appears in the dialog. | -| **Exception dates** | Per-event exception list (RRULE `EXDATE`-style); pass through as part of the event dict per the premium event model. | -| **DST-aware recurrence** | Automatic in the premium engine; no Dash prop. | -| **Lazy loading / `dataSource`** | Function-valued (`getEvents`/`persistEvents`) — **not portable directly**. Dash alternative: keep `events`+`onEventsChange`, or expose `loadRange` output `{start, end}` (window the user scrolled to) + `events` input so Python can fetch and feed back. Defer to Phase 3+. | -| **`licenseKey`** | `licenseKey: PropTypes.string`. Module-level `let licenseKeySet = false;` gate; on render: `if (licenseKey && !licenseKeySet) { LicenseInfo.setLicenseKey(licenseKey); licenseKeySet = true; }` — using the **v9** `@mui/x-license` (`@mui/x-scheduler-premium` peer). Mirrors `TreeViewPro.react.js` lines 498–500, but against the v9 singleton. | - ---- - -## 5. EventTimelinePremium Dash component - -New file `src/lib/components/MuiEventTimeline.react.js`. Import: `import { EventTimelinePremium } from '@mui/x-scheduler-premium/event-timeline-premium'` (note the **distinct package** `@mui/x-scheduler-premium`). Premium-only; `licenseKey` gated like §4. Resource-row Gantt-style timeline (events placed on `resource` rows; demos use `height:400`). - -| Dash prop | Type | Default | Description | -|---|---|---|---| -| `events` | `array` | `[]` | Allocation bars; each needs `resource`. **IN + OUT** via `onEventsChange`. | -| `resources` | `array` | — | Resource rows. | -| `defaultVisibleDate` / `visibleDate` | `string` (ISO) | today | Timeline window center; `visibleDate` IN+OUT. | -| `units` / `zoom` | `string` enum (e.g. `'day'`, `'week'`, `'monthAndYear'`) | — | Timeline granularity/zoom (confirm exact enum against `/x/api/scheduler/event-timeline-premium/` during build — page was beyond the captured extraction). | -| `areEventsDraggable` / `areEventsResizable` | `bool` / union | `true` | Reschedule/resize allocations on the timeline. | -| `readOnly` | `bool` | `false` | Read-only timeline. | -| `licenseKey` | `string` | `''` | Premium license (v9 `LicenseInfo`). | -| `height` | `number\|string` | `400` | Container height. | -| `className` / `sx` | `string` / `object` | — | Styling. | - -Callback mapping identical to §3: `onEventsChange → events`, `onVisibleDateChange → visibleDate`. **Build note:** the timeline API table was not in the captured docs — fetch `/x/api/scheduler/event-timeline-premium/` at build time to finalize the `units`/`zoom` enum and any timeline-specific props before locking PropTypes. - ---- - -## 6. Serialization & callbacks design - -**Contract (all scheduler components):** - -1. **Events round-trip.** `events` is both Input and Output. Internal handler: - ```js - const handleEventsChange = useCallback((newEvents) => { - if (!setProps) return; - const prev = eventsRef.current; // ref tracking last events - const action = diffEvents(prev, newEvents); // classify the change - setProps({ events: newEvents, lastAction: { ...action, event_timestamp: Date.now() }}); - }, [setProps]); - ``` -2. **`event_timestamp` pattern.** Every output object carries `event_timestamp: Date.now()` (matches the existing `TimeClock.timeData.event_timestamp` convention) so Dash callbacks can dedupe and order, and use it as the `Input` that fires. -3. **`lastAction` output** (OUTPUT-only convenience): - ```python - { - "type": "create" | "update" | "delete" | "move" | "resize", - "event": { ...the affected SchedulerEvent... }, # null for ambiguous bulk - "event_timestamp": 1718000000000 - } - ``` - Derived in the wrapper by diffing previous vs. new `events` (added → `create`; removed → `delete`; same id, changed start/end with equal duration → `move`; changed duration → `resize`; other field change → `update`). This gives Python a precise signal without diffing the full array server-side. -4. **Controlled write-backs** for `view`, `visibleDate` (ISO string), `visibleResources`, `preferences` — each its own `setProps` key, each usable as a Dash `Input`. -5. **Date conversion** lives entirely in the React layer: ISO string in → adapter DateTime; DateTime out → `.toISO()`. Python never sees a non-string date. - -PropTypes for outputs use `PropTypes.exact({...})` (as TimeClock does for `timeData`) so the auto-generated wrapper documents them. - ---- - -## 7. File-by-file work plan - -### New React files -- `src/lib/components/MuiEventCalendar.react.js` — community calendar (§3). -- `src/lib/components/MuiEventCalendarPremium.react.js` — premium calendar (§4) *(or a `premium` branch in the above; separate file keeps community bundle lean and is the safer split for tree-shaking)*. -- `src/lib/components/MuiEventTimeline.react.js` — premium timeline (§5). -- *(Optional Phase 3)* `src/lib/components/SchedulerStandaloneEvent.react.js` — for external drag-and-drop (`StandaloneEvent`). - -Each follows the TimeClock template: `useMantineColorScheme` MutationObserver hook, `light/darkTheme = createTheme({palette:{mode}})`, `ThemeProvider` wrap, `defaultProps`, JSDoc-annotated `PropTypes`, `export default`. - -### `src/lib/index.js` edits -Add imports + exports for `MuiEventCalendar`, `MuiEventCalendarPremium`, `MuiEventTimeline` (and `TimeClock` is already present). - -### `package.json` dependency changes -```jsonc -"@mui/material": "^7.3.0", // 6.5.0 -> 7 -"@mui/icons-material": "^7.3.0", // 6.5.0 -> 7 -"@mui/system": "^7.3.7", // pin (already present transitively) -"@base-ui/react": "^1.5.0", // NEW (scheduler peer) -"@mui/x-scheduler": "9.0.0-beta.0", // community calendar (pin exact — beta) -"@mui/x-scheduler-premium": "9.0.0-beta.0", // premium calendar + timeline (pin exact) -"@mui/x-license": "^9.4.0" // bump 7 -> 9 for scheduler-premium; v7 still resolves nested for charts -``` -Keep `@mui/x-charts@^8.24`, `@mui/x-charts-pro@^8.24`, `@mui/x-tree-view@^8.27`, `@mui/x-tree-view-pro@^8.27`, `@mui/x-date-pickers@8.24.0`, `dayjs@1.11.13` unchanged. Run `npm install`, confirm webpack resolves both x-license copies (charts→v7, scheduler→v9). - -### Demo pages (`pages/`) — `dash.register_page` + `layout` + `@callback` -- `pages/time_clock.py` — exists (`/time-clock`); just add NAV entry. -- `pages/scheduler_calendar.py` (`/scheduler`) — sections: Basic events; Views (`day/week/month/agenda`); Controlled view + visibleDate (Dash `dcc.Store`/buttons driving `view`/`goToDate`); Resources + visibility toggles; Drag/resize toggles; Editing/read-only; Preferences + `preferencesMenuConfig`; Timezone (`displayTimezone`); `lastAction` live readout. Use `dmc` helpers like `pages/time_clock.py`'s `demo_item`/`section`. -- `pages/scheduler_premium.py` (`/scheduler-premium`) — recurrence (`rrule` string + object), exception dates, `licenseKey` from env. -- `pages/scheduler_timeline.py` (`/scheduler-timeline`) — resource rows, allocation bars, `units`/`zoom`. - -### `app.py` `NAV_ITEMS` additions -Add after the TreeView group: -```python -{"itemId": "group-scheduler", "label": "Scheduler", "icon": "CalendarMonth", "children": [ - {"itemId": "/scheduler", "label": "Event Calendar", "icon": "PlayArrow"}, - {"itemId": "/scheduler-premium", "label": "Recurrence (Pro)", "icon": "Diamond"}, - {"itemId": "/scheduler-timeline", "label": "Timeline (Pro)", "icon": "ViewTimeline"}, -]}, -{"itemId": "group-timeclock", "label": "TimeClock", "icon": "Schedule", "children": [ - {"itemId": "/time-clock", "label": "Examples", "icon": "PlayArrow"}, -]}, -``` -(`ALL_GROUP_IDS` derives automatically from the `group-` prefix.) - -### Build / validation steps -1. `npm install` (after package.json edits). -2. `npm run build` (= `webpack --mode production` + `dash-generate-components ./src/lib/components dash_mui_charts`). Confirm `dash_mui_charts/MuiEventCalendar.py` etc. auto-generate — **do not hand-write**. -3. `python _validate_init.py` (the repo's `validate-init` script). -4. `python app.py` — smoke-test **every** demo page (charts + tree + new scheduler) for material v6→v7 regressions. -5. Verify dark mode (toggle Mantine color scheme) re-skins calendar. -6. Verify events round-trip + `lastAction` via a console-printing callback. - -### Phased rollout -- **Phase 1 (release now):** TimeClock NAV entry only — zero new deps, ships immediately. -- **Phase 2 (`feat/scheduler` branch, next minor, "Preview"):** material/icons 6→7 uplift + `@base-ui/react` + `@mui/x-scheduler` → `MuiEventCalendar` community + `/scheduler` demo. Full demo-page regression pass is the gate. -- **Phase 3:** `@mui/x-scheduler-premium` → `MuiEventCalendarPremium` (recurrence) + `licenseKey` wiring + `/scheduler-premium`. -- **Phase 4:** `MuiEventTimeline` (`EventTimelinePremium`) + `/scheduler-timeline`; optional `StandaloneEvent` for external DnD + lazy-loading `loadRange` pattern. - ---- - -## 8. Risks & open questions - -1. **Beta API churn.** `@mui/x-scheduler@9.0.0-beta.0` is Preview; prop names/event signatures may change pre-GA. **Mitigation:** pin exact `9.0.0-beta.0` (no `^`), label the demo pages "Preview," and isolate the scheduler React files so a breaking bump is a contained edit. The Quickstart "API" section is literally a `TODO` placeholder — the only authoritative prop table is `/x/api/scheduler/event-calendar/` (captured here); re-verify before each dependency bump. -2. **Material v6→v7 regression surface across 12 existing components.** v7 changes: Grid v2 becomes default, removal of deprecated APIs, `styled`/`sx` internals, possible visual deltas. **Mitigation:** components here use the stable `createTheme`+`ThemeProvider`+`sx` surface (low blast radius), but a full manual smoke test of every `pages/*.py` is mandatory before merge. Watch for `@mui/x-charts@8` runtime warnings under material v7 (peer-declared, but verify zoom/brush Pro paths). -3. **Dual `@mui/x-license` singletons.** Charts/tree (v7) and scheduler-premium (v9) are separate singletons — the same key must be set on both. **Risk:** a user setting only the chart license sees a scheduler watermark (and vice-versa). **Mitigation:** document that `licenseKey` must be passed to each Pro component; each component sets its own version's `LicenseInfo`. -4. **Base UI vs Mantine/MUI theming interop.** `@mui/x-scheduler@9` introduces `@base-ui/react` (a new, non-emotion styling primitive). Its theming may not respond to the MUI `ThemeProvider` dark mode the way charts/tree do — **dark mode for the calendar may need Base UI-specific CSS-variable theming, not just `createTheme({palette:{mode}})`**. Open question: does `EventCalendar` honor the MUI theme `mode`, or does it need `data-` attribute / CSS-var theming? Verify during Phase 2; may require targeting `.MuiEventCalendar-*` CSS vars via `sx`. -5. **Bundle size.** Two MUI X cores (v8 + v9) + Base UI + scheduler internals + (premium) `x-virtualizer`. Estimate **+450–700 KB min**. **Mitigation:** subpath imports (`@mui/x-scheduler/event-calendar`), keep premium in a separate registered component, consider webpack analysis post-build. If unacceptable, fall back to Option C (defer scheduler) until GA reduces the footprint. -6. **EventTimeline API gap.** The `/x/api/scheduler/event-timeline-premium/` prop table was not in the captured extraction — `units`/`zoom` enum (`monthAndYear`, etc.) and timeline-specific props must be fetched and confirmed before locking §5 PropTypes. -7. **`localeText` function keys + `dateLocale` object.** ~10 `localeText` keys are formatter functions and the `dateLocale` is a non-serializable object; the string-only / locale-code-lookup approach covers most needs but loses recurrence/plural label customization unless a `window.dashMuiChartsFunctions` registry is added later. - -**Key files referenced:** `src/lib/components/TimeClock.react.js` (boundary template), `src/lib/components/TreeViewPro.react.js` (license + dark-mode template, lines 35, 444, 498–500), `src/lib/index.js` (registration), `app.py` (`NAV_ITEMS`, lines 60–119), `pages/time_clock.py` (demo template), `package.json` (deps/scripts). diff --git a/.claude/SKILLS.md b/.claude/SKILLS.md deleted file mode 100644 index 18c5cdf..0000000 --- a/.claude/SKILLS.md +++ /dev/null @@ -1,1436 +0,0 @@ -# dash-mui-charts Skills Guide - -This document provides LLMs and developers with detailed knowledge about the dash-mui-charts component library, enabling effective assistance with development, debugging, and feature implementation. - ---- - -## Project Overview - -**dash-mui-charts** is a Dash component library that wraps [MUI X Charts](https://mui.com/x/react-charts/) for Python developers. It bridges the gap between MUI's powerful React charting library and Plotly Dash's Python ecosystem. - -### Architecture - -``` -React Components (src/lib/components/) - ↓ [npm run build] -Webpack Bundle (dash_mui_charts/*.min.js) - ↓ [dash-generate-components] -Python Wrappers (dash_mui_charts/*.py) - ↓ -Dash Application -``` - ---- - -## Project Structure - -``` -dash-mui-charts/ -├── src/lib/components/ # React component source files -│ ├── LineChart.react.js # Line/Area chart with Pro features -│ ├── BarChart.react.js # Vertical/horizontal bar charts -│ ├── CandlestickChart.react.js # OHLC candlestick charts -│ ├── PieChart.react.js # Pie/Donut/Nested pie charts -│ ├── ScatterChart.react.js # Scatter/point charts -│ ├── CompositeChart.react.js # Layered scatter + line charts -│ ├── LiveTradingChart.react.js # Real-time streaming charts -│ ├── Heatmap.react.js # Heatmap with Pro features -│ ├── SparklineChart.react.js # Compact inline sparklines -│ ├── SimpleTreeView.react.js # JSX-driven tree -│ ├── TreeView.react.js # Data-driven RichTreeView -│ ├── TreeViewPro.react.js # Pro tree (reorder, lazy, per-item controls) -│ └── TimeClock.react.js # Inline clock-face time picker -├── dash_mui_charts/ # Python package (auto-generated) -│ ├── __init__.py # Package initialization -│ ├── LineChart.py # Python wrapper for LineChart -│ ├── BarChart.py # Python wrapper for BarChart -│ ├── CandlestickChart.py # Python wrapper for CandlestickChart -│ ├── PieChart.py # Python wrapper for PieChart -│ ├── ScatterChart.py # Python wrapper for ScatterChart -│ ├── CompositeChart.py # Python wrapper for CompositeChart -│ ├── LiveTradingChart.py # Python wrapper for LiveTradingChart -│ ├── Heatmap.py # Python wrapper for Heatmap -│ ├── SparklineChart.py # Python wrapper for SparklineChart -│ ├── SimpleTreeView.py # Python wrapper for SimpleTreeView -│ ├── TreeView.py # Python wrapper for TreeView -│ ├── TreeViewPro.py # Python wrapper for TreeViewPro -│ ├── TimeClock.py # Python wrapper for TimeClock -│ ├── _imports_.py # Auto-generated imports -│ └── dash_mui_charts.min.js # Bundled JavaScript -├── assets/ # Dash assets (auto-loaded) -│ ├── muiChartsFunctions.js # Functions-as-props registry -│ └── liquid_glass_clock.css # Glassmorphic TimeClock theme (light/dark) -├── pages/ # Demo pages -│ ├── home.py # Landing page -│ ├── linechart_basic.py # Basic line chart examples -│ ├── linechart_pro.py # Pro features (zoom, pan) -│ ├── linechart_brush.py # Brush selection (Pro) -│ ├── linechart_referencelines.py # Reference lines -│ ├── linechart_tick_hover.py # Tick config, axis formatting, zoom best practices -│ ├── live_trading.py # LiveTradingChart demo -│ ├── barchart_basic.py # Bar chart: multi-series, horizontal, labels, negative -│ ├── barchart_dataset.py # Bar chart: dataset mode, bar gap control -│ ├── barchart_stacking.py # Bar chart: stack offsets, diverging, groups -│ ├── barchart_interaction.py # Bar chart: click events, highlighting, tooltips -│ ├── barchart_reference.py # Bar chart: reference lines, colors, animation -│ ├── barchart_pro.py # Bar chart: zoom, slider, toolbar (Pro) -│ ├── barchart_candlestick.py # Candlestick: OHLC, volume, styling, click events -│ ├── pie.py # Pie chart examples -│ ├── pie_props.py # Nested pie property explorer -│ ├── scatter.py # Scatter chart examples -│ ├── composite.py # Composite chart examples -│ ├── heatmap.py # Heatmap examples -│ ├── heatmap_props.py # Heatmap property explorer -│ ├── sparkline.py # Sparkline examples -│ ├── sparkline_style.py # Sparkline styling -│ ├── tree_basic.py … tree_pro.py # TreeView / TreeViewPro demos -│ ├── time_clock.py # TimeClock basics -│ └── time_clock_lab.py # TimeClock × dash-mantine-components -├── .claude/ # Claude Code configuration -│ ├── CLAUDE.md # Quick project reference -│ ├── SKILLS.md # This file -│ ├── settings.json # Project settings -│ └── agents/ # Reference documentation -├── app.py # Main Dash application -├── usage.py # Standalone examples -├── package.json # NPM dependencies -├── setup.py # Python package setup -├── webpack.config.js # Build configuration -├── README.md # Project documentation -└── CHANGELOG.md # Version history -``` - ---- - -## Components (13 Total) - -### 1. LineChart - -**File:** `src/lib/components/LineChart.react.js` -**License:** Community (basic) / Pro (zoom/pan) - -**Purpose:** Full-featured line and area charts with optional Pro features. - -**Key Implementation:** - -```javascript -// Series structure -series: [ - { - data: [1, 2, 3, 4], // Y values (required) - label: 'Series Name', // Legend label - color: '#1976d2', // Line color - area: true, // Fill area under line - curve: 'monotoneX', // Curve interpolation - stack: 'group1', // Stack group ID - yAxisId: 'right', // For biaxial charts - } -] - -// Axis structure -xAxis: [ - { - data: ['Jan', 'Feb', 'Mar'], // Tick values - scaleType: 'band', // 'band' | 'linear' | 'time' | 'log' - label: 'Month', - } -] -``` - -**Pro Features (require license):** -- `zoom` / `initialZoom` - Controlled/uncontrolled zoom state -- `showSlider` - Zoom range slider -- Zoom callbacks via `zoomData` output prop -- `brushConfig` - Range selection with brush interaction - -**Reference Lines:** -```python -LineChart( - referenceLines=[ - # Horizontal line (target/threshold) - { - 'y': 100, - 'label': 'Target', - 'labelAlign': 'end', # 'start' | 'middle' | 'end' - 'lineStyle': {'stroke': '#4caf50', 'strokeWidth': 2}, - 'labelStyle': {'fill': '#4caf50', 'fontWeight': 'bold'}, - }, - # Vertical line (date/event marker) - { - 'x': 'Q2', - 'label': 'Launch', - 'lineStyle': {'stroke': '#f44336', 'strokeDasharray': '5 5'}, - }, - # With multi-axis support - { - 'y': 50, - 'axisId': 'right-axis', # Reference specific axis - 'label': 'Threshold', - }, - ], -) -``` - -**Brush Selection (Pro):** -```python -LineChart( - series=[{'id': 'my-series', 'data': [1, 2, 3, 4, 5]}], - brushConfig={'enabled': True}, - brushOverlay='values', # 'none' | 'default' | 'values' - brushSeriesId='my-series', # For 'values' overlay calculations -) -``` - -**Axis Highlight:** -```python -LineChart( - axisHighlight={ - 'x': 'band', # 'none' | 'line' | 'band' - 'y': 'line', # 'none' | 'line' - }, -) -``` - -**Controlled Item Highlight:** -```python -LineChart( - id='my-chart', - series=[ - { - 'id': 'sales', - 'data': [1, 2, 3, 4, 5], - 'showMark': True, # Required for item hover - 'highlightScope': {'highlight': 'item', 'fade': 'global'}, - }, - ], - tooltip={'trigger': 'item'}, - highlightedItem={'seriesId': 'sales', 'dataIndex': 2}, # Highlight 3rd point -) - -# Callback to handle highlight changes -@callback( - Output('display', 'children'), - Input('my-chart', 'highlightedItem'), -) -def show_highlight(item): - return json.dumps(item) if item else "No highlight" - -# Callback to set highlight programmatically -@callback( - Output('my-chart', 'highlightedItem'), - Input('highlight-btn', 'n_clicks'), - prevent_initial_call=True -) -def set_highlight(n): - return {'seriesId': 'sales', 'dataIndex': 0} -``` - -**Controlled Axis Highlight:** -```python -LineChart( - id='my-chart', - xAxis=[{'id': 'x-axis', 'data': ['A', 'B', 'C']}], - highlightedAxis=[{'axisId': 'x-axis', 'dataIndex': 1}], # Highlight 'B' -) - -@callback( - Output('my-chart', 'highlightedAxis'), - Input('my-chart', 'highlightedAxis'), # Updates on hover -) -def sync_axis_highlight(axis_highlight): - # Use for cross-chart synchronization - return axis_highlight -``` - -**Per-Series Highlight Scope:** -```python -LineChart( - series=[ - { - 'id': 'series-a', - 'data': [1, 2, 3], - 'highlightScope': { - 'highlight': 'series', # Highlight entire series on hover - 'fade': 'global', # Fade all other series - }, - }, - { - 'id': 'series-b', - 'data': [3, 2, 1], - 'highlightScope': { - 'highlight': 'item', # Highlight single point - 'fade': 'series', # Fade other points in same series - }, - }, - ], -) -``` - -**Toolbar (Pro):** -```python -LineChart( - licenseKey=MUI_PRO_LICENSE, - showToolbar=True, # Displays zoom/export controls - ... -) -``` - -**Synchronized Tooltips with Custom Overlays:** - -MUI X Charts has a known limitation: native tooltips only appear on the hovered chart, not on synchronized charts (see GitHub issues #14455, #17555). The solution is to use custom HTML tooltip overlays. - -```python -# 1. Disable MUI's built-in tooltip -LineChart( - id='chart-a', - series=[{ - 'id': 'series-a', - 'data': data_a, - 'showMark': True, - 'highlightScope': {'highlight': 'item', 'fade': 'global'}, - }], - tooltip={'trigger': 'none'}, # Disable MUI tooltip -) - -# 2. Add custom tooltip div positioned over each chart -html.Div([ - LineChart(id='chart-a', tooltip={'trigger': 'none'}, ...), - html.Div(id='custom-tooltip-a', style={ - 'position': 'absolute', - 'display': 'none', - 'backgroundColor': 'white', - 'border': '1px solid #e0e0e0', - 'borderRadius': '4px', - 'padding': '8px 12px', - 'boxShadow': '0 2px 8px rgba(0,0,0,0.15)', - 'pointerEvents': 'none', - 'zIndex': 1000, - 'transform': 'translateX(-50%)', - }), -], style={'position': 'relative'}) - -# 3. Sync highlights AND control custom tooltips -@callback( - Output('chart-a', 'highlightedItem'), - Output('chart-b', 'highlightedItem'), - Output('custom-tooltip-a', 'style'), - Output('custom-tooltip-a', 'children'), - Output('custom-tooltip-b', 'style'), - Output('custom-tooltip-b', 'children'), - Input('chart-a', 'highlightedItem'), - Input('chart-b', 'highlightedItem'), -) -def sync_charts_with_tooltips(highlight_a, highlight_b): - # Chart layout constants - LEFT_MARGIN, RIGHT_MARGIN, TOP_MARGIN = 80, 20, 20 - NUM_POINTS = 6 - - # Get data index from triggered chart - triggered = ctx.triggered_id - data_index = None - if triggered == 'chart-a' and highlight_a: - data_index = highlight_a.get('dataIndex') - elif triggered == 'chart-b' and highlight_b: - data_index = highlight_b.get('dataIndex') - - if data_index is None: - # Hide tooltips - hidden = {'display': 'none', ...} - return None, None, hidden, "", hidden, "" - - # Calculate tooltip position using CSS calc() - position_fraction = data_index / (NUM_POINTS - 1) - tooltip_style = { - 'display': 'block', - 'left': f'calc({LEFT_MARGIN}px + {position_fraction} * (100% - {LEFT_MARGIN + RIGHT_MARGIN}px))', - 'top': f'{TOP_MARGIN + 15}px', - ... - } - - # Return synced highlights + visible tooltips for BOTH charts - return ( - {'seriesId': 'series-a', 'dataIndex': data_index}, - {'seriesId': 'series-b', 'dataIndex': data_index}, - tooltip_style, tooltip_content_a, - tooltip_style, tooltip_content_b, - ) -``` - -See `pages/highlighting_sync.py` for the complete implementation. - -**Click Event Data:** -```python -clickData = { - 'type': 'mark', # 'axis' | 'mark' | 'line' | 'area' - 'seriesIndex': 0, - 'dataIndex': 2, - 'value': 5.5, - 'timestamp': '2025-01-10T...' -} -``` - -**Built-in Date Formatting (v1.1.0):** - -For time-scale axes, use `dateFormat` / `dateTickFormat` to control label format without writing JavaScript: - -```python -LineChart( - xAxis=[{ - 'data': epoch_ms_timestamps, - 'scaleType': 'time', - 'dateFormat': 'M/d HH:mm', # Full format (tooltips) - 'dateTickFormat': 'M/d', # Short format (tick labels) - 'height': 80, # Extra space for angled labels - 'tickMinStep': 86400 * 1000 * 14, # Min 2 weeks between ticks - 'tickLabelStyle': {'angle': 35, 'fontSize': 12, 'textAnchor': 'start'}, - }], - margin={'left': 65, 'right': 20, 'top': 20, 'bottom': 100}, -) -``` - -Supported format tokens: `YYYY` (year), `MMM` (Jan), `MM` (01), `M` (1), `dd` (01), `d` (1), `HH` (00-23), `mm` (00-59). - -The component internally creates a `valueFormatter` function using `context.location === 'tick'` to choose between the tick and tooltip format. The `dateFormat`/`dateTickFormat` props are stripped before passing the axis config to MUI. - -**Functions-as-Props Pattern (v1.1.0):** - -For advanced formatting beyond dates, use the DMC-style functions-as-props pattern: - -```python -# Python: pass a function reference -LineChart( - xAxis=[{ - 'scaleType': 'time', - 'valueFormatter': { - 'function': 'formatDate', # Function name in registry - 'options': {'format': 'M/d HH:mm'}, # Passed as last arg - }, - }], -) -``` - -```javascript -// assets/muiChartsFunctions.js: define the function -var dmcf = window.dashMuiChartsFunctions = window.dashMuiChartsFunctions || {}; - -dmcf.formatDate = function(value, context, options) { - var d = value instanceof Date ? value : new Date(value); - var fmt = (options && options.format) || 'M/d'; - // ... format date using tokens -}; -``` - -The `resolveFunctionProp` utility in LineChart/CompositeChart resolves `{function, options}` objects from `window.dashMuiChartsFunctions` at render time. The wrapper passes `options` as the last argument to the resolved function. - -**Axis Formatting Best Practices:** -- Use `scaleType: 'time'` (not `'point'`) for date axes when you need angled labels or zoom -- `'point'` scale with `tickLabelStyle.angle` hides labels due to MUI collision detection -- Increase `tickMinStep` to reduce tick count — more space per label prevents truncation -- Set `height: 80` on x-axis + `margin.bottom: 100` for rotated labels -- Use `tickNumber: 6` to cap total ticks for predictable spacing -- `axisHighlight: 'band'` does NOT work on `'time'` scale — use `'line'` instead - ---- - -### 2. BarChart - -**File:** `src/lib/components/BarChart.react.js` -**License:** Community (basic) / Pro (zoom/brush/toolbar) - -**Purpose:** Vertical and horizontal bar charts with stacking, labels, dataset mode, and Pro features. - -**Architecture:** Uses direct `BarChart` from `@mui/x-charts/BarChart` for community features, automatically switches to `BarChartPro` from `@mui/x-charts-pro/BarChartPro` when Pro features (zoom, brush, toolbar) are requested with a license key. - -**Key Implementation:** - -```javascript -// Series structure -series: [ - { - data: [4, 3, 5], // Bar values - dataKey: 'sales', // OR use with dataset prop - label: 'Sales', - color: '#1976d2', - stack: 'group1', // Stack group ID - stackOffset: 'none', // 'none', 'expand', 'diverging' - stackOrder: 'none', // 'none', 'appearance', 'ascending', 'descending' - barLabel: 'value', // Show value on bars - barLabelPlacement: 'center', // 'center' or 'outside' - highlightScope: { highlight: 'series', fade: 'global' }, - yAxisId: 'left', // For biaxial - } -] - -// Band axis for categories -xAxis: [ - { - data: ['Q1', 'Q2', 'Q3'], - scaleType: 'band', // Required for bar charts - categoryGapRatio: 0.3, // Gap between categories (0-1) - barGapRatio: 0.1, // Gap between bars in category (-1 to Inf) - } -] -``` - -**Dataset Mode:** -```python -BarChart( - dataset=[ - {'month': 'Jan', 'london': 18, 'paris': 15}, - {'month': 'Feb', 'london': 22, 'paris': 18}, - ], - xAxis=[{'dataKey': 'month', 'scaleType': 'band'}], - series=[ - {'dataKey': 'london', 'label': 'London'}, - {'dataKey': 'paris', 'label': 'Paris'}, - ], -) -``` - -**Stacking Patterns:** -```python -# Normalized to 100% -series=[ - {'data': [40, 35], 'stack': 'g', 'stackOffset': 'expand'}, - {'data': [30, 25], 'stack': 'g', 'stackOffset': 'expand'}, -] - -# Diverging (positive above, negative below zero) -series=[ - {'data': [20, -10], 'stack': 'net', 'stackOffset': 'diverging'}, - {'data': [-15, 25], 'stack': 'net', 'stackOffset': 'diverging'}, -] - -# Multiple stack groups (side by side) -series=[ - {'data': [40], 'stack': '2024'}, - {'data': [20], 'stack': '2024'}, - {'data': [35], 'stack': '2025'}, - {'data': [25], 'stack': '2025'}, -] -``` - -**Horizontal Layout:** -```python -BarChart( - series=[{'data': revenue, 'label': 'Revenue'}], - yAxis=[{'data': months, 'scaleType': 'band'}], # Categories on Y - xAxis=[{'label': 'Amount'}], # Values on X - layout='horizontal', - borderRadius=6, -) -``` - -**Reference Lines:** -```python -BarChart( - referenceLines=[ - {'y': 60, 'label': 'Target', 'lineStyle': {'stroke': '#f44336', 'strokeDasharray': '6 4'}}, - {'x': 'May', 'label': 'New Policy', 'lineStyle': {'stroke': '#9c27b0'}}, - ], -) -``` - -**Click Events:** -```python -# clickData output: {seriesId, dataIndex, timestamp} -# axisClickData output: {axisValue, dataIndex, seriesValues, timestamp} -@callback( - Output('display', 'children'), - Input('my-bar', 'clickData'), -) -def show_click(data): - return json.dumps(data) if data else 'Click a bar...' -``` - -**Pro Features (require licenseKey):** -```python -BarChart( - licenseKey=os.getenv('MUI_PRO_API_KEY'), - series=[{'data': big_data, 'label': 'Sales'}], - xAxis=[{'data': categories, 'scaleType': 'band', 'zoom': {'minSpan': 5}}], - showSlider=True, - showToolbar=True, - initialZoom=[{'axisId': 'auto-generated-id-0', 'start': 0, 'end': 40}], -) -``` - ---- - -### 3. CandlestickChart - -**File:** `src/lib/components/CandlestickChart.react.js` -**License:** Community (basic) / Pro (zoom/toolbar) - -**Purpose:** Static OHLC candlestick charts for financial data. NOT the same as LiveTradingChart (which is a real-time client-side simulation). - -**Architecture:** Uses MUI X Charts Pro composition API (`ChartDataProviderPro` + `ChartsSurface`) with custom SVG rendering for candle bodies and wicks. Does NOT require `@mui/x-charts-premium` — works with existing v8.24.0 stack. Internal components: -- `CandlePlot` — Renders candle bodies (rect) and wicks (line) using `useXScale`/`useYScale` hooks -- `VolumePlot` — Renders semi-transparent volume bars (optional) -- `CandleTooltip` — Custom OHLC hover tooltip with crosshair line -- Hidden bar series drives band scale + y-axis domain computation - -**Data Formats:** - -```python -# Array format — OHLC tuples -CandlestickChart( - series=[{ - 'data': [ - [100, 110, 95, 105], # [open, high, low, close] - [105, 115, 100, 112], - ], - 'upColor': '#4caf50', # Close >= Open - 'downColor': '#f44336', # Close < Open - }], - xAxis=[{'data': ['Mon', 'Tue']}], -) - -# Dataset format — row objects -CandlestickChart( - dataset=[ - {'date': '2025-01-02', 'open': 100, 'high': 110, 'low': 95, 'close': 105, 'volume': 1200}, - ], - series=[{ - 'datasetKeys': {'open': 'open', 'high': 'high', 'low': 'low', 'close': 'close'}, - 'volumeKey': 'volume', - 'upColor': '#4caf50', - 'downColor': '#f44336', - }], - xAxis=[{'dataKey': 'date'}], -) -``` - -**Volume Overlay:** -```python -CandlestickChart( - showVolume=True, - volumeHeightRatio=0.3, # 30% of chart height - series=[{..., 'volumeKey': 'volume'}], # dataset mode - # OR - series=[{..., 'volume': [100, 200, 300]}], # array mode -) -``` - -**Candle Styling:** -```python -CandlestickChart( - bodyWidthRatio=0.8, # Wider candles (default 0.6) - wickWidth=3, # Thicker wicks (default 2) -) -``` - -**Reference Lines (Support/Resistance):** -```python -CandlestickChart( - referenceLines=[ - {'y': 110, 'label': 'Resistance', 'lineStyle': {'stroke': '#f44336', 'strokeDasharray': '6 4'}}, - {'y': 95, 'label': 'Support', 'lineStyle': {'stroke': '#4caf50', 'strokeDasharray': '6 4'}}, - ], -) -``` - -**Click Events:** -```python -# clickData output: {dataIndex, label, open, high, low, close, timestamp} -@callback( - Output('display', 'children'), - Input('my-candles', 'clickData'), -) -def show_click(data): - return json.dumps(data) if data else 'Click a candle...' -``` - ---- - -### 4. PieChart - -**File:** `src/lib/components/PieChart.react.js` -**License:** Community (Free) - -**Purpose:** Pie, donut, and nested/concentric pie charts. - -**Single Series (Simple Pie/Donut):** -```python -PieChart( - data=[ - {'id': 'a', 'value': 35, 'label': 'Marketing', 'color': '#1976d2'}, - {'id': 'b', 'value': 25, 'label': 'Engineering'}, - ], - innerRadius=50, # >0 creates donut - outerRadius=100, - cornerRadius=5, - paddingAngle=2, -) -``` - -**Multi-Series (Nested Pies):** -```python -PieChart( - series=[ - { - 'data': inner_data, - 'innerRadius': 0, - 'outerRadius': 80, - 'highlightScope': {'fade': 'global', 'highlight': 'item'}, - }, - { - 'data': outer_data, - 'innerRadius': 90, - 'outerRadius': 120, - 'highlightScope': {'fade': 'global', 'highlight': 'item'}, - }, - ], -) -``` - -**Important:** MUI X Charts uses `seriesId` (string like "series-0") not `seriesIndex` in event callbacks. The React component converts this for Python. - -**Half-Pie / Gauge:** -```python -PieChart( - data=data, - startAngle=-90, # 12 o'clock position - endAngle=90, # Half circle - innerRadius=50, -) -``` - -**Controlled Highlighting (for synchronization):** -```python -PieChart( - id='my-pie', - data=[ - {'id': 0, 'value': 35, 'label': 'A'}, - {'id': 1, 'value': 25, 'label': 'B'}, - ], - highlightScope={'highlight': 'item', 'fade': 'global'}, - highlightedItem={'seriesId': 'auto-generated-id-0', 'dataIndex': 0}, -) - -# Sync with another chart -@callback( - Output('my-pie', 'highlightedItem'), - Input('line-chart', 'highlightedItem'), -) -def sync_pie_highlight(line_item): - if line_item: - # Map line series to pie index - return {'seriesId': 'auto-generated-id-0', 'dataIndex': mapped_index} - return None -``` - ---- - -### 5. ScatterChart - -**File:** `src/lib/components/ScatterChart.react.js` -**License:** Community (Free) - -**Purpose:** Scatter/point charts with optional z-axis color mapping, voronoi interaction, and dataset-driven data. - -**Multi-Series Scatter:** -```python -ScatterChart( - series=[ - { - 'id': 'group-a', - 'label': 'Group A', - 'data': [{'x': 1, 'y': 5, 'id': 0}, {'x': 2, 'y': 8, 'id': 1}], - 'color': '#1976d2', - 'markerSize': 6, - }, - { - 'id': 'group-b', - 'label': 'Group B', - 'data': [{'x': 1.5, 'y': 3, 'id': 0}, {'x': 3, 'y': 7, 'id': 1}], - 'color': '#e53935', - }, - ], - voronoiMaxRadius=30, - height=400, -) -``` - -**Z-Axis Color Mapping:** -```python -ScatterChart( - series=[{ - 'id': 'points', - 'data': [{'x': 1, 'y': 5, 'z': 100, 'id': 0}, ...], - }], - zAxis=[{ - 'data': z_values, - 'colorMap': { - 'type': 'continuous', - 'min': 0, 'max': 100, - 'color': ['#e3f2fd', '#1565c0'], - }, - }], -) -``` - -**Dataset-Driven:** -```python -ScatterChart( - dataset=[{'temp': 20, 'humidity': 65}, ...], - series=[{ - 'id': 'weather', - 'datasetKeys': {'x': 'temp', 'y': 'humidity'}, - }], -) -``` - -**Click Events:** -```python -clickData = { - 'type': 'scatter', - 'seriesId': 'group-a', - 'dataIndex': 2, - 'x': 3.5, - 'y': 7.2, - 'timestamp': '2025-01-10T...' -} -``` - ---- - -### 6. CompositeChart - -**File:** `src/lib/components/CompositeChart.react.js` -**License:** Community (basic) / Pro (zoom/pan) - -**Purpose:** Layer multiple chart types (scatter + line) on a single surface using MUI X Charts composition API. - -**Key Implementation Details:** -- Uses `ChartDataProviderPro` + `ChartsSurface` + individual plot components -- Custom tooltip system (`CompositeAxisTooltipContent`) that shows both line and scatter data -- Automatic epoch ms → Date conversion for `scaleType: 'time'` axes -- Proximity-based scatter tooltip matching (auto-computed from axis data spacing) - -**Basic Scatter + Line Overlay:** -```python -CompositeChart( - series=[ - { - 'type': 'scatter', - 'id': 'readings', - 'label': 'Sensor Readings', - 'data': [{'x': 0, 'y': 18.5, 'id': 0}, ...], - 'markerSize': 4, - }, - { - 'type': 'line', - 'id': 'trend', - 'label': 'Trend Line', - 'data': [20.0, 22.1, ...], # positional values - 'curve': 'natural', - 'showMark': False, - }, - ], - xAxis=[{'data': x_values, 'scaleType': 'linear'}], -) -``` - -**Zoom with Slider Preview (Pro):** -```python -CompositeChart( - licenseKey=MUI_PRO_LICENSE, - series=[ - {'type': 'line', 'id': 'baseline', 'data': values, 'area': True}, - { - 'type': 'scatter', - 'id': 'anomalies', - 'data': scatter_points, - 'markerSize': 6, - 'preview': {'markerSize': 2}, # Marker size in zoom slider preview - 'highlightScope': {'highlight': 'item'}, - }, - ], - xAxis=[{ - 'data': timestamps, - 'scaleType': 'time', # Epoch ms auto-converted to Date objects - 'zoom': { - 'slider': {'enabled': True, 'preview': True}, - }, - }], - initialZoom=[{'axisId': 'time-axis', 'start': 0, 'end': 30}], -) -``` - -**Multi-Axis:** -```python -CompositeChart( - series=[ - {'type': 'scatter', 'yAxisId': 'left-axis', ...}, - {'type': 'line', 'yAxisId': 'right-axis', ...}, - ], - yAxis=[ - {'id': 'left-axis', 'position': 'left'}, - {'id': 'right-axis', 'position': 'right'}, - ], -) -``` - -**Reference Lines:** -```python -CompositeChart( - referenceLines=[ - {'y': 28, 'label': 'Upper Limit', 'lineStyle': {'stroke': 'red'}}, - {'y': 16, 'label': 'Lower Limit', 'lineStyle': {'stroke': 'red'}}, - ], -) -``` - ---- - -### 7. Heatmap - -**File:** `src/lib/components/Heatmap.react.js` -**License:** Pro (Required) - -**Purpose:** Matrix/grid visualization with color-coded cells. - -**Data Format:** -```python -# Array of [x_index, y_index, value] tuples -data = [ - [0, 0, 10], [0, 1, 20], [0, 2, 30], - [1, 0, 40], [1, 1, 50], [1, 2, 60], -] -``` - -**Color Scales:** -```python -# Continuous -colorScale = { - 'type': 'continuous', - 'min': 0, - 'max': 100, - 'colors': ['#e3f2fd', '#1976d2'], -} - -# Piecewise -colorScale = { - 'type': 'piecewise', - 'thresholds': [25, 50, 75], - 'colors': ['#green', '#yellow', '#orange', '#red'], -} -``` - ---- - -### 8. SparklineChart - -**File:** `src/lib/components/SparklineChart.react.js` -**License:** Community (Free) - -**Purpose:** Compact inline charts (default 36px height) for dashboards and tables. - -```python -SparklineChart( - data=[1, 4, 2, 5, 7, 2, 4, 6], - plotType='line', # or 'bar' - color='#1976d2', - area=True, - height=40, - width=150, -) -``` - -**Controlled Highlight:** -```python -SparklineChart( - data=data, - highlightedIndex=selected_index, # Sync with external component -) -``` - ---- - -### 9. LiveTradingChart - -**File:** `src/lib/components/LiveTradingChart.react.js` -**License:** Community (basic) / Pro (zoom/slider) - -**Purpose:** Real-time streaming chart for live data visualization (trading, sensor feeds, etc.). - ---- - -### 10. SimpleTreeView - -**File:** `src/lib/components/SimpleTreeView.react.js` -**License:** Community - -**Purpose:** JSX-driven tree (no MUI store). Useful for navigation sidebars and small static trees. Items support an `icon` field resolved through `iconResolver.js`. - ---- - -### 11. TreeView - -**File:** `src/lib/components/TreeView.react.js` -**License:** Community - -**Purpose:** Data-driven `RichTreeView` wrapper. Accepts a nested `items` array with `getItemId` / `getItemLabel` / `getItemChildren` string accessors. Supports controlled selection, expansion, in-place label editing, and per-item disabling. - ---- - -### 12. TreeViewPro - -**File:** `src/lib/components/TreeViewPro.react.js` -**License:** Pro (drag-and-drop reordering, lazy loading) - -**Purpose:** Extends `TreeView` with MUI X Pro features and per-item UI controls. Designed for the "tree paired with a map / canvas" pattern where each leaf is a layer with a 0–100 value and a row-level actions menu. - -**Pro features:** - -```python -TreeViewPro( - id="layers", - items=LAYER_ITEMS, - licenseKey=os.environ["MUI_PRO_API_KEY"], - itemsReordering=True, # drag-and-drop reorder - reorderableItems=["task-1"], # optional subset - lazyLoading=True, # fire `lazyLoadRequest` on expand - lazyLoadedChildren={...}, # parentId -> [child items] -) -``` - -**Outputs from reorder / lazy:** -- `itemPositionChanged` — `{itemId, oldPosition, newPosition, event_timestamp}` per move. -- `orderedItems` — the full live tree after each reorder (computed via internal `applyReorder` walk). Lets Python render the current nested order without re-applying deltas. Falls back to `items` until the first reorder. -- `lazyLoadRequest` — `{itemId, event_timestamp}` when an unloaded node is expanded. - -**Per-item Slider + Kebab controls** (`showItemControls=True`): - -```python -TreeViewPro( - showItemControls=True, - controlsItems=LEAF_IDS, # optional subset (leaves only) - sliderValues={"layer-a": 80, ...}, # bidirectional dict - sliderMin=0, sliderMax=100, sliderStep=1, - sliderColor="teal", # see resolver below - kebabMenuItems=[ - {"label": "Duplicate", "value": "duplicate", "icon": "ContentCopy"}, - {"label": "Delete", "value": "delete", "icon": "Delete"}, - ], -) -``` - -**Slider color resolver:** -- Mantine palette names — `"teal"` → `var(--mantine-color-teal-6)`, `"blue.5"` → `var(--mantine-color-blue-5)` (bare names use shade 6). -- CSS literals — `"#ff6b6b"`, `"rgb(255,100,50)"`, `"oklch(...)"`. -- CSS expressions — `"var(--mantine-color-...)"`, `"light-dark(white, black)"`. -- Applied via `sx` to the slider track, thumb, hover ring, value label and rail. - -**Per-item outputs:** -- `sliderChange` — `{itemId, value, event_timestamp}` on slider commit (mouse-up / touch-end). For live mid-drag readouts, observe `sliderValues` directly — it updates on every change. -- `kebabAction` — `{itemId, action, event_timestamp}` when a menu item is selected; `action` is the `value` field of the chosen menu entry. - -**Implementation notes:** -- `useMantineColorScheme` watches `` via a `MutationObserver` and re-skins MUI components through an `MUI ThemeProvider` (Checkbox, Slider, IconButton, Menu paper, MenuItems) when the Mantine theme toggles. -- `ItemLabelWithControls` holds a **local React state** for each slider during drag so the thumb tracks instantly even when Dash callback round-trips are slow. `useEffect` re-syncs from props when no drag is in flight. -- `dragstart` is `preventDefault`-cancelled on the slider + kebab area to keep `itemsReordering`'s HTML5 native drag from swallowing desktop mouse drags. Passive pointer/touch events use `stopPropagation` only. -- Demo page: `/tree-pro` (see `pages/tree_pro.py`). `slugify_label` + `assign_ids` derive stable IDs from labels at startup; duplicates get `-1`, `-2`, … suffixes. - -**Known upstream warnings (benign):** -- `Each child in a list should have a unique "key" prop` from `ButtonBase`/`SwitchBase`/`Checkbox` (triggered by `checkboxSelection=True`) and from `FocusTrap` inside an open `Menu`. Both originate in MUI v6 internals — not our code. They clear on upgrade to MUI v7. - ---- - -### 13. TimeClock - -**File:** `src/lib/components/TimeClock.react.js` -**License:** Community (Free) -**Package:** `@mui/x-date-pickers` (8.24.0) + `dayjs` adapter — the first **Date & Time Pickers** component, NOT a chart. - -**Purpose:** Inline clock-face time selector (no input / popper / modal). The user drags the hand or clicks the numbers to pick hours, minutes, and optionally seconds. - -**String ↔ dayjs boundary:** dayjs objects can't cross the Dash boundary, so values are exchanged as strings — full wall-time ISO (`"2022-04-17T15:30:00"`) or time-only (`"15:30"` / `"15:30:45"`). `parseToDayjs()` maps strings → dayjs on the way in; `newVal.format('YYYY-MM-DDTHH:mm:ss')` maps dayjs → string on the way out (local wall-time, NOT `toISOString()`, to avoid a UTC shift). - -```python -from dash_mui_charts import TimeClock - -TimeClock( - id="clock", - value="15:30:00", # controlled, in/out (wall-time ISO out) - defaultValue="15:30:00", # uncontrolled initial (use instead of value) - views=["hours", "minutes", "seconds"], # default ["hours", "minutes"] - view="hours", # controlled view, in/out - ampm=False, # force 12h/24h (omit = locale default) - minutesStep=5, - minTime="09:00", maxTime="18:00", - disabled=False, readOnly=False, - showViewSwitcher=True, -) - -# Outputs: value (wall-time ISO), view, and timeData: -# {"hours", "minutes", "seconds", "formatted" ("HH:mm:ss"), "event_timestamp"} -@callback(Output("out", "children"), Input("clock", "timeData")) -def show(td): - return td["formatted"] if td else "—" -``` - -**Function-only MUI props omitted** (not serializable): `shouldDisableTime`, `referenceDate`, `slots`/`slotProps`. `skipDisabled` is intentionally NOT exposed — it belongs to the *digital* clock variants, not the analog `TimeClock`, and leaks onto the DOM if forwarded. - -**Recolouring via `sx`** — internal MUI class names (verified from source): face `.MuiClock-clock`, hand `.MuiClockPointer-root` + `.MuiClockPointer-thumb` (set `backgroundColor` + `borderColor`) + centre `.MuiClock-pin`, digits `.MuiClockNumber-root` / `-selected`, meridiem `.MuiClock-amButton` / `-pmButton`. See `assets/liquid_glass_clock.css` and `/time-clock-lab` for a glassmorphic theme with a magnifying-lens thumb. - -**Demo pages:** `/time-clock` (basic) and `/time-clock-lab` (dynamic colours, liquid glass, stopwatch, and two-way pairings with `dmc.TimeInput` / `TimePicker` / `TimeGrid` / `DateTimePicker`). - ---- - -## Development Workflow - -### Building Components - -```bash -# Full build (JS + Python generation) -npm run build - -# Build only JS -npm run build:js - -# Generate Python wrappers only -npm run build:backends - -# Watch mode during development -npm run start -``` - -### Running the App - -```bash -# Set MUI Pro license key (optional, for Pro features) -export MUI_PRO_API_KEY="your-license-key" - -# Run development server -python app.py -``` - -### Pages - -| Path | Description | -|------|-------------| -| `/` | Home page with overview | -| `/linechart-basic` | Basic LineChart features | -| `/linechart-pro` | Pro features (zoom, pan, slider) | -| `/linechart-brush` | Brush selection with value overlays (Pro) | -| `/linechart-referencelines` | Reference lines (horizontal/vertical) | -| `/linechart-highlighting` | Controlled item/axis highlights, per-series highlightScope | -| `/linechart-tick-hover` | Tick config, date formatting, zoom best practices | -| `/linechart-zoom-preview` | Biaxial chart with zoom slider preview | -| `/highlighting-sync` | Synchronized highlights across charts | -| `/live-trading` | LiveTradingChart streaming demo | -| `/pie` | Pie chart examples | -| `/pie-props` | Nested pie property explorer | -| `/scatter` | ScatterChart examples (multi-series, z-axis, voronoi, dataset) | -| `/composite` | CompositeChart examples (scatter+line, zoom, reference lines) | -| `/heatmap` | Heatmap examples | -| `/heatmap-props` | Heatmap property explorer | -| `/sparkline` | Sparkline examples | -| `/sparkline-style` | Sparkline styling playground | -| `/tree-basic` … `/tree-pro` | TreeView / TreeViewPro examples (selection, editing, drag-reorder, per-item controls) | -| `/time-clock` | TimeClock basics (views, controlled, 12h/24h, form props) | -| `/time-clock-lab` | TimeClock × DMC: dynamic colours, liquid glass, stopwatch, two-way pairings | - ---- - -## Common Patterns - -### Adding a New Component - -1. Create React component: `src/lib/components/NewChart.react.js` -2. Export in `src/lib/index.js` -3. Define PropTypes with JSDoc comments -4. Run `npm run build` -5. Python wrapper auto-generated in `dash_mui_charts/` - -### Event Handling Pattern - -```javascript -// React component -const handleClick = (event, params) => { - if (setProps) { - setProps({ - clickData: { - ...params, - timestamp: new Date().toISOString(), - }, - n_clicks: (n_clicks || 0) + 1, - }); - } -}; -``` - -```python -# Python callback -@callback( - Output('output', 'children'), - Input('chart', 'clickData'), -) -def handle_click(click_data): - if click_data: - return f"Clicked: {click_data['value']}" - return "Click on chart" -``` - -### Functions-as-Props (Bridging Python ↔ JavaScript Functions) - -Dash serializes props as JSON, so JavaScript functions can't be passed from Python. Two approaches are supported: - -**Approach 1: Built-in `dateFormat` (recommended for dates)** -```python -# No JavaScript needed — the React component creates the formatter internally -xAxis=[{ - 'scaleType': 'time', - 'dateFormat': 'MMM d, YYYY', # Tooltip format - 'dateTickFormat': 'M/d', # Tick label format -}] -``` - -**Approach 2: DMC-style function reference (advanced)** -```python -# Python: reference a function by name -xAxis=[{ - 'valueFormatter': {'function': 'myFormatter', 'options': {'unit': 'F'}}, -}] -``` -```javascript -// assets/myFunctions.js: define the function -var dmcf = window.dashMuiChartsFunctions = window.dashMuiChartsFunctions || {}; -dmcf.myFormatter = function(value, context, options) { - return value + ' °' + options.unit; -}; -``` - -**Architecture:** In `processedXAxis` (useMemo), the component: -1. Checks for `dateFormat` → creates a `valueFormatter` via `createDateFormatter()` -2. Else checks for `valueFormatter` object → resolves via `resolveFunctionProp()` -3. Strips non-MUI props (`dateFormat`, `dateTickFormat`) before passing to `ChartDataProviderPro` - -### Controlled vs Uncontrolled Props - -```python -# Uncontrolled (internal state) -LineChart(initialZoom=[{'axisId': 'x', 'start': 0, 'end': 50}]) - -# Controlled (external state via callback) -LineChart(zoom=current_zoom_state) - -@callback( - Output('chart', 'zoom'), - Input('chart', 'zoomData'), -) -def sync_zoom(zoom_data): - return zoom_data -``` - ---- - -## Callback Patterns - -### Reading Chart State - -```python -@callback( - Output('output', 'children'), - Input('chart', 'zoomData'), # Fires on zoom change - Input('chart', 'clickData'), # Fires on click - Input('chart', 'n_clicks'), # Click counter -) -def handle_chart_events(zoom, click, n): - ... -``` - -### Controlling Chart State - -```python -@callback( - Output('chart', 'zoom'), # Set zoom programmatically - Input('reset-btn', 'n_clicks'), -) -def reset_zoom(n): - return [{'axisId': 'x-axis', 'start': 0, 'end': 100}] -``` - -### Synchronized Highlighting Across Charts - -```python -# Sync highlights between LineChart and PieChart -@callback( - Output('line-chart', 'highlightedItem'), - Output('pie-chart', 'highlightedItem'), - Input('line-chart', 'highlightedItem'), - Input('pie-chart', 'highlightedItem'), - prevent_initial_call=True -) -def sync_highlights(line_item, pie_item): - triggered = ctx.triggered_id - - if triggered == 'line-chart' and line_item: - # Map line series to pie index - pie_index = SERIES_TO_INDEX.get(line_item['seriesId']) - if pie_index is not None: - # Use no_update for source to avoid echo - return dash.no_update, {'seriesId': 'auto-generated-id-0', 'dataIndex': pie_index} - - elif triggered == 'pie-chart' and pie_item: - # Map pie index to line series - series_id = INDEX_TO_SERIES.get(pie_item['dataIndex']) - if series_id: - return {'seriesId': series_id}, dash.no_update - - return dash.no_update, dash.no_update -``` - -**Key Pattern:** Use `dash.no_update` for the source chart to prevent callback loops. - ---- - -## Debugging Tips - -### Component Not Rendering - -1. Check browser console for React errors -2. Verify `npm run build` completed successfully -3. Check `dash_mui_charts/*.min.js` exists and is recent -4. Clear browser cache / hard refresh - -### Click Events Not Firing - -1. Verify component has `id` prop set -2. Check callback input matches component ID -3. Look for `setProps` calls in React component -4. **Important:** MUI X Charts uses `seriesId` not `seriesIndex` - -### Pro Features Not Working - -1. Verify license key is valid -2. Pass `licenseKey` prop to component -3. Check console for MUI license warnings -4. Heatmap requires Pro license for all features - -### X-Axis Labels Not Showing or Truncated - -1. **Labels completely invisible on time scale with angle**: `tickLabelStyle.angle` on `scaleType: 'point'` triggers MUI collision detection — use `scaleType: 'time'` instead -2. **Labels truncated (shows "J..." or "1...")**: Too many ticks — increase `tickMinStep` and add `tickNumber: 6` -3. **MUI clips labels by available horizontal space per tick**: ~100px+ per tick needed for "1/15" at 12px font -4. **`axisHighlight: 'band'` breaks time scale**: Use `'line'` instead — band is for categorical axes only -5. **`dateFormat` not applied**: Verify `processedXAxis` runs (check that the early `if (!showSlider) return xAxis` shortcut was removed in v1.1.0) -6. **Angled labels need extra space**: Set `height: 80` on xAxis + `margin.bottom: 100` - -### Python Import Errors - -1. Run `npm run build` to regenerate Python wrappers -2. Check `dash_mui_charts/_imports_.py` includes component -3. Verify `__init__.py` has correct imports - -### Duplicate Callback Outputs - -When using multi-page apps, ensure component IDs are unique across pages. Prefix IDs with page name: -```python -# In pie_props.py -dmc.Slider(id='pie-ctrl-width', ...) - -# In heatmap_props.py -dmc.Slider(id='heatmap-ctrl-width', ...) -``` - ---- - -## Dependencies - -### NPM (package.json) - -| Package | Version | Purpose | -|---------|---------|---------| -| @mui/x-charts | 8.24.0 | Community charts | -| @mui/x-charts-pro | 8.24.0 | Pro charts | -| @mui/x-tree-view(-pro) | 8.27.2 | TreeView / TreeViewPro | -| @mui/x-date-pickers | 8.24.0 (pinned) | TimeClock (Date & Time Pickers) | -| dayjs | 1.11.13 | Date adapter for the pickers | -| @mui/x-license | 7.24.0 | License management | -| @mui/material | 6.5.0 | Material UI base | -| react | 18.2.0 | React library | -| webpack | 5.x | Build bundler | - -### Python (setup.py) - -| Package | Version | Purpose | -|---------|---------|---------| -| dash | >= 3.0.0 | Dash framework | -| python-dotenv | >= 1.0.0 | Environment variables | - ---- - -## Environment Variables - -```bash -# MUI X Pro license key (optional) -MUI_PRO_API_KEY=your-key-here -``` - ---- - -## Build Outputs - -After `npm run build`: - -| File | Description | -|------|-------------| -| `dash_mui_charts/dash_mui_charts.min.js` | Bundled component JS (~603KB) | -| `dash_mui_charts/dash_mui_charts.min.js.map` | Source map | -| `dash_mui_charts/*.py` | Generated Python wrappers | -| `dash_mui_charts/metadata.json` | Component metadata | - ---- - -## License Requirements Summary - -| Component | Community (Free) | Pro Required | -|-----------|------------------|--------------| -| LineChart | Basic features, Reference Lines, dateFormat | Zoom, Pan, Brush | -| BarChart | Bars, stacking, labels, dataset mode, reference lines | Zoom, Brush, Toolbar | -| CandlestickChart | OHLC candles, volume, reference lines, tooltips | Zoom, Toolbar | -| PieChart | All features | - | -| ScatterChart | All features | - | -| CompositeChart | Basic layering, Reference Lines, dateFormat | Zoom, Pan, Toolbar | -| LiveTradingChart | Basic streaming | Zoom, Slider | -| Heatmap | - | All features | -| SparklineChart | All features | - | -| TimeClock | All features | - | - ---- - -## Testing - -```bash -# Validate Python syntax -python -m py_compile dash_mui_charts/*.py - -# Run demo app -python app.py - -# Run standalone example -python usage.py -``` - ---- - -## Future Enhancements - -Potential components from MUI X Charts: -- GaugeChart (Pro) -- TreemapChart (Pro) -- RadarChart -- RangeBarChart (Premium — requires `@mui/x-charts-premium` and `@mui/material` v7+) -- Native CandlestickChart (Premium — available in `@mui/x-charts-premium` v9+, requires `@mui/material` v7+) - -Potential features: -- Extend `resolveFunctionProp` to support more axis props (e.g. `tickInterval`, `tickLabelInterval` as function references) -- Support `valueFormatter` on series (not just axes) for custom tooltip value formatting -- Support `valueFormatter` on yAxis (currently `processedXAxis` handles it, need matching `processedYAxis`) -- BarChart: `barLabelFormat` string prop (like `dateFormat` on LineChart) for custom label formatting without JS -- CandlestickChart: moving average line overlay, Bollinger bands, RSI sub-chart - -Follow existing component patterns for implementation. \ No newline at end of file diff --git a/.claude/agents/dash_callbacks.md b/.claude/agents/dash_callbacks.md deleted file mode 100644 index 62d3eac..0000000 --- a/.claude/agents/dash_callbacks.md +++ /dev/null @@ -1,374 +0,0 @@ -# Dash Callbacks Agent - -Reference guide for Dash callbacks, patterns, and advanced features including Dash 3.3.0 enhancements. - -## Basic Callback Pattern - -```python -from dash import Dash, html, dcc, callback, Input, Output - -@callback( - Output('output-id', 'children'), - Input('input-id', 'value') -) -def update_output(value): - return f'You entered: {value}' -``` - -## Multiple Outputs - -```python -@callback( - Output('output-1', 'children'), - Output('output-2', 'style'), - Input('input-id', 'value') -) -def update_multiple(value): - return f'Value: {value}', {'color': 'blue'} -``` - -## State vs Input - -- **Input**: Triggers callback when value changes -- **State**: Provides value but does NOT trigger callback - -```python -@callback( - Output('output', 'children'), - Input('submit-btn', 'n_clicks'), - State('text-input', 'value'), - prevent_initial_call=True -) -def submit_form(n_clicks, text_value): - return f'Submitted: {text_value}' -``` - -## Context (ctx) - Determine What Triggered - -```python -from dash import ctx - -@callback( - Output('output', 'children'), - Input('btn-1', 'n_clicks'), - Input('btn-2', 'n_clicks'), -) -def handle_buttons(btn1, btn2): - triggered_id = ctx.triggered_id - if triggered_id == 'btn-1': - return 'Button 1 clicked' - elif triggered_id == 'btn-2': - return 'Button 2 clicked' - return 'No button clicked yet' -``` - -### ctx Properties - -- `ctx.triggered_id` - ID of component that triggered (string or dict for pattern-matching) -- `ctx.triggered` - List of changed props with values -- `ctx.inputs` - Dict of all input values -- `ctx.states` - Dict of all state values -- `ctx.args_grouping` - Arguments grouped by Input/State - -## Preventing Initial Call - -```python -@callback( - Output('output', 'children'), - Input('input', 'value'), - prevent_initial_call=True # Don't fire on page load -) -``` - -## no_update - Skip Output Updates - -```python -from dash import no_update - -@callback( - Output('output-1', 'children'), - Output('output-2', 'children'), - Input('input', 'value') -) -def selective_update(value): - if not value: - return no_update, no_update - return value, no_update # Only update first output -``` - -## Patch - Partial Updates (Dash 3.3.0+) - -For large data or complex state, use `Patch()` to update only specific parts: - -```python -from dash import Patch - -@callback( - Output('figure-graph', 'figure'), - Input('color-picker', 'value') -) -def update_color(color): - patched = Patch() - patched['layout']['paper_bgcolor'] = color - return patched -``` - -### Patch Operations - -```python -# Update nested value -patched = Patch() -patched['data'][0]['marker']['color'] = 'red' - -# Append to list -patched['data'].append(new_trace) - -# Prepend to list -patched['data'].prepend(new_trace) - -# Insert at index -patched['data'].insert(1, new_trace) - -# Extend list -patched['data'].extend([trace1, trace2]) - -# Remove item -patched['data'].remove(existing_trace) - -# Delete key -del patched['layout']['title'] - -# Reverse list -patched['data'].reverse() - -# Clear list -patched['data'].clear() -``` - -## set_props - Direct Property Updates (Dash 3.3.0+) - -Update component properties without traditional callback: - -```python -from dash import set_props - -@callback( - Output('main-output', 'children'), - Input('trigger', 'n_clicks') -) -def update_multiple_components(n): - # Update another component directly - set_props('status-indicator', {'children': 'Processing...', 'style': {'color': 'orange'}}) - - # Do some work... - - set_props('status-indicator', {'children': 'Complete!', 'style': {'color': 'green'}}) - - return f'Processed {n} times' -``` - -### set_props with Component IDs - -```python -# Simple string ID -set_props('my-component', {'value': 42}) - -# Pattern-matching ID (dict) -set_props({'type': 'dynamic', 'index': 0}, {'children': 'Updated'}) -``` - -## Running Callback States - -Track long-running callbacks: - -```python -@callback( - Output('output', 'children'), - Input('trigger', 'n_clicks'), - running=[ - (Output('trigger', 'disabled'), True, False), # Disable button while running - (Output('status', 'children'), 'Running...', 'Ready'), - ], - prevent_initial_call=True -) -def long_running_task(n): - import time - time.sleep(5) - return 'Done!' -``` - -## Progress Updates - -```python -@callback( - Output('output', 'children'), - Input('trigger', 'n_clicks'), - progress=[Output('progress-bar', 'value')], - prevent_initial_call=True -) -def task_with_progress(set_progress, n): - for i in range(10): - set_progress((i + 1) * 10) - time.sleep(0.5) - return 'Complete!' -``` - -## Circular Callbacks (Dash 2.9+) - -Allow callbacks that form circular dependencies: - -```python -@callback( - Output('input-a', 'value'), - Input('input-b', 'value'), - prevent_initial_call=True -) -def sync_a_from_b(b_value): - return b_value * 2 - -@callback( - Output('input-b', 'value'), - Input('input-a', 'value'), - prevent_initial_call=True -) -def sync_b_from_a(a_value): - return a_value / 2 -``` - -**Important**: Must use `prevent_initial_call=True` to avoid infinite loops. - -## Pattern Matching Callbacks - -Dynamic callbacks for components with dict IDs: - -```python -from dash import ALL, MATCH, ALLSMALLER - -# ALL - Target all components matching pattern -@callback( - Output('output', 'children'), - Input({'type': 'button', 'index': ALL}, 'n_clicks') -) -def handle_all_buttons(all_clicks): - return f'Total clicks: {sum(c or 0 for c in all_clicks)}' - -# MATCH - Target same index -@callback( - Output({'type': 'output', 'index': MATCH}, 'children'), - Input({'type': 'input', 'index': MATCH}, 'value') -) -def sync_matched(value): - return f'Value: {value}' -``` - -## Background Callbacks - -For long-running tasks without blocking: - -```python -from dash import DiskcacheManager -import diskcache - -cache = diskcache.Cache("./cache") -background_callback_manager = DiskcacheManager(cache) - -app = Dash(__name__, background_callback_manager=background_callback_manager) - -@callback( - Output('output', 'children'), - Input('trigger', 'n_clicks'), - background=True, - prevent_initial_call=True -) -def long_task(n): - import time - time.sleep(10) - return f'Completed task {n}' -``` - -## Clientside Callbacks - -Run JavaScript in browser for performance: - -```python -from dash import clientside_callback, ClientsideFunction - -# Inline JavaScript -clientside_callback( - """ - function(value) { - return value * 2; - } - """, - Output('output', 'children'), - Input('input', 'value') -) - -# External JS file (assets/callbacks.js) -clientside_callback( - ClientsideFunction( - namespace='my_functions', - function_name='multiply_by_two' - ), - Output('output', 'children'), - Input('input', 'value') -) -``` - -## Component Property Patterns for Dash-React - -When building React components for Dash: - -### setProps Pattern - -```javascript -// React component -export default function MyComponent({ id, value, setProps }) { - const handleChange = (newValue) => { - if (setProps) { - setProps({ value: newValue }); - } - }; - - return handleChange(e.target.value)} />; -} - -MyComponent.propTypes = { - id: PropTypes.string, - value: PropTypes.string, - setProps: PropTypes.func, -}; -``` - -### Controlled Component Pattern - -For components with internal state that sync with Dash: - -```javascript -const [internalState, setInternalState] = useState(props.value); - -// Sync external prop changes to internal state -useEffect(() => { - if (props.value !== internalState) { - setInternalState(props.value); - } -}, [props.value]); - -// Update both internal state and Dash -const handleChange = (newValue) => { - setInternalState(newValue); - if (setProps) { - setProps({ value: newValue }); - } -}; -``` - -## Best Practices - -1. **Use `prevent_initial_call=True`** when callback doesn't need to run on page load -2. **Use `no_update`** to skip unnecessary updates -3. **Use `Patch()`** for large data updates instead of returning full objects -4. **Use `set_props`** for side-effect updates to other components -5. **Use `ctx.triggered_id`** to determine which input fired -6. **Avoid circular callbacks** unless absolutely necessary -7. **Use clientside callbacks** for simple transformations that don't need server \ No newline at end of file diff --git a/.claude/agents/dash_react_components.md b/.claude/agents/dash_react_components.md deleted file mode 100644 index 804402d..0000000 --- a/.claude/agents/dash_react_components.md +++ /dev/null @@ -1,514 +0,0 @@ -# Dash React Components Agent - -Reference guide for building React components for Dash applications. - -## Component Boilerplate - -```javascript -import React, { useState, useEffect, useId, useMemo } from 'react'; -import PropTypes from 'prop-types'; - -/** - * MyComponent description for Dash auto-generated docs. - */ -export default function MyComponent(props) { - const { - id, - // Input props - value, - options, - disabled = false, - // Output props (read by Dash callbacks) - selectedValue, - n_clicks = 0, - // Dash callback function - setProps, - } = props; - - // Component implementation - const handleClick = () => { - if (setProps) { - setProps({ - selectedValue: value, - n_clicks: n_clicks + 1 - }); - } - }; - - return ( -
- {/* Component JSX */} -
- ); -} - -MyComponent.propTypes = { - /** - * The ID used to identify this component in Dash callbacks. - */ - id: PropTypes.string, - - /** - * Input value for the component. - */ - value: PropTypes.string, - - /** - * Array of option objects. - */ - options: PropTypes.arrayOf(PropTypes.shape({ - label: PropTypes.string, - value: PropTypes.any, - })), - - /** - * If true, component is disabled. - */ - disabled: PropTypes.bool, - - /** - * Currently selected value. Read-only output. - */ - selectedValue: PropTypes.any, - - /** - * Number of times clicked. - */ - n_clicks: PropTypes.number, - - /** - * Dash-assigned callback for property updates. - */ - setProps: PropTypes.func, -}; -``` - -## Controlled Component Pattern - -For components that need to sync between Dash props and internal state: - -```javascript -export default function ControlledComponent(props) { - const { value, setProps } = props; - - // Internal state mirrors prop - const [internalValue, setInternalValue] = useState(value); - - // Track last prop value to detect external changes - const [lastPropValue, setLastPropValue] = useState(JSON.stringify(value)); - - // Sync external prop changes to internal state - useEffect(() => { - const currentPropStr = JSON.stringify(value); - if (currentPropStr !== lastPropValue) { - setLastPropValue(currentPropStr); - setInternalValue(value); - } - }, [value, lastPropValue]); - - // Handle internal changes - const handleChange = (newValue) => { - setInternalValue(newValue); - setLastPropValue(JSON.stringify(newValue)); - - if (setProps) { - setProps({ value: newValue }); - } - }; - - return handleChange(e.target.value)} />; -} -``` - -## PropTypes Reference - -### Basic Types - -```javascript -PropTypes.string -PropTypes.number -PropTypes.bool -PropTypes.array -PropTypes.object -PropTypes.func -PropTypes.any -``` - -### Constrained Types - -```javascript -// One of specific values -PropTypes.oneOf(['small', 'medium', 'large']) - -// One of specific types -PropTypes.oneOfType([ - PropTypes.string, - PropTypes.number, -]) - -// Array of specific type -PropTypes.arrayOf(PropTypes.number) - -// Object with specific shape -PropTypes.shape({ - id: PropTypes.string.isRequired, - label: PropTypes.string, - value: PropTypes.any, -}) - -// Object with specific keys -PropTypes.objectOf(PropTypes.number) - -// Required prop -PropTypes.string.isRequired -``` - -### Complex Shapes - -```javascript -// Nested shape -PropTypes.shape({ - axis: PropTypes.shape({ - id: PropTypes.string, - data: PropTypes.array, - zoom: PropTypes.oneOfType([ - PropTypes.bool, - PropTypes.shape({ - minSpan: PropTypes.number, - maxSpan: PropTypes.number, - }), - ]), - }), -}) - -// Array of shapes -PropTypes.arrayOf(PropTypes.shape({ - id: PropTypes.string, - data: PropTypes.arrayOf(PropTypes.number), - label: PropTypes.string, -})) -``` - -## Event Handling Patterns - -### Click Events - -```javascript -const handleClick = (event, data) => { - if (setProps) { - setProps({ - clickData: { - timestamp: new Date().toISOString(), - ...data, - }, - n_clicks: (props.n_clicks || 0) + 1, - }); - } -}; -``` - -### Change Events - -```javascript -const handleChange = (newValue) => { - if (setProps) { - setProps({ value: newValue }); - } -}; -``` - -### Debounced Events - -```javascript -import { useMemo } from 'react'; -import debounce from 'lodash/debounce'; - -const debouncedSetProps = useMemo( - () => debounce((updates) => { - if (setProps) setProps(updates); - }, 300), - [setProps] -); - -const handleInput = (e) => { - debouncedSetProps({ value: e.target.value }); -}; -``` - -## Loading States - -```javascript -const { loading_state } = props; - -return ( -
- {loading_state?.is_loading && } - {/* Component content */} -
-); -``` - -### PropTypes for Loading - -```javascript -loading_state: PropTypes.shape({ - is_loading: PropTypes.bool, - prop_name: PropTypes.string, - component_name: PropTypes.string, -}) -``` - -## Styling Patterns - -### Inline Styles - -```javascript -const { style } = props; - -return ( -
- {/* Content */} -
-); - -// PropType -style: PropTypes.object -``` - -### Class Names - -```javascript -const { className } = props; - -return ( -
- {/* Content */} -
-); - -// PropType -className: PropTypes.string -``` - -## Children Pattern - -```javascript -const { children } = props; - -return ( -
- {children} -
-); - -// PropType -children: PropTypes.node -``` - -## Refs and DOM Access - -```javascript -import { useRef, useEffect } from 'react'; - -export default function ChartComponent(props) { - const containerRef = useRef(null); - - useEffect(() => { - if (containerRef.current) { - // Access DOM element - const width = containerRef.current.offsetWidth; - } - }, []); - - return
{/* Content */}
; -} -``` - -## Memoization - -```javascript -import { useMemo, useCallback } from 'react'; - -// Memoize computed values -const processedData = useMemo(() => { - return data.map(item => ({ - ...item, - computed: item.value * 2, - })); -}, [data]); - -// Memoize callbacks -const handleClick = useCallback((e) => { - if (setProps) { - setProps({ clicked: true }); - } -}, [setProps]); -``` - -## Third-Party Library Integration - -### Pattern for wrapping external libraries: - -```javascript -import React, { useEffect, useRef } from 'react'; -import ExternalLibrary from 'external-library'; - -export default function WrappedComponent(props) { - const { config, setProps } = props; - const containerRef = useRef(null); - const instanceRef = useRef(null); - - // Initialize library on mount - useEffect(() => { - if (containerRef.current && !instanceRef.current) { - instanceRef.current = new ExternalLibrary(containerRef.current, { - ...config, - onChange: (value) => { - if (setProps) setProps({ value }); - }, - }); - } - - // Cleanup on unmount - return () => { - if (instanceRef.current) { - instanceRef.current.destroy(); - } - }; - }, []); - - // Update library when config changes - useEffect(() => { - if (instanceRef.current) { - instanceRef.current.update(config); - } - }, [config]); - - return
; -} -``` - -## Build Configuration - -### webpack.config.js essentials - -```javascript -module.exports = { - entry: './src/lib/index.js', - output: { - path: path.resolve(__dirname, 'dash_component_name'), - filename: 'dash_component_name.min.js', - library: 'dash_component_name', - libraryTarget: 'window', - }, - externals: { - react: 'React', - 'react-dom': 'ReactDOM', - }, - // ... rest of config -}; -``` - -### package.json scripts - -```json -{ - "scripts": { - "build:js": "webpack --mode production", - "build:backends": "dash-generate-components ./src/lib/components component_name", - "build": "npm run build:js && npm run build:backends", - "watch": "webpack --mode development --watch" - } -} -``` - -## Testing Components - -### Basic test with pytest - -```python -# tests/test_component.py -from dash import Dash, html -from dash.testing.application_runners import import_app - -def test_component_renders(dash_duo): - app = Dash(__name__) - app.layout = html.Div([ - MyComponent(id='test', value='hello') - ]) - - dash_duo.start_server(app) - dash_duo.wait_for_element('#test') -``` - -### Callback test - -```python -def test_callback(dash_duo): - app = Dash(__name__) - app.layout = html.Div([ - MyComponent(id='input', value=''), - html.Div(id='output') - ]) - - @app.callback( - Output('output', 'children'), - Input('input', 'value') - ) - def update(value): - return f'Value: {value}' - - dash_duo.start_server(app) - # Test interaction -``` - -## Common Pitfalls - -### 1. Missing setProps check - -```javascript -// Bad - will crash if setProps is undefined -setProps({ value: newValue }); - -// Good - always check -if (setProps) { - setProps({ value: newValue }); -} -``` - -### 2. Mutating props directly - -```javascript -// Bad - mutating prop -props.data.push(newItem); - -// Good - create new reference -const newData = [...props.data, newItem]; -if (setProps) setProps({ data: newData }); -``` - -### 3. Missing PropTypes - -All props must be defined in PropTypes for Dash to generate Python bindings. - -### 4. Stale closures in useEffect - -```javascript -// Bad - controlledValue might be stale -useEffect(() => { - console.log(controlledValue); -}, [someProp]); // Missing controlledValue in deps - -// Good - include all dependencies or use refs -``` - -### 5. Infinite loops with useEffect - -```javascript -// Bad - causes infinite loop -useEffect(() => { - setProps({ value: processedValue }); -}, [processedValue]); // processedValue changes, triggers effect, changes value... - -// Good - use condition or separate tracking state -``` \ No newline at end of file diff --git a/.claude/agents/mui_x.md b/.claude/agents/mui_x.md deleted file mode 100644 index 8105e53..0000000 --- a/.claude/agents/mui_x.md +++ /dev/null @@ -1,232 +0,0 @@ -# MUI X Agent - -Reference guide for MUI X component library, licensing, and general patterns. - -## MUI X Overview - -MUI X is a collection of advanced React components built on top of Material UI: - -- **Data Grid** - Advanced data table with sorting, filtering, grouping -- **Charts** - Line, bar, pie, scatter, and other chart types -- **Date/Time Pickers** - Date, time, and datetime selection -- **Tree View** - Hierarchical data display - -## Licensing - -MUI X has three tiers: - -### Community (Free) -- Basic features, MIT license -- No license key required - -### Pro ($249/dev/year) -- Advanced features like export, multi-filtering -- Requires license key - -### Premium ($588/dev/year) -- All Pro features plus premium-only features -- Requires license key - -## License Key Setup - -### Setting the License Key - -```javascript -import { LicenseInfo } from '@mui/x-license'; - -// Set once at app initialization -LicenseInfo.setLicenseKey('YOUR_LICENSE_KEY'); -``` - -### In Dash Components - -```javascript -// Track if already set to avoid multiple calls -let licenseKeySet = false; - -export default function MyComponent({ licenseKey, ...props }) { - if (licenseKey && !licenseKeySet) { - LicenseInfo.setLicenseKey(licenseKey); - licenseKeySet = true; - } - // ... rest of component -} -``` - -### Environment Variable Pattern - -```python -# Python (load from environment) -import os -MUI_LICENSE_KEY = os.environ.get('MUI_PRO_API_KEY', '') - -# Pass to component -LineChart(licenseKey=MUI_LICENSE_KEY, ...) -``` - -## MUI X Package Structure - -### Installation - -```bash -# Community packages -npm install @mui/x-charts -npm install @mui/x-data-grid -npm install @mui/x-date-pickers -npm install @mui/x-tree-view - -# Pro packages (requires license) -npm install @mui/x-charts-pro -npm install @mui/x-data-grid-pro -npm install @mui/x-date-pickers-pro - -# Premium packages -npm install @mui/x-data-grid-premium -``` - -### Import Patterns - -```javascript -// Community imports -import { LineChart } from '@mui/x-charts/LineChart'; -import { DataGrid } from '@mui/x-data-grid'; - -// Pro imports (different package path) -import { LineChart } from '@mui/x-charts-pro/LineChart'; -import { DataGridPro } from '@mui/x-data-grid-pro'; - -// Individual component imports (tree-shaking) -import { LinePlot } from '@mui/x-charts/LineChart'; -import { ChartsXAxis } from '@mui/x-charts/ChartsXAxis'; -``` - -## Pro Features by Component - -### Data Grid Pro -- Column pinning -- Row reordering -- Multi-filtering -- Tree data -- Excel/CSV export -- Lazy loading - -### Charts Pro -- Zoom and pan -- Zoom slider -- Heatmap charts -- Animation control - -### Date Pickers Pro -- Date range picker -- Time range picker - -## Controlled vs Uncontrolled Components - -MUI X components support both patterns: - -### Uncontrolled (with initial value) -```javascript -// Component manages its own state after initial render - -``` - -### Controlled (external state management) -```javascript -// Parent manages state -const [sortModel, setSortModel] = useState([]); - - -``` - -## Theming - -MUI X components inherit from Material UI theme: - -```javascript -import { createTheme, ThemeProvider } from '@mui/material/styles'; - -const theme = createTheme({ - palette: { - primary: { main: '#1976d2' }, - }, - components: { - MuiChartsAxis: { - styleOverrides: { - root: { - // Custom axis styles - } - } - } - } -}); - - - - -``` - -## Common Patterns for Dash Integration - -### Prop Validation - -```javascript -import PropTypes from 'prop-types'; - -MyComponent.propTypes = { - // Required for Dash - id: PropTypes.string, - setProps: PropTypes.func, - - // Component props - data: PropTypes.arrayOf(PropTypes.object), - licenseKey: PropTypes.string, -}; -``` - -### Event Handling for Dash - -```javascript -const handleClick = (event, params) => { - if (setProps) { - setProps({ - clickData: { - type: 'item', - itemId: params.id, - timestamp: new Date().toISOString() - }, - n_clicks: (n_clicks || 0) + 1 - }); - } -}; -``` - -### Loading States - -```javascript -{loading && ( -
- Loading... -
-)} -``` - -## Resources - -- [MUI X Documentation](https://mui.com/x/) -- [MUI X GitHub](https://github.com/mui/mui-x) -- [Licensing Info](https://mui.com/x/introduction/licensing/) -- [API Reference](https://mui.com/x/api/) \ No newline at end of file diff --git a/.claude/agents/mui_x_charts.md b/.claude/agents/mui_x_charts.md deleted file mode 100644 index c267a84..0000000 --- a/.claude/agents/mui_x_charts.md +++ /dev/null @@ -1,415 +0,0 @@ -# MUI X Charts Agent - -Reference guide for MUI X Charts library, including composition API and Pro features. - -## Chart Types - -- **LineChart** - Line and area charts -- **BarChart** - Vertical and horizontal bar charts -- **PieChart** - Pie and donut charts -- **ScatterChart** - Scatter plots -- **Sparkline** - Compact inline charts -- **Gauge** - Progress gauges -- **Heatmap** (Pro) - Heat map visualization - -## Two API Approaches - -### 1. Single Component API (Simple) - -```javascript -import { LineChart } from '@mui/x-charts/LineChart'; - - -``` - -### 2. Composition API (Flexible) - -```javascript -import { ChartDataProvider } from '@mui/x-charts/ChartDataProvider'; -import { ChartsSurface } from '@mui/x-charts/ChartsSurface'; -import { LinePlot } from '@mui/x-charts/LineChart'; -import { ChartsXAxis } from '@mui/x-charts/ChartsXAxis'; -import { ChartsYAxis } from '@mui/x-charts/ChartsYAxis'; - - - - - - - - -``` - -## Pro Composition API - -For Pro features like zoom, use Pro-specific providers: - -```javascript -import { ChartDataProviderPro } from '@mui/x-charts-pro/ChartDataProviderPro'; -import { ChartsSurface } from '@mui/x-charts-pro/ChartsSurface'; -import { LinePlot } from '@mui/x-charts-pro/LineChart'; -import { ChartZoomSlider } from '@mui/x-charts-pro/ChartZoomSlider'; -import { ChartsClipPath } from '@mui/x-charts-pro/ChartsClipPath'; -``` - -## Series Configuration - -### Line Series - -```javascript -{ - id: 'series-1', // Unique identifier - type: 'line', // Required for composition API - data: [1, 2, 3, 4], // Y values - label: 'Revenue', // Legend label - color: '#1976d2', // Line color - area: true, // Fill area under line - stack: 'total', // Stack identifier - curve: 'monotoneX', // Interpolation method - showMark: true, // Show data point markers - connectNulls: false, // Bridge null values - yAxisId: 'left', // Which Y-axis to use - xAxisId: 'bottom', // Which X-axis to use -} -``` - -### Curve Types - -- `linear` - Straight lines between points -- `monotoneX` - Smooth curves preserving monotonicity in X -- `monotoneY` - Smooth curves preserving monotonicity in Y -- `natural` - Natural cubic spline -- `step` - Step at midpoint -- `stepBefore` - Step before point -- `stepAfter` - Step after point -- `catmullRom` - Catmull-Rom spline -- `bumpX` / `bumpY` - Bump curves - -## Axis Configuration - -### X-Axis - -```javascript -xAxis: [{ - id: 'x-axis', // Identifier for zoom/series reference - data: [2020, 2021, 2022], // Axis values - label: 'Year', // Axis label - scaleType: 'point', // Scale type - position: 'bottom', // 'top' or 'bottom' - tickLabelStyle: { ... }, // Style for tick labels - zoom: { ... }, // Pro: zoom configuration -}] -``` - -### Y-Axis - -```javascript -yAxis: [{ - id: 'left-axis', - label: 'Value', - min: 0, // Fixed minimum - max: 100, // Fixed maximum - position: 'left', // 'left' or 'right' - width: 60, // Space allocated for axis -}] -``` - -### Scale Types - -- `band` - Categorical with bands (for bar charts) -- `point` - Categorical discrete points -- `linear` - Continuous numeric -- `log` - Logarithmic -- `time` - Time/date values - -## Zoom Configuration (Pro) - -### Enable Zoom on Axis - -```javascript -xAxis: [{ - id: 'x-axis', - data: years, - scaleType: 'point', - zoom: { - minSpan: 5, // Minimum visible data points - maxSpan: 100, // Maximum span (100 = full range) - panning: true, // Enable drag panning - minStart: 0, // Minimum start position (0-100) - maxEnd: 100, // Maximum end position (0-100) - step: 1, // Zoom granularity - slider: { - enabled: true // Show zoom slider - } - } -}] -``` - -### Zoom State Format - -```javascript -// Zoom state is array of axis zoom states -[ - { - axisId: 'x-axis', - start: 0, // Start percentage (0-100) - end: 50 // End percentage (0-100) - } -] -``` - -### Controlled Zoom Pattern - -```javascript -const [zoom, setZoom] = useState([ - { axisId: 'x-axis', start: 0, end: 100 } -]); - - -``` - -### Initial Zoom (Uncontrolled) - -```javascript - -``` - -## Zoom Slider Component - -The zoom slider provides visual zoom control: - -```javascript -import { ChartZoomSlider } from '@mui/x-charts-pro/ChartZoomSlider'; - - - - {/* Chart content */} - - - -``` - -Enable slider via axis config: - -```javascript -xAxis: [{ - zoom: { - slider: { enabled: true } - } -}] -``` - -## Clip Path for Zoomed Content - -Prevent content from rendering outside chart area: - -```javascript -import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath'; - -const clipPathId = useId(); - - - - - - - - - -``` - -## Composition Components - -### Data Providers -- `ChartDataProvider` - Community, basic charts -- `ChartDataProviderPro` - Pro features (zoom, heatmap) - -### Surface -- `ChartsSurface` - SVG container for chart elements - -### Plot Components -- `LinePlot` - Line paths -- `AreaPlot` - Filled areas -- `MarkPlot` - Data point markers -- `BarPlot` - Bar elements -- `ScatterPlot` - Scatter points - -### Axis Components -- `ChartsXAxis` - X-axis with ticks and labels -- `ChartsYAxis` - Y-axis with ticks and labels -- `ChartsGrid` - Grid lines - -### Interactive Components -- `ChartsTooltip` - Hover tooltips -- `ChartsAxisHighlight` - Highlight line on hover -- `ChartsLegend` - Chart legend -- `ChartZoomSlider` - Zoom slider (Pro) - -## Event Handling - -### Click Events - -```javascript -// Line click - { - console.log('Clicked series:', params.seriesId); -}} /> - -// Mark (point) click - { - console.log('Clicked point:', params.dataIndex); -}} /> - -// Area click - { - console.log('Clicked area:', params.seriesId); -}} /> -``` - -### Axis Click - -```javascript - { - console.log('Axis value:', params.axisValue); - console.log('Data index:', params.dataIndex); - }} -/> -``` - -## Tooltip Configuration - -```javascript -// Trigger modes - // Show on axis hover - // Show on item hover - // Disable tooltip - -// Custom tooltip content - ( -
Custom tooltip content
- )} -/> -``` - -## Grid Configuration - -```javascript - -``` - -## Margin Configuration - -```javascript -margin: { - top: 20, - right: 20, - bottom: 30, - left: 40 -} -``` - -## Multiple Y-Axes (Biaxial Charts) - -```javascript -series: [ - { data: [1, 2, 3], yAxisId: 'left', label: 'Series A' }, - { data: [100, 200, 300], yAxisId: 'right', label: 'Series B' } -], -yAxis: [ - { id: 'left', position: 'left', label: 'Left Axis' }, - { id: 'right', position: 'right', label: 'Right Axis' } -] -``` - -## Stacked Areas - -```javascript -series: [ - { data: [1, 2, 3], area: true, stack: 'total', label: 'A' }, - { data: [2, 3, 4], area: true, stack: 'total', label: 'B' }, - { data: [1, 1, 1], area: true, stack: 'total', label: 'C' } -] -``` - -## Animation Control - -```javascript - // Enable animations - // Disable animations - -// Or on provider - -``` - -## Common Issues and Solutions - -### Zoom not responding to prop changes - -Ensure you're using controlled mode correctly: - -```javascript -const [zoom, setZoom] = useState([...]); - -// Sync external prop changes -useEffect(() => { - if (externalZoom) { - setZoom(externalZoom); - } -}, [externalZoom]); - -// Handle internal changes -const handleZoomChange = (newZoom) => { - const resolved = typeof newZoom === 'function' - ? newZoom(zoom) - : newZoom; - setZoom(resolved); -}; -``` - -### Chart not rendering - -Check that: -1. Series has `type: 'line'` for composition API -2. `height` is set on provider -3. Axis data length matches series data length - -### Tooltip not showing - -Ensure `ChartsTooltip` is inside the provider but outside `ChartsSurface`: - -```javascript - - - - - {/* Outside surface */} - -``` - -## Resources - -- [MUI X Charts Overview](https://mui.com/x/react-charts/) -- [Line Chart API](https://mui.com/x/api/charts/line-chart/) -- [Charts Pro Features](https://mui.com/x/react-charts/zoom-and-pan/) -- [Composition API Guide](https://mui.com/x/react-charts/composition/) \ No newline at end of file diff --git a/.claude/agents/style.md b/.claude/agents/style.md deleted file mode 100644 index 66a79db..0000000 --- a/.claude/agents/style.md +++ /dev/null @@ -1,261 +0,0 @@ -# MUI X Charts Styling Guide - -## Tooltip Customization - -### Key Insight: Portal Rendering - -MUI Charts tooltips render in a **portal** attached to `document.body`, NOT inside the chart container. This means: - -- CSS selectors like `.my-container .MuiChartsTooltip-*` won't work by default -- The chart's `sx` prop does NOT affect tooltip styling - -### Solutions - -#### Option 1: Disable Portal (Recommended for CSS styling) - -```python -SparklineChart( - slotProps={ - 'tooltip': {'disablePortal': True} - } -) -``` - -This renders the tooltip inside the chart container, enabling standard CSS inheritance. - -#### Option 2: Use slotProps.tooltip.sx - -```javascript -slotProps={{ - tooltip: { - sx: { - [`&.${chartsTooltipClasses.root} .${chartsTooltipClasses.valueCell}`]: { - color: 'red', - }, - }, - }, -}} -``` - -### Tooltip CSS Classes - -| Class | Description | -|-------|-------------| -| `.MuiChartsTooltip-root` | Main tooltip container | -| `.MuiChartsTooltip-paper` | Paper/card surface | -| `.MuiChartsTooltip-table` | Data table | -| `.MuiChartsTooltip-row` | Table row | -| `.MuiChartsTooltip-cell` | General cell | -| `.MuiChartsTooltip-labelCell` | Label text | -| `.MuiChartsTooltip-valueCell` | Value display | -| `.MuiChartsTooltip-axisValueCell` | **Axis value/index** (axis tooltip only) | -| `.MuiChartsTooltip-markCell` | Mark indicator cell | -| `.MuiChartsTooltip-mark` | Color indicator mark | - -### MUI v8 DOM Structure Changes - -- Label cells are now `` elements instead of `` -- Axis data moved from header to table `` -- Mark and label combined into single `` element - -### Mark Element Sizing - -The `.MuiChartsTooltip-mark` color indicator may appear undersized by default. To properly size it: - -```css -/* Mark cell container */ -.sparkline-container .MuiChartsTooltip-markCell { - padding: 12px 8px 12px 16px !important; - vertical-align: middle !important; -} - -/* Mark indicator - explicit sizing */ -.sparkline-container .MuiChartsTooltip-mark { - width: 14px !important; - height: 14px !important; - border-radius: 4px !important; - border: 2px solid rgba(255, 255, 255, 0.3) !important; - box-shadow: 0 0 8px rgba(79, 195, 247, 0.6) !important; - display: inline-block !important; -} -``` - -### Complete Tooltip Styling Example - -```css -/* Target ALL tooltip text elements */ -.sparkline-container .MuiChartsTooltip-cell, -.sparkline-container .MuiChartsTooltip-labelCell, -.sparkline-container .MuiChartsTooltip-valueCell, -.sparkline-container .MuiChartsTooltip-axisValueCell, -.sparkline-container .MuiChartsTooltip-markCell, -.sparkline-container [class*="MuiChartsTooltip"] td, -.sparkline-container [class*="MuiChartsTooltip"] th, -.sparkline-container [class*="MuiChartsTooltip"] caption { - color: #ffffff !important; -} - -/* Glassmorphism tooltip background */ -.sparkline-container .MuiChartsTooltip-paper, -.sparkline-container .MuiPaper-root { - backdrop-filter: blur(24px) saturate(200%) !important; - background: linear-gradient( - 135deg, - rgba(15, 25, 45, 0.95) 0%, - rgba(10, 20, 40, 0.92) 100% - ) !important; - border: 1px solid rgba(255, 255, 255, 0.3) !important; - border-radius: 14px !important; -} -``` - ---- - -## CSS Mask Effects - -### Problem: Masks Affect All Children - -When using `mask-image` for opacity effects, the mask affects ALL child elements including tooltips. - -```css -/* BAD: Affects tooltip too */ -.container.hovering { - mask-image: linear-gradient(...); -} - -/* GOOD: Only affects SVG chart */ -.container.hovering svg { - mask-image: linear-gradient(...); -} -``` - -### Dynamic Hover Opacity Effect - -```css -/* CSS custom property for dynamic mask position */ -.sparkline-container.hovering svg { - mask-image: linear-gradient( - to right, - rgba(0, 0, 0, 1) 0%, - rgba(0, 0, 0, 1) var(--hover-percent, 50%), - rgba(0, 0, 0, 0.4) var(--hover-percent, 50%), - rgba(0, 0, 0, 0.4) 100% - ); -} -``` - -Update `--hover-percent` via Dash callback to create interactive effects. - ---- - -## X-Axis Highlight Line - -### Show Only on Hover - -```css -/* Hide by default */ -.sparkline-container .MuiChartsAxisHighlight-root, -.sparkline-container svg line[class*="AxisHighlight"] { - opacity: 0; - transition: opacity 0.2s ease; -} - -/* Show when hovering */ -.sparkline-container.hovering .MuiChartsAxisHighlight-root, -.sparkline-container.hovering svg line[class*="AxisHighlight"] { - opacity: 1; -} -``` - ---- - -## Glassmorphism / Liquid Glass Design - -### Card Container - -```css -.glass-card { - backdrop-filter: blur(20px) saturate(180%); - -webkit-backdrop-filter: blur(20px) saturate(180%); - background: linear-gradient( - 135deg, - rgba(255, 255, 255, 0.25) 0%, - rgba(255, 255, 255, 0.10) 100% - ); - border: 1px solid rgba(255, 255, 255, 0.3); - border-radius: 24px; - box-shadow: - 0 8px 32px rgba(0, 0, 0, 0.15), - inset 0 1px 0 0 rgba(255, 255, 255, 0.4); -} -``` - -### Animated Floating Orbs (Background Depth) - -```css -.background::before { - content: ''; - position: absolute; - width: 400px; - height: 400px; - background: radial-gradient(circle, rgba(79, 195, 247, 0.4) 0%, transparent 70%); - border-radius: 50%; - filter: blur(60px); - animation: floatOrb 8s ease-in-out infinite; -} - -@keyframes floatOrb { - 0%, 100% { transform: translate(0, 0) scale(1); } - 50% { transform: translate(-30px, 30px) scale(1.1); } -} -``` - -### Left-to-Right Reveal Animation - -```css -@keyframes revealLeftToRight { - from { - clip-path: inset(0 100% 0 0); - opacity: 0; - } - to { - clip-path: inset(0 0 0 0); - opacity: 1; - } -} - -.chart-container { - animation: revealLeftToRight 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; -} -``` - ---- - -## SparklineChart Props for Styling - -```python -SparklineChart( - color='rgba(79, 195, 247, 1)', # Single color (pass directly, not as array) - strokeWidth=2, # Line thickness - area=True, # Fill under line - curve='monotoneX', # Smooth curve - showTooltip=True, - showHighlight=True, - axisHighlight={'x': 'line'}, # Vertical highlight line - xAxis={'id': 'x-axis'}, # Required for controlled highlighting - baseline='min', # Area fill from minimum - slotProps={ - 'lineHighlight': {'r': 6}, # Highlight dot radius - 'tooltip': {'disablePortal': True}, # Enable CSS styling - }, - clipAreaOffset={'top': 10, 'right': 10, 'bottom': 10, 'left': 10}, -) -``` - ---- - -## References - -- [MUI X Charts Tooltip](https://mui.com/x/react-charts/tooltip/) -- [ChartsTooltip API](https://mui.com/x/api/charts/charts-tooltip/) -- [MUI X Charts Styling](https://mui.com/x/react-charts/styling/) \ No newline at end of file diff --git a/.claude/composite-chart-axis-tooltip-v1.2.0.md b/.claude/composite-chart-axis-tooltip-v1.2.0.md deleted file mode 100644 index 5541db3..0000000 --- a/.claude/composite-chart-axis-tooltip-v1.2.0.md +++ /dev/null @@ -1,334 +0,0 @@ -# dash-mui-charts v1.2.0: CompositeChart Axis Tooltip Enhancement - -## Issue Summary - -**Component**: `CompositeChart` -**Current version**: 1.1.0 -**Target version**: 1.2.0 -**Priority**: High — this is the primary barrier to consistent tooltip behavior across chart types - -### Problem - -When `CompositeChart` has **mixed series types** (line + scatter) and `tooltip={'trigger': 'axis'}` is set, the tooltip only appears when the user hovers **directly over a data mark** (line point or scatter dot). It does NOT show when hovering at arbitrary x-positions like `LineChart` does with `trigger: 'axis'`. - -This breaks the expected UX where `trigger: 'axis'` means "show tooltip data for all series at the current x-axis position, regardless of proximity to data marks." - -### Expected Behavior (matches LineChart) - -With `trigger: 'axis'`: -- Tooltip should appear at **any x-position** within the chart area -- Tooltip should display values for **all series** (both line and scatter) at that x-position -- Scatter series should use proximity matching (nearest point within a configurable radius) -- The `highlightedAxis` callback prop should fire at any x-position (not only near marks) - -### Actual Behavior (v1.1.0) - -- Tooltip only appears when mouse is near/on a data mark -- Hovering in empty space between data points shows no tooltip -- The `axisHighlight` visual (e.g., `{x: 'line'}`) correctly renders a vertical line at the mouse position — but no tooltip accompanies it -- `highlightedAxis` does fire from the chart, but the built-in tooltip doesn't render - ---- - -## Root Cause Analysis - -### How LineChart handles `trigger: 'axis'` (correct behavior) - -In `LineChart` (function `yT`), the tooltip is rendered as: - -```jsx -// LineChart tooltip rendering (simplified from minified source) -{tooltip?.trigger !== 'none' && ( - -)} -``` - -`ChartsTooltip` (`mM`) with `trigger='axis'` renders `ChartsAxisTooltipContent` (`lM`), which uses MUI's `useAxesTooltip()` hook. This hook reads the internal axis interaction state maintained by `ChartContainerPro`, which tracks mouse position across the entire chart area and maps it to the nearest axis data index — regardless of whether a data mark exists there. - -### How CompositeChart handles `trigger: 'axis'` (broken path) - -In `CompositeChart` (function `G$`), there is special-case logic: - -```jsx -// CompositeChart tooltip rendering (simplified from minified source) -const ae = tooltip?.trigger || 'axis'; // trigger mode -const Z = series.some(s => s.type === 'scatter'); // has scatter series -const se = Z && ae === 'axis'; // special case flag - -{ae !== 'none' && ( - se - ? - - - : -)} -``` - -**The branching logic**: When the chart has scatter series AND trigger is `'axis'`, it bypasses the standard `ChartsTooltip` and instead uses `ChartsTooltipContainer` with a custom `CompositeAxisTooltipContent` (`H$`). - -### Why the custom tooltip fails - -`CompositeAxisTooltipContent` (`H$`) uses `useAxesTooltip()` (`sM`) to get axis hover data: - -```jsx -function CompositeAxisTooltipContent({ scatterSeries, proximity }) { - const axisData = useAxesTooltip(); // sM() - if (!axisData || axisData.length === 0) return null; - - const { axisValue, axisFormattedValue, seriesItems } = axisData[0]; - - // Filter out scatter series from the line-based seriesItems - const scatterIds = new Set(scatterSeries.map(s => s.id)); - const lineItems = seriesItems.filter(item => !scatterIds.has(item.seriesId)); - - // Proximity-match scatter data points near the current axis value - const scatterItems = []; - for (const series of scatterSeries) { - for (const point of series.data) { - if (Math.abs(point.x - axisValue) <= proximity) { - scatterItems.push({ seriesId: series.id, color: series.color, ... }); - } - } - } - - // Render combined line + scatter tooltip - return
...
; -} -``` - -**The issue**: `useAxesTooltip()` returns data based on the **internal interaction state** of the chart. In CompositeChart, the interaction state tracking differs from standalone LineChart because CompositeChart uses the composition API (`ChartDataProviderPro` + `ChartsSurface`) rather than the high-level `LineChartPro` component. The composition API may not fully wire up the axis interaction tracking needed for `useAxesTooltip()` to return data at every x-position. - -Additionally, `ChartsTooltipContainer` (`fM`) controls the Popper open/close state. Its open condition depends on whether `useAxesTooltip()` returns non-empty data. If the hook doesn't fire at arbitrary positions, the container stays closed. - -### Key difference from LineChart - -LineChart uses `ChartContainerPro` internally, which has full axis interaction wiring built in. CompositeChart uses the lower-level composition API (`ChartDataProviderPro` + raw plot components), which may not automatically set up the same axis interaction tracking. - ---- - -## Proposed Fix for v1.2.0 - -### Option A: Fix axis interaction tracking in CompositeChart (Recommended) - -Ensure the composition API setup in CompositeChart includes the same axis interaction tracking that `ChartContainerPro` provides to LineChart. - -**In the CompositeChart React component (`G$`):** - -1. The component currently uses `ChartDataProviderPro` (`gb`) as its provider. Verify that this provider includes `ChartsAxisHighlight` interaction state tracking for the x-axis. - -2. The `ChartsAxisHighlight` component (`wM`) is already rendered: - ```jsx - - ``` - This handles the visual highlight line but may not be sufficient to drive tooltip data. - -3. **Key change**: When `trigger === 'axis'`, ensure the tooltip container receives axis hover data even when the mouse is not directly over a mark. This likely requires: - - Using `ChartsAxisHighlight` interaction tracking to feed `useAxesTooltip()` - - OR switching to `ChartsTooltip` (standard, `mM`) instead of the custom `CompositeAxisTooltipContent` when `trigger === 'axis'`, and handling scatter data display separately - -**Simplest implementation:** - -```jsx -// BEFORE (v1.1.0): -{ae !== 'none' && ( - se - ? - - - : -)} - -// AFTER (v1.2.0): -// Always use the standard ChartsTooltip for axis trigger, -// with scatter proximity data injected into the content -{ae !== 'none' && ( - -)} -``` - -If the standard `ChartsTooltip` with `trigger='axis'` works in the composition API context (i.e., `useAxesTooltip()` returns data at any x-position), this is the simplest fix. The trade-off is that scatter series won't get proximity-based matching in the tooltip — they'd need `connectNulls` or data alignment to appear in the axis tooltip. - -### Option B: Use `ChartsTooltipContainer` with corrected open state - -If `useAxesTooltip()` doesn't work in the composition API context, the `ChartsTooltipContainer` needs its open state driven by axis position rather than by hook data: - -```jsx -// Use the pointer position directly to control tooltip open state - - - -``` - -The `anchor: 'pointer'` might help, but the core issue is whether `useAxesTooltip()` returns data. If not, the internal `ChartsTooltipContainer` will render `null` children and the Popper won't open. - -### Option C: Add `highlightedAxis` as a controlled prop (like LineChart) - -Add `highlightedAxis` and `tooltipAxis` props to CompositeChart, matching LineChart's API: - -```python -# New props for CompositeChart (matching LineChart) -class CompositeChart(Component): - highlightedAxis: list[dict] # Controlled axis highlight state - tooltipAxis: list[dict] # Controlled tooltip axis state -``` - -**React implementation:** - -```jsx -// In CompositeChart (G$): -const highlightedAxis = t.highlightedAxis; -const tooltipAxis = t.tooltipAxis; - -// Pass to ChartDataProviderPro -pe.highlightedAxis = highlightedAxis; -pe.onHighlightedAxisChange = (newAxis) => { - setProps({ highlightedAxis: newAxis }); -}; - -// For tooltip sync -pe.tooltipAxis = tooltipAxis; -pe.onTooltipAxisChange = (newAxis) => { - setProps({ tooltipAxis: newAxis }); -}; -``` - -This would enable Dash callbacks to: -1. Read `highlightedAxis` from one CompositeChart -2. Write it to other CompositeCharts -3. Sync tooltip display across multiple charts - -**This option is recommended in addition to Option A**, as it gives Dash users full control over cross-chart synchronization. - ---- - -## Additional Props to Add - -### `highlightedAxis` (input/output) - -```python -highlightedAxis: list[dict] # [{axisId: str, dataIndex: int}] -``` - -- Fires when user hovers at any x-position (like LineChart already does) -- Can be set programmatically to highlight a specific axis position -- Enables cross-chart sync via Dash callbacks - -### `tooltipAxis` (input/output) - -```python -tooltipAxis: list[dict] # [{axisId: str, dataIndex: int}] -``` - -- Controls which axis tooltip is shown (like LineChart `tooltipAxis`) -- When set externally, shows tooltip at that position even without mouse hover -- Enables tooltip sync across multiple CompositeCharts - -### `tooltipItem` (input/output) - -```python -tooltipItem: dict # {type: str, seriesId: str, dataIndex: int} -``` - -- Controls which item tooltip is shown -- Already exists in LineChart but missing from CompositeChart - ---- - -## Use Case: Multi-Chart Synced Tooltips - -The Martin OnSite Dashboard displays 3 stacked time-series CompositeCharts (Discharge Time, Pressure, Temperature) for air cannon equipment. Requirements: - -1. User hovers over **any** chart at **any** x-position -2. All 3 charts show a vertical crosshair line at that position -3. All 3 charts show a tooltip with series values at that position -4. Scatter event markers (alerts/warnings) are overlaid on the line data - -**Current workaround** (v1.1.0): Uses `tooltip={'trigger': 'none'}` with custom Python-rendered tooltip divs positioned via CSS `calc()`. The `highlightedAxis` callback fires from CompositeChart and drives the custom tooltip system. This works but: -- Requires complex Python callback logic for tooltip rendering -- Tooltip positioning via CSS `calc()` is fragile and breaks with zoom -- Cannot use MUI's built-in tooltip formatting/styling - -**With v1.2.0 fix**: `tooltip={'trigger': 'axis'}` would work natively, and `tooltipAxis`/`highlightedAxis` controlled props would enable sync across charts without custom tooltip rendering. - ---- - -## Testing Checklist - -### Axis Tooltip Trigger -- [ ] `CompositeChart` with line-only series: `trigger: 'axis'` shows tooltip at any x-position -- [ ] `CompositeChart` with scatter-only series: `trigger: 'axis'` shows tooltip at any x-position -- [ ] `CompositeChart` with line + scatter series: `trigger: 'axis'` shows tooltip at any x-position -- [ ] Tooltip shows values for ALL series (line and scatter) at the hovered position -- [ ] Scatter values use proximity matching for non-aligned data points -- [ ] `trigger: 'item'` still works (tooltip only on mark hover) -- [ ] `trigger: 'none'` still works (no tooltip) - -### Controlled Props -- [ ] `highlightedAxis` fires on any x-position hover (not just near marks) -- [ ] Setting `highlightedAxis` programmatically highlights that position -- [ ] `tooltipAxis` shows tooltip at the specified position -- [ ] Setting `tooltipAxis` from another chart syncs tooltip display -- [ ] `tooltipItem` works for item-level tooltip control - -### Axis Highlight -- [ ] `axisHighlight: {x: 'line', y: 'line'}` shows crosshair lines -- [ ] `axisHighlight: {x: 'band'}` shows band highlight (point/band scale only) -- [ ] Axis highlight fires at any x-position (drives `highlightedAxis` callback) - -### Zoom Interaction -- [ ] Tooltip works correctly when chart is zoomed in -- [ ] Tooltip position accounts for zoom offset -- [ ] `highlightedAxis` dataIndex is correct within zoomed range - -### Backward Compatibility -- [ ] Existing `tooltip: {trigger: 'none'}` + custom tooltip pattern still works -- [ ] `highlightedItem` still works for item-level sync -- [ ] No breaking changes to existing CompositeChart props - ---- - -## Migration Guide (for consumers) - -### Before (v1.1.0 workaround) - -```python -# Disable native tooltip, use custom Python tooltips -CompositeChart( - tooltip={'trigger': 'none'}, - axisHighlight={'x': 'line', 'y': 'line'}, -) - -# Complex callback listening to highlightedAxis/highlightedItem -# to render custom tooltip divs positioned with CSS calc() -@callback( - Output('custom-tooltip', 'style'), - Output('custom-tooltip', 'children'), - Input('chart', 'highlightedAxis'), - Input('chart', 'highlightedItem'), -) -def render_tooltip(axis, item): - # ~100 lines of tooltip positioning and rendering logic - ... -``` - -### After (v1.2.0) - -```python -# Native axis tooltip works on CompositeChart -CompositeChart( - tooltip={'trigger': 'axis'}, - axisHighlight={'x': 'line', 'y': 'line'}, -) - -# For multi-chart sync, use controlled tooltipAxis -@callback( - Output('chart-2', 'tooltipAxis'), - Output('chart-3', 'tooltipAxis'), - Input('chart-1', 'tooltipAxis'), -) -def sync_tooltips(axis): - return axis, axis -``` diff --git a/.claude/settings.json b/.claude/settings.json deleted file mode 100644 index 4fbb446..0000000 --- a/.claude/settings.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "project": { - "name": "dash-mui-charts", - "description": "Dash components wrapping MUI X Charts Pro library", - "type": "dash-component-library" - }, - "allowed_urls": [ - "https://dash.plotly.com", - "https://dash.plotly.com/advanced-callbacks", - "https://dash.plotly.com/dash-core-components", - "https://dash.plotly.com/dash-html-components", - "https://dash.plotly.com/react-for-python-developers", - "https://mui.com/x", - "https://mui.com/x/react-charts", - "https://mui.com/x/api", - "https://react.dev", - "https://github.com/plotly/dash", - "https://github.com/plotly/dash-component-boilerplate", - "https://community.plotly.com" - ], - "development": { - "build_command": "npm run build", - "dev_server": "python app.py", - "dev_port": 7666, - "test_command": "pytest tests/", - "lint_command": "npm run lint" - }, - "component_structure": { - "react_sources": "src/lib/components/", - "python_outputs": "dash_mui_charts/", - "pages": "pages/", - "assets": "assets/" - } -} \ No newline at end of file diff --git a/.claude/support_files/MUI_X_CHARTS_API.md b/.claude/support_files/MUI_X_CHARTS_API.md deleted file mode 100644 index 61966f1..0000000 --- a/.claude/support_files/MUI_X_CHARTS_API.md +++ /dev/null @@ -1,55 +0,0 @@ -# MUI X Charts LineChart API Reference - -## Essential Props - -### Data Props -- **series** (Array): Array of series configurations - - `data` (Array): Y-axis values - - `label` (string): Series label - - `color` (string): Custom color - - `area` (boolean): Fill area under line - - `stack` (string): Stack identifier - - `curve` (string): Interpolation method - - `showMark` (boolean): Show data point markers - - `connectNulls` (boolean): Bridge null values - -### Axis Props -- **xAxis** (Array): X-axis configuration - - `data` (Array): X-axis values - - `label` (string): Axis label - - `scaleType` ('band' | 'point' | 'linear' | 'log' | 'time') - - `position` ('top' | 'bottom') - -- **yAxis** (Array): Y-axis configuration - - `label` (string): Axis label - - `min/max` (number): Domain range - - `width` (number): Axis width - - `position` ('left' | 'right') - -### Layout Props -- **height** (number, required): Chart height in pixels -- **width** (number): Chart width in pixels -- **margin** (object): { top, right, bottom, left } -- **grid** (object): { vertical, horizontal } - -### Style Props -- **colors** (Array): Color palette -- **hideLegend** (boolean): Hide legend -- **skipAnimation** (boolean): Disable animations -- **loading** (boolean): Show loading overlay - -### Events -- **onAxisClick**: (event, params) => void -- **onLineClick**: (event, params) => void -- **onMarkClick**: (event, params) => void -- **onAreaClick**: (event, params) => void - -## Curve Types -- 'linear', 'monotoneX', 'monotoneY', 'natural' -- 'step', 'stepBefore', 'stepAfter' -- 'catmullRom', 'bumpX', 'bumpY' - -## Tooltip Trigger Types -- 'item': Show data for specific element -- 'axis': Show all series at x-position -- 'none': Disable tooltip \ No newline at end of file diff --git a/.claude/support_files/PLAN_nested_pie.md b/.claude/support_files/PLAN_nested_pie.md deleted file mode 100644 index 6a94b9a..0000000 --- a/.claude/support_files/PLAN_nested_pie.md +++ /dev/null @@ -1,192 +0,0 @@ -# Nested Pie Chart Implementation Plan - -## Goal -Enhance PieChart component to support multi-series/nested pie charts with inner and outer rings, like the MUI X Charts examples showing hierarchical data visualization. - ---- - -## Analysis of MUI Examples - -### Key Pattern: `series` prop accepts array of layer configs -```javascript -series={[ - { - innerRadius: 0, - outerRadius: 80, - data: innerData, - highlightScope: { fade: 'global', highlight: 'item' }, - }, - { - innerRadius: 100, // Gap between rings - outerRadius: 120, - data: outerData, - highlightScope: { fade: 'global', highlight: 'item' }, - }, -]} -``` - -### Key Features to Support: -1. **Multiple series** with different data arrays -2. **Per-series geometry**: innerRadius, outerRadius, cornerRadius, paddingAngle -3. **Per-series styling**: highlightScope, arcLabel, arcLabelMinAngle -4. **Color with opacity**: `#fa938e80` (hex + alpha) for variations -5. **View toggle**: Switch between different data perspectives - ---- - -## Implementation Steps - -### Step 1: Modify React Component - -**File:** `src/lib/components/PieChart.react.js` - -**Changes:** -```javascript -// Add new prop -series: PropTypes.arrayOf(PropTypes.shape({ - data: PropTypes.array.isRequired, - innerRadius: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), - outerRadius: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), - paddingAngle: PropTypes.number, - cornerRadius: PropTypes.number, - startAngle: PropTypes.number, - endAngle: PropTypes.number, - arcLabel: PropTypes.oneOf(['value', 'label', 'formattedValue']), - arcLabelMinAngle: PropTypes.number, - arcLabelRadius: PropTypes.number, - highlightScope: PropTypes.object, - id: PropTypes.string, -})), - -// Logic change: -// If `series` prop provided → use directly -// If only `data` prop → wrap in single series (backward compat) -``` - -### Step 2: Rebuild Component -```bash -npm run build -``` - -### Step 3: Update `pages/pie_props.py` - -**New Data Structures:** - -```python -# Titanic data -TITANIC_RAW = [ - {'Class': '1st', 'Survived': 'No', 'Count': 123}, - {'Class': '1st', 'Survived': 'Yes', 'Count': 202}, - # ... etc -] - -# Inner ring - Class totals -CLASS_DATA = [ - {'id': '1st', 'label': '1st Class', 'value': 325, 'color': '#fa938e'}, - {'id': '2nd', 'label': '2nd Class', 'value': 285, 'color': '#98bf45'}, - {'id': '3rd', 'label': '3rd Class', 'value': 706, 'color': '#51cbcf'}, - {'id': 'Crew', 'label': 'Crew', 'value': 908, 'color': '#d397ff'}, -] - -# Outer ring - Survival within each class -CLASS_SURVIVAL_DATA = [ - # 1st class breakdown - {'id': '1st-Yes', 'label': 'Survived', 'value': 202, 'color': '#fa938e'}, - {'id': '1st-No', 'label': 'Did not survive', 'value': 123, 'color': '#fa938e80'}, - # 2nd class breakdown - {'id': '2nd-Yes', 'label': 'Survived', 'value': 118, 'color': '#98bf45'}, - {'id': '2nd-No', 'label': 'Did not survive', 'value': 167, 'color': '#98bf4580'}, - # ... etc -] - -# Alternative view - by Survival status -SURVIVAL_DATA = [ - {'id': 'Yes', 'label': 'Survived', 'value': 710, 'color': '#51cbcf'}, - {'id': 'No', 'label': 'Did not survive', 'value': 1514, 'color': '#fa938e'}, -] - -SURVIVAL_CLASS_DATA = [ - # Survivors by class - {'id': '1st-Yes', 'label': '1st Class', 'value': 202, 'color': 'rgba(81,203,207,0.9)'}, - {'id': '2nd-Yes', 'label': '2nd Class', 'value': 118, 'color': 'rgba(81,203,207,0.7)'}, - # ... etc -] -``` - -**New UI Features:** - -1. **View Toggle** (SegmentedControl): - - "View by Class" - inner=class totals, outer=survival breakdown - - "View by Survival" - inner=survived/not, outer=class breakdown - -2. **Ring Configuration Cards**: - - Inner Ring: innerRadius, outerRadius, cornerRadius - - Outer Ring: innerRadius, outerRadius, cornerRadius, gap control - -3. **Series-specific Controls**: - - Arc labels per series - - Highlight behavior per series - -4. **Live Preview** showing nested pie with both rings - ---- - -## File Changes Summary - -| File | Change | -|------|--------| -| `src/lib/components/PieChart.react.js` | Add `series` prop support | -| `dash_mui_charts/PieChart.py` | Auto-generated after build | -| `pages/pie_props.py` | Complete rewrite with nested demo | - ---- - -## Example Usage After Implementation - -```python -from dash_mui_charts import PieChart - -# Nested pie chart with two rings -PieChart( - series=[ - { - 'data': CLASS_DATA, - 'innerRadius': 50, - 'outerRadius': 100, - 'cornerRadius': 3, - 'highlightScope': {'fade': 'global', 'highlight': 'item'}, - }, - { - 'data': CLASS_SURVIVAL_DATA, - 'innerRadius': 110, - 'outerRadius': 140, - 'cornerRadius': 3, - 'highlightScope': {'fade': 'global', 'highlight': 'item'}, - }, - ], - height=400, - hideLegend=True, -) -``` - ---- - -## Backward Compatibility - -Existing code continues to work: -```python -# Old way (still works) -PieChart( - data=[...], - innerRadius=50, - outerRadius=100, -) - -# New way (multi-series) -PieChart( - series=[ - {'data': [...], 'innerRadius': 50, 'outerRadius': 100}, - {'data': [...], 'innerRadius': 110, 'outerRadius': 140}, - ], -) -``` diff --git a/.claude/support_files/bar/API_REFERENCE.md b/.claude/support_files/bar/API_REFERENCE.md deleted file mode 100644 index 104dccf..0000000 --- a/.claude/support_files/bar/API_REFERENCE.md +++ /dev/null @@ -1,176 +0,0 @@ -# MUI X Bar Charts + Candlestick — Complete API Reference - -## BarChart Props (Community + Pro) - -Source: `@mui/x-charts/BarChart` / `@mui/x-charts-pro/BarChartPro` - -| Prop | Type | Default | Description | -|---|---|---|---| -| `series`* | object[] | — | Array of BarSeries objects | -| `axisHighlight` | `{x?: 'band'|'line'|'none', y?: 'band'|'line'|'none'}` | band in bar direction | Axis highlight config | -| `borderRadius` | number | — | Border radius on bars | -| `brushConfig` | `{enabled?, preventHighlight?, preventTooltip?}` | — | Brush selection (Pro) | -| `colors` | string[] \| func | `rainbowSurgePalette` | Color palette | -| `dataset` | object[] | — | Array of row objects for `dataKey` referencing | -| `disableAxisListener` | bool | `false` | Disable mouse tracking (perf) | -| `grid` | `{horizontal?: bool, vertical?: bool}` | — | Background grid | -| `height` | number | — | Chart height px | -| `hiddenItems` | object[] | — | Controlled hidden series/items | -| `hideLegend` | bool | — | Hide legend | -| `highlightedAxis` | object[] | — | Controlled axis highlight | -| `highlightedItem` | `{dataIndex?, seriesId}` | — | Controlled item highlight | -| `id` | string | — | Accessibility id | -| `initialHiddenItems` | object[] | — | Default hidden items | -| `layout` | `'horizontal'` \| `'vertical'` | `'vertical'` | Bar direction | -| `loading` | bool | `false` | Loading overlay | -| `localeText` | object | — | Localization | -| `margin` | number \| `{top?, bottom?, left?, right?}` | — | Chart margins | -| `onAxisClick` | func | — | `(event, data) => void` | -| `onHiddenItemsChange` | func | — | Hidden items callback | -| `onHighlightChange` | func | — | Highlight callback | -| `onHighlightedAxisChange` | func | — | Axis highlight callback | -| `onItemClick` | func | — | `(event, barItemIdentifier) => void` | -| `onTooltipItemChange` | func | — | Tooltip callback | -| `renderer` | `'svg-single'` \| `'svg-batch'` | `'svg-single'` | Render strategy | -| `showToolbar` | bool | `false` | Show toolbar | -| `skipAnimation` | bool | — | Disable animations | -| `slotProps` | object | `{}` | Slot props | -| `slots` | object | `{}` | Overridable slots | -| `tooltipItem` | object | — | Controlled tooltip | -| `width` | number | — | Chart width px | -| `xAxis` | object[] | — | X-axis config array | -| `yAxis` | object[] | — | Y-axis config array | - -### BarSeries Interface - -| Field | Type | Description | -|---|---|---| -| `data` | number[] | Bar values | -| `dataKey` | string | Column key when using `dataset` | -| `label` | string | Series label | -| `color` | string | Series color | -| `stack` | string | Stack group ID | -| `stackOffset` | `'none'|'expand'|'diverging'|'silhouette'|'wiggle'` | Stack offset strategy | -| `stackOrder` | `'none'|'appearance'|'ascending'|'descending'|'insideOut'|'reverse'` | Stack ordering | -| `barLabel` | `'value'` \| `'formattedValue'` \| func | Bar label content | -| `barLabelPlacement` | `'center'` \| `'outside'` | Label position | -| `highlightScope` | `{highlight?, fade?}` | Highlight behavior | -| `yAxisId` | string | Y-axis binding (biaxial) | -| `valueFormatter` | func | Tooltip value format | - -### Band Axis Props (xAxis with `scaleType: 'band'`) - -| Field | Type | Description | -|---|---|---| -| `data` | array | Category labels | -| `dataKey` | string | Column key from dataset | -| `scaleType` | `'band'` | Required for bar charts | -| `label` | string | Axis label | -| `categoryGapRatio` | number | Gap between categories (0-1) | -| `barGapRatio` | number | Gap between bars in same category (-1 to ∞) | -| `tickPlacement` | `'start'|'end'|'middle'|'extremities'` | Tick position | -| `tickLabelPlacement` | `'tick'|'middle'` | Label position | -| `colorMap` | object | Piecewise/continuous/ordinal color mapping | -| `zoom` | object | Zoom config (Pro): `{minSpan, maxSpan, panning, filterMode, slider}` | - -### BarChart Slots - -| Slot | Default | Description | -|---|---|---| -| `axisLabel` | `ChartsText` | Axis label component | -| `axisLine` | `'line'` | Axis line element | -| `axisTick` | `'line'` | Tick element | -| `axisTickLabel` | `ChartsText` | Tick label | -| `bar` | `BarElementPath` | Individual bar element | -| `barLabel` | `BarLabel` | Bar label component | -| `legend` | `ChartsLegend` | Legend component | -| `loadingOverlay` | `ChartsLoadingOverlay` | Loading state | -| `noDataOverlay` | `ChartsNoDataOverlay` | Empty state | -| `toolbar` | `ChartsToolbar` | Toolbar component | -| `tooltip` | `ChartsTooltipRoot` | Tooltip container | - ---- - -## RangeBarChart Props (Premium) - -Source: `@mui/x-charts-premium/BarChartPremium` - -Inherits all BarChart props. Key differences: - -- Uses `BarChartPremium` component internally -- Series must have `type: 'rangeBar'` -- Data format: `{start: number, end: number}` per point -- `colorMap` on numerical axis NOT supported -- Batch renderer NOT available -- Requires Premium license - -### RangeBar Series Interface - -| Field | Type | Description | -|---|---|---| -| `type` | `'rangeBar'` | **Required** — identifies range bar series | -| `data` | `{start: number, end: number}[]` | Range values | -| `dataKey` | string | Column key from dataset | -| `label` | string | Series label | -| `color` | string | Series color | -| `highlightScope` | object | Highlight behavior | - ---- - -## CandlestickChart Props (Premium — Preview) - -Source: `@mui/x-charts-premium/CandlestickChart` - -| Prop | Type | Default | Description | -|---|---|---|---| -| `series`* | object[] | — | OHLC series | -| `dataset` | object[] | — | Row objects for `datasetKeys` mode | -| `xAxis` | object[] | — | Band axis (dates/labels) | -| `yAxis` | object[] | — | Value axis | -| `height` | number | — | Chart height | -| `width` | number | — | Chart width | -| `margin` | object | — | `{top, bottom, left, right}` | -| `grid` | object | — | `{horizontal, vertical}` | -| `skipAnimation` | bool | — | Disable animations | -| `showToolbar` | bool | `false` | Show toolbar | - -### Candlestick Series Interface - -| Field | Type | Description | -|---|---|---| -| `data` | `[open, high, low, close][]` | Array of OHLC tuples | -| `datasetKeys` | `{open, high, low, close}` | Map dataset columns to OHLC fields | -| `upColor` | string \| func | Color when close >= open. Func: `(mode: 'light'|'dark') => string` | -| `downColor` | string \| func | Color when close < open | -| `valueFormatter` | func | `(value, {dataIndex, field}) => string` where field is `'open'|'high'|'low'|'close'` | - -### Candlestick Composition - -For composed charts (candlestick + volume bars + moving average lines): -- xAxis must have `scaleType: 'band'` -- CandlestickPlot renders inside `ChartsWebGLLayer` -- Volume can use regular `BarPlot` on a secondary yAxis -- Moving averages use `LinePlot` - ---- - -## Feature / License Matrix - -| Feature | Free (BarChart) | Pro (BarChartPro) | Premium | -|---|---|---|---| -| Vertical/horizontal bars | ✅ | ✅ | ✅ | -| Stacking | ✅ | ✅ | ✅ | -| Bar labels | ✅ | ✅ | ✅ | -| Border radius | ✅ | ✅ | ✅ | -| Dataset mode | ✅ | ✅ | ✅ | -| Color maps | ✅ | ✅ | ✅ | -| Grid/tooltip/legend | ✅ | ✅ | ✅ | -| Click events | ✅ | ✅ | ✅ | -| Highlighting | ✅ | ✅ | ✅ | -| Batch renderer (perf) | ✅ | ✅ | ✅ | -| Zoom & pan | ❌ | ✅ | ✅ | -| Toolbar | ❌ | ✅ | ✅ | -| Brush selection | ❌ | ✅ | ✅ | -| Slider preview | ❌ | ✅ | ✅ | -| Range bars | ❌ | ❌ | ✅ | -| Candlestick (OHLC) | ❌ | ❌ | ✅ (Preview) | diff --git a/.claude/support_files/bar/BarChart.react.js b/.claude/support_files/bar/BarChart.react.js deleted file mode 100644 index 9fe763d..0000000 --- a/.claude/support_files/bar/BarChart.react.js +++ /dev/null @@ -1,239 +0,0 @@ -/** - * BarChart — Dash wrapper for MUI X BarChart (Free + Pro) - * - * Follows the exact same pattern as the existing LineChart component. - * This is a STUB — Claude Code should implement the full component. - */ -import React, {useCallback, useMemo, useEffect} from 'react'; -import PropTypes from 'prop-types'; - -const BarChart = (props) => { - const { - id, - series, - dataset, - xAxis, - yAxis, - // Layout & Appearance - layout, - borderRadius, - height, - width, - margin, - grid, - colors, - skipAnimation, - loading, - hideLegend, - renderer, - // Interaction - axisHighlight, - highlightedItem, - // Pro - licenseKey, - initialZoom, - showSlider, - showToolbar, - brushConfig, - brushOverlay, - // Reference lines (same pattern as LineChart) - referenceLines, - // Dash - setProps, - } = props; - - // --- License key activation --- - useEffect(() => { - if (licenseKey) { - // TODO: Import LicenseInfo and set key - // Same pattern as existing LineChart/Heatmap Pro components - // import { LicenseInfo } from '@mui/x-license'; - // LicenseInfo.setLicenseKey(licenseKey); - } - }, [licenseKey]); - - // --- Determine which MUI component to use --- - // If Pro features are requested, use BarChartPro; otherwise use BarChart - const usePro = Boolean( - licenseKey && (initialZoom || showSlider || showToolbar || brushConfig || - (xAxis && xAxis.some(a => a.zoom))) - ); - - // --- Callbacks --- - const handleItemClick = useCallback( - (event, barItemIdentifier) => { - if (setProps) { - setProps({ - clickData: { - seriesId: barItemIdentifier.seriesId, - dataIndex: barItemIdentifier.dataIndex, - event_timestamp: Date.now(), - }, - }); - } - }, - [setProps] - ); - - const handleAxisClick = useCallback( - (event, data) => { - if (setProps && data) { - setProps({ - axisClickData: { - axisValue: data.axisValue, - event_timestamp: Date.now(), - }, - }); - } - }, - [setProps] - ); - - const handleHighlightChange = useCallback( - (highlightedItem) => { - if (setProps) { - setProps({highlightedItem}); - } - }, - [setProps] - ); - - // --- Build MUI props --- - const muiProps = { - series: series || [], - dataset, - xAxis, - yAxis, - layout, - borderRadius, - height: height || 300, - width, - margin, - grid, - colors, - skipAnimation, - loading, - hideLegend, - renderer, - axisHighlight, - highlightedItem, - onItemClick: handleItemClick, - onAxisClick: handleAxisClick, - onHighlightChange: handleHighlightChange, - // Pro features - ...(showToolbar && {showToolbar}), - ...(initialZoom && {initialZoom}), - ...(brushConfig && {brushConfig}), - }; - - // TODO: Dynamically import BarChart vs BarChartPro based on `usePro` - // For now, import both and conditionally render: - // - // if (usePro) { - // const { BarChartPro } = require('@mui/x-charts-pro/BarChartPro'); - // return
; - // } - // const { BarChart: MuiBarChart } = require('@mui/x-charts/BarChart'); - // return
; - - // Placeholder — Claude Code replaces with actual implementation - return
BarChart placeholder
; -}; - -BarChart.defaultProps = { - series: [], - layout: 'vertical', - height: 300, - loading: false, - licenseKey: '', -}; - -BarChart.propTypes = { - /** Dash component id */ - id: PropTypes.string, - - /** Array of bar series objects. Each: {data, dataKey, label, color, stack, barLabel, barLabelPlacement, highlightScope, yAxisId} */ - series: PropTypes.arrayOf(PropTypes.object), - - /** Array of row objects for dataKey-based series. */ - dataset: PropTypes.arrayOf(PropTypes.object), - - /** X-axis config. For bars: [{data, scaleType: 'band', label, categoryGapRatio, barGapRatio, tickPlacement, tickLabelPlacement, colorMap, zoom}] */ - xAxis: PropTypes.arrayOf(PropTypes.object), - - /** Y-axis config. [{label, min, max, position, id, colorMap}] */ - yAxis: PropTypes.arrayOf(PropTypes.object), - - /** Bar direction: "vertical" or "horizontal". */ - layout: PropTypes.oneOf(['vertical', 'horizontal']), - - /** Border radius for bar corners. */ - borderRadius: PropTypes.number, - - /** Chart height in pixels. */ - height: PropTypes.number, - - /** Chart width in pixels. If not set, uses parent width. */ - width: PropTypes.number, - - /** Chart margins {top, bottom, left, right}. */ - margin: PropTypes.oneOfType([PropTypes.number, PropTypes.object]), - - /** Grid lines: {horizontal: bool, vertical: bool}. */ - grid: PropTypes.object, - - /** Color palette array. */ - colors: PropTypes.arrayOf(PropTypes.string), - - /** Disable animations. */ - skipAnimation: PropTypes.bool, - - /** Show loading overlay. */ - loading: PropTypes.bool, - - /** Hide legend. */ - hideLegend: PropTypes.bool, - - /** Renderer strategy: "svg-single" (default) or "svg-batch" for large datasets. */ - renderer: PropTypes.oneOf(['svg-single', 'svg-batch']), - - /** Axis highlight config: {x: 'band'/'line'/'none', y: 'band'/'line'/'none'}. */ - axisHighlight: PropTypes.object, - - /** Controlled highlight state {seriesId, dataIndex}. Also an output prop. */ - highlightedItem: PropTypes.object, - - /** Reference lines. [{x, y, label, lineStyle, labelStyle, labelAlign}] */ - referenceLines: PropTypes.arrayOf(PropTypes.object), - - // --- Pro --- - /** MUI Pro license key for zoom, brush, toolbar. */ - licenseKey: PropTypes.string, - - /** Initial zoom state (Pro). [{axisId, start, end}] */ - initialZoom: PropTypes.arrayOf(PropTypes.object), - - /** Show zoom range slider (Pro). */ - showSlider: PropTypes.bool, - - /** Show zoom/export toolbar (Pro). */ - showToolbar: PropTypes.bool, - - /** Brush config (Pro). {enabled: bool, preventTooltip: bool} */ - brushConfig: PropTypes.object, - - /** Brush overlay display mode. */ - brushOverlay: PropTypes.string, - - // --- Output Props --- - /** Fired on bar click. {seriesId, dataIndex, event_timestamp} */ - clickData: PropTypes.object, - - /** Fired on axis click. {axisValue, event_timestamp} */ - axisClickData: PropTypes.object, - - /** Dash setProps callback */ - setProps: PropTypes.func, -}; - -export default BarChart; diff --git a/.claude/support_files/bar/CLAUDE_CODE_INSTRUCTIONS.md b/.claude/support_files/bar/CLAUDE_CODE_INSTRUCTIONS.md deleted file mode 100644 index 5f53d9d..0000000 --- a/.claude/support_files/bar/CLAUDE_CODE_INSTRUCTIONS.md +++ /dev/null @@ -1,122 +0,0 @@ -# Claude Code — Bar Chart + Candlestick Implementation Instructions - -## Context - -You are adding BarChart, RangeBarChart, and CandlestickChart to the existing `dash-mui-charts` Dash component library. Follow the EXACT patterns used by the existing `LineChart` component. - -## Files Provided - -- `IMPLEMENTATION_PLAN.md` — Architecture, phases, prop mappings, Python usage examples -- `API_REFERENCE.md` — Exhaustive MUI prop/slot surface for all three components -- `stubs/BarChart.react.js` — React stub (~70% complete) -- `stubs/RangeBarChart.react.js` — React stub (~70% complete) -- `stubs/CandlestickChart.react.js` — React stub (~70% complete) - -## Critical: Study the Existing LineChart First - -Before writing any code, study the existing `LineChart.react.js`: - -```bash -cat src/lib/components/LineChart.react.js -``` - -The BarChart should mirror this component's structure exactly: -- Same license key activation pattern -- Same Pro feature gating logic -- Same `setProps` output prop pattern for click events -- Same `initialZoom`, `showSlider`, `showToolbar` prop handling -- Same `referenceLines` pass-through pattern - -## Execution Steps - -### 1. Check existing project -```bash -cat package.json | grep -E "mui|charts" -cat src/lib/index.js -ls src/lib/components/ -cat src/lib/components/LineChart.react.js | head -80 -``` - -### 2. Install dependencies -```bash -# Check what's already installed -npm ls @mui/x-charts @mui/x-charts-pro 2>/dev/null - -# Install what's missing -npm install @mui/x-charts-premium -# @mui/x-charts and @mui/x-charts-pro should already be installed -``` - -### 3. Copy and complete stubs - -**BarChart.react.js** — Key completions: -- Replace placeholder with actual MUI import: `import { BarChart as MuiBarChart } from '@mui/x-charts/BarChart'` and `import { BarChartPro } from '@mui/x-charts-pro/BarChartPro'` -- Copy the license key activation from `LineChart.react.js` verbatim -- Wire Pro/Free component selection (same pattern as LineChart) -- Pass through `referenceLines` (if the existing chart wrapper supports them) -- Wire `showSlider` — look at how LineChart handles it (may need zoom slider component) - -**RangeBarChart.react.js** — Key completions: -- Import `BarChartPremium` from `@mui/x-charts-premium` -- Auto-inject `type: 'rangeBar'` into all series -- Premium license activation - -**CandlestickChart.react.js** — Key completions: -- Import `CandlestickChart` from `@mui/x-charts-premium` -- Handle both data formats: `[[o,h,l,c], ...]` and `datasetKeys` -- Note: CandlestickPlot uses WebGL canvas — the chart handles this internally -- `upColor` and `downColor` can be strings or functions. For Dash, only support strings (functions can't be serialized). - -### 4. Register components in `src/lib/index.js` -```js -export {default as BarChart} from './components/BarChart.react'; -export {default as RangeBarChart} from './components/RangeBarChart.react'; -export {default as CandlestickChart} from './components/CandlestickChart.react'; -``` - -### 5. Build and verify -```bash -npm run build -cat dash_mui_charts/BarChart.py | head -30 -cat dash_mui_charts/RangeBarChart.py | head -30 -cat dash_mui_charts/CandlestickChart.py | head -30 -``` - -### 6. Update `__init__.py` - -### 7. Test -```python -# Quick test -import dash -from dash import html -from dash_mui_charts import BarChart - -app = dash.Dash(__name__) -app.layout = html.Div([ - BarChart( - id="test", - series=[{"data": [4, 3, 5]}, {"data": [1, 6, 3]}], - xAxis=[{"data": ["A", "B", "C"], "scaleType": "band"}], - height=300, - ) -]) -app.run(debug=True) -``` - -## Key Gotchas - -1. **`scaleType: 'band'` is required on the category axis for bar charts.** Without it, MUI throws. Make sure docs and examples always include it. - -2. **`barLabel` functions can't be serialized by Dash.** Only support string values: `"value"` and `"formattedValue"`. If a user wants custom formatting, they'd need a JS clientside callback or a future `barLabelFormat` string prop. - -3. **`upColor`/`downColor` functions can't be serialized.** Only support string color values in Dash. Document this limitation. - -4. **`@mui/x-charts-premium` is a separate package** with its own license tier. The existing `@mui/x-charts-pro` package is NOT sufficient for RangeBarChart or CandlestickChart. - -5. **CandlestickChart is in Preview.** MUI warns the API may change. Document this clearly. The component name and import path may change in future MUI versions. - -6. **The existing `LiveTradingChart` is a DIFFERENT component.** It's a custom client-side real-time simulation. The new `CandlestickChart` wraps MUI's native static OHLC chart. Both should coexist — they serve different use cases. - -7. **`dataset` mode with `dataKey`:** When users provide `dataset=[{month: "Jan", revenue: 30}, ...]`, series use `dataKey: "revenue"` instead of `data: [30, ...]`. This is a pass-through — MUI handles the mapping internally. - -8. **Batch renderer (`renderer: 'svg-batch'`):** Only works for regular BarChart, NOT for RangeBarChart. Has trade-offs (no CSS styling per bar, no transparency in highlights). Only recommend for datasets > 200 bars. diff --git a/.claude/support_files/bar/CandlestickChart.react.js b/.claude/support_files/bar/CandlestickChart.react.js deleted file mode 100644 index 0f2292e..0000000 --- a/.claude/support_files/bar/CandlestickChart.react.js +++ /dev/null @@ -1,128 +0,0 @@ -/** - * CandlestickChart — Dash wrapper for MUI X CandlestickChart (Premium Preview) - * - * Static OHLC candlestick chart. NOT the same as LiveTradingChart (which is a - * real-time client-side simulation). This wraps MUI's native candlestick component. - * - * Requires Premium license. - * This is a STUB — Claude Code should implement the full component. - */ -import React, {useCallback, useEffect} from 'react'; -import PropTypes from 'prop-types'; - -const CandlestickChart = (props) => { - const { - id, - series, - dataset, - xAxis, - yAxis, - height, - width, - margin, - grid, - skipAnimation, - showToolbar, - licenseKey, - setProps, - } = props; - - useEffect(() => { - if (licenseKey) { - // TODO: LicenseInfo.setLicenseKey(licenseKey); - } - }, [licenseKey]); - - const handleItemClick = useCallback( - (event, identifier) => { - if (setProps) { - setProps({ - clickData: { - dataIndex: identifier.dataIndex, - event_timestamp: Date.now(), - }, - }); - } - }, - [setProps] - ); - - // TODO: Import CandlestickChart from '@mui/x-charts-premium' - // Note: CandlestickPlot uses WebGL — renders in ChartsWebGLLayer - // - // const { CandlestickChart: MuiCandlestickChart } = require('@mui/x-charts-premium'); - // return ( - //
- // - //
- // ); - - return
CandlestickChart placeholder
; -}; - -CandlestickChart.defaultProps = { - series: [], - height: 400, - licenseKey: '', -}; - -CandlestickChart.propTypes = { - id: PropTypes.string, - - /** - * OHLC series. Two formats: - * 1. Array: {data: [[open, high, low, close], ...], upColor, downColor} - * 2. Dataset: {datasetKeys: {open, high, low, close}, upColor, downColor} - */ - series: PropTypes.arrayOf(PropTypes.object), - - /** Dataset for datasetKeys mode. [{date, open, high, low, close, volume?}, ...] */ - dataset: PropTypes.arrayOf(PropTypes.object), - - /** X-axis config. Band scale with dates/labels. Supports zoom. */ - xAxis: PropTypes.arrayOf(PropTypes.object), - - /** Y-axis config. [{label, valueFormatter}] */ - yAxis: PropTypes.arrayOf(PropTypes.object), - - /** Chart height in pixels. */ - height: PropTypes.number, - - /** Chart width in pixels. */ - width: PropTypes.number, - - /** Chart margins {top, bottom, left, right}. */ - margin: PropTypes.object, - - /** Grid lines: {horizontal, vertical}. */ - grid: PropTypes.object, - - /** Disable animations. */ - skipAnimation: PropTypes.bool, - - /** Show toolbar. */ - showToolbar: PropTypes.bool, - - /** Premium license key. REQUIRED. */ - licenseKey: PropTypes.string, - - // Output - /** Fired on candle click. {dataIndex, event_timestamp} */ - clickData: PropTypes.object, - - setProps: PropTypes.func, -}; - -export default CandlestickChart; diff --git a/.claude/support_files/bar/IMPLEMENTATION_PLAN.md b/.claude/support_files/bar/IMPLEMENTATION_PLAN.md deleted file mode 100644 index e1e4fd5..0000000 --- a/.claude/support_files/bar/IMPLEMENTATION_PLAN.md +++ /dev/null @@ -1,449 +0,0 @@ -# MUI X Bar Charts + Candlestick — Dash Integration Plan - -## Overview - -Extend `dash-mui-charts` with three new components following the same patterns as the existing `LineChart`: - -| Component | MUI Source | License | Key Features | -|---|---|---|---| -| `BarChart` | `@mui/x-charts/BarChart` + `BarChartPro` | Free + Pro | Vertical/horizontal bars, stacking, labels, dataset mode, border radius, color maps, bar gap/category gap, min bar size, batch renderer | -| `RangeBarChart` | `@mui/x-charts-premium/BarChartPremium` | Premium | Range bars (`{start, end}`), temperature ranges, Gantt-style timelines | -| `CandlestickChart` | `@mui/x-charts-premium` (Preview) | Premium | OHLC candlestick, `upColor`/`downColor`, dataset mode with `datasetKeys`, WebGL rendering, composition with volume bars + moving averages | - -> **Note:** The existing `LiveTradingChart` in dash-mui-charts is a custom client-side simulation. The new `CandlestickChart` wraps MUI's native candlestick which is data-driven (no simulation) and supports all MUI chart features (zoom, tooltip, axis formatting, composition). - ---- - -## Phase 1: `BarChart` (Free + Pro) - -### Dash Component: `BarChart` - -**File:** `src/lib/components/BarChart.react.js` - -This follows the exact same architectural pattern as the existing `LineChart` — pass-through props to MUI's ``, with Pro features gated behind `licenseKey`. - -#### Props - -**Data Props:** - -| Dash Prop | Type | MUI Prop | Notes | -|---|---|---|---| -| `id` | string | — | Standard Dash id | -| `series` | list[dict] | `series` | Array of bar series: `{data, label, color, stack, barLabel, barLabelPlacement, highlightScope, dataKey}` | -| `dataset` | list[dict] | `dataset` | Alternative: array of row objects, series use `dataKey` | -| `xAxis` | list[dict] | `xAxis` | Axis config: `{data, scaleType, label, dataKey, categoryGapRatio, barGapRatio, tickPlacement, tickLabelPlacement, colorMap, zoom}` | -| `yAxis` | list[dict] | `yAxis` | Same structure as xAxis | - -**Layout & Appearance:** - -| Dash Prop | Type | Default | MUI Prop | Notes | -|---|---|---|---|---| -| `layout` | string | `"vertical"` | `layout` | `"vertical"` or `"horizontal"` | -| `borderRadius` | number | `None` | `borderRadius` | Rounded bar corners | -| `height` | number | `300` | `height` | Chart height px | -| `width` | number | `None` | `width` | Chart width px (default: parent) | -| `margin` | dict | `None` | `margin` | `{top, bottom, left, right}` | -| `grid` | dict | `None` | `grid` | `{horizontal: bool, vertical: bool}` | -| `colors` | list[string] | `None` | `colors` | Color palette | -| `skipAnimation` | bool | `None` | `skipAnimation` | Disable animations | -| `loading` | bool | `False` | `loading` | Show loading overlay | -| `hideLegend` | bool | `None` | `hideLegend` | Hide legend | -| `renderer` | string | `None` | `renderer` | `"svg-single"` (default) or `"svg-batch"` for performance | - -**Interaction Props:** - -| Dash Prop | Type | MUI Prop | Notes | -|---|---|---|---| -| `axisHighlight` | dict | `axisHighlight` | `{x: 'band'/'line'/'none', y: 'band'/'line'/'none'}` | -| `tooltip` | dict | — | Tooltip trigger config (via slotProps) | -| `highlightedItem` | dict | `highlightedItem` | Controlled highlight `{seriesId, dataIndex}` | - -**Pro Features (require `licenseKey`):** - -| Dash Prop | Type | MUI Prop | Notes | -|---|---|---|---| -| `licenseKey` | string | — | MUI Pro license key | -| `initialZoom` | list[dict] | `initialZoom` | Initial zoom state | -| `showSlider` | bool | — | Zoom range slider (Pro) | -| `showToolbar` | bool | `showToolbar` | Zoom/export toolbar | -| `brushConfig` | dict | `brushConfig` | Brush selection (Pro) | - -**Output Props (Dash callbacks):** - -| Dash Prop | Type | Fires On | Notes | -|---|---|---|---| -| `clickData` | dict | `onItemClick` | `{seriesId, dataIndex, value, event_timestamp}` | -| `axisClickData` | dict | `onAxisClick` | `{axisValue, seriesValues, event_timestamp}` | -| `highlightedItem` | dict | `onHighlightChange` | Controlled + output | - -**Series Object Structure:** - -```python -{ - "data": [4, 3, 5], # or use dataKey with dataset - "dataKey": "revenue", # alternative to data, used with dataset prop - "label": "Revenue", - "color": "#1976d2", - "stack": "group1", # stack ID (series with same value are stacked) - "stackOffset": "none", # "none", "expand", "diverging", "silhouette", "wiggle" - "stackOrder": "none", # "none", "appearance", "ascending", "descending", "insideOut", "reverse" - "barLabel": "value", # "value", "formattedValue", or omit - "barLabelPlacement": "center",# "center" or "outside" - "highlightScope": {"highlight": "series", "fade": "global"}, - "yAxisId": "left", # for biaxial -} -``` - ---- - -## Phase 2: `RangeBarChart` (Premium) - -### Dash Component: `RangeBarChart` - -**File:** `src/lib/components/RangeBarChart.react.js` - -Uses `BarChartPremium` from `@mui/x-charts-premium`. - -#### Key Differences from BarChart - -- Series type is `"rangeBar"` instead of `"bar"` -- Each data point is `{start: number, end: number}` instead of a single number -- Uses `BarChartPremium` / `RangeBarPlot` under the hood -- No batch renderer support -- `colorMap` does NOT work on the numerical axis - -**Data Props:** - -| Dash Prop | Type | Notes | -|---|---|---| -| `series` | list[dict] | Series with `type: "rangeBar"`, `data: [{start, end}, ...]` | -| `dataset` | list[dict] | Row objects; series use `dataKey` | -| `xAxis` | list[dict] | Same as BarChart | -| `yAxis` | list[dict] | Same as BarChart | -| `licenseKey` | string | **Required** — Premium license | - -All appearance, layout, and Pro props from BarChart apply here too. - -**Series Object Structure:** - -```python -{ - "type": "rangeBar", # REQUIRED — distinguishes from regular bar - "data": [ - {"start": 5, "end": 15}, - {"start": 3, "end": 12}, - ], - "label": "Temperature Range", - "color": "#1976d2", -} -``` - -**Output Props:** Same as BarChart (`clickData`, `axisClickData`). - ---- - -## Phase 3: `CandlestickChart` (Premium — Preview) - -### Dash Component: `CandlestickChart` - -**File:** `src/lib/components/CandlestickChart.react.js` - -Uses `CandlestickChart` from `@mui/x-charts-premium`. - -> **Important:** This is MUI's PREVIEW candlestick — not the existing custom `LiveTradingChart`. It's a static data-driven chart, not a real-time simulation. The two components serve different purposes and should coexist. - -**Data Props:** - -| Dash Prop | Type | MUI Prop | Notes | -|---|---|---|---| -| `series` | list[dict] | `series` | OHLC series: `{data: [[o,h,l,c], ...], upColor, downColor, datasetKeys}` | -| `dataset` | list[dict] | `dataset` | Row objects with open/high/low/close columns | -| `xAxis` | list[dict] | `xAxis` | Band axis with dates/labels. Supports `zoom` (Pro) | -| `yAxis` | list[dict] | `yAxis` | Value axis with `valueFormatter` | -| `licenseKey` | string | — | **Required** — Premium license | - -**Candlestick-Specific Props:** - -| Dash Prop | Type | Notes | -|---|---|---| -| `height` | number | Chart height | -| `width` | number | Chart width | -| `margin` | dict | `{top, bottom, left, right}` | -| `grid` | dict | `{horizontal, vertical}` | -| `skipAnimation` | bool | Disable animations | -| `showToolbar` | bool | Toolbar | - -**Series Object Structure:** - -```python -# Array format -{ - "data": [ - [100, 110, 95, 105], # [open, high, low, close] - [105, 115, 100, 112], - ], - "upColor": "#4caf50", # Close >= Open color - "downColor": "#f44336", # Close < Open color -} - -# Dataset format -{ - "datasetKeys": {"open": "open", "high": "high", "low": "low", "close": "close"}, - "upColor": "#4caf50", - "downColor": "#f44336", -} -``` - -**Output Props:** - -| Dash Prop | Type | Fires On | -|---|---|---| -| `clickData` | dict | Item click — `{dataIndex, ohlc: {open, high, low, close}, event_timestamp}` | - ---- - -## File Structure - -``` -src/lib/components/ -├── BarChart.react.js # MUI BarChart + BarChartPro wrapper -├── RangeBarChart.react.js # MUI BarChartPremium (rangeBar series) -├── CandlestickChart.react.js # MUI CandlestickChart wrapper (static OHLC) -├── ... (existing components) -``` - -``` -dash_mui_charts/ -├── BarChart.py # Auto-generated -├── RangeBarChart.py # Auto-generated -├── CandlestickChart.py # Auto-generated -``` - -``` -docs/dash_mui_charts/ -├── bar_basic.py # Basic bars, stacking, horizontal -├── bar_pro.py # Zoom, brush, labels, border radius -├── range_bar.py # Range bar demos -├── candlestick_basic.py # Static OHLC candlestick -``` - ---- - -## npm Dependencies - -Add/verify in `package.json`: - -```json -{ - "dependencies": { - "@mui/x-charts": "^7.x || ^8.x || ^9.x", - "@mui/x-charts-pro": "^7.x || ^8.x || ^9.x", - "@mui/x-charts-premium": "^9.x" - } -} -``` - -> **Note:** `@mui/x-charts` is likely already installed for the existing chart components. `@mui/x-charts-pro` may already be installed for zoom/brush. `@mui/x-charts-premium` is new — needed for RangeBarChart and CandlestickChart. - ---- - -## Implementation Order - -### Step 1 — `BarChart` (Free) -1. Create `BarChart.react.js` with full prop surface -2. Wire `series`, `dataset`, `xAxis`, `yAxis` pass-through -3. Wire `layout`, `borderRadius`, `grid`, `colors`, `margin` -4. Wire `onItemClick` → `clickData`, `onAxisClick` → `axisClickData` -5. Wire `highlightedItem` controlled + output -6. Wire `barLabel` / `barLabelPlacement` in series -7. Wire `categoryGapRatio` / `barGapRatio` on xAxis -8. Build, test with basic vertical + horizontal + stacked demos - -### Step 2 — `BarChart` Pro Features -1. Add `licenseKey` gating (same as existing LineChart Pro) -2. Wire `initialZoom`, `showSlider`, `showToolbar`, `brushConfig` -3. Wire `renderer` prop for batch rendering performance mode -4. Write `bar_pro.py` docs - -### Step 3 — `RangeBarChart` (Premium) -1. Create `RangeBarChart.react.js` using `BarChartPremium` -2. Handle `rangeBar` series type with `{start, end}` data format -3. Wire same appearance/interaction props as BarChart -4. Write `range_bar.py` docs - -### Step 4 — `CandlestickChart` (Premium — Preview) -1. Create `CandlestickChart.react.js` -2. Wire OHLC `data: [[o,h,l,c], ...]` format -3. Wire `dataset` mode with `datasetKeys: {open, high, low, close}` -4. Wire `upColor` / `downColor` on series -5. Wire zoom support on xAxis -6. Write `candlestick_basic.py` docs - -### Step 5 — Polish -1. Update `llms.txt` with all three components -2. Update `__init__.py` exports -3. Bump version - ---- - -## Callback Patterns (Python Usage Examples) - -### Basic BarChart - -```python -from dash_mui_charts import BarChart - -BarChart( - id="bar-basic", - series=[ - {"data": [4, 3, 5], "label": "Group A", "color": "#1976d2"}, - {"data": [1, 6, 3], "label": "Group B", "color": "#388e3c"}, - {"data": [2, 5, 6], "label": "Group C", "color": "#f57c00"}, - ], - xAxis=[{"data": ["Q1", "Q2", "Q3"], "scaleType": "band"}], - height=350, - grid={"horizontal": True}, -) -``` - -### Stacked Horizontal with Labels - -```python -BarChart( - id="bar-stacked", - series=[ - {"data": [30, 25, 40], "label": "Revenue", "stack": "total", "barLabel": "value"}, - {"data": [20, 15, 25], "label": "Expenses", "stack": "total", "barLabel": "value"}, - ], - xAxis=[{"data": ["2022", "2023", "2024"], "scaleType": "band"}], - layout="horizontal", - borderRadius=6, - height=300, -) -``` - -### Dataset Mode - -```python -BarChart( - id="bar-dataset", - dataset=[ - {"month": "Jan", "london": 18, "paris": 15, "nyc": 12}, - {"month": "Feb", "london": 22, "paris": 18, "nyc": 15}, - {"month": "Mar", "london": 30, "paris": 25, "nyc": 22}, - ], - xAxis=[{"dataKey": "month"}], - series=[ - {"dataKey": "london", "label": "London"}, - {"dataKey": "paris", "label": "Paris"}, - {"dataKey": "nyc", "label": "New York"}, - ], - height=350, -) -``` - -### Pro: Zoom + Brush - -```python -BarChart( - id="bar-zoom", - licenseKey=os.getenv("MUI_PRO_API_KEY", ""), - series=[{"data": big_dataset, "label": "Sales"}], - xAxis=[{ - "data": categories, - "scaleType": "band", - "zoom": {"minSpan": 5, "panning": True}, - }], - showSlider=True, - showToolbar=True, - height=400, -) -``` - -### RangeBarChart (Temperature Ranges) - -```python -from dash_mui_charts import RangeBarChart - -RangeBarChart( - id="range-temp", - licenseKey=os.getenv("MUI_PREMIUM_API_KEY", ""), - series=[{ - "type": "rangeBar", - "data": [ - {"start": 5, "end": 14}, - {"start": 6, "end": 16}, - {"start": 9, "end": 20}, - ], - "label": "Temperature Range", - "color": "#ef5350", - }], - xAxis=[{"data": ["Jan", "Feb", "Mar"], "scaleType": "band"}], - yAxis=[{"label": "°C"}], - borderRadius=4, - height=350, -) -``` - -### CandlestickChart (Static OHLC) - -```python -from dash_mui_charts import CandlestickChart - -CandlestickChart( - id="candle-basic", - licenseKey=os.getenv("MUI_PREMIUM_API_KEY", ""), - series=[{ - "data": [ - [100, 110, 95, 105], - [105, 115, 100, 112], - [112, 120, 108, 118], - ], - "upColor": "#4caf50", - "downColor": "#f44336", - }], - xAxis=[{ - "data": ["Mon", "Tue", "Wed"], - "scaleType": "band", - "zoom": {"minSpan": 1, "filterMode": "discard"}, - }], - yAxis=[{"label": "Price ($)"}], - height=400, -) -``` - -### CandlestickChart with Dataset - -```python -CandlestickChart( - id="candle-dataset", - licenseKey=os.getenv("MUI_PREMIUM_API_KEY", ""), - dataset=[ - {"date": "2025-01-02", "open": 100, "high": 110, "low": 95, "close": 105}, - {"date": "2025-01-03", "open": 105, "high": 115, "low": 100, "close": 112}, - ], - series=[{ - "datasetKeys": {"open": "open", "high": "high", "low": "low", "close": "close"}, - "upColor": "#4caf50", - "downColor": "#f44336", - }], - xAxis=[{"dataKey": "date", "zoom": {"minSpan": 1, "filterMode": "discard"}}], - height=400, -) -``` - ---- - -## Key Architecture Decisions - -1. **BarChart mirrors LineChart pattern exactly.** Same prop structure for `series`, `xAxis`, `yAxis`, `grid`, `height`, `licenseKey`, `initialZoom`, `showSlider`, `showToolbar`, `brushConfig`. This is intentional — users learn one pattern. - -2. **`dataset` mode is a direct pass-through.** MUI's dataset helper avoids data duplication. Dash users pass `dataset=[{...}, ...]` and reference columns via `dataKey` in series and axes. - -3. **RangeBarChart is a separate component** (not a mode of BarChart) because it requires `@mui/x-charts-premium` and uses `BarChartPremium` internally. This keeps the free `BarChart` tree-shakeable. - -4. **CandlestickChart coexists with LiveTradingChart.** They serve different purposes: `CandlestickChart` = static MUI native OHLC chart with zoom/tooltip/composition support. `LiveTradingChart` = real-time client-side simulation with alerts/forecast. Document both clearly. - -5. **`barLabel` as string, not function.** MUI accepts functions for `barLabel` but Dash can't serialize JS functions. We support `"value"` and `"formattedValue"` strings. For custom formatting, a future enhancement could use a `barLabelFormat` string (like `dateFormat` on LineChart). - -6. **License tiers:** `BarChart` = Free + Pro gated by `licenseKey`. `RangeBarChart` + `CandlestickChart` = Premium gated by `licenseKey`. Use the same `LicenseInfo.setLicenseKey()` pattern as existing Heatmap. diff --git a/.claude/support_files/bar/LLMS_TXT_ADDITION.md b/.claude/support_files/bar/LLMS_TXT_ADDITION.md deleted file mode 100644 index 747fb82..0000000 --- a/.claude/support_files/bar/LLMS_TXT_ADDITION.md +++ /dev/null @@ -1,65 +0,0 @@ -# Bar Chart Components — llms.txt Addition - -Append to existing `llms.txt`. - ---- - -## Bar Charts - -| Component | License | Key Features | -|:----------|:--------|:-------------| -| **BarChart** | Free + Pro | Vertical/horizontal bars, stacking, dataset mode, bar labels, border radius, color maps, batch renderer, zoom/pan (Pro), brush (Pro) | -| **RangeBarChart** | Premium | Range bars ({start, end}), temperature ranges, Gantt timelines, border radius, color maps | -| **CandlestickChart** | Premium (Preview) | Static OHLC candlestick, upColor/downColor, dataset mode with datasetKeys, zoom, WebGL rendering | - -### BarChart Properties - -| Property | Type | Default | Description | -|:---------|:-----|:--------|:------------| -| `series` | list | Required | Array of `{data, dataKey, label, color, stack, barLabel, barLabelPlacement, highlightScope}` | -| `dataset` | list | `None` | Row objects for `dataKey`-based series | -| `xAxis` | list | `None` | X-axis config: `{data, scaleType, label, dataKey, categoryGapRatio, barGapRatio, tickPlacement, tickLabelPlacement, colorMap, zoom}` | -| `yAxis` | list | `None` | Y-axis config | -| `layout` | string | `"vertical"` | `"vertical"` or `"horizontal"` | -| `borderRadius` | int | `None` | Rounded bar corners | -| `height` | int | `300` | Chart height in pixels | -| `width` | int | `None` | Chart width (default: parent) | -| `margin` | dict | `None` | `{top, bottom, left, right}` | -| `grid` | dict | `None` | `{horizontal: bool, vertical: bool}` | -| `colors` | list | `None` | Color palette | -| `skipAnimation` | bool | `None` | Disable animations | -| `loading` | bool | `False` | Show loading overlay | -| `hideLegend` | bool | `None` | Hide legend | -| `renderer` | string | `None` | `"svg-single"` (default) or `"svg-batch"` for performance | -| `axisHighlight` | dict | `None` | `{x: 'band'/'line'/'none', y: ...}` | -| `highlightedItem` | dict | `None` | Controlled highlight `{seriesId, dataIndex}` | -| `licenseKey` | string | `""` | MUI Pro license key (for zoom, brush, toolbar) | -| `initialZoom` | list | `None` | Initial zoom state (Pro) | -| `showSlider` | bool | `False` | Zoom range slider (Pro) | -| `showToolbar` | bool | `False` | Zoom/export toolbar (Pro) | -| `brushConfig` | dict | `None` | Brush selection (Pro) | -| `clickData` | dict | Output | Bar click: `{seriesId, dataIndex, event_timestamp}` | -| `axisClickData` | dict | Output | Axis click: `{axisValue, event_timestamp}` | - -### RangeBarChart Properties - -Inherits all BarChart props. Key differences: - -| Property | Type | Default | Description | -|:---------|:-----|:--------|:------------| -| `series` | list | Required | `{data: [{start, end}, ...], label, color}` — type auto-set to `"rangeBar"` | -| `licenseKey` | string | Required | Premium license key | - -### CandlestickChart Properties - -| Property | Type | Default | Description | -|:---------|:-----|:--------|:------------| -| `series` | list | Required | `{data: [[o,h,l,c], ...], upColor, downColor}` or `{datasetKeys: {open, high, low, close}}` | -| `dataset` | list | `None` | Row objects with OHLC columns | -| `xAxis` | list | `None` | Band axis config | -| `yAxis` | list | `None` | Value axis config | -| `height` | int | `400` | Chart height | -| `licenseKey` | string | Required | Premium license key | -| `clickData` | dict | Output | `{dataIndex, event_timestamp}` | - -> **Note:** CandlestickChart is a static OHLC chart, distinct from LiveTradingChart which provides real-time simulation. diff --git a/.claude/support_files/bar/RangeBarChart.react.js b/.claude/support_files/bar/RangeBarChart.react.js deleted file mode 100644 index 734681b..0000000 --- a/.claude/support_files/bar/RangeBarChart.react.js +++ /dev/null @@ -1,153 +0,0 @@ -/** - * RangeBarChart — Dash wrapper for MUI X BarChartPremium with rangeBar series - * - * Requires Premium license. Data format: {start, end} per data point. - * This is a STUB — Claude Code should implement the full component. - */ -import React, {useCallback, useEffect} from 'react'; -import PropTypes from 'prop-types'; - -const RangeBarChart = (props) => { - const { - id, - series, - dataset, - xAxis, - yAxis, - layout, - borderRadius, - height, - width, - margin, - grid, - colors, - skipAnimation, - loading, - hideLegend, - axisHighlight, - highlightedItem, - licenseKey, - initialZoom, - showSlider, - showToolbar, - setProps, - } = props; - - useEffect(() => { - if (licenseKey) { - // TODO: LicenseInfo.setLicenseKey(licenseKey); - } - }, [licenseKey]); - - // Ensure all series have type: 'rangeBar' - const processedSeries = (series || []).map(s => ({ - ...s, - type: 'rangeBar', - })); - - const handleItemClick = useCallback( - (event, identifier) => { - if (setProps) { - setProps({ - clickData: { - seriesId: identifier.seriesId, - dataIndex: identifier.dataIndex, - event_timestamp: Date.now(), - }, - }); - } - }, - [setProps] - ); - - const handleAxisClick = useCallback( - (event, data) => { - if (setProps && data) { - setProps({axisClickData: {axisValue: data.axisValue, event_timestamp: Date.now()}}); - } - }, - [setProps] - ); - - // TODO: Import BarChartPremium from '@mui/x-charts-premium/BarChartPremium' - // and render with processedSeries and all other props. - // - // const { BarChartPremium } = require('@mui/x-charts-premium/BarChartPremium'); - // return ( - //
- // - //
- // ); - - return
RangeBarChart placeholder
; -}; - -RangeBarChart.defaultProps = { - series: [], - layout: 'vertical', - height: 300, - loading: false, - licenseKey: '', -}; - -RangeBarChart.propTypes = { - id: PropTypes.string, - - /** Range bar series. Each: {data: [{start, end}, ...], label, color}. type:'rangeBar' is auto-set. */ - series: PropTypes.arrayOf(PropTypes.object), - - /** Dataset for dataKey mode. */ - dataset: PropTypes.arrayOf(PropTypes.object), - - xAxis: PropTypes.arrayOf(PropTypes.object), - yAxis: PropTypes.arrayOf(PropTypes.object), - - layout: PropTypes.oneOf(['vertical', 'horizontal']), - borderRadius: PropTypes.number, - height: PropTypes.number, - width: PropTypes.number, - margin: PropTypes.oneOfType([PropTypes.number, PropTypes.object]), - grid: PropTypes.object, - colors: PropTypes.arrayOf(PropTypes.string), - skipAnimation: PropTypes.bool, - loading: PropTypes.bool, - hideLegend: PropTypes.bool, - axisHighlight: PropTypes.object, - highlightedItem: PropTypes.object, - - /** Premium license key. REQUIRED. */ - licenseKey: PropTypes.string, - - initialZoom: PropTypes.arrayOf(PropTypes.object), - showSlider: PropTypes.bool, - showToolbar: PropTypes.bool, - - // Output - clickData: PropTypes.object, - axisClickData: PropTypes.object, - - setProps: PropTypes.func, -}; - -export default RangeBarChart; diff --git a/.claude/support_files/bar/bar_basic.py b/.claude/support_files/bar/bar_basic.py deleted file mode 100644 index 6018ea7..0000000 --- a/.claude/support_files/bar/bar_basic.py +++ /dev/null @@ -1,179 +0,0 @@ -# File: docs/dash_mui_charts/bar_basic.py -"""Bar Charts — Basic examples: vertical, horizontal, stacked, dataset mode, labels, border radius.""" - -import os -import random -import json -import dash_mantine_components as dmc -from dash import html, callback, Input, Output -from dash_mui_charts import BarChart - -MUI_KEY = os.getenv('MUI_PRO_API_KEY', '') -random.seed(42) - -GLASS = { - "background": "light-dark(rgba(255,255,255,0.55), rgba(30,30,30,0.55))", - "backdropFilter": "blur(16px) saturate(1.8)", - "WebkitBackdropFilter": "blur(16px) saturate(1.8)", - "border": "1px solid light-dark(rgba(255,255,255,0.5), rgba(255,255,255,0.08))", -} - -months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'] -revenue = [random.randint(30, 90) for _ in months] -expenses = [random.randint(20, 65) for _ in months] -profit = [r - e for r, e in zip(revenue, expenses)] - -component = dmc.Stack([ - dmc.Text("Bar Charts", fw=700, size="xl"), - dmc.Text("Compare discrete categories with vertical, horizontal, and stacked bar charts.", size="sm", c="dimmed"), - - # --- Basic Vertical --- - dmc.Paper( - dmc.Stack([ - dmc.Text("Multi-Series Bar Chart", fw=600), - dmc.Text("Revenue, expenses, and profit by month.", size="sm", c="dimmed"), - BarChart( - id="mc-bar-basic", - series=[ - {'data': revenue, 'label': 'Revenue ($k)', 'color': '#1976d2'}, - {'data': expenses, 'label': 'Expenses ($k)', 'color': '#f57c00'}, - {'data': profit, 'label': 'Profit ($k)', 'color': '#388e3c'}, - ], - xAxis=[{'data': months, 'scaleType': 'band', 'label': 'Month'}], - yAxis=[{'label': 'Amount ($k)'}], - grid={'horizontal': True}, - height=350, - ), - ], gap="sm"), - p="lg", radius="md", style=GLASS, - ), - - # --- Stacked --- - dmc.Paper( - dmc.Stack([ - dmc.Text("Stacked Bar Chart", fw=600), - dmc.Text("Traffic sources stacked per month.", size="sm", c="dimmed"), - BarChart( - id="mc-bar-stacked", - series=[ - {'data': [random.randint(10, 30) for _ in months], 'label': 'Organic', 'color': '#66bb6a', 'stack': 'traffic'}, - {'data': [random.randint(8, 25) for _ in months], 'label': 'Paid', 'color': '#42a5f5', 'stack': 'traffic'}, - {'data': [random.randint(5, 15) for _ in months], 'label': 'Referral', 'color': '#ab47bc', 'stack': 'traffic'}, - ], - xAxis=[{'data': months, 'scaleType': 'band'}], - yAxis=[{'label': 'Visitors (k)'}], - grid={'horizontal': True}, - height=300, - ), - ], gap="sm"), - p="lg", radius="md", style=GLASS, - ), - - # --- Horizontal --- - dmc.Paper( - dmc.Stack([ - dmc.Text("Horizontal Bar Chart", fw=600), - dmc.Text("Rainfall data displayed horizontally with border radius.", size="sm", c="dimmed"), - BarChart( - id="mc-bar-horizontal", - series=[{'data': revenue, 'label': 'Revenue ($k)', 'color': '#1976d2'}], - yAxis=[{'data': months, 'scaleType': 'band'}], - xAxis=[{'label': 'Amount ($k)'}], - layout='horizontal', - borderRadius=6, - grid={'vertical': True}, - height=300, - ), - ], gap="sm"), - p="lg", radius="md", style=GLASS, - ), - - # --- Dataset Mode --- - dmc.Paper( - dmc.Stack([ - dmc.Text("Dataset Mode", fw=600), - dmc.Text("Using dataset prop with dataKey references — no data duplication.", size="sm", c="dimmed"), - BarChart( - id="mc-bar-dataset", - dataset=[ - {'month': 'Jan', 'london': 18, 'paris': 15, 'nyc': 12}, - {'month': 'Feb', 'london': 22, 'paris': 18, 'nyc': 15}, - {'month': 'Mar', 'london': 30, 'paris': 25, 'nyc': 22}, - {'month': 'Apr', 'london': 45, 'paris': 38, 'nyc': 35}, - {'month': 'May', 'london': 55, 'paris': 48, 'nyc': 45}, - {'month': 'Jun', 'london': 60, 'paris': 55, 'nyc': 52}, - ], - xAxis=[{'dataKey': 'month', 'scaleType': 'band'}], - series=[ - {'dataKey': 'london', 'label': 'London'}, - {'dataKey': 'paris', 'label': 'Paris'}, - {'dataKey': 'nyc', 'label': 'New York'}, - ], - height=350, - grid={'horizontal': True}, - ), - ], gap="sm"), - p="lg", radius="md", style=GLASS, - ), - - # --- Bar Labels --- - dmc.Paper( - dmc.Stack([ - dmc.Text("Bar Labels", fw=600), - dmc.Text("Display values directly on bars with center and outside placement.", size="sm", c="dimmed"), - BarChart( - id="mc-bar-labels", - series=[ - {'data': [4, 3, 5], 'barLabel': 'value', 'barLabelPlacement': 'outside', 'label': 'Outside'}, - {'data': [2, 5, 6], 'barLabel': 'value', 'barLabelPlacement': 'center', 'label': 'Center'}, - {'data': [3, 4, 2], 'label': 'No label'}, - ], - xAxis=[{'data': ['Group A', 'Group B', 'Group C'], 'scaleType': 'band'}], - height=300, - grid={'horizontal': True}, - ), - ], gap="sm"), - p="lg", radius="md", style=GLASS, - ), - - # --- Click Events --- - dmc.Paper( - dmc.Stack([ - dmc.Text("Click Events", fw=600), - dmc.Text("Click any bar to capture data via the clickData output prop.", size="sm", c="dimmed"), - BarChart( - id="mc-bar-click", - series=[ - {'data': revenue, 'label': 'Revenue', 'color': '#1976d2'}, - {'data': expenses, 'label': 'Expenses', 'color': '#f57c00'}, - ], - xAxis=[{'data': months, 'scaleType': 'band'}], - height=300, - grid={'horizontal': True}, - ), - dmc.Text("Click output:", size="xs", c="dimmed"), - html.Pre( - id="mc-bar-click-out", - children="Click a bar...", - style={ - "fontSize": "11px", "margin": 0, - "padding": "8px 12px", "borderRadius": "6px", - "background": "light-dark(#f8f9fa, #1a1b1e)", - "border": "1px solid light-dark(#dee2e6, #373a40)", - }, - ), - ], gap="sm"), - p="lg", radius="md", style=GLASS, - ), -], gap="lg") - - -@callback( - Output("mc-bar-click-out", "children"), - Input("mc-bar-click", "clickData"), - prevent_initial_call=True, -) -def show_click(data): - if not data: - return "Click a bar..." - return json.dumps(data, indent=2) diff --git a/.claude/support_files/dash_mantine_components/SKILLS.md b/.claude/support_files/dash_mantine_components/SKILLS.md deleted file mode 100644 index e54cc2d..0000000 --- a/.claude/support_files/dash_mantine_components/SKILLS.md +++ /dev/null @@ -1,127 +0,0 @@ -# dash-mantine-components — tips & tricks (project reference) - -Index + project-actionable distillation of the DMC docs excerpts in this folder. -These are patterns that **recur** in SailsBoard work — reach for the relevant file -when the situation below comes up, and apply the "use it here" hook. - -> **Version awareness.** The excerpts are from the **DMC v2.7.0** docs, built on -> **Mantine v8** — *"do not use Mantine v9 docs for API reference."* SailsBoard pins -> **`dash-mantine-components==2.4.0`** (`requirements.txt`). Function-props additions -> are versioned (v2.0 / v2.1 / v2.4 tables in `functions_as_props.md`); everything -> tagged **≤ v2.4.0 is available to us**, v2.7-only props are not until we bump DMC. -> When in doubt, check the prop exists on 2.4.0 before relying on it. - ---- - -## Index - -| file | covers | reach for it when… | -|---|---|---| -| `dash_4_components.md` | theming **Dash 4 core components** (`dcc.Dropdown`, `dcc.Slider`) to match the Mantine theme via CSS variables + dark mode | you mix a `dcc.*` component into a DMC form/grid and it looks off-theme or doesn't follow dark mode | -| `functions_as_props.md` | passing **JS function references** to DMC props (`{"function": "name"}` + `window.dashMantineFunctions`) — formatters, `renderOption`, chart `valueFormatter`, returning components | you need a chart `$`/unit formatter, a custom `Select` option, a slider label, or any prop Mantine expects as a function | -| `debounce_prop.md` | the **`debounce`** prop on DMC inputs (`True` / `False` / ``) + supported components | a search/filter input fires a callback on every keystroke, or you only want the final value on blur | -| `persistence_props.md` | DMC **persistence** (`persistence`, `persisted_props`, `persistence_type`) + the single-component-layout gotcha | you want an input value to survive reload/tab without a callback — **but mind the `storage_type` lesson (below)** | -| `dash_loading_states.md` | *(empty — 1 line, no content)* | — re-export from the DMC docs if loading-state guidance is wanted | - ---- - -## 1. Theming Dash 4 core components (`dash_4_components.md`) - -Dash 4 rewrote `dcc.*` with a new design system driven by `--Dash-*` CSS variables, -and **ships no built-in dark mode**. Map the `--Dash-*` vars to Mantine's scheme-aware -vars so `dcc.Dropdown`/`dcc.Slider` follow the harbor theme and flip on light/dark: - -```css -.dmc { - --Dash-Stroke-Strong: var(--mantine-color-default-border); - --Dash-Fill-Interactive-Strong: var(--mantine-primary-color-filled); - --Dash-Text-Primary: var(--mantine-color-text); - /* …full block in the file… */ -} -:root[data-mantine-color-scheme="dark"] .dmc { /* dark overrides */ } -``` -Wrap the subtree in `className="dmc"`. **Use it here:** anywhere we keep a `dcc.Dropdown` -/`dcc.Slider` for a feature DMC's `Select`/`Slider` lacks — ensure the host carries the -`.dmc` class and `assets/` has the var mapping, or it renders off-theme (and dark-mode -broken). Quick single-prop accent override: `style={"--Dash-Fill-Interactive-Strong": -"var(--mantine-primary-color-filled)"}`. Ties to `theme-guardian` (no fixed shades; adapt -via Mantine vars). - -## 2. Functions as props (`functions_as_props.md`) — **most useful for `/account`** - -Functions can't serialize over the wire, so DMC takes a **named reference** to a JS -function you define in `assets/*.js`: - -```python -dmc.LineChart(..., valueFormatter={"function": "formatUsd"}) -``` -```js -// assets/dmcfuncs.js -var dmcfuncs = window.dashMantineFunctions = window.dashMantineFunctions || {}; -dmcfuncs.formatUsd = (v) => `$${new Intl.NumberFormat("en-US",{minimumFractionDigits:2}).format(v)}`; -``` -Supported (≤ v2.4.0): `Slider.label/scale`, `Select/MultiSelect/TagsInput.renderOption/filter`, -`BarChart.getBarColor`, **all charts `.valueFormatter` / `.tooltipProps` / axis props**, -date pickers `disabledDates`/`renderDay`, `Tree.renderNode`. Can **return components** via -`React.createElement` (no JSX) using `window.dash_mantine_components`. - -**Use it here (Phase 2 `/account` dashboard):** the spend-over-time `LineChart` and the -by-model/by-kind `BarChart` need a **`$` `valueFormatter`** (raw AI cost) and a credits -formatter — this is the canonical use. Also handy for a `Select` that renders model/tool -options as `dmc.Badge` (harbor/brass/tidal/signal tokens). Note: `dash-mui-charts` (used on -`/admin/api-cost`) is a *different* lib with its own formatting — DMC charts + this pattern -are the lighter alternative when MUI Pro isn't needed. - -## 3. `debounce` (`debounce_prop.md`) - -`debounce=False` (default, every keystroke) · `True` (on blur) · `` (delay after last -keystroke). Supported on `TextInput`, `Textarea`, `NumberInput`, `Select`/`MultiSelect`/ -`Autocomplete`, all date/time pickers, `RichTextEditor`, etc. (`Slider`/`RangeSlider` use -`updatemode` instead). - -**Use it here:** any search/filter that triggers a server read — e.g. a `/account` ledger -**date-range / tool filter**, the userbase search, a shop search. Use `debounce=300`+ for -live-query inputs so we don't fire a callback per keystroke; `debounce=True` for "only the -final value matters" fields. Cheap win against callback storms. - -## 4. Persistence (`persistence_props.md`) — **respect the project's `storage` lesson** - -`persistence=True` + (optional) `persisted_props=[...]` + `persistence_type=` keeps an -input value across reload/tab without a callback. `id` is **required**. Gotcha: the layout -must be a **single component**, not a bare list (Dash issue #3147), or persistence silently -no-ops. - -> ⚠️ **Cross-link to a paid-for lesson.** `persistence_type` defaults to **`"local"`** -> (`window.localStorage`). CLAUDE.md's load-bearing lesson is that `local`/`session` -> storage registers a window-level `storage` event listener that fires on **stale -> localStorage writes from earlier deployments** — the cause of the color-scheme cascade -> flicker. So: it's fine to use `persistence=True` for an *input value* on a form, but -> **prefer `persistence_type="memory"`** for anything near MantineProvider/theme, and -> **never** reach for `local`/`session` casually. Same rule as `dcc.Store` (`storage_type`). - -**Use it here:** remembering a `/account` filter selection or a sprite-generator setting -*within a session* — use `persistence_type="memory"` (survives tab-switch, not reload) to -stay clear of the `storage`-event hazard. - -> **To persist a `dcc.Store` (not an input) safely — the cart is the canonical example.** -> DMC `persistence` is for INPUT components, not a `dcc.Store`. When you need a Store to -> survive a reload (e.g. `cart-store`), do NOT give it `storage_type="local"/"session"` -> (the booby-trap). Instead keep it `"memory"` and bridge clientside: a `clientside_callback` -> on `Input(store, "data")` writes `localStorage.setItem(key, JSON.stringify(data))`, and a -> small `assets/*.js` script rehydrates on load via `window.dash_clientside.set_props(store, -> {data})`. Version the key (`-v1`) so a stale shape is ignored. Shipped for the cart in -> v0.20.0: `assets/cart_persist.js` + the persist callback in `callbacks/commerce.py`. - ---- - -## How this maps to active work - -- **Phase 2 `/account` dashboard** → `functions_as_props.md` (chart `$` `valueFormatter`, - badge `renderOption`) + `debounce_prop.md` (ledger filters) are the direct hits. -- **Any `dcc.*` we keep** → `dash_4_components.md` (`.dmc` class + var mapping) so it - themes + dark-modes correctly. -- **Persistence anywhere** → `persistence_props.md` **+** the `storage_type` lesson — - default to `memory`. - -*Index created 2026-06-02. Source: DMC v2.7.0 docs excerpts (Mantine v8) the maintainer -dropped in this folder. `dash_loading_states.md` is currently empty — re-export if needed.* diff --git a/.claude/support_files/dash_mantine_components/dash_4_components.md b/.claude/support_files/dash_mantine_components/dash_4_components.md deleted file mode 100644 index cc9fa26..0000000 --- a/.claude/support_files/dash_mantine_components/dash_4_components.md +++ /dev/null @@ -1,139 +0,0 @@ - -> Dash Mantine Components v2.7.0 Documentation for Dash 4 Components -> See complete docs at https://www.dash-mantine-components.com/assets/llms.txt -> All relative links in this file should be resolved against https://www.dash-mantine-components.com -> Based on [Mantine v8](https://v8.mantine.dev/). Do not use Mantine v9 docs for API reference. - - - - -## Dash 4 Components -How to style Dash 4 Core Components with a Mantine theme -Category: Dash - -Dash 4 completely redesigned its core components for a consistent look and feel and added many new features. For a full -overview of what changed, see the [Dash 4 release post](https://community.plotly.com/t/dash-core-components-gets-a-design-driven-refresh-with-dash-4/96322). - -It's usually best to stick with DMC components for a consistent design and UI. But some new DCC components such as `dcc.Dropdown` -and the `dcc.Slider` include features you won’t find in DMC so you might want to mix them in. - -This section shows how to style Dash 4 components to match a Mantine theme in light and dark mode. - -### Dash 4 Accent Color - -The accent for Dash 4 components is controlled by a CSS variable so it's easy to change. The value can be any valid CSS color. - -This example changes the default purple color to your Mantine primary color: - -```python -style={ - "--Dash-Fill-Interactive-Strong": "var(--mantine-primary-color-filled)" -} -``` - - -### Dark Mode Support - -Dash 4 components do not include built-in dark mode support. You can enable light and dark mode by mapping Dash CSS -variables to Mantine theme variables. The following is the CSS used in these docs. - -Add the following CSS to `assets/`: - -```css -.dmc { - --Dash-Stroke-Strong: var(--mantine-color-default-border); - --Dash-Stroke-Weak: var(--mantine-color-disabled); - --Dash-Fill-Interactive-Strong: var(--mantine-primary-color-filled); - --Dash-Fill-Inverse-Strong: var(--mantine-color-body); - --Dash-Text-Primary: var(--mantine-color-text); - --Dash-Text-Strong: var(--mantine-color-text); - --Dash-Text-Disabled: var(--mantine-color-dimmed); - --Dash-Text-Weak: var(--mantine-color-dimmed); -} - -:root[data-mantine-color-scheme="dark"] .dmc { - --Dash-Fill-Inverse-Strong: var(--mantine-color-dark-6); - --Dash-Fill-Weak: rgba(255, 255, 255, 0.06); - --Dash-Fill-Primary-Hover: rgba(255, 255, 255, 0.08); - --Dash-Fill-Primary-Active: rgba(255, 255, 255, 0.12); - --Dash-Fill-Disabled: rgba(255, 255, 255, 0.15); -} -``` - -Wrap your app layout with `dmc` class: - -```python -app.layout = dmc.MantineProvider( - dmc.Container( - [...], - className="dmc" - ) -) -``` - -Dash 4 components inside this container will follow the Mantine color scheme and update automatically when the theme changes. - -> Toggle the theme switch in the header to see the examples below update between light and dark mode. - - - - - -### Example 1: dcc.Dropdown - -This example shows how a [dcc.Dropdown](https://dash.plotly.com/dash-core-components/dropdown) works well with other DMC inputs in grids or forms. - -For MultiSelect (set `multi=True`) the menu also includes Select all and Deselect all buttons. When multiple -items are selected, it displays a count of selected items, preventing the input from resizing as selections grow. - -The `dmc.InputWrapper` is used to add elements like `label`, `description`, and `error` to the `dcc.Dropdown`, -making it consistent with the other DMC inputs. The `htmlFor` prop links the label to the component for focus and accessibility. - -```python -import dash_mantine_components as dmc -from dash import dcc - -component = dmc.Card([ - dmc.SimpleGrid( - [ - dmc.InputWrapper( - dcc.Dropdown([f"option {i}" for i in range(100)], value=["option 1", "option 2", "option 3"], multi=True, id="dcc-dropdown"), - label="dcc.Dropdown", - htmlFor="dcc-dropdown" - ), - dmc.NumberInput( - label="dmc.NumberInput", - value=30712, - thousandSeparator=True, - prefix="$ ", - - ), - dmc.DatePickerInput(label="dmc.DatePickerInput", value="2025-12-05"), - ], - cols={"base": 1, "md": 3}, - ), - ], - withBorder=True, - shadow="sm", - radius="md", - className="dmc" # applies Mantine styles -) -``` -### Example 2: dcc.Slider - -The [dcc.Slider](https://dash.plotly.com/dash-core-components/slider) and `dcc.RangeSlider` includes optional numeric -input fields and automatic mark generation based on range and width. There is also an option for a vertical slider. - -This example shows the `dcc.RandeSlider` styled with a Mantine theme. - -```python -import dash_mantine_components as dmc -from dash import dcc - -component = dcc.RangeSlider(0, 200, value=[50, 150], className="dmc") -``` -### Migrating to Dash v4 - -All component props remain unchanged, so upgrading should not introduce errors. You may notice layout and style differences due to the redesign. - -Custom CSS written for Dash 3 components will not apply to Dash 4. The components were fully rewritten, so selectors have changed. Start with the styling approach shown here and customize as needed for your app. \ No newline at end of file diff --git a/.claude/support_files/dash_mantine_components/dash_loading_states.md b/.claude/support_files/dash_mantine_components/dash_loading_states.md deleted file mode 100644 index e69de29..0000000 diff --git a/.claude/support_files/dash_mantine_components/debounce_prop.md b/.claude/support_files/dash_mantine_components/debounce_prop.md deleted file mode 100644 index 2528de7..0000000 --- a/.claude/support_files/dash_mantine_components/debounce_prop.md +++ /dev/null @@ -1,161 +0,0 @@ - -> Dash Mantine Components v2.7.0 Documentation for debounce prop -> See complete docs at https://www.dash-mantine-components.com/assets/llms.txt -> All relative links in this file should be resolved against https://www.dash-mantine-components.com -> Based on [Mantine v8](https://v8.mantine.dev/). Do not use Mantine v9 docs for API reference. - - - - -## debounce prop -Learn how to use the debounce prop in Dash Mantine Components to control when input values update. Reduce callback load and improve performance in text inputs, dropdowns, pickers, and more. -Category: Dash - -### About the debounce prop - - -The `debounce` prop delays the update of a component's value until the user stops interacting, reducing callback -frequency for inputs. - - -To control how often the input's value is updated while the user is typing, use the `debounce` prop: - -- `debounce=False` Is the default and it will update as the user interacts with the input. -- Set `debounce=True` to update the value only when the user finishes typing and moves focus away (i.e. on blur). -- Set `debounce=` to update the value after a specified delay from the user's last keystroke. For example, -`debounce=300` will wait 300 milliseconds after the user stops typing before updating the value. - - -#### debounce=False -```python -import dash_mantine_components as dmc -from dash import callback, Input, Output - - -component = dmc.Group( - gap=50, - children=[ - dmc.TimePicker(label="Enter a time", id="timepicker-usage"), - dmc.Text(id="out-timepicker") - ], -) - -@callback( - Output("out-timepicker", "children"), - Input("timepicker-usage", "value") -) -def update(value): - return f"You entered: {value}" -``` -#### debounce=True -```python -import dash_mantine_components as dmc -from dash import callback, Input, Output - - -component = dmc.Group( - gap=50, - children=[ - dmc.TimePicker( - label="Enter a time", - debounce=True, - id="timepicker-debounce" - ), - dmc.Text(id="out-timepicker-debounce") - ], -) - -@callback( - Output("out-timepicker-debounce", "children"), - Input("timepicker-debounce", "value") -) -def update(value): - return f"You entered: {value}" -``` -#### debounce=1000 -```python -import dash_mantine_components as dmc -from dash import callback, Input, Output - - -component = dmc.Group( - gap=50, - children=[ - dmc.TimePicker( - label="Enter a time", - debounce=1000, - id="timepicker-debounce-ms" - ), - dmc.Text(id="out-timepicker-debounce-ms") - ], -) - -@callback( - Output("out-timepicker-debounce-ms", "children"), - Input("timepicker-debounce-ms", "value") -) -def update(value): - return f"You entered: {value}" -``` -### Example with TextInput - -This example uses `debounce=True`. Note that the comments are updated only after the user has -finished entering data. - -```python -import dash_mantine_components as dmc -from dash import callback, Input, Output - -component = dmc.Stack( - - [ - dmc.TextInput( - id="debounce-text", - label="Enter your comments", - debounce=True - ), - dmc.Text(id="debounce-text-output"), - ], -) - - -@callback( - Output("debounce-text-output", "children"), - Input("debounce-text", "value"), -) -def update_output(comments): - if not comments: - return "" - return f"Thank you for your feedback: {comments}" -``` -### Supported Components -The `debounce` prop is supported by many DMC input components, including: - -- TextInput - -- Textarea - -- NumberInput - -- PasswordInput - -- JsonInput - -- Select, MultiSelect, Autocomplete - -- DateInput, DateTimePicker, DatePickerInput - -- MonthPickerInput, YearPickerInput, TimeInput, TimePicker - -- RichTextEditor - - -For the `Slider` and `RangeSlider` use [updatemode](/components/slider#update-mode) - -### Usage Tips - -- Use `debounce=True` for forms where you only care about the final value after the user finishes typing, for example, email fields, names, comments. - -- Use `debounce=300` or higher for search boxes or filters that trigger live updates (for example, querying a table or filtering a plot). This prevents the app from firing a callback on every keystroke and keeps things responsive. - -- Combine with `n_submit` or `n_blur` if you want finer control over when inputs send updates. \ No newline at end of file diff --git a/.claude/support_files/dash_mantine_components/functions_as_props.md b/.claude/support_files/dash_mantine_components/functions_as_props.md deleted file mode 100644 index 7a446d6..0000000 --- a/.claude/support_files/dash_mantine_components/functions_as_props.md +++ /dev/null @@ -1,358 +0,0 @@ - -> Dash Mantine Components v2.7.0 Documentation for Functions as Props -> See complete docs at https://www.dash-mantine-components.com/assets/llms.txt -> All relative links in this file should be resolved against https://www.dash-mantine-components.com -> Based on [Mantine v8](https://v8.mantine.dev/). Do not use Mantine v9 docs for API reference. - - - - -## Functions as Props -Introduction to using JavaScript functions with Dash Mantine Components -Category: Dash - -### How Function Props Work - -In JavaScript libraries like [Mantine](https://v8.mantine.dev), some component props accept functions — for example, to -dynamically format a value, render custom content, or control behavior. Here is an example of formating the label of the `Slider` - -**In Mantine** -```js - `${value} °C`} /> -``` - -However, in a Dash app, you can’t pass a function to the component because functions don't serialize over the network. - -To support this safely, Dash Mantine Components allows you to pass named references to JavaScript functions instead. - -You write your function in a `.js` file in the `/assets` folder, and refer to it by name in Python: - -**app.py** -```python -dmc.Slider(label={"function": "celsiusLabel"}, value=40) -``` - -**assets/formatCelsius.js** -```js -var dmcfuncs = window.dashMantineFunctions = window.dashMantineFunctions || {}; - -dmcfuncs.celsiusLabel = function(value) { - return `${value} °C`; -}; -``` - -DMC knows how to call this function in the browser for props like `label`. - - -### Example: Formatting a Slider label - -See more examples in the [Slider section](/components/slider) section. - - -```python -import dash_mantine_components as dmc - -component = dmc.Slider(label={"function": "celsiusLabel"}, value=40, labelAlwaysOn=True) -``` - -```javascript - -var dmcfuncs = window.dashMantineFunctions = window.dashMantineFunctions || {}; - -dmcfuncs.celsiusLabel = (value) => `${value} °C`; -``` - - - -### Function Props in Mantine Components - -Not all Mantine props accept functions — only specific ones are designed to. - -Here are some examples: - -* `Slider`: `label` -* `Select`: `renderOption` -* `BarChart`: `getBarColor` -* `ScatterChart`: `valueFormat` - -For a full list of supported function props in Dash Mantine Components, see the table at the bottom of this page. - -Each function must match the structure expected by Mantine. To learn what arguments each one receives — and how they’re -used — refer to the [Mantine documentation](https://v8.mantine.dev). You’ll also find complete working examples in the relevant sections of the DMC docs. - - - - - - -### Passing Extra Options - -You can pass extra options from Python to customize how the JavaScript function behaves. - -In this example, the same function can be used to format the label using either Celsius or Fahrenheit. - -.py -```python -dmc.Slider( - label={ - "function": "formatTemperature", - "options": {"unit": "F"} - }, - # other props -) -``` - -.js -```js -var dmcfuncs = window.dashMantineFunctions = window.dashMantineFunctions || {}; - -dmcfuncs.formatTemperature = function (value, { unit }) { - if (unit === "F") { - return `${(value * 9 / 5 + 32).toFixed(1)} °F`; - } - return `${value.toFixed(1)} °C`; -}; -``` - -### Returning a Component - -Its also possible to return React components. To do this: - -- Use `React.createElement()` (no JSX). -- access DMC components by using `window.dash_mantine_components`. -- If you've imported other component libraries in your Dash app, you can use them too. For example `window.dash_iconify`, `window.dash_core_components`, etc. - -See examples of including icons in the dropdown data in the `Select` section of the docs. - -### Example: Components and passing extra options - -This example shows - - Returning a component. Note the dropdown data is formated as a `Badge`. - - Passing extra options to the JavaScript function. The colors for each badge are passed to the function from the dash app. - - -```python -import dash_mantine_components as dmc - - -colors = { - "Pandas": "grape", - "NumPy": "blue", - "Matplotlib": "teal", - "Plotly": "violet", -} - -component = dmc.Select( - label="Choose a library", - placeholder="Pick one", - data=list(colors.keys()), - renderOption={ - "function": "renderBadge", - "options": {"colors": colors}, - }, -) -``` - -```javascript -var dmcfuncs = window.dashMantineFunctions = window.dashMantineFunctions || {}; -var dmc = window.dash_mantine_components; - -dmcfuncs.renderBadge = function ({option}, {colors}) { - return React.createElement( - dmc.Badge, - { - color: colors[option.value] || "gray", - variant: "light", - radius: "sm", - }, - option.value - ); -}; -``` - - - - -### Using Other JavaScript Libraries -You can use third-party JavaScript libraries inside your Dash functions — as long as you include them correctly in your app. - -Here is an example of including the `dayjs` library as an external script: - -```python -app = Dash(exteral_scripts=["https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.10.8/dayjs.min.js"]) -``` - -.js -```json -var dmcfuncs = window.dashMantineFunctions = window.dashMantineFunctions || {}; - -dmcfuncs.excludeDate = function(dateStr) { - const date = dayjs(dateStr, "YYYY-MM-DD"); - return date.isValid() && date.day() !== 5; -} -``` - -### Use AI to Help Write JavaScript - -Most Dash users are more comfortable writing Python than JavaScript. You can use AI tools like ChatGPT to generate the -JavaScript functions needed for Dash Mantine Components. - -While it's possible to describe the logic in plain English, in practice, writing the function in Python and asking the -AI to translate it tends to produce more accurate and usable results. It gives the model a clear structure and avoids -ambiguity, especially for functions with conditions, formatting rules, or custom output. - -#### Prompt Template -When asking AI to generate a function: - -1. State the function name. -2. Mention it’s for Dash Mantine Components. -3. Ask it to assign the function to dmcfuncs.functionName. -4. Provide the Python logic (or natural language) -5. Always include this global header: - ``` - var dmcfuncs = window.dashMantineFunctions = window.dashMantineFunctions || {}; - ``` -6. If the function returns a component, mention: - - Use `React.createElement` - - Don’t use JSX - - Use `window.dash_mantine_components` - - -#### Example 1: Simple function - -AI Prompt: - -> Write a JavaScript function for Dash Mantine Components named `formatUsd`. Assign it to `dmcfuncs.formatUsd`. In Python, the function would be: -> -> ```python -> def formatUsd(value): - return f"${value:,.2f}" -> ``` - -AI Output: - -```js -var dmcfuncs = window.dashMantineFunctions = window.dashMantineFunctions || {}; - -dmcfuncs.formatUsd = function (value) { - return `$${new Intl.NumberFormat("en-US", { minimumFractionDigits: 2 }).format(value)}`; -}; -``` - - - -#### Example 2 Function with options - -AI Prompt: - -> Write a JavaScript function for Dash Mantine Components named `formatTemp`. Assign it to `dmcfuncs.formatTemp`. In Python, the function would be: -> ```python -> def formatTemp(value, unit="C"): -> if unit == "F": -> return f"{value * 9 / 5 + 32:.1f} °F" -> return f"{value:.1f} °C" ->``` - -AI Output: - -```js -var dmcfuncs = window.dashMantineFunctions = window.dashMantineFunctions || {}; - -dmcfuncs.formatTemp = function (value, { unit }) { - if (unit === "F") { - return `${(value * 9 / 5 + 32).toFixed(1)} °F`; - } - return `${value.toFixed(1)} °C`; -}; -``` - ---- - -#### Example 3: Return a Component - - -AI Prompt - -> Write a JavaScript function for Dash Mantine Components named `renderBadge`. Assign it to `dmcfuncs.renderBadge`. -> This function returns a React component. Use `React.createElement`. Do not use JSX. Use `dmc = window.dash_mantine_components`. -> In Python, the function would be: - -> ```python -> def renderBadge(option): -> return dmc.Badge( -> option["value"], -> color= "red" if option["value"] == "A" else "blue", -> variant="light", -> radius="sm" -> ) -> ``` - - -AI Output - -```js -var dmcfuncs = window.dashMantineFunctions = window.dashMantineFunctions || {}; -var dmc = window.dash_mantine_components; - -dmcfuncs.renderBadge = function ({ option }) { - return React.createElement( - dmc.Badge, - { - color: option.value === "A" ? "red" : "blue", - variant: "light", - radius: "sm" - }, - option.value - ); -}; - -``` - -Supported props in V2 - -The following props support JavaScript functions in Dash Mantine Components version >=2.0.0. -If there’s a Mantine prop you’d like to see added, feel free to [open an issue on GitHub.](https://github.com/snehilvj/dash-mantine-components/issues) - -| Component | Props | -|------------------|-------------------------------------------| -| Slider | label, scale | -| RangeSlider | label, scale | -| Select | renderOption, filter | -| MultiSelect | renderOption, filter | -| TagsInput | renderOption, filter | -| DatePickerInput | disabledDates | -| DateInput | disabledDates | -| DateTimePicker | disabledDates | -| MonthPickerInput | disabledDates | -| YearPickerInput | disabledDates | -| BarChart | getBarColor, valueFormatter, tooltipProps | -| AreaChart | valueFormatter, tooltipProps | -| LineChart | valueFormatter, tooltipProps | -| CompositeChart | valueFormatter, tooltipProps | -| BubbleChart | valueFormatter, tooltipProps | -| ScatterChart | valueFormatter, tooltipProps | - - - - - -Additional Supported props in V2.1.0 - - -| Component | Props | -|------------------|-------------------------------------------------------------------| -| AutoComplete | renderOption, filter | -| DatePickerInput | getYearControlProps, getMonthControlProps, getDayProps, renderDay | -| DateInput | getYearControlProps, getMonthControlProps, getDayProps, renderDay | -| DateTimePicker | getYearControlProps, getMonthControlProps, getDayProps, renderDay | -| MonthPickerInput | getYearControlProps, getMonthControlProps | -| YearPickerInput | getYearControlProps | -| Tree | renderNode | - - -Additional Supported props in V2.4.0 - -| Component | Props | -| ------------------------------------------------------------------------- | -------------------------------------------------- | -| AreaChart, BarChart, BubbleChart, CompositeChart, LineChart, ScatterChart | xAxisProps, yAxisProps, gridProps, rightYAxisProps | -| BubbleChart | zAxisProps | \ No newline at end of file diff --git a/.claude/support_files/dash_mantine_components/persistence_props.md b/.claude/support_files/dash_mantine_components/persistence_props.md deleted file mode 100644 index f5d8627..0000000 --- a/.claude/support_files/dash_mantine_components/persistence_props.md +++ /dev/null @@ -1,107 +0,0 @@ - -> Dash Mantine Components v2.7.0 Documentation for persistence props -> See complete docs at https://www.dash-mantine-components.com/assets/llms.txt -> All relative links in this file should be resolved against https://www.dash-mantine-components.com -> Based on [Mantine v8](https://v8.mantine.dev/). Do not use Mantine v9 docs for API reference. - - - - -## persistence props -Dash Mantine Components support Dash’s built-in persistence system, allowing component values to be retained across page reloads, tabs, or user sessions — without writing extra callbacks. -Category: Dash - -### Overview: Persistence in Dash - -When a user interacts with a component (like typing in a `TextInput` or selecting a `Date`), its value is -stored in local memory (or optionally, in localStorage or sessionStorage). If the user refreshes the page, navigates -away and returns, or reopens the tab, that value can be restored automatically. - -This helps maintain app state with minimal effort. - -### How to Enable Persistence - -You can enable persistence on any supported component by setting these props: - -```python -persistence=True -persisted_props=["value"] # or other prop(s) to persist. Typically use the default. -persistence_type="local" # "local", "session", or "memory" (default is "local") -id="component-id" # required for persistence to work -``` - -### Example: Persistent TextInput -Try typing something in each box, then refresh the browser to see which one remembers your input. - -```python -import dash_mantine_components as dmc - -component = dmc.Stack( - [ - dmc.TextInput( - id="persisted-input", # id required- persistence only works on components with an id - label="With persistence", - placeholder="This will stick", - persistence=True, - ), - dmc.TextInput( - id="non-persisted-input", - label="Without persistence", - placeholder="This will reset", - ), - ], -) -``` -### Important Notes - -* In DMC, the `persisted_prop` is already set with an appropriate default for each component, so you don’t need to specify it. -* An `id` is required — persistence will not work without one. -* Due to [an open issue in Dash](https://github.com/plotly/dash/issues/3147), persistence does not work if your layout is simply a list of components. The layout must be a single component (or a function returning one). - -This **does work**: - -```python -app.layout = dmc.MantineProvider( - dmc.Container([ - dmc.Select(id="select", data=["A", "B", "C"], persistence=True) - ]) -) -``` - -This **will not work**: - -```python -app.layout = dmc.MantineProvider( - [ - dmc.Select(id="select", data=["A", "B", "C"], persistence=True) - ] -) -``` - -### Supported DMC Components - -Persistence is available for all stateful inputs in DMC — including: - -* `TextInput`, `Textarea`, `PasswordInput`, `NumberInput` -* `Select`, `MultiSelect`, `TagsInput` -* `Checkbox`, `RadioGroup`, `Switch` -* `DateInput`, `DateTimePicker`, `TimeInput`, etc. - -To check if a specific component supports persistence, look for the `persistence`, `persisted_props`, and -`persistence_type` props in the Keyword Arguments section of its documentation. - - - -### Reference - -For more details see the [Persistence section in the Dash documentation.](https://dash.plotly.com/persistence) - -- `persistence` (boolean | string | number; optional): Any truthy value will enable persistence for this component. Persistence is keyed to the combination of component id and this persistence value, so if this value changes you will see different persisted settings. For example, perhaps you have dropdowns for country and city, and you know that your users want to see the same country pre-filled as the last time they used your app - you can just set persistence=True on the country dropdown. But for the city they would like to see the same one as the last time they chose that country - just set persistence=country_name (where country_name is the value of the chosen country) on the city dropdown and we'll save one preferred city for each country. - -- `persistence_type` ('local', 'session', or 'memory'; default 'local'): Where persisted user changes will be stored: - - - `memory`: only kept in memory, reset on page refresh. This is useful for example if you have a tabbed app, that deletes the component when a different tab is active, and you want changes persisted as you switch tabs but not after reloading the app. - - `local`: uses window.localStorage. This is the default, and keeps the data indefinitely within that browser on that computer. - - `session`: uses window.sessionStorage. Like 'local' the data is kept when you reload the page, but cleared when you close the browser or open the app in a new browser tab. - -- `persistence_props` (list of strings; optional): These are the props whose values will persist. Typically this defaults to all user-editable props, which in many cases is just one (ie 'value'). dash-table has many props users can edit, and all of them except 'data' are included here by default. Sometimes only a part of a prop is saved; this happens with table headers, which are only part of the columns prop. The corresponding persistence_props value is 'columns.name'. \ No newline at end of file diff --git a/.claude/support_files/tree/API_REFERENCE.md b/.claude/support_files/tree/API_REFERENCE.md deleted file mode 100644 index ced72f6..0000000 --- a/.claude/support_files/tree/API_REFERENCE.md +++ /dev/null @@ -1,193 +0,0 @@ -# MUI X Tree View — Complete API Reference for Implementation - -This file contains the exhaustive prop/slot/CSS-class surface extracted from the official MUI X documentation. Use this as the source-of-truth when implementing the Dash wrappers. - ---- - -## RichTreeView Props (Community) - -Source: `@mui/x-tree-view/RichTreeView` - -| Prop | Type | Default | Description | -|---|---|---|---| -| `apiRef` | object | - | Ref for imperative API. Methods: `focusItem`, `getItem`, `getItemDOMElement`, `getItemOrderedChildrenIds`, `getItemTree`, `getParentId`, `isItemExpanded`, `setEditedItem`, `setIsItemDisabled`, `setItemExpansion`, `setItemSelection`, `updateItemLabel` | -| `checkboxSelection` | bool | `false` | Render checkbox at left of label | -| `classes` | object | - | CSS class overrides | -| `defaultExpandedItems` | string[] | `[]` | Uncontrolled expanded items | -| `defaultSelectedItems` | string \| string[] | `[]` | Uncontrolled selected items | -| `disabledItemsFocusable` | bool | `false` | Allow focus on disabled items | -| `disableSelection` | bool | `false` | Disable all selection | -| `expandedItems` | string[] | - | Controlled expanded items | -| `expansionTrigger` | `'content'` \| `'iconContainer'` | `'content'` | What triggers expansion | -| `getItemChildren` | `(item) => item[]` | `(item) => item.children` | Extract children from item | -| `getItemId` | `(item) => string` | `(item) => item.id` | Extract ID from item | -| `getItemLabel` | `(item) => string` | `(item) => item.label` | Extract label from item | -| `id` | string | - | Accessibility ID | -| `isItemDisabled` | `(item) => bool` | - | Per-item disabled check | -| `isItemEditable` | `(item) => bool` \| bool | `() => false` | Per-item editable check | -| `isItemSelectionDisabled` | `(item) => bool` | - | Per-item selection disabled check | -| `itemChildrenIndentation` | number \| string | `'12px'` | Horizontal indent | -| `items` | object[] | **required** | The data items array | -| `multiSelect` | bool | `false` | Enable multi-select | -| `onExpandedItemsChange` | `(event, itemIds) => void` | - | Fired on expand/collapse | -| `onItemClick` | `(event, itemId) => void` | - | Fired on content click | -| `onItemExpansionToggle` | `(event, itemId, isExpanded) => void` | - | Fired per-item expansion toggle | -| `onItemFocus` | `(event, itemId) => void` | - | Fired on item focus | -| `onItemLabelChange` | `(itemId, newLabel) => void` | - | Fired after label edit | -| `onItemSelectionToggle` | `(event, itemId, isSelected) => void` | - | Fired per-item selection toggle | -| `onSelectedItemsChange` | `(event, itemIds) => void` | - | Fired on selection change | -| `selectedItems` | string \| string[] | - | Controlled selection | -| `selectionPropagation` | `{descendants?: bool, parents?: bool}` | `{parents: false, descendants: false}` | Auto-propagate selection | -| `slotProps` | object | `{}` | Props for component slots | -| `slots` | object | `{}` | Overridable component slots | -| `sx` | object | - | MUI sx styling | - -### RichTreeView Slots - -| Slot | Class | Default | Description | -|---|---|---|---| -| `root` | `.MuiRichTreeView-root` | `RichTreeViewRoot` | Root element | -| `collapseIcon` | - | - | Icon to collapse | -| `expandIcon` | - | - | Icon to expand | -| `endIcon` | - | - | Icon for leaf nodes | -| `item` | `.MuiRichTreeView-item` | `TreeItem` | Item component | - -### RichTreeView CSS Classes - -| Class | Description | -|---|---| -| `.MuiRichTreeView-itemCheckbox` | Checkbox element | -| `.MuiRichTreeView-itemContent` | Content element | -| `.MuiRichTreeView-itemGroupTransition` | Transition element | -| `.MuiRichTreeView-itemIconContainer` | Icon container | -| `.MuiRichTreeView-itemLabel` | Label element | -| `.MuiRichTreeView-itemLabelInput` | Label input (editing) | - ---- - -## RichTreeViewPro Props (Pro) - -Source: `@mui/x-tree-view-pro/RichTreeViewPro` - -**Inherits all RichTreeView props, plus:** - -| Prop | Type | Default | Description | -|---|---|---|---| -| `canMoveItemToNewPosition` | `({itemId, oldPosition, newPosition}) => bool` | - | Validate reorder moves | -| `dataSource` | `{getChildrenCount: func, getTreeItems: func}` | - | Lazy loading data source | -| `dataSourceCache` | `{clear, get, set}` | - | Cache for lazy loading | -| `isItemReorderable` | `(itemId) => bool` | `() => true` | Per-item reorder check | -| `itemsReordering` | bool | `false` | Enable drag-and-drop | -| `onItemPositionChange` | `({itemId, oldPosition, newPosition}) => void` | - | Fired after reorder | - -**Additional apiRef methods:** `updateItemChildren` - -### RichTreeViewPro Additional CSS Classes - -| Class | Description | -|---|---| -| `.MuiRichTreeViewPro-itemDragAndDropOverlay` | DnD overlay | -| `.MuiRichTreeViewPro-itemErrorIcon` | Error icon (lazy load) | -| `.MuiRichTreeViewPro-itemLoadingIcon` | Loading icon (lazy load) | - ---- - -## SimpleTreeView Props (Community) - -Source: `@mui/x-tree-view/SimpleTreeView` - -Same as RichTreeView but **without**: `items`, `getItemId`, `getItemLabel`, `getItemChildren`, `isItemDisabled`, `isItemEditable`, `isItemSelectionDisabled`, `selectionPropagation`. - -Items are passed as `` JSX children instead. - ---- - -## TreeItem Props - -Source: `@mui/x-tree-view/TreeItem` - -| Prop | Type | Default | Description | -|---|---|---|---| -| `itemId`* | string | - | Unique item identifier | -| `children` | any | - | Nested TreeItem children | -| `classes` | object | - | CSS overrides | -| `disabled` | bool | `false` | Disable this item | -| `disableSelection` | bool | `false` | Disable selection for this item | -| `id` | string | - | DOM id attribute | -| `label` | node | - | Item label content | -| `onBlur` | func | - | Blur callback | -| `onKeyDown` | func | - | Keydown callback | -| `slotProps` | object | `{}` | Slot props | -| `slots` | object | `{}` | Overridable slots | -| `sx` | object | - | MUI sx styling | - -### TreeItem Slots - -| Slot | Class | Default | Description | -|---|---|---|---| -| `root` | `.MuiTreeItem-root` | `TreeItemRoot` | Root element | -| `content` | `.MuiTreeItem-content` | `TreeItemContent` | Content wrapper | -| `groupTransition` | `.MuiTreeItem-groupTransition` | `TreeItemGroupTransition` | Children container | -| `iconContainer` | `.MuiTreeItem-iconContainer` | `TreeItemIconContainer` | Icon wrapper | -| `checkbox` | `.MuiTreeItem-checkbox` | `TreeItemCheckbox` | Selection checkbox | -| `label` | `.MuiTreeItem-label` | `TreeItemLabel` | Label element | -| `labelInput` | `.MuiTreeItem-labelInput` | `TreeItemLabelInput` | Edit input | -| `dragAndDropOverlay` | `.MuiTreeItem-dragAndDropOverlay` | `TreeItemDragAndDropOverlay` | DnD overlay (Pro only) | -| `errorIcon` | `.MuiTreeItem-errorIcon` | `TreeItemErrorContainer` | Error state (Pro lazy) | -| `loadingIcon` | `.MuiTreeItem-loadingIcon` | `TreeItemLoadingContainer` | Loading state (Pro lazy) | -| `collapseIcon` | - | - | Collapse icon | -| `expandIcon` | - | - | Expand icon | -| `endIcon` | - | - | Leaf icon | -| `icon` | - | - | Item icon | - -### TreeItem CSS State Classes - -| Class | Attribute | Description | -|---|---|---| -| `.Mui-disabled` | `data-disabled` | Disabled state | -| `.Mui-expanded` | `data-expanded` | Expanded state | -| `.Mui-focused` | `data-focused` | Focused state | -| `.Mui-selected` | `data-selected` | Selected state | -| `.MuiTreeItem-editable` | `data-editable` | Editable state | -| `.MuiTreeItem-editing` | `data-editing` | Currently editing | - ---- - -## Feature Matrix - -| Feature | SimpleTreeView | RichTreeView | RichTreeViewPro | -|---|---|---|---| -| Static items (JSX) | ✅ | ❌ | ❌ | -| Data-driven items | ❌ | ✅ | ✅ | -| Selection (single/multi) | ✅ | ✅ | ✅ | -| Checkbox selection | ✅ | ✅ | ✅ | -| Selection propagation | Limited¹ | ✅ | ✅ | -| Expansion (controlled) | ✅ | ✅ | ✅ | -| Expansion trigger config | ✅ | ✅ | ✅ | -| Item disabled | ✅ | ✅ | ✅ | -| Focus management | ✅ | ✅ | ✅ | -| Keyboard navigation | ✅ | ✅ | ✅ | -| Label editing | ❌ | ✅ | ✅ | -| Custom icons | ✅ | ✅ | ✅ | -| Item indentation | ✅ | ✅ | ✅ | -| Imperative API | ❌ | ✅ | ✅ | -| Drag-and-drop ordering | ❌ | ❌ | ✅ | -| Lazy loading (dataSource) | ❌ | ❌ | ✅ | -| Virtualization | ❌ | ❌ | ✅ (v9) | -| Custom item rendering | Via slots | Via slots | Via slots | - -¹ SimpleTreeView only considers expanded items for propagation. - ---- - -## Accessibility (WAI-ARIA) - -All Tree View components follow the WAI-ARIA tree view pattern: -- `role="tree"` on the root -- `role="treeitem"` on each item -- `aria-expanded` on expandable items -- `aria-selected` on selectable items -- Keyboard: Arrow keys for navigation, Enter to expand/select, Space for selection, Home/End for first/last, `*` to expand all siblings -- Type-ahead: typing a character focuses the next item starting with that character - -The Dash wrapper MUST pass `aria-label` or `aria-labelledby` to the root component. Expose this as a Dash prop. diff --git a/.claude/support_files/tree/CLAUDE_CODE_INSTRUCTIONS.md b/.claude/support_files/tree/CLAUDE_CODE_INSTRUCTIONS.md deleted file mode 100644 index f72a4b9..0000000 --- a/.claude/support_files/tree/CLAUDE_CODE_INSTRUCTIONS.md +++ /dev/null @@ -1,145 +0,0 @@ -# Claude Code — Tree View Implementation Instructions - -## Context - -You are implementing MUI X Tree View components within the `dash-mui-charts` Dash component library. The project already has chart components (LineChart, PieChart, ScatterChart, etc.) — follow the same patterns. - -## Files Provided - -- `IMPLEMENTATION_PLAN.md` — Full architecture, phases, prop mappings, callback patterns -- `API_REFERENCE.md` — Exhaustive MUI X Tree View API surface (props, slots, CSS classes) -- `stubs/TreeView.react.js` — Near-complete React stub for RichTreeView wrapper -- `stubs/TreeViewPro.react.js` — Near-complete React stub for RichTreeViewPro wrapper -- `stubs/SimpleTreeView.react.js` — React stub for SimpleTreeView wrapper -- `stubs/fragments/iconResolver.js` — Icon name → MUI component resolver - -## Execution Steps - -### 1. Check existing project structure -```bash -ls src/lib/components/ # See existing chart component files -cat package.json # Check existing MUI dependencies -cat src/lib/index.js # See how components are exported -cat dash_mui_charts/__init__.py # See Python exports -``` - -### 2. Install new dependencies -```bash -npm install @mui/x-tree-view @mui/x-tree-view-pro @mui/icons-material -``` - -Note: Check if `@mui/material`, `@emotion/react`, `@emotion/styled` are already installed. If not, install them too. Also check version compatibility — the tree view v9 requires MUI v6+, v8 works with MUI v5+. - -### 3. Copy stub files into project -- Copy `TreeView.react.js` → `src/lib/components/TreeView.react.js` -- Copy `TreeViewPro.react.js` → `src/lib/components/TreeViewPro.react.js` -- Copy `SimpleTreeView.react.js` → `src/lib/components/SimpleTreeView.react.js` -- Copy `fragments/iconResolver.js` → `src/lib/components/fragments/iconResolver.js` - -### 4. Complete the stubs - -The stubs are ~80% complete. Key items to finish: - -**TreeView.react.js:** -- Verify the MUI import paths match the installed version -- Test that `getItemId`/`getItemLabel`/`getItemChildren` string→function conversion works -- Add `isItemSelectionDisabled` support (list of item IDs, same pattern as `disabledItems`) -- Ensure the license key is NOT needed for this component (it's Community) - -**TreeViewPro.react.js:** -- Implement the lazy loading bridge: - 1. Maintain internal state `mergedItems` that starts as `props.items` - 2. On expansion of a node where `getItemChildren(item)` is empty/null, fire `setProps({lazyLoadRequest: {itemId, event_timestamp}})` - 3. When `props.lazyLoadedChildren` changes, deep-merge the new children into `mergedItems` - 4. Pass `mergedItems` to `RichTreeViewPro` instead of `props.items` -- Add license key activation (look at how existing Pro chart components like Heatmap do it — likely `import { LicenseInfo } from '@mui/x-license'` + `LicenseInfo.setLicenseKey(key)`) -- Wire `canMoveItemToNewPosition` if you want to expose it (optional for v1) - -**SimpleTreeView.react.js:** -- Verify the recursive `renderItems` function handles edge cases (empty arrays, undefined children) -- Add `onItemFocus` callback - -**iconResolver.js:** -- Expand with more icons as needed -- Consider whether to use dynamic imports for tree-shaking - -### 5. Register components - -**`src/lib/index.js`:** -```js -export {default as TreeView} from './components/TreeView.react'; -export {default as TreeViewPro} from './components/TreeViewPro.react'; -export {default as SimpleTreeView} from './components/SimpleTreeView.react'; -``` - -### 6. Build -```bash -npm run build -``` -This generates the Python class files in `dash_mui_charts/`. - -### 7. Verify Python classes -```bash -cat dash_mui_charts/TreeView.py -cat dash_mui_charts/TreeViewPro.py -cat dash_mui_charts/SimpleTreeView.py -``` - -### 8. Update `__init__.py` -Add the new components to the `__all__` list and imports. - -### 9. Write usage tests -Create `usage_tree.py`: -```python -import dash -from dash import html, callback, Input, Output -from dash_mui_charts import TreeView - -app = dash.Dash(__name__) -app.layout = html.Div([ - TreeView( - id="test-tree", - items=[ - {"id": "1", "label": "Node 1", "children": [ - {"id": "1.1", "label": "Child 1.1"}, - {"id": "1.2", "label": "Child 1.2"}, - ]}, - {"id": "2", "label": "Node 2"}, - ], - defaultExpandedItems=["1"], - multiSelect=True, - checkboxSelection=True, - ), - html.Pre(id="output"), -]) - -@callback(Output("output", "children"), Input("test-tree", "selectedItems")) -def show(sel): - return str(sel) - -if __name__ == "__main__": - app.run(debug=True) -``` - -### 10. Write docs -Create documentation files following the existing pattern in `docs/dash_mui_charts/`: -- `tree_basic.py` — Basic usage, items, expansion, selection -- `tree_selection.py` — Multi-select, checkbox, propagation -- `tree_editing.py` — Label editing, callbacks -- `tree_pro.py` — Pro features: ordering, lazy load - -## Key Gotchas - -1. **MUI version compatibility**: Tree View v9 (latest) may require MUI v6. Check `package.json` for what version of `@mui/material` is already installed. If it's v5, use `@mui/x-tree-view@^7` or `@mui/x-tree-view@^8`. - -2. **Emotion/styled-components**: The project likely uses Emotion already for charts. Make sure there's no conflict. - -3. **Bundle size**: `@mui/icons-material` is large. Only import the specific icons used in `iconResolver.js`. Do NOT import the entire package. - -4. **Controlled vs uncontrolled**: Both `selectedItems` and `expandedItems` work as both input AND output props in Dash. When Dash sends a new value, it's controlled input. When the user interacts, the callback fires `setProps` to update the value as output. This is the standard Dash pattern. - -5. **License key**: Follow the exact same pattern used by the existing Pro chart components (Heatmap, LineChart zoom/brush). Look at how `licenseKey` is consumed there. - -6. **`selectionPropagation` only works with `multiSelect=true`**: Document this clearly. - -7. **Virtualization (v9+)**: Requires the parent to have explicit height/width. The `height` prop on the Dash component sets this on the wrapper div. diff --git a/.claude/support_files/tree/IMPLEMENTATION_PLAN.md b/.claude/support_files/tree/IMPLEMENTATION_PLAN.md deleted file mode 100644 index e09f311..0000000 --- a/.claude/support_files/tree/IMPLEMENTATION_PLAN.md +++ /dev/null @@ -1,370 +0,0 @@ -# MUI X Tree View — Dash Integration Plan - -## Overview - -Extend `dash-mui-charts` to include MUI X Tree View components, following the same patterns used for chart components (license key gating, output props for Dash callbacks, controlled/uncontrolled state). - -The MUI X Tree View has **three component tiers**: - -| Component | Package | License | Key Features | -|---|---|---|---| -| `SimpleTreeView` | `@mui/x-tree-view` | Community (Free) | JSX children-based, hardcoded items | -| `RichTreeView` | `@mui/x-tree-view` | Community (Free) | Data-driven items, label editing, selection propagation | -| `RichTreeViewPro` | `@mui/x-tree-view-pro` | Pro | Drag-and-drop ordering, lazy loading, virtualization, dataSource | - ---- - -## Phase 1: `RichTreeView` (Community — Free) - -This is the primary component. Data-driven, supports all core features, and maps cleanly to Dash's prop-driven model. - -### Dash Component: `TreeView` - -**File:** `src/lib/components/TreeView.react.js` - -#### Props → MUI Mapping - -**Data Props (Input):** - -| Dash Prop | Type | MUI Prop | Notes | -|---|---|---|---| -| `id` | string | `id` | Standard Dash id | -| `items` | list[dict] | `items` | Array of `{id, label, children?, ...custom}` | -| `getItemId` | string | `getItemId` | Property name to use as id (default: `"id"`) — converted to function in JS | -| `getItemLabel` | string | `getItemLabel` | Property name for label (default: `"label"`) — converted to function in JS | -| `getItemChildren` | string | `getItemChildren` | Property name for children (default: `"children"`) — converted to function in JS | - -**Selection Props:** - -| Dash Prop | Type | MUI Prop | Notes | -|---|---|---|---| -| `selectedItems` | string \| list[string] | `selectedItems` | Controlled selection | -| `defaultSelectedItems` | string \| list[string] | `defaultSelectedItems` | Uncontrolled default | -| `multiSelect` | bool | `multiSelect` | Enable multi-select (default: `false`) | -| `checkboxSelection` | bool | `checkboxSelection` | Render checkboxes (default: `false`) | -| `disableSelection` | bool | `disableSelection` | Disable all selection | -| `selectionPropagation` | dict | `selectionPropagation` | `{parents: bool, descendants: bool}` | - -**Expansion Props:** - -| Dash Prop | Type | MUI Prop | Notes | -|---|---|---|---| -| `expandedItems` | list[string] | `expandedItems` | Controlled expansion | -| `defaultExpandedItems` | list[string] | `defaultExpandedItems` | Uncontrolled default | -| `expansionTrigger` | string | `expansionTrigger` | `"content"` or `"iconContainer"` | - -**Editing Props:** - -| Dash Prop | Type | MUI Prop | Notes | -|---|---|---|---| -| `isItemEditable` | bool | `isItemEditable` | Enable editing on all items | -| `editableItems` | list[string] | — | Custom: list of item IDs that are editable (converted to function in JS) | - -**Disabled Props:** - -| Dash Prop | Type | MUI Prop | Notes | -|---|---|---|---| -| `disabledItems` | list[string] | — | Custom: list of disabled item IDs (converted to `isItemDisabled` function) | -| `disabledItemsFocusable` | bool | `disabledItemsFocusable` | Allow focusing disabled items | - -**Appearance Props:** - -| Dash Prop | Type | MUI Prop | Notes | -|---|---|---|---| -| `itemChildrenIndentation` | number \| string | `itemChildrenIndentation` | e.g. `24`, `"24px"`, `"2rem"` | -| `height` | number | — | CSS height on wrapper | -| `sx` | dict | `sx` | MUI sx styling object | - -**Slot/Icon Props:** - -| Dash Prop | Type | MUI Prop | Notes | -|---|---|---|---| -| `collapseIcon` | string | `slots.collapseIcon` | Icon name string → resolved in JS | -| `expandIcon` | string | `slots.expandIcon` | Icon name string → resolved in JS | -| `endIcon` | string | `slots.endIcon` | Icon name string → resolved in JS | - -**Output Props (for Dash callbacks):** - -| Dash Prop | Type | Fires On | Notes | -|---|---|---|---| -| `selectedItems` | string \| list[string] | Selection change | Controlled + output | -| `expandedItems` | list[string] | Expansion change | Controlled + output | -| `clickedItem` | dict | Item click | `{itemId, event_timestamp}` | -| `focusedItem` | dict | Item focus | `{itemId, event_timestamp}` | -| `editedItemLabel` | dict | Label edit complete | `{itemId, newLabel, event_timestamp}` | - ---- - -## Phase 2: `RichTreeViewPro` (Pro — License Key) - -### Dash Component: `TreeViewPro` - -**File:** `src/lib/components/TreeViewPro.react.js` - -Inherits ALL props from `TreeView` plus: - -**Pro-Only Props:** - -| Dash Prop | Type | MUI Prop | Notes | -|---|---|---|---| -| `licenseKey` | string | — | MUI Pro license key | -| `itemsReordering` | bool | `itemsReordering` | Enable drag-and-drop reordering | -| `reorderableItems` | list[string] | — | Custom: item IDs that can be reordered (→ `isItemReorderable`) | - -**Pro Output Props:** - -| Dash Prop | Type | Fires On | Notes | -|---|---|---|---| -| `itemPositionChanged` | dict | After reorder | `{itemId, oldPosition: {parentId, index}, newPosition: {parentId, index}}` | - -**Lazy Loading Props (Pro):** - -| Dash Prop | Type | MUI Prop | Notes | -|---|---|---|---| -| `lazyLoading` | bool | — | If true, enables dataSource mode | -| `lazyLoadedChildren` | dict | — | Dash-managed: `{parentItemId: [children]}` — written by callbacks | - -> **Note on lazy loading:** MUI's `dataSource` API expects async JS functions. For Dash, we implement a pattern where: expanding an unloaded node fires an output prop `lazyLoadRequest` with the parent item ID, a Dash callback responds by updating `lazyLoadedChildren`, and the JS component merges the children into the tree. This is the same pattern used for server-side callbacks in DataTable. - -**Lazy Loading Output Props:** - -| Dash Prop | Type | Fires On | Notes | -|---|---|---|---| -| `lazyLoadRequest` | dict | Expand unloaded node | `{itemId, event_timestamp}` | - ---- - -## Phase 3: `SimpleTreeView` (Community — Free) - -### Dash Component: `SimpleTreeView` - -**File:** `src/lib/components/SimpleTreeView.react.js` - -This component uses JSX children (`TreeItem`). For Dash, we convert a flat/nested data structure into TreeItem children internally — the user passes data, not JSX. - -**Props:** Same selection/expansion/focus/disabled props as `TreeView`, but `items` uses a simpler structure since it maps to `` children: - -```python -items=[ - {"itemId": "1", "label": "Parent", "children": [ - {"itemId": "1.1", "label": "Child"}, - ]}, -] -``` - -The `itemId` and `label` props map directly to ``. - -**Additional TreeItem-level props exposed per item:** - -| Per-Item Field | Type | Maps To | -|---|---|---| -| `disabled` | bool | `` | -| `disableSelection` | bool | `` | - ---- - -## File Structure - -``` -src/lib/components/ -├── TreeView.react.js # RichTreeView wrapper (Community) -├── TreeViewPro.react.js # RichTreeViewPro wrapper (Pro) -├── SimpleTreeView.react.js # SimpleTreeView wrapper (Community) -├── fragments/ -│ ├── TreeViewBase.js # Shared logic (selection, expansion, focus, callbacks) -│ ├── TreeItemRenderer.js # Recursive TreeItem renderer for SimpleTreeView -│ └── iconResolver.js # Maps icon name strings to MUI icons -``` - -``` -dash_mui_charts/ -├── TreeView.py # Auto-generated Python class -├── TreeViewPro.py # Auto-generated Python class -├── SimpleTreeView.py # Auto-generated Python class -``` - -``` -docs/dash_mui_charts/ -├── tree_basic.py # Basic RichTreeView demo -├── tree_selection.py # Selection modes demo -├── tree_editing.py # Label editing demo -├── tree_pro.py # Pro features (ordering, lazy load) -``` - ---- - -## npm Dependencies - -Add to `package.json`: - -```json -{ - "dependencies": { - "@mui/x-tree-view": "^7.x || ^8.x || ^9.x", - "@mui/x-tree-view-pro": "^7.x || ^8.x || ^9.x", - "@mui/material": "^5.x || ^6.x", - "@emotion/react": "^11.x", - "@emotion/styled": "^11.x" - } -} -``` - -Check the existing `package.json` — `@mui/material` and `@emotion/*` are likely already present from the chart components. The tree-view packages are the new additions. - ---- - -## Implementation Order - -### Step 1 — Scaffold & Shared Logic -1. Create `fragments/TreeViewBase.js` with shared prop-to-MUI conversion utilities -2. Create `fragments/iconResolver.js` for icon string → component mapping -3. Add npm dependencies - -### Step 2 — `TreeView` (RichTreeView Community) -1. Create `TreeView.react.js` with full prop surface -2. Wire selection (controlled + output), expansion (controlled + output), click, focus callbacks -3. Wire label editing with `editedItemLabel` output prop -4. Add `isItemDisabled` / `isItemEditable` function conversion from list props -5. Run `npm run build` to generate Python class -6. Write `tree_basic.py` and `tree_selection.py` docs - -### Step 3 — `SimpleTreeView` -1. Create `SimpleTreeView.react.js` -2. Create `fragments/TreeItemRenderer.js` for recursive `` rendering from items data -3. Wire same selection/expansion/focus outputs -4. Build + test - -### Step 4 — `TreeViewPro` (Pro) -1. Create `TreeViewPro.react.js` extending TreeView logic -2. Add license key gating (same pattern as chart Pro components) -3. Wire `itemsReordering`, `onItemPositionChange` → `itemPositionChanged` output -4. Implement lazy loading bridge pattern (`lazyLoadRequest` output → `lazyLoadedChildren` input) -5. Write `tree_pro.py` docs - -### Step 5 — Polish & Docs -1. Update `llms.txt` with TreeView component documentation -2. Add TreeView to the main `__init__.py` exports -3. Write comprehensive property tables in docs -4. Bump version - ---- - -## Callback Patterns (Python Usage Examples) - -### Basic TreeView - -```python -from dash_mui_charts import TreeView - -TreeView( - id="my-tree", - items=[ - {"id": "grid", "label": "Data Grid", "children": [ - {"id": "grid-com", "label": "@mui/x-data-grid"}, - {"id": "grid-pro", "label": "@mui/x-data-grid-pro"}, - ]}, - {"id": "pickers", "label": "Date Pickers"}, - {"id": "charts", "label": "Charts"}, - ], - defaultExpandedItems=["grid"], - multiSelect=True, - checkboxSelection=True, - selectionPropagation={"parents": True, "descendants": True}, -) -``` - -### Controlled Selection via Callback - -```python -@callback( - Output("selected-display", "children"), - Input("my-tree", "selectedItems"), -) -def show_selection(selected): - return f"Selected: {selected}" -``` - -### Label Editing - -```python -TreeView( - id="editable-tree", - items=[...], - isItemEditable=True, -) - -@callback( - Output("edit-log", "children"), - Input("editable-tree", "editedItemLabel"), -) -def on_edit(edit_data): - if not edit_data: - return "No edits yet" - return f"Item {edit_data['itemId']} → {edit_data['newLabel']}" -``` - -### Pro: Drag-and-Drop Ordering - -```python -from dash_mui_charts import TreeViewPro - -TreeViewPro( - id="reorderable-tree", - licenseKey=os.getenv("MUI_PRO_API_KEY", ""), - items=[...], - itemsReordering=True, - defaultExpandedItems=["grid", "pickers"], -) - -@callback( - Output("reorder-log", "children"), - Input("reorderable-tree", "itemPositionChanged"), -) -def on_reorder(pos): - if not pos: - return "No reorders yet" - return f"{pos['itemId']} moved from {pos['oldPosition']} to {pos['newPosition']}" -``` - -### Pro: Lazy Loading - -```python -TreeViewPro( - id="lazy-tree", - licenseKey=os.getenv("MUI_PRO_API_KEY", ""), - items=[ - {"id": "root", "label": "Root", "children": []}, # empty = unloaded - ], - lazyLoading=True, -) - -@callback( - Output("lazy-tree", "lazyLoadedChildren"), - Input("lazy-tree", "lazyLoadRequest"), - prevent_initial_call=True, -) -def load_children(request): - parent_id = request["itemId"] - # Fetch from DB, API, etc. - children = fetch_children_from_server(parent_id) - return {parent_id: children} -``` - ---- - -## Key Architecture Decisions - -1. **`getItemId` / `getItemLabel` / `getItemChildren` as strings, not functions.** - Dash can't serialize JS functions. We pass the property name as a string (e.g. `"name"`) and convert to `(item) => item.name` in the React wrapper. - -2. **`isItemDisabled` / `isItemEditable` / `isItemReorderable` as lists of IDs.** - Instead of passing functions, Dash users pass `disabledItems=["id1", "id2"]` and the React wrapper converts to `(item) => disabledItems.includes(getItemId(item))`. Boolean `isItemEditable=True` enables editing for all items. - -3. **Lazy loading via Dash callback bridge.** - MUI's `dataSource.getTreeItems` is async JS. We bridge this by: the JS component detects an expansion of a node with no children → fires `lazyLoadRequest` output → Dash callback fetches data → writes `lazyLoadedChildren` → JS component merges into tree state. - -4. **License key gating follows the existing chart pattern.** - `TreeViewPro` accepts `licenseKey` prop, imports from `@mui/x-tree-view-pro`, and the component is a separate file to enable tree-shaking. - -5. **Virtualization (Pro v9+).** - `RichTreeViewPro` supports virtualization in v9. Since this requires the parent container to have intrinsic dimensions, we expose a `height` prop that sets the container style. This is gated behind `licenseKey`. diff --git a/.claude/support_files/tree/LLMS_TXT_ADDITION.md b/.claude/support_files/tree/LLMS_TXT_ADDITION.md deleted file mode 100644 index 81ea67e..0000000 --- a/.claude/support_files/tree/LLMS_TXT_ADDITION.md +++ /dev/null @@ -1,62 +0,0 @@ -# Tree View Components — llms.txt Addition - -Append this section to the existing `llms.txt` for dash_mui_charts. - ---- - -## Tree View - -| Component | License | Key Features | -|:----------|:--------|:-------------| -| **TreeView** | Free | Data-driven tree, selection (single/multi/checkbox), expansion, label editing, focus, disabled items, custom icons | -| **TreeViewPro** | Pro | All Free features + drag-and-drop reordering, lazy loading, virtualization | -| **SimpleTreeView** | Free | Static item definition, selection, expansion, focus — lighter alternative | - -### TreeView Properties - -| Property | Type | Default | Description | -|:---------|:-----|:--------|:------------| -| `items` | list | Required | Array of `{id, label, children?, ...}` objects | -| `getItemId` | string | `"id"` | Property name for item ID | -| `getItemLabel` | string | `"label"` | Property name for item label | -| `getItemChildren` | string | `"children"` | Property name for item children | -| `selectedItems` | string \| list | `None` | Controlled selected item(s) — string if single, list if multi | -| `defaultSelectedItems` | string \| list | `[]` | Default selection (uncontrolled) | -| `multiSelect` | bool | `False` | Allow multiple item selection | -| `checkboxSelection` | bool | `False` | Show selection checkboxes | -| `disableSelection` | bool | `False` | Disable all selection | -| `selectionPropagation` | dict | `None` | `{parents: bool, descendants: bool}` — auto-propagate selection | -| `expandedItems` | list | `None` | Controlled expanded item IDs | -| `defaultExpandedItems` | list | `[]` | Default expanded items (uncontrolled) | -| `expansionTrigger` | string | `"content"` | `"content"` or `"iconContainer"` | -| `isItemEditable` | bool | `False` | Enable label editing on all items | -| `editableItems` | list | `None` | Item IDs that are editable | -| `disabledItems` | list | `None` | Item IDs that are disabled | -| `disabledItemsFocusable` | bool | `False` | Allow focus on disabled items | -| `itemChildrenIndentation` | number \| string | `"12px"` | Horizontal indent | -| `height` | number \| string | `None` | Container height | -| `collapseIcon` | string | `None` | MUI icon name for collapse | -| `expandIcon` | string | `None` | MUI icon name for expand | -| `endIcon` | string | `None` | MUI icon name for leaf nodes | -| `clickedItem` | dict | Output | `{itemId, event_timestamp}` | -| `focusedItem` | dict | Output | `{itemId, event_timestamp}` | -| `editedItemLabel` | dict | Output | `{itemId, newLabel, event_timestamp}` | - -### TreeViewPro Properties (inherits all TreeView props) - -| Property | Type | Default | Description | -|:---------|:-----|:--------|:------------| -| `licenseKey` | string | `""` | MUI Pro license key | -| `itemsReordering` | bool | `False` | Enable drag-and-drop reordering | -| `reorderableItems` | list | `None` | Item IDs that can be reordered | -| `lazyLoading` | bool | `False` | Enable lazy loading mode | -| `lazyLoadedChildren` | dict | `None` | `{parentId: [children]}` — loaded by callback | -| `lazyLoadRequest` | dict | Output | `{itemId, event_timestamp}` — fires when unloaded node expands | -| `itemPositionChanged` | dict | Output | `{itemId, oldPosition, newPosition, event_timestamp}` | - -### SimpleTreeView Properties - -| Property | Type | Default | Description | -|:---------|:-----|:--------|:------------| -| `items` | list | Required | Array of `{itemId, label, children?, disabled?, disableSelection?}` | -| Same selection/expansion/icon props as TreeView | | | | diff --git a/.claude/support_files/tree/SimpleTreeView.react.js b/.claude/support_files/tree/SimpleTreeView.react.js deleted file mode 100644 index 9ab1b4d..0000000 --- a/.claude/support_files/tree/SimpleTreeView.react.js +++ /dev/null @@ -1,186 +0,0 @@ -/** - * SimpleTreeView — Dash wrapper for MUI X SimpleTreeView (Community) - * - * Converts a nested items array into JSX children. - * This is a STUB — Claude Code should implement the full component. - */ -import React, {useCallback, useMemo} from 'react'; -import PropTypes from 'prop-types'; -import {SimpleTreeView as MuiSimpleTreeView} from '@mui/x-tree-view/SimpleTreeView'; -import {TreeItem} from '@mui/x-tree-view/TreeItem'; -import {resolveIcon} from '../fragments/iconResolver'; - -/** Recursively render items as TreeItem children */ -const renderItems = (items) => { - if (!items || items.length === 0) return null; - return items.map((item) => ( - - {renderItems(item.children)} - - )); -}; - -const SimpleTreeView = (props) => { - const { - id, - items, - // Selection - selectedItems, - defaultSelectedItems, - multiSelect, - checkboxSelection, - disableSelection, - // Expansion - expandedItems, - defaultExpandedItems, - expansionTrigger, - // Disabled - disabledItemsFocusable, - // Appearance - itemChildrenIndentation, - height, - sx, - // Icons - collapseIcon, - expandIcon, - endIcon, - // Accessibility - ariaLabel, - ariaLabelledBy, - // Dash - setProps, - } = props; - - const slots = useMemo(() => { - const s = {}; - if (collapseIcon) s.collapseIcon = resolveIcon(collapseIcon); - if (expandIcon) s.expandIcon = resolveIcon(expandIcon); - if (endIcon) s.endIcon = resolveIcon(endIcon); - return Object.keys(s).length > 0 ? s : undefined; - }, [collapseIcon, expandIcon, endIcon]); - - const handleSelectedItemsChange = useCallback( - (event, itemIds) => { - if (setProps) setProps({selectedItems: itemIds}); - }, - [setProps] - ); - - const handleExpandedItemsChange = useCallback( - (event, itemIds) => { - if (setProps) setProps({expandedItems: itemIds}); - }, - [setProps] - ); - - const handleItemClick = useCallback( - (event, itemId) => { - if (setProps) setProps({clickedItem: {itemId, event_timestamp: Date.now()}}); - }, - [setProps] - ); - - const containerStyle = useMemo(() => { - const s = {}; - if (height) s.height = typeof height === 'number' ? `${height}px` : height; - return s; - }, [height]); - - return ( -
- - {renderItems(items)} - -
- ); -}; - -SimpleTreeView.defaultProps = { - items: [], - multiSelect: false, - checkboxSelection: false, - disableSelection: false, - disabledItemsFocusable: false, - expansionTrigger: 'content', - itemChildrenIndentation: '12px', -}; - -SimpleTreeView.propTypes = { - id: PropTypes.string, - - /** - * Nested items array. Each item: {itemId: string, label: string, children?: [], disabled?: bool, disableSelection?: bool} - */ - items: PropTypes.arrayOf( - PropTypes.shape({ - itemId: PropTypes.string.isRequired, - label: PropTypes.string.isRequired, - children: PropTypes.array, - disabled: PropTypes.bool, - disableSelection: PropTypes.bool, - }) - ), - - // Selection - selectedItems: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]), - defaultSelectedItems: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]), - multiSelect: PropTypes.bool, - checkboxSelection: PropTypes.bool, - disableSelection: PropTypes.bool, - - // Expansion - expandedItems: PropTypes.arrayOf(PropTypes.string), - defaultExpandedItems: PropTypes.arrayOf(PropTypes.string), - expansionTrigger: PropTypes.oneOf(['content', 'iconContainer']), - - // Disabled - disabledItemsFocusable: PropTypes.bool, - - // Appearance - itemChildrenIndentation: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), - height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), - sx: PropTypes.object, - - // Icons - collapseIcon: PropTypes.string, - expandIcon: PropTypes.string, - endIcon: PropTypes.string, - - // Accessibility - ariaLabel: PropTypes.string, - ariaLabelledBy: PropTypes.string, - - // Output - clickedItem: PropTypes.exact({ - itemId: PropTypes.string, - event_timestamp: PropTypes.number, - }), - - setProps: PropTypes.func, -}; - -export default SimpleTreeView; diff --git a/.claude/support_files/tree/TreeView.react.js b/.claude/support_files/tree/TreeView.react.js deleted file mode 100644 index 212c7c6..0000000 --- a/.claude/support_files/tree/TreeView.react.js +++ /dev/null @@ -1,303 +0,0 @@ -/** - * TreeView — Dash wrapper for MUI X RichTreeView (Community) - * - * Data-driven tree with selection, expansion, editing, focus callbacks. - * This is a STUB — Claude Code should implement the full component. - */ -import React, {useCallback, useMemo} from 'react'; -import PropTypes from 'prop-types'; -import {RichTreeView} from '@mui/x-tree-view/RichTreeView'; -import {resolveIcon} from '../fragments/iconResolver'; - -const TreeView = (props) => { - const { - id, - items, - // Item accessors (string → function conversion) - getItemId: getItemIdProp, - getItemLabel: getItemLabelProp, - getItemChildren: getItemChildrenProp, - // Selection - selectedItems, - defaultSelectedItems, - multiSelect, - checkboxSelection, - disableSelection, - selectionPropagation, - // Expansion - expandedItems, - defaultExpandedItems, - expansionTrigger, - // Editing - isItemEditable, - editableItems, - // Disabled - disabledItems, - disabledItemsFocusable, - // Appearance - itemChildrenIndentation, - height, - sx, - // Icons (string names) - collapseIcon, - expandIcon, - endIcon, - // Accessibility - ariaLabel, - ariaLabelledBy, - // Dash - setProps, - ...otherProps - } = props; - - // --- Convert string accessor props to functions --- - const getItemId = useCallback( - (item) => item[getItemIdProp || 'id'], - [getItemIdProp] - ); - const getItemLabel = useCallback( - (item) => item[getItemLabelProp || 'label'], - [getItemLabelProp] - ); - const getItemChildren = useCallback( - (item) => item[getItemChildrenProp || 'children'], - [getItemChildrenProp] - ); - - // --- Convert list-based disabled/editable to functions --- - const isItemDisabledFn = useMemo(() => { - if (!disabledItems || disabledItems.length === 0) return undefined; - const disabledSet = new Set(disabledItems); - return (item) => disabledSet.has(getItemId(item)); - }, [disabledItems, getItemId]); - - const isItemEditableFn = useMemo(() => { - if (typeof isItemEditable === 'boolean') return isItemEditable; - if (editableItems && editableItems.length > 0) { - const editableSet = new Set(editableItems); - return (item) => editableSet.has(getItemId(item)); - } - return false; - }, [isItemEditable, editableItems, getItemId]); - - // --- Slots for icons --- - const slots = useMemo(() => { - const s = {}; - if (collapseIcon) s.collapseIcon = resolveIcon(collapseIcon); - if (expandIcon) s.expandIcon = resolveIcon(expandIcon); - if (endIcon) s.endIcon = resolveIcon(endIcon); - return Object.keys(s).length > 0 ? s : undefined; - }, [collapseIcon, expandIcon, endIcon]); - - // --- Callbacks → Dash output props --- - const handleSelectedItemsChange = useCallback( - (event, itemIds) => { - if (setProps) setProps({selectedItems: itemIds}); - }, - [setProps] - ); - - const handleExpandedItemsChange = useCallback( - (event, itemIds) => { - if (setProps) setProps({expandedItems: itemIds}); - }, - [setProps] - ); - - const handleItemClick = useCallback( - (event, itemId) => { - if (setProps) setProps({clickedItem: {itemId, event_timestamp: Date.now()}}); - }, - [setProps] - ); - - const handleItemFocus = useCallback( - (event, itemId) => { - if (setProps) setProps({focusedItem: {itemId, event_timestamp: Date.now()}}); - }, - [setProps] - ); - - const handleItemLabelChange = useCallback( - (itemId, newLabel) => { - if (setProps) setProps({editedItemLabel: {itemId, newLabel, event_timestamp: Date.now()}}); - }, - [setProps] - ); - - // --- Container style --- - const containerStyle = useMemo(() => { - const s = {}; - if (height) s.height = typeof height === 'number' ? `${height}px` : height; - return s; - }, [height]); - - return ( -
- -
- ); -}; - -TreeView.defaultProps = { - items: [], - getItemId: 'id', - getItemLabel: 'label', - getItemChildren: 'children', - multiSelect: false, - checkboxSelection: false, - disableSelection: false, - disabledItemsFocusable: false, - isItemEditable: false, - expansionTrigger: 'content', - itemChildrenIndentation: '12px', -}; - -TreeView.propTypes = { - /** Dash component id */ - id: PropTypes.string, - - /** Array of item objects. Each must have an id and label (or use getItemId/getItemLabel). */ - items: PropTypes.arrayOf(PropTypes.object), - - /** Property name for item ID (default: "id") */ - getItemId: PropTypes.string, - - /** Property name for item label (default: "label") */ - getItemLabel: PropTypes.string, - - /** Property name for item children (default: "children") */ - getItemChildren: PropTypes.string, - - // --- Selection --- - /** Controlled selected item(s). String when multiSelect=false, array when true. */ - selectedItems: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]), - - /** Default selected items (uncontrolled). */ - defaultSelectedItems: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]), - - /** Allow selecting multiple items. */ - multiSelect: PropTypes.bool, - - /** Show checkboxes for selection. */ - checkboxSelection: PropTypes.bool, - - /** Disable all selection. */ - disableSelection: PropTypes.bool, - - /** Auto-propagate selection to parents/descendants. {parents: bool, descendants: bool} */ - selectionPropagation: PropTypes.exact({ - parents: PropTypes.bool, - descendants: PropTypes.bool, - }), - - // --- Expansion --- - /** Controlled expanded item IDs. */ - expandedItems: PropTypes.arrayOf(PropTypes.string), - - /** Default expanded items (uncontrolled). */ - defaultExpandedItems: PropTypes.arrayOf(PropTypes.string), - - /** What triggers expansion: "content" or "iconContainer". */ - expansionTrigger: PropTypes.oneOf(['content', 'iconContainer']), - - // --- Editing --- - /** Enable label editing. true = all items, or use editableItems for per-item control. */ - isItemEditable: PropTypes.bool, - - /** List of item IDs that are editable (alternative to isItemEditable=true). */ - editableItems: PropTypes.arrayOf(PropTypes.string), - - // --- Disabled --- - /** List of item IDs that should be disabled. */ - disabledItems: PropTypes.arrayOf(PropTypes.string), - - /** Allow focus on disabled items. */ - disabledItemsFocusable: PropTypes.bool, - - // --- Appearance --- - /** Indentation of children. Number (px) or string ("24px", "2rem"). */ - itemChildrenIndentation: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), - - /** Container height. */ - height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), - - /** MUI sx styling object. */ - sx: PropTypes.object, - - // --- Icons --- - /** MUI icon name for collapse icon (e.g. "ExpandMore"). */ - collapseIcon: PropTypes.string, - - /** MUI icon name for expand icon (e.g. "ChevronRight"). */ - expandIcon: PropTypes.string, - - /** MUI icon name for leaf/end icon. */ - endIcon: PropTypes.string, - - // --- Accessibility --- - /** ARIA label for the tree. */ - ariaLabel: PropTypes.string, - - /** ID of element that labels the tree. */ - ariaLabelledBy: PropTypes.string, - - // --- Output Props --- - /** Fired when item is clicked. {itemId, event_timestamp} */ - clickedItem: PropTypes.exact({ - itemId: PropTypes.string, - event_timestamp: PropTypes.number, - }), - - /** Fired when item is focused. {itemId, event_timestamp} */ - focusedItem: PropTypes.exact({ - itemId: PropTypes.string, - event_timestamp: PropTypes.number, - }), - - /** Fired when label edit completes. {itemId, newLabel, event_timestamp} */ - editedItemLabel: PropTypes.exact({ - itemId: PropTypes.string, - newLabel: PropTypes.string, - event_timestamp: PropTypes.number, - }), - - /** Dash setProps callback */ - setProps: PropTypes.func, -}; - -export default TreeView; diff --git a/.claude/support_files/tree/TreeViewPro.react.js b/.claude/support_files/tree/TreeViewPro.react.js deleted file mode 100644 index d0adb24..0000000 --- a/.claude/support_files/tree/TreeViewPro.react.js +++ /dev/null @@ -1,330 +0,0 @@ -/** - * TreeViewPro — Dash wrapper for MUI X RichTreeViewPro (Pro) - * - * Extends TreeView with drag-and-drop ordering, lazy loading, virtualization. - * Requires MUI Pro license key. - * This is a STUB — Claude Code should implement the full component. - */ -import React, {useCallback, useMemo, useEffect, useRef} from 'react'; -import PropTypes from 'prop-types'; -import {RichTreeViewPro} from '@mui/x-tree-view-pro/RichTreeViewPro'; -import {resolveIcon} from '../fragments/iconResolver'; - -const TreeViewPro = (props) => { - const { - id, - items, - licenseKey, - // Item accessors - getItemId: getItemIdProp, - getItemLabel: getItemLabelProp, - getItemChildren: getItemChildrenProp, - // Selection (same as TreeView) - selectedItems, - defaultSelectedItems, - multiSelect, - checkboxSelection, - disableSelection, - selectionPropagation, - // Expansion - expandedItems, - defaultExpandedItems, - expansionTrigger, - // Editing - isItemEditable, - editableItems, - // Disabled - disabledItems, - disabledItemsFocusable, - // Appearance - itemChildrenIndentation, - height, - sx, - // Icons - collapseIcon, - expandIcon, - endIcon, - // Accessibility - ariaLabel, - ariaLabelledBy, - // --- PRO: Ordering --- - itemsReordering, - reorderableItems, - // --- PRO: Lazy Loading --- - lazyLoading, - lazyLoadedChildren, - // Dash - setProps, - ...otherProps - } = props; - - // --- Accessor conversion (same as TreeView) --- - const getItemId = useCallback( - (item) => item[getItemIdProp || 'id'], - [getItemIdProp] - ); - const getItemLabel = useCallback( - (item) => item[getItemLabelProp || 'label'], - [getItemLabelProp] - ); - const getItemChildren = useCallback( - (item) => item[getItemChildrenProp || 'children'], - [getItemChildrenProp] - ); - - // --- Disabled/editable conversion --- - const isItemDisabledFn = useMemo(() => { - if (!disabledItems || disabledItems.length === 0) return undefined; - const s = new Set(disabledItems); - return (item) => s.has(getItemId(item)); - }, [disabledItems, getItemId]); - - const isItemEditableFn = useMemo(() => { - if (typeof isItemEditable === 'boolean') return isItemEditable; - if (editableItems && editableItems.length > 0) { - const s = new Set(editableItems); - return (item) => s.has(getItemId(item)); - } - return false; - }, [isItemEditable, editableItems, getItemId]); - - // --- PRO: Reorderable conversion --- - const isItemReorderableFn = useMemo(() => { - if (!reorderableItems || reorderableItems.length === 0) return undefined; - const s = new Set(reorderableItems); - return (itemId) => s.has(itemId); - }, [reorderableItems]); - - // --- Slots --- - const slots = useMemo(() => { - const s = {}; - if (collapseIcon) s.collapseIcon = resolveIcon(collapseIcon); - if (expandIcon) s.expandIcon = resolveIcon(expandIcon); - if (endIcon) s.endIcon = resolveIcon(endIcon); - return Object.keys(s).length > 0 ? s : undefined; - }, [collapseIcon, expandIcon, endIcon]); - - // --- Callbacks --- - const handleSelectedItemsChange = useCallback( - (event, itemIds) => { - if (setProps) setProps({selectedItems: itemIds}); - }, - [setProps] - ); - - const handleExpandedItemsChange = useCallback( - (event, itemIds) => { - if (setProps) setProps({expandedItems: itemIds}); - }, - [setProps] - ); - - const handleItemClick = useCallback( - (event, itemId) => { - if (setProps) setProps({clickedItem: {itemId, event_timestamp: Date.now()}}); - }, - [setProps] - ); - - const handleItemFocus = useCallback( - (event, itemId) => { - if (setProps) setProps({focusedItem: {itemId, event_timestamp: Date.now()}}); - }, - [setProps] - ); - - const handleItemLabelChange = useCallback( - (itemId, newLabel) => { - if (setProps) setProps({editedItemLabel: {itemId, newLabel, event_timestamp: Date.now()}}); - }, - [setProps] - ); - - // --- PRO: Reorder callback --- - const handleItemPositionChange = useCallback( - (params) => { - if (setProps) { - setProps({ - itemPositionChanged: { - itemId: params.itemId, - oldPosition: params.oldPosition, - newPosition: params.newPosition, - event_timestamp: Date.now(), - }, - }); - } - }, - [setProps] - ); - - // --- PRO: Lazy loading bridge --- - // TODO: Implement the dataSource bridge pattern. - // When a node with no children is expanded, fire lazyLoadRequest. - // When lazyLoadedChildren changes, merge into the tree. - // This requires maintaining internal items state that merges - // the original `items` prop with dynamically loaded children. - - const containerStyle = useMemo(() => { - const s = {}; - if (height) s.height = typeof height === 'number' ? `${height}px` : height; - return s; - }, [height]); - - return ( -
- -
- ); -}; - -TreeViewPro.defaultProps = { - items: [], - getItemId: 'id', - getItemLabel: 'label', - getItemChildren: 'children', - multiSelect: false, - checkboxSelection: false, - disableSelection: false, - disabledItemsFocusable: false, - isItemEditable: false, - expansionTrigger: 'content', - itemChildrenIndentation: '12px', - itemsReordering: false, - lazyLoading: false, - licenseKey: '', -}; - -TreeViewPro.propTypes = { - /** Dash component id */ - id: PropTypes.string, - - /** MUI X Pro license key. Required for Pro features. */ - licenseKey: PropTypes.string, - - /** Array of item objects. */ - items: PropTypes.arrayOf(PropTypes.object), - - // --- Accessors --- - getItemId: PropTypes.string, - getItemLabel: PropTypes.string, - getItemChildren: PropTypes.string, - - // --- Selection (same as TreeView) --- - selectedItems: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]), - defaultSelectedItems: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]), - multiSelect: PropTypes.bool, - checkboxSelection: PropTypes.bool, - disableSelection: PropTypes.bool, - selectionPropagation: PropTypes.exact({ - parents: PropTypes.bool, - descendants: PropTypes.bool, - }), - - // --- Expansion --- - expandedItems: PropTypes.arrayOf(PropTypes.string), - defaultExpandedItems: PropTypes.arrayOf(PropTypes.string), - expansionTrigger: PropTypes.oneOf(['content', 'iconContainer']), - - // --- Editing --- - isItemEditable: PropTypes.bool, - editableItems: PropTypes.arrayOf(PropTypes.string), - - // --- Disabled --- - disabledItems: PropTypes.arrayOf(PropTypes.string), - disabledItemsFocusable: PropTypes.bool, - - // --- Appearance --- - itemChildrenIndentation: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), - height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), - sx: PropTypes.object, - - // --- Icons --- - collapseIcon: PropTypes.string, - expandIcon: PropTypes.string, - endIcon: PropTypes.string, - - // --- Accessibility --- - ariaLabel: PropTypes.string, - ariaLabelledBy: PropTypes.string, - - // --- PRO: Ordering --- - /** Enable drag-and-drop item reordering. */ - itemsReordering: PropTypes.bool, - - /** List of item IDs that can be reordered. If empty, all items are reorderable. */ - reorderableItems: PropTypes.arrayOf(PropTypes.string), - - /** Output: Fired after item reorder. {itemId, oldPosition, newPosition, event_timestamp} */ - itemPositionChanged: PropTypes.object, - - // --- PRO: Lazy Loading --- - /** Enable lazy loading mode. */ - lazyLoading: PropTypes.bool, - - /** Input: Children loaded by Dash callback. {parentItemId: [childItems]} */ - lazyLoadedChildren: PropTypes.object, - - /** Output: Fired when unloaded node is expanded. {itemId, event_timestamp} */ - lazyLoadRequest: PropTypes.exact({ - itemId: PropTypes.string, - event_timestamp: PropTypes.number, - }), - - // --- Output Props (same as TreeView) --- - clickedItem: PropTypes.exact({ - itemId: PropTypes.string, - event_timestamp: PropTypes.number, - }), - focusedItem: PropTypes.exact({ - itemId: PropTypes.string, - event_timestamp: PropTypes.number, - }), - editedItemLabel: PropTypes.exact({ - itemId: PropTypes.string, - newLabel: PropTypes.string, - event_timestamp: PropTypes.number, - }), - - /** Dash setProps callback */ - setProps: PropTypes.func, -}; - -export default TreeViewPro; diff --git a/.claude/support_files/tree/iconResolver.js b/.claude/support_files/tree/iconResolver.js deleted file mode 100644 index 2dfbd56..0000000 --- a/.claude/support_files/tree/iconResolver.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * iconResolver.js — Maps icon name strings to MUI icon components. - * - * Dash can't pass React components as props, so we accept string names - * like "ExpandMore" and resolve them to the actual MUI icon. - * - * Claude Code: Expand this map as needed. Consider lazy-loading icons - * or using @mui/icons-material with dynamic import if bundle size is a concern. - */ -import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; -import ChevronRightIcon from '@mui/icons-material/ChevronRight'; -import FolderIcon from '@mui/icons-material/Folder'; -import FolderOpenIcon from '@mui/icons-material/FolderOpen'; -import InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile'; -import RemoveIcon from '@mui/icons-material/Remove'; -import AddIcon from '@mui/icons-material/Add'; -import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown'; -import ArrowRightIcon from '@mui/icons-material/ArrowRight'; - -const ICON_MAP = { - ExpandMore: ExpandMoreIcon, - ChevronRight: ChevronRightIcon, - Folder: FolderIcon, - FolderOpen: FolderOpenIcon, - InsertDriveFile: InsertDriveFileIcon, - Remove: RemoveIcon, - Add: AddIcon, - ArrowDropDown: ArrowDropDownIcon, - ArrowRight: ArrowRightIcon, -}; - -/** - * Resolve an icon name string to a MUI icon component. - * Returns undefined if the name is not recognized. - */ -export const resolveIcon = (name) => { - if (!name) return undefined; - return ICON_MAP[name] || undefined; -}; diff --git a/.claude/support_files/tree/tree_basic.py b/.claude/support_files/tree/tree_basic.py deleted file mode 100644 index fc83245..0000000 --- a/.claude/support_files/tree/tree_basic.py +++ /dev/null @@ -1,208 +0,0 @@ -# File: docs/dash_mui_charts/tree_basic.py -"""Tree View — Basic examples showing items, expansion, selection, editing, and callbacks.""" - -import json -import dash_mantine_components as dmc -from dash import html, callback, Input, Output -from dash_mui_charts import TreeView - -GLASS = { - "background": "light-dark(rgba(255,255,255,0.55), rgba(30,30,30,0.55))", - "backdropFilter": "blur(16px) saturate(1.8)", - "WebkitBackdropFilter": "blur(16px) saturate(1.8)", - "border": "1px solid light-dark(rgba(255,255,255,0.5), rgba(255,255,255,0.08))", -} - -MUI_X_PRODUCTS = [ - {"id": "grid", "label": "Data Grid", "children": [ - {"id": "grid-com", "label": "@mui/x-data-grid"}, - {"id": "grid-pro", "label": "@mui/x-data-grid-pro"}, - {"id": "grid-premium", "label": "@mui/x-data-grid-premium"}, - ]}, - {"id": "pickers", "label": "Date and Time Pickers", "children": [ - {"id": "pickers-com", "label": "@mui/x-date-pickers"}, - {"id": "pickers-pro", "label": "@mui/x-date-pickers-pro"}, - ]}, - {"id": "charts", "label": "Charts", "children": [ - {"id": "charts-com", "label": "@mui/x-charts"}, - ]}, - {"id": "tree", "label": "Tree View", "children": [ - {"id": "tree-com", "label": "@mui/x-tree-view"}, - {"id": "tree-pro", "label": "@mui/x-tree-view-pro"}, - ]}, -] - -FILE_SYSTEM = [ - {"id": "docs", "label": "Documents", "children": [ - {"id": "docs-resume", "label": "resume.pdf"}, - {"id": "docs-cover", "label": "cover_letter.docx"}, - {"id": "docs-projects", "label": "Projects", "children": [ - {"id": "docs-proj-a", "label": "project_a.md"}, - {"id": "docs-proj-b", "label": "project_b.md"}, - ]}, - ]}, - {"id": "images", "label": "Images", "children": [ - {"id": "img-photo", "label": "photo.jpg"}, - {"id": "img-diagram", "label": "diagram.png"}, - ]}, - {"id": "src", "label": "Source Code", "children": [ - {"id": "src-main", "label": "main.py"}, - {"id": "src-utils", "label": "utils.py"}, - {"id": "src-tests", "label": "tests/", "children": [ - {"id": "src-test1", "label": "test_main.py"}, - ]}, - ]}, -] - -component = dmc.Stack([ - dmc.Text("Tree View", fw=700, size="xl"), - dmc.Text("Hierarchical data display with selection, expansion, editing, and keyboard navigation.", size="sm", c="dimmed"), - - # --- Basic Tree --- - dmc.Paper( - dmc.Stack([ - dmc.Text("Basic Tree View", fw=600), - dmc.Text("Data-driven tree with default expansion. Click items to expand/collapse.", size="sm", c="dimmed"), - TreeView( - id="mc-tree-basic", - items=MUI_X_PRODUCTS, - defaultExpandedItems=["grid", "pickers"], - ), - ], gap="sm"), - p="lg", radius="md", style=GLASS, - ), - - # --- Checkbox Multi-Select with Propagation --- - dmc.Paper( - dmc.Stack([ - dmc.Text("Checkbox Selection with Propagation", fw=600), - dmc.Text( - "multiSelect + checkboxSelection + selectionPropagation: selecting a parent auto-selects children.", - size="sm", c="dimmed", - ), - TreeView( - id="mc-tree-checkbox", - items=MUI_X_PRODUCTS, - defaultExpandedItems=["grid", "pickers", "charts", "tree"], - multiSelect=True, - checkboxSelection=True, - selectionPropagation={"parents": True, "descendants": True}, - ), - dmc.Text("Selected items:", size="xs", c="dimmed"), - html.Pre( - id="mc-tree-checkbox-out", - children="Select items...", - style={ - "fontSize": "11px", "margin": 0, - "padding": "8px 12px", "borderRadius": "6px", - "background": "light-dark(#f8f9fa, #1a1b1e)", - "border": "1px solid light-dark(#dee2e6, #373a40)", - }, - ), - ], gap="sm"), - p="lg", radius="md", style=GLASS, - ), - - # --- Editable Labels --- - dmc.Paper( - dmc.Stack([ - dmc.Text("Editable Labels", fw=600), - dmc.Text("Double-click any item to edit its label. Press Enter to save, Esc to cancel.", size="sm", c="dimmed"), - TreeView( - id="mc-tree-editable", - items=FILE_SYSTEM, - defaultExpandedItems=["docs", "src"], - isItemEditable=True, - expandIcon="ChevronRight", - collapseIcon="ExpandMore", - endIcon="InsertDriveFile", - ), - dmc.Text("Last edit:", size="xs", c="dimmed"), - html.Pre( - id="mc-tree-edit-out", - children="Edit an item...", - style={ - "fontSize": "11px", "margin": 0, - "padding": "8px 12px", "borderRadius": "6px", - "background": "light-dark(#f8f9fa, #1a1b1e)", - "border": "1px solid light-dark(#dee2e6, #373a40)", - }, - ), - ], gap="sm"), - p="lg", radius="md", style=GLASS, - ), - - # --- Disabled Items --- - dmc.Paper( - dmc.Stack([ - dmc.Text("Disabled Items", fw=600), - dmc.Text("Specific items disabled via disabledItems prop.", size="sm", c="dimmed"), - TreeView( - id="mc-tree-disabled", - items=MUI_X_PRODUCTS, - defaultExpandedItems=["grid"], - disabledItems=["grid-premium", "pickers-pro", "tree-pro"], - ), - ], gap="sm"), - p="lg", radius="md", style=GLASS, - ), - - # --- Click Tracking --- - dmc.Paper( - dmc.Stack([ - dmc.Text("Click & Focus Tracking", fw=600), - dmc.Text("clickedItem and focusedItem output props fire on interaction.", size="sm", c="dimmed"), - TreeView( - id="mc-tree-clicks", - items=FILE_SYSTEM, - defaultExpandedItems=["docs", "images", "src"], - ), - dmc.Text("Last click:", size="xs", c="dimmed"), - html.Pre( - id="mc-tree-click-out", - children="Click an item...", - style={ - "fontSize": "11px", "margin": 0, - "padding": "8px 12px", "borderRadius": "6px", - "background": "light-dark(#f8f9fa, #1a1b1e)", - "border": "1px solid light-dark(#dee2e6, #373a40)", - }, - ), - ], gap="sm"), - p="lg", radius="md", style=GLASS, - ), -], gap="lg") - - -# --- Callbacks --- -@callback( - Output("mc-tree-checkbox-out", "children"), - Input("mc-tree-checkbox", "selectedItems"), - prevent_initial_call=True, -) -def show_selection(selected): - if not selected: - return "No items selected" - return json.dumps(selected, indent=2) - - -@callback( - Output("mc-tree-edit-out", "children"), - Input("mc-tree-editable", "editedItemLabel"), - prevent_initial_call=True, -) -def show_edit(edit_data): - if not edit_data: - return "Edit an item..." - return json.dumps(edit_data, indent=2) - - -@callback( - Output("mc-tree-click-out", "children"), - Input("mc-tree-clicks", "clickedItem"), - prevent_initial_call=True, -) -def show_click(data): - if not data: - return "Click an item..." - return json.dumps(data, indent=2) diff --git a/.claude/worktrees/zealous-brahmagupta b/.claude/worktrees/zealous-brahmagupta deleted file mode 160000 index deea5b8..0000000 --- a/.claude/worktrees/zealous-brahmagupta +++ /dev/null @@ -1 +0,0 @@ -Subproject commit deea5b87e6d3a1d59443734c889c7956d74105d1 diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..758a49d --- /dev/null +++ b/.flake8 @@ -0,0 +1,34 @@ +[flake8] +# Line length is not policed: this repo's comments carry a lot of explanation +# and reflowing them to 79 columns would make them harder to read, not easier. +max-line-length = 120 +extend-ignore = E203, W503, E501 +exclude = + .git, + .venv, + venv, + __pycache__, + node_modules, + build, + dist, + # Generated wrappers — dash-generate-components owns their style. + dash_mui_charts, + dash_mui_charts.egg-info, + src, + analytics, + .idea, +per-file-ignores = + # run.py imports first-party modules AFTER load_dotenv() on purpose — + # lib/constants.py reads APP_BASE_URL at import time, so loading the + # .env afterwards would silently hand it the default. + run.py: E402 + # BUDGETED FIRST-RUN DEBT (2026-08-02, ~75 findings): the demo pages are + # the product's living examples and the route-parity gate + # (scripts/route_parity.py) pins their layout trees — a style sweep + # through 40 of them belongs in its own change, verified against that + # gate, not in the commit that introduces CI. E402 is also the standing + # pages idiom (dash.register_page before the imports the layout needs). + # Tighten by deleting codes here as pages get touched for real reasons. + pages/*.py: E402, F401, F541, E302, E303, E305, E114, E116, E128, W292 + # usage.py is a standalone example kept deliberately minimal. + usage.py: E402, F401 diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..b00a0f2 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,117 @@ +name: CD + +# Deploys muicharts.2plot.dev, then checks the live site. +# +# The deploy step POSTs to a Render deploy hook held in the +# RENDER_DEPLOY_HOOK_URL secret. Without that secret the step is skipped and +# the workflow goes straight to verification — the right behaviour here, +# because render.yaml sets `autoDeploy: true` and Render is already deploying +# from GitHub on its own. The hook only makes the timing explicit so the wait +# loop below knows what it is waiting for. +on: + push: + branches: [main] + workflow_dispatch: + inputs: + target_url: + description: Site to verify (skips the deploy when set to another host) + required: false + type: string + +permissions: + contents: read + +concurrency: + group: cd-production + cancel-in-progress: false + +env: + PIP_DISABLE_PIP_VERSION_CHECK: "1" + SITE_URL: ${{ inputs.target_url || 'https://muicharts.2plot.dev' }} + +jobs: + test: + name: ci + uses: ./.github/workflows/ci.yml + + deploy: + name: deploy to render + needs: [test] + runs-on: ubuntu-latest + # Long enough for the wait loop below (a 120s settle plus up to 40 x 15s) + # and no longer. Without it the job inherits GitHub's six-hour default, + # which is how a platform that never comes back healthy holds the + # `cd-production` concurrency group all day. + timeout-minutes: 20 + environment: + name: production + url: https://muicharts.2plot.dev + outputs: + deployed: ${{ steps.hook.outputs.deployed }} + steps: + - name: Trigger the Render deploy hook + id: hook + env: + HOOK: ${{ secrets.RENDER_DEPLOY_HOOK_URL }} + run: | + if [ -z "$HOOK" ]; then + echo "::notice::RENDER_DEPLOY_HOOK_URL is not set. Skipping the deploy trigger and verifying whatever is currently live." + echo "deployed=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + curl -fsS -X POST "$HOOK" > /dev/null + echo "deployed=true" >> "$GITHUB_OUTPUT" + + - name: Wait for the new build to serve traffic + if: steps.hook.outputs.deployed == 'true' + run: | + # Render swaps instances rather than restarting in place, so the + # old build answers /healthz throughout. Waiting for one 200 + # proves nothing (LESSONS §16); give the build time, then require + # sustained health. + sleep 120 + ok=0 + for _ in $(seq 1 40); do + if curl -fsS "$SITE_URL/healthz" > /dev/null; then + ok=$((ok + 1)) + [ "$ok" -ge 5 ] && break + else + ok=0 + fi + sleep 15 + done + if [ "$ok" -lt 5 ]; then + echo "::error::$SITE_URL never became reliably healthy" + exit 1 + fi + + verify: + name: verify the live site + needs: [deploy] + if: always() && needs.deploy.result != 'cancelled' + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + # The network battery first: it is the same script, with the same + # check names, that CI ran against the container this deploy shipped. + # A name that passed in CI and fails here isolates the fault to the + # deploy. + - name: Network smoke battery + run: python scripts/network_smoke.py --base-url "$SITE_URL" + + # Then the satellite-specific checks the battery does not make: every + # canonical, every crawler body, the social card's real pixels, and + # every peer llms.txt in the directory actually resolving (peers WARN, + # this host FAILS — LESSONS §17). + - name: Smoke-test the deployment + run: python scripts/smoke_live.py "$SITE_URL" + + - name: Report + if: failure() + run: | + echo "::error::Live verification failed for $SITE_URL. Every failure these check for is silent in production: a site identity that fell back to a framework default, a stale dash-improve-my-llms artifact, a canonical on the wrong host, a page serving the JavaScript stub, a blank or reshaped social card, a missing network directory, and dead peer llms.txt links." diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2983ff6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,496 @@ +name: CI + +# Two things at once, because this repo is two things: a published component +# library AND the docs site at muicharts.2plot.dev. +# +# library the wheel build, the measured dash>=3.3 package floor, and the +# Python range setup.py claims (3.9-3.13); +# satellite the 2plot network baseline — a secretless pytest run (the 17 +# MUI Pro pages must degrade to their license banners: zero env +# in CI is the proof, LESSONS §18), the real Docker image booted +# and probed by the same battery that runs against production, +# and version fingerprints asserted INSIDE the artifact. +# +# TWO different Dash floors, and conflating them is the easy mistake: +# +# * the PACKAGE needs >= 3.3 — measured by the `package` job's floor venv. +# * the DOCS SITE needs >= 4.1 — dash-improve-my-llms pins `dash<5,>=4.1`, +# so the smoke matrix starts there. (Local dev may sit lower with a +# checked-out dimll; PyPI artifacts cannot.) +# +# Deliberately NOT `push: branches: [main]`. cd.yml runs on that push and its +# first job `uses:` this workflow, so a push to main would start two runs +# that contend for the concurrency group and cancel each other. Pull requests +# get their own CI; `main` is owned by CD. No coverage gap — CD cannot deploy +# without this workflow passing first. +on: + pull_request: + workflow_dispatch: + # Called by cd.yml so a deploy can never ship something the matrix rejected. + workflow_call: + +# Read-only. Nothing here publishes, comments or tags; the deploy lives in +# cd.yml behind a `production` environment and the PyPI release in release.yml. +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +env: + PIP_DISABLE_PIP_VERSION_CHECK: "1" + # Never let a CI run inherit production behaviour: require_owned_base_url() + # keys off RENDER / APP_ENV=production, and the traffic reporter keys off + # the webhook secret. Both must stay inert here. + APP_ENV: ci + +jobs: + lint: + name: lint + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: pip + - run: pip install flake8 + - name: flake8 + # Config in .flake8 — including the BUDGETED first-run debt ledger + # for pages/*.py. Tighten there, not here. + run: flake8 lib pages components docs tests scripts run.py usage.py verify_traffic.py _validate_init.py + + # The workflows lint themselves. Not belt-and-braces: an invalid + # workflow file is the one defect CI structurally cannot report, + # because the run dies before a job exists to fail. A double-quoted + # string inside a ${{ }} expression is a LEX error that invalidates + # the whole file — it silently killed every CI and CD run on + # boilerplate.2plot.dev for four days (LESSONS §14). + - name: actionlint + run: | + bash <(curl -fsSL https://raw.githubusercontent.com/rhysd/actionlint/v1.7.7/scripts/download-actionlint.bash) 1.7.7 + ./actionlint -color + + docs-tests: + name: Docs site · pytest (zero secrets) + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: pip + + - name: Install the docs site + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + # markdown2dash pins gunicorn<22 against the CVE-driven gunicorn>=23 + # floor. Same two-command install as the Dockerfile and render.yaml. + pip install --no-deps markdown2dash==0.1.2 + pip install -e . + pip install pytest + + - name: Confirm the pinned dependency versions + run: | + python - <<'PY' + import dash, dash_improve_my_llms as pkg, gunicorn + + def parts(v): + return tuple(int(x) for x in v.split(".")[:3] if x.isdigit()) + + # The SITE floor: dash-improve-my-llms pins dash>=4.1, so this is + # what requirements.txt actually resolves to in production. + assert parts(dash.__version__)[:2] >= (4, 1), dash.__version__ + # 2.3.4 is the network standard: below it resolve_site_title does + # not exist and this site's published identity degrades to app.title. + assert parts(pkg.__version__) >= (2, 3, 4), pkg.__version__ + # 21.x carried two request-smuggling CVEs (CVE-2024-6827, + # CVE-2024-1135); the requirements floor is >=23. + assert parts(gunicorn.__version__)[:2] >= (23, 0), gunicorn.__version__ + print(f"dash {dash.__version__}, dash-improve-my-llms " + f"{pkg.__version__}, gunicorn {gunicorn.__version__}") + PY + + # No MUI_PRO_API_KEY, no CROSS_APP_WEBHOOK_SECRET, no + # NETWORK_BULLETIN_URL here ON PURPOSE. tests/conftest.py pins them + # empty, and the app's degraded postures (license banners on the 17 + # Pro pages, a dormant traffic reporter) are only provable when + # nothing is configured. + - name: Test suite (zero secrets) + run: pytest tests -q + + - name: Boot under a production server + run: | + gunicorn run:server -b 127.0.0.1:8550 --daemon --access-logfile - --error-logfile - + for _ in $(seq 1 30); do + curl -sf http://127.0.0.1:8550/healthz && break + sleep 1 + done + # A page that renders under the test client can still fail under a + # real WSGI worker — different import path, different working + # directory, no test-client conveniences. + curl -sf http://127.0.0.1:8550/ > /dev/null + curl -sf http://127.0.0.1:8550/sparkline > /dev/null + # The battery, against the same server this satellite deploys. + python3 scripts/network_smoke.py --base-url http://127.0.0.1:8550 + + docker: + name: docker image · boot · battery + runs-on: ubuntu-latest + timeout-minutes: 25 + needs: [docs-tests] + steps: + - uses: actions/checkout@v4 + + # The same build Render runs. This is where a dependency-resolution + # failure surfaces — at CI time, not deploy time — and where a missing + # COPY line dies loudly instead of at gunicorn boot (LESSONS §19). + - uses: docker/setup-buildx-action@v3 + - name: Build the production image + uses: docker/build-push-action@v6 + with: + context: . + tags: dash-mui-charts-docs:ci + load: true + cache-from: type=gha + cache-to: type=gha,mode=max + + # pip metadata is invisible from outside a running host, so the + # versions are asserted here, inside the artifact that actually ships. + - name: Version fingerprints inside the image + run: | + docker run --rm dash-mui-charts-docs:ci python -c " + from importlib.metadata import version + + def parts(v): + return tuple(int(x) for x in v.split('.')[:3] if x.isdigit()) + + v = version('dash') + print('dash', v) + assert parts(v)[:2] >= (4, 1), f'expected dash >=4.1, image has {v}' + + v = version('dash-improve-my-llms') + print('dash-improve-my-llms', v) + assert parts(v) >= (2, 3, 4), f'expected >=2.3.4 (resolve_site_title), image has {v}' + + v = version('gunicorn') + print('gunicorn', v) + assert parts(v)[:2] >= (23, 0), f'expected gunicorn>=23 (CVE-2024-6827/-1135), image has {v}' + + # markdown2dash installs with --no-deps to dodge its gunicorn<22 + # pin; this proves the dodge kept working AND kept the package. + import markdown2dash # noqa: F401 + print('markdown2dash importable') + + import dash_mui_charts + print('dash_mui_charts', dash_mui_charts.__version__, + len(dash_mui_charts.__all__), 'components') + assert len(dash_mui_charts.__all__) == 13 + " + + # Boot with no secrets: the Pro pages fall back to their license + # banners, the traffic reporter stays dormant. What this catches is + # any import-time or preload crash — the class of failure where the + # platform loops the worker and the deploy never goes live. + - name: Boot the container and wait for /healthz + run: | + docker run -d --name docs -p 8550:8550 dash-mui-charts-docs:ci + for i in $(seq 1 60); do + if curl -sf http://127.0.0.1:8550/healthz > /dev/null; then + echo "healthy after ~$((i*2))s" + exit 0 + fi + if [ "$(docker inspect -f '{{.State.Running}}' docs)" != "true" ]; then + echo "container exited during boot:" + docker logs docs + exit 1 + fi + sleep 2 + done + echo "never became healthy; last logs:" + docker logs --tail 100 docs + exit 1 + + # The SAME script CD runs against https://muicharts.2plot.dev, so a + # failure in CI and a failure in production read identically. + - name: Smoke battery against the booted container + run: python3 scripts/network_smoke.py --base-url http://127.0.0.1:8550 + + - name: Container logs (for the record) + if: always() + run: docker logs --tail 40 docs 2>/dev/null || true + + smoke: + name: Docs · Dash ${{ matrix.dash }} · Python ${{ matrix.python }} + runs-on: ubuntu-latest + timeout-minutes: 25 + strategy: + fail-fast: false + matrix: + # The SITE floor (dash-improve-my-llms pins dash>=4.1), the two + # intermediate minors, and the current release. The package's own + # dash>=3.3 floor is measured separately, in the `package` job. + dash: ["4.1.0", "4.2.0", "4.3.0", "4.4.1"] + python: ["3.12"] + include: + # The docs-site Python range, against the current Dash. A full + # cross-product would be 12 jobs for very little extra signal. + - dash: "4.4.1" + python: "3.10" + - dash: "4.4.1" + python: "3.13" + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + cache: pip + + # node is what makes the JS checks real: the matrix rebuilds the + # component bundle and wrappers from source, so a broken webpack + # config or a component that stopped generating fails HERE, per + # supported environment, not on the next release. + - uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Install Dash ${{ matrix.dash }} first + # The version under test goes in BEFORE the rest, so the other + # requirements resolve against it rather than dragging in a newer + # Dash. requirements.txt only floors dash, so pip leaves the pin be. + run: | + python -m pip install --upgrade pip + python -m pip install "dash==${{ matrix.dash }}" + + - name: Install documentation-site requirements + run: | + python -m pip install -r requirements.txt + python -m pip install --no-deps markdown2dash==0.1.2 + + - name: Report the resolved Dash version + # A silent upgrade here would make the whole matrix meaningless. + run: | + RESOLVED=$(python -c "import dash; print(dash.__version__)") + echo "requested=${{ matrix.dash }} resolved=$RESOLVED" + if [ "$RESOLVED" != "${{ matrix.dash }}" ]; then + echo "::warning::Dash resolved to $RESOLVED, not ${{ matrix.dash }}" + fi + + - name: Rebuild the components from source + run: | + npm ci + npm run build + + - name: Validate the generated wrappers + run: npm run validate-init + + - name: Smoke test + run: python scripts/smoke_test.py --json smoke-${{ matrix.dash }}-py${{ matrix.python }}.json + + - uses: actions/upload-artifact@v4 + if: always() + with: + name: smoke-${{ matrix.dash }}-py${{ matrix.python }} + path: smoke-*.json + if-no-files-found: ignore + + package: + name: Build + verify the wheel + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + with: + # check_release.py compares the git commit times of the bundle and + # src/lib/components. A shallow clone can omit the commit that + # last touched one of them, turning the check into a false + # "no git history" skip. + fetch-depth: 0 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Release consistency + # Version drift between package.json and package-info.json, a stale + # bundle, packaging drift. None of these break a test run — this + # repo ran fine for a full cycle advertising five different versions. + run: python scripts/check_release.py + + - name: Build + run: | + python -m pip install --upgrade pip build twine + python -m build + + - name: Check metadata + run: python -m twine check dist/* + + - name: Install the wheel in a clean venv and import it + # The package must work with ONLY `dash` present — nothing from + # requirements.txt, which is the docs site's dependency set. + run: | + python -m venv /tmp/clean + /tmp/clean/bin/pip install --upgrade pip + /tmp/clean/bin/pip install dist/*.whl + /tmp/clean/bin/python - <<'PY' + import pathlib + + import dash_mui_charts as dmx + + print("version:", dmx.__version__) + + bundle = pathlib.Path(dmx.__file__).parent / "dash_mui_charts.min.js" + assert bundle.exists(), "JS bundle missing from the wheel" + print("bundle:", bundle.stat().st_size // 1024, "KB") + + expected = [ + "BarChart", "CandlestickChart", "CompositeChart", "Heatmap", + "LineChart", "LiveTradingChart", "PieChart", "ScatterChart", + "SimpleTreeView", "SparklineChart", "TimeClock", "TreeView", + "TreeViewPro", + ] + for name in expected: + assert hasattr(dmx, name), f"missing component: {name}" + assert sorted(dmx.__all__) == sorted(expected), ( + f"__all__ drift: {sorted(set(dmx.__all__) ^ set(expected))}" + ) + print(f"components OK ({len(expected)})") + + # The wheel must carry the library and nothing else. `lib`, + # `pages` and `assets` are docs-site directories that a careless + # packages= would happily install as top-level packages. + from importlib.metadata import distribution + + top = (distribution("dash_mui_charts").read_text("top_level.txt") or "").split() + assert top == ["dash_mui_charts"], f"wheel installs more than the library: {top}" + print("top_level.txt:", top) + PY + + - name: Measure the dash floor the wheel claims + # setup.py says dash>=3.3.0 — this is the measurement behind that + # number. The docs site cannot go this low (dimll pins >=4.1); the + # package can, and users on Dash 3.3 installs are real. + run: | + python -m venv /tmp/floor + /tmp/floor/bin/pip install --upgrade pip + /tmp/floor/bin/pip install "dash==3.3.0" dist/*.whl + /tmp/floor/bin/python - <<'PY' + import dash + import dash_mui_charts as dmx + + layout = dmx.LineChart( + id="lc", + series=[{"data": [1, 2, 3], "label": "a"}], + xAxis=[{"data": [0, 1, 2]}], + ).to_plotly_json() + for name in dmx.__all__: + cls = getattr(dmx, name) + assert callable(cls), name + print(f"dash={dash.__version__} dash_mui_charts={dmx.__version__} floor OK") + PY + + - name: Assert the wheel version matches package.json + run: | + PY_VER=$(python -c "import json;print(json.load(open('package.json'))['version'])") + WHEEL_VER=$(/tmp/clean/bin/python -c "import dash_mui_charts;print(dash_mui_charts.__version__)") + echo "package.json=$PY_VER installed=$WHEEL_VER" + test "$PY_VER" = "$WHEEL_VER" + + - uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + + package-python-range: + name: Package · Python ${{ matrix.python }} + needs: package + runs-on: ubuntu-latest + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + # Every interpreter python_requires in setup.py claims. This is what + # makes that claim measured rather than asserted — and it installs + # ONLY the wheel plus Dash, never the docs requirements, because the + # package's floor is not the docs site's. + python: ["3.9", "3.10", "3.11", "3.12", "3.13"] + steps: + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + - uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - name: Install the wheel (pulls in dash, nothing else) + run: | + python -m pip install --upgrade pip + python -m pip install dist/*.whl + + - name: Import and build a chart layout + run: | + python - <<'PY' + import dash + import dash_mui_charts as dmx + + layout = [ + dmx.LineChart(id="lc", series=[{"data": [1, 2, 3]}], + xAxis=[{"data": [0, 1, 2]}]), + dmx.BarChart(id="bc", series=[{"data": [4, 5, 6]}], + xAxis=[{"scaleType": "band", "data": ["a", "b", "c"]}]), + dmx.PieChart(id="pc", series=[{"data": [ + {"id": 0, "value": 10, "label": "A"}]}]), + dmx.SparklineChart(id="sc", data=[1, 3, 2]), + dmx.SimpleTreeView(id="tv", items=[ + {"itemId": "/", "label": "Home"}]), + dmx.TimeClock(id="tc", value="10:30"), + ] + for component in layout: + component.to_plotly_json() + print(f"dash={dash.__version__} dash_mui_charts={dmx.__version__} " + f"components={len(dmx.__all__)} OK") + PY + + lint-js: + name: JS sources parse + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "20" + # The committed bundle is what users actually load, and it is a build + # artifact nobody reviews line by line. Parsing it here is the + # cheapest guard against committing a truncated or half-written build. + - name: Parse the committed component bundle + run: | + for f in dash_mui_charts/*.js; do node --check "$f"; done + - name: Parse assets/*.js individually + # These are load-bearing at runtime: muiChartsFunctions.js is the + # functions-as-props registry, 00-loading-theme.js wins the asset + # race by name, 01-nav-restore.js replays the sidebar state. They + # only ever fail in the browser console. + run: | + for f in assets/*.js; do node --check "$f"; done + + pip-audit: + name: pip-audit (advisory) + runs-on: ubuntu-latest + timeout-minutes: 10 + # Advisory on purpose. A CVE in a transitive dependency of a docs site + # is worth knowing about the day it lands, and worth nobody's broken + # build at 2am. The report is the value. + continue-on-error: true + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - run: pip install pip-audit + - run: pip-audit -r requirements.txt --skip-editable diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1550df4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,154 @@ +name: Release + +# Tag-driven publish. Push a v* tag and this builds, verifies, publishes to +# PyPI via OIDC trusted publishing, and opens a GitHub Release. +# +# NO API TOKEN IS STORED ANYWHERE. Trusted publishing has PyPI verify a +# short-lived OIDC token minted by GitHub for this specific repo + workflow + +# environment, so there is no long-lived secret to leak or rotate. One-time +# setup on PyPI: +# pypi.org -> dash-mui-charts -> Publishing -> Add a new pending publisher +# Owner: pip-install-python +# Repository: dash-mui-charts +# Workflow name: release.yml +# Environment name: pypi +# +# PyPI currently serves 1.2.3; 1.3.0 and 1.4.0 were built locally but never +# published. Cutting them is a release DECISION, made by pushing the tag — +# this workflow only makes the mechanics safe. +on: + push: + tags: ["v*"] + workflow_dispatch: + inputs: + dry_run: + description: "Build and verify, but publish to TestPyPI instead of PyPI" + type: boolean + default: true + +jobs: + verify: + name: Verify the tag + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + # check_release.py compares git commit times of the bundle and the + # React source; a shallow clone turns that into a false skip. + fetch-depth: 0 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Tag must match the version in package.json + # Catches the classic release mistake: bumping the code but tagging + # the old number (or the reverse). PyPI would happily accept the + # mismatch, and a PyPI filename can never be reused. + if: startsWith(github.ref, 'refs/tags/v') + run: | + TAG="${GITHUB_REF_NAME#v}" + PKG_VER=$(python -c "import json;print(json.load(open('package.json'))['version'])") + echo "tag=$TAG package.json=$PKG_VER" + if [ "$TAG" != "$PKG_VER" ]; then + echo "::error::Tag v$TAG does not match package.json version $PKG_VER" + exit 1 + fi + + - name: Release consistency check + run: python scripts/check_release.py + + build: + name: Build distributions + runs-on: ubuntu-latest + needs: verify + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + # node makes the smoke test's JS syntax checks real — the committed + # bundle is what ships in the wheel, and check_release has already + # proven it fresh; no rebuild happens here. + - uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Smoke test against the current Dash + run: | + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + python scripts/smoke_test.py + + - name: Build + run: | + python -m pip install build twine + python -m build + python -m twine check dist/* + + - uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + + publish: + name: Publish to PyPI + needs: build + runs-on: ubuntu-latest + # The environment name must match the pending publisher configured on + # PyPI. Add a required reviewer on this environment in repo settings for + # a human approval gate between the tag and the upload. + environment: + name: pypi + url: https://pypi.org/p/dash-mui-charts + permissions: + # `id-token: write` is what lets GitHub mint the OIDC token PyPI + # checks. Without it trusted publishing fails with an opaque 403. + id-token: write + steps: + - uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - name: Publish to TestPyPI (manual dry run) + if: github.event_name == 'workflow_dispatch' && inputs.dry_run + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ + + - name: Publish to PyPI + if: startsWith(github.ref, 'refs/tags/v') + uses: pypa/gh-action-pypi-publish@release/v1 + + github-release: + name: GitHub Release + needs: publish + if: startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - name: Extract this version's CHANGELOG section + run: | + VERSION="${GITHUB_REF_NAME#v}" + awk -v v="$VERSION" ' + $0 ~ "^## \\[" v "\\]" {found=1; next} + found && /^## \[/ {exit} + found {print} + ' CHANGELOG.md > release-notes.md + if [ ! -s release-notes.md ]; then + echo "See CHANGELOG.md for details." > release-notes.md + fi + cat release-notes.md + + - uses: softprops/action-gh-release@v2 + with: + body_path: release-notes.md + files: dist/* + generate_release_notes: true diff --git a/.gitignore b/.gitignore index 9bd24bc..f2a613e 100644 --- a/.gitignore +++ b/.gitignore @@ -61,4 +61,9 @@ htmlcov/ .env.*.local # Dash -# Note: .min.js.map files ARE committed — needed for production deployment \ No newline at end of file +# Note: .min.js.map files ARE committed — needed for production deployment +# Satellite analytics hit log (lib/analytics.py) — local, ephemeral +analytics/ + +# Project-local Claude working files (plans, screenshots, session notes) +.claude/ diff --git a/CHANGELOG.md b/CHANGELOG.md index e98f1c7..0bd76f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,335 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Boilerplate migration — M5 (API reference) + +- **NEW `/api` page**: every prop of all 13 components as tables generated + from the components' own metadata via the `.. kwargs::` directive — they + can never drift from the installed version. Enabling fix in + `lib/directives/kwargs.py`: the numpy-style override (built for + dash-mantine-components docstrings) shadowed markdown2dash's own parser + for `dash-generate-components` docstrings, so dash-built components + rendered EMPTY tables; the hook now falls back to the base parser when + it sees "Keyword arguments:". Navbar gains a Reference section; route + count 40 → 41 (both parity baselines re-recorded deliberately). +- **Home stays the bespoke Python page** it already was — it mounts no + charts, carries the brand/install/catalog and a full LLMS_DOC, and + per-satellite custom homes are the network norm. Changelog likewise + stays a Python page (its disk read is exercised by the suite on every + run). + +### Fixed — tree rendering under the boilerplate shell (owner review) + +- **TreeView and SimpleTreeView now follow the theme toggle** — both + components gained the `data-mantine-color-scheme` watcher + + MUI ThemeProvider that TreeViewPro and TimeClock already had, so + checkboxes, icons and edit fields switch with light/dark mode instead + of rendering in the light palette everywhere (component fix in + src/lib/components, bundle + wrappers rebuilt; wrappers regenerated on + the current dash-generate-components, gaining its dash≤4.1 compat shim). +- **Trees no longer overflow their fixed-height boxes** — the + boilerplate's global markdown list styling (`ul/ol` and `li` margins in + assets/main.css) leaked into MUI's nested ul/li tree DOM, inflating + every tree's height (a `height=200` tree bled into the next section on + /tree-icons). Neutralized inside tree roots via assets/dark-mode.css; + upstream, the boilerplate rule should arguably be prose-scoped. +- The /tree-icons SX demo's hardcoded light `#f8f9ff` background became + `var(--mantine-color-default)` — it was unreadable in dark mode. +- **The `height` prop now actually contains the tree** (TreeView and + SimpleTreeView): a fixed height previously sized the wrapper only — + block children grow past a fixed-height parent and divs don't clip, so + the tree rendered full-length over the next section. `height` now + implies `overflow: auto` on the wrapper, making the /tree-icons + "Fixed Height with Scroll" demo do what its title says. + +### Boilerplate migration — M4 (TreeView + Date & Time Pickers) + +- **Ten more pages markdown-driven** — the eight TreeView pages (basic, + simple, selection, expansion, editing, icons, disabled, and the Pro + page with its live license-posture badge kept) and both pickers + (`/time-clock`, and `/time-clock-lab` with its liquid-glass styling + intact). Whole-page transforms, ids and callbacks verbatim; the four + existing LLMS_DOC bodies folded into their md pages. Only home and + changelog remain in pages/. +- **The dogfooding story returns as content**: `/tree-simple` gained a + sidebar demo built FROM `components/navbar.py`'s real family map — a + SimpleTreeView that genuinely navigates these docs, exactly as the + pre-migration shell's sidebar did (it can never drift from the actual + nav because it is generated from it). Chart baseline deliberately + re-recorded: 195 mounts, 79 chart-touching callbacks. + +### Boilerplate migration — M3 (the LineChart batch) + +- **Twelve more pages markdown-driven (38 of 40)** — the seven LineChart + pages (basics, Pro, brush, reference lines, highlighting, ticks & hover, + zoom preview), `/highlighting-sync`, `/crosshair`, and the three + CompositeChart pages. The batch's 7,550 lines ported as whole-page + transforms — one `demo.py` exec module per page, every id and all ~50 + callbacks verbatim (the sync-tooltip overlays, the crosshair alert + system and the render-BP LoadingOverlay dashboard included) — with md + wrappers carrying frontmatter, overview prose, and the two existing + LLMS_DOC bodies folded in. Per-section md granularity for this family is + deliberately deferred to a content pass; the format, metadata, TOC/ad + asides and real llms.txt documents are all in place now. +- **Every Pro route now explains the key requirement in-page** + (BANNER_ROUTES == PRO_ROUTES): the twelve md files carry the Pro + admonition naming MUI_PRO_API_KEY, so silent degradation to a + watermarked chart with no explanation is no longer an allowed posture — + the test asserts it stays that way. +- Transform bugs the gates caught before runtime: the module cut point + matched `from dash_mui_charts import` inside LLMS_DOC code fences + (syntax error), prose lines starting with "from " were harvested as + imports, the banner-block strip went one line too deep on the two + banner pages, and two pages lost the `import dash` their callbacks use + (F821). All fixed; flake8 and chart parity green. + +### Boilerplate migration — M2 (BarChart + Candlestick + LiveTrading) + +- **Eight more pages markdown-driven** (26 of 40): the six BarChart pages + (`/barchart-basic` 6 examples, `/barchart-dataset` 3, `/barchart-stacking` + 5, `/barchart-interaction` 5 incl. the click/axis-click/highlight + callbacks, `/barchart-reference` 6, `/barchart-pro` 3 Pro zoom demos with + the license-posture line in the first), `/candlestick` (7 examples over a + shared OHLC generator; the never-rendered 60-candle dataset dropped as + dead code), and `/live-trading` (the whole simulator — 11 callbacks — + transformed as one exec module; the redundant View Code block replaced by + `.. source::`). Chart parity GREEN throughout. +- **Directory naming rule learned**: families whose examples import shared + `_data.py` need UNDERSCORE directories (`docs/barchart_basic/`) — a + hyphenated package can be exec'd via importlib but cannot be + sibling-imported (`from docs.barchart-basic._data import x` is a syntax + error). Endpoints are unaffected (frontmatter owns them). +- `/live-trading` joined BANNER_ROUTES: its markdown now documents the + MUI_PRO_API_KEY requirement permanently (Pro admonition + + functions-as-props note) rather than only when the key is missing. + +### Boilerplate migration — M1 (Pie + Heatmap + Scatter) + +- **Five more pages markdown-driven** (18 of 40 routes' chart content now + under docs/): `/pie` (6 exec examples), `/pie-props` (Titanic nested-pie + playground, transformed whole), `/scatter` (7 examples sharing a + seeded `_data.py` so every point cloud renders exactly as before), + `/heatmap` (7 Pro examples + the color-scale reference as a real + markdown table), `/heatmap-props` (Pro playground, transformed whole). + Same endpoints, chart ids and callbacks throughout — chart parity GREEN + against the pre-migration baseline. +- **Pro degradation tests pinned by ROUTE, not source file** — the + migration moves key-reading code from pages/.py into docs/ exec + modules, but the route's obligation to degrade (banner or unlicensed + chart, never a traceback) doesn't move. 17 Pro routes, 6 banner routes, + set-equality both ways. +- Transform fix caught by lint: the heatmap-props port had dropped its + `json` import (cell-click display would have crashed); restored, plus + inherited f-string debt cleaned rather than carried into docs/. +- The stale "0.0.8" release banner on the Scatter page retired; its + llms.txt placeholder stubs (both props pages) became real documents. + +### Boilerplate migration — M0 (shell + chart-parity gate + Sparkline pilot) + +- **The docs app now runs on the dash-documentation-boilerplate structure** + (model: dash_pannellum): `run.py` entry point (gunicorn `run:server`), + `components/` appshell/header/navbar, pluggable-backend plumbing (Flask + enforced until the analytics hooks grow async twins), dependency floors + at boot, optional Clerk (vendored 0.9.1, dormant without keys), proxy + scheme fix, optional Dash MCP, and `pages/markdown.py` serving + `docs/**/*.md` with frontmatter, TOC asides, `.. exec::` live examples + and per-page llms.txt built from the markdown body. +- **Chart parity replaces exact-tree parity as the migration gate** + (`scripts/route_parity.py --charts-only`): route set, per-route + dash_mui_charts census, chart component ids, and the 78 chart-touching + callbacks — recorded from the pre-migration app and GREEN after M0: all + 40 routes, 194 chart mounts identical. +- **SparklineChart family ported to markdown** (`docs/sparkline*/`): 3 md + pages + 11 exec example modules, callbacks verbatim, same endpoints. The + three placeholder llms.txt stubs became real documents for free. +- **The docs stack moves to Dash 4.4 / dmc 2.7** (requirements.txt; + markdown2dash installs `--no-deps` against its gunicorn<22 pin, mistune + listed explicitly — LESSONS §8). The dash_mui_charts PACKAGE floor is + unchanged (dash>=3.3). +- **Ad client returns to the canonical boilerplate copy** — per-page aside + slots served by the mount-fired MATCH callback, `AD_APP_ID=muicharts`. + The floating-slot fork (and the double-impression bug it dodged) retired + with the static shell that caused it. +- **Old shell retired**: SimpleTreeView sidebar (nav is now the grouped + boilerplate navbar; the dogfooding story moves into the TreeView docs in + M4), `00-loading-theme.js` + `01-nav-restore.js` (they fought the new + color-scheme system / targeted the removed tree), the dead + license-key-store. `dcc.Location(id="url")` and the SPA analytics + counting rule carry over unchanged; the header keeps the + `header-avatar` favicon-swapper contract and the package-version badge. +- Tests updated for the new shell (80 passing, zero secrets): navbar + family map ↔ registry parity, per-page aside ad slots, old-shell assets + stay deleted; identity/card/version/traffic suites unchanged. +- **M0 owner-review fixes**: the boilerplate's `main.css`/`m2d.css`/ + `llms_copy.js` now ship in assets/ (their absence left the theme toggle + showing sun AND moon, and nav links unstyled); the navbar renders the + old sidebar's SHORT labels with per-item icons ("BARCHART / Basic", not + "BARCHART / Bar Chart - Basic") from a (path, label, icon) map; the + stale "(0.0.8)" dropped from the Scatter page's display name; the + Discord WidgetBot crate removed entirely (run.py, requirements, + render.yaml); `.claude/` is untracked and gitignored (owner request — + session plans and screenshots live outside version control now). + +### Network-standard pass — Phase 4 (deploy cutover, repo side) + +- **render.yaml declares the cutover**: `domains: [muicharts.2plot.dev]` + plus every env var the app reads (`APP_BASE_URL` and `AD_APP_ID` with + their canonical values, `NETWORK_BULLETIN_URL` pointing at the hub feed, + `WIDGETBOT_*` optional, the existing secrets). LESSONS §10 caveat is in + the file itself: blueprint envVars apply on Blueprint SYNC, not git-push + autodeploys — every value must also be set on the SERVICE in the Render + dashboard. +- **Not applicable here**: the Clerk satellite env from STANDARD §9 — this + app ships no auth surface (no dash-clerk-auth anywhere); nothing to + configure until it ever gains one. +- **Owner actions remain before go-live** (deliberately not automatable): + upload `build/social-cards/muicharts.2plot.dev.png` to + cdn.2plot.ai/github_assets/ and verify 200 + IHDR 1200×630 (the HARD + GATE — smoke_live fails the deploy while it 404s, by design), set the + service env, attach the subdomain + DNS, merge to main, then hub-side + STANDARD §9 in pip-docs+ (promote shipping→live, VERIFIED_APP_IDS). + +### Network-standard pass — Phase 3 (tests + CI/CD) + +- **tests/ populated (80 tests, ZERO secrets by design)** — the suite runs + exactly as CI's secretless container does, proving the degraded postures: + the 17 MUI Pro pages fall back to license banners instead of dying, the + traffic reporter stays dormant, the bulletin stays off. Files: site + identity (one brand, every surface), social card (per-page image_url + + description, template division rules, the placeholder-in-comment trap), + **version parity** (the fix for the five-way version drift: package.json ↔ + package-info.json ↔ header badge ↔ JSON-LD ↔ noscript, and no surface may + claim "9 components" again), route smoke + preservation invariants (the + `url` Location contract, the SimpleTreeView nav with every leaf routed, + the ad-slot fork, asset contracts), internal-traffic contract (both + halves), and the SPA/doc **counting rule** as executable arithmetic. +- **CI (`ci.yml`)** — lint (flake8 with a budgeted, documented pages/ debt + ledger in `.flake8`, plus actionlint first), secretless pytest + a real + gunicorn boot probed by the network battery, a **Docker job** that builds + the production image, asserts version fingerprints INSIDE it (dash ≥4.1, + dimll ≥2.3.4, gunicorn ≥23) and boots it against the same battery CD runs + (LESSONS §19), a Dash **matrix** (4.1.0/4.2.0/4.3.0/4.4.1 × py3.12 + + 4.4.1 × 3.10/3.13) that rebuilds the components with Node 20 (`npm ci` + + build + validate-init) before smoke-testing, wheel build + clean-venv + verification (13 components, `top_level == dash_mui_charts`, version == + package.json, and a **measured dash==3.3.0 floor install**), a package × + Python 3.9–3.13 range, JS parse checks on the committed bundle and every + asset script, and advisory pip-audit. +- **CD (`cd.yml`)** — main → full CI → Render deploy hook → 120s settle + + 5 consecutive healthz 200s (Render swaps instances; one 200 proves + nothing) → `network_smoke.py` + `smoke_live.py` against the live domain, + including the social card's real pixels. Peer checks warn; own-host + checks fail. +- **Release (`release.yml`)** — tag-gated PyPI publish via OIDC trusted + publishing (no stored token), gated on tag == package.json version and + `scripts/check_release.py`; GitHub Release cut from the CHANGELOG + section. Publishing 1.3.0/1.4.0 remains a decision, not a side effect. +- **Scripts** — `network_smoke.py` (boilerplate battery, per-site block: + this brand's H1, `/sparkline/llms.txt`, hidden-page canaries), + `smoke_live.py` (canonical copy with the LESSONS §21 wake loop), + `check_release.py` (versions, bundle freshness via git timestamps, a + Python class per React component, packaging/SEO/network invariants), + `smoke_test.py` (the matrix's structural gate — 40 routes, 200s, + healthz, ≥150 chart mounts, node parse of every JS artifact). +- **Two Dash floors made explicit and measured** — the DOCS SITE needs + dash ≥4.1 (dash-improve-my-llms pins `dash<5,>=4.1`; production already + resolves 4.4.x), while the PACKAGE needs only ≥3.3: `setup.py` now claims + `dash>=3.3.0` (raised from an unmeasured `>=3.0.0`) and + `python_requires>=3.9` (3.13 classifier added, untested 3.8 dropped) — + both now measured by CI rather than asserted. Verified locally: the full + route-parity gate is green under Dash 4.4.1, byte-identical to the 3.3.0 + baseline. +- **gunicorn floor raised to ≥23** in requirements.txt — closes + CVE-2024-6827 / CVE-2024-1135 (request smuggling); asserted inside the + Docker image by CI so it cannot silently regress. +- Housekeeping: `import dash` (unused) dropped from app.py; flake8 config + added with per-file ignores documenting why app.py's late imports and the + pages idiom are deliberate. + +### Network-standard pass — Phase 2 (card + traffic + app id + bulletin) + +- **Social card generated** — `scripts/make_social_card.py` (boilerplate + template, this site's MUI-blue palette and area-chart mark) renders + `build/social-cards/muicharts.2plot.dev.png`, 1200×630. HARD GATE + outstanding: hand-upload to cdn.2plot.ai/github_assets/ and verify + 200 + IHDR before the og:image deploy. +- **Internal-traffic contract, both halves** — `lib/analytics.record` + drops `2plot-internal` UAs at write time, before bot classification; + the hourly rollup POST and every ad-server fetch now send + `internal_ua(...)` so the hub stops counting this app as a + python-requests bot. +- **One short app id: `muicharts`** — `traffic_report.APP_KEY`, + `ad_client.AD_APP_ID` default, bulletin app_id and /healthz all + converge on the directory key (legacy "dash-mui-charts" folds in at the + hub). NOTE: the 2plot.ai traffic sink still keys this app "charts" and + must gain a muicharts fold before deploy or its series forks. +- **Bulletin wired opt-in** — `lib/bulletin.py`; boot log states wired/off. + `NETWORK_BULLETIN_URL` must be set on the Render SERVICE (blueprint + envVars only apply on Blueprint sync). + +### Network-standard pass — Phase 1 (identity + llms surfaces) + +- **One brand, every surface** — `lib/constants.py` (SITE_BRAND + "dash-mui-charts — MUI X charts for Dash", SITE_DESCRIPTION, BASE_URL + defaulting to https://muicharts.2plot.dev, OG card block, INTERNAL_UA). + The header version badge, the JSON-LD version and the template origin are + now substituted from single sources of truth at boot — this repo carried + five conflicting version strings and three "9 components" claims (it has + 13; README and .claude/CLAUDE.md corrected). +- **dash-improve-my-llms ≥2.3.4 wired** — /llms.txt (site prose from + pages/home.py's LLMS_DOC), per-page //llms.txt, /robots.txt with + per-vendor bot policy, /sitemap.xml (40 URLs on the canonical origin), + per-route canonical/og prerender, cross-host network directory + (`lib/network_directory.py`). The analytics before_request stays + registered ahead of the bot middleware so crawler hits keep being + counted. +- **Every register_page carries title/description/image_url** — one + missing and Dash emits an empty tag that wins with scrapers; all 40 + routes verified to serve zero empty meta tags. 14 pages (home + one per + component family) carry LLMS_DOC prose sourced from SKILLS.md. +- **templates/index.html rebuilt on the dedup rule** — declares only what + Dash does not emit (og:site_name/locale/url, og:image auxiliaries, + twitter:image:alt); the duplicate hardcoded title, static og/twitter + block, stale JSON-LD and hardcoded canonical are gone. GA4 kept; favicon + randomizer kept but its header-avatar sync now retries bounded instead + of forever; SPA canonical/og:url sync script added. + +### Network-standard pass — Phase 0 (stabilize) + +- **Satellite analytics committed** — `lib/analytics.py` (SPA-aware hit + recorder), `lib/traffic_report.py` (hourly signed rollup + `/healthz`), + `verify_traffic.py` (headless pipeline verification against the hub's own + ingest verifier). All checks green. +- **Route-parity gate** — `scripts/route_parity.py` fingerprints all 40 + routes (component tree, ids, chart-mount counts, callback census, HTTP + sweep) against a committed baseline; every migration phase must keep it + green. +- **Requirements drift fixed** — `requirements-deploy.txt` deleted (it had + lost `requests`, so the Docker image could not import `app.py`); + `requirements.txt` is now the single dependency file for Render and the + Dockerfile alike. Dockerfile gains `PYTHONUNBUFFERED=1`. +- **Stray build artifact removed** — `dash_mui_charts/dash_mui_charts` was a + full copy of `package.json`, created by `build:backends` passing the + package name to `-p/--package-info-filename`; the flag now correctly says + `package-info.json` and the artifact is deleted. + +--- + +## [1.4.0] - 2026-07-19 + +### Added + +- **TreeViewPro kebab submenus + dividers.** `kebabMenuItems` entries may now be + a leaf `{label, value, icon?}`, a `{divider: true}` rule, or a submenu + `{label, icon?, children: [entries]}` that opens on hover/click (recursive + nesting; a leaf anywhere in the chain closes the whole menu and fires + `kebabAction`). +- **`kebabMenuItemsById`** — per-node kebab menus: `{itemId: [entries]}` + overrides the global `kebabMenuItems` for that node (same entry shape, + submenus/dividers included). Lets one tree carry different action sets for + different node types (channel nodes vs media nodes vs viewport nodes — the + 2plot.media /360-broadcast use case that motivated this). + --- ## [1.3.0] - 2026-06-05 diff --git a/Dockerfile b/Dockerfile index 01c68e5..0bc86d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,28 @@ +# dash-mui-charts docs — production image (Render docker runtime). +# +# NO node toolchain: the dash_mui_charts component bundle + generated Python +# wrappers are COMMITTED to git (dash_mui_charts/*.min.js + *.py), so +# `pip install .` works without npm. TRADE-OFF: changes under src/lib require +# a local `npm run build` and committing the regenerated artifacts. FROM python:3.11-slim +# Block-buffered stdout never reaches platform logs through gunicorn — +# boot diagnostics (traffic reporter state, bulletin state, dependency +# floors) must flush. +ENV PYTHONUNBUFFERED=1 + WORKDIR /app -# Install deploy dependencies first (cached layer) -COPY requirements-deploy.txt . -RUN pip install --no-cache-dir -r requirements-deploy.txt +# dash-clerk-auth is not on PyPI; requirements.txt installs it from ./vendor. +COPY vendor ./vendor +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt +# markdown2dash pins gunicorn<22, conflicting with the CVE-driven gunicorn>=23 +# in requirements.txt (CVE-2024-6827, CVE-2024-1135 — request smuggling). Its +# real dependencies are all in requirements.txt already, so it is installed +# alone, without letting pip see the spurious pin. CI asserts the resulting +# gunicorn version INSIDE this image (LESSONS §8). +RUN pip install --no-cache-dir --no-deps markdown2dash==0.1.2 # Copy project and install dash-mui-charts from local source COPY . . @@ -12,4 +30,4 @@ RUN pip install --no-cache-dir . EXPOSE 8550 -CMD ["gunicorn", "app:server", "-b", "0.0.0.0:8550", "--workers", "2", "--timeout", "120"] +CMD ["gunicorn", "run:server", "-b", "0.0.0.0:8550", "--workers", "2", "--timeout", "120"] diff --git a/README.md b/README.md index 55173e8..7801807 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,10 @@ A Dash component library wrapping [MUI X Charts](https://mui.com/x/react-charts/ - **Heatmap** - Matrix visualizations with customizable color scales - **SparklineChart** - Compact inline charts for dashboards and tables - **LiveTradingChart** - Real-time streaming charts for live data visualization +- **TreeView** - Data-driven rich tree with controlled selection, expansion, and label editing +- **SimpleTreeView** - Lightweight JSX-driven tree for navigation sidebars +- **TreeViewPro** - Drag-and-drop reordering, lazy loading, per-item slider + kebab controls (Pro) +- **TimeClock** - Inline clock-face time picker (MUI X Date & Time Pickers) ## Installation diff --git a/app.py b/app.py deleted file mode 100644 index e46d3d2..0000000 --- a/app.py +++ /dev/null @@ -1,322 +0,0 @@ -""" -Dash MUI Charts — Demo Application -Professional AppShell layout with sidebar tree navigation and dark/light mode. -""" - -import os - -import dash -import dash_mantine_components as dmc -from dash import Dash, html, dcc, callback, Input, Output, State, page_container, clientside_callback -from dash_iconify import DashIconify - -from dash_mui_charts import SimpleTreeView - -from lib.ad_client import create_ad_component, register_shell_ad - -# Load .env if available -try: - from dotenv import load_dotenv - load_dotenv() -except ImportError: - pass - -MUI_LICENSE_KEY = os.environ.get('MUI_PRO_API_KEY', '') - -# --------------------------------------------------------------------------- -# WidgetBot Discord Crate — must register BEFORE Dash() -# --------------------------------------------------------------------------- -from dash_widgetbot import add_discord_crate - -WIDGETBOT_SERVER = os.environ.get('WIDGETBOT_SERVER', '') -WIDGETBOT_CHANNEL = os.environ.get('WIDGETBOT_CHANNEL', '') - -if WIDGETBOT_SERVER and WIDGETBOT_CHANNEL: - add_discord_crate( - server=WIDGETBOT_SERVER, - channel=WIDGETBOT_CHANNEL, - color="#1976d2", - location=["bottom", "right"], - defer=True, - ) - -# Load custom index template with SEO meta tags, favicon randomizer, and analytics -_template_path = os.path.join(os.path.dirname(__file__), 'templates', 'index.html') -with open(_template_path, encoding='utf-8') as _f: - _index_string = _f.read() - -app = Dash( - __name__, - use_pages=True, - suppress_callback_exceptions=True, - index_string=_index_string, -) -server = app.server # WSGI entry point for gunicorn: gunicorn app:server - -# Store license key for pages -app.server.config['MUI_LICENSE_KEY'] = MUI_LICENSE_KEY - -# --------------------------------------------------------------------------- -# Navigation tree items — groups use "group-*" ids, leaves use page paths -# --------------------------------------------------------------------------- -NAV_ITEMS = [ - {"itemId": "/", "label": "Home", "icon": "Home"}, - {"itemId": "/changelog", "label": "Changelog", "icon": "History"}, - {"itemId": "group-sparkline", "label": "SparklineChart", "icon": "Timeline", "children": [ - {"itemId": "/sparkline", "label": "Examples", "icon": "PlayArrow"}, - {"itemId": "/sparkline-style", "label": "Styling", "icon": "Palette"}, - {"itemId": "/sparkline-style-advanced", "label": "Advanced", "icon": "AutoGraph"}, - ]}, - {"itemId": "group-pie", "label": "PieChart", "icon": "PieChart", "children": [ - {"itemId": "/pie", "label": "Examples", "icon": "PlayArrow"}, - {"itemId": "/pie-props", "label": "Props Explorer", "icon": "Tune"}, - ]}, - {"itemId": "group-barchart", "label": "BarChart", "icon": "BarChart", "children": [ - {"itemId": "/barchart-basic", "label": "Basic", "icon": "PlayArrow"}, - {"itemId": "/barchart-dataset", "label": "Dataset Mode", "icon": "TableChart"}, - {"itemId": "/barchart-stacking", "label": "Stacking", "icon": "StackedBarChart"}, - {"itemId": "/barchart-interaction", "label": "Interaction", "icon": "TouchApp"}, - {"itemId": "/barchart-reference", "label": "Reference Lines", "icon": "Rule"}, - {"itemId": "/barchart-pro", "label": "Pro Features", "icon": "Diamond"}, - ]}, - {"itemId": "group-heatmap", "label": "Heatmap", "icon": "GridOn", "children": [ - {"itemId": "/heatmap", "label": "Examples", "icon": "PlayArrow"}, - {"itemId": "/heatmap-props", "label": "Props Explorer", "icon": "Tune"}, - ]}, - {"itemId": "group-scatter", "label": "ScatterChart", "icon": "ScatterPlot", "children": [ - {"itemId": "/scatter", "label": "Examples", "icon": "PlayArrow"}, - ]}, - {"itemId": "group-linechart", "label": "LineChart", "icon": "ShowChart", "children": [ - {"itemId": "/linechart-basic", "label": "Basics", "icon": "PlayArrow"}, - {"itemId": "/linechart-pro", "label": "Pro Features", "icon": "Diamond"}, - {"itemId": "/linechart-brush", "label": "Brush Selection", "icon": "Brush"}, - {"itemId": "/linechart-referencelines", "label": "Reference Lines", "icon": "Rule"}, - {"itemId": "/linechart-highlighting", "label": "Highlighting", "icon": "Highlight"}, - {"itemId": "/highlighting-sync", "label": "Highlighting Sync", "icon": "Sync"}, - {"itemId": "/linechart-zoom-preview", "label": "Zoom Preview", "icon": "ZoomIn"}, - {"itemId": "/linechart-tick-hover", "label": "Ticks & Hover", "icon": "Mouse"}, - {"itemId": "/crosshair", "label": "Crosshair", "icon": "GpsFixed"}, - ]}, - {"itemId": "group-candlestick", "label": "CandlestickChart", "icon": "CandlestickChart", "children": [ - {"itemId": "/candlestick", "label": "OHLC Charts", "icon": "PlayArrow"}, - ]}, - {"itemId": "group-livetrading", "label": "LiveTradingChart", "icon": "TrendingUp", "children": [ - {"itemId": "/live-trading", "label": "Examples", "icon": "PlayArrow"}, - ]}, - {"itemId": "group-composite", "label": "CompositeChart", "icon": "Layers", "children": [ - {"itemId": "/composite", "label": "Examples", "icon": "PlayArrow"}, - {"itemId": "/composite-v120", "label": "v1.2.1", "icon": "Star"}, - {"itemId": "/composite-render-bp", "label": "Render BP", "icon": "Speed"}, - ]}, - {"itemId": "group-treeview", "label": "TreeView", "icon": "AccountTree", "children": [ - {"itemId": "/tree-basic", "label": "Basic", "icon": "PlayArrow"}, - {"itemId": "/tree-simple", "label": "Simple", "icon": "ViewList"}, - {"itemId": "/tree-selection", "label": "Selection", "icon": "CheckBox"}, - {"itemId": "/tree-expansion", "label": "Expansion", "icon": "UnfoldMore"}, - {"itemId": "/tree-editing", "label": "Editing", "icon": "Edit"}, - {"itemId": "/tree-icons", "label": "Icons", "icon": "Palette"}, - {"itemId": "/tree-disabled", "label": "Disabled", "icon": "Block"}, - {"itemId": "/tree-pro", "label": "Pro", "icon": "Diamond"}, - ]}, - {"itemId": "group-pickers", "label": "Date & Time Pickers", "icon": "Schedule", "children": [ - {"itemId": "/time-clock", "label": "Time Clock", "icon": "AccessTime"}, - {"itemId": "/time-clock-lab", "label": "TimeClock Lab", "icon": "Science"}, - ]}, -] - -ALL_GROUP_IDS = [item["itemId"] for item in NAV_ITEMS if item["itemId"].startswith("group-")] - -# --------------------------------------------------------------------------- -# Layout -# --------------------------------------------------------------------------- -theme_toggle = dmc.ColorSchemeToggle( - lightIcon=DashIconify(icon="radix-icons:sun", width=18), - darkIcon=DashIconify(icon="radix-icons:moon", width=18), - size="md", -) - -header = dmc.AppShellHeader( - dmc.Group( - [ - dmc.Group( - [ - dmc.Burger(id="burger", size="sm", hiddenFrom="sm", opened=False), - dmc.Avatar( - id="header-avatar", - src="/assets/favicon_areachart.ico", - size="sm", - radius="sm", - ), - dmc.Text("Dash MUI Charts", fw=700, size="lg"), - dmc.Badge("v1.3.0", variant="light", size="sm", color="blue", - visibleFrom="xs"), - ], - gap="xs", - ), - dmc.Group( - [ - html.A( - dmc.ActionIcon( - DashIconify(icon="mdi:book-open-variant", width=22), - variant="subtle", - color="gray", - size="lg", - ), - href="https://pip-install-python.com", - target="_blank", - title="Pip Install Python — All Packages", - ), - html.A( - dmc.ActionIcon( - DashIconify(icon="mdi:github", width=22), - variant="subtle", - color="gray", - size="lg", - ), - href="https://github.com/pip-install-python/dash-mui-charts", - target="_blank", - title="GitHub Repository", - ), - theme_toggle, - ], - gap="sm", - ), - ], - justify="space-between", - h="100%", - px="md", - style={"flex": 1}, - ) -) - -navbar = dmc.AppShellNavbar( - html.Div( - [ - html.Div( - SimpleTreeView( - id="nav-tree", - items=NAV_ITEMS, - defaultExpandedItems=[], - itemChildrenIndentation="8px", - sx={ - "& .MuiTreeItem-label": { - "fontSize": "14px", - "lineHeight": "1.6", - }, - "& .MuiTreeItem-content": { - "padding": "4px 10px", - "borderRadius": "6px", - "minHeight": "34px", - }, - }, - ), - style={ - "flex": "1 1 0", - "overflowY": "auto", - "overflowX": "hidden", - "padding": "12px", - }, - ), - html.Div( - dmc.Text("Pip Install Python LLC", size="xs", c="dimmed", ta="center", py="xs"), - style={"borderTop": "1px solid var(--mantine-color-default-border)"}, - ), - ], - style={ - "display": "flex", - "flexDirection": "column", - "height": "100%", - }, - ), - p=0, -) - -app.layout = dmc.MantineProvider( - [ - dmc.pre_render_color_scheme(), - dmc.AppShell( - [ - header, - navbar, - dmc.AppShellMain(page_container), - ], - header={"height": 60}, - navbar={ - "width": 260, - "breakpoint": "sm", - "collapsed": {"mobile": True}, - }, - padding="md", - id="appshell", - ), - dcc.Location(id="url", refresh="callback-nav"), - dcc.Store(id="license-key-store", data=MUI_LICENSE_KEY), - # 2plot.dev ad network: floating card anchored top-right, below the - # 60px header. Desktop only — a fixed card would cover content on - # small screens. - dmc.Box( - create_ad_component("__floating__", compact=True), - visibleFrom="md", - style={ - "position": "fixed", - "top": "72px", - "right": "16px", - "width": "230px", - "zIndex": 150, - }, - ), - ], -) - -# --------------------------------------------------------------------------- -# Callbacks -# --------------------------------------------------------------------------- - -# Ad network: the floating slot is static shell, so serve it per navigation -# with the real pathname for attribution — except the home and changelog -# pages, which stay ad-free. -register_shell_ad("url", exclude_paths=("/", "/changelog")) - -# 1. Tree selection → SPA navigate via dcc.Location -clientside_callback( - """ - (selected) => { - if (selected && typeof selected === 'string' && selected.startsWith('/')) { - if (window.location.pathname !== selected) { - return selected; - } - } - return window.dash_clientside.no_update; - } - """, - Output("url", "pathname"), - Input("nav-tree", "selectedItems"), -) - -# 2. Persist expanded state to localStorage (output to dummy, no cycle) -clientside_callback( - """ - (expanded) => { - try { localStorage.setItem('nav-tree-expanded', JSON.stringify(expanded || [])); } - catch(e) {} - return window.dash_clientside.no_update; - } - """, - Output("nav-tree", "id"), - Input("nav-tree", "expandedItems"), -) - -# 3. Burger toggle for mobile navbar -@callback( - Output("appshell", "navbar"), - Input("burger", "opened"), - State("appshell", "navbar"), -) -def toggle_navbar(opened, navbar_config): - navbar_config["collapsed"] = {"mobile": not opened} - return navbar_config - - - -if __name__ == '__main__': - app.run(debug=True, port=7666) diff --git a/assets/00-loading-theme.js b/assets/00-loading-theme.js deleted file mode 100644 index 17df894..0000000 --- a/assets/00-loading-theme.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Apply saved color scheme to BEFORE Dash renders. - * This runs immediately (assets are loaded before _dash-loading is shown) - * so the loading screen CSS can use [data-mantine-color-scheme="dark"]. - * - * Also swaps any page-level loading overlay logos to match the theme. - * Prefixed with 00- to ensure it loads before other assets. - */ -(function() { - try { - var saved = localStorage.getItem('mantine-color-scheme-value'); - if (saved === 'dark' || saved === 'light') { - document.documentElement.setAttribute('data-mantine-color-scheme', saved); - } - // Swap page loading logos after DOM is ready - if (saved === 'dark') { - var swapLogos = function() { - var logos = document.querySelectorAll('.page-loading-overlay img'); - logos.forEach(function(img) { - if (img.src.indexOf('light_mode') !== -1) { - img.src = '/assets/2plot_dark_mode.png'; - } - }); - }; - if (document.readyState === 'loading') { - document.addEventListener('DOMContentLoaded', swapLogos); - } else { - swapLogos(); - } - } - } catch(e) { - // localStorage unavailable — fall back to light - } -})(); diff --git a/assets/01-nav-restore.js b/assets/01-nav-restore.js deleted file mode 100644 index a6c227d..0000000 --- a/assets/01-nav-restore.js +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Restore nav tree expanded state and active selection after Dash renders. - * Uses dash_clientside.set_props when available, with graceful fallback. - */ -(function() { - function restoreNavTree() { - // Need set_props to be available - if (!window.dash_clientside || typeof window.dash_clientside.set_props !== 'function') { - return false; - } - - try { - // Restore expanded items from localStorage - var stored = localStorage.getItem('nav-tree-expanded'); - if (stored) { - var expanded = JSON.parse(stored); - if (Array.isArray(expanded) && expanded.length > 0) { - window.dash_clientside.set_props('nav-tree', { expandedItems: expanded }); - } - } - - // Sync selected item to current pathname - var pathname = window.location.pathname || '/'; - window.dash_clientside.set_props('nav-tree', { selectedItems: pathname }); - } catch(e) { - // set_props API may differ across Dash versions — fail silently - // The tree will still work, just without restored state on this load - } - - return true; - } - - function waitAndRestore() { - if (restoreNavTree()) return; - // Retry until set_props is available (max ~5 seconds) - if (waitAndRestore._retries > 25) return; - waitAndRestore._retries = (waitAndRestore._retries || 0) + 1; - setTimeout(waitAndRestore, 200); - } - - if (document.readyState === 'complete') { - setTimeout(waitAndRestore, 300); - } else { - window.addEventListener('load', function() { - setTimeout(waitAndRestore, 300); - }); - } -})(); diff --git a/assets/dark-mode.css b/assets/dark-mode.css index 9902f82..f23c0d2 100644 --- a/assets/dark-mode.css +++ b/assets/dark-mode.css @@ -405,3 +405,28 @@ body:has(._dash-loading)::after { [data-mantine-color-scheme="dark"] .bp-loading-logo { content: url("/assets/2plot_dark_mode.png"); } + + +/* ============================================================ + MUI Tree View vs the boilerplate's global list styling + ------------------------------------------------------------ + assets/main.css (boilerplate copy) styles BARE ul/ol/li for markdown + prose: `ul, ol { margin-bottom: 1rem; padding-left: 1.5rem }` and + `li { margin-bottom: .5rem }`. MUI trees render as nested ul/li; MUI's + emotion classes declare their own indentation (so padding-left loses to + them) but declare NO margins — the globals leaked through, inflating + every tree's height (a height=200 tree overflowed its box into the next + section on /tree-icons). Scope-neutralize the margins here; upstream, + the boilerplate rule should arguably be prose-scoped. + ============================================================ */ +.MuiRichTreeView-root, +.MuiSimpleTreeView-root { + padding-left: 0; + margin-bottom: 0; +} +.MuiRichTreeView-root ul, +.MuiSimpleTreeView-root ul, +.MuiRichTreeView-root li, +.MuiSimpleTreeView-root li { + margin-bottom: 0; +} diff --git a/assets/llms_copy.js b/assets/llms_copy.js new file mode 100644 index 0000000..d799751 --- /dev/null +++ b/assets/llms_copy.js @@ -0,0 +1,109 @@ +/** + * Per-page "Copy llms.txt URL" button handler. + * + * Wires up every `.llms-copy-button` so that clicking it copies + * `//llms.txt` to the clipboard. Paste the result + * into ChatGPT, Claude, or any LLM to share the page's prose docs. + * + * The `llms.toon` and `page.json` button handlers were removed in v0.5.0 + * — `dash-improve-my-llms` 2.0 dropped both endpoints. + */ + +document.addEventListener('DOMContentLoaded', function () { + console.log('LLM copy-button handler loaded'); + + async function copyToClipboard(text) { + // Modern Clipboard API path + if (navigator.clipboard && navigator.clipboard.writeText) { + try { + await navigator.clipboard.writeText(text); + return true; + } catch (err) { + console.warn('Clipboard API failed, trying fallback:', err); + } + } + + // Fallback for non-secure contexts (HTTP / older browsers) + const textarea = document.createElement('textarea'); + textarea.value = text; + textarea.style.position = 'fixed'; + textarea.style.opacity = '0'; + document.body.appendChild(textarea); + textarea.focus(); + textarea.select(); + try { + const success = document.execCommand('copy'); + document.body.removeChild(textarea); + return success; + } catch (err) { + console.error('execCommand failed:', err); + document.body.removeChild(textarea); + return false; + } + } + + function cleanPagePath() { + const p = window.location.pathname; + return p.endsWith('/') ? p.slice(0, -1) : p; + } + + function flashButton(button, originalText, message, color) { + button.textContent = message; + button.style.color = color; + setTimeout(() => { + button.textContent = originalText; + button.style.color = ''; + }, 2000); + } + + function setupCopyButtons() { + const byClass = document.querySelectorAll('.llms-copy-button'); + const byId = document.querySelectorAll('[id^="llm-copy-button-"]'); + const all = new Set([...byClass, ...byId]); + + all.forEach((button) => { + if (button.dataset.copySetup) return; + button.dataset.copySetup = 'true'; + + button.addEventListener('click', async function (e) { + e.preventDefault(); + e.stopPropagation(); + + try { + const url = `${window.location.origin}${cleanPagePath()}/llms.txt`; + const ok = await copyToClipboard(url); + const original = button.textContent; + if (ok) { + flashButton(button, original, '✓ Copied!', 'var(--mantine-color-teal-6)'); + console.log('Copied to clipboard:', url); + } else { + throw new Error('All copy methods failed'); + } + } catch (err) { + console.error('Failed to copy:', err); + const original = button.textContent; + flashButton(button, original, '❌ Failed', 'var(--mantine-color-red-6)'); + } + }); + }); + } + + // Initial pass + setupCopyButtons(); + + // Dash sometimes finishes rendering after DOMContentLoaded; re-bind + // a couple of times on a delay to catch late-arriving nodes. + setTimeout(setupCopyButtons, 500); + setTimeout(setupCopyButtons, 1000); + setTimeout(setupCopyButtons, 2000); + + // Re-run on any page change + const observer = new MutationObserver(() => { + clearTimeout(window.llmsCopyTimeout); + window.llmsCopyTimeout = setTimeout(setupCopyButtons, 100); + }); + const target = document.getElementById('_pages_content') || document.body; + observer.observe(target, { childList: true, subtree: true }); + + console.log('LLM copy-button observer active'); +}); diff --git a/assets/m2d.css b/assets/m2d.css new file mode 100644 index 0000000..25a2943 --- /dev/null +++ b/assets/m2d.css @@ -0,0 +1,111 @@ +h2.m2d-heading { + font-weight: 300; + font-size: 30px; +} + +h5.m2d-heading { + font-weight: 500; + margin-top: 30px; + margin-bottom: 15px; +} + +h4.m2d-heading { + font-weight: 400; + margin-bottom: 15px; + margin-top: 30px; +} + +h3.m2d-heading { + font-weight: 500; + margin-top: 40px; + font-size: 20px; + margin-bottom: 15px; +} + +.m2d-paragraph, .m2d-list { + font-size: 15px; + line-height: 1.5; + margin-bottom: 10px; + margin-top: 10px; +} + +.m2d-block-code { + margin-top: 20px; + margin-bottom: 20px; +} + +/* Theme-aware styling for m2d code blocks */ +:root[data-mantine-color-scheme="light"] .m2d-block-code pre { + background-color: #f8f9fa; + border: 1px solid #dee2e6; + color: #1a1b1e; +} + +:root[data-mantine-color-scheme="dark"] .m2d-block-code pre { + background-color: #1a1b1e; + border: 1px solid #373a40; + color: #c1c2c5; +} + +/* Inline code in markdown content */ +:root[data-mantine-color-scheme="light"] .m2d-paragraph code, +:root[data-mantine-color-scheme="light"] .m2d-list code { + background-color: #f1f3f5; + color: #1a1b1e; +} + +:root[data-mantine-color-scheme="dark"] .m2d-paragraph code, +:root[data-mantine-color-scheme="dark"] .m2d-list code { + background-color: #25262b; + color: #c1c2c5; +} + +.m2d-block-exec > *:first-child { + margin-bottom: 10px; +} + +.m2d-block-exec { + margin-bottom: 20px; +} + +.m2d-strong { + font-weight: 500 +} + +.m2d-block-kwargs { + margin-bottom: 30px; +} + +.m2d-block-kwargs > thead > tr > th { + font-size: 15px; + font-weight: 500; +} + +.m2d-link { + font-size: 15px; +} + +.m2d-block-kwargs td:nth-child(3) { + width: 250px; +} + +.m2d-block-kwargs td:nth-child(1) { + width: 200px; +} + +.m2d-table > thead > tr > th { + font-size: 15px; + font-weight: 500; +} + +.m2d-table td:nth-child(3) { + width: 500px; +} + +.m2d-table td:nth-child(1) { + width: 200px; +} + +.m2d-block-admonition { + margin: 10px 0; +} diff --git a/assets/main.css b/assets/main.css new file mode 100644 index 0000000..ec6d2ad --- /dev/null +++ b/assets/main.css @@ -0,0 +1,508 @@ +@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700&display=swap'); + +html { + scroll-behavior: smooth; + scroll-padding-top: 90px; +} + +body { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; +} + +/* Improved text readability */ +p { + line-height: 1.6; + margin-bottom: 1rem; +} + +/* Better heading spacing */ +h1, h2, h3, h4, h5, h6 { + margin-top: 1.5em; + margin-bottom: 0.5em; + line-height: 1.3; +} + +h1:first-child, +h2:first-child, +h3:first-child { + margin-top: 0; +} + +/* Link styling */ +a { + transition: all 0.2s ease; +} + +/* Better list spacing */ +ul, ol { + margin-bottom: 1rem; + padding-left: 1.5rem; +} + +li { + margin-bottom: 0.5rem; +} + +/* Blockquote styling */ +blockquote { + border-left: 4px solid var(--mantine-color-teal-5); + padding-left: 1rem; + margin-left: 0; + margin-right: 0; + font-style: italic; + color: var(--mantine-color-dimmed); +} + +input:invalid { + outline: none !important; +} + +#wrapper { + padding: 10px; + margin-left: 320px; + margin-right: 320px; +} + +:root[data-mantine-color-scheme="dark"] #dark-theme-icon { + display: none; +} + +:root[data-mantine-color-scheme="light"] #light-theme-icon { + display: none; +} + +.demo-container { + display: flex; + max-width: 100%; + overflow: hidden; +} + +.demo-preview { + flex: 1; + display: flex; + flex-direction: column; + padding: 20px; + justify-content: center; +} + +.demo-controls { + width: 250px; + padding: 20px; + gap: 10px; +} + +.demo-control { + margin: 10px; +} + +@media only screen and (max-width: 750px) { + .demo-container { + flex-direction: column; + } + + .demo-controls { + width: 100%; + } +} + +.dmc-bar { + background-image: linear-gradient(to right, yellow, orange); +} + +.dmc-thumb { + border-color: orange; + height: 20px; + width: 20px; + background-color: white; +} + +.mantine-Table-th { + font-size: 15px; + font-weight: 500; +} + +.dmc-indicator { + width: 12px; + height: 4px; + transition: width 250ms ease; + + &[data-active] { + width: 40px; + } +} + +.dmc-control { + &[data-inactive] { + opacity: 0; + cursor: default; + } +} + +.dmc-controls { + transition: opacity 150ms ease; + opacity: 0; +} + +.dmc-root { + &:hover { + .dmc-controls { + opacity: 1; + } + } +} + + + +.dmc-slider-track { + &::before { + background-color: light-dark(var(--mantine-color-blue-1), var(--mantine-color-dark-3)); + } +} + +.dmc-slider-mark { + width: 6px; + height: 6px; + border-radius: 6px; + transform: translateX(-3px) translateY(-2px); + border-color: light-dark(var(--mantine-color-blue-1), var(--mantine-color-dark-3)); + + &[data-filled] { + border-color: var(--mantine-color-blue-6); + } +} + +.dmc-slider-markLabel { + font-size: var(--mantine-font-size-sm); + color: var(--mantine-color-green-5); + margin-bottom: 5px; + margin-top: 0; +} + +.dmc-slider-thumb { + height: 16px; + width: 16px; + background-color: var(--mantine-color-green-5); + border-width: 1px; + box-shadow: var(--mantine-shadow-lg); +} + +.navbar-link { + padding: 0.5rem 1rem; + border-radius: 0.25rem; + transition: background 0.1s; + color: inherit; + display: inline-flex; + gap: 0.5rem; + + &:hover { + text-decoration: none; + background: color-mix(in srgb, var(--mantine-color-gray-5), transparent 90%); + } +} + +/* Mobile drawer nav: full-width rows with a 44px touch target, per the + iOS/Android minimum. The desktop navbar keeps the compact inline-flex look. */ +.mobile-nav .navbar-link { + display: flex; + align-items: center; + width: 100%; + min-height: 44px; + padding: 0.625rem 0.75rem; + border-radius: 0.375rem; + -webkit-tap-highlight-color: transparent; +} + +.mobile-nav .navbar-link:active { + background: color-mix(in srgb, var(--mantine-color-gray-5), transparent 80%); +} + +div .m_46b77525 { + margin-top: calc(0.5rem* var(--mantine-scale)) !important; +} + +.m_5caae85b { + position: absolute !important; + top: calc(0.3125rem* var(--mantine-scale)); + inset-inline-end: calc(0.3125rem* var(--mantine-scale)); + z-index: 1; +} + +.m_9cdde9a { + inset-inline-end: 0; + width: var(--app-shell-aside-width); + transform: var(--app-shell-aside-transform); + z-index: var(--app-shell-aside-z-index); + margin-top: 15px; +} + +:root[data-mantine-color-scheme="dark"] { + --mantine-color-anchor: #74c0fc !important; + --mantine-color-dark-light: rgba(63, 63, 70, 0.15); + --mantine-color-dark-light-hover: rgba(63, 63, 70, 0.2); + --mantine-color-dark-outline-hover: rgba(113, 113, 122, 0.05); +} + +img[alt=logo] { width: 100%; } + +/* Theme-aware code blocks */ +:root[data-mantine-color-scheme="light"] pre, +:root[data-mantine-color-scheme="light"] code { + background-color: #f8f9fa; + color: #1a1b1e; +} + +:root[data-mantine-color-scheme="dark"] pre, +:root[data-mantine-color-scheme="dark"] code { + background-color: #1a1b1e; + color: #c1c2c5; +} + +/* Inline code */ +:root[data-mantine-color-scheme="light"] code { + background-color: #f1f3f5; + padding: 2px 6px; + border-radius: 4px; + font-size: 0.9em; +} + +:root[data-mantine-color-scheme="dark"] code { + background-color: #25262b; + padding: 2px 6px; + border-radius: 4px; + font-size: 0.9em; +} + +/* Code blocks */ +:root[data-mantine-color-scheme="light"] pre { + background-color: #f8f9fa; + border: 1px solid #dee2e6; + border-radius: 8px; + padding: 16px; + overflow-x: auto; +} + +:root[data-mantine-color-scheme="dark"] pre { + background-color: #1a1b1e; + border: 1px solid #373a40; + border-radius: 8px; + padding: 16px; + overflow-x: auto; +} + +/* Code inside pre blocks */ +:root[data-mantine-color-scheme="light"] pre code { + background-color: transparent; + padding: 0; + color: #1a1b1e; +} + +:root[data-mantine-color-scheme="dark"] pre code { + background-color: transparent; + padding: 0; + color: #c1c2c5; +} + +/* Sun icon rotation animations - direction based on scroll */ +@keyframes rotate-sun-clockwise { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +@keyframes rotate-sun-counter-clockwise { + from { + transform: rotate(0deg); + } + to { + transform: rotate(-360deg); + } +} + +/* Clockwise rotation (scroll down) */ +#light-theme-icon.rotating-down, +#light-theme-icon.rotating-down svg, +#light-theme-icon.rotating-down iconify-icon { + animation: rotate-sun-clockwise 1.2s ease-out infinite; + display: inline-block; +} + +/* Counter-clockwise rotation (scroll up) */ +#light-theme-icon.rotating-up, +#light-theme-icon.rotating-up svg, +#light-theme-icon.rotating-up iconify-icon { + animation: rotate-sun-counter-clockwise 1.2s ease-out infinite; + display: inline-block; +} + +/* Smooth transition when stopping */ +#light-theme-icon, +#light-theme-icon svg, +#light-theme-icon iconify-icon { + transition: transform 0.3s ease-out; + display: inline-block; +} + +/* Typewriter cursor animation for Dash Docs title */ +@keyframes blink-cursor { + 0%, 49% { + opacity: 1; + } + 50%, 100% { + opacity: 0; + } +} + +/* Add blinking cursor while typing */ +#dash-docs-title.typing::after { + content: '▋'; + animation: blink-cursor 1s step-end infinite; + margin-left: 2px; + color: #03c7e5; +} + +/* AG Grid Dark Mode Support */ +/* Override AG Grid theme colors for dark mode */ +:root[data-mantine-color-scheme="dark"] .ag-theme-alpine { + /* Core background colors */ + --ag-background-color: #1a1b1e; + --ag-foreground-color: #c1c2c5; + --ag-border-color: #373a40; + --ag-secondary-border-color: #2c2e33; + + /* Header colors */ + --ag-header-background-color: #25262b; + --ag-header-foreground-color: #c1c2c5; + + /* Row colors */ + --ag-odd-row-background-color: #1a1b1e; + --ag-row-hover-color: #25262b; + --ag-selected-row-background-color: #373a40; + + /* Control panel (filters, pagination) */ + --ag-control-panel-background-color: #25262b; + + /* Input colors */ + --ag-input-border-color: #373a40; + --ag-input-disabled-border-color: #2c2e33; + --ag-input-disabled-background-color: #25262b; + + /* Pagination and widgets */ + --ag-disabled-foreground-color: #5c5f66; + --ag-chip-background-color: #373a40; + + /* Hover and focus states */ + --ag-row-border-color: #2c2e33; + --ag-cell-horizontal-border: solid #2c2e33; + + /* Filter colors */ + --ag-input-focus-border-color: #5c5f66; + + /* Icons */ + color-scheme: dark; +} + +/* Light mode adjustments (ensure proper contrast) */ +:root[data-mantine-color-scheme="light"] .ag-theme-alpine { + --ag-background-color: #ffffff; + --ag-foreground-color: #1a1b1e; + --ag-border-color: #dee2e6; + --ag-header-background-color: #f8f9fa; + --ag-row-hover-color: #f1f3f5; +} + +/* Custom AG Grid Cell Styling - Light Mode */ +:root[data-mantine-color-scheme="light"] .ag-theme-alpine .timestamp-cell { + font-family: monospace; + font-size: 14px; +} + +:root[data-mantine-color-scheme="light"] .ag-theme-alpine .bot-type-cell { + font-weight: 500; + padding: 4px 8px; + border-radius: 4px; +} + +:root[data-mantine-color-scheme="light"] .ag-theme-alpine .bot-training { + background-color: #ffe0e0; + color: #c92a2a; +} + +:root[data-mantine-color-scheme="light"] .ag-theme-alpine .bot-search { + background-color: #d0ebff; + color: #1971c2; +} + +:root[data-mantine-color-scheme="light"] .ag-theme-alpine .bot-traditional { + background-color: #d3f9d8; + color: #2f9e44; +} + +:root[data-mantine-color-scheme="light"] .ag-theme-alpine .bot-unknown { + background-color: #f1f3f5; + color: #868e96; + font-weight: 400; +} + +:root[data-mantine-color-scheme="light"] .ag-theme-alpine .page-cell { + font-family: monospace; + font-size: 12px; + background-color: #f8f9fa; + padding: 4px 6px; + border-radius: 4px; +} + +:root[data-mantine-color-scheme="light"] .ag-theme-alpine .user-agent-cell { + font-size: 12px; + color: #868e96; +} + +/* Custom AG Grid Cell Styling - Dark Mode */ +:root[data-mantine-color-scheme="dark"] .ag-theme-alpine .timestamp-cell { + font-family: monospace; + font-size: 14px; +} + +:root[data-mantine-color-scheme="dark"] .ag-theme-alpine .bot-type-cell { + font-weight: 500; + padding: 4px 8px; + border-radius: 4px; +} + +:root[data-mantine-color-scheme="dark"] .ag-theme-alpine .bot-training { + background-color: #5c1414; + color: #ffa8a8; +} + +:root[data-mantine-color-scheme="dark"] .ag-theme-alpine .bot-search { + background-color: #1c3d5a; + color: #74c0fc; +} + +:root[data-mantine-color-scheme="dark"] .ag-theme-alpine .bot-traditional { + background-color: #1b4332; + color: #8ce99a; +} + +:root[data-mantine-color-scheme="dark"] .ag-theme-alpine .bot-unknown { + background-color: #373a40; + color: #909296; + font-weight: 400; +} + +:root[data-mantine-color-scheme="dark"] .ag-theme-alpine .page-cell { + font-family: monospace; + font-size: 12px; + background-color: #25262b; + padding: 4px 6px; + border-radius: 4px; +} + +:root[data-mantine-color-scheme="dark"] .ag-theme-alpine .user-agent-cell { + font-size: 12px; + color: #909296; +} \ No newline at end of file diff --git a/components/appshell.py b/components/appshell.py new file mode 100644 index 0000000..e0c7a3b --- /dev/null +++ b/components/appshell.py @@ -0,0 +1,316 @@ +import dash_mantine_components as dmc +from dash import Output, Input, clientside_callback, dcc, page_container, State + +from components.header import create_header +from components.navbar import create_navbar, create_navbar_drawer +from lib.constants import PRIMARY_COLOR + + +def create_appshell(data): + return dmc.MantineProvider( + id="m2d-mantine-provider", + theme={ + # Core Color System + "primaryColor": PRIMARY_COLOR, + "primaryShade": {"light": 6, "dark": 8}, + + # Typography System + "fontFamily": "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", + "fontFamilyMonospace": "ui-monospace, SFMono-Regular, Menlo, Monaco, 'Courier New', monospace", + "headings": { + "fontFamily": "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", + "fontWeight": 600, + "sizes": { + "h1": {"fontSize": "2.125rem", "lineHeight": 1.3, "fontWeight": 700}, + "h2": {"fontSize": "1.625rem", "lineHeight": 1.35, "fontWeight": 700}, + "h3": {"fontSize": "1.375rem", "lineHeight": 1.4, "fontWeight": 600}, + "h4": {"fontSize": "1.125rem", "lineHeight": 1.45, "fontWeight": 600}, + "h5": {"fontSize": "1rem", "lineHeight": 1.5, "fontWeight": 600}, + "h6": {"fontSize": "0.875rem", "lineHeight": 1.5, "fontWeight": 600}, + } + }, + "fontSizes": { + "xs": "0.75rem", # 12px + "sm": "0.875rem", # 14px + "md": "1rem", # 16px - base body text + "lg": "1.125rem", # 18px + "xl": "1.25rem", # 20px + }, + "lineHeights": { + "xs": 1.4, + "sm": 1.45, + "md": 1.55, # For body text + "lg": 1.6, + "xl": 1.65, + }, + + # Spacing System (based on 4px unit) + "spacing": { + "xs": "0.5rem", # 8px + "sm": "0.75rem", # 12px + "md": "1rem", # 16px + "lg": "1.5rem", # 24px + "xl": "2rem", # 32px + }, + + # Border Radius System + "radius": { + "xs": "0.25rem", # 4px + "sm": "0.375rem", # 6px + "md": "0.5rem", # 8px + "lg": "0.75rem", # 12px + "xl": "1rem", # 16px + }, + "defaultRadius": "md", + + # Shadow System + "shadows": { + "xs": "0 1px 2px 0 rgba(0, 0, 0, 0.05)", + "sm": "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)", + "md": "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)", + "lg": "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)", + "xl": "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)", + }, + + # Color Contrast + "black": "#1a1b1e", # Softer black instead of pure #000000 + "white": "#ffffff", + "autoContrast": True, + "luminanceThreshold": 0.3, + + # Custom Colors + "colors": { + "myColor": [ + "#F2FFB6", + "#DCF97E", + "#C3E35B", + "#AAC944", + "#98BC20", + "#86AC09", + "#78A000", + "#668B00", + "#547200", + "#455D00", + ] + }, + + # Global Component Styling + "components": { + "Button": { + "defaultProps": { + "fw": 500, + "radius": "md", + } + }, + "Card": { + "defaultProps": { + "shadow": "sm", + "padding": "lg", + "radius": "md", + "withBorder": True, + } + }, + "Paper": { + "defaultProps": { + "shadow": "xs", + "padding": "md", + "radius": "md", + } + }, + "TextInput": { + "defaultProps": { + "radius": "md", + } + }, + "Select": { + "defaultProps": { + "radius": "md", + } + }, + "Title": { + "styles": { + "root": { + "marginBottom": "0.75rem" # sm spacing + } + } + }, + "Text": { + "defaultProps": { + "size": "md", + } + }, + "Alert": { + "defaultProps": { + "radius": "md", + }, + "styles": {"title": {"fontWeight": 600}} + }, + "Badge": { + "defaultProps": { + "radius": "md", + }, + "styles": {"root": {"fontWeight": 600}} + }, + "Table": { + "defaultProps": { + "highlightOnHover": True, + "withTableBorder": True, + "verticalSpacing": "sm", + "horizontalSpacing": "md", + "striped": True, + } + }, + "Anchor": { + "defaultProps": { + "underline": "hover", + } + }, + }, + }, + children=[ + # The id "url" is load-bearing beyond navigation: the SPA + # page-view recorder (run.py track_page_view) and the ad + # client's location refresh both hang off it. See + # lib/traffic_report.py THE COUNTING RULE. + dcc.Location(id="url", refresh="callback-nav"), + # Sink for the SPA page-view recorder (it only ever returns + # no_update — the callback exists for its side effect). + dcc.Store(id="analytics-sink"), + dcc.Store(id="color-scheme-storage", storage_type="local"), + # Persists the desktop-navbar collapse state across reloads. + # null/false = visible (default), true = collapsed. + dcc.Store(id="desktop-navbar-collapsed", storage_type="local"), + dmc.NotificationContainer(), + dmc.AppShell( + [ + create_header(data), + create_navbar(data), + create_navbar_drawer(data), + dmc.AppShellMain( + children=page_container, + style={"minHeight": "calc(100vh - 70px)"} # Full height minus header + ), + ], + id="m2d-appshell", + header={"height": 70}, + padding="xl", + navbar={ + "width": 280, + "breakpoint": "md", # Collapse on medium screens and below + "collapsed": {"mobile": True}, + }, + aside={ + "width": 280, + "breakpoint": "xl", + "collapsed": {"desktop": False, "mobile": True}, + }, + withBorder=True, + ), + ], + ) + + +# Initialize theme from localStorage or browser preference on page load +clientside_callback( + """ + function(pathname) { + // Check if theme is already stored in localStorage + const storedTheme = localStorage.getItem('color-scheme-storage'); + if (storedTheme) { + try { + const parsed = JSON.parse(storedTheme); + return parsed; + } catch (e) { + // If parsing fails, fall through to default logic + } + } + + // Check browser preference + if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { + return 'dark'; + } + + // Default to light theme + return 'light'; + } + """, + Output("color-scheme-storage", "data"), + Input("url", "pathname"), +) + +# Apply theme from storage to MantineProvider +clientside_callback( + """ + function(colorScheme) { + // Default to light if no theme is set + return colorScheme || 'light'; + } + """, + Output("m2d-mantine-provider", "forceColorScheme"), + Input("color-scheme-storage", "data") +) + +# Toggle theme when button is clicked +clientside_callback( + """ + function(n_clicks, theme) { + // Toggle between light and dark + const newTheme = theme === 'dark' ? 'light' : 'dark'; + return newTheme; + } + """, + Output("color-scheme-storage", "data", allow_duplicate=True), + Input("color-scheme-toggle", "n_clicks"), + State("color-scheme-storage", "data"), + prevent_initial_call=True, +) + + +# --------------------------------------------------------------------------- +# Desktop navbar collapse (the Burger in the header) +# --------------------------------------------------------------------------- +# dmc.Burger does NOT expose n_clicks — its public API is just `opened`, +# which flips internally on click and emits as an Input. So the data flow is: +# +# User click → Burger.opened flips → callbacks below fire +# ├→ AppShell navbar prop re-emitted with collapsed.desktop = !opened +# └→ desktop-navbar-collapsed store updated (for cross-reload persistence) +# +# On page load, a separate callback rehydrates Burger.opened from the store. + +# Burger opened → AppShell navbar config + persisted store (single source of truth) +clientside_callback( + """ + function(opened) { + const navbar = { + width: 280, + breakpoint: 'md', + collapsed: {mobile: true, desktop: opened !== true} + }; + // opened === true means navbar visible → store false. Default true so a + // first-time visitor (store === null) gets the navbar open. + const storeValue = opened === true ? false : true; + return [navbar, storeValue]; + } + """, + [ + Output("m2d-appshell", "navbar"), + Output("desktop-navbar-collapsed", "data"), + ], + Input("desktop-navbar-toggle", "opened"), +) + +# On first render, rehydrate the Burger from the persisted store. +# Pathname is just a once-per-load trigger; the State is the value we actually use. +clientside_callback( + """ + function(_pathname, collapsed) { + // null/false/undefined = navbar visible (opened=true) + // true = navbar collapsed (opened=false) + return collapsed !== true; + } + """, + Output("desktop-navbar-toggle", "opened"), + Input("url", "pathname"), + State("desktop-navbar-collapsed", "data"), +) diff --git a/components/backend_badge.py b/components/backend_badge.py new file mode 100644 index 0000000..0b9fb8d --- /dev/null +++ b/components/backend_badge.py @@ -0,0 +1,43 @@ +"""Backend indicator badge used in the header. + +Reads from ``lib.backend.get_backend_info`` so the displayed backend stays +in sync with what ``run.py`` actually instantiated. +""" +from __future__ import annotations + +import dash_mantine_components as dmc +from dash_iconify import DashIconify + +from lib.backend import get_backend_info + + +def create_backend_badge(size: str = "md") -> dmc.Tooltip: + """Return a small, themed badge advertising the active Dash backend. + + Renders without a Dash id so it can be placed in multiple slots + (header, navbar, drawer) without colliding. + """ + info = get_backend_info() + + label = info.label + if info.is_async: + label += " · async" + + badge = dmc.Badge( + label, + leftSection=DashIconify(icon=info.icon, width=14), + variant="light", + color=info.color, + radius="sm", + size=size, + styles={"root": {"textTransform": "none", "fontWeight": 600}}, + ) + + return dmc.Tooltip( + label=f"Dash backend: {info.label}. {info.description}", + position="bottom", + withArrow=True, + multiline=True, + w=260, + children=badge, + ) diff --git a/components/header.py b/components/header.py new file mode 100644 index 0000000..32ac026 --- /dev/null +++ b/components/header.py @@ -0,0 +1,200 @@ +import dash_mantine_components as dmc +from dash import Output, Input, clientside_callback +from dash_iconify import DashIconify + +from components.backend_badge import create_backend_badge +from dash_mui_charts import __version__ as _COMPONENT_VERSION +from lib.backend import get_backend_info +from lib.constants import HEADER_HEIGHT + + +def create_link(icon, href): + """Create an external link icon button""" + return dmc.Anchor( + dmc.ActionIcon( + DashIconify(icon=icon, width=22), + variant="subtle", + size="lg", + color="gray", + ), + href=href, + target="_blank", + ) + + +def create_search(data): + """Create searchable dropdown for component navigation""" + return dmc.Select( + id="select-component", + placeholder="Search pages...", + searchable=True, + clearable=True, + w=240, + size="sm", + nothingFoundMessage="No pages found", + leftSection=DashIconify(icon="mingcute:search-3-line", width=18), + data=[ + {"label": component["name"], "value": component["path"]} + for component in data + if component["name"] not in ["Home", "Not found 404"] + ], + visibleFrom="sm", + comboboxProps={"zIndex": 2000}, + styles={ + "input": { + "borderColor": "var(--mantine-color-gray-4)", + } + } + ) + + +def _create_openapi_link(): + """Show a Swagger UI link only when the FastAPI backend is active.""" + info = get_backend_info() + if info.name != "fastapi": + return None + return dmc.Tooltip( + label="OpenAPI docs (Swagger UI) — available on the FastAPI backend", + position="bottom", + withArrow=True, + children=dmc.Anchor( + dmc.Badge( + "OpenAPI", + leftSection=DashIconify(icon="logos:swagger", width=14), + variant="light", + color="cyan", + radius="sm", + styles={"root": {"textTransform": "none", "fontWeight": 600}}, + ), + href="/docs", + target="_blank", + underline=False, + ), + ) + + +def create_header(data): + """Create application header with logo, search, and theme toggle""" + return dmc.AppShellHeader( + dmc.Group( + [ + # Left section: Hamburger (mobile) + Burger (desktop collapse) + Logo + dmc.Group( + [ + dmc.ActionIcon( + DashIconify(icon="radix-icons:hamburger-menu", width=22), + id="drawer-hamburger-button", + variant="subtle", + size="lg", + color="gray", + hiddenFrom="md", + ), + # Desktop-only burger: collapses/expands the AppShell navbar + # on md-xl screens. Default opened=True so users see the X + # state on first load (navbar visible). + dmc.Burger( + id="desktop-navbar-toggle", + opened=True, + size="sm", + visibleFrom="md", + ), + dmc.Anchor( + dmc.Group( + [ + # id "header-avatar" is a contract with the + # random favicon swapper in + # templates/index.html — it re-points this + # image to the area/bar-chart icon it chose + # for the tab. Rename both or neither. + dmc.Avatar( + id="header-avatar", + src="/assets/favicon_areachart.ico", + size="sm", + radius="sm", + ), + dmc.Text( + "Dash MUI Charts", + size="lg", + fw=700, + c="#1976d2", + id="dash-docs-title", + ), + # Version from the package (package-info.json), + # the same source setup.py builds from — + # never hardcode it here; a stale badge + # shipped as "v1.3.0" for a full release + # cycle. tests/test_version_parity pins this. + dmc.Badge(f"v{_COMPONENT_VERSION}", + variant="light", size="sm", + color="blue", visibleFrom="xs"), + ], + gap="sm", + ), + href="/", + underline=False, + ), + ], + gap="md", + ), + + # Right section: Backend badge + OpenAPI (fastapi only) + Search + links + Theme toggle + dmc.Group( + [ + dmc.Box(create_backend_badge(), visibleFrom="sm"), + dmc.Box(_create_openapi_link(), visibleFrom="md"), + create_search(data), + create_link( + "mdi:book-open-variant", + "https://pip-install-python.com", + ), + create_link( + "radix-icons:github-logo", + "https://github.com/pip-install-python/dash-mui-charts", + ), + dmc.ActionIcon( + [ + DashIconify( + icon="radix-icons:sun", + width=22, + id="light-theme-icon", + ), + DashIconify( + icon="radix-icons:moon", + width=22, + id="dark-theme-icon", + ), + ], + variant="subtle", + color="yellow", + id="color-scheme-toggle", + size="lg", + ), + ], + gap="sm", + ), + ], + justify="space-between", + h=HEADER_HEIGHT, + px="xl", + ), + ) + + +clientside_callback( + """ + function(value) { + if (value) { + return value + } + } + """, + Output("url", "href"), + Input("select-component", "value"), +) + +clientside_callback( + """function(n_clicks) { return true }""", + Output("components-navbar-drawer", "opened"), + Input("drawer-hamburger-button", "n_clicks"), + prevent_initial_call=True, +) diff --git a/components/navbar.py b/components/navbar.py new file mode 100644 index 0000000..a5ed0d3 --- /dev/null +++ b/components/navbar.py @@ -0,0 +1,340 @@ +import dash_mantine_components as dmc +from dash import Input, Output, clientside_callback +from dash_iconify import DashIconify + +from lib.constants import HEADER_HEIGHT + +# --------------------------------------------------------------------------- +# Family-grouped navigation. +# +# The boilerplate's navbar is a flat "Documentation" section ordered by a +# page_order list — right for pannellum's 11 pages, unreadable for this +# site's 40. This fork groups by component family instead, in the same +# visual language (create_nav_section). The map below is the nav ORDER +# AUTHORITY (what page_order is to the boilerplate): a page missing from it +# still renders, in a trailing "Other" section, so a newly added page is +# visible-but-unsorted rather than lost. +# +# Each entry is (path, label, icon). LABELS ARE SHORT ON PURPOSE — the +# section header already says the family, so the row says only what varies +# ("Examples", "Pro Features"), exactly as the old SimpleTreeView sidebar +# did. Registry names stay long-form ("Bar Chart - Basic") for the search +# Select and page titles; rendering them here read as "BARCHART / Bar +# Chart - Basic" — the redundancy this map exists to remove. +# +# Paths, not names, key the map: names are frontmatter/register_page +# strings that migration phases may polish, while the endpoints are +# contractually stable (BOILERPLATE_MIGRATION_PLAN.md decision 1). +# --------------------------------------------------------------------------- +FAMILIES = [ + ("SparklineChart", [ + ("/sparkline", "Examples", "material-symbols:play-arrow"), + ("/sparkline-style", "Styling", "material-symbols:palette-outline"), + ("/sparkline-style-advanced", "Advanced", + "material-symbols:auto-graph"), + ]), + ("PieChart", [ + ("/pie", "Examples", "material-symbols:play-arrow"), + ("/pie-props", "Props Explorer", "material-symbols:tune"), + ]), + ("BarChart", [ + ("/barchart-basic", "Basic", "material-symbols:play-arrow"), + ("/barchart-dataset", "Dataset Mode", + "material-symbols:table-chart-outline"), + ("/barchart-stacking", "Stacking", + "material-symbols:stacked-bar-chart"), + ("/barchart-interaction", "Interaction", + "material-symbols:touch-app-outline"), + ("/barchart-reference", "Reference Lines", "material-symbols:rule"), + ("/barchart-pro", "Pro Features", "material-symbols:diamond-outline"), + ]), + ("Heatmap", [ + ("/heatmap", "Examples", "material-symbols:play-arrow"), + ("/heatmap-props", "Props Explorer", "material-symbols:tune"), + ]), + ("ScatterChart", [ + ("/scatter", "Examples", "material-symbols:play-arrow"), + ]), + ("LineChart", [ + ("/linechart-basic", "Basics", "material-symbols:play-arrow"), + ("/linechart-pro", "Pro Features", + "material-symbols:diamond-outline"), + ("/linechart-brush", "Brush Selection", "material-symbols:brush"), + ("/linechart-referencelines", "Reference Lines", + "material-symbols:rule"), + ("/linechart-highlighting", "Highlighting", + "material-symbols:highlight"), + ("/highlighting-sync", "Highlighting Sync", "material-symbols:sync"), + ("/linechart-zoom-preview", "Zoom Preview", + "material-symbols:zoom-in"), + ("/linechart-tick-hover", "Ticks & Hover", + "material-symbols:mouse-outline"), + ("/crosshair", "Crosshair", "material-symbols:point-scan"), + ]), + ("CandlestickChart", [ + ("/candlestick", "OHLC Charts", "material-symbols:candlestick-chart-outline"), + ]), + ("LiveTradingChart", [ + ("/live-trading", "Examples", "material-symbols:trending-up"), + ]), + ("CompositeChart", [ + ("/composite", "Examples", "material-symbols:play-arrow"), + ("/composite-v120", "v1.2.1", "material-symbols:star-outline"), + ("/composite-render-bp", "Render BP", "material-symbols:speed-outline"), + ]), + ("TreeView", [ + ("/tree-basic", "Basic", "material-symbols:play-arrow"), + ("/tree-simple", "Simple", "material-symbols:view-list-outline"), + ("/tree-selection", "Selection", + "material-symbols:check-box-outline"), + ("/tree-expansion", "Expansion", "material-symbols:unfold-more"), + ("/tree-editing", "Editing", "material-symbols:edit-outline"), + ("/tree-icons", "Icons", "material-symbols:palette-outline"), + ("/tree-disabled", "Disabled", "material-symbols:block"), + ("/tree-pro", "Pro", "material-symbols:diamond-outline"), + ]), + ("Date & Time Pickers", [ + ("/time-clock", "Time Clock", "material-symbols:schedule-outline"), + ("/time-clock-lab", "TimeClock Lab", "material-symbols:science-outline"), + ]), + ("Reference", [ + ("/api", "API Reference", "material-symbols:api"), + ]), +] + +# Rendered with Home at the top rather than inside a family. +TOP_LINKS = [("/", "Home", "material-symbols:home-outline"), + ("/changelog", "Changelog", "material-symbols:history")] + + +def create_nav_link(icon, text, href, external=False): + """Create a styled navigation link with icon""" + return dmc.Anchor( + dmc.Group( + [ + DashIconify(icon=icon, width=18), + dmc.Text(text, size="sm", fw=500), + ], + gap="sm", + ), + href=href, + target="_blank" if external else None, + className="navbar-link", + underline=False, + ) + + +def create_nav_section(title, links): + """Create a navigation section with a title and links""" + return dmc.Stack( + [ + dmc.Text( + title, + size="xs", + fw=700, + tt="uppercase", + c="dimmed", + mb="xs", + ), + dmc.Stack(links, gap="xs"), + ], + gap="sm", + ) + + +def create_content(data): + """Navbar content: Home/Changelog, one section per component family, + then the network's standing sections.""" + by_path = {entry["path"]: entry for entry in data} + + placed = set() + sections = [] + + top = [] + for path, label, icon in TOP_LINKS: + if path in by_path: + top.append(create_nav_link(icon, label, path)) + placed.add(path) + + for family, entries in FAMILIES: + links = [create_nav_link(icon, label, path) + for path, label, icon in entries if path in by_path] + placed.update(path for path, _l, _i in entries if path in by_path) + if links: + sections.append(create_nav_section(family, links)) + + # The safety net: registered pages the map does not know yet — shown + # under their full registry name, unsorted, so they are visible rather + # than lost. + leftovers = [ + create_nav_link(by_path[p].get("icon") or "fluent:document-24-regular", + by_path[p]["name"], p) + for p in sorted(by_path) if p not in placed + ] + if leftovers: + sections.append(create_nav_section("Other", leftovers)) + + return dmc.ScrollArea( + offsetScrollbars=True, + type="scroll", + style={"height": "100%"}, + children=dmc.Stack( + [ + *top, + dmc.Divider(mt="xs", mb="xs"), + *sections, + + # Pip Components Section — the network's own package index, + # the catalogue a reader of these docs most likely wants next. + dmc.Divider(mt="md", mb="sm"), + create_nav_section( + "Pip Components", + [ + create_nav_link( + "solar:box-bold-duotone", + "Browse components", + "https://2plot.dev/pip", + external=True, + ), + ], + ), + + dmc.Divider(mt="md", mb="sm"), + create_nav_section( + "Resources", + [ + create_nav_link( + "simple-icons:mui", + "MUI X Charts", + "https://mui.com/x/react-charts/", + external=True, + ), + create_nav_link( + "fluent-mdl2:forum", + "Dash Community", + "https://community.plotly.com/", + external=True, + ), + create_nav_link( + "ic:baseline-design-services", + "DMC", + "https://www.dash-mantine-components.com/", + external=True, + ), + # 2plot.dev, NOT pip-install-python.com — the package + # index is the network host, and that domain is not a + # link this app publishes. + create_nav_link( + "mdi:package-variant-closed", + "2plot.dev", + "https://2plot.dev", + external=True, + ), + ], + ), + ], + gap="xs", + p="md", + ), + ) + + +def create_mobile_content(data): + """Drawer body: a sticky search field above the scrolling nav sections. + + The header's search Select is `visibleFrom="sm"`, so phones otherwise have + no way to jump straight to a page. This is that missing entry point. + """ + return dmc.Stack( + [ + dmc.Box( + dmc.Select( + id="mobile-select-component", + placeholder="Search pages...", + searchable=True, + clearable=True, + size="md", + nothingFoundMessage="No pages found", + leftSection=DashIconify(icon="mingcute:search-3-line", width=18), + data=[ + {"label": component["name"], "value": component["path"]} + for component in data + if component["name"] not in ["Home", "Not found 404"] + ], + comboboxProps={"zIndex": 2000}, + ), + p="md", + pb="xs", + ), + dmc.Divider(), + # flex/minHeight give the ScrollArea a definite box to scroll inside. + dmc.Box(create_content(data), style={"flex": 1, "minHeight": 0}), + ], + gap=0, + className="mobile-nav", + style={"height": "100%"}, + ) + + +def create_navbar(data): + """Create the main application navbar""" + return dmc.AppShellNavbar( + children=create_content(data), + style={"borderRight": "1px solid var(--mantine-color-gray-3)"} + ) + + +def create_navbar_drawer(data): + """Mobile navigation: a solid, full-height side panel. + + Runs from the bottom of the fixed header to the bottom of the viewport — + no floating card, no close-button header row. The hamburger toggles it and + the header stays visible (and tappable) above the overlay. + """ + return dmc.Drawer( + id="components-navbar-drawer", + overlayProps={"opacity": 0.55, "blur": 3}, + zIndex=1500, + withCloseButton=False, # removes the whole Drawer header row + size="300px", + padding=0, + children=create_mobile_content(data), + trapFocus=False, + position="left", + styles={ + # Dock below the fixed header. dvh (not vh) so a collapsing mobile + # URL bar doesn't leave a dead gap at the bottom. + "inner": { + "top": HEADER_HEIGHT, + "height": f"calc(100dvh - {HEADER_HEIGHT}px)", + }, + # Overlay starts below the header too, keeping the hamburger tappable. + "overlay": {"top": HEADER_HEIGHT}, + # Solid panel: fill the inner, square corners. + "content": { + "height": "100%", + "maxHeight": "100%", + "borderRadius": 0, + "display": "flex", + "flexDirection": "column", + }, + # Definite height so create_content's ScrollArea can actually scroll. + "body": {"flex": 1, "minHeight": 0, "height": "100%", "padding": 0}, + }, + ) + + +# Mobile drawer search → navigate (the header Select is hidden below `sm`). +clientside_callback( + """ + function(value) { + if (value) { + return value + } + return window.dash_clientside.no_update; + } + """, + Output("url", "href", allow_duplicate=True), + Input("mobile-select-component", "value"), + prevent_initial_call=True, +) diff --git a/dash_mui_charts/BarChart.py b/dash_mui_charts/BarChart.py index 4c53601..383df46 100644 --- a/dash_mui_charts/BarChart.py +++ b/dash_mui_charts/BarChart.py @@ -3,18 +3,20 @@ import typing # noqa: F401 from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401 from dash.development.base_component import Component, _explicitize_args - +try: + from dash.types import NumberType # noqa: F401 +except ImportError: + # Backwards compatibility for dash<=4.1.0 + if typing.TYPE_CHECKING: + raise + NumberType = typing.Union[ # noqa: F401 + typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ] + +ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ - str, - int, - float, - Component, - None, - typing.Sequence[typing.Union[str, int, float, Component, None]], -] - -NumberType = typing.Union[ - typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ComponentSingleType, + typing.Sequence[ComponentSingleType], ] diff --git a/dash_mui_charts/CandlestickChart.py b/dash_mui_charts/CandlestickChart.py index 0af585b..23d937b 100644 --- a/dash_mui_charts/CandlestickChart.py +++ b/dash_mui_charts/CandlestickChart.py @@ -3,18 +3,20 @@ import typing # noqa: F401 from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401 from dash.development.base_component import Component, _explicitize_args - +try: + from dash.types import NumberType # noqa: F401 +except ImportError: + # Backwards compatibility for dash<=4.1.0 + if typing.TYPE_CHECKING: + raise + NumberType = typing.Union[ # noqa: F401 + typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ] + +ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ - str, - int, - float, - Component, - None, - typing.Sequence[typing.Union[str, int, float, Component, None]], -] - -NumberType = typing.Union[ - typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ComponentSingleType, + typing.Sequence[ComponentSingleType], ] diff --git a/dash_mui_charts/CompositeChart.py b/dash_mui_charts/CompositeChart.py index fcfb193..04c714c 100644 --- a/dash_mui_charts/CompositeChart.py +++ b/dash_mui_charts/CompositeChart.py @@ -3,18 +3,20 @@ import typing # noqa: F401 from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401 from dash.development.base_component import Component, _explicitize_args - +try: + from dash.types import NumberType # noqa: F401 +except ImportError: + # Backwards compatibility for dash<=4.1.0 + if typing.TYPE_CHECKING: + raise + NumberType = typing.Union[ # noqa: F401 + typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ] + +ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ - str, - int, - float, - Component, - None, - typing.Sequence[typing.Union[str, int, float, Component, None]], -] - -NumberType = typing.Union[ - typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ComponentSingleType, + typing.Sequence[ComponentSingleType], ] diff --git a/dash_mui_charts/Heatmap.py b/dash_mui_charts/Heatmap.py index b746d39..3b9b17a 100644 --- a/dash_mui_charts/Heatmap.py +++ b/dash_mui_charts/Heatmap.py @@ -3,18 +3,20 @@ import typing # noqa: F401 from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401 from dash.development.base_component import Component, _explicitize_args - +try: + from dash.types import NumberType # noqa: F401 +except ImportError: + # Backwards compatibility for dash<=4.1.0 + if typing.TYPE_CHECKING: + raise + NumberType = typing.Union[ # noqa: F401 + typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ] + +ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ - str, - int, - float, - Component, - None, - typing.Sequence[typing.Union[str, int, float, Component, None]], -] - -NumberType = typing.Union[ - typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ComponentSingleType, + typing.Sequence[ComponentSingleType], ] diff --git a/dash_mui_charts/LineChart.py b/dash_mui_charts/LineChart.py index ef5c747..9f0237c 100644 --- a/dash_mui_charts/LineChart.py +++ b/dash_mui_charts/LineChart.py @@ -3,18 +3,20 @@ import typing # noqa: F401 from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401 from dash.development.base_component import Component, _explicitize_args - +try: + from dash.types import NumberType # noqa: F401 +except ImportError: + # Backwards compatibility for dash<=4.1.0 + if typing.TYPE_CHECKING: + raise + NumberType = typing.Union[ # noqa: F401 + typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ] + +ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ - str, - int, - float, - Component, - None, - typing.Sequence[typing.Union[str, int, float, Component, None]], -] - -NumberType = typing.Union[ - typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ComponentSingleType, + typing.Sequence[ComponentSingleType], ] diff --git a/dash_mui_charts/LiveTradingChart.py b/dash_mui_charts/LiveTradingChart.py index a211215..252e82f 100644 --- a/dash_mui_charts/LiveTradingChart.py +++ b/dash_mui_charts/LiveTradingChart.py @@ -3,18 +3,20 @@ import typing # noqa: F401 from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401 from dash.development.base_component import Component, _explicitize_args - +try: + from dash.types import NumberType # noqa: F401 +except ImportError: + # Backwards compatibility for dash<=4.1.0 + if typing.TYPE_CHECKING: + raise + NumberType = typing.Union[ # noqa: F401 + typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ] + +ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ - str, - int, - float, - Component, - None, - typing.Sequence[typing.Union[str, int, float, Component, None]], -] - -NumberType = typing.Union[ - typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ComponentSingleType, + typing.Sequence[ComponentSingleType], ] diff --git a/dash_mui_charts/PieChart.py b/dash_mui_charts/PieChart.py index 3416dd3..6069980 100644 --- a/dash_mui_charts/PieChart.py +++ b/dash_mui_charts/PieChart.py @@ -3,18 +3,20 @@ import typing # noqa: F401 from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401 from dash.development.base_component import Component, _explicitize_args - +try: + from dash.types import NumberType # noqa: F401 +except ImportError: + # Backwards compatibility for dash<=4.1.0 + if typing.TYPE_CHECKING: + raise + NumberType = typing.Union[ # noqa: F401 + typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ] + +ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ - str, - int, - float, - Component, - None, - typing.Sequence[typing.Union[str, int, float, Component, None]], -] - -NumberType = typing.Union[ - typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ComponentSingleType, + typing.Sequence[ComponentSingleType], ] diff --git a/dash_mui_charts/ScatterChart.py b/dash_mui_charts/ScatterChart.py index e79da7b..2076ae1 100644 --- a/dash_mui_charts/ScatterChart.py +++ b/dash_mui_charts/ScatterChart.py @@ -3,18 +3,20 @@ import typing # noqa: F401 from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401 from dash.development.base_component import Component, _explicitize_args - +try: + from dash.types import NumberType # noqa: F401 +except ImportError: + # Backwards compatibility for dash<=4.1.0 + if typing.TYPE_CHECKING: + raise + NumberType = typing.Union[ # noqa: F401 + typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ] + +ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ - str, - int, - float, - Component, - None, - typing.Sequence[typing.Union[str, int, float, Component, None]], -] - -NumberType = typing.Union[ - typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ComponentSingleType, + typing.Sequence[ComponentSingleType], ] diff --git a/dash_mui_charts/SimpleTreeView.py b/dash_mui_charts/SimpleTreeView.py index e11a908..348d1c5 100644 --- a/dash_mui_charts/SimpleTreeView.py +++ b/dash_mui_charts/SimpleTreeView.py @@ -3,18 +3,20 @@ import typing # noqa: F401 from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401 from dash.development.base_component import Component, _explicitize_args - +try: + from dash.types import NumberType # noqa: F401 +except ImportError: + # Backwards compatibility for dash<=4.1.0 + if typing.TYPE_CHECKING: + raise + NumberType = typing.Union[ # noqa: F401 + typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ] + +ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ - str, - int, - float, - Component, - None, - typing.Sequence[typing.Union[str, int, float, Component, None]], -] - -NumberType = typing.Union[ - typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ComponentSingleType, + typing.Sequence[ComponentSingleType], ] diff --git a/dash_mui_charts/SparklineChart.py b/dash_mui_charts/SparklineChart.py index 49ac21f..0b50832 100644 --- a/dash_mui_charts/SparklineChart.py +++ b/dash_mui_charts/SparklineChart.py @@ -3,18 +3,20 @@ import typing # noqa: F401 from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401 from dash.development.base_component import Component, _explicitize_args - +try: + from dash.types import NumberType # noqa: F401 +except ImportError: + # Backwards compatibility for dash<=4.1.0 + if typing.TYPE_CHECKING: + raise + NumberType = typing.Union[ # noqa: F401 + typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ] + +ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ - str, - int, - float, - Component, - None, - typing.Sequence[typing.Union[str, int, float, Component, None]], -] - -NumberType = typing.Union[ - typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ComponentSingleType, + typing.Sequence[ComponentSingleType], ] diff --git a/dash_mui_charts/TimeClock.py b/dash_mui_charts/TimeClock.py index bdf4594..8299eb3 100644 --- a/dash_mui_charts/TimeClock.py +++ b/dash_mui_charts/TimeClock.py @@ -3,18 +3,20 @@ import typing # noqa: F401 from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401 from dash.development.base_component import Component, _explicitize_args - +try: + from dash.types import NumberType # noqa: F401 +except ImportError: + # Backwards compatibility for dash<=4.1.0 + if typing.TYPE_CHECKING: + raise + NumberType = typing.Union[ # noqa: F401 + typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ] + +ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ - str, - int, - float, - Component, - None, - typing.Sequence[typing.Union[str, int, float, Component, None]], -] - -NumberType = typing.Union[ - typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ComponentSingleType, + typing.Sequence[ComponentSingleType], ] diff --git a/dash_mui_charts/TreeView.py b/dash_mui_charts/TreeView.py index 3d02b13..d332440 100644 --- a/dash_mui_charts/TreeView.py +++ b/dash_mui_charts/TreeView.py @@ -3,18 +3,20 @@ import typing # noqa: F401 from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401 from dash.development.base_component import Component, _explicitize_args - +try: + from dash.types import NumberType # noqa: F401 +except ImportError: + # Backwards compatibility for dash<=4.1.0 + if typing.TYPE_CHECKING: + raise + NumberType = typing.Union[ # noqa: F401 + typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ] + +ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ - str, - int, - float, - Component, - None, - typing.Sequence[typing.Union[str, int, float, Component, None]], -] - -NumberType = typing.Union[ - typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ComponentSingleType, + typing.Sequence[ComponentSingleType], ] diff --git a/dash_mui_charts/TreeViewPro.py b/dash_mui_charts/TreeViewPro.py index 90fb239..6a27cc2 100644 --- a/dash_mui_charts/TreeViewPro.py +++ b/dash_mui_charts/TreeViewPro.py @@ -3,18 +3,20 @@ import typing # noqa: F401 from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401 from dash.development.base_component import Component, _explicitize_args - +try: + from dash.types import NumberType # noqa: F401 +except ImportError: + # Backwards compatibility for dash<=4.1.0 + if typing.TYPE_CHECKING: + raise + NumberType = typing.Union[ # noqa: F401 + typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ] + +ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ - str, - int, - float, - Component, - None, - typing.Sequence[typing.Union[str, int, float, Component, None]], -] - -NumberType = typing.Union[ - typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex + ComponentSingleType, + typing.Sequence[ComponentSingleType], ] @@ -144,17 +146,29 @@ class TreeViewPro(Component): - event_timestamp (number; optional) - kebabMenuItems (list of dicts; optional): - Kebab menu options: [{label, value, icon?}]. `value` is sent back - as `action`. + Kebab menu entries. Each entry is one of: a LEAF {label, value, + icon?} — picking it fires `kebabAction` with `action` = its + `value`; a DIVIDER {divider: True}; or a SUBMENU {label, icon?, + children: [entries]} that opens on hover/click (nesting is + recursive). `kebabMenuItems` is a list of dicts with keys: - - label (string; required) + - label (string; optional) - - value (string; required) + - value (string; optional) - icon (string; optional) + - divider (boolean; optional) + + - children (list; optional) + +- kebabMenuItemsById (dict with strings as keys and values of type list; optional): + Per-node kebab menus: {itemId: [entries]} (same entry shape as + `kebabMenuItems`, submenus/dividers included). A node listed here + gets its own menu; all other nodes fall back to `kebabMenuItems`. + - lazyLoadRequest (dict; optional): Output: Fired when unloaded node is expanded. {itemId, event_timestamp}. @@ -261,9 +275,11 @@ class TreeViewPro(Component): KebabMenuItems = TypedDict( "KebabMenuItems", { - "label": str, - "value": str, - "icon": NotRequired[str] + "label": NotRequired[str], + "value": NotRequired[str], + "icon": NotRequired[str], + "divider": NotRequired[bool], + "children": NotRequired[typing.Sequence] } ) @@ -355,6 +371,7 @@ def __init__( sliderStep: typing.Optional[NumberType] = None, sliderColor: typing.Optional[str] = None, kebabMenuItems: typing.Optional[typing.Sequence["KebabMenuItems"]] = None, + kebabMenuItemsById: typing.Optional[typing.Dict[typing.Union[str, float, int], typing.Sequence]] = None, sliderChange: typing.Optional["SliderChange"] = None, kebabAction: typing.Optional["KebabAction"] = None, clickedItem: typing.Optional["ClickedItem"] = None, @@ -362,9 +379,9 @@ def __init__( editedItemLabel: typing.Optional["EditedItemLabel"] = None, **kwargs ): - self._prop_names = ['id', 'ariaLabel', 'ariaLabelledBy', 'checkboxSelection', 'clickedItem', 'collapseIcon', 'controlsItems', 'defaultExpandedItems', 'defaultSelectedItems', 'disableSelection', 'disabledItems', 'disabledItemsFocusable', 'editableItems', 'editedItemLabel', 'endIcon', 'expandIcon', 'expandedItems', 'expansionTrigger', 'focusedItem', 'getItemChildren', 'getItemId', 'getItemLabel', 'height', 'isItemEditable', 'itemChildrenIndentation', 'itemPositionChanged', 'items', 'itemsReordering', 'kebabAction', 'kebabMenuItems', 'lazyLoadRequest', 'lazyLoadedChildren', 'lazyLoading', 'licenseKey', 'multiSelect', 'orderedItems', 'reorderableItems', 'selectedItems', 'selectionPropagation', 'showItemControls', 'sliderChange', 'sliderColor', 'sliderMax', 'sliderMin', 'sliderStep', 'sliderValues', 'sx'] + self._prop_names = ['id', 'ariaLabel', 'ariaLabelledBy', 'checkboxSelection', 'clickedItem', 'collapseIcon', 'controlsItems', 'defaultExpandedItems', 'defaultSelectedItems', 'disableSelection', 'disabledItems', 'disabledItemsFocusable', 'editableItems', 'editedItemLabel', 'endIcon', 'expandIcon', 'expandedItems', 'expansionTrigger', 'focusedItem', 'getItemChildren', 'getItemId', 'getItemLabel', 'height', 'isItemEditable', 'itemChildrenIndentation', 'itemPositionChanged', 'items', 'itemsReordering', 'kebabAction', 'kebabMenuItems', 'kebabMenuItemsById', 'lazyLoadRequest', 'lazyLoadedChildren', 'lazyLoading', 'licenseKey', 'multiSelect', 'orderedItems', 'reorderableItems', 'selectedItems', 'selectionPropagation', 'showItemControls', 'sliderChange', 'sliderColor', 'sliderMax', 'sliderMin', 'sliderStep', 'sliderValues', 'sx'] self._valid_wildcard_attributes = [] - self.available_properties = ['id', 'ariaLabel', 'ariaLabelledBy', 'checkboxSelection', 'clickedItem', 'collapseIcon', 'controlsItems', 'defaultExpandedItems', 'defaultSelectedItems', 'disableSelection', 'disabledItems', 'disabledItemsFocusable', 'editableItems', 'editedItemLabel', 'endIcon', 'expandIcon', 'expandedItems', 'expansionTrigger', 'focusedItem', 'getItemChildren', 'getItemId', 'getItemLabel', 'height', 'isItemEditable', 'itemChildrenIndentation', 'itemPositionChanged', 'items', 'itemsReordering', 'kebabAction', 'kebabMenuItems', 'lazyLoadRequest', 'lazyLoadedChildren', 'lazyLoading', 'licenseKey', 'multiSelect', 'orderedItems', 'reorderableItems', 'selectedItems', 'selectionPropagation', 'showItemControls', 'sliderChange', 'sliderColor', 'sliderMax', 'sliderMin', 'sliderStep', 'sliderValues', 'sx'] + self.available_properties = ['id', 'ariaLabel', 'ariaLabelledBy', 'checkboxSelection', 'clickedItem', 'collapseIcon', 'controlsItems', 'defaultExpandedItems', 'defaultSelectedItems', 'disableSelection', 'disabledItems', 'disabledItemsFocusable', 'editableItems', 'editedItemLabel', 'endIcon', 'expandIcon', 'expandedItems', 'expansionTrigger', 'focusedItem', 'getItemChildren', 'getItemId', 'getItemLabel', 'height', 'isItemEditable', 'itemChildrenIndentation', 'itemPositionChanged', 'items', 'itemsReordering', 'kebabAction', 'kebabMenuItems', 'kebabMenuItemsById', 'lazyLoadRequest', 'lazyLoadedChildren', 'lazyLoading', 'licenseKey', 'multiSelect', 'orderedItems', 'reorderableItems', 'selectedItems', 'selectionPropagation', 'showItemControls', 'sliderChange', 'sliderColor', 'sliderMax', 'sliderMin', 'sliderStep', 'sliderValues', 'sx'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() diff --git a/dash_mui_charts/dash_mui_charts b/dash_mui_charts/dash_mui_charts deleted file mode 100644 index 3da794f..0000000 --- a/dash_mui_charts/dash_mui_charts +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "dash_mui_charts", - "version": "1.3.0", - "description": "Dash components wrapping MUI X Charts for creating interactive data visualizations", - "main": "build/index.js", - "repository": { - "type": "git", - "url": "git://github.com/pip-install-python/dash-mui-charts.git" - }, - "bugs": { - "url": "https://github.com/pip-install-python/dash-mui-charts/issues" - }, - "homepage": "https://github.com/pip-install-python/dash-mui-charts", - "scripts": { - "start": "webpack serve --config webpack.serve.config.js --open", - "build:js": "webpack --mode production", - "build:backends": "dash-generate-components ./src/lib/components dash_mui_charts -p dash_mui_charts --ignore \\.test\\.", - "build": "npm run build:js && npm run build:backends", - "validate-init": "python _validate_init.py" - }, - "author": "Pip Install Python", - "license": "MIT", - "dependencies": { - "@emotion/react": "^11.14.0", - "@emotion/styled": "^11.14.1", - "@mui/icons-material": "^6.5.0", - "@mui/material": "^6.5.0", - "@mui/x-charts": "^8.24.0", - "@mui/x-charts-pro": "^8.24.0", - "@mui/x-date-pickers": "8.24.0", - "@mui/x-license": "^7.24.0", - "@mui/x-tree-view": "^8.27.2", - "@mui/x-tree-view-pro": "^8.27.2", - "dayjs": "1.11.13", - "ramda": "^0.26.1" - }, - "devDependencies": { - "@babel/core": "^7.22.10", - "@babel/plugin-transform-object-rest-spread": "^7.22.5", - "@babel/preset-env": "^7.22.10", - "@babel/preset-react": "^7.22.5", - "@plotly/webpack-dash-dynamic-import": "^1.2.0", - "babel-loader": "^9.1.3", - "css-loader": "^6.8.1", - "prop-types": "^15.8.1", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "style-loader": "^3.3.3", - "webpack": "^5.88.2", - "webpack-cli": "^5.1.4", - "webpack-dev-server": "^4.15.1" - }, - "peerDependencies": { - "react": ">=17.0.0", - "react-dom": ">=17.0.0" - }, - "engines": { - "node": ">=14.0.0", - "npm": ">=6.1.0" - } -} diff --git a/dash_mui_charts/dash_mui_charts.min.js b/dash_mui_charts/dash_mui_charts.min.js index 4f8c78f..e40cc36 100644 --- a/dash_mui_charts/dash_mui_charts.min.js +++ b/dash_mui_charts/dash_mui_charts.min.js @@ -1,5 +1,5 @@ /*! For license information please see dash_mui_charts.min.js.LICENSE.txt */ -(()=>{var e,t,n,r,i={445(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,a={},s=function(e){return(e=+e)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],u=function(e){var t=a[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=a.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},p={A:[o,function(e){this.afternoon=d(e,!1)}],a:[o,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,l("seconds")],ss:[i,l("seconds")],m:[i,l("minutes")],mm:[i,l("minutes")],H:[i,l("hours")],h:[i,l("hours")],HH:[i,l("hours")],hh:[i,l("hours")],D:[i,l("day")],DD:[r,l("day")],Do:[o,function(e){var t=a.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],w:[i,l("week")],ww:[r,l("week")],M:[i,l("month")],MM:[r,l("month")],MMM:[o,function(e){var t=u("months"),n=(u("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,l("year")],Z:c,ZZ:c};function h(n){var r,i;r=n,i=a&&a.formats;for(var o=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})})).match(t),s=o.length,l=0;l-1)return new Date(("X"===t?1e3:1)*e);var i=h(t)(e),o=i.year,a=i.month,s=i.day,l=i.hours,c=i.minutes,u=i.seconds,d=i.milliseconds,p=i.zone,m=i.week,f=new Date,g=s||(o||a?1:f.getDate()),y=o||f.getFullYear(),v=0;o&&!a||(v=a>0?a-1:f.getMonth());var b,x=l||0,I=c||0,w=u||0,k=d||0;return p?new Date(Date.UTC(y,v,g,x,I,w,k+60*p.offset*1e3)):n?new Date(Date.UTC(y,v,g,x,I,w,k)):(b=new Date(y,v,g,x,I,w,k),m&&(b=r(b).week(m).toDate()),b)}catch(e){return new Date("")}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date("")),a={}}else if(s instanceof Array)for(var p=s.length,m=1;m<=p;m+=1){o[1]=s[m-1];var f=n.apply(this,o);if(f.isValid()){this.$d=f.$d,this.$L=f.$L,this.init();break}m===p&&(this.$d=new Date(""))}else i.call(this,e)}}}()},1020(e,t,n){"use strict";var r=n(1609),i=Symbol.for("react.element"),o=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,l={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)o.call(t,r)&&!s.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===l[r]&&(l[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:l,_owner:a.current}}t.jsx=l,t.jsxs=l},1609(e){"use strict";e.exports=window.React},2162(e,t,n){"use strict";var r=n(1609),i=n(9888),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=i.useSyncExternalStore,s=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=c(function(){function e(e){if(!l){if(l=!0,a=e,e=r(e),void 0!==i&&p.hasValue){var t=p.value;if(i(t,e))return s=t}return s=e}if(t=s,o(a,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(a=e,t):(a=e,s=n)}var a,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,i]);var h=a(e,d[0],d[1]);return l(function(){p.hasValue=!0,p.value=h},[h]),u(h),h}},3072(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,f=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function I(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case f:case l:return e;default:return t}}case i:return t}}}function w(e){return I(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=o,t.Lazy=g,t.Memo=f,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return w(e)||I(e)===u},t.isConcurrentMode=w,t.isContextConsumer=function(e){return I(e)===c},t.isContextProvider=function(e){return I(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return I(e)===p},t.isFragment=function(e){return I(e)===o},t.isLazy=function(e){return I(e)===g},t.isMemo=function(e){return I(e)===f},t.isPortal=function(e){return I(e)===i},t.isProfiler=function(e){return I(e)===s},t.isStrictMode=function(e){return I(e)===a},t.isSuspense=function(e){return I(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===a||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===f||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===v||e.$$typeof===b||e.$$typeof===x||e.$$typeof===y)},t.typeOf=I},3404(e,t,n){"use strict";e.exports=n(3072)},4146(e,t,n){"use strict";var r=n(3404),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var i=h(n);i&&i!==m&&e(t,i,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),f=l(n),g=0;g=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(i,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(v=i),i||!r&&v},k=function(e,t){if(I(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new M(n)},S=y;S.l=w,S.i=I,S.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var M=function(){function f(e){this.$L=w(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var g=f.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(S.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(h);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return S},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=k(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return k(e)25){var o=i(this).startOf(t).add(1,t).date(r),a=i(this).endOf(e);if(o.isBefore(a))return 1}var s=i(this).startOf(t).date(r).startOf(e).subtract(1,"millisecond"),l=this.diff(s,e,!0);return l<0?i(this).startOf("week").week():Math.ceil(l)},o.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}()},8493(e,t,n){"use strict";var r=n(1609),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,a=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return s(function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})},[e,n,t]),a(function(){return c(i)&&u({inst:i}),e(function(){c(i)&&u({inst:i})})},[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},9242(e,t,n){"use strict";e.exports=n(2162)},9853(e){var t=.1,n="function"==typeof Float32Array;function r(e,t){return 1-3*t+3*e}function i(e,t){return 3*t-6*e}function o(e){return 3*e}function a(e,t,n){return((r(t,n)*e+i(t,n))*e+o(t))*e}function s(e,t,n){return 3*r(t,n)*e*e+2*i(t,n)*e+o(t)}function l(e){return e}e.exports=function(e,r,i,o){if(!(0<=e&&e<=1&&0<=i&&i<=1))throw new Error("bezier x values must be in [0, 1] range");if(e===r&&i===o)return l;for(var c=n?new Float32Array(11):new Array(11),u=0;u<11;++u)c[u]=a(u*t,e,i);return function(n){return 0===n?0:1===n?1:a(function(n){for(var r=0,o=1;10!==o&&c[o]<=n;++o)r+=t;--o;var l=r+(n-c[o])/(c[o+1]-c[o])*t,u=s(l,e,i);return u>=.001?function(e,t,n,r){for(var i=0;i<4;++i){var o=s(t,n,r);if(0===o)return t;t-=(a(t,n,r)-e)/o}return t}(n,l,e,i):0===u?l:function(e,t,n,r,i){var o,s,l=0;do{(o=a(s=t+(n-t)/2,r,i)-e)>0?n=s:t=s}while(Math.abs(o)>1e-7&&++l<10);return s}(n,r,r+t,e,i)}(n),r,o)}}},9888(e,t,n){"use strict";e.exports=n(8493)}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return i[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=i,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);a.r(i);var o={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>o[e]=()=>n[e]);return o.default=()=>n,a.d(i,o),i},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,n)=>(a.f[n](e,t),t),[])),a.u=e=>e+".dash_mui_charts.min.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="dash_mui_charts:",a.l=(e,t,i,o)=>{if(n[e])n[e].push(t);else{var s,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;u{s.onerror=s.onload=null,clearTimeout(h);var i=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach(e=>e(r)),t)return t(r)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),l&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})();var s,l=function(){var e=document.currentScript;if(!e){for(var t=document.getElementsByTagName("script"),n=[],r=0;r{var e={57:0};a.f.j=(t,n)=>{var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise((n,i)=>r=e[t]=[n,i]);n.push(r[2]=i);var o=a.p+a.u(t),s=new Error;a.l(o,n=>{if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",s.name="ChunkLoadError",s.type=i,s.request=o,r[1](s)}},"chunk-"+t,t)}};var t=(t,n)=>{var r,i,[o,s,l]=n,c=0;if(o.some(t=>0!==e[t])){for(r in s)a.o(s,r)&&(a.m[r]=s[r]);l&&l(a)}for(t&&t(n);c{"use strict";a.r(u),a.d(u,{BarChart:()=>YR,CandlestickChart:()=>iD,CompositeChart:()=>dR,Heatmap:()=>Nj,LineChart:()=>$A,LiveTradingChart:()=>ER,PieChart:()=>PL,ScatterChart:()=>KL,SimpleTreeView:()=>x_,SparklineChart:()=>DO,TimeClock:()=>xU,TreeView:()=>o_,TreeViewPro:()=>wB});var e=a(1609),t=a.t(e,2),n=a.n(e);const r=window.PropTypes;var i=a.n(r);const o="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();o.__MUI_LICENSE_INFO__=o.__MUI_LICENSE_INFO__||{key:void 0};class s{static getLicenseInfo(){return o.__MUI_LICENSE_INFO__}static getLicenseKey(){return s.getLicenseInfo().key}static setLicenseKey(e){s.getLicenseInfo().key=e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t{},h={licenseVerification:()=>null},m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f=e=>{let t,n,r,i,o,a,s,l="",c=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");c>4,n=(15&o)<<4|a>>2,r=(3&a)<<6|s,l+=String.fromCharCode(t),64!=a&&(l+=String.fromCharCode(n)),64!=s&&(l+=String.fromCharCode(r));return l},g=[];let y=0;for(;y<64;)g[y]=0|4294967296*Math.sin(++y%Math.PI);let v=function(e){return e.NotFound="NotFound",e.Invalid="Invalid",e.ExpiredAnnual="ExpiredAnnual",e.ExpiredAnnualGrace="ExpiredAnnualGrace",e.ExpiredVersion="ExpiredVersion",e.Valid="Valid",e.OutOfScope="OutOfScope",e.NotAvailableInInitialProPlan="NotAvailableInInitialProPlan",e}({});const b=["pro","premium"],x=["perpetual","annual","subscription"],I=/^.*EXPIRY=([0-9]+),.*$/,w=/^.*ORDER:([0-9]+),.*$/,k=["x-data-grid-pro","x-date-pickers-pro"];function S({releaseInfo:e,licenseKey:t,packageName:n}){if(!e)throw new Error("MUI X: The release information is missing. Not able to validate license.");if(!t)return{status:v.NotFound};const r=t.substr(0,32),i=t.substr(32);if(r!==function(e){const t=[];let n,r,i,o=unescape(encodeURI(e))+"€",a=o.length;const s=[n=1732584193,r=4023233417,~n,~r];for(e=--a/4+2|15,t[--e]=8*a;~a;)t[a>>2]|=o.charCodeAt(a)<<8*a--;for(y=o=0;y>4]+g[o]+~~t[y|15&[o,5*o+1,3*o+5,7*o][a]])<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+o++%4])|i>>>-a),n,r])n=0|a[1],r=a[2];for(o=4;o;)s[--o]+=a[o]}for(e="";o<32;)e+=(s[o>>3]>>4*(1^o++)&15).toString(16);return e}(i))return{status:v.Invalid};const o=function(e){const t=f(e);return t.includes("KEYVERSION=1")?function(e){let t,n;try{t=parseInt(e.match(I)[1],10),t&&!Number.isNaN(t)||(t=null),n=parseInt(e.match(w)[1],10),n&&!Number.isNaN(n)||(n=null)}catch(e){t=null,n=null}return{version:1,licenseModel:"perpetual",planScope:"pro",planVersion:"initial",expiryTimestamp:t,expiryDate:t?new Date(t):null,orderId:n}}(t):t.includes("KV=2")?function(e){const t={version:2,licenseModel:null,planScope:null,planVersion:"initial",expiryTimestamp:null,expiryDate:null,orderId:null};return e.split(",").map(e=>e.split("=")).filter(e=>2===e.length).forEach(([e,n])=>{if("S"===e&&(t.planScope=n),"LM"===e&&(t.licenseModel=n),"E"===e){const e=parseInt(n,10);e&&!Number.isNaN(e)&&(t.expiryTimestamp=e,t.expiryDate=new Date(e))}if("PV"===e&&(t.planVersion=n),"O"===e){const e=parseInt(n,10);e&&!Number.isNaN(e)&&(t.orderId=e)}}),t}(t):null}(i);if(null==o)return console.error("MUI X: Error checking license. Key version not found!"),{status:v.Invalid};if(null==o.licenseModel||!x.includes(o.licenseModel))return console.error("MUI X: Error checking license. License model not found or invalid!"),{status:v.Invalid};if(null==o.expiryTimestamp)return console.error("MUI X: Error checking license. Expiry timestamp not found or invalid!"),{status:v.Invalid};o.licenseModel;{const t=parseInt(f(e),10);if(Number.isNaN(t))throw new Error("MUI X: The release information is invalid. Not able to validate license.");if(o.expiryTimestamp{const e=r??M.getLicenseKey();if(T[t]&&T[t].key===e)return T[t].licenseVerifier;const i=t.includes("premium")?"Premium":"Pro",o=S({releaseInfo:n,licenseKey:e,packageName:t}),a=`@mui/${t}`;return p(h.licenseVerification({licenseKey:e},{packageName:t,packageReleaseInfo:n,licenseStatus:o?.status})),o.status===v.Valid||(o.status===v.Invalid?P(["MUI X: Invalid license key.","","Your MUI X license key format isn't valid. It could be because the license key is missing a character or has a typo.","","To solve the issue, you need to double check that `setLicenseKey()` is called with the right argument","Please check the license key installation https://mui.com/r/x-license-key-installation."]):o.status===v.NotAvailableInInitialProPlan?P(["MUI X: Component not included in your license.","","The component you are trying to use is not included in the Pro Plan you purchased.","","Your license is from an old version of the Pro Plan that is only compatible with the `@mui/x-data-grid-pro` and `@mui/x-date-pickers-pro` commercial packages.","","To start using another Pro package, please consider reaching to our sales team to upgrade your license or visit https://mui.com/r/x-get-license to get a new license key."]):o.status===v.OutOfScope?function({packageName:e}){const t=e.replace(/-(premium|pro)$/,"");P(["MUI X: License key plan mismatch.","","Your use of MUI X is not compatible with the plan of your license key. The feature you are trying to use is not included in the plan of your license key. This happens if you try to use Data Grid Premium with a license key for the Pro plan.","","To solve the issue, you can upgrade your plan from Pro to Premium at https://mui.com/r/x-get-license?scope=premium.",`Or if you didn't intend to use Premium features, you can replace the import of \`${t}-premium\` with \`${t}-pro\`.`])}({packageName:a}):o.status===v.NotFound?function({plan:e,packageName:t}){P(["MUI X: Missing license key.","",`The license key is missing. You might not be allowed to use \`${t}\` which is part of MUI X ${e}.`,"","To solve the issue, you can check the free trial conditions: https://mui.com/r/x-license-trial.","If you are eligible no actions are required. If you are not eligible to the free trial, you need to purchase a license https://mui.com/r/x-get-license or stop using the software immediately."])}({plan:i,packageName:a}):o.status===v.ExpiredAnnualGrace?function({plan:e,licenseKey:t,expiryTimestamp:n}){P(["MUI X: Expired license key.","",`Your annual license key to use MUI X ${e} in non-production environments has expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${e} component (more details in https://mui.com/r/x-license-annual).`,"","To solve the problem you can either:","","- Renew your license https://mui.com/r/x-get-license and use the new key",`- Stop making changes to code depending directly or indirectly on MUI X ${e}'s APIs`,"","Note that your license is perpetual in production environments with any version released before your license term ends.","",`- License key expiry timestamp: ${new Date(n)}`,`- Installed license key: ${t}`,""])}(l({plan:i},o.meta)):o.status===v.ExpiredAnnual?function({plan:e,licenseKey:t,expiryTimestamp:n}){throw new Error(["MUI X: Expired license key.","",`Your annual license key to use MUI X ${e} in non-production environments has expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${e} component (more details in https://mui.com/r/x-license-annual).`,"","To solve the problem you can either:","","- Renew your license https://mui.com/r/x-get-license and use the new key",`- Stop making changes to code depending directly or indirectly on MUI X ${e}'s APIs`,"","Note that your license is perpetual in production environments with any version released before your license term ends.","",`- License key expiry timestamp: ${new Date(n)}`,`- Installed license key: ${t}`,""].join("\n"))}(l({plan:i},o.meta)):o.status===v.ExpiredVersion&&function({packageName:e}){P(["MUI X: Expired package version.","",`You have installed a version of \`${e}\` that is outside of the maintenance plan of your license key. By default, commercial licenses provide access to new versions released during the first year after the purchase.`,"","To solve the issue, you can renew your license https://mui.com/r/x-get-license or install an older version of the npm package that is compatible with your license key."])}({packageName:a})),T[t]={key:e,licenseVerifier:o},o},[t,n,r])}var O=a(4848);function j(e){switch(e){case v.ExpiredAnnualGrace:case v.ExpiredAnnual:return"MUI X Expired license key";case v.ExpiredVersion:return"MUI X Expired package version";case v.Invalid:return"MUI X Invalid license key";case v.OutOfScope:return"MUI X License key plan mismatch";case v.NotAvailableInInitialProPlan:return"MUI X Product not covered by plan";case v.NotFound:return"MUI X Missing license key";default:throw new Error("Unhandled MUI X license status.")}}const L=(R=function(e){const{packageName:t,releaseInfo:n}=e,r=A(t,n);return r.status===v.Valid?null:(0,O.jsx)("div",{style:{position:"absolute",pointerEvents:"none",color:"#8282829e",zIndex:1e5,width:"100%",textAlign:"center",bottom:"50%",right:0,letterSpacing:5,fontSize:24},children:j(r.status)})},e.memo(R,d));var R;let D=0;const $={...t}.useId;function z(t){if(void 0!==$){const e=$();return t??e}return function(t){const[n,r]=e.useState(t),i=t||n;return e.useEffect(()=>{null==n&&(D+=1,r(`mui-${D}`))},[n]),i}(t)}var N=a(9888),_=a(9242);const F=parseInt(e.version,10),H=F>=19?function(t,n,r,i,o){const a=e.useCallback(()=>n(t.getSnapshot(),r,i,o),[t,n,r,i,o]);return(0,N.useSyncExternalStore)(t.subscribe,a,a)}:function(e,t,n,r,i){return(0,_.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))};class B{static create(e){return new B(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){this.state=e,this.updateTick+=1;const t=this.updateTick,n=this.listeners.values();let r;for(;r=n.next(),!r.done;){if(t!==this.updateTick)return;(0,r.value)(e)}}update(e){for(const t in e)if(!Object.is(this.state[t],e[t]))return void this.setState(l({},this.state,e))}set(e,t){Object.is(this.state[e],t)||this.setState(l({},this.state,{[e]:t}))}use=(()=>(e,t,n,r)=>function(e,t,n,r,i){return H(e,t,n,r,i)}(this,e,t,n,r))()}const V="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,U=({params:t,store:n})=>{e.useEffect(()=>{n.set("animation",l({},n.state.animation,{skip:t.skipAnimation}))},[n,t.skipAnimation]);const r=e.useCallback(()=>{let e=!1;return n.set("animation",l({},n.state.animation,{skipAnimationRequests:n.state.animation.skipAnimationRequests+1})),()=>{e||(e=!0,n.set("animation",l({},n.state.animation,{skipAnimationRequests:n.state.animation.skipAnimationRequests-1})))}},[n]);return V(()=>{if("undefined"==typeof window||!window?.matchMedia)return;let e;const t=t=>{t.matches?e=r():e?.()},n=window.matchMedia("(prefers-reduced-motion)");return t(n),n.addEventListener("change",t),()=>{n.removeEventListener("change",t)}},[r,n]),{instance:{disableAnimation:r}}};function Y(t,n){const r=e.useRef(!0);e.useEffect(()=>{if(!r.current)return t();r.current=!1},n)}U.params={skipAnimation:!0},U.getDefaultizedParams=({params:e})=>l({},e,{skipAnimation:e.skipAnimation??!1}),U.getInitialState=({skipAnimation:e})=>("undefined"==typeof window||window,{animation:{skip:e,skipAnimationRequests:0}});const W="DEFAULT_X_AXIS_KEY",G="DEFAULT_Y_AXIS_KEY",K={top:20,bottom:20,left:20,right:20};var q=Symbol("NOT_FOUND");var X=e=>Array.isArray(e)?e:[e];Symbol(),Object.getPrototypeOf({});var Z=(e,t)=>e===t;function J(e,t){const n="object"==typeof t?t:{equalityCheck:t},{equalityCheck:r=Z,maxSize:i=1,resultEqualityCheck:o}=n,a=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;const{length:r}=t;for(let i=0;it&&e(t.key,n)?t.value:q,put(e,n){t={key:e,value:n}},getEntries:()=>t?[t]:[],clear(){t=void 0}}}(a):function(e,t){let n=[];function r(e){const r=n.findIndex(n=>t(e,n.key));if(r>-1){const e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return q}return{get:r,put:function(t,i){r(t)===q&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(i,a);function c(){let t=l.get(arguments);if(t===q){if(t=e.apply(null,arguments),s++,o){const e=l.getEntries().find(e=>o(e.value,t));e&&(t=e.value,0!==s&&s--)}l.put(arguments,t)}return t}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c}var Q="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function ee(){return{s:0,v:void 0,o:null,p:null}}function te(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let i,o=0;function a(){let t=n;const{length:a}=arguments;for(let e=0,n=a;e{n={s:0,v:void 0,o:null,p:null},a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function ne(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,i=0,o={},a=e.pop();"object"==typeof a&&(o=a,a=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const s={...n,...o},{memoize:l,memoizeOptions:c=[],argsMemoize:u=te,argsMemoizeOptions:d=[],devModeChecks:p={}}=s,h=X(c),m=X(d),f=function(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}(e),g=l(function(){return r++,a.apply(null,arguments)},...h),y=u(function(){i++;const e=function(e,t){const n=[],{length:r}=e;for(let i=0;ii,resetDependencyRecomputations:()=>{i=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:l,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var re=ne(te),ie=Object.assign((e,t=re)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e),r=t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}));return r},{withTypes:()=>ie});const oe=ne({memoize:J,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),ae=(e,t,n,r,i,o,a,s,...l)=>{if(l.length>0)throw new Error("Unsupported number of selectors");let c;if(e&&t&&n&&r&&i&&o&&a&&s)c=(l,c,u,d)=>{const p=e(l,c,u,d),h=t(l,c,u,d),m=n(l,c,u,d),f=r(l,c,u,d),g=i(l,c,u,d),y=o(l,c,u,d),v=a(l,c,u,d);return s(p,h,m,f,g,y,v,c,u,d)};else if(e&&t&&n&&r&&i&&o&&a)c=(s,l,c,u)=>{const d=e(s,l,c,u),p=t(s,l,c,u),h=n(s,l,c,u),m=r(s,l,c,u),f=i(s,l,c,u),g=o(s,l,c,u);return a(d,p,h,m,f,g,l,c,u)};else if(e&&t&&n&&r&&i&&o)c=(a,s,l,c)=>{const u=e(a,s,l,c),d=t(a,s,l,c),p=n(a,s,l,c),h=r(a,s,l,c),m=i(a,s,l,c);return o(u,d,p,h,m,s,l,c)};else if(e&&t&&n&&r&&i)c=(o,a,s,l)=>{const c=e(o,a,s,l),u=t(o,a,s,l),d=n(o,a,s,l),p=r(o,a,s,l);return i(c,u,d,p,a,s,l)};else if(e&&t&&n&&r)c=(i,o,a,s)=>{const l=e(i,o,a,s),c=t(i,o,a,s),u=n(i,o,a,s);return r(l,c,u,o,a,s)};else if(e&&t&&n)c=(r,i,o,a)=>{const s=e(r,i,o,a),l=t(r,i,o,a);return n(s,l,i,o,a)};else if(e&&t)c=(n,r,i,o)=>{const a=e(n,r,i,o);return t(a,r,i,o)};else{if(!e)throw new Error("Missing arguments");c=e}return c},se=e=>(...t)=>{const n=new WeakMap;let r=1;const i=t[t.length-1],o=t.length-1||1,a=Math.max(i.length-o,0);if(a>3)throw new Error("Unsupported number of arguments");return(o,s,l,c)=>{let u=o.__cacheKey__;u||(u={id:r},o.__cacheKey__=u,r+=1);let d=n.get(u);if(!d){const r=1===t.length?[e=>e,i]:t;let o=t;const s=[void 0,void 0,void 0];switch(a){case 0:break;case 1:o=[...r.slice(0,-1),()=>s[0],i];break;case 2:o=[...r.slice(0,-1),()=>s[0],()=>s[1],i];break;case 3:o=[...r.slice(0,-1),()=>s[0],()=>s[1],()=>s[2],i];break;default:throw new Error("Unsupported number of arguments")}e&&(o=[...o,e]),d=oe(...o),d.selectorArgs=s,n.set(u,d)}switch(a){case 3:d.selectorArgs[2]=c;case 2:d.selectorArgs[1]=l;case 1:d.selectorArgs[0]=s}switch(a){case 0:return d(o);case 1:return d(o,s);case 2:return d(o,s,l);case 3:return d(o,s,l,c);default:throw new Error("unreachable")}}},le=se(),ce=e=>e.cartesianAxis?.x,ue=e=>e.cartesianAxis?.y,de=le(ae(ue,function(e){return(e??[]).reduce((e,t)=>"left"===t.position?e+(t.width||0)+(t.zoom?.slider.enabled?t.zoom.slider.size:0):e,0)}),ae(ue,function(e){return(e??[]).reduce((e,t)=>"right"===t.position?e+(t.width||0)+(t.zoom?.slider.enabled?t.zoom.slider.size:0):e,0)}),ae(ce,function(e){return(e??[]).reduce((e,t)=>"top"===t.position?e+(t.height||0)+(t.zoom?.slider.enabled?t.zoom.slider.size:0):e,0)}),ae(ce,function(e){return(e??[]).reduce((e,t)=>"bottom"===t.position?e+(t.height||0)+(t.zoom?.slider.enabled?t.zoom.slider.size:0):e,0)}),function(e,t,n,r){return{left:e,right:t,top:n,bottom:r}}),pe=e=>e.dimensions,he=le(pe,e=>e.dimensions.margin,de,function({width:e,height:t},{top:n,right:r,bottom:i,left:o},{left:a,right:s,top:l,bottom:c}){return{width:e-o-r-a-s,left:o+a,right:r+s,height:t-n-i-l-c,top:n+l,bottom:i+c}}),me=ae(pe,e=>e.width),fe=ae(pe,e=>e.height),ge=ae(pe,e=>e.propsWidth),ye=ae(pe,e=>e.propsHeight);function ve(e,t){return"number"==typeof e?{top:e,bottom:e,left:e,right:e}:t?l({},t,e):e}const be=({params:t,store:n,svgRef:r})=>{const i=void 0!==t.width&&void 0!==t.height,o=e.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[a,s]=e.useState(0),[l,c]=e.useState(0),u=e.useCallback(()=>{const e=r?.current;if(!e)return{};const i=function(e){const t=function(e){return e&&e.ownerDocument||document}(e);return t.defaultView||window}(e).getComputedStyle(e),o=Math.floor(parseFloat(i.height))||0,a=Math.floor(parseFloat(i.width))||0;return n.state.dimensions.width===a&&n.state.dimensions.height===o||n.set("dimensions",{margin:{top:t.margin.top,right:t.margin.right,bottom:t.margin.bottom,left:t.margin.left},width:t.width??a,height:t.height??o,propsWidth:t.width,propsHeight:t.height}),{height:o,width:a}},[n,r,t.height,t.width,t.margin.left,t.margin.right,t.margin.top,t.margin.bottom]);Y(()=>{const e=t.width??n.state.dimensions.width,r=t.height??n.state.dimensions.height;n.set("dimensions",{margin:{top:t.margin.top,right:t.margin.right,bottom:t.margin.bottom,left:t.margin.left},width:e,height:r,propsHeight:t.height,propsWidth:t.width})},[n,t.height,t.width,t.margin.left,t.margin.right,t.margin.top,t.margin.bottom]),e.useEffect(()=>{o.current.displayError=!0},[]),V(()=>{if(i||!o.current.initialCompute||o.current.computeRun>10)return;const e=u();e.width!==a||e.height!==l?(o.current.computeRun+=1,void 0!==e.width&&s(e.width),void 0!==e.height&&c(e.height)):o.current.initialCompute&&(o.current.initialCompute=!1)},[l,a,u,i]),V(()=>{if(i)return()=>{};u();const e=r.current;if("undefined"==typeof ResizeObserver)return()=>{};let t;const n=new ResizeObserver(()=>{t=requestAnimationFrame(()=>{u()})});return e&&n.observe(e),()=>{t&&cancelAnimationFrame(t),e&&n.unobserve(e)}},[u,i,r]);const d=n.use(he),p=e.useCallback(e=>e>=d.left-1&&e<=d.left+d.width,[d.left,d.width]),h=e.useCallback(e=>e>=d.top-1&&e<=d.top+d.height,[d.height,d.top]);return{instance:{isPointInside:e.useCallback((e,t,n)=>!!(n&&"closest"in n&&n.closest("[data-drawing-container]"))||p(e)&&h(t),[p,h]),isXInside:p,isYInside:h}}};be.params={width:!0,height:!0,margin:!0},be.getDefaultizedParams=({params:e})=>l({},e,{margin:ve(e.margin,K)}),be.getInitialState=({width:e,height:t,margin:n})=>({dimensions:{margin:n,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const xe=({params:e,store:t})=>(V(()=>{t.set("experimentalFeatures",e.experimentalFeatures)},[t,e.experimentalFeatures]),{});xe.params={experimentalFeatures:!0},xe.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});let Ie=0;const we=({params:t,store:n})=>(e.useEffect(()=>{void 0===t.id||t.id===n.state.id.providedChartId&&void 0!==n.state.id.chartId||n.set("id",l({},n.state.id,{chartId:t.id??(Ie+=1,`mui-chart-${Ie}`)}))},[n,t.id]),{});we.params={id:!0},we.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const ke=function(t){const n=e.useRef(t);return V(()=>{n.current=t}),e.useRef((...e)=>(0,n.current)(...e)).current},Se=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],Me=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],Ce=e=>"dark"===e?Me:Se,Pe=({series:e,colors:t,seriesConfig:n})=>{const r={};return e.forEach((e,i)=>{const o=n[e.type].getSeriesWithDefaultValues(e,i,t),a=o.id;if(void 0===r[e.type]&&(r[e.type]={series:{},seriesOrder:[]}),void 0!==r[e.type]?.series[a])throw new Error(`MUI X Charts: series' id "${a}" is not unique.`);r[e.type].series[a]=o,r[e.type].seriesOrder.push(a)}),r},Ee=(e,t)=>{const n=e[t.type]?.identifierSerializer;if(!n)throw new Error(`MUI X Charts: No identifier serializer found for series type "${t.type}".`);return n(t)},Te=({params:e,store:t,seriesConfig:n})=>{const{series:r,dataset:i,theme:o,colors:a}=e;Y(()=>{t.set("series",l({},t.state.series,{defaultizedSeries:Pe({series:r,colors:"function"==typeof a?a(o):a,seriesConfig:n}),dataset:i}))},[a,i,r,o,n,t]);const s=ke(e=>Ee(n,e));return{instance:{serializeIdentifier:s}}};Te.params={dataset:!0,series:!0,colors:!0,theme:!0};const Ae=[];Te.getDefaultizedParams=({params:e})=>l({},e,{series:e.series?.length?e.series:Ae,colors:e.colors??Ce,theme:e.theme??"light"}),Te.getInitialState=({series:e=[],colors:t,theme:n,dataset:r},i,o)=>({series:{seriesConfig:o,defaultizedSeries:Pe({series:e,colors:"function"==typeof t?t(n):t,seriesConfig:o}),dataset:r}});class Oe{activeGestures=(()=>new Map)();registerActiveGesture(e,t){this.activeGestures.has(e)||this.activeGestures.set(e,new Set);const n={gesture:t,element:e};this.activeGestures.get(e).add(n)}unregisterActiveGesture(e,t){const n=this.activeGestures.get(e);n&&(n.forEach(e=>{e.gesture===t&&n.delete(e)}),0===n.size&&this.activeGestures.delete(e))}getActiveGestures(e){const t=this.activeGestures.get(e);return t?Array.from(t).reduce((e,t)=>(e[t.gesture.name]=!0,e),{}):{}}isGestureActive(e,t){const n=this.activeGestures.get(e);return!!n&&Array.from(n).some(e=>e.gesture===t)}destroy(){this.activeGestures.clear()}unregisterElement(e){this.activeGestures.delete(e)}}class je{pressedKeys=(()=>new Set)();constructor(){this.initialize()}initialize(){"undefined"!=typeof window&&(window.addEventListener("keydown",this.handleKeyDown),window.addEventListener("keyup",this.handleKeyUp),window.addEventListener("blur",this.clearKeys))}handleKeyDown=e=>{this.pressedKeys.add(e.key)};handleKeyUp=e=>{this.pressedKeys.delete(e.key)};clearKeys=()=>{this.pressedKeys.clear()};areKeysPressed(e){return!e||0===e.length||e.every(e=>"ControlOrMeta"===e?navigator.platform.includes("Mac")?this.pressedKeys.has("Meta"):this.pressedKeys.has("Control"):this.pressedKeys.has(e))}destroy(){"undefined"!=typeof window&&(window.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("keyup",this.handleKeyUp),window.removeEventListener("blur",this.clearKeys)),this.clearKeys()}}class Le{preventEventInterruption=!0;pointers=(()=>new Map)();gestureHandlers=(()=>new Set)();constructor(e){this.root=e.root??document.getRootNode({composed:!0})??document.body,this.touchAction=e.touchAction||"auto",this.passive=e.passive??!1,this.preventEventInterruption=e.preventEventInterruption??!0,this.setupEventListeners()}registerGestureHandler(e){return this.gestureHandlers.add(e),()=>{this.gestureHandlers.delete(e)}}getPointers(){return new Map(this.pointers)}setupEventListeners(){"auto"!==this.touchAction&&(this.root.style.touchAction=this.touchAction),this.root.addEventListener("pointerdown",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointermove",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointerup",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointercancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("forceCancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("blur",this.handleInterruptEvents),this.root.addEventListener("contextmenu",this.handleInterruptEvents)}handleInterruptEvents=e=>{if(this.preventEventInterruption&&"pointerType"in e&&"touch"===e.pointerType)return void e.preventDefault();const t=new PointerEvent("forceCancel",{bubbles:!1,cancelable:!1}),n=this.pointers.values().next().value;if(this.pointers.size>0&&n){Object.defineProperties(t,{clientX:{value:n.clientX},clientY:{value:n.clientY},pointerId:{value:n.pointerId},pointerType:{value:n.pointerType}});for(const[e,t]of this.pointers.entries()){const n=l({},t,{type:"forceCancel"});this.pointers.set(e,n)}}this.notifyHandlers(t),this.pointers.clear()};handlePointerEvent=e=>{const{type:t,pointerId:n}=e;if("pointerdown"===t||"pointermove"===t)this.pointers.set(n,this.createPointerData(e));else if("pointerup"===t||"pointercancel"===t||"forceCancel"===t)return this.pointers.set(n,this.createPointerData(e)),this.notifyHandlers(e),void this.pointers.delete(n);this.notifyHandlers(e)};notifyHandlers(e){this.gestureHandlers.forEach(t=>t(this.pointers,e))}createPointerData(e){return{pointerId:e.pointerId,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,target:e.target,timeStamp:e.timeStamp,type:e.type,isPrimary:e.isPrimary,pressure:e.pressure,width:e.width,height:e.height,pointerType:e.pointerType,srcEvent:e}}destroy(){this.root.removeEventListener("pointerdown",this.handlePointerEvent),this.root.removeEventListener("pointermove",this.handlePointerEvent),this.root.removeEventListener("pointerup",this.handlePointerEvent),this.root.removeEventListener("pointercancel",this.handlePointerEvent),this.root.removeEventListener("forceCancel",this.handlePointerEvent),this.root.removeEventListener("blur",this.handleInterruptEvents),this.root.removeEventListener("contextmenu",this.handleInterruptEvents),this.pointers.clear(),this.gestureHandlers.clear()}}class Re{gestureTemplates=(()=>new Map)();elementGestureMap=(()=>new Map)();activeGesturesRegistry=(()=>new Oe)();keyboardManager=(()=>new je)();constructor(e){this.pointerManager=new Le({root:e.root,touchAction:e.touchAction,passive:e.passive}),e.gestures&&e.gestures.length>0&&e.gestures.forEach(e=>{this.addGestureTemplate(e)})}addGestureTemplate(e){this.gestureTemplates.has(e.name)&&console.warn(`Gesture template with name "${e.name}" already exists. It will be overwritten.`),this.gestureTemplates.set(e.name,e)}setGestureOptions(e,t,n){const r=this.elementGestureMap.get(t);if(!r||!r.has(e))return void console.error(`Gesture "${e}" not found on the provided element.`);const i=new CustomEvent(`${e}ChangeOptions`,{detail:n,bubbles:!1,cancelable:!1,composed:!1});t.dispatchEvent(i)}setGestureState(e,t,n){const r=this.elementGestureMap.get(t);if(!r||!r.has(e))return void console.error(`Gesture "${e}" not found on the provided element.`);const i=new CustomEvent(`${e}ChangeState`,{detail:n,bubbles:!1,cancelable:!1,composed:!1});t.dispatchEvent(i)}registerElement(e,t,n){return Array.isArray(e)||(e=[e]),e.forEach(e=>{const r=n?.[e];this.registerSingleGesture(e,t,r)}),t}registerSingleGesture(e,t,n){const r=this.gestureTemplates.get(e);if(!r)return console.error(`Gesture template "${e}" not found.`),!1;this.elementGestureMap.has(t)||this.elementGestureMap.set(t,new Map);const i=this.elementGestureMap.get(t);i.has(e)&&(console.warn(`Element already has gesture "${e}" registered. It will be replaced.`),this.unregisterElement(e,t));const o=r.clone(n);return o.init(t,this.pointerManager,this.activeGesturesRegistry,this.keyboardManager),i.set(e,o),!0}unregisterElement(e,t){const n=this.elementGestureMap.get(t);return!(!n||!n.has(e))&&(n.get(e).destroy(),n.delete(e),this.activeGesturesRegistry.unregisterElement(t),0===n.size&&this.elementGestureMap.delete(t),!0)}unregisterAllGestures(e){const t=this.elementGestureMap.get(e);if(t){for(const[,n]of t)n.destroy(),this.activeGesturesRegistry.unregisterElement(e);this.elementGestureMap.delete(e)}}destroy(){for(const[e]of this.elementGestureMap)this.unregisterAllGestures(e);this.gestureTemplates.clear(),this.elementGestureMap.clear(),this.activeGesturesRegistry.destroy(),this.keyboardManager.destroy(),this.pointerManager.destroy()}}const De={abort:!0,animationcancel:!0,animationend:!0,animationiteration:!0,animationstart:!0,auxclick:!0,beforeinput:!0,beforetoggle:!0,blur:!0,cancel:!0,canplay:!0,canplaythrough:!0,change:!0,click:!0,close:!0,compositionend:!0,compositionstart:!0,compositionupdate:!0,contextlost:!0,contextmenu:!0,contextrestored:!0,copy:!0,cuechange:!0,cut:!0,dblclick:!0,drag:!0,dragend:!0,dragenter:!0,dragleave:!0,dragover:!0,dragstart:!0,drop:!0,durationchange:!0,emptied:!0,ended:!0,error:!0,focus:!0,focusin:!0,focusout:!0,formdata:!0,gotpointercapture:!0,input:!0,invalid:!0,keydown:!0,keypress:!0,keyup:!0,load:!0,loadeddata:!0,loadedmetadata:!0,loadstart:!0,lostpointercapture:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,paste:!0,pause:!0,play:!0,playing:!0,pointercancel:!0,pointerdown:!0,pointerenter:!0,pointerleave:!0,pointermove:!0,pointerout:!0,pointerover:!0,pointerup:!0,progress:!0,ratechange:!0,reset:!0,resize:!0,scroll:!0,scrollend:!0,securitypolicyviolation:!0,seeked:!0,seeking:!0,select:!0,selectionchange:!0,selectstart:!0,slotchange:!0,stalled:!0,submit:!0,suspend:!0,timeupdate:!0,toggle:!0,touchcancel:!0,touchend:!0,touchmove:!0,touchstart:!0,transitioncancel:!0,transitionend:!0,transitionrun:!0,transitionstart:!0,volumechange:!0,waiting:!0,webkitanimationend:!0,webkitanimationiteration:!0,webkitanimationstart:!0,webkittransitionend:!0,wheel:!0,beforematch:!0,pointerrawupdate:!0};class $e{customData={};constructor(e){if(!e||!e.name)throw new Error("Gesture must be initialized with a valid name.");if(e.name in De)throw new Error(`Gesture can't be created with a native event name. Tried to use "${e.name}". Please use a custom name instead.`);this.name=e.name,this.preventDefault=e.preventDefault??!1,this.stopPropagation=e.stopPropagation??!1,this.preventIf=e.preventIf??[],this.requiredKeys=e.requiredKeys??[],this.pointerMode=e.pointerMode??[],this.pointerOptions=e.pointerOptions??{}}init(e,t,n,r){this.element=e,this.pointerManager=t,this.gesturesRegistry=n,this.keyboardManager=r;const i=`${this.name}ChangeOptions`;this.element.addEventListener(i,this.handleOptionsChange);const o=`${this.name}ChangeState`;this.element.addEventListener(o,this.handleStateChange)}handleOptionsChange=e=>{e&&e.detail&&this.updateOptions(e.detail)};updateOptions(e){this.preventDefault=e.preventDefault??this.preventDefault,this.stopPropagation=e.stopPropagation??this.stopPropagation,this.preventIf=e.preventIf??this.preventIf,this.requiredKeys=e.requiredKeys??this.requiredKeys,this.pointerMode=e.pointerMode??this.pointerMode,this.pointerOptions=e.pointerOptions??this.pointerOptions}getBaseConfig(){return{requiredKeys:this.requiredKeys}}getEffectiveConfig(e,t){if("mouse"!==e&&"touch"!==e&&"pen"!==e)return t;const n=this.pointerOptions[e];return n?l({},t,n):t}handleStateChange=e=>{e&&e.detail&&this.updateState(e.detail)};updateState(e){Object.assign(this.state,e)}getTargetElement(e){return this.isActive||this.element===e.target||"contains"in this.element&&this.element.contains(e.target)||"getRootNode"in this.element&&this.element.getRootNode()instanceof ShadowRoot&&e.composedPath().includes(this.element)?this.element:null}set isActive(e){e?this.gesturesRegistry.registerActiveGesture(this.element,this):this.gesturesRegistry.unregisterActiveGesture(this.element,this)}get isActive(){return this.gesturesRegistry.isGestureActive(this.element,this)??!1}shouldPreventGesture(e,t){const n=this.getEffectiveConfig(t,this.getBaseConfig());if(!this.keyboardManager.areKeysPressed(n.requiredKeys))return!0;if(0===this.preventIf.length)return!1;const r=this.gesturesRegistry.getActiveGestures(e);return this.preventIf.some(e=>r[e])}isPointerTypeAllowed(e){return!this.pointerMode||0===this.pointerMode.length||this.pointerMode.includes(e)}destroy(){const e=`${this.name}ChangeOptions`;this.element.removeEventListener(e,this.handleOptionsChange);const t=`${this.name}ChangeState`;this.element.removeEventListener(t,this.handleStateChange)}}class ze extends $e{unregisterHandler=null;originalTarget=null;constructor(e){super(e),this.minPointers=e.minPointers??1,this.maxPointers=e.maxPointers??1/0}init(e,t,n,r){super.init(e,t,n,r),this.unregisterHandler=this.pointerManager.registerGestureHandler(this.handlePointerEvent)}updateOptions(e){super.updateOptions(e),this.minPointers=e.minPointers??this.minPointers,this.maxPointers=e.maxPointers??this.maxPointers}getBaseConfig(){return{requiredKeys:this.requiredKeys,minPointers:this.minPointers,maxPointers:this.maxPointers}}isWithinPointerCount(e,t){const n=this.getEffectiveConfig(t,this.getBaseConfig());return e.length>=n.minPointers&&e.length<=n.maxPointers}getRelevantPointers(e,t){return e.filter(e=>this.isPointerTypeAllowed(e.pointerType)&&(t===e.target||e.target===this.originalTarget||t===this.originalTarget||"contains"in t&&t.contains(e.target))||"getRootNode"in t&&t.getRootNode()instanceof ShadowRoot&&e.srcEvent.composedPath().includes(t))}destroy(){this.unregisterHandler&&(this.unregisterHandler(),this.unregisterHandler=null),super.destroy()}}function Ne(e){if(0===e.length)return{x:0,y:0};const t=e.reduce((e,t)=>(e.x+=t.clientX,e.y+=t.clientY,e),{x:0,y:0});return{x:t.x/e.length,y:t.y/e.length}}const _e=1e-5;function Fe(e,t){return`${e}${"ongoing"===t?"":t.charAt(0).toUpperCase()+t.slice(1)}`}class He extends ze{state=(()=>({startPointers:new Map,startCentroid:null,lastCentroid:null,movementThresholdReached:!1,totalDeltaX:0,totalDeltaY:0,activeDeltaX:0,activeDeltaY:0,lastDirection:{vertical:null,horizontal:null,mainAxis:null},lastDeltas:null}))();constructor(e){super(e),this.direction=e.direction||["up","down","left","right"],this.threshold=e.threshold||0}clone(e){return new He(l({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,direction:[...this.direction],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},e))}destroy(){this.resetState(),super.destroy()}updateOptions(e){super.updateOptions(e),this.direction=e.direction||this.direction,this.threshold=e.threshold??this.threshold}resetState(){this.isActive=!1,this.state=l({},this.state,{startPointers:new Map,startCentroid:null,lastCentroid:null,lastDeltas:null,activeDeltaX:0,activeDeltaY:0,movementThresholdReached:!1,lastDirection:{vertical:null,horizontal:null,mainAxis:null}})}handlePointerEvent=(e,t)=>{const n=Array.from(e.values());if("forceCancel"===t.type)return void this.cancel(t.target,n,t);const r=this.getTargetElement(t);if(!r)return;if(this.shouldPreventGesture(r,t.pointerType))return void this.cancel(r,n,t);const i=this.getRelevantPointers(n,r);if(this.isWithinPointerCount(i,t.pointerType))switch(t.type){case"pointerdown":if(this.isActive||this.state.startCentroid){if(this.state.startCentroid&&this.state.lastCentroid){const e=this.state.lastCentroid,t=Ne(i),n=t.x-e.x,r=t.y-e.y;this.state.startCentroid={x:this.state.startCentroid.x+n,y:this.state.startCentroid.y+r},this.state.lastCentroid=t,i.forEach(e=>{this.state.startPointers.has(e.pointerId)||this.state.startPointers.set(e.pointerId,e)})}}else i.forEach(e=>{this.state.startPointers.set(e.pointerId,e)}),this.originalTarget=r,this.state.startCentroid=Ne(i),this.state.lastCentroid=l({},this.state.startCentroid);break;case"pointermove":if(this.state.startCentroid&&this.isWithinPointerCount(n,t.pointerType)){const e=Ne(i),n=e.x-this.state.startCentroid.x,o=e.y-this.state.startCentroid.y,a=Math.sqrt(n*n+o*o),s=function(e,t){const n=t.x-e.x,r=t.y-e.y,i={vertical:null,horizontal:null,mainAxis:null},o=function(e,t){const n=t.x-e.x,r=t.y-e.y,i=180*Math.atan2(r,n)/Math.PI;return i>=-44.99999&&i<=-22.49999||i>=22.50001&&i<=45.00001||i>=135.00001&&i<=157.50001||i>=-157.49999&&i<=-134.99999}(t,e),a=Math.abs(n)>Math.abs(r)?"horizontal":"vertical",s=o||"horizontal"===a?_e:.15,l=o?_e:"horizontal"===a?.15:_e;return Math.abs(n)>s&&(i.horizontal=n>0?"right":"left"),Math.abs(r)>l&&(i.vertical=r>0?"down":"up"),i.mainAxis=o?"diagonal":a,i}(this.state.lastCentroid??this.state.startCentroid,e),l=this.state.lastCentroid?e.x-this.state.lastCentroid.x:0,c=this.state.lastCentroid?e.y-this.state.lastCentroid.y:0;!this.state.movementThresholdReached&&a>=this.threshold&&function(e,t){if(!e.vertical&&!e.horizontal)return!1;if(0===t.length)return!0;const n=null===e.vertical||t.includes(e.vertical),r=null===e.horizontal||t.includes(e.horizontal);return n&&r}(s,this.direction)?(this.state.movementThresholdReached=!0,this.isActive=!0,this.state.lastDeltas={x:l,y:c},this.state.totalDeltaX+=l,this.state.totalDeltaY+=c,this.state.activeDeltaX+=l,this.state.activeDeltaY+=c,this.emitPanEvent(r,"start",i,t,e),this.emitPanEvent(r,"ongoing",i,t,e)):this.state.movementThresholdReached&&this.isActive&&(this.state.lastDeltas={x:l,y:c},this.state.totalDeltaX+=l,this.state.totalDeltaY+=c,this.state.activeDeltaX+=l,this.state.activeDeltaY+=c,this.emitPanEvent(r,"ongoing",i,t,e)),this.state.lastCentroid=e,this.state.lastDirection=s}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive&&this.state.movementThresholdReached){const e=i.filter(e=>"pointerup"!==e.type&&"pointercancel"!==e.type);if(this.isWithinPointerCount(e,t.pointerType)){if(e.length>=1&&this.state.lastCentroid){const t=Ne(e),n=t.x-this.state.lastCentroid.x,r=t.y-this.state.lastCentroid.y;this.state.startCentroid={x:this.state.startCentroid.x+n,y:this.state.startCentroid.y+r},this.state.lastCentroid=t;const o=i.find(e=>"pointerup"===e.type||"pointercancel"===e.type)?.pointerId;void 0!==o&&this.state.startPointers.delete(o)}}else{const e=this.state.lastCentroid||this.state.startCentroid;"pointercancel"===t.type&&this.emitPanEvent(r,"cancel",i,t,e),this.emitPanEvent(r,"end",i,t,e),this.resetState()}}else this.resetState()}else this.cancel(r,i,t)};emitPanEvent(e,t,n,r,i){if(!this.state.startCentroid)return;const o=this.state.lastDeltas?.x??0,a=this.state.lastDeltas?.y??0,s=this.state.startPointers.values().next().value,l=s?(r.timeStamp-s.timeStamp)/1e3:0,c=l>0?o/l:0,u=l>0?a/l:0,d=Math.sqrt(c*c+u*u),p=this.gesturesRegistry.getActiveGestures(e),h={gestureName:this.name,initialCentroid:this.state.startCentroid,centroid:i,target:r.target,srcEvent:r,phase:t,pointers:n,timeStamp:r.timeStamp,deltaX:o,deltaY:a,direction:this.state.lastDirection,velocityX:c,velocityY:u,velocity:d,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,activeDeltaX:this.state.activeDeltaX,activeDeltaY:this.state.activeDeltaY,activeGestures:p,customData:this.customData},m=Fe(this.name,t),f=new CustomEvent(m,{bubbles:!0,cancelable:!0,composed:!0,detail:h});e.dispatchEvent(f),this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation()}cancel(e,t,n){if(this.isActive){const r=e??this.element;this.emitPanEvent(r,"cancel",t,n,this.state.lastCentroid),this.emitPanEvent(r,"end",t,n,this.state.lastCentroid)}this.resetState()}}class Be extends ze{state={lastPosition:null};constructor(e){super(e),this.threshold=e.threshold||0}clone(e){return new Be(l({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},e))}init(e,t,n,r){super.init(e,t,n,r),this.element.addEventListener("pointerenter",this.handleElementEnter),this.element.addEventListener("pointerleave",this.handleElementLeave)}destroy(){this.element.removeEventListener("pointerenter",this.handleElementEnter),this.element.removeEventListener("pointerleave",this.handleElementLeave),this.resetState(),super.destroy()}updateOptions(e){super.updateOptions(e)}resetState(){this.isActive=!1,this.state={lastPosition:null}}handleElementEnter=e=>{if("mouse"!==e.pointerType&&"pen"!==e.pointerType)return;const t=this.pointerManager.getPointers()||new Map,n=Array.from(t.values());if(this.isWithinPointerCount(n,e.pointerType)){this.isActive=!0;const t={x:e.clientX,y:e.clientY};this.state.lastPosition=t,this.emitMoveEvent(this.element,"start",n,e),this.emitMoveEvent(this.element,"ongoing",n,e)}};handleElementLeave=e=>{if("mouse"!==e.pointerType&&"pen"!==e.pointerType)return;if(!this.isActive)return;const t=this.pointerManager.getPointers()||new Map,n=Array.from(t.values());this.emitMoveEvent(this.element,"end",n,e),this.resetState()};handlePointerEvent=(e,t)=>{if("pointermove"!==t.type||"mouse"!==t.pointerType&&"pen"!==t.pointerType)return;this.preventDefault&&t.preventDefault(),this.stopPropagation&&t.stopPropagation();const n=Array.from(e.values()),r=this.getTargetElement(t);if(!r)return;if(!this.isWithinPointerCount(n,t.pointerType))return;if(this.shouldPreventGesture(r,t.pointerType)){if(!this.isActive)return;return this.resetState(),void this.emitMoveEvent(r,"end",n,t)}const i={x:t.clientX,y:t.clientY};this.state.lastPosition=i,this.isActive||(this.isActive=!0,this.emitMoveEvent(r,"start",n,t)),this.emitMoveEvent(r,"ongoing",n,t)};emitMoveEvent(e,t,n,r){const i=this.state.lastPosition||Ne(n),o=this.gesturesRegistry.getActiveGestures(e),a={gestureName:this.name,centroid:i,target:r.target,srcEvent:r,phase:t,pointers:n,timeStamp:r.timeStamp,activeGestures:o,customData:this.customData},s=Fe(this.name,t),l=new CustomEvent(s,{bubbles:!0,cancelable:!0,composed:!0,detail:a});e.dispatchEvent(l)}}class Ve extends ze{state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null};constructor(e){super(e),this.maxDistance=e.maxDistance??10,this.taps=e.taps??1}clone(e){return new Ve(l({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,maxDistance:this.maxDistance,taps:this.taps,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},e))}destroy(){this.resetState(),super.destroy()}updateOptions(e){super.updateOptions(e),this.maxDistance=e.maxDistance??this.maxDistance,this.taps=e.taps??this.taps}resetState(){this.isActive=!1,this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null}}handlePointerEvent=(e,t)=>{const n=Array.from(e.values()),r=this.getTargetElement(t);if(!r)return;const i=this.getRelevantPointers(n,r);if(!this.shouldPreventGesture(r,t.pointerType)&&this.isWithinPointerCount(i,t.pointerType))switch(t.type){case"pointerdown":this.isActive||(this.state.startCentroid=Ne(i),this.state.lastPosition=l({},this.state.startCentroid),this.isActive=!0,this.originalTarget=r);break;case"pointermove":if(this.isActive&&this.state.startCentroid){const e=Ne(i);this.state.lastPosition=e;const n=e.x-this.state.startCentroid.x,o=e.y-this.state.startCentroid.y;Math.sqrt(n*n+o*o)>this.maxDistance&&this.cancelTap(r,i,t)}break;case"pointerup":if(this.isActive){this.state.currentTapCount+=1;const e=this.state.lastPosition||this.state.startCentroid;if(!e)return void this.cancelTap(r,i,t);this.state.currentTapCount>=this.taps?(this.fireTapEvent(r,i,t,e),this.resetState()):(this.state.lastTapTime=t.timeStamp,this.isActive=!1,this.state.startCentroid=null,setTimeout(()=>{this.state&&this.state.currentTapCount>0&&this.state.currentTapCount{const n=Array.from(e.values());if("forceCancel"===t.type)return void this.cancelPress(t.target,n,t);const r=this.getTargetElement(t);if(!r)return;if(this.shouldPreventGesture(r,t.pointerType))return void(this.isActive&&this.cancelPress(r,n,t));const i=this.getRelevantPointers(n,r);if(this.isWithinPointerCount(i,t.pointerType))switch(t.type){case"pointerdown":this.isActive||this.state.startCentroid||(this.state.startCentroid=Ne(i),this.state.lastPosition=l({},this.state.startCentroid),this.state.startTime=t.timeStamp,this.isActive=!0,this.originalTarget=r,this.clearPressTimer(),this.state.timerId=setTimeout(()=>{if(this.isActive&&this.state.startCentroid){this.state.pressThresholdReached=!0;const e=this.state.lastPosition;this.emitPressEvent(r,"start",i,t,e),this.emitPressEvent(r,"ongoing",i,t,e)}},this.duration));break;case"pointermove":if(this.isActive&&this.state.startCentroid){const e=Ne(i);this.state.lastPosition=e;const n=e.x-this.state.startCentroid.x,o=e.y-this.state.startCentroid.y;Math.sqrt(n*n+o*o)>this.maxDistance&&this.cancelPress(r,i,t)}break;case"pointerup":if(this.isActive){if(this.state.pressThresholdReached){const e=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(r,"end",i,t,e)}this.resetState()}break;case"pointercancel":case"forceCancel":this.cancelPress(r,i,t)}else this.isActive&&this.cancelPress(r,i,t)};emitPressEvent(e,t,n,r,i){const o=this.gesturesRegistry.getActiveGestures(e),a=r.timeStamp-this.state.startTime,s={gestureName:this.name,centroid:i,target:r.target,srcEvent:r,phase:t,pointers:n,timeStamp:r.timeStamp,x:i.x,y:i.y,duration:a,activeGestures:o,customData:this.customData},l=Fe(this.name,t),c=new CustomEvent(l,{bubbles:!0,cancelable:!0,composed:!0,detail:s});e.dispatchEvent(c),this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation()}cancelPress(e,t,n){if(this.isActive&&this.state.pressThresholdReached){const r=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(e??this.element,"cancel",t,n,r),this.emitPressEvent(e??this.element,"end",t,n,r)}this.resetState()}}function Ye(e,t){const n=t.x-e.x,r=t.y-e.y;return Math.sqrt(n*n+r*r)}function We(e){if(e.length<2)return 0;let t=0,n=0;for(let r=0;r0?t/n:0}class Ge extends ze{state={startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,totalScale:1,deltaScale:0};constructor(e){super(l({},e,{minPointers:e.minPointers??2})),this.threshold=e.threshold??0}clone(e){return new Ge(l({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},e))}destroy(){this.resetState(),super.destroy()}updateOptions(e){super.updateOptions(e)}resetState(){this.isActive=!1,this.state=l({},this.state,{startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,deltaScale:0})}handlePointerEvent=(e,t)=>{const n=Array.from(e.values()),r=this.getTargetElement(t);if(!r)return;if(this.shouldPreventGesture(r,t.pointerType))return void(this.isActive&&(this.emitPinchEvent(r,"cancel",n,t),this.resetState()));const i=this.getRelevantPointers(n,r);switch(t.type){case"pointerdown":if(i.length>=2&&!this.isActive){const e=We(i);this.state.startDistance=e,this.state.lastDistance=e,this.state.lastTime=t.timeStamp,this.originalTarget=r}else if(this.isActive&&i.length>=2){const e=We(i);this.state.startDistance=e/this.state.lastScale,this.state.lastDistance=e,this.state.lastTime=t.timeStamp}break;case"pointermove":if(this.state.startDistance&&this.isWithinPointerCount(i,t.pointerType)){const e=We(i),n=Math.abs(e-this.state.lastDistance);if(0!==n&&n>=this.threshold){const n=this.state.startDistance?e/this.state.startDistance:1,o=n/this.state.lastScale;this.state.totalScale*=o;const a=(t.timeStamp-this.state.lastTime)/1e3;if(this.state.lastDistance){const t=(e-this.state.lastDistance)/a;this.state.velocity=Number.isNaN(t)?0:t}this.state.lastDistance=e,this.state.deltaScale=n-this.state.lastScale,this.state.lastScale=n,this.state.lastTime=t.timeStamp,this.isActive||(this.isActive=!0,this.emitPinchEvent(r,"start",i,t)),this.emitPinchEvent(r,"ongoing",i,t)}}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive){const e=i.filter(e=>"pointerup"!==e.type&&"pointercancel"!==e.type);if(this.isWithinPointerCount(e,t.pointerType)){if(e.length>=2){const n=We(e);this.state.startDistance=n/this.state.lastScale,this.state.lastDistance=n,this.state.lastTime=t.timeStamp}}else"pointercancel"===t.type&&this.emitPinchEvent(r,"cancel",i,t),this.emitPinchEvent(r,"end",i,t),this.resetState()}}};emitPinchEvent(e,t,n,r){const i=Ne(n),o=this.state.lastDistance,a=this.state.lastScale,s=this.gesturesRegistry.getActiveGestures(e),l={gestureName:this.name,centroid:i,target:r.target,srcEvent:r,phase:t,pointers:n,timeStamp:r.timeStamp,scale:a,deltaScale:this.state.deltaScale,totalScale:this.state.totalScale,distance:o,velocity:this.state.velocity,activeGestures:s,direction:(c=this.state.velocity,c>0?1:c<-0?-1:0),customData:this.customData};var c;this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const u=Fe(this.name,t),d=new CustomEvent(u,{bubbles:!0,cancelable:!0,composed:!0,detail:l});e.dispatchEvent(d)}}class Ke extends $e{state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0};constructor(e){super(e),this.sensitivity=e.sensitivity??1,this.max=e.max??Number.MAX_SAFE_INTEGER,this.min=e.min??Number.MIN_SAFE_INTEGER,this.initialDelta=e.initialDelta??0,this.invert=e.invert??!1,this.state.totalDeltaX=this.initialDelta,this.state.totalDeltaY=this.initialDelta,this.state.totalDeltaZ=this.initialDelta}clone(e){return new Ke(l({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,sensitivity:this.sensitivity,max:this.max,min:this.min,initialDelta:this.initialDelta,invert:this.invert,requiredKeys:[...this.requiredKeys],preventIf:[...this.preventIf]},e))}init(e,t,n,r){super.init(e,t,n,r),this.element.addEventListener("wheel",this.handleWheelEvent)}destroy(){this.element.removeEventListener("wheel",this.handleWheelEvent),this.resetState(),super.destroy()}resetState(){this.isActive=!1,this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0}}updateOptions(e){super.updateOptions(e),this.sensitivity=e.sensitivity??this.sensitivity,this.max=e.max??this.max,this.min=e.min??this.min,this.initialDelta=e.initialDelta??this.initialDelta,this.invert=e.invert??this.invert}handleWheelEvent=e=>{if(this.shouldPreventGesture(this.element,"mouse"))return;const t=this.pointerManager.getPointers()||new Map,n=Array.from(t.values());this.state.totalDeltaX+=e.deltaX*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaY+=e.deltaY*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaZ+=e.deltaZ*this.sensitivity*(this.invert?-1:1),["totalDeltaX","totalDeltaY","totalDeltaZ"].forEach(e=>{this.state[e]this.max&&(this.state[e]=this.max)}),this.emitWheelEvent(n,e)};emitWheelEvent(e,t){const n=e.length>0?Ne(e):{x:t.clientX,y:t.clientY},r=this.gesturesRegistry.getActiveGestures(this.element),i={gestureName:this.name,centroid:n,target:t.target,srcEvent:t,phase:"ongoing",pointers:e,timeStamp:t.timeStamp,deltaX:t.deltaX*this.sensitivity*(this.invert?-1:1),deltaY:t.deltaY*this.sensitivity*(this.invert?-1:1),deltaZ:t.deltaZ*this.sensitivity*(this.invert?-1:1),deltaMode:t.deltaMode,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,totalDeltaZ:this.state.totalDeltaZ,activeGestures:r,customData:this.customData};this.preventDefault&&t.preventDefault(),this.stopPropagation&&t.stopPropagation();const o=Fe(this.name,"ongoing"),a=new CustomEvent(o,{bubbles:!0,cancelable:!0,composed:!0,detail:i});this.element.dispatchEvent(a)}}const qe=e=>{e.cancelable&&e.preventDefault()};class Xe extends ze{state={phase:"waitingForTap",dragTimeoutId:null};constructor(e){super(e),this.tapMaxDistance=e.tapMaxDistance??10,this.dragTimeout=e.dragTimeout??1e3,this.dragThreshold=e.dragThreshold??0,this.dragDirection=e.dragDirection||["up","down","left","right"],this.tapGesture=new Ve({name:`${this.name}-tap`,maxDistance:this.tapMaxDistance,maxPointers:this.maxPointers,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}),this.panGesture=new He({name:`${this.name}-pan`,minPointers:this.minPointers,maxPointers:this.maxPointers,threshold:this.dragThreshold,direction:this.dragDirection,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)})}clone(e){return new Xe(l({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,tapMaxDistance:this.tapMaxDistance,dragTimeout:this.dragTimeout,dragThreshold:this.dragThreshold,dragDirection:[...this.dragDirection],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},e))}init(e,t,n,r){super.init(e,t,n,r),this.tapGesture.init(e,t,n,r),this.panGesture.init(e,t,n,r),this.element.addEventListener(this.tapGesture.name,this.tapHandler),this.element.addEventListener(`${this.panGesture.name}Start`,this.dragStartHandler),this.element.addEventListener(this.panGesture.name,this.dragMoveHandler),this.element.addEventListener(`${this.panGesture.name}End`,this.dragEndHandler),this.element.addEventListener(`${this.panGesture.name}Cancel`,this.dragEndHandler)}destroy(){this.resetState(),this.tapGesture.destroy(),this.panGesture.destroy(),this.element.removeEventListener(this.tapGesture.name,this.tapHandler),this.element.removeEventListener(`${this.panGesture.name}Start`,this.dragStartHandler),this.element.removeEventListener(this.panGesture.name,this.dragMoveHandler),this.element.removeEventListener(`${this.panGesture.name}End`,this.dragEndHandler),this.element.removeEventListener(`${this.panGesture.name}Cancel`,this.dragEndHandler),super.destroy()}updateOptions(e){super.updateOptions(e),this.tapMaxDistance=e.tapMaxDistance??this.tapMaxDistance,this.dragTimeout=e.dragTimeout??this.dragTimeout,this.dragThreshold=e.dragThreshold??this.dragThreshold,this.dragDirection=e.dragDirection||this.dragDirection,this.element.dispatchEvent(new CustomEvent(`${this.panGesture.name}ChangeOptions`,{detail:{minPointers:this.minPointers,maxPointers:this.maxPointers,threshold:this.dragThreshold,direction:this.dragDirection,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}})),this.element.dispatchEvent(new CustomEvent(`${this.tapGesture.name}ChangeOptions`,{detail:{maxDistance:this.tapMaxDistance,maxPointers:this.maxPointers,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}}))}resetState(){null!==this.state.dragTimeoutId&&clearTimeout(this.state.dragTimeoutId),this.restoreTouchAction(),this.isActive=!1,this.state={phase:"waitingForTap",dragTimeoutId:null}}handlePointerEvent(){}tapHandler=()=>{"waitingForTap"===this.state.phase&&(this.state.phase="tapDetected",this.setTouchAction(),this.state.dragTimeoutId=setTimeout(()=>{this.resetState()},this.dragTimeout))};dragStartHandler=e=>{"tapDetected"===this.state.phase&&(null!==this.state.dragTimeoutId&&(clearTimeout(this.state.dragTimeoutId),this.state.dragTimeoutId=null),this.restoreTouchAction(),this.state.phase="dragging",this.isActive=!0,this.element.dispatchEvent(new CustomEvent(Fe(this.name,e.detail.phase),e)))};dragMoveHandler=e=>{"dragging"===this.state.phase&&this.element.dispatchEvent(new CustomEvent(Fe(this.name,e.detail.phase),e))};dragEndHandler=e=>{"dragging"===this.state.phase&&(this.resetState(),this.element.dispatchEvent(new CustomEvent(Fe(this.name,e.detail.phase),e)))};setTouchAction(){this.element.addEventListener("touchstart",qe,{passive:!1})}restoreTouchAction(){this.element.removeEventListener("touchstart",qe)}}class Ze extends ze{state={phase:"waitingForPress",dragTimeoutId:null};constructor(e){super(e),this.pressDuration=e.pressDuration??500,this.pressMaxDistance=e.pressMaxDistance??10,this.dragTimeout=e.dragTimeout??1e3,this.dragThreshold=e.dragThreshold??0,this.dragDirection=e.dragDirection||["up","down","left","right"],this.pressGesture=new Ue({name:`${this.name}-press`,duration:this.pressDuration,maxDistance:this.pressMaxDistance,maxPointers:this.maxPointers,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}),this.panGesture=new He({name:`${this.name}-pan`,minPointers:this.minPointers,maxPointers:this.maxPointers,threshold:this.dragThreshold,direction:this.dragDirection,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)})}clone(e){return new Ze(l({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,pressDuration:this.pressDuration,pressMaxDistance:this.pressMaxDistance,dragTimeout:this.dragTimeout,dragThreshold:this.dragThreshold,dragDirection:[...this.dragDirection],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},e))}init(e,t,n,r){super.init(e,t,n,r),this.pressGesture.init(e,t,n,r),this.panGesture.init(e,t,n,r),this.element.addEventListener(this.pressGesture.name,this.pressHandler),this.element.addEventListener(`${this.panGesture.name}Start`,this.dragStartHandler),this.element.addEventListener(this.panGesture.name,this.dragMoveHandler),this.element.addEventListener(`${this.panGesture.name}End`,this.dragEndHandler),this.element.addEventListener(`${this.panGesture.name}Cancel`,this.dragEndHandler)}destroy(){this.resetState(),this.pressGesture.destroy(),this.panGesture.destroy(),this.element.removeEventListener(this.pressGesture.name,this.pressHandler),this.element.removeEventListener(`${this.panGesture.name}Start`,this.dragStartHandler),this.element.removeEventListener(this.panGesture.name,this.dragMoveHandler),this.element.removeEventListener(`${this.panGesture.name}End`,this.dragEndHandler),this.element.removeEventListener(`${this.panGesture.name}Cancel`,this.dragEndHandler),super.destroy()}updateOptions(e){super.updateOptions(e),this.pressDuration=e.pressDuration??this.pressDuration,this.pressMaxDistance=e.pressMaxDistance??this.pressMaxDistance,this.dragTimeout=e.dragTimeout??this.dragTimeout,this.dragThreshold=e.dragThreshold??this.dragThreshold,this.dragDirection=e.dragDirection||this.dragDirection,this.element.dispatchEvent(new CustomEvent(`${this.panGesture.name}ChangeOptions`,{detail:{minPointers:this.minPointers,maxPointers:this.maxPointers,threshold:this.dragThreshold,direction:this.dragDirection,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}})),this.element.dispatchEvent(new CustomEvent(`${this.pressGesture.name}ChangeOptions`,{detail:{duration:this.pressDuration,maxDistance:this.pressMaxDistance,maxPointers:this.maxPointers,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}}))}resetState(){null!==this.state.dragTimeoutId&&clearTimeout(this.state.dragTimeoutId),this.restoreTouchAction(),this.isActive=!1,this.state={phase:"waitingForPress",dragTimeoutId:null}}handlePointerEvent(){}pressHandler=()=>{"waitingForPress"===this.state.phase&&(this.state.phase="pressDetected",this.setTouchAction(),this.state.dragTimeoutId=setTimeout(()=>{this.resetState()},this.dragTimeout))};dragStartHandler=e=>{"pressDetected"===this.state.phase&&(null!==this.state.dragTimeoutId&&(clearTimeout(this.state.dragTimeoutId),this.state.dragTimeoutId=null),this.restoreTouchAction(),this.state.phase="dragging",this.isActive=!0,this.element.dispatchEvent(new CustomEvent(Fe(this.name,e.detail.phase),e)))};dragMoveHandler=e=>{"dragging"===this.state.phase&&this.element.dispatchEvent(new CustomEvent(Fe(this.name,e.detail.phase),e))};dragEndHandler=e=>{"dragging"===this.state.phase&&(this.resetState(),this.element.dispatchEvent(new CustomEvent(Fe(this.name,e.detail.phase),e)))};setTouchAction(){this.element.addEventListener("touchstart",qe,{passive:!1}),this.element.addEventListener("touchmove",qe,{passive:!1}),this.element.addEventListener("touchend",qe,{passive:!1})}restoreTouchAction(){this.element.removeEventListener("touchstart",qe),this.element.removeEventListener("touchmove",qe),this.element.removeEventListener("touchend",qe)}}const Je=e=>e.preventDefault(),Qe=({svgRef:t})=>{const n=e.useRef(null);e.useEffect(()=>{const e=t.current;n.current||(n.current=new Re({gestures:[new He({name:"pan",threshold:0,maxPointers:1}),new Be({name:"move",preventIf:["pan","zoomPinch","zoomPan"]}),new Ve({name:"tap",preventIf:["pan","zoomPinch","zoomPan"]}),new Ue({name:"quickPress",duration:50}),new He({name:"brush",threshold:0,maxPointers:1}),new He({name:"zoomPan",threshold:0,preventIf:["zoomTapAndDrag","zoomPressAndDrag"]}),new Ge({name:"zoomPinch",threshold:5}),new Ke({name:"zoomTurnWheel",sensitivity:.01,initialDelta:1}),new Ke({name:"panTurnWheel",sensitivity:.5}),new Xe({name:"zoomTapAndDrag",dragThreshold:10}),new Ze({name:"zoomPressAndDrag",dragThreshold:10,preventIf:["zoomPinch"]}),new Ve({name:"zoomDoubleTapReset",taps:2})]}));const r=n.current;if(e&&r)return r.registerElement(["pan","move","zoomPinch","zoomPan","zoomTurnWheel","panTurnWheel","tap","quickPress","zoomTapAndDrag","zoomPressAndDrag","zoomDoubleTapReset","brush"],e),()=>{r.unregisterAllGestures(e)}},[t,n]);const r=e.useCallback((e,n,r)=>{const i=t.current;return i?.addEventListener(e,n,r),{cleanup:()=>i?.removeEventListener(e,n)}},[t]),i=e.useCallback((e,r)=>{const i=t.current,o=n.current;o&&i&&o.setGestureOptions(e,i,r??{})},[t,n]);return e.useEffect(()=>{const e=t.current;return e?.addEventListener("gesturestart",Je),e?.addEventListener("gesturechange",Je),e?.addEventListener("gestureend",Je),()=>{e?.removeEventListener("gesturestart",Je),e?.removeEventListener("gesturechange",Je),e?.removeEventListener("gestureend",Je)}},[t]),{instance:{addInteractionListener:r,updateZoomInteractionListeners:i}}};Qe.params={},Qe.getInitialState=()=>({});const et=[we,xe,be,Te,Qe,U];function tt(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}const nt=["apiRef"],rt=e=>{let{plugins:t}=e,n=tt(e.props,nt);const r={};t.forEach(e=>{Object.assign(r,e.params)});const i={};return Object.keys(n).forEach(e=>{const t=n[e];r[e]&&(i[e]=t)}),t.reduce((e,t)=>t.getDefaultizedParams?t.getDefaultizedParams({params:e}):e,i)};let it=0;const ot=e.createContext(null),at={};function st(t,n){const r=e.useRef(at);return r.current===at&&(r.current=t(n)),r}const lt=[],ct=()=>{};function ut(e){const{store:t,selector:n}=e;let r=n(t.state);const i={effect:ct,dispose:null,subscribe:()=>{i.dispose??=t.subscribe(e=>{const t=n(e);if(!Object.is(r,t)){const e=r;r=t,i.effect(e,t)}})},onMount:()=>(i.subscribe(),()=>{i.dispose?.(),i.dispose=null})};return i.subscribe(),i}const dt=e=>e.series,pt=ae(dt,e=>e.defaultizedSeries),ht=ae(dt,e=>e.seriesConfig),mt=ae(dt,e=>e.dataset),ft=le(pt,ht,mt,function(e,t,n){return((e,t,n)=>{const r={};return Object.keys(t).forEach(i=>{const o=e[i];void 0!==o&&(r[i]=t[i]?.seriesProcessor?.(o,n)??o)}),r})(e,t,n)}),gt=le(ft,ht,he,function(e,t,n){return((e,t,n)=>{let r=!1;const i={};return Object.keys(e).forEach(o=>{const a=t[o]?.seriesLayout,s=e[o];if(void 0!==a&&void 0!==s){const t=a(s,n);t&&t!==e[o]&&(r=!0,i[o]=t)}}),r?i:{}})(e,t,n)}),yt=4,vt=40,bt=20+2*yt,xt=40+2*yt,It="hover",wt={top:5,bottom:5,left:5,right:5},kt={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",reverse:!1,slider:{enabled:!1,preview:!1,size:bt,showTooltip:It}},St=(e,t,n,r)=>{if(e)return!0===e?l({axisId:t,axisDirection:n},kt,{reverse:r??!1}):l({axisId:t,axisDirection:n},kt,{reverse:r??!1},e,{slider:l({},kt.slider,{size:e.slider?.preview??kt.slider.preview?xt:bt},e.slider)})};function Mt(e,t){const n={top:0,bottom:0,none:0},r=(e&&e.length>0?e:[{id:W,scaleType:"linear"}]).map((e,r)=>{const i=e.dataKey,o=0===r?"bottom":"none",a=e.position??o,s=25+(e.label?20:0),c=e.id??`defaultized-x-axis-${r}`,u=l({offset:n[a]},e,{id:c,position:a,height:e.height??s,zoom:St(e.zoom,c,"x",e.reverse)});if("none"!==a&&(n[a]+=u.height,u.zoom?.slider.enabled&&(n[a]+=u.zoom.slider.size)),void 0===i||void 0!==e.data)return u;if(void 0===t)throw new Error("MUI X Charts: x-axis uses `dataKey` but no `dataset` is provided.");return l({},u,{data:t.map(e=>e[i])})});return r}function Ct(e,t){const n={right:0,left:0,none:0},r=(e&&e.length>0?e:[{id:G,scaleType:"linear"}]).map((e,r)=>{const i=e.dataKey,o=0===r?"left":"none",a=e.position??o,s=45+(e.label?20:0),c=e.id??`defaultized-y-axis-${r}`,u=l({offset:n[a]},e,{id:c,position:a,width:e.width??s,zoom:St(e.zoom,c,"y",e.reverse)});if("none"!==a&&(n[a]+=u.width,u.zoom?.slider.enabled&&(n[a]+=u.zoom.slider.size)),void 0===i||void 0!==e.data)return u;if(void 0===t)throw new Error("MUI X Charts: y-axis uses `dataKey` but no `dataset` is provided.");return l({},u,{data:t.map(e=>e[i])})});return r}function Pt(e,t){return function(n,r){if("tick"===r.location){const t=r.scale.domain();return t[0]===t[1]?r.scale.tickFormat(1)(n):r.scale.tickFormat(e)(n)}return"zoom-slider-tooltip"===r.location?t.tickFormat(2)(n):`${n}`}}function Et(e){return"band"===e.scaleType}function Tt(e){return"point"===e.scaleType}function At(e,t){return null==e||null==t?NaN:et?1:e>=t?0:NaN}function Ot(e,t){return null==e||null==t?NaN:te?1:t>=e?0:NaN}function jt(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i>>1;n(e[t],r)<0?i=t+1:o=t}while(iAt(e(t),n),r=(t,n)=>e(t)-n):(t=e===At||e===Ot?e:Lt,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i>>1;n(e[t],r)<=0?i=t+1:o=t}while(i>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?sn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?sn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=qt.exec(e))?new cn(t[1],t[2],t[3],1):(t=Xt.exec(e))?new cn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Zt.exec(e))?sn(t[1],t[2],t[3],t[4]):(t=Jt.exec(e))?sn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Qt.exec(e))?fn(t[1],t[2]/100,t[3]/100,1):(t=en.exec(e))?fn(t[1],t[2]/100,t[3]/100,t[4]):tn.hasOwnProperty(e)?an(tn[e]):"transparent"===e?new cn(NaN,NaN,NaN,0):null}function an(e){return new cn(e>>16&255,e>>8&255,255&e,1)}function sn(e,t,n,r){return r<=0&&(e=t=n=NaN),new cn(e,t,n,r)}function ln(e,t,n,r){return 1===arguments.length?((i=e)instanceof Bt||(i=on(i)),i?new cn((i=i.rgb()).r,i.g,i.b,i.opacity):new cn):new cn(e,t,n,null==r?1:r);var i}function cn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function un(){return`#${mn(this.r)}${mn(this.g)}${mn(this.b)}`}function dn(){const e=pn(this.opacity);return`${1===e?"rgb(":"rgba("}${hn(this.r)}, ${hn(this.g)}, ${hn(this.b)}${1===e?")":`, ${e})`}`}function pn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function mn(e){return((e=hn(e))<16?"0":"")+e.toString(16)}function fn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new yn(e,t,n,r)}function gn(e){if(e instanceof yn)return new yn(e.h,e.s,e.l,e.opacity);if(e instanceof Bt||(e=on(e)),!e)return new yn;if(e instanceof yn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n0&&l<1?0:a,new yn(a,s,l,e.opacity)}function yn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function vn(e){return(e=(e||0)%360)<0?e+360:e}function bn(e){return Math.max(0,Math.min(1,e||0))}function xn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function In(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}Ft(Bt,on,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nn,formatHex:nn,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return gn(this).formatHsl()},formatRgb:rn,toString:rn}),Ft(cn,ln,Ht(Bt,{brighter(e){return e=null==e?Ut:Math.pow(Ut,e),new cn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Vt:Math.pow(Vt,e),new cn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cn(hn(this.r),hn(this.g),hn(this.b),pn(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:un,formatHex:un,formatHex8:function(){return`#${mn(this.r)}${mn(this.g)}${mn(this.b)}${mn(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:dn,toString:dn})),Ft(yn,function(e,t,n,r){return 1===arguments.length?gn(e):new yn(e,t,n,null==r?1:r)},Ht(Bt,{brighter(e){return e=null==e?Ut:Math.pow(Ut,e),new yn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Vt:Math.pow(Vt,e),new yn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new cn(xn(e>=240?e-240:e+120,i,r),xn(e,i,r),xn(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new yn(vn(this.h),bn(this.s),bn(this.l),pn(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 e=pn(this.opacity);return`${1===e?"hsl(":"hsla("}${vn(this.h)}, ${100*bn(this.s)}%, ${100*bn(this.l)}%${1===e?")":`, ${e})`}`}}));const wn=e=>()=>e;function kn(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):wn(isNaN(e)?t:e)}const Sn=function e(t){var n=function(e){return 1===(e=+e)?kn:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):wn(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=ln(e)).r,(t=ln(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=kn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Mn(e){return function(t){var n,r,i=t.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=ro&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Tn(n,r)})),o=jn.lastIndex;return ot&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?Bn:Hn,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),Tn)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,zn),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=$n,u()},d.clamp=function(e){return arguments.length?(c=!!e||_n,u()):c!==_n},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function Yn(){return Un()(_n,_n)}const Wn=Math.sqrt(50),Gn=Math.sqrt(10),Kn=Math.sqrt(2);function qn(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=Wn?10:o>=Gn?5:o>=Kn?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/ct&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*ct&&--l),l0))return[];if((e=+e)===(t=+t))return[e];const r=t=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function tr(e){if(!(t=er.exec(e)))throw new Error("invalid format: "+e);var t;return new nr({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function nr(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function rr(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ir(e){return(e=rr(Math.abs(e)))?e[1]:NaN}function or(e,t){var n=rr(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}tr.prototype=nr.prototype,nr.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 ar={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>or(100*e,t),r:or,s:function(e,t){var n=rr(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Qn=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")+rr(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function sr(e){return e}var lr,cr,ur,dr=Array.prototype.map,pr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function hr(e){var t=e.domain;return e.ticks=function(e){var n=t();return Xn(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return function(e,t,n,r){var i,o=Jn(e,t,n);switch((r=tr(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ir(t)/3)))-ir(Math.abs(e)))}(o,a))||(r.precision=i),ur(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ir(t)-ir(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-ir(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return cr(r)}(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c0;){if((i=Zn(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function mr(){var e=Yn();return e.copy=function(){return Vn(e,mr())},zt.apply(e,arguments),hr(e)}function fr(){var e=hr(function(){var e,t,n,r,i,o=0,a=1,s=_n,l=!1;function c(t){return null==t||isNaN(t=+t)?i:s(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),c):[s(0),s(1)]}}return c.domain=function(i){return arguments.length?([o,a]=i,e=r(o=+o),t=r(a=+a),n=e===t?0:1/(t-e),c):[o,a]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=u(Dn),c.rangeRound=u($n),c.unknown=function(e){return arguments.length?(i=e,c):i},function(i){return r=i,e=i(o),t=i(a),n=e===t?0:1/(t-e),c}}()(_n));return e.copy=function(){return t=e,fr().domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown());var t},Nt.apply(e,arguments)}lr=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?sr:(t=dr.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?sr:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(dr.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=tr(e)).fill,n=e.align,d=e.sign,p=e.symbol,h=e.zero,m=e.width,f=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(f=!0,v="g"):ar[v]||(void 0===g&&(g=12),y=!0,v="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var b="$"===p?i:"#"===p&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===p?o:/[%p]/.test(v)?l:"",I=ar[v],w=/[defgprs%]/.test(v);function k(e){var i,o,l,p=b,k=x;if("c"===v)k=I(e)+k,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:I(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0===+e&&"+"!==d&&(S=!1),p=(S?"("===d?d:c:"-"===d||"("===d?"":d)+p,k=("s"===v?pr[8+Qn/3]:"")+k+(S&&"("===d?")":""),w)for(i=-1,o=e.length;++i(l=e.charCodeAt(i))||l>57){k=(46===l?a+e.slice(i+1):e.slice(i))+k,e=e.slice(0,i);break}}f&&!h&&(e=r(e,1/0));var M=p.length+e.length+k.length,C=M>1)+p+e+k+C.slice(M);break;default:e=C+p+e+k}return s(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return e+""},k}return{format:d,formatPrefix:function(e,t){var n=d(((e=tr(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(ir(t)/3))),i=Math.pow(10,-r),o=pr[8+r/3];return function(e){return n(i*e)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),cr=lr.format,ur=lr.formatPrefix;class gr extends Map{constructor(e,t=vr){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(yr(this,e))}has(e){return super.has(yr(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}(this,e))}}function yr({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function vr(e){return null!==e&&"object"==typeof e?e.valueOf():e}Set;const br=Symbol("implicit");function xr(){var e=new gr,t=[],n=[],r=br;function i(i){let o=e.get(i);if(void 0===o){if(r!==br)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new gr;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return xr(t,n).unknown(r)},zt.apply(i,arguments),i}function Ir(e){return"piecewise"===e.type?_t(e.thresholds,e.colors):fr([e.min??0,e.max??100],e.color)}function wr(e){return e.values?xr(e.values,e.colors).unknown(e.unknownColor??null):xr(e.colors.map((e,t)=>t),e.colors).unknown(e.unknownColor??null)}function kr(e){return"ordinal"===e.type?wr(e):Ir(e)}function Sr(e,t,n){const{tickMaxStep:r,tickMinStep:i,tickNumber:o}=e,a=void 0===i?999:Math.floor(Math.abs(t[1]-t[0])/i),s=void 0===r?2:Math.ceil(Math.abs(t[1]-t[0])/r),l=o??n;return Math.min(a,Math.max(s,l))}function Mr(e,t){return 0===t[1]-t[0]?1:e/((t[1]-t[0])/100)}function Cr(e){return Math.floor(Math.abs(e)/50)}function Pr(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a-e(-t,n)}function Rr(){const e=function(e){const t=e(Er,Tr),n=t.domain;let r,i,o=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(o),i=function(e){return 10===e?jr:e===Math.E?Math.exp:t=>Math.pow(e,t)}(o),n()[0]<0?(r=Lr(r),i=Lr(i),e(Ar,Or)):e(Er,Tr),t}return t.base=function(e){return arguments.length?(o=+e,a()):o},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s0){for(;d<=p;++d)for(c=1;cs)break;m.push(u)}}else for(;d<=p;++d)for(c=o-1;c>=1;--c)if(u=d>0?c/i(-d):c*i(d),!(us)break;m.push(u)}2*m.length{if(null==e&&(e=10),null==n&&(n=10===o?"s":","),"function"!=typeof n&&(o%1||null!=(n=tr(n)).precision||(n.trim=!0),n=cr(n)),e===1/0)return n;const a=Math.max(1,o*e/t.ticks().length);return e=>{let t=e/i(Math.round(r(e)));return t*on(Pr(n(),{floor:e=>i(Math.floor(r(e))),ceil:e=>i(Math.ceil(r(e)))})),t}(Un()).domain([1,10]);return e.copy=()=>Vn(e,Rr()).base(e.base()),zt.apply(e,arguments),e}function Dr(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function $r(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function zr(e){return e<0?-e*e:e*e}function Nr(){var e=function(e){var t=e(_n,_n),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(_n,_n):.5===n?e($r,zr):e(Dr(n),Dr(1/n)):n},hr(t)}(Un());return e.copy=function(){return Vn(e,Nr()).exponent(e.exponent())},zt.apply(e,arguments),e}const _r=1e3,Fr=6e4,Hr=36e5,Br=864e5,Vr=6048e5,Ur=31536e6,Yr=new Date,Wr=new Date;function Gr(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(sGr(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Yr.setTime(+t),Wr.setTime(+r),e(Yr),e(Wr),Math.floor(n(Yr,Wr))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const Kr=Gr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Kr.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?Gr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Kr:null),Kr.range;const qr=Gr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*_r)},(e,t)=>(t-e)/_r,e=>e.getUTCSeconds()),Xr=(qr.range,Gr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*_r)},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getMinutes())),Zr=(Xr.range,Gr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getUTCMinutes())),Jr=(Zr.range,Gr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*_r-e.getMinutes()*Fr)},(e,t)=>{e.setTime(+e+t*Hr)},(e,t)=>(t-e)/Hr,e=>e.getHours())),Qr=(Jr.range,Gr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Hr)},(e,t)=>(t-e)/Hr,e=>e.getUTCHours())),ei=(Qr.range,Gr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Fr)/Br,e=>e.getDate()-1)),ti=(ei.range,Gr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Br,e=>e.getUTCDate()-1)),ni=(ti.range,Gr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Br,e=>Math.floor(e/Br)));function ri(e){return Gr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Fr)/Vr)}ni.range;const ii=ri(0),oi=ri(1),ai=ri(2),si=ri(3),li=ri(4),ci=ri(5),ui=ri(6);function di(e){return Gr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/Vr)}ii.range,oi.range,ai.range,si.range,li.range,ci.range,ui.range;const pi=di(0),hi=di(1),mi=di(2),fi=di(3),gi=di(4),yi=di(5),vi=di(6),bi=(pi.range,hi.range,mi.range,fi.range,gi.range,yi.range,vi.range,Gr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth())),xi=(bi.range,Gr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth())),Ii=(xi.range,Gr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear()));Ii.every=e=>isFinite(e=Math.floor(e))&&e>0?Gr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,Ii.range;const wi=Gr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function ki(e,t,n,r,i,o){const a=[[qr,1,_r],[qr,5,5e3],[qr,15,15e3],[qr,30,3e4],[o,1,Fr],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,Hr],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,Br],[r,2,1728e5],[n,1,Vr],[t,1,2592e6],[t,3,7776e6],[e,1,Ur]];function s(t,n,r){const i=Math.abs(n-t)/r,o=jt(([,,e])=>e).right(a,i);if(o===a.length)return e.every(Jn(t/Ur,n/Ur,r));if(0===o)return Kr.every(Math.max(Jn(t,n,r),1));const[s,l]=a[i/a[o-1][2]isFinite(e=Math.floor(e))&&e>0?Gr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,wi.range;const[Si,Mi]=ki(wi,xi,pi,ni,Qr,Zr),[Ci,Pi]=ki(Ii,bi,ii,ei,Jr,Xr);function Ei(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Ti(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ai(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var Oi,ji,Li,Ri={"-":"",_:" ",0:"0"},Di=/^\s*\d+/,$i=/^%/,zi=/[\\^$*+?|[\]().{}]/g;function Ni(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[e.toLowerCase(),t]))}function Bi(e,t,n){var r=Di.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Vi(e,t,n){var r=Di.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ui(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Yi(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Wi(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Gi(e,t,n){var r=Di.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Ki(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function qi(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Xi(e,t,n){var r=Di.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Zi(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Ji(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Qi(e,t,n){var r=Di.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function eo(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function to(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function no(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ro(e,t,n){var r=Di.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function io(e,t,n){var r=Di.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function oo(e,t,n){var r=$i.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ao(e,t,n){var r=Di.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function so(e,t,n){var r=Di.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function lo(e,t){return Ni(e.getDate(),t,2)}function co(e,t){return Ni(e.getHours(),t,2)}function uo(e,t){return Ni(e.getHours()%12||12,t,2)}function po(e,t){return Ni(1+ei.count(Ii(e),e),t,3)}function ho(e,t){return Ni(e.getMilliseconds(),t,3)}function mo(e,t){return ho(e,t)+"000"}function fo(e,t){return Ni(e.getMonth()+1,t,2)}function go(e,t){return Ni(e.getMinutes(),t,2)}function yo(e,t){return Ni(e.getSeconds(),t,2)}function vo(e){var t=e.getDay();return 0===t?7:t}function bo(e,t){return Ni(ii.count(Ii(e)-1,e),t,2)}function xo(e){var t=e.getDay();return t>=4||0===t?li(e):li.ceil(e)}function Io(e,t){return e=xo(e),Ni(li.count(Ii(e),e)+(4===Ii(e).getDay()),t,2)}function wo(e){return e.getDay()}function ko(e,t){return Ni(oi.count(Ii(e)-1,e),t,2)}function So(e,t){return Ni(e.getFullYear()%100,t,2)}function Mo(e,t){return Ni((e=xo(e)).getFullYear()%100,t,2)}function Co(e,t){return Ni(e.getFullYear()%1e4,t,4)}function Po(e,t){var n=e.getDay();return Ni((e=n>=4||0===n?li(e):li.ceil(e)).getFullYear()%1e4,t,4)}function Eo(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ni(t/60|0,"0",2)+Ni(t%60,"0",2)}function To(e,t){return Ni(e.getUTCDate(),t,2)}function Ao(e,t){return Ni(e.getUTCHours(),t,2)}function Oo(e,t){return Ni(e.getUTCHours()%12||12,t,2)}function jo(e,t){return Ni(1+ti.count(wi(e),e),t,3)}function Lo(e,t){return Ni(e.getUTCMilliseconds(),t,3)}function Ro(e,t){return Lo(e,t)+"000"}function Do(e,t){return Ni(e.getUTCMonth()+1,t,2)}function $o(e,t){return Ni(e.getUTCMinutes(),t,2)}function zo(e,t){return Ni(e.getUTCSeconds(),t,2)}function No(e){var t=e.getUTCDay();return 0===t?7:t}function _o(e,t){return Ni(pi.count(wi(e)-1,e),t,2)}function Fo(e){var t=e.getUTCDay();return t>=4||0===t?gi(e):gi.ceil(e)}function Ho(e,t){return e=Fo(e),Ni(gi.count(wi(e),e)+(4===wi(e).getUTCDay()),t,2)}function Bo(e){return e.getUTCDay()}function Vo(e,t){return Ni(hi.count(wi(e)-1,e),t,2)}function Uo(e,t){return Ni(e.getUTCFullYear()%100,t,2)}function Yo(e,t){return Ni((e=Fo(e)).getUTCFullYear()%100,t,2)}function Wo(e,t){return Ni(e.getUTCFullYear()%1e4,t,4)}function Go(e,t){var n=e.getUTCDay();return Ni((e=n>=4||0===n?gi(e):gi.ceil(e)).getUTCFullYear()%1e4,t,4)}function Ko(){return"+0000"}function qo(){return"%"}function Xo(e){return+e}function Zo(e){return Math.floor(+e/1e3)}function Jo(e){return new Date(e)}function Qo(e){return e instanceof Date?+e:+new Date(+e)}function ea(e,t,n,r,i,o,a,s,l,c){var u=Yn(),d=u.invert,p=u.domain,h=c(".%L"),m=c(":%S"),f=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),v=c("%b %d"),b=c("%B"),x=c("%Y");function I(e){return(l(e){const a=n(e),s=t.constant();let l=0,c=0,u=0;a.forEach(e=>{e>-s&&e=s&&(u+=1)});const d=[];if(l>0&&d.push(...r.ticks(l)),c>0){const e=i.ticks(c);d.at(-1)===e[0]?d.push(...e.slice(1)):d.push(...e)}if(u>0){const e=o.ticks(u);d.at(-1)===e[0]?d.push(...e.slice(1)):d.push(...e)}return d},t.tickFormat=(e=10,n)=>{const a=t.constant(),[s,l]=t.domain(),c=l-s,u=r.domain(),d=u[1]-u[0],p=(0===c?0:d/c)*e,h=i.domain(),m=h[1]-h[0],f=(0===c?0:m/c)*e,g=o.domain(),y=g[1]-g[0],v=(0===c?0:y/c)*e,b=r.tickFormat(p,n),x=i.tickFormat(f,n),I=o.tickFormat(v,n);return e=>(e.valueOf()<=-a?b:e.valueOf()>=a?I:x)(e)},t.copy=()=>oa(t.domain(),t.range()).constant(t.constant()),t}function aa(e,t,n){switch(e){case"log":return Rr(t,n);case"pow":return Nr(t,n);case"sqrt":return function(){return Nr.apply(null,arguments).exponent(.5)}(t,n);case"time":return ta(t,n);case"utc":return function(){return zt.apply(ea(Si,Mi,wi,xi,pi,ti,Qr,Zr,qr,Li).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}(t,n);case"symlog":return oa(t,n);default:return mr(t,n)}}Oi=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Fi(i),u=Hi(i),d=Fi(o),p=Hi(o),h=Fi(a),m=Hi(a),f=Fi(s),g=Hi(s),y=Fi(l),v=Hi(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:lo,e:lo,f:mo,g:Mo,G:Po,H:co,I:uo,j:po,L:ho,m:fo,M:go,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Xo,s:Zo,S:yo,u:vo,U:bo,V:Io,w:wo,W:ko,x:null,X:null,y:So,Y:Co,Z:Eo,"%":qo},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:To,e:To,f:Ro,g:Yo,G:Go,H:Ao,I:Oo,j:jo,L:Lo,m:Do,M:$o,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Xo,s:Zo,S:zo,u:No,U:_o,V:Ho,w:Bo,W:Vo,x:null,X:null,y:Uo,Y:Wo,Z:Ko,"%":qo},I={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:Ji,e:Ji,f:io,g:Ki,G:Gi,H:eo,I:eo,j:Qi,L:ro,m:Zi,M:to,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:Xi,Q:ao,s:so,S:no,u:Vi,U:Ui,V:Yi,w:Bi,W:Wi,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:Ki,Y:Gi,Z:qi,"%":oo};function w(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Ti(Ai(o.y,0,1))).getUTCDay(),r=i>4||0===i?hi.ceil(r):hi(r),r=ti.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Ei(Ai(o.y,0,1))).getDay(),r=i>4||0===i?oi.ceil(r):oi(r),r=ei.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Ti(Ai(o.y,0,1)).getUTCDay():Ei(Ai(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Ti(o)):Ei(o)}}function S(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=I[i in Ri?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(t,b),x.x=w(n,x),x.X=w(r,x),x.c=w(t,x),{format:function(e){var t=w(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=k(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=k(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),ji=Oi.format,Oi.parse,Li=Oi.utcFormat,Oi.utcParse;const sa=e=>e?.[0]instanceof Date;function la(e,t,n){const r=ta(e,t);return(e,{location:t})=>"tick"===t?r.tickFormat(n)(e):`${e.toLocaleString()}`}let ca,ua;const da=new class{types=(()=>new Set)();constructor(){if(ca)throw new Error("You can only create one instance!");ca=this.types}addType(e){this.types.add(e)}getTypes(){return this.types}};da.addType("bar"),da.addType("line"),da.addType("scatter");const pa=new class{types=(()=>new Set)();constructor(){if(ua)throw new Error("You can only create one instance!");ua=this.types}addType(e){this.types.add(e)}getTypes(){return this.types}};function ha(e){return da.getTypes().has(e)}function ma(e){return ha(e.type)}function fa(e){return void 0!==e.bandwidth}function ga(e){return fa(e)&&void 0!==e.paddingOuter}function ya({scales:e,drawingArea:t,formattedSeries:n,axis:r,seriesConfig:i,axisDirection:o,zoomMap:a,domains:s}){if(void 0===r)return{axis:{},axisIds:[]};const c=((e,t,n,r)=>{const i=new Set;return Object.keys(t).filter(ha).forEach(o=>{const a=n[o]?.series??{},s=t[o].axisTooltipGetter?.(a);void 0!==s&&s.forEach(({axisId:t,direction:n})=>{n===e&&i.add(t??r)})}),i})(o,i,n,r[0].id),u={};return r.forEach(n=>{const r=n,i=e[r.id],d=a?.get(r.id),p=d?[d.start,d.end]:[0,100],h=function(e,t,n){const r="x"===t?[e.left,e.left+e.width]:[e.top+e.height,e.top];return n?[r[1],r[0]]:r}(t,o,r.reverse??!1),m=s[r.id].tickNumber,f=!r.ignoreTooltip&&c.has(r.id),g=Mr(m,p),y=r.data??[];if(fa(i)){const e="y"===o?[h[1],h[0]]:h;if(ga(i)&&Et(r)){const e=r.categoryGapRatio??.2,t=function(e,t){return e.step()*t<.1}(i,e),n=t?0:e,o=t?0:r.barGapRatio??.1;u[r.id]=l({offset:0,height:0,categoryGapRatio:n,barGapRatio:o,triggerTooltip:f},r,{data:y,scale:t?i.copy().padding(0):i,tickNumber:g,colorScale:r.colorMap&&("ordinal"===r.colorMap.type?wr(l({values:r.data},r.colorMap)):kr(r.colorMap))})}if(Tt(r)&&(u[r.id]=l({offset:0,height:0,triggerTooltip:f},r,{data:y,scale:i,tickNumber:g,colorScale:r.colorMap&&("ordinal"===r.colorMap.type?wr(l({values:r.data},r.colorMap)):kr(r.colorMap))})),sa(r.data)){const t=la(r.data,e,r.tickNumber);u[r.id].valueFormatter=r.valueFormatter??t}return}if("band"===r.scaleType||"point"===r.scaleType)return;const v=r,b=v.scaleType??"linear";u[r.id]=l({offset:0,height:0,triggerTooltip:f},v,{data:y,scaleType:b,scale:i,tickNumber:g,colorScale:v.colorMap&&Ir(v.colorMap),valueFormatter:r.valueFormatter??Pt(g,aa(b,h.map(e=>i.invert(e)),h))})}),{axis:u,axisIds:r.map(({id:e})=>e)}}function va(e){return null!=e}function ba(e,t,n,r){const i=e?.length??0,o=Math.floor(t*i/100),a=Math.ceil(n*i/100);return function(t,n){return null==(t[r]??e?.[n])||n>=o&&n=s&&n<=l}}pa.addType("radar");const Ia=e=>(t=[])=>t.reduce((t,n)=>{const{zoom:r,id:i,reverse:o}=n,a=St(r,i,e,o);return a&&(t[i]=a),t},{}),wa=ae(e=>e.experimentalFeatures,e=>Boolean(e?.preferStrictDomainInLineCharts));function ka(e){return Array.isArray(e)?JSON.stringify(e):"object"==typeof e&&null!==e?e.valueOf():e}function Sa(...e){let t,n,r=new gr(void 0,ka),i=[],o=[],a=0,s=1,l=!1,c=0,u=0,d=.5;const p=e=>{const t=r.get(e);if(void 0!==t)return o[t%o.length]},h=()=>{const e=i.length,r=sg+t*e);return o=r?v.reverse():v,p};p.domain=function(e){if(!arguments.length)return i.slice();i=[],r=new gr(void 0,ka);for(const t of e)r.has(t)||r.set(t,i.push(t)-1);return h()},p.range=function(e){if(!arguments.length)return[a,s];const[t,n]=e;return a=+t,s=+n,h()},p.rangeRound=function(e){const[t,n]=e;return a=+t,s=+n,l=!0,h()},p.bandwidth=function(){return n},p.step=function(){return t},p.round=function(e){return arguments.length?(l=!!e,h()):l},p.padding=function(e){return arguments.length?(c=Math.min(1,u=+e),h()):c},p.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),h()):c},p.paddingOuter=function(e){return arguments.length?(u=+e,h()):u},p.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),h()):d},p.copy=()=>Sa(i,[a,s]).round(l).paddingInner(c).paddingOuter(u).align(d);const[m,f]=e;return e.length>1?(p.domain(m),p.range(f)):m?p.range(m):h(),p}function Ma(...e){const t=Sa(...e).paddingInner(1),n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=()=>{const e=n();return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=t.copy,e},t}function Ca(e,t,n){const r="x"===t?[e.left,e.left+e.width]:[e.top+e.height,e.top];return n.reverse?[r[1],r[0]]:r}function Pa(e,t){const n=[0,1];if(Et(e)){const r=e.categoryGapRatio??.2;return Sa(t,n).paddingInner(r).paddingOuter(r/2)}if(Tt(e))return Ma(t,n);const r=aa(e.scaleType??"linear",t,n);return"symlog"===e.scaleType&&null!=e.constant&&r.constant(e.constant),r}const Ea=(e,t)=>{const n=e[1]-e[0],r=t[1]-t[0];return[e[0]-t[0]*n/r,e[1]+(100-t[1])*n/r]},Ta=(e,t,n,r,i,o,a)=>{const s="x"===n?r[e].xExtremumGetter:r[e].yExtremumGetter,l=o[e]?.series??{};return s?.({series:l,axis:t,axisIndex:i,isDefaultAxis:0===i,getFilters:a})??[1/0,-1/0]};function Aa(e,t,n,r,i,o){const a=Object.keys(n).filter(ha);let s=[1/0,-1/0];for(const l of a){const[a,c]=Ta(l,e,t,n,r,i,o);s=[Math.min(s[0],a),Math.max(s[1],c)]}return Number.isNaN(s[0])||Number.isNaN(s[1])?[1/0,-1/0]:s}function Oa(e,t,n){return aa(e??"linear",t,[0,1]).nice(n).domain()}function ja(e,t,n,r,[i,o],a,s){const l=Ra(e,t,n,r,s);let c=Da(e,i,o);if("function"==typeof l){const{min:e,max:t}=l(i.valueOf(),o.valueOf());c[0]=e,c[1]=t}const u=Sr(e,c,a);return"nice"===l&&(c=Oa(e.scaleType,c,u)),c=["min"in e?e.min??c[0]:c[0],"max"in e?e.max??c[1]:c[1]],{domain:c,tickNumber:u}}function La(e,t,n,r,[i,o],a,s){const l=Ra(e,t,n,r,s);let c=Da(e,i,o);if("function"==typeof l){const{min:e,max:t}=l(i.valueOf(),o.valueOf());c[0]=e,c[1]=t}return"nice"===l&&(c=Oa(e.scaleType,c,a)),[e.min??c[0],e.max??c[1]]}function Ra(e,t,n,r,i){return i?((e,t,n,r)=>{if(void 0!==e.domainLimit)return e.domainLimit;if("x"===t)for(const t of r.line?.seriesOrder??[]){const i=r.line.series[t];if(i.xAxisId===e.id||void 0===i.xAxisId&&0===n)return"strict"}return"nice"})(e,t,n,r):e.domainLimit??"nice"}function Da(e,t,n){let r=t,i=n;return"max"in e&&null!=e.max&&e.maxt&&(i=e.min),"min"in e||"max"in e?[e.min??r,e.max??i]:[r,i]}class $a{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(e,t){let n=this.length++;for(;n>0;){const e=n-1>>1,r=this.values[e];if(t>=r)break;this.ids[n]=this.ids[e],this.values[n]=r,n=e}this.ids[n]=e,this.values[n]=t}pop(){if(0===this.length)return;const e=this.ids,t=this.values,n=e[0],r=--this.length;if(r>0){const n=e[r],i=t[r];let o=0;const a=r>>1;for(;o=i)break;e[o]=e[s],t[o]=t[s],o=s}e[o]=n,t[o]=i}return n}peek(){return this.length>0?this.ids[0]:void 0}peekValue(){return this.length>0?this.values[0]:void 0}shrink(){this.ids.length=this.values.length=this.length}}const za=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class Na{static from(e,t=0){if(t%8!=0)throw new Error("byteOffset must be 8-byte aligned.");if(!e||void 0===e.byteLength||e.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");const[n,r]=new Uint8Array(e,t+0,2);if(251!==n)throw new Error("Data does not appear to be in a Flatbush format.");const i=r>>4;if(3!==i)throw new Error(`Got v${i} data when expected v3.`);const o=za[15&r];if(!o)throw new Error("Unrecognized array type.");const[a]=new Uint16Array(e,t+2,1),[s]=new Uint32Array(e,t+4,1);return new Na(s,a,o,void 0,e,t)}constructor(e,t=16,n=Float64Array,r=ArrayBuffer,i,o=0){if(void 0===e)throw new Error("Missing required argument: numItems.");if(isNaN(e)||e<=0)throw new Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.byteOffset=o;let a=e,s=a;this._levelBounds=[4*a];do{a=Math.ceil(a/this.nodeSize),s+=a,this._levelBounds.push(4*s)}while(1!==a);this.ArrayType=n,this.IndexArrayType=s<16384?Uint16Array:Uint32Array;const l=za.indexOf(n),c=4*s*n.BYTES_PER_ELEMENT;if(l<0)throw new Error(`Unexpected typed array class: ${n}.`);if(i)this.data=i,this._boxes=new n(i,o+8,4*s),this._indices=new this.IndexArrayType(i,o+8+c,s),this._pos=4*s,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1];else{const i=this.data=new r(8+c+s*this.IndexArrayType.BYTES_PER_ELEMENT);this._boxes=new n(i,8,4*s),this._indices=new this.IndexArrayType(i,8+c,s),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(i,0,2).set([251,48+l]),new Uint16Array(i,2,1)[0]=t,new Uint32Array(i,4,1)[0]=e}this._queue=new $a}add(e,t,n=e,r=t){const i=this._pos>>2,o=this._boxes;return this._indices[i]=i,o[this._pos++]=e,o[this._pos++]=t,o[this._pos++]=n,o[this._pos++]=r,ethis.maxX&&(this.maxX=n),r>this.maxY&&(this.maxY=r),i}finish(){if(this._pos>>2!==this.numItems)throw new Error(`Added ${this._pos>>2} items when expected ${this.numItems}.`);const e=this._boxes;if(this.numItems<=this.nodeSize)return e[this._pos++]=this.minX,e[this._pos++]=this.minY,e[this._pos++]=this.maxX,void(e[this._pos++]=this.maxY);const t=this.maxX-this.minX||1,n=this.maxY-this.minY||1,r=new Uint32Array(this.numItems);for(let i=0,o=0;i>2]=t,e[this._pos++]=i,e[this._pos++]=o,e[this._pos++]=a,e[this._pos++]=s}}}search(e,t,n,r,i){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let o=this._boxes.length-4;const a=[],s=[];for(;void 0!==o;){const l=Math.min(o+4*this.nodeSize,Fa(o,this._levelBounds));for(let c=o;cthis._boxes[c+2])continue;if(t>this._boxes[c+3])continue;const l=0|this._indices[c>>2];o>=4*this.numItems?a.push(l):(void 0===i||i(l))&&(s.push(l),s.push(this._boxes[c]),s.push(this._boxes[c+1]))}o=a.pop()}return s}neighbors(e,t,n=1/0,r=1/0,i,o=_a){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let a=this._boxes.length-4;const s=this._queue,l=[];e:for(;void 0!==a;){const c=Math.min(a+4*this.nodeSize,Fa(a,this._levelBounds));for(let n=a;n>2],c=this._boxes[n],u=this._boxes[n+1],d=this._boxes[n+2],p=this._boxes[n+3],h=o(ed?e-d:0,tp?t-p:0);h>r||(a>=4*this.numItems?s.push(l<<1,h):(void 0===i||i(l))&&s.push(1+(l<<1),h))}for(;s.length&&1&s.peek();){if(s.peekValue()>r)break e;if(l.push(s.pop()>>1),l.length===n)break e}a=s.length?s.pop()>>1:void 0}return s.clear(),l}}function _a(e,t){return e*e+t*t}function Fa(e,t){let n=0,r=t.length-1;for(;n>1;t[i]>e?r=i:n=i+1}return t[n]}function Ha(e,t,n,r,i,o){if(Math.floor(r/o)>=Math.floor(i/o))return;const a=e[r],s=e[r+i>>1],l=e[i];let c=l;const u=Math.max(a,s);l>u?c=u:u===a?c=Math.max(s,l):u===s&&(c=Math.max(a,l));let d=r-1,p=i+1;for(;;){do{d++}while(e[d]c);if(d>=p)break;Ba(e,t,n,d,p)}Ha(e,t,n,r,p,o),Ha(e,t,n,p+1,i,o)}function Ba(e,t,n,r,i){const o=e[r];e[r]=e[i],e[i]=o;const a=4*r,s=4*i,l=t[a],c=t[a+1],u=t[a+2],d=t[a+3];t[a]=t[s],t[a+1]=t[s+1],t[a+2]=t[s+2],t[a+3]=t[s+3],t[s]=l,t[s+1]=c,t[s+2]=u,t[s+3]=d;const p=n[r];n[r]=n[i],n[i]=p}function Va(e,t){let n=e^t,r=65535^n,i=65535^(e|t),o=e&(65535^t),a=n|r>>1,s=n>>1^n,l=i>>1^r&o>>1^i,c=n&i>>1^o>>1^o;n=a,r=s,i=l,o=c,a=n&n>>2^r&r>>2,s=n&r>>2^r&(n^r)>>2,l^=n&i>>2^r&o>>2,c^=r&i>>2^(n^r)&o>>2,n=a,r=s,i=l,o=c,a=n&n>>4^r&r>>4,s=n&r>>4^r&(n^r)>>4,l^=n&i>>4^r&o>>4,c^=r&i>>4^(n^r)&o>>4,n=a,r=s,i=l,o=c,l^=n&i>>8^r&o>>8,c^=r&i>>8^(n^r)&o>>8,n=l^l>>1,r=c^c>>1;let u=e^t,d=r|65535^(u|n);return u=16711935&(u|u<<8),u=252645135&(u|u<<4),u=858993459&(u|u<<2),u=1431655765&(u|u<<1),d=16711935&(d|d<<8),d=252645135&(d|d<<4),d=858993459&(d|d<<2),d=1431655765&(d|d<<1),(d<<1|u)>>>0}const Ua=e=>e.zoom,Ya=ae(ce,ue,(e,t)=>e?.some(e=>Boolean(e.zoom))||t?.some(e=>Boolean(e.zoom))||!1),Wa=ae(Ua,e=>e?.isInteracting),Ga=le(Ua,function(e){return e?.zoomData&&(e=>{const t=new Map;return e.forEach(e=>{t.set(e.axisId,e)}),t})(e?.zoomData)}),Ka=ae(Ga,(e,t)=>e?.get(t)),qa=le(ce,ue,function(e,t){return l({},Ia("x")(e),Ia("y")(t))}),Xa=ae(qa,(e,t)=>e[t]),Za=ae(he,function(e){return Cr(e.width)}),Ja=ae(he,function(e){return Cr(e.height)}),Qa=le(ce,ft,ht,wa,Za,function(e,t,n,r,i){const o={};return e?.forEach((e,a)=>{const s=e;if(Et(s)||Tt(s))return o[s.id]={domain:s.data},void(void 0!==s.ordinalTimeTicks&&(o[s.id].tickNumber=Sr(s,[s.data?.find(e=>null!==e),s.data?.findLast(e=>null!==e)],i)));const l=Aa(s,"x",n,a,t);o[s.id]=ja(s,"x",a,t,l,i,r)}),{axes:e,domains:o}}),es=le(ue,ft,ht,wa,Ja,function(e,t,n,r,i){const o={};return e?.forEach((e,a)=>{const s=e;if(Et(s)||Tt(s))return o[s.id]={domain:s.data},void(void 0!==s.ordinalTimeTicks&&(o[s.id].tickNumber=Sr(s,[s.data?.find(e=>null!==e),s.data?.findLast(e=>null!==e)],i)));const l=Aa(s,"y",n,a,t);o[s.id]=ja(s,"y",a,t,l,i,r)}),{axes:e,domains:o}}),ts=le(Ga,qa,Qa,es,function(e,t,{axes:n,domains:r},{axes:i,domains:o}){if(!e||!t)return;let a=!1;const s={},l=[...n??[],...i??[]];for(let i=0;i=100)continue;const d=i<(n?.length??0)?"x":"y";if("band"===c.scaleType||"point"===c.scaleType)s[c.id]=ba(c.data,u.start,u.end,d);else{const{domain:e}="x"===d?r[c.id]:o[c.id];s[c.id]=xa(e,u.start,u.end,d,c.data)}a=!0}return a?(e=>({currentAxisId:t,seriesXAxisId:n,seriesYAxisId:r,isDefaultAxis:i})=>(o,a)=>!(t===n?r:n)||i?Object.values(e??{})[0]?.(o,a)??!0:[r,n].filter(e=>e!==t).map(t=>e[t??""]).filter(va).every(e=>e(o,a)))(s):void 0}),ns=le(ft,ht,Ga,qa,ts,wa,Qa,function(e,t,n,r,i,o,{axes:a,domains:s}){const l={};return a?.forEach((a,c)=>{const u=s[a.id].domain;if(Et(a)||Tt(a))return void(l[a.id]=u);const d=n?.get(a.id),p=r?.[a.id],h=void 0!==d||p?void 0:i;if(!h)return void(l[a.id]=u);const m=s[a.id].tickNumber,f=Aa(a,"x",t,c,e,h);l[a.id]=La(a,"x",c,e,f,m,o)}),l}),rs=le(ft,ht,Ga,qa,ts,wa,es,function(e,t,n,r,i,o,{axes:a,domains:s}){const l={};return a?.forEach((a,c)=>{const u=s[a.id].domain;if(Et(a)||Tt(a))return void(l[a.id]=u);const d=n?.get(a.id),p=r?.[a.id],h=void 0!==d||p?void 0:i;if(!h)return void(l[a.id]=u);const m=s[a.id].tickNumber,f=Aa(a,"y",t,c,e,h);l[a.id]=La(a,"y",c,e,f,m,o)}),l}),is=le(ce,ns,function(e,t){const n={};return e?.forEach(e=>{const r=e,i=t[r.id];n[r.id]=Pa(r,i)}),n}),os=le(ue,rs,function(e,t){const n={};return e?.forEach(e=>{const r=e,i=t[r.id];n[r.id]=Pa(r,i)}),n}),as=le(ce,is,he,Ga,function(e,t,n,r){const i={};return e?.forEach(e=>{const o=e,a=r?.get(o.id),s=a?[a.start,a.end]:[0,100],l=Ca(n,"x",o),c=t[o.id].copy(),u=Ea(l,s);c.range(u),i[o.id]=c}),i}),ss=le(ue,os,he,Ga,function(e,t,n,r){const i={};return e?.forEach(e=>{const o=e,a=r?.get(o.id),s=a?[a.start,a.end]:[0,100],l=Ca(n,"y",o),c=t[o.id].copy(),u=fa(c)?l.reverse():l,d=Ea(u,s);c.range(d),i[o.id]=c}),i}),ls=le(he,ft,ht,Ga,Qa,as,function(e,t,n,r,{axes:i,domains:o},a){return ya({scales:a,drawingArea:e,formattedSeries:t,axis:i,seriesConfig:n,axisDirection:"x",zoomMap:r,domains:o})}),cs=le(he,ft,ht,Ga,es,ss,function(e,t,n,r,{axes:i,domains:o},a){return ya({scales:a,drawingArea:e,formattedSeries:t,axis:i,seriesConfig:n,axisDirection:"y",zoomMap:r,domains:o})}),us=ae(ls,cs,(e,t,n)=>e?.axis[n]??t?.axis[n]),ds=ae(ce,ue,(e,t,n)=>{const r=e?.find(e=>e.id===n)??t?.find(e=>e.id===n)??null;if(r)return r}),ps=ae(ce,e=>e[0].id),hs=ae(ue,e=>e[0].id),ms=new Map,fs=()=>ms,gs=le(ft,is,os,ps,hs,function(e,t,n,r,i){const o=e.scatter,a=new Map;return o?(o.seriesOrder.forEach(e=>{const{data:s,xAxisId:l=r,yAxisId:c=i}=o.series[e],u=new Na(s.length),d=t[l],p=n[c];for(const e of s)u.add(d(e.x),p(e.y));u.finish(),a.set(e,u)}),a):a});function ys(e){return e instanceof Date?e.getTime():e}function vs(e,t){const{scale:n,data:r,reverse:i}=e;if(!fa(n)){const e=n.invert(t);if(void 0===r)return-1;const i=ys(e),o=r?.findIndex((t,n)=>{const o=ys(t);return o>i&&(0===n||Math.abs(i-o)<=Math.abs(i-ys(r[n-1])))||o<=i&&(n===r.length-1||Math.abs(ys(e)-o)=r.length?-1:i?r.length-1-o:o}function bs(e,t,n,r){if(!fa(e)){if(null===r){const t=e.invert(n);return Number.isNaN(t)?null:t}return t[r]}return null===r||r<0||r>=t.length?null:t[r]}function xs(e,t){const n=e.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n.matrixTransform(e.getScreenCTM().inverse())}const Is=e=>e.interaction,ws=ae(Is,e=>void 0!==e),ks=ae(Is,e=>e?.pointer??null),Ss=ae(ks,e=>e&&e.x),Ms=ae(ks,e=>e&&e.y),Cs=ae(Is,e=>e?.lastUpdate);function Ps(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const n=e.length;if(n!==t.length)return!1;for(let r=0;rvs(t.axis[n],e)):vs(t.axis[n],e)}const Ts=(e,t,n)=>{if(null===e)return null;const r=Es(e,t,n);return-1===r?null:r},As=ae(Ss,ls,Ts),Os=ae(Ms,cs,Ts),js=ae(Ss,Ms,ls,cs,(e,t,n,r)=>[...null===e?[]:n.axisIds.map(t=>({axisId:t,dataIndex:Es(e,n,t)})),...null===t?[]:r.axisIds.map(e=>({axisId:e,dataIndex:Es(t,r,e)}))].filter(e=>null!==e.dataIndex&&e.dataIndex>=0));function Ls(e,t,n,r=t.axisIds[0]){return Array.isArray(r)?r.map((r,i)=>{const o=t.axis[r];return bs(o.scale,o.data,e,n[i])}):bs(t.axis[r].scale,t.axis[r].data,e,n)}const Rs=ae(Ss,ls,As,(e,t,n,r)=>null===e||0===t.axisIds.length?null:Ls(e,t,n,r)),Ds=ae(Ms,cs,Os,(e,t,n,r)=>null===e||0===t.axisIds.length?null:Ls(e,t,n,r)),$s=[],zs=se({memoizeOptions:{resultEqualityCheck:Ps}})(Ss,ls,(e,t)=>null===e?$s:t.axisIds.filter(e=>t.axis[e].triggerTooltip).map(n=>({axisId:n,dataIndex:vs(t.axis[n],e)})).filter(({dataIndex:e})=>e>=0)),Ns=se({memoizeOptions:{resultEqualityCheck:Ps}})(Ms,cs,(e,t)=>null===e?$s:t.axisIds.filter(e=>t.axis[e].triggerTooltip).map(n=>({axisId:n,dataIndex:vs(t.axis[n],e)})).filter(({dataIndex:e})=>e>=0)),_s=ae(zs,Ns,(e,t)=>e.length>0||t.length>0);function Fs(e){return void 0!==e.setPointerCoordinate}const Hs=new Set(["bar","rangeBar","line"]),Bs=({params:t,store:n,seriesConfig:r,svgRef:i,instance:o})=>{const{xAxis:a,yAxis:s,dataset:l,onHighlightedAxisChange:c}=t,u=n.use(he),d=n.use(ft),p=n.use(ws),{axis:h,axisIds:m}=n.use(ls),{axis:f,axisIds:g}=n.use(cs);t.highlightedAxis,V(()=>{void 0!==t.highlightedAxis&&n.set("controlledCartesianAxisHighlight",t.highlightedAxis)},[n,t.highlightedAxis]);const y=e.useRef(!0);e.useEffect(()=>{y.current?y.current=!1:n.set("cartesianAxis",{x:Mt(a,l),y:Ct(s,l)})},[r,u,a,s,l,n]);const v=m[0],b=g[0];!function(t,n,r){const i=st(ut,{store:t,selector:n}).current;var o;i.effect=r,o=i.onMount,e.useEffect(o,lt)}(n,js,(e,t)=>{c&&(Object.is(e,t)||(e.length===t.length?e?.some(({axisId:e,dataIndex:n},r)=>t[r].axisId!==e||t[r].dataIndex!==n)&&c(t):c(t)))});const x=Fs(o);return e.useEffect(()=>{const e=i.current;if(!p||!x||!e||t.disableAxisListener)return()=>{};const n=o.addInteractionListener("moveEnd",e=>{e.detail.activeGestures.pan||o.cleanInteraction()}),r=o.addInteractionListener("panEnd",e=>{e.detail.activeGestures.move||o.cleanInteraction()}),a=o.addInteractionListener("quickPressEnd",e=>{e.detail.activeGestures.move||e.detail.activeGestures.pan||o.cleanInteraction()}),s=t=>{const n=t.detail.srcEvent,r=t.detail.target,i=xs(e,n);t.detail.srcEvent.buttons>=1&&r?.hasPointerCapture(t.detail.srcEvent.pointerId)&&!r?.closest("[data-charts-zoom-slider]")&&r?.releasePointerCapture(t.detail.srcEvent.pointerId),o.isPointInside(i.x,i.y,r)?o.setPointerCoordinate(i):o.cleanInteraction?.()},l=o.addInteractionListener("move",s),c=o.addInteractionListener("pan",s),u=o.addInteractionListener("quickPress",s);return()=>{l.cleanup(),n.cleanup(),c.cleanup(),r.cleanup(),u.cleanup(),a.cleanup()}},[i,n,h,v,f,b,o,t.disableAxisListener,p,x]),e.useEffect(()=>{const e=i.current,n=t.onAxisClick;if(null===e||!n)return()=>{};const r=o.addInteractionListener("tap",t=>{let r=null,i=!1;const o=xs(e,t.detail.srcEvent),a=vs(h[v],o.x);i=-1!==a,r=i?a:vs(f[b],o.y);const s=i?m[0]:g[0];if(null==r||-1===r)return;const l=(i?h:f)[s].data[r],c={};Object.keys(d).filter(e=>Hs.has(e)).forEach(e=>{const t=d[e];t?.seriesOrder.forEach(e=>{const n=t.series[e],o=n.xAxisId,a=n.yAxisId,l=i?o:a;void 0!==l&&l!==s||(c[e]=n.data[r])})}),n(t.detail.srcEvent,{dataIndex:r,axisValue:l,seriesValues:c})});return()=>{r.cleanup()}},[t.onAxisClick,d,i,h,m,f,g,v,b,o]),{}};Bs.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0},Bs.getDefaultizedParams=({params:e})=>l({},e,{colors:e.colors??Ce,theme:e.theme??"light",defaultizedXAxis:Mt(e.xAxis,e.dataset),defaultizedYAxis:Ct(e.yAxis,e.dataset)}),Bs.getInitialState=e=>l({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},void 0===e.highlightedAxis?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});const Vs=Object.is;function Us(e,t){if(e===t)return!0;if(!(e instanceof Object&&t instanceof Object))return!1;let n=0,r=0;for(const r in e){if(n+=1,!Vs(e[r],t[r]))return!1;if(!(r in t))return!1}for(const e in t)r+=1;return n===r}const Ys=({store:e})=>{const t=ke(function(t){const n=e.state.tooltip.item;t?null!==n&&Us(n,t)&&e.set("tooltip",{item:null}):null!==n&&e.set("tooltip",{item:null})});return{instance:{setTooltipItem:ke(function(t){Us(e.state.tooltip.item,t)||e.set("tooltip",{item:t})}),removeTooltipItem:t}}};Ys.getInitialState=()=>({tooltip:{item:null}}),Ys.params={};const Ws=({store:e})=>({instance:{cleanInteraction:ke(function(){e.update({interaction:l({},e.state.interaction,{pointer:null})})}),setLastUpdateSource:ke(function(t){e.state.interaction.lastUpdate!==t&&e.set("interaction",l({},e.state.interaction,{lastUpdate:t}))}),setPointerCoordinate:ke(function(t){e.set("interaction",l({},e.state.interaction,{pointer:t,lastUpdate:null!==t?"pointer":e.state.interaction.lastUpdate}))})}});function Gs(e,t){return void 0!==e.id?e:l({id:t},e)}function Ks(e){return e.colorMap?l({},e,{colorScale:"ordinal"===e.colorMap.type&&e.data?wr(l({values:e.data},e.colorMap)):kr("continuous"===e.colorMap.type?l({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function qs(e,t){if(!e||0===e.length)return{axis:{},axisIds:[]};const n={},r=[];return e.forEach((e,i)=>{const o=e.dataKey,a=e.id??`defaultized-z-axis-${i}`;if(void 0===o||void 0!==e.data)return n[a]=Ks(Gs(e,a)),void r.push(a);if(void 0===t)throw new Error("MUI X Charts: z-axis uses `dataKey` but no `dataset` is provided.");n[a]=Ks(Gs(l({},e,{data:t.map(e=>e[o])}),a)),r.push(a)}),{axis:n,axisIds:r}}Ws.getInitialState=()=>({interaction:{item:null,pointer:null,lastUpdate:"pointer"}}),Ws.params={};const Xs=({params:t,store:n})=>{const{zAxis:r,dataset:i}=t,o=e.useRef(!0);return e.useEffect(()=>{o.current?o.current=!1:n.set("zAxis",qs(r,i))},[r,i,n]),{}};Xs.params={zAxis:!0,dataset:!0},Xs.getInitialState=e=>({zAxis:qs(e.zAxis,e.dataset)});const Zs=({store:e,params:t})=>(t.highlightedItem,V(()=>{e.state.highlight.item!==t.highlightedItem&&e.set("highlight",l({},e.state.highlight,{item:t.highlightedItem}))},[e,t.highlightedItem]),{instance:{clearHighlight:ke(()=>{t.onHighlightChange?.(null);const n=e.state.highlight;null===n.item||n.isControlled||e.set("highlight",{item:null,lastUpdate:"pointer",isControlled:!1})}),setHighlight:ke(n=>{const r=e.state.highlight;Us(r.item,n)||(t.onHighlightChange?.(n),r.isControlled||e.set("highlight",{item:n,lastUpdate:"pointer",isControlled:!1}))})}});function Js(e){let t=1/0,n=-1/0;for(const r of e??[])rn&&(n=r);return[t,n]}Zs.getInitialState=e=>({highlight:{item:e.highlightedItem,lastUpdate:"pointer",isControlled:void 0!==e.highlightedItem}}),Zs.params={highlightedItem:!0,onHighlightChange:!0};const Qs=(e,t)=>"x"===t?{x:e,y:null}:{x:null,y:e},el=e=>{const{axis:t,getFilters:n,isDefaultAxis:r}=e,i=n?.({currentAxisId:t.id,isDefaultAxis:r}),o=i?t.data?.filter((e,t)=>i({x:null,y:null},t)):t.data;return Js(o??[])},tl=e=>t=>{const{series:n,axis:r,getFilters:i,isDefaultAxis:o}=t;return Object.keys(n).filter(t=>{const i="x"===e?n[t].xAxisId:n[t].yAxisId;return i===r.id||o&&void 0===i}).reduce((t,a)=>{const{stackedData:s}=n[a],l=i?.({currentAxisId:r.id,isDefaultAxis:o,seriesXAxisId:n[a].xAxisId,seriesYAxisId:n[a].yAxisId}),[c,u]=s?.reduce((t,n,r)=>!l||l(Qs(n[0],e),r)&&l(Qs(n[1],e),r)?[Math.min(...n,t[0]),Math.max(...n,t[1])]:t,[1/0,-1/0])??[1/0,-1/0];return[Math.min(c,t[0]),Math.max(u,t[1])]},[1/0,-1/0])};function nl(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function rl(e){return function(){return e}}function il(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o=0;)n[t]=t;return n}function al(e,t){return e[t]}function sl(e){const t=[];return t.key=e,t}function ll(){var e=rl([]),t=ol,n=il,r=al;function i(i){var o,a,s=Array.from(e.apply(this,arguments),sl),l=s.length,c=-1;for(const e of i)for(o=0,++c;oo&&(o=t,r=n);return r}function dl(e){var t=e.map(pl);return ol(e).sort(function(e,n){return t[e]-t[n]})}function pl(e){for(var t,n=0,r=-1,i=e.length;++r0){for(var n,r,i,o=0,a=e[0].length;o0?(s[0]=i,i+=l,s[1]=i):l<0?(s[1]=o,o+=l,s[0]=o):s.data[n.key]>0?(s[0]=i,s[1]=i):s.data[n.key]<0?(s[1]=o,s[0]=o):(s[0]=0,s[1]=0)}}},none:il,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a{const{series:t,seriesOrder:n,defaultStrategy:r}=e,i=[],o={};return n.forEach(e=>{const{stack:n,stackOrder:a,stackOffset:s}=t[e];void 0===n?i.push({ids:[e],stackingOrder:hl.none,stackingOffset:ml.none}):void 0===o[n]?(o[n]=i.length,i.push({ids:[e],stackingOrder:hl[a??r?.stackOrder??"none"],stackingOffset:ml[s??r?.stackOffset??"diverging"]})):(i[o[n]].ids.push(e),void 0!==a&&(i[o[n]].stackingOrder=hl[a]),void 0!==s&&(i[o[n]].stackingOffset=ml[s]))}),i},gl=e=>null==e?"":e.toLocaleString();function yl(e,t){return"function"==typeof e?e(t):e}function vl(e){return e.colorGetter?e.colorGetter:()=>e.color}const bl=(e,t,n)=>{const r="vertical"===e.layout,i=r?t?.colorScale:n?.colorScale,o=r?n?.colorScale:t?.colorScale,a=r?t?.data:n?.data,s=vl(e);return o?t=>{if(void 0===t)return e.color;const n=e.data[t],r=null===n?s({value:n,dataIndex:t}):o(n);return null===r?s({value:n,dataIndex:t}):r}:i&&a?t=>{if(void 0===t)return e.color;const n=a[t],r=null===n?s({value:n,dataIndex:t}):i(n);return null===r?s({value:n,dataIndex:t}):r}:t=>{if(void 0===t)return e.color;const n=e.data[t];return s({value:n,dataIndex:t})}};function xl(e,t){return Object.keys(e).filter(e=>t.has(e)).flatMap(t=>{const n=e[t];return n.seriesOrder.filter(e=>n.series[e].data.length>0&&n.series[e].data.some(e=>null!=e)).map(e=>({type:t,seriesId:e}))})}function Il(e,t,n,r){const i=xl(e,t);if(0===i.length)return null;const o=void 0!==n&&void 0!==r?i.findIndex(e=>e.type===n&&e.seriesId===r):-1;return o<=0?i[i.length-1]:i[(o-1+i.length)%i.length]}function wl(e,t){return Object.keys(e).filter(e=>t.has(e)).flatMap(t=>{const n=e[t];return n.seriesOrder.filter(e=>n.series[e].data.length>0&&n.series[e].data.some(e=>null!=e)).map(e=>n.series[e].data.length)}).reduce((e,t)=>Math.max(e,t),0)}function kl(e,t,n,r){const i=xl(e,t);if(0===i.length)return null;const o=void 0!==n&&void 0!==r?i.findIndex(e=>e.type===n&&e.seriesId===r):-1;return i[(o+1)%i.length]}function Sl(e,t,n){if("sankey"===t)return!1;const r=e[t]?.series[n]?.data;return null!=r&&r.length>0}function Ml(e){return function(t,n){const r=ft(n);let i=t?.seriesId,o=t?.type;if(!o||null==i||!Sl(r,o,i)){const t=kl(r,e,o,i);if(null===t)return null;o=t.type,i=t.seriesId}const a=wl(r,e);return{type:o,seriesId:i,dataIndex:Math.min(a-1,null==t?.dataIndex?0:t.dataIndex+1)}}}function Cl(e){return function(t,n){const r=ft(n);let i=t?.seriesId,o=t?.type;if(!o||null==i||!Sl(r,o,i)){const t=Il(r,e,o,i);if(null===t)return null;o=t.type,i=t.seriesId}const a=wl(r,e);return{type:o,seriesId:i,dataIndex:Math.max(0,null==t?.dataIndex?a-1:t.dataIndex-1)}}}function Pl(e){return function(t,n){const r=ft(n);let i=t?.seriesId,o=t?.type;const a=kl(r,e,o,i);return null===a?null:(o=a.type,i=a.seriesId,{type:o,seriesId:i,dataIndex:null==t?.dataIndex?0:t.dataIndex})}}function El(e){return function(t,n){const r=ft(n);let i=t?.seriesId,o=t?.type;const a=Il(r,e,o,i);if(null===a)return null;o=a.type,i=a.seriesId;const s=r[o].series[i].data;return{type:o,seriesId:i,dataIndex:null==t?.dataIndex?s.length-1:t.dataIndex}}}const Tl=new Set(["bar","line","scatter"]);function Al(e,t,n){if(0===n)return{barWidth:e/t,offset:0};const r=e/(t+(t-1)*n);return{barWidth:r,offset:n*r}}function Ol(e){const{verticalLayout:t,xAxisConfig:n,yAxisConfig:r,series:i,dataIndex:o,numberOfGroups:a,groupIndex:s}=e,l=t?n:r,c=(t?r.reverse:n.reverse)??!1,{barWidth:u,offset:d}=Al(l.scale.bandwidth(),a,l.barGapRatio),p=s*(u+d),h=n.scale,m=r.scale,f=l.data[o],g=i.data[o];if(null==g)return null;const y=i.stackedData[o].map(e=>t?m(e):h(e)),v=Math.round(Math.min(...y)),b=Math.round(Math.max(...y)),x=0===g?0:Math.max(i.minBarSize,b-v),I=function(e,t,n){const r=e&&t>0||!e&&t<0;return n?!r:r}(t,g,c)?b-x:v;return{x:t?h(f)+p:I,y:t?I:m(f)+p,height:t?x:u,width:t?u:x}}const jl=e=>{return`${r=e.type,`Type(${r})`}${n=e.seriesId,`Series(${n})`}${t=e.dataIndex,void 0===t?"":`Index(${t})`}`;var t,n,r},Ll={seriesProcessor:(e,t)=>{const{seriesOrder:n,series:r}=e,i=fl(e),o=t??[];n.forEach(e=>{const n=r[e].data;if(void 0!==n)n.forEach((t,n)=>{o.length<=n?o.push({[e]:t}):o[n][e]=t});else if(void 0===t)throw new Error([`MUI X Charts: bar series with id='${e}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join("\n"))});const a={};return i.forEach(e=>{const{ids:n,stackingOffset:i,stackingOrder:s}=e,c=ll().keys(n.map(e=>{const t=r[e].dataKey;return void 0===r[e].data&&void 0!==t?t:e})).value((e,t)=>e[t]??0).order(s).offset(i)(o);n.forEach((e,n)=>{const i=r[e].dataKey;a[e]=l({layout:"vertical",labelMarkType:"square",minBarSize:0,valueFormatter:r[e].valueFormatter??gl},r[e],{data:i?t.map(e=>{const t=e[i];return"number"==typeof t?t:null}):r[e].data,stackedData:c[n].map(([e,t])=>[e,t])})})}),{seriesOrder:n,stackingGroups:i,series:a}},colorProcessor:bl,legendGetter:e=>{const{seriesOrder:t,series:n}=e;return t.reduce((e,t)=>{const r=yl(n[t].label,"legend");return void 0===r||e.push({type:"bar",markType:n[t].labelMarkType,id:t,seriesId:t,color:n[t].color,label:r}),e},[])},tooltipGetter:e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||void 0===r.dataIndex)return null;const i=yl(t.label,"tooltip"),o=t.data[r.dataIndex];if(null==o)return null;const a=t.valueFormatter(o,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:i,value:o,formattedValue:a,markType:t.labelMarkType}},tooltipItemPositionGetter:e=>{const{series:t,identifier:n,axesConfig:r,placement:i}=e;if(!n||void 0===n.dataIndex)return null;const o=t.bar?.series[n.seriesId];if(null==t.bar||null==o)return null;if(void 0===r.x||void 0===r.y)return null;const a=Ol({verticalLayout:"vertical"===o.layout,xAxisConfig:r.x,yAxisConfig:r.y,series:o,dataIndex:n.dataIndex,numberOfGroups:t.bar.stackingGroups.length,groupIndex:t.bar.stackingGroups.findIndex(e=>e.ids.includes(o.id))});if(null==a)return null;const{x:s,y:l,width:c,height:u}=a;switch(i){case"right":return{x:s+c,y:l+u/2};case"bottom":return{x:s+c/2,y:l+u};case"left":return{x:s,y:l+u/2};default:return{x:s+c/2,y:l}}},axisTooltipGetter:e=>Object.values(e).map(e=>"horizontal"===e.layout?{direction:"y",axisId:e.yAxisId}:{direction:"x",axisId:e.xAxisId}),xExtremumGetter:e=>Object.keys(e.series).some(t=>"horizontal"===e.series[t].layout)?tl("x")(e):el(e),yExtremumGetter:e=>Object.keys(e.series).some(t=>"horizontal"===e.series[t].layout)?el(e):tl("y")(e),getSeriesWithDefaultValues:function(e,t,n){return l({},e,{id:e.id??`auto-generated-id-${t}`,color:e.color??n[t%n.length]})},keyboardFocusHandler:e=>{switch(e.key){case"ArrowRight":return Ml(Tl);case"ArrowLeft":return Cl(Tl);case"ArrowDown":return El(Tl);case"ArrowUp":return Pl(Tl);default:return null}},identifierSerializer:jl},Rl=new Set(["bar","line","scatter"]),Dl={seriesProcessor:({series:e,seriesOrder:t},n)=>({series:Object.fromEntries(Object.entries(e).map(([e,t])=>{const r=t?.datasetKeys,i=["x","y"].filter(e=>"string"!=typeof r?.[e]);if(t?.datasetKeys&&i.length>0)throw new Error([`MUI X Charts: scatter series with id='${e}' has incomplete datasetKeys.`,`Properties ${i.map(e=>`"${e}"`).join(", ")} are missing.`].join("\n"));const o=r?n?.map(e=>({x:e[r.x]??null,y:e[r.y]??null,z:r.z&&e[r.z],id:r.id&&e[r.id]}))??[]:t.data??[];return[e,l({labelMarkType:"circle",markerSize:4},t,{preview:l({markerSize:1},t?.preview),data:o,valueFormatter:t.valueFormatter??(e=>e&&`(${e.x}, ${e.y})`)})]})),seriesOrder:t}),colorProcessor:(e,t,n,r)=>{const i=r?.colorScale,o=n?.colorScale,a=t?.colorScale,s=vl(e);return i?t=>{if(void 0===t)return e.color;if(void 0!==r?.data?.[t]){const e=i(r?.data?.[t]);if(null!==e)return e}const n=e.data[t],o=null===n?s({value:n,dataIndex:t}):i(n.z);return null===o?s({value:n,dataIndex:t}):o}:o?t=>{if(void 0===t)return e.color;const n=e.data[t],r=null===n?s({value:n,dataIndex:t}):o(n.y);return null===r?s({value:n,dataIndex:t}):r}:a?t=>{if(void 0===t)return e.color;const n=e.data[t],r=null===n?s({value:n,dataIndex:t}):a(n.x);return null===r?s({value:n,dataIndex:t}):r}:t=>{if(void 0===t)return e.color;const n=e.data[t];return s({value:n,dataIndex:t})}},legendGetter:e=>{const{seriesOrder:t,series:n}=e;return t.reduce((e,t)=>{const r=yl(n[t].label,"legend");return void 0===r||e.push({type:"scatter",markType:n[t].labelMarkType,id:t,seriesId:t,color:n[t].color,label:r}),e},[])},tooltipGetter:e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||void 0===r.dataIndex)return null;const i=yl(t.label,"tooltip"),o=t.data[r.dataIndex],a=t.valueFormatter(o,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:i,value:o,formattedValue:a,markType:t.labelMarkType}},tooltipItemPositionGetter:e=>{const{series:t,identifier:n,axesConfig:r}=e;if(!n||void 0===n.dataIndex)return null;const i=t.scatter?.series[n.seriesId];if(null==i)return null;if(void 0===r.x||void 0===r.y)return null;const o=i.data?.[n.dataIndex].x,a=i.data?.[n.dataIndex].y;return null==o||null==a?null:{x:r.x.scale(o),y:r.y.scale(a)}},xExtremumGetter:e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e;let o=1/0,a=-1/0;for(const e in t){if(!Object.hasOwn(t,e))continue;const s=t[e].xAxisId;if(!(s===n.id||void 0===s&&r))continue;const l=i?.({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[e].xAxisId,seriesYAxisId:t[e].yAxisId}),c=t[e].data??[];for(let e=0;ea&&(a=t.x))}}return[o,a]},yExtremumGetter:e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e;let o=1/0,a=-1/0;for(const e in t){if(!Object.hasOwn(t,e))continue;const s=t[e].yAxisId;if(!(s===n.id||void 0===s&&r))continue;const l=i?.({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[e].xAxisId,seriesYAxisId:t[e].yAxisId}),c=t[e].data??[];for(let e=0;ea&&(a=t.y))}}return[o,a]},getSeriesWithDefaultValues:(e,t,n)=>l({},e,{id:e.id??`auto-generated-id-${t}`,color:e.color??n[t%n.length]}),keyboardFocusHandler:e=>{switch(e.key){case"ArrowRight":return Ml(Rl);case"ArrowLeft":return Cl(Rl);case"ArrowDown":return El(Rl);case"ArrowUp":return Pl(Rl);default:return null}},identifierSerializer:jl},$l=(e,t,n)=>{const r=n?.colorScale,i=t?.colorScale,o=vl(e);return r?t=>{if(void 0===t)return e.color;const n=e.data[t],i=null===n?o({value:n,dataIndex:t}):r(n);return null===i?o({value:n,dataIndex:t}):i}:i?n=>{if(void 0===n)return e.color;const r=t.data?.[n],a=null===r?o({value:r,dataIndex:n}):i(r);return null===a?o({value:r,dataIndex:n}):a}:t=>{if(void 0===t)return e.color;const n=e.data[t];return o({value:n,dataIndex:t})}},zl=new Set(["bar","line","scatter"]),Nl={colorProcessor:$l,seriesProcessor:(e,t)=>{const{seriesOrder:n,series:r}=e,i=fl(l({},e,{defaultStrategy:{stackOffset:"none"}})),o=t??[];n.forEach(e=>{const t=r[e].data;void 0!==t&&t.forEach((t,n)=>{o.length<=n?o.push({[e]:t}):o[n][e]=t})});const a={};return i.forEach(e=>{const{ids:n,stackingOrder:i,stackingOffset:s}=e,c=ll().keys(n.map(e=>{const t=r[e].dataKey;return void 0===r[e].data&&void 0!==t?t:e})).value((e,t)=>e[t]??0).order(i).offset(s)(o);n.forEach((e,n)=>{const i=r[e].dataKey;a[e]=l({labelMarkType:"line"},r[e],{data:i?t.map(e=>{const t=e[i];return"number"==typeof t?t:null}):r[e].data,stackedData:c[n].map(([e,t])=>[e,t]),valueFormatter:r[e]?.valueFormatter??(e=>null==e?"":e.toLocaleString())})})}),{seriesOrder:n,stackingGroups:i,series:a}},legendGetter:e=>{const{seriesOrder:t,series:n}=e;return t.reduce((e,t)=>{const r=yl(n[t].label,"legend");return void 0===r||e.push({type:"line",markType:n[t].labelMarkType,id:t,seriesId:t,color:n[t].color,label:r}),e},[])},tooltipGetter:e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||void 0===r.dataIndex)return null;const i=yl(t.label,"tooltip"),o=t.data[r.dataIndex],a=t.valueFormatter(o,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:i,value:o,formattedValue:a,markType:t.labelMarkType}},tooltipItemPositionGetter:e=>{const{series:t,identifier:n,axesConfig:r}=e;if(!n||void 0===n.dataIndex)return null;const i=t.line?.series[n.seriesId];if(null==i)return null;if(void 0===r.x||void 0===r.y)return null;const o=r.x.data?.[n.dataIndex],a=i.data[n.dataIndex];return null==o||null==a?null:{x:r.x.scale(o),y:r.y.scale(a)}},axisTooltipGetter:e=>Object.values(e).map(e=>({direction:"x",axisId:e.xAxisId})),xExtremumGetter:e=>{const{axis:t}=e;return Js(t.data??[])},yExtremumGetter:e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e;return Object.keys(t).filter(e=>{const i=t[e].yAxisId;return i===n.id||r&&void 0===i}).reduce((e,o)=>{const{area:a,stackedData:s,data:l}=t[o],c=void 0!==a,u=i?.({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[o].xAxisId,seriesYAxisId:t[o].yAxisId}),d=function(e,t,n,r){return n.reduce((n,i,o)=>{if(null===t[o])return n;const[a,s]=e(i);return!r||r({y:a,x:null},o)&&r({y:s,x:null},o)?[Math.min(a,s,n[0]),Math.max(a,s,n[1])]:n},[1/0,-1/0])}(c&&"log"!==n.scaleType&&"string"!=typeof t[o].baseline?e=>e:e=>[e[1],e[1]],l,s,u),[p,h]=d;return[Math.min(p,e[0]),Math.max(h,e[1])]},[1/0,-1/0])},getSeriesWithDefaultValues:(e,t,n)=>l({},e,{id:e.id??`auto-generated-id-${t}`,color:e.color??n[t%n.length]}),keyboardFocusHandler:e=>{switch(e.key){case"ArrowRight":return Ml(zl);case"ArrowLeft":return Cl(zl);case"ArrowDown":return El(zl);case"ArrowUp":return Pl(zl);default:return null}},identifierSerializer:jl};function _l(e,t){return te?1:t>=e?0:NaN}function Fl(e){return e}const Hl=Math.abs,Bl=Math.atan2,Vl=Math.cos,Ul=Math.max,Yl=Math.min,Wl=Math.sin,Gl=Math.sqrt,Kl=1e-12,ql=Math.PI,Xl=ql/2,Zl=2*ql;function Jl(e){return e>=1?Xl:e<=-1?-Xl:Math.asin(e)}const Ql=(e,t)=>void 0===e?t:Math.PI*e/180;function ec(e,t){if("number"==typeof e)return e;if("100%"===e)return t;if(e.endsWith("%")){const n=Number.parseFloat(e.slice(0,e.length-1));if(!Number.isNaN(n))return n*t/100}if(e.endsWith("px")){const t=Number.parseFloat(e.slice(0,e.length-2));if(!Number.isNaN(t))return t}throw new Error(`MUI X Charts: Received an unknown value "${e}". It should be a number, or a string with a percentage value.`)}function tc(e,t){const{height:n,width:r}=t,{cx:i,cy:o}=e,a=Math.min(r,n)/2;return{cx:ec(i??"50%",r),cy:ec(o??"50%",n),availableRadius:a}}const nc=new Set(["pie"]),rc={bar:Ll,scatter:Dl,line:Nl,pie:{colorProcessor:e=>t=>e.data[t].color,seriesProcessor:e=>{const{seriesOrder:t,series:n}=e,r={};return t.forEach(e=>{const t=function(){var e=Fl,t=_l,n=null,r=rl(0),i=rl(Zl),o=rl(0);function a(a){var s,l,c,u,d,p=(a=nl(a)).length,h=0,m=new Array(p),f=new Array(p),g=+r.apply(this,arguments),y=Math.min(Zl,Math.max(-Zl,i.apply(this,arguments)-g)),v=Math.min(Math.abs(y)/p,o.apply(this,arguments)),b=v*(y<0?-1:1);for(s=0;s0&&(h+=d);for(null!=t?m.sort(function(e,n){return t(f[e],f[n])}):null!=n&&m.sort(function(e,t){return n(a[e],a[t])}),s=0,c=h?(y-p*b)/h:0;s0?d*c:0)+b,f[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:v};return f}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:rl(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:rl(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:rl(+e),a):i},a.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:rl(+e),a):o},a}().startAngle(Ql(n[e].startAngle??0)).endAngle(Ql(n[e].endAngle??360)).padAngle(Ql(n[e].paddingAngle??0)).sortValues(((e="none")=>{if("function"==typeof e)return e;switch(e){case"none":default:return null;case"desc":return(e,t)=>t-e;case"asc":return(e,t)=>e-t}})(n[e].sortingValues??"none"))(n[e].data.map(e=>e.value));r[e]=l({labelMarkType:"circle",valueFormatter:e=>e.value.toLocaleString()},n[e],{data:n[e].data.map((n,r)=>l({},n,{id:n.id??`auto-generated-pie-id-${e}-${r}`},t[r])).map((t,r)=>l({labelMarkType:"circle"},t,{formattedValue:n[e].valueFormatter?.(l({},t,{label:yl(t.label,"arc")}),{dataIndex:r})??t.value.toLocaleString()}))})}),{seriesOrder:t,series:r}},seriesLayout:(e,t)=>{const n={};for(const r of e.seriesOrder){const{innerRadius:i,outerRadius:o,arcLabelRadius:a,cx:s,cy:l}=e.series[r],{cx:c,cy:u,availableRadius:d}=tc({cx:s,cy:l},{width:t.width,height:t.height}),p=ec(o??d,d),h=ec(i??0,d),m=void 0===a?(h+p)/2:ec(a,d);n[r]={radius:{available:d,inner:h,outer:p,label:m},center:{x:t.left+c,y:t.top+u}}}return n},legendGetter:e=>{const{seriesOrder:t,series:n}=e;return t.reduce((e,t)=>(n[t].data.forEach((r,i)=>{const o=yl(r.label,"legend");if(void 0===o)return;const a=r.id??i;e.push({type:"pie",markType:r.labelMarkType??n[t].labelMarkType,seriesId:t,id:a,itemId:a,dataIndex:i,color:r.color,label:o})}),e),[])},tooltipGetter:e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||void 0===r.dataIndex)return null;const i=t.data[r.dataIndex];if(null==i)return null;const o=yl(i.label,"tooltip"),a=l({},i,{label:o}),s=t.valueFormatter(a,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:o,value:a,formattedValue:s,markType:i.labelMarkType??t.labelMarkType}},tooltipItemPositionGetter:e=>{const{series:t,identifier:n,placement:r,seriesLayout:i}=e;if(!n||void 0===n.dataIndex)return null;const o=t.pie?.series[n.seriesId],a=i.pie?.[n.seriesId];if(null==o||null==a)return null;const{center:s,radius:l}=a,{data:c}=o,u=c[n.dataIndex];if(!u)return null;const d=[[l.inner,u.startAngle],[l.inner,u.endAngle],[l.outer,u.startAngle],[l.outer,u.endAngle]].map(([e,t])=>({x:s.x+e*Math.sin(t),y:s.y-e*Math.cos(t)})),[p,h]=Js(d.map(e=>e.x)),[m,f]=Js(d.map(e=>e.y));switch(r){case"bottom":return{x:(h+p)/2,y:f};case"left":return{x:p,y:(f+m)/2};case"right":return{x:h,y:(f+m)/2};default:return{x:(h+p)/2,y:m}}},getSeriesWithDefaultValues:(e,t,n)=>l({},e,{id:e.id??`auto-generated-id-${t}`,data:e.data.map((e,t)=>l({},e,{color:e.color??n[t%n.length]}))}),keyboardFocusHandler:e=>{switch(e.key){case"ArrowRight":return Ml(nc);case"ArrowLeft":return Cl(nc);case"ArrowDown":return El(nc);case"ArrowUp":return Pl(nc);default:return null}},identifierSerializer:jl}},ic=[Xs,Ys,Ws,Bs,Zs];function oc(t){const{children:n,plugins:r=ic,pluginParams:i={},seriesConfig:o=rc}=t,{contextValue:a}=function(t,n,r){const i=z(),o=e.useMemo(()=>[...et,...t],[t]),a=rt({plugins:o,props:n});a.id=a.id??i;const s=e.useRef({}).current,l=function(t){const n=e.useRef({});return t?function(e){return null==e.current&&(e.current={}),e}(t):n}(n.apiRef),c=e.useRef(null),u=e.useRef(null),d=e.useRef(null);if(null==d.current){it+=1;const e={cacheKey:{id:it}};o.forEach(t=>{t.getInitialState&&Object.assign(e,t.getInitialState(a,e,r))}),d.current=new B(e)}return o.forEach(e=>{const t=e({instance:s,params:a,plugins:o,store:d.current,svgRef:u,chartRootRef:c,seriesConfig:r});t.publicAPI&&Object.assign(l.current,t.publicAPI),t.instance&&Object.assign(s,t.instance)}),{contextValue:e.useMemo(()=>({store:d.current,publicAPI:l.current,instance:s,svgRef:u,chartRootRef:c}),[s,l])}}(r,i,o);return(0,O.jsx)(ot.Provider,{value:a,children:n})}const ac=e.createContext(null);function sc(){const t=e.useContext(ac);if(null==t)throw new Error(["MUI X Charts: Could not find the Charts Slots context.","It looks like you rendered your component outside of a ChartDataProvider.","This can also happen if you are bundling multiple versions of the library."].join("\n"));return t}function lc(t){const{slots:n,slotProps:r={},defaultSlots:i,children:o}=t,a=e.useMemo(()=>({slots:l({},i,n),slotProps:r}),[i,n,r]);return(0,O.jsx)(ac.Provider,{value:a,children:o})}function cc(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if("components"===i||"slots"===i)n[i]={...e[i],...n[i]};else if("componentsProps"===i||"slotProps"===i){const r=e[i],o=t[i];if(o)if(r){n[i]={...o};for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const t=e;n[i][t]=cc(r[t],o[t])}}else n[i]=o;else n[i]=r||{}}else void 0===n[i]&&(n[i]=e[i])}return n}function uc(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?cc(t.components[n].defaultProps,r):r}var dc=a(4405);function pc(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function hc(t){if(e.isValidElement(t)||(0,dc.Hy)(t)||!pc(t))return t;const n={};return Object.keys(t).forEach(e=>{n[e]=hc(t[e])}),n}function mc(t,n,r={clone:!0}){const i=r.clone?{...t}:t;return pc(t)&&pc(n)&&Object.keys(n).forEach(o=>{e.isValidElement(n[o])||(0,dc.Hy)(n[o])?i[o]=n[o]:pc(n[o])&&Object.prototype.hasOwnProperty.call(t,o)&&pc(t[o])?i[o]=mc(t[o],n[o],r):r.clone?i[o]=pc(n[o])?hc(n[o]):n[o]:i[o]=n[o]}),i}function fc(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,o=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),a=Object.keys(o);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,i){const o=a.indexOf(i);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==o&&"number"==typeof t[a[o]]?t[a[o]]:i)-r/100}${n})`}return{keys:a,values:o,up:s,down:l,between:c,only:function(e){return a.indexOf(e)+1e.startsWith("@container")).sort((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e},{...t}):t}const yc={borderRadius:4},vc={xs:0,sm:600,md:900,lg:1200,xl:1536},bc={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${vc[e]}px)`},xc={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:vc[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Ic(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||bc;return t.reduce((r,i,o)=>(r[e.up(e.keys[o])]=n(t[o]),r),{})}if("object"==typeof t){const e=r.breakpoints||bc;return Object.keys(t).reduce((i,o)=>{if(function(e,t){return"@"===t||t.startsWith("@")&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}(e.keys,o)){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,i]=n,o=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(o)}(r.containerQueries?r:xc,o);e&&(i[e]=n(t[o],o))}else if(Object.keys(e.values||vc).includes(o))i[e.up(o)]=n(t[o],o);else{const e=o;i[e]=t[e]}return i},{})}return n(t)}function wc(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function kc(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${n} for the full message.`}function Sc(e){if("string"!=typeof e)throw new Error(kc(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Mc(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function Cc(e,t,n,r=n){let i;return i="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:Mc(e,n)||r,t&&(i=t(i,r,e)),i}const Pc=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=e=>{if(null==e[t])return null;const o=e[t],a=Mc(e.theme,r)||{};return Ic(e,o,e=>{let r=Cc(a,i,e);return e===r&&"string"==typeof e&&(r=Cc(a,i,`${t}${"default"===e?"":Sc(e)}`,e)),!1===n?r:{[n]:r}})};return o.propTypes={},o.filterProps=[t],o},Ec=function(e,t){return t?mc(e,t,{clone:!1}):e},Tc={m:"margin",p:"padding"},Ac={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Oc={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},jc=function(){const e={};return t=>(void 0===e[t]&&(e[t]=(e=>{if(e.length>2){if(!Oc[e])return[e];e=Oc[e]}const[t,n]=e.split(""),r=Tc[t],i=Ac[n]||"";return Array.isArray(i)?i.map(e=>r+e):[r+i]})(t)),e[t])}(),Lc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Rc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Dc=[...Lc,...Rc];function $c(e,t,n,r){const i=Mc(e,t,!0)??n;return"number"==typeof i||"string"==typeof i?e=>"string"==typeof e?e:"string"==typeof i?`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if("string"==typeof e)return e;const t=Math.abs(e),n=i[t];return e>=0?n:"number"==typeof n?-n:`-${n}`}:"function"==typeof i?i:()=>{}}function zc(e){return $c(e,"spacing",8)}function Nc(e,t){return"string"==typeof t||null==t?t:e(t)}function _c(e,t){const n=zc(e.theme);return Object.keys(e).map(r=>function(e,t,n,r){if(!t.includes(n))return null;const i=function(e,t){return n=>e.reduce((e,r)=>(e[r]=Nc(t,n),e),{})}(jc(n),r);return Ic(e,e[n],i)}(e,t,r,n)).reduce(Ec,{})}function Fc(e){return _c(e,Lc)}function Hc(e){return _c(e,Rc)}function Bc(e){return _c(e,Dc)}function Vc(e=8,t=zc({spacing:e})){if(e.mui)return e;const n=(...e)=>(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?`${n}px`:n}).join(" ");return n.mui=!0,n}Fc.propTypes={},Fc.filterProps=Lc,Hc.propTypes={},Hc.filterProps=Rc,Bc.propTypes={},Bc.filterProps=Dc;const Uc=function(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?Ec(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n};function Yc(e){return"number"!=typeof e?e:`${e}px solid`}function Wc(e,t){return Pc({prop:e,themeKey:"borders",transform:t})}const Gc=Wc("border",Yc),Kc=Wc("borderTop",Yc),qc=Wc("borderRight",Yc),Xc=Wc("borderBottom",Yc),Zc=Wc("borderLeft",Yc),Jc=Wc("borderColor"),Qc=Wc("borderTopColor"),eu=Wc("borderRightColor"),tu=Wc("borderBottomColor"),nu=Wc("borderLeftColor"),ru=Wc("outline",Yc),iu=Wc("outlineColor"),ou=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=$c(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:Nc(t,e)});return Ic(e,e.borderRadius,n)}return null};ou.propTypes={},ou.filterProps=["borderRadius"],Uc(Gc,Kc,qc,Xc,Zc,Jc,Qc,eu,tu,nu,ou,ru,iu);const au=e=>{if(void 0!==e.gap&&null!==e.gap){const t=$c(e.theme,"spacing",8),n=e=>({gap:Nc(t,e)});return Ic(e,e.gap,n)}return null};au.propTypes={},au.filterProps=["gap"];const su=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=$c(e.theme,"spacing",8),n=e=>({columnGap:Nc(t,e)});return Ic(e,e.columnGap,n)}return null};su.propTypes={},su.filterProps=["columnGap"];const lu=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=$c(e.theme,"spacing",8),n=e=>({rowGap:Nc(t,e)});return Ic(e,e.rowGap,n)}return null};function cu(e,t){return"grey"===t?t:e}function uu(e){return e<=1&&0!==e?100*e+"%":e}lu.propTypes={},lu.filterProps=["rowGap"],Uc(au,su,lu,Pc({prop:"gridColumn"}),Pc({prop:"gridRow"}),Pc({prop:"gridAutoFlow"}),Pc({prop:"gridAutoColumns"}),Pc({prop:"gridAutoRows"}),Pc({prop:"gridTemplateColumns"}),Pc({prop:"gridTemplateRows"}),Pc({prop:"gridTemplateAreas"}),Pc({prop:"gridArea"})),Uc(Pc({prop:"color",themeKey:"palette",transform:cu}),Pc({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:cu}),Pc({prop:"backgroundColor",themeKey:"palette",transform:cu}));const du=Pc({prop:"width",transform:uu}),pu=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||vc[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:uu(t)}};return Ic(e,e.maxWidth,t)}return null};pu.filterProps=["maxWidth"];const hu=Pc({prop:"minWidth",transform:uu}),mu=Pc({prop:"height",transform:uu}),fu=Pc({prop:"maxHeight",transform:uu}),gu=Pc({prop:"minHeight",transform:uu}),yu=(Pc({prop:"size",cssProperty:"width",transform:uu}),Pc({prop:"size",cssProperty:"height",transform:uu}),Uc(du,pu,hu,mu,fu,gu,Pc({prop:"boxSizing"})),{border:{themeKey:"borders",transform:Yc},borderTop:{themeKey:"borders",transform:Yc},borderRight:{themeKey:"borders",transform:Yc},borderBottom:{themeKey:"borders",transform:Yc},borderLeft:{themeKey:"borders",transform:Yc},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Yc},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ou},color:{themeKey:"palette",transform:cu},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:cu},backgroundColor:{themeKey:"palette",transform:cu},p:{style:Hc},pt:{style:Hc},pr:{style:Hc},pb:{style:Hc},pl:{style:Hc},px:{style:Hc},py:{style:Hc},padding:{style:Hc},paddingTop:{style:Hc},paddingRight:{style:Hc},paddingBottom:{style:Hc},paddingLeft:{style:Hc},paddingX:{style:Hc},paddingY:{style:Hc},paddingInline:{style:Hc},paddingInlineStart:{style:Hc},paddingInlineEnd:{style:Hc},paddingBlock:{style:Hc},paddingBlockStart:{style:Hc},paddingBlockEnd:{style:Hc},m:{style:Fc},mt:{style:Fc},mr:{style:Fc},mb:{style:Fc},ml:{style:Fc},mx:{style:Fc},my:{style:Fc},margin:{style:Fc},marginTop:{style:Fc},marginRight:{style:Fc},marginBottom:{style:Fc},marginLeft:{style:Fc},marginX:{style:Fc},marginY:{style:Fc},marginInline:{style:Fc},marginInlineStart:{style:Fc},marginInlineEnd:{style:Fc},marginBlock:{style:Fc},marginBlockStart:{style:Fc},marginBlockEnd:{style:Fc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:au},rowGap:{style:lu},columnGap:{style:su},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:uu},maxWidth:{style:pu},minWidth:{transform:uu},height:{transform:uu},maxHeight:{transform:uu},minHeight:{transform:uu},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}}),vu=yu,bu=function(){function e(e,t,n,r){const i={[e]:t,theme:n},o=r[e];if(!o)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:c}=o;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const u=Mc(n,s)||{};return c?c(i):Ic(i,t,t=>{let n=Cc(u,l,t);return t===n&&"string"==typeof t&&(n=Cc(u,l,`${e}${"default"===t?"":Sc(t)}`,t)),!1===a?n:{[a]:n}})}return function t(n){const{sx:r,theme:i={},nested:o}=n||{};if(!r)return null;const a=i.unstable_sxConfig??vu;function s(n){let r=n;if("function"==typeof n)r=n(i);else if("object"!=typeof n)return n;if(!r)return null;const s=function(e={}){const t=e.keys?.reduce((t,n)=>(t[e.up(n)]={},t),{});return t||{}}(i.breakpoints),l=Object.keys(s);let c=s;return Object.keys(r).forEach(n=>{const o=function(e,t){return"function"==typeof e?e(t):e}(r[n],i);if(null!=o)if("object"==typeof o)if(a[n])c=Ec(c,e(n,o,i,a));else{const e=Ic({theme:i},o,e=>({[n]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}(e,o)?c=Ec(c,e):c[n]=t({sx:o,theme:i,nested:!0})}else c=Ec(c,e(n,o,i,a))}),!o&&i.modularCssLayers?{"@layer sx":gc(i,wc(l,c))}:gc(i,wc(l,c))}return Array.isArray(r)?r.map(s):s(r)}}();bu.filterProps=["sx"];const xu=bu;function Iu(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!=typeof n.getColorSchemeSelector)return{};let r=n.getColorSchemeSelector(e);return"&"===r?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}const wu=function(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={},...a}=e;let s=mc({breakpoints:fc(n),direction:"ltr",components:{},palette:{mode:"light",...r},spacing:Vc(i),shape:{...yc,...o}},a);return s=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const i=t(e.breakpoints.not(...n),r);return i.includes("not all and")?i.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):i}}const r={},i=e=>(n(r,e),r);return n(i),{...e,containerQueries:i}}(s),s.applyStyles=Iu,s=t.reduce((e,t)=>mc(e,t),s),s.unstable_sxConfig={...vu,...a?.unstable_sxConfig},s.unstable_sx=function(e){return xu({sx:e,theme:this})},s};var ku=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?Au(Fu,--Nu):0,$u--,10===_u&&($u=1,Du--),_u}function Uu(){return _u=Nu2||Ku(_u)>3?"":" "}function Qu(e,t){for(;--t&&Uu()&&!(_u<48||_u>102||_u>57&&_u<65||_u>70&&_u<97););return Gu(e,Wu()+(t<6&&32==Yu()&&32==Uu()))}function ed(e){for(;Uu();)switch(_u){case e:return Nu;case 34:case 39:34!==e&&39!==e&&ed(_u);break;case 40:41===e&&ed(e);break;case 92:Uu()}return Nu}function td(e,t){for(;Uu()&&e+_u!==57&&(e+_u!==84||47!==Yu()););return"/*"+Gu(t,Nu-1)+"*"+Mu(47===e?e:Uu())}function nd(e){for(;!Ku(Yu());)Uu();return Gu(e,Nu)}var rd="-ms-",id="-moz-",od="-webkit-",ad="comm",sd="rule",ld="decl",cd="@keyframes";function ud(e,t){for(var n="",r=Lu(e),i=0;i0&&ju(k)-d&&Ru(h>32?gd(k+";",r,n,d-1):gd(Eu(k," ","")+";",r,n,d-2),l);break;case 59:k+=";";default:if(Ru(w=md(k,t,n,c,u,i,s,b,x=[],I=[],d),o),123===v)if(0===u)hd(k,t,w,w,x,o,d,s,I);else switch(99===p&&110===Au(k,3)?100:p){case 100:case 108:case 109:case 115:hd(e,w,w,r&&Ru(md(e,w,w,0,0,i,s,b,i,x=[],d),I),i,I,d,s,r?x:I);break;default:hd(k,w,w,w,[""],I,0,s,I)}}c=u=h=0,f=y=1,b=k="",d=a;break;case 58:d=1+ju(k),h=m;default:if(f<1)if(123==v)--f;else if(125==v&&0==f++&&125==Vu())continue;switch(k+=Mu(v),v*f){case 38:y=u>0?1:(k+="\f",-1);break;case 44:s[c++]=(ju(k)-1)*y,y=1;break;case 64:45===Yu()&&(k+=Zu(Uu())),p=Yu(),u=d=ju(b=k+=nd(Wu())),v++;break;case 45:45===m&&2==ju(k)&&(f=0)}}return o}function md(e,t,n,r,i,o,a,s,l,c,u){for(var d=i-1,p=0===i?o:[""],h=Lu(p),m=0,f=0,g=0;m0?p[y]+" "+v:Eu(v,/&\f/g,p[y])))&&(l[g++]=b);return Hu(e,t,n,0===i?sd:s,l,c,u)}function fd(e,t,n){return Hu(e,t,n,ad,Mu(_u),Ou(e,2,-2),0)}function gd(e,t,n,r){return Hu(e,t,n,ld,Ou(e,0,r),Ou(e,r+1,-1),r)}var yd=function(e,t,n){for(var r=0,i=0;r=i,i=Yu(),38===r&&12===i&&(t[n]=1),!Ku(i);)Uu();return Gu(e,Nu)},vd=new WeakMap,bd=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||vd.get(n))&&!r){vd.set(e,!0);for(var i=[],o=function(e,t){return Xu(function(e,t){var n=-1,r=44;do{switch(Ku(r)){case 0:38===r&&12===Yu()&&(t[n]=1),e[n]+=yd(Nu-1,t,n);break;case 2:e[n]+=Zu(r);break;case 4:if(44===r){e[++n]=58===Yu()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Mu(r)}}while(r=Uu());return e}(qu(e),t))}(t,i),a=n.props,s=0,l=0;s6)switch(Au(e,t+1)){case 109:if(45!==Au(e,t+4))break;case 102:return Eu(e,/(.+:)(.+)-([^]+)/,"$1"+od+"$2-$3$1"+id+(108==Au(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Tu(e,"stretch")?Id(Eu(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Au(e,t+1))break;case 6444:switch(Au(e,ju(e)-3-(~Tu(e,"!important")&&10))){case 107:return Eu(e,":",":"+od)+e;case 101:return Eu(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+od+(45===Au(e,14)?"inline-":"")+"box$3$1"+od+"$2$3$1"+rd+"$2box$3")+e}break;case 5936:switch(Au(e,t+11)){case 114:return od+e+rd+Eu(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return od+e+rd+Eu(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return od+e+rd+Eu(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return od+e+rd+e+e}return e}var wd=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ld:e.return=Id(e.value,e.length);break;case cd:return ud([Bu(e,{value:Eu(e.value,"@","@"+od)})],r);case sd:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return ud([Bu(e,{props:[Eu(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ud([Bu(e,{props:[Eu(t,/:(plac\w+)/,":"+od+"input-$1")]}),Bu(e,{props:[Eu(t,/:(plac\w+)/,":-moz-$1")]}),Bu(e,{props:[Eu(t,/:(plac\w+)/,rd+"input-$1")]})],r)}return""})}}],kd=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,i,o=e.stylisPlugins||wd,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:$d}}var _d=!!e.useInsertionEffect&&e.useInsertionEffect,Fd=_d||function(e){return e()},Hd=_d||e.useLayoutEffect,Bd=e.createContext("undefined"!=typeof HTMLElement?kd({key:"css"}):null),Vd=(Bd.Provider,function(t){return(0,e.forwardRef)(function(n,r){var i=(0,e.useContext)(Bd);return t(n,i,r)})}),Ud=e.createContext({}),Yd={}.hasOwnProperty,Wd="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Gd=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Md(t,n,r),Fd(function(){return Cd(t,n,r)}),null},Kd=Vd(function(t,n,r){var i=t.css;"string"==typeof i&&void 0!==n.registered[i]&&(i=n.registered[i]);var o=t[Wd],a=[i],s="";"string"==typeof t.className?s=Sd(n.registered,a,t.className):null!=t.className&&(s=t.className+" ");var l=Nd(a,void 0,e.useContext(Ud));s+=n.key+"-"+l.name;var c={};for(var u in t)Yd.call(t,u)&&"css"!==u&&u!==Wd&&(c[u]=t[u]);return c.className=s,r&&(c.ref=r),e.createElement(e.Fragment,null,e.createElement(Gd,{cache:n,serialized:l,isStringTag:"string"==typeof o}),e.createElement(o,c))});const qd=function(t=null){const n=e.useContext(Ud);return n&&(r=n,0!==Object.keys(r).length)?n:t;var r},Xd=wu(),Zd=function(e=Xd){return qd(e)},Jd=function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))};function Qd(e,t=0,n=1){return Jd(e,t,n)}function ep(e){if(e.type)return e;if("#"===e.charAt(0))return ep(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(kc(9,e));let r,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),r=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(kc(10,r))}else i=i.split(",");return i=i.map(e=>parseFloat(e)),{type:n,values:i,colorSpace:r}}const tp=(e,t)=>{try{return(e=>{const t=ep(e);return t.values.slice(0,3).map((e,n)=>t.type.includes("hsl")&&0!==n?`${e}%`:e).join(" ")})(e)}catch(t){return e}};function np(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function rp(e){e=ep(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=(e,t=(e+n/30)%12)=>i-o*Math.max(Math.min(t-3,9-t,1),-1);let s="rgb";const l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),np({type:s,values:l})}function ip(e){let t="hsl"===(e=ep(e)).type||"hsla"===e.type?ep(rp(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function op(e,t){return e=ep(e),t=Qd(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,np(e)}function ap(e,t,n){try{return op(e,t)}catch(t){return e}}function sp(e,t){if(e=ep(e),t=Qd(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return np(e)}function lp(e,t,n){try{return sp(e,t)}catch(t){return e}}function cp(e,t){if(e=ep(e),t=Qd(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return np(e)}function up(e,t,n){try{return cp(e,t)}catch(t){return e}}function dp(e,t,n){try{return function(e,t=.15){return ip(e)>.5?sp(e,t):cp(e,t)}(e,t)}catch(t){return e}}const pp={black:"#000",white:"#fff"},hp={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},mp="#f3e5f5",fp="#ce93d8",gp="#ba68c8",yp="#ab47bc",vp="#9c27b0",bp="#7b1fa2",xp="#e57373",Ip="#ef5350",wp="#f44336",kp="#d32f2f",Sp="#c62828",Mp="#ffb74d",Cp="#ffa726",Pp="#ff9800",Ep="#f57c00",Tp="#e65100",Ap="#e3f2fd",Op="#90caf9",jp="#42a5f5",Lp="#1976d2",Rp="#1565c0",Dp="#4fc3f7",$p="#29b6f6",zp="#03a9f4",Np="#0288d1",_p="#01579b",Fp="#81c784",Hp="#66bb6a",Bp="#4caf50",Vp="#388e3c",Up="#2e7d32",Yp="#1b5e20";function Wp(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:pp.white,default:pp.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Gp=Wp();function Kp(){return{text:{primary:pp.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:pp.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const qp=Kp();function Xp(e,t,n,r){const i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=cp(e.main,i):"dark"===t&&(e.dark=sp(e.main,o)))}function Zp(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...i}=e,o=e.primary||function(e="light"){return"dark"===e?{main:Op,light:Ap,dark:jp}:{main:Lp,light:jp,dark:Rp}}(t),a=e.secondary||function(e="light"){return"dark"===e?{main:fp,light:mp,dark:yp}:{main:vp,light:gp,dark:bp}}(t),s=e.error||function(e="light"){return"dark"===e?{main:wp,light:xp,dark:kp}:{main:kp,light:Ip,dark:Sp}}(t),l=e.info||function(e="light"){return"dark"===e?{main:$p,light:Dp,dark:Np}:{main:Np,light:zp,dark:_p}}(t),c=e.success||function(e="light"){return"dark"===e?{main:Hp,light:Fp,dark:Vp}:{main:Up,light:Bp,dark:Yp}}(t),u=e.warning||function(e="light"){return"dark"===e?{main:Cp,light:Mp,dark:Ep}:{main:"#ed6c02",light:Pp,dark:Tp}}(t);function d(e){const t=function(e,t){const n=ip(e),r=ip(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,qp.text.primary)>=n?qp.text.primary:Gp.text.primary;return t}const p=({color:e,name:t,mainShade:n=500,lightShade:i=300,darkShade:o=700})=>{if(!(e={...e}).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(kc(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(kc(12,t?` (${t})`:"",JSON.stringify(e.main)));return Xp(e,"light",i,r),Xp(e,"dark",o,r),e.contrastText||(e.contrastText=d(e.main)),e};let h;return"light"===t?h=Wp():"dark"===t&&(h=Kp()),mc({common:{...pp},mode:t,primary:p({color:o,name:"primary"}),secondary:p({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:s,name:"error"}),warning:p({color:u,name:"warning"}),info:p({color:l,name:"info"}),success:p({color:c,name:"success"}),grey:hp,contrastThreshold:n,getContrastText:d,augmentColor:p,tonalOffset:r,...h},i)}function Jp(e=""){function t(...n){if(!n.length)return"";const r=n[0];return"string"!=typeof r||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${e?`${e}-`:""}${r}${t(...n.slice(1))})`}return(n,...r)=>`var(--${e?`${e}-`:""}${n}${t(...r)})`}function Qp(e){const t={};return Object.entries(e).forEach(e=>{const[n,r]=e;"object"==typeof r&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:""}${r.fontVariant?`${r.fontVariant} `:""}${r.fontWeight?`${r.fontWeight} `:""}${r.fontStretch?`${r.fontStretch} `:""}${r.fontSize||""}${r.lineHeight?`/${r.lineHeight} `:""}${r.fontFamily||""}`)}),t}const eh=(e,t,n,r=[])=>{let i=e;t.forEach((e,o)=>{o===t.length-1?Array.isArray(i)?i[Number(e)]=n:i&&"object"==typeof i&&(i[e]=n):i&&"object"==typeof i&&(i[e]||(i[e]=r.includes(e)?[]:{}),i=i[e])})};function th(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};var s,l;return s=(e,t,s)=>{if(!("string"!=typeof t&&"number"!=typeof t||r&&r(e,t))){const r=`--${n?`${n}-`:""}${e.join("-")}`,l=((e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t)(e,t);Object.assign(i,{[r]:l}),eh(o,e,`var(${r})`,s),eh(a,e,`var(${r}, ${l})`,s)}},l=e=>"vars"===e[0],function e(t,n=[],r=[]){Object.entries(t).forEach(([t,i])=>{(!l||l&&!l([...n,t]))&&null!=i&&("object"==typeof i&&Object.keys(i).length>0?e(i,[...n,t],Array.isArray(i)?[...r,t]:r):s([...n,t],i,r))})}(e),{css:i,vars:o,varsWithDefaults:a}}function nh(e){return Math.round(1e5*e)/1e5}const rh={textTransform:"uppercase"},ih='"Roboto", "Helvetica", "Arial", sans-serif';function oh(e,t){const{fontFamily:n=ih,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}="function"==typeof t?t(e):t,p=r/14,h=u||(e=>e/l*p+"rem"),m=(e,t,r,i,o)=>({fontFamily:n,fontWeight:e,fontSize:h(t),lineHeight:r,...n===ih?{letterSpacing:`${nh(i/t)}em`}:{},...o,...c}),f={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(o,48,1.167,0),h4:m(o,34,1.235,.25),h5:m(o,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(o,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(o,16,1.5,.15),body2:m(o,14,1.43,.15),button:m(a,14,1.75,.4,rh),caption:m(o,12,1.66,.4),overline:m(o,12,2.66,1,rh),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return mc({htmlFontSize:l,pxToRem:h,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:s,...f},d,{clone:!1})}function ah(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const sh=["none",ah(0,2,1,-1,0,1,1,0,0,1,3,0),ah(0,3,1,-2,0,2,2,0,0,1,5,0),ah(0,3,3,-2,0,3,4,0,0,1,8,0),ah(0,2,4,-1,0,4,5,0,0,1,10,0),ah(0,3,5,-1,0,5,8,0,0,1,14,0),ah(0,3,5,-1,0,6,10,0,0,1,18,0),ah(0,4,5,-2,0,7,10,1,0,2,16,1),ah(0,5,5,-3,0,8,10,1,0,3,14,2),ah(0,5,6,-3,0,9,12,1,0,3,16,2),ah(0,6,6,-3,0,10,14,1,0,4,18,3),ah(0,6,7,-4,0,11,15,1,0,4,20,3),ah(0,7,8,-4,0,12,17,2,0,5,22,4),ah(0,7,8,-4,0,13,19,2,0,5,24,4),ah(0,7,9,-4,0,14,21,2,0,5,26,4),ah(0,8,9,-5,0,15,22,2,0,6,28,5),ah(0,8,10,-5,0,16,24,2,0,6,30,5),ah(0,8,11,-5,0,17,26,2,0,6,32,5),ah(0,9,11,-5,0,18,28,2,0,7,34,6),ah(0,9,12,-6,0,19,29,2,0,7,36,6),ah(0,10,13,-6,0,20,31,3,0,8,38,7),ah(0,10,13,-6,0,21,33,3,0,8,40,7),ah(0,10,14,-6,0,22,35,3,0,8,42,7),ah(0,11,14,-7,0,23,36,3,0,9,44,8),ah(0,11,15,-7,0,24,38,3,0,9,46,8)],lh={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},ch={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function uh(e){return`${Math.round(e)}ms`}function dh(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function ph(e){const t={...lh,...e.easing},n={...ch,...e.duration};return{getAutoHeightDuration:dh,create:(e=["all"],r={})=>{const{duration:i=n.standard,easing:o=t.easeInOut,delay:a=0,...s}=r;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"==typeof i?i:uh(i)} ${o} ${"string"==typeof a?a:uh(a)}`).join(",")},...e,easing:t,duration:n}}const hh={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function mh(e){return pc(e)||void 0===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||Array.isArray(e)}function fh(e={}){const t={...e};return function e(t){const n=Object.entries(t);for(let r=0;rmc(e,t),p),p.unstable_sxConfig={...vu,...c?.unstable_sxConfig},p.unstable_sx=function(e){return xu({sx:e,theme:this})},p.toRuntimeSource=fh,p};function yh(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(10*t)/1e3}const vh=[...Array(25)].map((e,t)=>{if(0===t)return"none";const n=yh(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function bh(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function xh(e){return"dark"===e?vh:[]}function Ih(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const wh=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let o=i;if("class"===i&&(o=".%s"),"data"===i&&(o="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(o=`[${i}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const i={};return(a=e.cssVarPrefix,[...[...Array(25)].map((e,t)=>`--${a?`${a}-`:""}overlays-${t}`),`--${a?`${a}-`:""}palette-AppBar-darkBg`,`--${a?`${a}-`:""}palette-AppBar-darkColor`]).forEach(e=>{i[e]=n[e],delete n[e]}),"media"===o?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:o?{[o.replace("%s",t)]:i,[`${r}, ${o.replace("%s",t)}`]:n}:{[r]:{...n,...i}}}if(o&&"media"!==o)return`${r}, ${o.replace("%s",String(t))}`}else if(t){if("media"===o)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(o)return o.replace("%s",String(t))}var a;return r};function kh(e,t,n){!e[t]&&n&&(e[t]=n)}function Sh(e){return"string"==typeof e&&e.startsWith("hsl")?rp(e):e}function Mh(e,t){`${t}Channel`in e||(e[`${t}Channel`]=tp(Sh(e[t])))}const Ch=e=>{try{return e()}catch(e){}};function Ph(e,t,n,r){if(!t)return;t=!0===t?{}:t;const i="dark"===r?"dark":"light";if(!n)return void(e[r]=function(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...i}=e,o=Zp(t);return{palette:o,opacity:{...bh(o.mode),...n},overlays:r||xh(o.mode),...i}}({...t,palette:{mode:i,...t?.palette}}));const{palette:o,...a}=gh({...n,palette:{mode:i,...t?.palette}});return e[r]={...t,palette:o,opacity:{...bh(i),...t?.opacity},overlays:t?.overlays||xh(i)},a}function Eh(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:a=Ih,colorSchemeSelector:s=(n.light&&n.dark?"media":void 0),rootSelector:l=":root",...c}=e,u=Object.keys(n)[0],d=r||(n.light&&"light"!==u?"light":u),p=((e="mui")=>Jp(e))(o),{[d]:h,light:m,dark:f,...g}=n,y={...g};let v=h;if(("dark"===d&&!("dark"in n)||"light"===d&&!("light"in n))&&(v=!0),!v)throw new Error(kc(21,d));const b=Ph(y,v,c,d);m&&!y.light&&Ph(y,m,void 0,"light"),f&&!y.dark&&Ph(y,f,void 0,"dark");let x={defaultColorScheme:d,...b,cssVarPrefix:o,colorSchemeSelector:s,rootSelector:l,getCssVar:p,colorSchemes:y,font:{...Qp(b.typography),...b.font},spacing:(I=c.spacing,"number"==typeof I?`${I}px`:"string"==typeof I||"function"==typeof I||Array.isArray(I)?I:"8px")};var I;Object.keys(x.colorSchemes).forEach(e=>{const t=x.colorSchemes[e].palette,n=e=>{const n=e.split("-"),r=n[1],i=n[2];return p(e,t[r][i])};var r;if("light"===t.mode&&(kh(t.common,"background","#fff"),kh(t.common,"onBackground","#000")),"dark"===t.mode&&(kh(t.common,"background","#000"),kh(t.common,"onBackground","#fff")),r=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach(e=>{r[e]||(r[e]={})}),"light"===t.mode){kh(t.Alert,"errorColor",lp(t.error.light,.6)),kh(t.Alert,"infoColor",lp(t.info.light,.6)),kh(t.Alert,"successColor",lp(t.success.light,.6)),kh(t.Alert,"warningColor",lp(t.warning.light,.6)),kh(t.Alert,"errorFilledBg",n("palette-error-main")),kh(t.Alert,"infoFilledBg",n("palette-info-main")),kh(t.Alert,"successFilledBg",n("palette-success-main")),kh(t.Alert,"warningFilledBg",n("palette-warning-main")),kh(t.Alert,"errorFilledColor",Ch(()=>t.getContrastText(t.error.main))),kh(t.Alert,"infoFilledColor",Ch(()=>t.getContrastText(t.info.main))),kh(t.Alert,"successFilledColor",Ch(()=>t.getContrastText(t.success.main))),kh(t.Alert,"warningFilledColor",Ch(()=>t.getContrastText(t.warning.main))),kh(t.Alert,"errorStandardBg",up(t.error.light,.9)),kh(t.Alert,"infoStandardBg",up(t.info.light,.9)),kh(t.Alert,"successStandardBg",up(t.success.light,.9)),kh(t.Alert,"warningStandardBg",up(t.warning.light,.9)),kh(t.Alert,"errorIconColor",n("palette-error-main")),kh(t.Alert,"infoIconColor",n("palette-info-main")),kh(t.Alert,"successIconColor",n("palette-success-main")),kh(t.Alert,"warningIconColor",n("palette-warning-main")),kh(t.AppBar,"defaultBg",n("palette-grey-100")),kh(t.Avatar,"defaultBg",n("palette-grey-400")),kh(t.Button,"inheritContainedBg",n("palette-grey-300")),kh(t.Button,"inheritContainedHoverBg",n("palette-grey-A100")),kh(t.Chip,"defaultBorder",n("palette-grey-400")),kh(t.Chip,"defaultAvatarColor",n("palette-grey-700")),kh(t.Chip,"defaultIconColor",n("palette-grey-700")),kh(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),kh(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),kh(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),kh(t.LinearProgress,"primaryBg",up(t.primary.main,.62)),kh(t.LinearProgress,"secondaryBg",up(t.secondary.main,.62)),kh(t.LinearProgress,"errorBg",up(t.error.main,.62)),kh(t.LinearProgress,"infoBg",up(t.info.main,.62)),kh(t.LinearProgress,"successBg",up(t.success.main,.62)),kh(t.LinearProgress,"warningBg",up(t.warning.main,.62)),kh(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.11)`),kh(t.Slider,"primaryTrack",up(t.primary.main,.62)),kh(t.Slider,"secondaryTrack",up(t.secondary.main,.62)),kh(t.Slider,"errorTrack",up(t.error.main,.62)),kh(t.Slider,"infoTrack",up(t.info.main,.62)),kh(t.Slider,"successTrack",up(t.success.main,.62)),kh(t.Slider,"warningTrack",up(t.warning.main,.62));const e=dp(t.background.default,.8);kh(t.SnackbarContent,"bg",e),kh(t.SnackbarContent,"color",Ch(()=>t.getContrastText(e))),kh(t.SpeedDialAction,"fabHoverBg",dp(t.background.paper,.15)),kh(t.StepConnector,"border",n("palette-grey-400")),kh(t.StepContent,"border",n("palette-grey-400")),kh(t.Switch,"defaultColor",n("palette-common-white")),kh(t.Switch,"defaultDisabledColor",n("palette-grey-100")),kh(t.Switch,"primaryDisabledColor",up(t.primary.main,.62)),kh(t.Switch,"secondaryDisabledColor",up(t.secondary.main,.62)),kh(t.Switch,"errorDisabledColor",up(t.error.main,.62)),kh(t.Switch,"infoDisabledColor",up(t.info.main,.62)),kh(t.Switch,"successDisabledColor",up(t.success.main,.62)),kh(t.Switch,"warningDisabledColor",up(t.warning.main,.62)),kh(t.TableCell,"border",up(ap(t.divider,1),.88)),kh(t.Tooltip,"bg",ap(t.grey[700],.92))}if("dark"===t.mode){kh(t.Alert,"errorColor",up(t.error.light,.6)),kh(t.Alert,"infoColor",up(t.info.light,.6)),kh(t.Alert,"successColor",up(t.success.light,.6)),kh(t.Alert,"warningColor",up(t.warning.light,.6)),kh(t.Alert,"errorFilledBg",n("palette-error-dark")),kh(t.Alert,"infoFilledBg",n("palette-info-dark")),kh(t.Alert,"successFilledBg",n("palette-success-dark")),kh(t.Alert,"warningFilledBg",n("palette-warning-dark")),kh(t.Alert,"errorFilledColor",Ch(()=>t.getContrastText(t.error.dark))),kh(t.Alert,"infoFilledColor",Ch(()=>t.getContrastText(t.info.dark))),kh(t.Alert,"successFilledColor",Ch(()=>t.getContrastText(t.success.dark))),kh(t.Alert,"warningFilledColor",Ch(()=>t.getContrastText(t.warning.dark))),kh(t.Alert,"errorStandardBg",lp(t.error.light,.9)),kh(t.Alert,"infoStandardBg",lp(t.info.light,.9)),kh(t.Alert,"successStandardBg",lp(t.success.light,.9)),kh(t.Alert,"warningStandardBg",lp(t.warning.light,.9)),kh(t.Alert,"errorIconColor",n("palette-error-main")),kh(t.Alert,"infoIconColor",n("palette-info-main")),kh(t.Alert,"successIconColor",n("palette-success-main")),kh(t.Alert,"warningIconColor",n("palette-warning-main")),kh(t.AppBar,"defaultBg",n("palette-grey-900")),kh(t.AppBar,"darkBg",n("palette-background-paper")),kh(t.AppBar,"darkColor",n("palette-text-primary")),kh(t.Avatar,"defaultBg",n("palette-grey-600")),kh(t.Button,"inheritContainedBg",n("palette-grey-800")),kh(t.Button,"inheritContainedHoverBg",n("palette-grey-700")),kh(t.Chip,"defaultBorder",n("palette-grey-700")),kh(t.Chip,"defaultAvatarColor",n("palette-grey-300")),kh(t.Chip,"defaultIconColor",n("palette-grey-300")),kh(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),kh(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),kh(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),kh(t.LinearProgress,"primaryBg",lp(t.primary.main,.5)),kh(t.LinearProgress,"secondaryBg",lp(t.secondary.main,.5)),kh(t.LinearProgress,"errorBg",lp(t.error.main,.5)),kh(t.LinearProgress,"infoBg",lp(t.info.main,.5)),kh(t.LinearProgress,"successBg",lp(t.success.main,.5)),kh(t.LinearProgress,"warningBg",lp(t.warning.main,.5)),kh(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.13)`),kh(t.Slider,"primaryTrack",lp(t.primary.main,.5)),kh(t.Slider,"secondaryTrack",lp(t.secondary.main,.5)),kh(t.Slider,"errorTrack",lp(t.error.main,.5)),kh(t.Slider,"infoTrack",lp(t.info.main,.5)),kh(t.Slider,"successTrack",lp(t.success.main,.5)),kh(t.Slider,"warningTrack",lp(t.warning.main,.5));const e=dp(t.background.default,.98);kh(t.SnackbarContent,"bg",e),kh(t.SnackbarContent,"color",Ch(()=>t.getContrastText(e))),kh(t.SpeedDialAction,"fabHoverBg",dp(t.background.paper,.15)),kh(t.StepConnector,"border",n("palette-grey-600")),kh(t.StepContent,"border",n("palette-grey-600")),kh(t.Switch,"defaultColor",n("palette-grey-300")),kh(t.Switch,"defaultDisabledColor",n("palette-grey-600")),kh(t.Switch,"primaryDisabledColor",lp(t.primary.main,.55)),kh(t.Switch,"secondaryDisabledColor",lp(t.secondary.main,.55)),kh(t.Switch,"errorDisabledColor",lp(t.error.main,.55)),kh(t.Switch,"infoDisabledColor",lp(t.info.main,.55)),kh(t.Switch,"successDisabledColor",lp(t.success.main,.55)),kh(t.Switch,"warningDisabledColor",lp(t.warning.main,.55)),kh(t.TableCell,"border",lp(ap(t.divider,1),.68)),kh(t.Tooltip,"bg",ap(t.grey[700],.92))}Mh(t.background,"default"),Mh(t.background,"paper"),Mh(t.common,"background"),Mh(t.common,"onBackground"),Mh(t,"divider"),Object.keys(t).forEach(e=>{const n=t[e];"tonalOffset"!==e&&n&&"object"==typeof n&&(n.main&&kh(t[e],"mainChannel",tp(Sh(n.main))),n.light&&kh(t[e],"lightChannel",tp(Sh(n.light))),n.dark&&kh(t[e],"darkChannel",tp(Sh(n.dark))),n.contrastText&&kh(t[e],"contrastTextChannel",tp(Sh(n.contrastText))),"text"===e&&(Mh(t[e],"primary"),Mh(t[e],"secondary")),"action"===e&&(n.active&&Mh(t[e],"active"),n.selected&&Mh(t[e],"selected")))})}),x=t.reduce((e,t)=>mc(e,t),x);const w={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:wh(x)},{vars:k,generateThemeVars:S,generateStyleSheets:M}=function(e,t={}){const{getSelector:n=g,disableCssColorScheme:r,colorSchemeSelector:i}=t,{colorSchemes:o={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=th(l,t);let p=d;const h={},{[s]:m,...f}=o;if(Object.entries(f||{}).forEach(([e,n])=>{const{vars:r,css:i,varsWithDefaults:o}=th(n,t);p=mc(p,o),h[e]={css:i,vars:r}}),m){const{css:e,vars:n,varsWithDefaults:r}=th(m,t);p=mc(p,r),h[s]={css:e,vars:n}}function g(t,n){let r=i;if("class"===i&&(r=".%s"),"data"===i&&(r="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(r=`[${i}="%s"]`),t){if("media"===r){if(e.defaultColorScheme===t)return":root";const r=o[t]?.palette?.mode||t;return{[`@media (prefers-color-scheme: ${r})`]:{":root":n}}}if(r)return e.defaultColorScheme===t?`:root, ${r.replace("%s",String(t))}`:r.replace("%s",String(t))}return":root"}return{vars:p,generateThemeVars:()=>{let e={...c};return Object.entries(h).forEach(([,{vars:t}])=>{e=mc(e,t)}),e},generateStyleSheets:()=>{const t=[],i=e.defaultColorScheme||"light";function a(e,n){Object.keys(n).length&&t.push("string"==typeof e?{[e]:{...n}}:e)}a(n(void 0,{...u}),u);const{[i]:s,...l}=h;if(s){const{css:e}=s,t=o[i]?.palette?.mode,l=!r&&t?{colorScheme:t,...e}:{...e};a(n(i,{...l}),l)}return Object.entries(l).forEach(([e,{css:t}])=>{const i=o[e]?.palette?.mode,s=!r&&i?{colorScheme:i,...t}:{...t};a(n(e,{...s}),s)}),t}}}(x,w);return x.vars=k,Object.entries(x.colorSchemes[x.defaultColorScheme]).forEach(([e,t])=>{x[e]=t}),x.generateThemeVars=S,x.generateStyleSheets=M,x.generateSpacing=function(){return Vc(c.spacing,zc(this))},x.getColorSchemeSelector=function(e){return function(t){return"media"===e?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:"class"===e?`.${t} &`:"data"===e?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}(s),x.spacing=x.generateSpacing(),x.shouldSkipGeneratingVar=a,x.unstable_sxConfig={...vu,...c?.unstable_sxConfig},x.unstable_sx=function(e){return xu({sx:e,theme:this})},x.toRuntimeSource=fh,x}function Th(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...!0!==n&&n,palette:Zp({...!0===n?{}:n.palette,mode:t})})}function Ah(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:i=(n?void 0:{light:!0}),defaultColorScheme:o=n?.mode,...a}=e,s=o||"light",l=i?.[s],c={...i,...n?{[s]:{..."boolean"!=typeof l&&l,palette:n}}:void 0};if(!1===r){if(!("colorSchemes"in e))return gh(e,...t);let r=n;"palette"in e||c[s]&&(!0!==c[s]?r=c[s].palette:"dark"===s&&(r={mode:"dark"}));const i=gh({...e,palette:r},...t);return i.defaultColorScheme=s,i.colorSchemes=c,"light"===i.palette.mode&&(i.colorSchemes.light={...!0!==c.light&&c.light,palette:i.palette},Th(i,"dark",c.dark)),"dark"===i.palette.mode&&(i.colorSchemes.dark={...!0!==c.dark&&c.dark,palette:i.palette},Th(i,"light",c.light)),i}return n||"light"in c||"light"!==s||(c.light=!0),Eh({...a,colorSchemes:c,defaultColorScheme:s,..."boolean"!=typeof r&&r},...t)}const Oh=Ah(),jh="$$material";function Lh({props:e,name:t}){return function({props:e,name:t,defaultTheme:n,themeId:r}){let i=Zd(n);return r&&(i=i[r]||i),uc({theme:i,name:t,props:e})}({props:e,name:t,defaultTheme:Oh,themeId:jh})}const Rh={"image/png":"PNG","image/jpeg":"JPEG","image/webp":"WebP"},Dh={loading:"Loading data…",noData:"No data to display",zoomIn:"Zoom in",zoomOut:"Zoom out",toolbarExport:"Export",toolbarExportPrint:"Print",toolbarExportImage:e=>`Export as ${Rh[e]??e}`,chartTypeBar:"Bar",chartTypeColumn:"Column",chartTypeLine:"Line",chartTypeArea:"Area",chartTypePie:"Pie",chartPaletteLabel:"Color palette",chartPaletteNameRainbowSurge:"Rainbow Surge",chartPaletteNameBlueberryTwilight:"Blueberry Twilight",chartPaletteNameMangoFusion:"Mango Fusion",chartPaletteNameCheerfulFiesta:"Cheerful Fiesta",chartPaletteNameStrawberrySky:"Strawberry Sky",chartPaletteNameBlue:"Blue",chartPaletteNameGreen:"Green",chartPaletteNamePurple:"Purple",chartPaletteNameRed:"Red",chartPaletteNameOrange:"Orange",chartPaletteNameYellow:"Yellow",chartPaletteNameCyan:"Cyan",chartPaletteNamePink:"Pink",chartConfigurationSectionChart:"Chart",chartConfigurationSectionColumns:"Columns",chartConfigurationSectionBars:"Bars",chartConfigurationSectionAxes:"Axes",chartConfigurationGrid:"Grid",chartConfigurationBorderRadius:"Border radius",chartConfigurationCategoryGapRatio:"Category gap ratio",chartConfigurationBarGapRatio:"Series gap ratio",chartConfigurationStacked:"Stacked",chartConfigurationShowToolbar:"Show toolbar",chartConfigurationSkipAnimation:"Skip animation",chartConfigurationInnerRadius:"Inner radius",chartConfigurationOuterRadius:"Outer radius",chartConfigurationColors:"Colors",chartConfigurationHideLegend:"Hide legend",chartConfigurationShowMark:"Show mark",chartConfigurationHeight:"Height",chartConfigurationWidth:"Width",chartConfigurationSeriesGap:"Series gap",chartConfigurationTickPlacement:"Tick placement",chartConfigurationTickLabelPlacement:"Tick label placement",chartConfigurationCategoriesAxisLabel:"Categories axis label",chartConfigurationSeriesAxisLabel:"Series axis label",chartConfigurationXAxisPosition:"X-axis position",chartConfigurationYAxisPosition:"Y-axis position",chartConfigurationSeriesAxisReverse:"Reverse series axis",chartConfigurationTooltipPlacement:"Placement",chartConfigurationTooltipTrigger:"Trigger",chartConfigurationLegendPosition:"Position",chartConfigurationLegendDirection:"Direction",chartConfigurationBarLabels:"Bar labels",chartConfigurationColumnLabels:"Column labels",chartConfigurationInterpolation:"Interpolation",chartConfigurationSectionTooltip:"Tooltip",chartConfigurationSectionLegend:"Legend",chartConfigurationSectionLines:"Lines",chartConfigurationSectionAreas:"Areas",chartConfigurationSectionArcs:"Arcs",chartConfigurationPaddingAngle:"Padding angle",chartConfigurationCornerRadius:"Corner radius",chartConfigurationArcLabels:"Arc labels",chartConfigurationStartAngle:"Start angle",chartConfigurationEndAngle:"End angle",chartConfigurationPieTooltipTrigger:"Trigger",chartConfigurationPieLegendPosition:"Position",chartConfigurationPieLegendDirection:"Direction",chartConfigurationOptionNone:"None",chartConfigurationOptionValue:"Value",chartConfigurationOptionAuto:"Auto",chartConfigurationOptionTop:"Top",chartConfigurationOptionTopLeft:"Top Left",chartConfigurationOptionTopRight:"Top Right",chartConfigurationOptionBottom:"Bottom",chartConfigurationOptionBottomLeft:"Bottom Left",chartConfigurationOptionBottomRight:"Bottom Right",chartConfigurationOptionLeft:"Left",chartConfigurationOptionRight:"Right",chartConfigurationOptionAxis:"Axis",chartConfigurationOptionItem:"Item",chartConfigurationOptionHorizontal:"Horizontal",chartConfigurationOptionVertical:"Vertical",chartConfigurationOptionBoth:"Both",chartConfigurationOptionStart:"Start",chartConfigurationOptionMiddle:"Middle",chartConfigurationOptionEnd:"End",chartConfigurationOptionExtremities:"Extremities",chartConfigurationOptionTick:"Tick",chartConfigurationOptionMonotoneX:"Monotone X",chartConfigurationOptionMonotoneY:"Monotone Y",chartConfigurationOptionCatmullRom:"Catmull-Rom",chartConfigurationOptionLinear:"Linear",chartConfigurationOptionNatural:"Natural",chartConfigurationOptionStep:"Step",chartConfigurationOptionStepBefore:"Step Before",chartConfigurationOptionStepAfter:"Step After",chartConfigurationOptionBumpX:"Bump X",chartConfigurationOptionBumpY:"Bump Y"},$h=Dh;l({},Dh);const zh=["localeText"],Nh=e.createContext(null);function _h(t){const{localeText:n}=t,r=tt(t,zh),{localeText:i}=e.useContext(Nh)??{localeText:void 0},o=Lh({props:r,name:"MuiChartsLocalizationProvider"}),{children:a,localeText:s}=o,c=e.useMemo(()=>l({},$h,s,i,n),[s,i,n]),u=e.useMemo(()=>({localeText:c}),[c]);return(0,O.jsx)(Nh.Provider,{value:u,children:a})}function Fh(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t{this.currentId=null,t()},e)}clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Wh(){const t=Vh(Yh.create).current;var n;return n=t.disposeEffect,e.useEffect(n,Uh),t}function Gh(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let e=0;ee.useContext(Kh)??!1,Xh=function({value:e,...t}){return(0,O.jsx)(Kh.Provider,{value:e??!0,...t})};function Zh(e){try{return e.matches(":focus-visible")}catch(e){}return!1}function Jh(t){return parseInt(e.version,10)>=19?t?.props?.ref||null:t?.ref||null}var Qh=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,em=Ed(function(e){return Qh.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),tm=function(e){return"theme"!==e},nm=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?em:tm},rm=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},im=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Md(t,n,r),Fd(function(){return Cd(t,n,r)}),null},om=function t(n,r){var i,o,a=n.__emotion_real===n,s=a&&n.__emotion_base||n;void 0!==r&&(i=r.label,o=r.target);var c=rm(n,r,a),u=c||nm(s),d=!u("as");return function(){var p=arguments,h=a&&void 0!==n.__emotion_styles?n.__emotion_styles.slice(0):[];if(void 0!==i&&h.push("label:"+i+";"),null==p[0]||void 0===p[0].raw)h.push.apply(h,p);else{var m=p[0];h.push(m[0]);for(var f=p.length,g=1;g{"function"!=typeof e.style&&(e.style=sm(e.style))}),r}const cm=wu();function um(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function dm(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function pm(e){return e?(t,n)=>n[e]:null}function hm(e,t,n){const r="function"==typeof t?t(e):t;if(Array.isArray(r))return r.flatMap(t=>hm(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?dm(r.style,n):r.style;else{const{variants:e,...i}=r;t=n?dm(sm(i),n):i}return mm(e,r.variants,[t],n)}return r?.isProcessed?n?dm(sm(r.style),n):r.style:n?dm(sm(r),n):r}function mm(e,t,n=[],r=void 0){let i;e:for(let o=0;ogm(e)&&"classes"!==e,vm=function(e={}){const{themeId:t,defaultTheme:n=cm,rootShouldForwardProp:r=um,slotShouldForwardProp:i=um}=e;function o(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return(e,t={})=>{!function(e){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=(e=>e.filter(e=>e!==xu))(e.__emotion_styles))}(e);const{name:n,slot:a,skipVariantsResolver:s,skipSx:l,overridesResolver:c=pm(fm(a)),...u}=t,d=n&&n.startsWith("Mui")||a?"components":"custom",p=void 0!==s?s:a&&"Root"!==a&&"root"!==a||!1,h=l||!1;let m=um;"Root"===a||"root"===a?m=r:a?m=i:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(m=void 0);const f=function(e,t){return om(e,t)}(e,{shouldForwardProp:m,label:void 0,...u}),g=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return hm(t,e,t.theme.modularCssLayers?d:void 0)};if(pc(e)){const t=lm(e);return function(e){return t.variants?hm(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?dm(t.style,d):t.style}}return e},y=(...t)=>{const r=[],i=t.map(g),a=[];if(r.push(o),n&&c&&a.push(function(e){const t=e.theme,r=t.components?.[n]?.styleOverrides;if(!r)return null;const i={};for(const t in r)i[t]=hm(e,r[t],e.theme.modularCssLayers?"theme":void 0);return c(e,i)}),n&&!p&&a.push(function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?mm(e,r,[],e.theme.modularCssLayers?"theme":void 0):null}),h||a.push(xu),Array.isArray(i[0])){const e=i.shift(),t=new Array(r.length).fill(""),n=new Array(a.length).fill("");let o;o=[...t,...e,...n],o.raw=[...t,...e.raw,...n],r.unshift(o)}const s=[...r,...i,...a],l=f(...s);return e.muiName&&(l.muiName=e.muiName),l};return f.withConfig&&(y.withConfig=f.withConfig),y}}({themeId:jh,defaultTheme:Oh,rootShouldForwardProp:ym}),bm=vm;function xm(){const e=Zd(Oh);return e[jh]||e}const Im={theme:void 0},wm=function(e){let t,n;return function(r){let i=t;return void 0!==i&&r.theme===n||(Im.theme=r.theme,i=lm(e(Im)),t=i,n=r.theme),i}},km=e.createContext(void 0);const Sm=function({value:e,children:t}){return(0,O.jsx)(km.Provider,{value:e,children:t})};function Mm(t){return function({props:t,name:n}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?cc(i.defaultProps,r):i.styleOverrides||i.variants?r:cc(i,r)}({props:t,name:n,theme:{components:e.useContext(km)}})}(t)}const Cm=Sc;function Pm(e,t){return Pm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pm(e,t)}function Em(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Pm(e,t)}const Tm=window.ReactDOM;var Am=a.n(Tm);const Om=n().createContext(null);var jm="unmounted",Lm="exited",Rm="entering",Dm="entered",$m="exiting",zm=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=Lm,r.appearStatus=Rm):i=Dm:i=t.unmountOnExit||t.mountOnEnter?jm:Lm,r.state={status:i},r.nextCallback=null,r}Em(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===jm?{status:Lm}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Rm&&n!==Dm&&(t=Rm):n!==Rm&&n!==Dm||(t=$m)}this.updateStatus(!1,t)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},r.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Rm){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Am().findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Lm&&this.setState({status:jm})},r.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Am().findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;e||n?(this.props.onEnter(o,a),this.safeSetState({status:Rm},function(){t.props.onEntering(o,a),t.onTransitionEnd(l,function(){t.safeSetState({status:Dm},function(){t.props.onEntered(o,a)})})})):this.safeSetState({status:Dm},function(){t.props.onEntered(o)})},r.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Am().findDOMNode(this);t?(this.props.onExit(r),this.safeSetState({status:$m},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Lm},function(){e.props.onExited(r)})})})):this.safeSetState({status:Lm},function(){e.props.onExited(r)})},r.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},r.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},r.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Am().findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},r.render=function(){var e=this.state.status;if(e===jm)return null;var t=this.props,r=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,tt(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return n().createElement(Om.Provider,{value:null},"function"==typeof r?r(e,i):n().cloneElement(n().Children.only(r),i))},t}(n().Component);function Nm(){}zm.contextType=Om,zm.propTypes={},zm.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Nm,onEntering:Nm,onEntered:Nm,onExit:Nm,onExiting:Nm,onExited:Nm},zm.UNMOUNTED=jm,zm.EXITED=Lm,zm.ENTERING=Rm,zm.ENTERED=Dm,zm.EXITING=$m;const _m=zm,Fm=e=>e.scrollTop;function Hm(e,t){const{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??("number"==typeof n?n:n[t.mode]||0),easing:i.transitionTimingFunction??("object"==typeof r?r[t.mode]:r),delay:i.transitionDelay}}function Bm(...t){const n=e.useRef(void 0),r=e.useCallback(e=>{const n=t.map(t=>{if(null==t)return null;if("function"==typeof t){const n=t,r=n(e);return"function"==typeof r?r:()=>{n(null)}}return t.current=e,()=>{t.current=null}});return()=>{n.forEach(e=>e?.())}},t);return e.useMemo(()=>t.every(e=>null==e)?null:e=>{n.current&&(n.current(),n.current=void 0),null!=e&&(n.current=r(e))},t)}const Vm=Bm;function Um(e){return`scale(${e}, ${e**2})`}const Ym={entering:{opacity:1,transform:Um(1)},entered:{opacity:1,transform:"none"}},Wm="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Gm=e.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:h,style:m,timeout:f="auto",TransitionComponent:g=_m,...y}=t,v=Wh(),b=e.useRef(),x=xm(),I=e.useRef(null),w=Vm(I,Jh(o),n),k=e=>t=>{if(e){const n=I.current;void 0===t?e(n):e(n,t)}},S=k(u),M=k((e,t)=>{Fm(e);const{duration:n,delay:r,easing:i}=Hm({style:m,timeout:f,easing:a},{mode:"enter"});let o;"auto"===f?(o=x.transitions.getAutoHeightDuration(e.clientHeight),b.current=o):o=n,e.style.transition=[x.transitions.create("opacity",{duration:o,delay:r}),x.transitions.create("transform",{duration:Wm?o:.666*o,delay:r,easing:i})].join(","),l&&l(e,t)}),C=k(c),P=k(h),E=k(e=>{const{duration:t,delay:n,easing:r}=Hm({style:m,timeout:f,easing:a},{mode:"exit"});let i;"auto"===f?(i=x.transitions.getAutoHeightDuration(e.clientHeight),b.current=i):i=t,e.style.transition=[x.transitions.create("opacity",{duration:i,delay:n}),x.transitions.create("transform",{duration:Wm?i:.666*i,delay:Wm?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=Um(.75),d&&d(e)}),T=k(p);return(0,O.jsx)(g,{appear:i,in:s,nodeRef:I,onEnter:M,onEntered:C,onEntering:S,onExit:E,onExited:T,onExiting:P,addEndListener:e=>{"auto"===f&&v.start(b.current||0,e),r&&r(I.current,e)},timeout:"auto"===f?null:f,...y,children:(t,{ownerState:n,...r})=>e.cloneElement(o,{style:{opacity:0,transform:Um(.75),visibility:"exited"!==t||s?void 0:"hidden",...Ym[t],...m,...o.props.style},ref:w,...r})})});Gm&&(Gm.muiSupportAuto=!0);const Km=Gm,qm="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function Xm(e){return e&&e.ownerDocument||document}function Zm(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jm(e){return e instanceof Zm(e).Element||e instanceof Element}function Qm(e){return e instanceof Zm(e).HTMLElement||e instanceof HTMLElement}function ef(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Zm(e).ShadowRoot||e instanceof ShadowRoot)}var tf=Math.max,nf=Math.min,rf=Math.round;function of(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function af(){return!/^((?!chrome|android).)*safari/i.test(of())}function sf(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Qm(e)&&(i=e.offsetWidth>0&&rf(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&rf(r.height)/e.offsetHeight||1);var a=(Jm(e)?Zm(e):window).visualViewport,s=!af()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/i,c=(r.top+(s&&a?a.offsetTop:0))/o,u=r.width/i,d=r.height/o;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function lf(e){var t=Zm(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function cf(e){return e?(e.nodeName||"").toLowerCase():null}function uf(e){return((Jm(e)?e.ownerDocument:e.document)||window.document).documentElement}function df(e){return sf(uf(e)).left+lf(e).scrollLeft}function pf(e){return Zm(e).getComputedStyle(e)}function hf(e){var t=pf(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function mf(e,t,n){void 0===n&&(n=!1);var r=Qm(t),i=Qm(t)&&function(e){var t=e.getBoundingClientRect(),n=rf(t.width)/e.offsetWidth||1,r=rf(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),o=uf(t),a=sf(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==cf(t)||hf(o))&&(s=function(e){return e!==Zm(e)&&Qm(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:lf(e);var t}(t)),Qm(t)?((l=sf(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=df(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function ff(e){var t=sf(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function gf(e){return"html"===cf(e)?e:e.assignedSlot||e.parentNode||(ef(e)?e.host:null)||uf(e)}function yf(e){return["html","body","#document"].indexOf(cf(e))>=0?e.ownerDocument.body:Qm(e)&&hf(e)?e:yf(gf(e))}function vf(e,t){var n;void 0===t&&(t=[]);var r=yf(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=Zm(r),a=i?[o].concat(o.visualViewport||[],hf(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(vf(gf(a)))}function bf(e){return["table","td","th"].indexOf(cf(e))>=0}function xf(e){return Qm(e)&&"fixed"!==pf(e).position?e.offsetParent:null}function If(e){for(var t=Zm(e),n=xf(e);n&&bf(n)&&"static"===pf(n).position;)n=xf(n);return n&&("html"===cf(n)||"body"===cf(n)&&"static"===pf(n).position)?t:n||function(e){var t=/firefox/i.test(of());if(/Trident/i.test(of())&&Qm(e)&&"fixed"===pf(e).position)return null;var n=gf(e);for(ef(n)&&(n=n.host);Qm(n)&&["html","body"].indexOf(cf(n))<0;){var r=pf(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var wf="top",kf="bottom",Sf="right",Mf="left",Cf="auto",Pf=[wf,kf,Sf,Mf],Ef="start",Tf="end",Af="viewport",Of="popper",jf=Pf.reduce(function(e,t){return e.concat([t+"-"+Ef,t+"-"+Tf])},[]),Lf=[].concat(Pf,[Cf]).reduce(function(e,t){return e.concat([t,t+"-"+Ef,t+"-"+Tf])},[]),Rf=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Df(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||i(e)}),r}var $f={placement:"bottom",modifiers:[],strategy:"absolute"};function zf(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function Vf(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?Ff(i):null,a=i?Hf(i):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case wf:t={x:s,y:n.y-r.height};break;case kf:t={x:s,y:n.y+n.height};break;case Sf:t={x:n.x+n.width,y:l};break;case Mf:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?Bf(o):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case Ef:t[c]=t[c]-(n[u]/2-r[u]/2);break;case Tf:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var Uf={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Yf(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=a.x,h=void 0===p?0:p,m=a.y,f=void 0===m?0:m,g="function"==typeof u?u({x:h,y:f}):{x:h,y:f};h=g.x,f=g.y;var y=a.hasOwnProperty("x"),v=a.hasOwnProperty("y"),b=Mf,x=wf,I=window;if(c){var w=If(n),k="clientHeight",S="clientWidth";w===Zm(n)&&"static"!==pf(w=uf(n)).position&&"absolute"===s&&(k="scrollHeight",S="scrollWidth"),(i===wf||(i===Mf||i===Sf)&&o===Tf)&&(x=kf,f-=(d&&w===I&&I.visualViewport?I.visualViewport.height:w[k])-r.height,f*=l?1:-1),i!==Mf&&(i!==wf&&i!==kf||o!==Tf)||(b=Sf,h-=(d&&w===I&&I.visualViewport?I.visualViewport.width:w[S])-r.width,h*=l?1:-1)}var M,C=Object.assign({position:s},c&&Uf),P=!0===u?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:rf(n*i)/i||0,y:rf(r*i)/i||0}}({x:h,y:f},Zm(n)):{x:h,y:f};return h=P.x,f=P.y,l?Object.assign({},C,((M={})[x]=v?"0":"",M[b]=y?"0":"",M.transform=(I.devicePixelRatio||1)<=1?"translate("+h+"px, "+f+"px)":"translate3d("+h+"px, "+f+"px, 0)",M)):Object.assign({},C,((t={})[x]=v?f+"px":"",t[b]=y?h+"px":"",t.transform="",t))}const Wf={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];Qm(i)&&cf(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});Qm(r)&&cf(r)&&(Object.assign(r.style,o),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};var Gf={left:"right",right:"left",bottom:"top",top:"bottom"};function Kf(e){return e.replace(/left|right|bottom|top/g,function(e){return Gf[e]})}var qf={start:"end",end:"start"};function Xf(e){return e.replace(/start|end/g,function(e){return qf[e]})}function Zf(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ef(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Jf(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Qf(e,t,n){return t===Af?Jf(function(e,t){var n=Zm(e),r=uf(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=af();(c||!c&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+df(e),y:l}}(e,n)):Jm(t)?function(e,t){var n=sf(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Jf(function(e){var t,n=uf(e),r=lf(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=tf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=tf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+df(e),l=-r.scrollTop;return"rtl"===pf(i||n).direction&&(s+=tf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(uf(e)))}function eg(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function tg(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function ng(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,a=void 0===o?e.strategy:o,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?Af:c,d=n.elementContext,p=void 0===d?Of:d,h=n.altBoundary,m=void 0!==h&&h,f=n.padding,g=void 0===f?0:f,y=eg("number"!=typeof g?g:tg(g,Pf)),v=p===Of?"reference":Of,b=e.rects.popper,x=e.elements[m?v:p],I=function(e,t,n,r){var i="clippingParents"===t?function(e){var t=vf(gf(e)),n=["absolute","fixed"].indexOf(pf(e).position)>=0&&Qm(e)?If(e):e;return Jm(n)?t.filter(function(e){return Jm(e)&&Zf(e,n)&&"body"!==cf(e)}):[]}(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(t,n){var i=Qf(e,n,r);return t.top=tf(i.top,t.top),t.right=nf(i.right,t.right),t.bottom=nf(i.bottom,t.bottom),t.left=tf(i.left,t.left),t},Qf(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(Jm(x)?x:x.contextElement||uf(e.elements.popper),l,u,a),w=sf(e.elements.reference),k=Vf({reference:w,element:b,strategy:"absolute",placement:i}),S=Jf(Object.assign({},b,k)),M=p===Of?S:w,C={top:I.top-M.top+y.top,bottom:M.bottom-I.bottom+y.bottom,left:I.left-M.left+y.left,right:M.right-I.right+y.right},P=e.modifiersData.offset;if(p===Of&&P){var E=P[i];Object.keys(C).forEach(function(e){var t=[Sf,kf].indexOf(e)>=0?1:-1,n=[wf,kf].indexOf(e)>=0?"y":"x";C[e]+=E[n]*t})}return C}const rg={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,h=n.flipVariations,m=void 0===h||h,f=n.allowedAutoPlacements,g=t.options.placement,y=Ff(g),v=l||(y!==g&&m?function(e){if(Ff(e)===Cf)return[];var t=Kf(e);return[Xf(e),t,Xf(t)]}(g):[Kf(g)]),b=[g].concat(v).reduce(function(e,n){return e.concat(Ff(n)===Cf?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Lf:l,u=Hf(r),d=u?s?jf:jf.filter(function(e){return Hf(e)===u}):Pf,p=d.filter(function(e){return c.indexOf(e)>=0});0===p.length&&(p=d);var h=p.reduce(function(t,n){return t[n]=ng(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[Ff(n)],t},{});return Object.keys(h).sort(function(e,t){return h[e]-h[t]})}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:f}):n)},[]),x=t.rects.reference,I=t.rects.popper,w=new Map,k=!0,S=b[0],M=0;M=0,A=T?"width":"height",O=ng(t,{placement:C,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),j=T?E?Sf:Mf:E?kf:wf;x[A]>I[A]&&(j=Kf(j));var L=Kf(j),R=[];if(o&&R.push(O[P]<=0),s&&R.push(O[j]<=0,O[L]<=0),R.every(function(e){return e})){S=C,k=!1;break}w.set(C,R)}if(k)for(var D=function(e){var t=b.find(function(t){var n=w.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return S=t,"break"},$=m?3:1;$>0&&"break"!==D($);$--);t.placement!==S&&(t.modifiersData[r]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ig(e,t,n){return tf(e,nf(t,n))}const og={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,h=void 0===p||p,m=n.tetherOffset,f=void 0===m?0:m,g=ng(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=Ff(t.placement),v=Hf(t.placement),b=!v,x=Bf(y),I="x"===x?"y":"x",w=t.modifiersData.popperOffsets,k=t.rects.reference,S=t.rects.popper,M="function"==typeof f?f(Object.assign({},t.rects,{placement:t.placement})):f,C="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(w){if(o){var T,A="y"===x?wf:Mf,O="y"===x?kf:Sf,j="y"===x?"height":"width",L=w[x],R=L+g[A],D=L-g[O],$=h?-S[j]/2:0,z=v===Ef?k[j]:S[j],N=v===Ef?-S[j]:-k[j],_=t.elements.arrow,F=h&&_?ff(_):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},B=H[A],V=H[O],U=ig(0,k[j],F[j]),Y=b?k[j]/2-$-U-B-C.mainAxis:z-U-B-C.mainAxis,W=b?-k[j]/2+$+U+V+C.mainAxis:N+U+V+C.mainAxis,G=t.elements.arrow&&If(t.elements.arrow),K=G?"y"===x?G.clientTop||0:G.clientLeft||0:0,q=null!=(T=null==P?void 0:P[x])?T:0,X=L+W-q,Z=ig(h?nf(R,L+Y-q-K):R,L,h?tf(D,X):D);w[x]=Z,E[x]=Z-L}if(s){var J,Q="x"===x?wf:Mf,ee="x"===x?kf:Sf,te=w[I],ne="y"===I?"height":"width",re=te+g[Q],ie=te-g[ee],oe=-1!==[wf,Mf].indexOf(y),ae=null!=(J=null==P?void 0:P[I])?J:0,se=oe?re:te-k[ne]-S[ne]-ae+C.altAxis,le=oe?te+k[ne]+S[ne]-ae-C.altAxis:ie,ce=h&&oe?function(e,t,n){var r=ig(e,t,n);return r>n?n:r}(se,te,le):ig(h?se:re,te,h?le:ie);w[I]=ce,E[I]=ce-te}t.modifiersData[r]=E}},requiresIfExists:["offset"]},ag={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Ff(n.placement),l=Bf(s),c=[Mf,Sf].indexOf(s)>=0?"height":"width";if(o&&a){var u=function(e,t){return eg("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:tg(e,Pf))}(i.padding,n),d=ff(o),p="y"===l?wf:Mf,h="y"===l?kf:Sf,m=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],f=a[l]-n.rects.reference[l],g=If(o),y=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,v=m/2-f/2,b=u[p],x=y-d[c]-u[h],I=y/2-d[c]/2+v,w=ig(b,I,x),k=l;n.modifiersData[r]=((t={})[k]=w,t.centerOffset=w-I,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Zf(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function sg(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function lg(e){return[wf,Sf,kf,Mf].some(function(t){return e[t]>=0})}var cg=Nf({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,s=void 0===a||a,l=Zm(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(e){e.addEventListener("scroll",n.update,_f)}),s&&l.addEventListener("resize",n.update,_f),function(){o&&c.forEach(function(e){e.removeEventListener("scroll",n.update,_f)}),s&&l.removeEventListener("resize",n.update,_f)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Vf({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,l=void 0===s||s,c={placement:Ff(t.placement),variation:Hf(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Yf(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Yf(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Wf,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=Lf.reduce(function(e,n){return e[n]=function(e,t,n){var r=Ff(e),i=[Mf,wf].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Mf,Sf].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e},{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},rg,og,ag,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=ng(t,{elementContext:"reference"}),s=ng(t,{altBoundary:!0}),l=sg(a,r),c=sg(s,i,o),u=lg(l),d=lg(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]});const ug=function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}},dg=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n},pg=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t},hg=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=Hh(n?.className,o,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},a={...n,...i,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=dg({...i,...r}),s=pg(r),l=pg(i),c=t(a),u=Hh(c?.className,n?.className,o,i?.className,r?.className),d={...c?.style,...n?.style,...i?.style,...r?.style},p={...c,...n,...l,...s};return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}},mg=function(e,t,n){return"function"==typeof e?e(t,n):e},fg=function(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,a=i?{}:mg(n,r),{props:s,internalRef:l}=hg({...o,externalSlotProps:a}),c=Bm(l,a?.ref,e.additionalProps?.ref);return ug(t,{...s,ref:c},r)};function gg(e,t){"function"==typeof e?e(t):e&&(e.current=t)}const yg=e.forwardRef(function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[a,s]=e.useState(null),l=Bm(e.isValidElement(r)?Jh(r):null,n);if(qm(()=>{o||s(function(e){return"function"==typeof e?e():e}(i)||document.body)},[i,o]),qm(()=>{if(a&&!o)return gg(n,a),()=>{gg(n,null)}},[n,a,o]),o){if(e.isValidElement(r)){const t={ref:l};return e.cloneElement(r,t)}return r}return a?Tm.createPortal(r,a):a}),vg=e=>e,bg=(()=>{let e=vg;return{configure(t){e=t},generate:t=>e(t),reset(){e=vg}}})(),xg={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ig(e,t,n="Mui"){const r=xg[t];return r?`${n}-${r}`:`${bg.generate(e)}-${t}`}function wg(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=Ig(e,t,n)}),r}function kg(e){return Ig("MuiPopper",e)}function Sg(e){return"function"==typeof e?e():e}wg("MuiPopper",["root"]);const Mg={},Cg=e.forwardRef(function(t,n){const{anchorEl:r,children:i,direction:o,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:d,slotProps:p={},slots:h={},TransitionProps:m,ownerState:f,...g}=t,y=e.useRef(null),v=Bm(y,n),b=e.useRef(null),x=Bm(b,d),I=e.useRef(x);qm(()=>{I.current=x},[x]),e.useImperativeHandle(d,()=>b.current,[]);const w=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(c,o),[k,S]=e.useState(w),[M,C]=e.useState(Sg(r));e.useEffect(()=>{b.current&&b.current.forceUpdate()}),e.useEffect(()=>{r&&C(Sg(r))},[r]),qm(()=>{if(!M||!l)return;let e=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{S(e.placement)}}];null!=s&&(e=e.concat(s)),u&&null!=u.modifiers&&(e=e.concat(u.modifiers));const t=cg(M,y.current,{placement:w,...u,modifiers:e});return I.current(t),()=>{t.destroy(),I.current(null)}},[M,a,s,l,u,w]);const P={placement:k};null!==m&&(P.TransitionProps=m);const E=(e=>{const{classes:t}=e;return Gh({root:["root"]},kg,t)})(t),T=h.root??"div",A=fg({elementType:T,externalSlotProps:p.root,externalForwardedProps:g,additionalProps:{role:"tooltip",ref:v},ownerState:t,className:E.root});return(0,O.jsx)(T,{...A,children:"function"==typeof i?i(P):i})}),Pg=bm(e.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:p=Mg,popperRef:h,style:m,transition:f=!1,slotProps:g={},slots:y={},...v}=t,[b,x]=e.useState(!0);if(!l&&!u&&(!f||b))return null;let I;if(o)I=o;else if(r){const e=Sg(r);I=e&&void 0!==e.nodeType?Xm(e).body:Xm(null).body}const w=u||!l||f&&!b?void 0:"none",k=f?{in:u,onEnter:()=>{x(!1)},onExited:()=>{x(!0)}}:void 0;return(0,O.jsx)(yg,{disablePortal:s,container:I,children:(0,O.jsx)(Cg,{anchorEl:r,direction:a,disablePortal:s,modifiers:c,ref:n,open:f?!b:u,placement:d,popperOptions:p,popperRef:h,slotProps:g,slots:y,...v,style:{position:"fixed",top:0,left:0,display:w,...m},TransitionProps:k,children:i})})}),{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Eg=e.forwardRef(function(e,t){const n=qh(),r=Mm({props:e,name:"MuiPopper"}),{anchorEl:i,component:o,components:a,componentsProps:s,container:l,disablePortal:c,keepMounted:u,modifiers:d,open:p,placement:h,popperOptions:m,popperRef:f,transition:g,slots:y,slotProps:v,...b}=r,x=y?.root??a?.Root,I={anchorEl:i,container:l,disablePortal:c,keepMounted:u,modifiers:d,open:p,placement:h,popperOptions:m,popperRef:f,transition:g,...b};return(0,O.jsx)(Pg,{as:o,direction:n?"rtl":"ltr",slots:{root:x},slotProps:v??s,...I,ref:t})}),Tg=Eg,Ag=function(t){const n=e.useRef(t);return qm(()=>{n.current=t}),e.useRef((...e)=>(0,n.current)(...e)).current},Og=Ag;let jg=0;const Lg={...e}.useId;function Rg(t){if(void 0!==Lg){const e=Lg();return t??e}return function(t){const[n,r]=e.useState(t),i=t||n;return e.useEffect(()=>{null==n&&(jg+=1,r(`mui-${jg}`))},[n]),i}(t)}const Dg=Rg;function $g({controlled:t,default:n,name:r,state:i="value"}){const{current:o}=e.useRef(void 0!==t),[a,s]=e.useState(n);return[o?t:a,e.useCallback(e=>{o||s(e)},[])]}const zg=$g;function Ng(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...p}=o,h=u[e]||r,m=mg(d[e],i),{props:{component:f,...g},internalRef:y}=hg({className:n,...l,externalForwardedProps:"root"===e?p:void 0,externalSlotProps:m}),v=Bm(y,m?.ref,t.ref),b="root"===e?f||c:f;return[h,ug(h,{..."root"===e&&!c&&!u[e]&&a,..."root"!==e&&!u[e]&&a,...g,...b&&!s&&{as:b},...b&&s&&{component:b},ref:v},i)]}function _g(e){return Ig("MuiTooltip",e)}const Fg=wg("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function Hg(e){return Math.round(1e5*e)/1e5}const Bg=bm(Tg,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(wm(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:e})=>!e.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:e})=>!e,style:{pointerEvents:"none"}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${Fg.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Fg.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Fg.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Fg.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="right"] .${Fg.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="right"] .${Fg.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="left"] .${Fg.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="left"] .${Fg.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),Vg=bm("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Cm(n.placement.split("-")[0])}`]]}})(wm(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:op(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${Fg.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Fg.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Fg.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Fg.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:e})=>e.arrow,style:{position:"relative",margin:0}},{props:({ownerState:e})=>e.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${Hg(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>!e.isRtl,style:{[`.${Fg.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Fg.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:e})=>!e.isRtl&&e.touch,style:{[`.${Fg.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Fg.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:e})=>!!e.isRtl,style:{[`.${Fg.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Fg.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:e})=>!!e.isRtl&&e.touch,style:{[`.${Fg.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Fg.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${Fg.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${Fg.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),Ug=bm("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(wm(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:op(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let Yg=!1;const Wg=new Yh;let Gg={x:0,y:0};function Kg(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const qg=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiTooltip"}),{arrow:i=!1,children:o,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:p=!1,disableTouchListener:h=!1,enterDelay:m=100,enterNextDelay:f=0,enterTouchDelay:g=700,followCursor:y=!1,id:v,leaveDelay:b=0,leaveTouchDelay:x=1500,onClose:I,onOpen:w,open:k,placement:S="bottom",PopperComponent:M,PopperProps:C={},slotProps:P={},slots:E={},title:T,TransitionComponent:A,TransitionProps:j,...L}=r,R=e.isValidElement(o)?o:(0,O.jsx)("span",{children:o}),D=xm(),$=qh(),[z,N]=e.useState(),[_,F]=e.useState(null),H=e.useRef(!1),B=p||y,V=Wh(),U=Wh(),Y=Wh(),W=Wh(),[G,K]=zg({controlled:k,default:!1,name:"Tooltip",state:"open"});let q=G;const X=Dg(v),Z=e.useRef(),J=Og(()=>{void 0!==Z.current&&(document.body.style.WebkitUserSelect=Z.current,Z.current=void 0),W.clear()});e.useEffect(()=>J,[J]);const Q=e=>{Wg.clear(),Yg=!0,K(!0),w&&!q&&w(e)},ee=Og(e=>{Wg.start(800+b,()=>{Yg=!1}),K(!1),I&&q&&I(e),V.start(D.transitions.duration.shortest,()=>{H.current=!1})}),te=e=>{H.current&&"touchstart"!==e.type||(z&&z.removeAttribute("title"),U.clear(),Y.clear(),m||Yg&&f?U.start(Yg?f:m,()=>{Q(e)}):Q(e))},ne=e=>{U.clear(),Y.start(b,()=>{ee(e)})},[,re]=e.useState(!1),ie=e=>{Zh(e.target)||(re(!1),ne(e))},oe=e=>{z||N(e.currentTarget),Zh(e.target)&&(re(!0),te(e))},ae=e=>{H.current=!0;const t=R.props;t.onTouchStart&&t.onTouchStart(e)};e.useEffect(()=>{if(q)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"===e.key&&ee(e)}},[ee,q]);const se=Vm(Jh(R),N,n);T||0===T||(q=!1);const le=e.useRef(),ce={},ue="string"==typeof T;c?(ce.title=q||!ue||d?null:T,ce["aria-describedby"]=q?X:null):(ce["aria-label"]=ue?T:null,ce["aria-labelledby"]=q&&!ue?X:null);const de={...ce,...L,...R.props,className:Hh(L.className,R.props.className),onTouchStart:ae,ref:se,...y?{onMouseMove:e=>{const t=R.props;t.onMouseMove&&t.onMouseMove(e),Gg={x:e.clientX,y:e.clientY},le.current&&le.current.update()}}:{}},pe={};h||(de.onTouchStart=e=>{ae(e),Y.clear(),V.clear(),J(),Z.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",W.start(g,()=>{document.body.style.WebkitUserSelect=Z.current,te(e)})},de.onTouchEnd=e=>{R.props.onTouchEnd&&R.props.onTouchEnd(e),J(),Y.start(x,()=>{ee(e)})}),d||(de.onMouseOver=Kg(te,de.onMouseOver),de.onMouseLeave=Kg(ne,de.onMouseLeave),B||(pe.onMouseOver=te,pe.onMouseLeave=ne)),u||(de.onFocus=Kg(oe,de.onFocus),de.onBlur=Kg(ie,de.onBlur),B||(pe.onFocus=oe,pe.onBlur=ie));const he={...r,isRtl:$,arrow:i,disableInteractive:B,placement:S,PopperComponentProp:M,touch:H.current},me="function"==typeof P.popper?P.popper(he):P.popper,fe=e.useMemo(()=>{let e=[{name:"arrow",enabled:Boolean(_),options:{element:_,padding:4}}];return C.popperOptions?.modifiers&&(e=e.concat(C.popperOptions.modifiers)),me?.popperOptions?.modifiers&&(e=e.concat(me.popperOptions.modifiers)),{...C.popperOptions,...me?.popperOptions,modifiers:e}},[_,C.popperOptions,me?.popperOptions]),ge=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e;return Gh({popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${Cm(o.split("-")[0])}`],arrow:["arrow"]},_g,t)})(he),ye="function"==typeof P.transition?P.transition(he):P.transition,ve={slots:{popper:s.Popper,transition:s.Transition??A,tooltip:s.Tooltip,arrow:s.Arrow,...E},slotProps:{arrow:P.arrow??l.arrow,popper:{...C,...me??l.popper},tooltip:P.tooltip??l.tooltip,transition:{...j,...ye??l.transition}}},[be,xe]=Ng("popper",{elementType:Bg,externalForwardedProps:ve,ownerState:he,className:Hh(ge.popper,C?.className)}),[Ie,we]=Ng("transition",{elementType:Km,externalForwardedProps:ve,ownerState:he}),[ke,Se]=Ng("tooltip",{elementType:Vg,className:ge.tooltip,externalForwardedProps:ve,ownerState:he}),[Me,Ce]=Ng("arrow",{elementType:Ug,className:ge.arrow,externalForwardedProps:ve,ownerState:he,ref:F});return(0,O.jsxs)(e.Fragment,{children:[e.cloneElement(R,de),(0,O.jsx)(be,{as:M??Tg,placement:S,anchorEl:y?{getBoundingClientRect:()=>({top:Gg.y,left:Gg.x,right:Gg.x,bottom:Gg.y,width:0,height:0})}:z,popperRef:le,open:!!z&&q,id:X,transition:!0,...pe,...xe,popperOptions:fe,children:({TransitionProps:e})=>(0,O.jsx)(Ie,{timeout:D.transitions.duration.shorter,...e,...we,children:(0,O.jsxs)(ke,{...Se,children:[T,i?(0,O.jsx)(Me,{...Ce}):null]})})})]})}),Xg=Xm,Zg=e.createContext({});function Jg(e){return Ig("MuiList",e)}wg("MuiList",["root","padding","dense","subheader"]);const Qg=bm("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),ey=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiList"}),{children:i,className:o,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c,...u}=r,d=e.useMemo(()=>({dense:s}),[s]),p={...r,component:a,dense:s,disablePadding:l},h=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Gh({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},Jg,t)})(p);return(0,O.jsx)(Zg.Provider,{value:d,children:(0,O.jsxs)(Qg,{as:a,className:Hh(h.root,o),ref:n,ownerState:p,...u,children:[c,i]})})}),ty=ey;function ny(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}const ry=ny,iy=qm;function oy(e){return Xm(e).defaultView||window}const ay=oy;function sy(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function ly(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function cy(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join("")))}function uy(e,t,n,r,i,o){let a=!1,s=i(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&cy(s,o)&&!t)return s.focus(),!0;s=i(e,s,n)}return!1}const dy=e.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu",...p}=t,h=e.useRef(null),m=e.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});iy(()=>{i&&h.current.focus()},[i]),e.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!h.current.style.width;if(e.clientHeight{e.isValidElement(t)?(t.props.disabled||("selectedMenu"===d&&t.props.selected||-1===g)&&(g=n),g===n&&(t.props.disabled||t.props.muiSkipListHighlight||t.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))):g===n&&(g+=1,g>=a.length&&(g=-1))});const y=e.Children.map(a,(t,n)=>{if(n===g){const n={};return o&&(n.autoFocus=!0),void 0===t.props.tabIndex&&"selectedMenu"===d&&(n.tabIndex=0),e.cloneElement(t,n)}return t});return(0,O.jsx)(ty,{role:"menu",ref:f,className:s,onKeyDown:e=>{const t=h.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey)return void(u&&u(e));const r=Xg(t).activeElement;if("ArrowDown"===n)e.preventDefault(),uy(t,r,c,l,sy);else if("ArrowUp"===n)e.preventDefault(),uy(t,r,c,l,ly);else if("Home"===n)e.preventDefault(),uy(t,null,c,l,sy);else if("End"===n)e.preventDefault(),uy(t,null,c,l,ly);else if(1===n.length){const i=m.current,o=n.toLowerCase(),a=performance.now();i.keys.length>0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);const s=r&&!i.repeating&&cy(r,i);i.previousKeyMatched&&(s||uy(t,r,!1,l,sy,i))?e.preventDefault():i.previousKeyMatched=!1}u&&u(e)},tabIndex:i?0:-1,...p,children:y})});function py(e){return Ig("MuiDivider",e)}const hy=wg("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),my=bm("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(wm(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:op(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&"vertical"!==e.orientation,style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>"vertical"===e.orientation&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>"right"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>"left"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),fy=bm("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(wm(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),gy=e.forwardRef(function(e,t){const n=Mm({props:e,name:"MuiDivider"}),{absolute:r=!1,children:i,className:o,orientation:a="horizontal",component:s=(i||"vertical"===a?"div":"hr"),flexItem:l=!1,light:c=!1,role:u=("hr"!==s?"separator":void 0),textAlign:d="center",variant:p="fullWidth",...h}=n,m={...n,absolute:r,component:s,flexItem:l,light:c,orientation:a,role:u,textAlign:d,variant:p},f=(e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:a,textAlign:s,variant:l}=e;return Gh({root:["root",t&&"absolute",l,o&&"light","vertical"===a&&"vertical",i&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},py,r)})(m);return(0,O.jsx)(my,{as:s,className:Hh(f.root,o),role:u,ref:t,ownerState:m,"aria-orientation":"separator"!==u||"hr"===s&&"vertical"!==a?void 0:a,...h,children:i?(0,O.jsx)(fy,{className:f.wrapper,ownerState:m,children:i}):null})});gy&&(gy.muiSkipListHighlight=!0);const yy=gy;function vy(e=[]){return([,t])=>t&&function(e,t=[]){if(!function(e){return"string"==typeof e.main}(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||"string"!=typeof e[n])return!1;return!0}(t,e)}class by{static create(){return new by}static use(){const t=Vh(by.create).current,[n,r]=e.useState(!1);return t.shouldMount=n,t.setShouldMount=r,e.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=function(){let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&null!==this.ref.current&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}}function xy(t,n){var r=Object.create(null);return t&&e.Children.map(t,function(e){return e}).forEach(function(t){r[t.key]=function(t){return n&&(0,e.isValidElement)(t)?n(t):t}(t)}),r}function Iy(e,t,n){return null!=n[t]?n[t]:e.props[t]}function wy(t,n,r){var i=xy(t.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r{var e,t,n,r,i={445(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,a={},s=function(e){return(e=+e)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],u=function(e){var t=a[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=a.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},p={A:[o,function(e){this.afternoon=d(e,!1)}],a:[o,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,l("seconds")],ss:[i,l("seconds")],m:[i,l("minutes")],mm:[i,l("minutes")],H:[i,l("hours")],h:[i,l("hours")],HH:[i,l("hours")],hh:[i,l("hours")],D:[i,l("day")],DD:[r,l("day")],Do:[o,function(e){var t=a.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],w:[i,l("week")],ww:[r,l("week")],M:[i,l("month")],MM:[r,l("month")],MMM:[o,function(e){var t=u("months"),n=(u("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,l("year")],Z:c,ZZ:c};function h(n){var r,i;r=n,i=a&&a.formats;for(var o=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})})).match(t),s=o.length,l=0;l-1)return new Date(("X"===t?1e3:1)*e);var i=h(t)(e),o=i.year,a=i.month,s=i.day,l=i.hours,c=i.minutes,u=i.seconds,d=i.milliseconds,p=i.zone,m=i.week,f=new Date,g=s||(o||a?1:f.getDate()),y=o||f.getFullYear(),v=0;o&&!a||(v=a>0?a-1:f.getMonth());var b,x=l||0,I=c||0,w=u||0,k=d||0;return p?new Date(Date.UTC(y,v,g,x,I,w,k+60*p.offset*1e3)):n?new Date(Date.UTC(y,v,g,x,I,w,k)):(b=new Date(y,v,g,x,I,w,k),m&&(b=r(b).week(m).toDate()),b)}catch(e){return new Date("")}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date("")),a={}}else if(s instanceof Array)for(var p=s.length,m=1;m<=p;m+=1){o[1]=s[m-1];var f=n.apply(this,o);if(f.isValid()){this.$d=f.$d,this.$L=f.$L,this.init();break}m===p&&(this.$d=new Date(""))}else i.call(this,e)}}}()},1020(e,t,n){"use strict";var r=n(1609),i=Symbol.for("react.element"),o=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,l={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)o.call(t,r)&&!s.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===l[r]&&(l[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:l,_owner:a.current}}t.jsx=l,t.jsxs=l},1609(e){"use strict";e.exports=window.React},2162(e,t,n){"use strict";var r=n(1609),i=n(9888),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=i.useSyncExternalStore,s=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=c(function(){function e(e){if(!l){if(l=!0,a=e,e=r(e),void 0!==i&&p.hasValue){var t=p.value;if(i(t,e))return s=t}return s=e}if(t=s,o(a,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(a=e,t):(a=e,s=n)}var a,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,i]);var h=a(e,d[0],d[1]);return l(function(){p.hasValue=!0,p.value=h},[h]),u(h),h}},3072(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,f=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function I(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case f:case l:return e;default:return t}}case i:return t}}}function w(e){return I(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=o,t.Lazy=g,t.Memo=f,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return w(e)||I(e)===u},t.isConcurrentMode=w,t.isContextConsumer=function(e){return I(e)===c},t.isContextProvider=function(e){return I(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return I(e)===p},t.isFragment=function(e){return I(e)===o},t.isLazy=function(e){return I(e)===g},t.isMemo=function(e){return I(e)===f},t.isPortal=function(e){return I(e)===i},t.isProfiler=function(e){return I(e)===s},t.isStrictMode=function(e){return I(e)===a},t.isSuspense=function(e){return I(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===a||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===f||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===v||e.$$typeof===b||e.$$typeof===x||e.$$typeof===y)},t.typeOf=I},3404(e,t,n){"use strict";e.exports=n(3072)},4146(e,t,n){"use strict";var r=n(3404),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var i=h(n);i&&i!==m&&e(t,i,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),f=l(n),g=0;g=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(i,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(v=i),i||!r&&v},k=function(e,t){if(I(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new M(n)},S=y;S.l=w,S.i=I,S.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var M=function(){function f(e){this.$L=w(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var g=f.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(S.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(h);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return S},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=k(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return k(e)25){var o=i(this).startOf(t).add(1,t).date(r),a=i(this).endOf(e);if(o.isBefore(a))return 1}var s=i(this).startOf(t).date(r).startOf(e).subtract(1,"millisecond"),l=this.diff(s,e,!0);return l<0?i(this).startOf("week").week():Math.ceil(l)},o.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}()},8493(e,t,n){"use strict";var r=n(1609),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,a=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return s(function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})},[e,n,t]),a(function(){return c(i)&&u({inst:i}),e(function(){c(i)&&u({inst:i})})},[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},9242(e,t,n){"use strict";e.exports=n(2162)},9853(e){var t=.1,n="function"==typeof Float32Array;function r(e,t){return 1-3*t+3*e}function i(e,t){return 3*t-6*e}function o(e){return 3*e}function a(e,t,n){return((r(t,n)*e+i(t,n))*e+o(t))*e}function s(e,t,n){return 3*r(t,n)*e*e+2*i(t,n)*e+o(t)}function l(e){return e}e.exports=function(e,r,i,o){if(!(0<=e&&e<=1&&0<=i&&i<=1))throw new Error("bezier x values must be in [0, 1] range");if(e===r&&i===o)return l;for(var c=n?new Float32Array(11):new Array(11),u=0;u<11;++u)c[u]=a(u*t,e,i);return function(n){return 0===n?0:1===n?1:a(function(n){for(var r=0,o=1;10!==o&&c[o]<=n;++o)r+=t;--o;var l=r+(n-c[o])/(c[o+1]-c[o])*t,u=s(l,e,i);return u>=.001?function(e,t,n,r){for(var i=0;i<4;++i){var o=s(t,n,r);if(0===o)return t;t-=(a(t,n,r)-e)/o}return t}(n,l,e,i):0===u?l:function(e,t,n,r,i){var o,s,l=0;do{(o=a(s=t+(n-t)/2,r,i)-e)>0?n=s:t=s}while(Math.abs(o)>1e-7&&++l<10);return s}(n,r,r+t,e,i)}(n),r,o)}}},9888(e,t,n){"use strict";e.exports=n(8493)}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return i[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=i,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);a.r(i);var o={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>o[e]=()=>n[e]);return o.default=()=>n,a.d(i,o),i},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,n)=>(a.f[n](e,t),t),[])),a.u=e=>e+".dash_mui_charts.min.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="dash_mui_charts:",a.l=(e,t,i,o)=>{if(n[e])n[e].push(t);else{var s,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;u{s.onerror=s.onload=null,clearTimeout(h);var i=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach(e=>e(r)),t)return t(r)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),l&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})();var s,l=function(){var e=document.currentScript;if(!e){for(var t=document.getElementsByTagName("script"),n=[],r=0;r{var e={57:0};a.f.j=(t,n)=>{var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise((n,i)=>r=e[t]=[n,i]);n.push(r[2]=i);var o=a.p+a.u(t),s=new Error;a.l(o,n=>{if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",s.name="ChunkLoadError",s.type=i,s.request=o,r[1](s)}},"chunk-"+t,t)}};var t=(t,n)=>{var r,i,[o,s,l]=n,c=0;if(o.some(t=>0!==e[t])){for(r in s)a.o(s,r)&&(a.m[r]=s[r]);l&&l(a)}for(t&&t(n);c{"use strict";a.r(u),a.d(u,{BarChart:()=>YR,CandlestickChart:()=>iD,CompositeChart:()=>dR,Heatmap:()=>Nj,LineChart:()=>$A,LiveTradingChart:()=>ER,PieChart:()=>PL,ScatterChart:()=>KL,SimpleTreeView:()=>nF,SparklineChart:()=>DO,TimeClock:()=>AU,TreeView:()=>z_,TreeViewPro:()=>jB});var e=a(1609),t=a.t(e,2),n=a.n(e);const r=window.PropTypes;var i=a.n(r);const o="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();o.__MUI_LICENSE_INFO__=o.__MUI_LICENSE_INFO__||{key:void 0};class s{static getLicenseInfo(){return o.__MUI_LICENSE_INFO__}static getLicenseKey(){return s.getLicenseInfo().key}static setLicenseKey(e){s.getLicenseInfo().key=e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t{},h={licenseVerification:()=>null},m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f=e=>{let t,n,r,i,o,a,s,l="",c=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");c>4,n=(15&o)<<4|a>>2,r=(3&a)<<6|s,l+=String.fromCharCode(t),64!=a&&(l+=String.fromCharCode(n)),64!=s&&(l+=String.fromCharCode(r));return l},g=[];let y=0;for(;y<64;)g[y]=0|4294967296*Math.sin(++y%Math.PI);let v=function(e){return e.NotFound="NotFound",e.Invalid="Invalid",e.ExpiredAnnual="ExpiredAnnual",e.ExpiredAnnualGrace="ExpiredAnnualGrace",e.ExpiredVersion="ExpiredVersion",e.Valid="Valid",e.OutOfScope="OutOfScope",e.NotAvailableInInitialProPlan="NotAvailableInInitialProPlan",e}({});const b=["pro","premium"],x=["perpetual","annual","subscription"],I=/^.*EXPIRY=([0-9]+),.*$/,w=/^.*ORDER:([0-9]+),.*$/,k=["x-data-grid-pro","x-date-pickers-pro"];function S({releaseInfo:e,licenseKey:t,packageName:n}){if(!e)throw new Error("MUI X: The release information is missing. Not able to validate license.");if(!t)return{status:v.NotFound};const r=t.substr(0,32),i=t.substr(32);if(r!==function(e){const t=[];let n,r,i,o=unescape(encodeURI(e))+"€",a=o.length;const s=[n=1732584193,r=4023233417,~n,~r];for(e=--a/4+2|15,t[--e]=8*a;~a;)t[a>>2]|=o.charCodeAt(a)<<8*a--;for(y=o=0;y>4]+g[o]+~~t[y|15&[o,5*o+1,3*o+5,7*o][a]])<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+o++%4])|i>>>-a),n,r])n=0|a[1],r=a[2];for(o=4;o;)s[--o]+=a[o]}for(e="";o<32;)e+=(s[o>>3]>>4*(1^o++)&15).toString(16);return e}(i))return{status:v.Invalid};const o=function(e){const t=f(e);return t.includes("KEYVERSION=1")?function(e){let t,n;try{t=parseInt(e.match(I)[1],10),t&&!Number.isNaN(t)||(t=null),n=parseInt(e.match(w)[1],10),n&&!Number.isNaN(n)||(n=null)}catch(e){t=null,n=null}return{version:1,licenseModel:"perpetual",planScope:"pro",planVersion:"initial",expiryTimestamp:t,expiryDate:t?new Date(t):null,orderId:n}}(t):t.includes("KV=2")?function(e){const t={version:2,licenseModel:null,planScope:null,planVersion:"initial",expiryTimestamp:null,expiryDate:null,orderId:null};return e.split(",").map(e=>e.split("=")).filter(e=>2===e.length).forEach(([e,n])=>{if("S"===e&&(t.planScope=n),"LM"===e&&(t.licenseModel=n),"E"===e){const e=parseInt(n,10);e&&!Number.isNaN(e)&&(t.expiryTimestamp=e,t.expiryDate=new Date(e))}if("PV"===e&&(t.planVersion=n),"O"===e){const e=parseInt(n,10);e&&!Number.isNaN(e)&&(t.orderId=e)}}),t}(t):null}(i);if(null==o)return console.error("MUI X: Error checking license. Key version not found!"),{status:v.Invalid};if(null==o.licenseModel||!x.includes(o.licenseModel))return console.error("MUI X: Error checking license. License model not found or invalid!"),{status:v.Invalid};if(null==o.expiryTimestamp)return console.error("MUI X: Error checking license. Expiry timestamp not found or invalid!"),{status:v.Invalid};o.licenseModel;{const t=parseInt(f(e),10);if(Number.isNaN(t))throw new Error("MUI X: The release information is invalid. Not able to validate license.");if(o.expiryTimestamp{const e=r??M.getLicenseKey();if(T[t]&&T[t].key===e)return T[t].licenseVerifier;const i=t.includes("premium")?"Premium":"Pro",o=S({releaseInfo:n,licenseKey:e,packageName:t}),a=`@mui/${t}`;return p(h.licenseVerification({licenseKey:e},{packageName:t,packageReleaseInfo:n,licenseStatus:o?.status})),o.status===v.Valid||(o.status===v.Invalid?P(["MUI X: Invalid license key.","","Your MUI X license key format isn't valid. It could be because the license key is missing a character or has a typo.","","To solve the issue, you need to double check that `setLicenseKey()` is called with the right argument","Please check the license key installation https://mui.com/r/x-license-key-installation."]):o.status===v.NotAvailableInInitialProPlan?P(["MUI X: Component not included in your license.","","The component you are trying to use is not included in the Pro Plan you purchased.","","Your license is from an old version of the Pro Plan that is only compatible with the `@mui/x-data-grid-pro` and `@mui/x-date-pickers-pro` commercial packages.","","To start using another Pro package, please consider reaching to our sales team to upgrade your license or visit https://mui.com/r/x-get-license to get a new license key."]):o.status===v.OutOfScope?function({packageName:e}){const t=e.replace(/-(premium|pro)$/,"");P(["MUI X: License key plan mismatch.","","Your use of MUI X is not compatible with the plan of your license key. The feature you are trying to use is not included in the plan of your license key. This happens if you try to use Data Grid Premium with a license key for the Pro plan.","","To solve the issue, you can upgrade your plan from Pro to Premium at https://mui.com/r/x-get-license?scope=premium.",`Or if you didn't intend to use Premium features, you can replace the import of \`${t}-premium\` with \`${t}-pro\`.`])}({packageName:a}):o.status===v.NotFound?function({plan:e,packageName:t}){P(["MUI X: Missing license key.","",`The license key is missing. You might not be allowed to use \`${t}\` which is part of MUI X ${e}.`,"","To solve the issue, you can check the free trial conditions: https://mui.com/r/x-license-trial.","If you are eligible no actions are required. If you are not eligible to the free trial, you need to purchase a license https://mui.com/r/x-get-license or stop using the software immediately."])}({plan:i,packageName:a}):o.status===v.ExpiredAnnualGrace?function({plan:e,licenseKey:t,expiryTimestamp:n}){P(["MUI X: Expired license key.","",`Your annual license key to use MUI X ${e} in non-production environments has expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${e} component (more details in https://mui.com/r/x-license-annual).`,"","To solve the problem you can either:","","- Renew your license https://mui.com/r/x-get-license and use the new key",`- Stop making changes to code depending directly or indirectly on MUI X ${e}'s APIs`,"","Note that your license is perpetual in production environments with any version released before your license term ends.","",`- License key expiry timestamp: ${new Date(n)}`,`- Installed license key: ${t}`,""])}(l({plan:i},o.meta)):o.status===v.ExpiredAnnual?function({plan:e,licenseKey:t,expiryTimestamp:n}){throw new Error(["MUI X: Expired license key.","",`Your annual license key to use MUI X ${e} in non-production environments has expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${e} component (more details in https://mui.com/r/x-license-annual).`,"","To solve the problem you can either:","","- Renew your license https://mui.com/r/x-get-license and use the new key",`- Stop making changes to code depending directly or indirectly on MUI X ${e}'s APIs`,"","Note that your license is perpetual in production environments with any version released before your license term ends.","",`- License key expiry timestamp: ${new Date(n)}`,`- Installed license key: ${t}`,""].join("\n"))}(l({plan:i},o.meta)):o.status===v.ExpiredVersion&&function({packageName:e}){P(["MUI X: Expired package version.","",`You have installed a version of \`${e}\` that is outside of the maintenance plan of your license key. By default, commercial licenses provide access to new versions released during the first year after the purchase.`,"","To solve the issue, you can renew your license https://mui.com/r/x-get-license or install an older version of the npm package that is compatible with your license key."])}({packageName:a})),T[t]={key:e,licenseVerifier:o},o},[t,n,r])}var O=a(4848);function j(e){switch(e){case v.ExpiredAnnualGrace:case v.ExpiredAnnual:return"MUI X Expired license key";case v.ExpiredVersion:return"MUI X Expired package version";case v.Invalid:return"MUI X Invalid license key";case v.OutOfScope:return"MUI X License key plan mismatch";case v.NotAvailableInInitialProPlan:return"MUI X Product not covered by plan";case v.NotFound:return"MUI X Missing license key";default:throw new Error("Unhandled MUI X license status.")}}const L=(R=function(e){const{packageName:t,releaseInfo:n}=e,r=A(t,n);return r.status===v.Valid?null:(0,O.jsx)("div",{style:{position:"absolute",pointerEvents:"none",color:"#8282829e",zIndex:1e5,width:"100%",textAlign:"center",bottom:"50%",right:0,letterSpacing:5,fontSize:24},children:j(r.status)})},e.memo(R,d));var R;let D=0;const $={...t}.useId;function z(t){if(void 0!==$){const e=$();return t??e}return function(t){const[n,r]=e.useState(t),i=t||n;return e.useEffect(()=>{null==n&&(D+=1,r(`mui-${D}`))},[n]),i}(t)}var N=a(9888),_=a(9242);const F=parseInt(e.version,10),H=F>=19?function(t,n,r,i,o){const a=e.useCallback(()=>n(t.getSnapshot(),r,i,o),[t,n,r,i,o]);return(0,N.useSyncExternalStore)(t.subscribe,a,a)}:function(e,t,n,r,i){return(0,_.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))};class B{static create(e){return new B(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){this.state=e,this.updateTick+=1;const t=this.updateTick,n=this.listeners.values();let r;for(;r=n.next(),!r.done;){if(t!==this.updateTick)return;(0,r.value)(e)}}update(e){for(const t in e)if(!Object.is(this.state[t],e[t]))return void this.setState(l({},this.state,e))}set(e,t){Object.is(this.state[e],t)||this.setState(l({},this.state,{[e]:t}))}use=(()=>(e,t,n,r)=>function(e,t,n,r,i){return H(e,t,n,r,i)}(this,e,t,n,r))()}const V="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,U=({params:t,store:n})=>{e.useEffect(()=>{n.set("animation",l({},n.state.animation,{skip:t.skipAnimation}))},[n,t.skipAnimation]);const r=e.useCallback(()=>{let e=!1;return n.set("animation",l({},n.state.animation,{skipAnimationRequests:n.state.animation.skipAnimationRequests+1})),()=>{e||(e=!0,n.set("animation",l({},n.state.animation,{skipAnimationRequests:n.state.animation.skipAnimationRequests-1})))}},[n]);return V(()=>{if("undefined"==typeof window||!window?.matchMedia)return;let e;const t=t=>{t.matches?e=r():e?.()},n=window.matchMedia("(prefers-reduced-motion)");return t(n),n.addEventListener("change",t),()=>{n.removeEventListener("change",t)}},[r,n]),{instance:{disableAnimation:r}}};function Y(t,n){const r=e.useRef(!0);e.useEffect(()=>{if(!r.current)return t();r.current=!1},n)}U.params={skipAnimation:!0},U.getDefaultizedParams=({params:e})=>l({},e,{skipAnimation:e.skipAnimation??!1}),U.getInitialState=({skipAnimation:e})=>("undefined"==typeof window||window,{animation:{skip:e,skipAnimationRequests:0}});const W="DEFAULT_X_AXIS_KEY",G="DEFAULT_Y_AXIS_KEY",K={top:20,bottom:20,left:20,right:20};var q=Symbol("NOT_FOUND");var X=e=>Array.isArray(e)?e:[e];Symbol(),Object.getPrototypeOf({});var Z=(e,t)=>e===t;function J(e,t){const n="object"==typeof t?t:{equalityCheck:t},{equalityCheck:r=Z,maxSize:i=1,resultEqualityCheck:o}=n,a=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;const{length:r}=t;for(let i=0;it&&e(t.key,n)?t.value:q,put(e,n){t={key:e,value:n}},getEntries:()=>t?[t]:[],clear(){t=void 0}}}(a):function(e,t){let n=[];function r(e){const r=n.findIndex(n=>t(e,n.key));if(r>-1){const e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return q}return{get:r,put:function(t,i){r(t)===q&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(i,a);function c(){let t=l.get(arguments);if(t===q){if(t=e.apply(null,arguments),s++,o){const e=l.getEntries().find(e=>o(e.value,t));e&&(t=e.value,0!==s&&s--)}l.put(arguments,t)}return t}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c}var Q="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function ee(){return{s:0,v:void 0,o:null,p:null}}function te(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let i,o=0;function a(){let t=n;const{length:a}=arguments;for(let e=0,n=a;e{n={s:0,v:void 0,o:null,p:null},a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function ne(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,i=0,o={},a=e.pop();"object"==typeof a&&(o=a,a=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const s={...n,...o},{memoize:l,memoizeOptions:c=[],argsMemoize:u=te,argsMemoizeOptions:d=[],devModeChecks:p={}}=s,h=X(c),m=X(d),f=function(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}(e),g=l(function(){return r++,a.apply(null,arguments)},...h),y=u(function(){i++;const e=function(e,t){const n=[],{length:r}=e;for(let i=0;ii,resetDependencyRecomputations:()=>{i=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:l,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var re=ne(te),ie=Object.assign((e,t=re)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e),r=t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}));return r},{withTypes:()=>ie});const oe=ne({memoize:J,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),ae=(e,t,n,r,i,o,a,s,...l)=>{if(l.length>0)throw new Error("Unsupported number of selectors");let c;if(e&&t&&n&&r&&i&&o&&a&&s)c=(l,c,u,d)=>{const p=e(l,c,u,d),h=t(l,c,u,d),m=n(l,c,u,d),f=r(l,c,u,d),g=i(l,c,u,d),y=o(l,c,u,d),v=a(l,c,u,d);return s(p,h,m,f,g,y,v,c,u,d)};else if(e&&t&&n&&r&&i&&o&&a)c=(s,l,c,u)=>{const d=e(s,l,c,u),p=t(s,l,c,u),h=n(s,l,c,u),m=r(s,l,c,u),f=i(s,l,c,u),g=o(s,l,c,u);return a(d,p,h,m,f,g,l,c,u)};else if(e&&t&&n&&r&&i&&o)c=(a,s,l,c)=>{const u=e(a,s,l,c),d=t(a,s,l,c),p=n(a,s,l,c),h=r(a,s,l,c),m=i(a,s,l,c);return o(u,d,p,h,m,s,l,c)};else if(e&&t&&n&&r&&i)c=(o,a,s,l)=>{const c=e(o,a,s,l),u=t(o,a,s,l),d=n(o,a,s,l),p=r(o,a,s,l);return i(c,u,d,p,a,s,l)};else if(e&&t&&n&&r)c=(i,o,a,s)=>{const l=e(i,o,a,s),c=t(i,o,a,s),u=n(i,o,a,s);return r(l,c,u,o,a,s)};else if(e&&t&&n)c=(r,i,o,a)=>{const s=e(r,i,o,a),l=t(r,i,o,a);return n(s,l,i,o,a)};else if(e&&t)c=(n,r,i,o)=>{const a=e(n,r,i,o);return t(a,r,i,o)};else{if(!e)throw new Error("Missing arguments");c=e}return c},se=e=>(...t)=>{const n=new WeakMap;let r=1;const i=t[t.length-1],o=t.length-1||1,a=Math.max(i.length-o,0);if(a>3)throw new Error("Unsupported number of arguments");return(o,s,l,c)=>{let u=o.__cacheKey__;u||(u={id:r},o.__cacheKey__=u,r+=1);let d=n.get(u);if(!d){const r=1===t.length?[e=>e,i]:t;let o=t;const s=[void 0,void 0,void 0];switch(a){case 0:break;case 1:o=[...r.slice(0,-1),()=>s[0],i];break;case 2:o=[...r.slice(0,-1),()=>s[0],()=>s[1],i];break;case 3:o=[...r.slice(0,-1),()=>s[0],()=>s[1],()=>s[2],i];break;default:throw new Error("Unsupported number of arguments")}e&&(o=[...o,e]),d=oe(...o),d.selectorArgs=s,n.set(u,d)}switch(a){case 3:d.selectorArgs[2]=c;case 2:d.selectorArgs[1]=l;case 1:d.selectorArgs[0]=s}switch(a){case 0:return d(o);case 1:return d(o,s);case 2:return d(o,s,l);case 3:return d(o,s,l,c);default:throw new Error("unreachable")}}},le=se(),ce=e=>e.cartesianAxis?.x,ue=e=>e.cartesianAxis?.y,de=le(ae(ue,function(e){return(e??[]).reduce((e,t)=>"left"===t.position?e+(t.width||0)+(t.zoom?.slider.enabled?t.zoom.slider.size:0):e,0)}),ae(ue,function(e){return(e??[]).reduce((e,t)=>"right"===t.position?e+(t.width||0)+(t.zoom?.slider.enabled?t.zoom.slider.size:0):e,0)}),ae(ce,function(e){return(e??[]).reduce((e,t)=>"top"===t.position?e+(t.height||0)+(t.zoom?.slider.enabled?t.zoom.slider.size:0):e,0)}),ae(ce,function(e){return(e??[]).reduce((e,t)=>"bottom"===t.position?e+(t.height||0)+(t.zoom?.slider.enabled?t.zoom.slider.size:0):e,0)}),function(e,t,n,r){return{left:e,right:t,top:n,bottom:r}}),pe=e=>e.dimensions,he=le(pe,e=>e.dimensions.margin,de,function({width:e,height:t},{top:n,right:r,bottom:i,left:o},{left:a,right:s,top:l,bottom:c}){return{width:e-o-r-a-s,left:o+a,right:r+s,height:t-n-i-l-c,top:n+l,bottom:i+c}}),me=ae(pe,e=>e.width),fe=ae(pe,e=>e.height),ge=ae(pe,e=>e.propsWidth),ye=ae(pe,e=>e.propsHeight);function ve(e,t){return"number"==typeof e?{top:e,bottom:e,left:e,right:e}:t?l({},t,e):e}const be=({params:t,store:n,svgRef:r})=>{const i=void 0!==t.width&&void 0!==t.height,o=e.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[a,s]=e.useState(0),[l,c]=e.useState(0),u=e.useCallback(()=>{const e=r?.current;if(!e)return{};const i=function(e){const t=function(e){return e&&e.ownerDocument||document}(e);return t.defaultView||window}(e).getComputedStyle(e),o=Math.floor(parseFloat(i.height))||0,a=Math.floor(parseFloat(i.width))||0;return n.state.dimensions.width===a&&n.state.dimensions.height===o||n.set("dimensions",{margin:{top:t.margin.top,right:t.margin.right,bottom:t.margin.bottom,left:t.margin.left},width:t.width??a,height:t.height??o,propsWidth:t.width,propsHeight:t.height}),{height:o,width:a}},[n,r,t.height,t.width,t.margin.left,t.margin.right,t.margin.top,t.margin.bottom]);Y(()=>{const e=t.width??n.state.dimensions.width,r=t.height??n.state.dimensions.height;n.set("dimensions",{margin:{top:t.margin.top,right:t.margin.right,bottom:t.margin.bottom,left:t.margin.left},width:e,height:r,propsHeight:t.height,propsWidth:t.width})},[n,t.height,t.width,t.margin.left,t.margin.right,t.margin.top,t.margin.bottom]),e.useEffect(()=>{o.current.displayError=!0},[]),V(()=>{if(i||!o.current.initialCompute||o.current.computeRun>10)return;const e=u();e.width!==a||e.height!==l?(o.current.computeRun+=1,void 0!==e.width&&s(e.width),void 0!==e.height&&c(e.height)):o.current.initialCompute&&(o.current.initialCompute=!1)},[l,a,u,i]),V(()=>{if(i)return()=>{};u();const e=r.current;if("undefined"==typeof ResizeObserver)return()=>{};let t;const n=new ResizeObserver(()=>{t=requestAnimationFrame(()=>{u()})});return e&&n.observe(e),()=>{t&&cancelAnimationFrame(t),e&&n.unobserve(e)}},[u,i,r]);const d=n.use(he),p=e.useCallback(e=>e>=d.left-1&&e<=d.left+d.width,[d.left,d.width]),h=e.useCallback(e=>e>=d.top-1&&e<=d.top+d.height,[d.height,d.top]);return{instance:{isPointInside:e.useCallback((e,t,n)=>!!(n&&"closest"in n&&n.closest("[data-drawing-container]"))||p(e)&&h(t),[p,h]),isXInside:p,isYInside:h}}};be.params={width:!0,height:!0,margin:!0},be.getDefaultizedParams=({params:e})=>l({},e,{margin:ve(e.margin,K)}),be.getInitialState=({width:e,height:t,margin:n})=>({dimensions:{margin:n,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const xe=({params:e,store:t})=>(V(()=>{t.set("experimentalFeatures",e.experimentalFeatures)},[t,e.experimentalFeatures]),{});xe.params={experimentalFeatures:!0},xe.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});let Ie=0;const we=({params:t,store:n})=>(e.useEffect(()=>{void 0===t.id||t.id===n.state.id.providedChartId&&void 0!==n.state.id.chartId||n.set("id",l({},n.state.id,{chartId:t.id??(Ie+=1,`mui-chart-${Ie}`)}))},[n,t.id]),{});we.params={id:!0},we.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const ke=function(t){const n=e.useRef(t);return V(()=>{n.current=t}),e.useRef((...e)=>(0,n.current)(...e)).current},Se=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],Me=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],Ce=e=>"dark"===e?Me:Se,Pe=({series:e,colors:t,seriesConfig:n})=>{const r={};return e.forEach((e,i)=>{const o=n[e.type].getSeriesWithDefaultValues(e,i,t),a=o.id;if(void 0===r[e.type]&&(r[e.type]={series:{},seriesOrder:[]}),void 0!==r[e.type]?.series[a])throw new Error(`MUI X Charts: series' id "${a}" is not unique.`);r[e.type].series[a]=o,r[e.type].seriesOrder.push(a)}),r},Ee=(e,t)=>{const n=e[t.type]?.identifierSerializer;if(!n)throw new Error(`MUI X Charts: No identifier serializer found for series type "${t.type}".`);return n(t)},Te=({params:e,store:t,seriesConfig:n})=>{const{series:r,dataset:i,theme:o,colors:a}=e;Y(()=>{t.set("series",l({},t.state.series,{defaultizedSeries:Pe({series:r,colors:"function"==typeof a?a(o):a,seriesConfig:n}),dataset:i}))},[a,i,r,o,n,t]);const s=ke(e=>Ee(n,e));return{instance:{serializeIdentifier:s}}};Te.params={dataset:!0,series:!0,colors:!0,theme:!0};const Ae=[];Te.getDefaultizedParams=({params:e})=>l({},e,{series:e.series?.length?e.series:Ae,colors:e.colors??Ce,theme:e.theme??"light"}),Te.getInitialState=({series:e=[],colors:t,theme:n,dataset:r},i,o)=>({series:{seriesConfig:o,defaultizedSeries:Pe({series:e,colors:"function"==typeof t?t(n):t,seriesConfig:o}),dataset:r}});class Oe{activeGestures=(()=>new Map)();registerActiveGesture(e,t){this.activeGestures.has(e)||this.activeGestures.set(e,new Set);const n={gesture:t,element:e};this.activeGestures.get(e).add(n)}unregisterActiveGesture(e,t){const n=this.activeGestures.get(e);n&&(n.forEach(e=>{e.gesture===t&&n.delete(e)}),0===n.size&&this.activeGestures.delete(e))}getActiveGestures(e){const t=this.activeGestures.get(e);return t?Array.from(t).reduce((e,t)=>(e[t.gesture.name]=!0,e),{}):{}}isGestureActive(e,t){const n=this.activeGestures.get(e);return!!n&&Array.from(n).some(e=>e.gesture===t)}destroy(){this.activeGestures.clear()}unregisterElement(e){this.activeGestures.delete(e)}}class je{pressedKeys=(()=>new Set)();constructor(){this.initialize()}initialize(){"undefined"!=typeof window&&(window.addEventListener("keydown",this.handleKeyDown),window.addEventListener("keyup",this.handleKeyUp),window.addEventListener("blur",this.clearKeys))}handleKeyDown=e=>{this.pressedKeys.add(e.key)};handleKeyUp=e=>{this.pressedKeys.delete(e.key)};clearKeys=()=>{this.pressedKeys.clear()};areKeysPressed(e){return!e||0===e.length||e.every(e=>"ControlOrMeta"===e?navigator.platform.includes("Mac")?this.pressedKeys.has("Meta"):this.pressedKeys.has("Control"):this.pressedKeys.has(e))}destroy(){"undefined"!=typeof window&&(window.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("keyup",this.handleKeyUp),window.removeEventListener("blur",this.clearKeys)),this.clearKeys()}}class Le{preventEventInterruption=!0;pointers=(()=>new Map)();gestureHandlers=(()=>new Set)();constructor(e){this.root=e.root??document.getRootNode({composed:!0})??document.body,this.touchAction=e.touchAction||"auto",this.passive=e.passive??!1,this.preventEventInterruption=e.preventEventInterruption??!0,this.setupEventListeners()}registerGestureHandler(e){return this.gestureHandlers.add(e),()=>{this.gestureHandlers.delete(e)}}getPointers(){return new Map(this.pointers)}setupEventListeners(){"auto"!==this.touchAction&&(this.root.style.touchAction=this.touchAction),this.root.addEventListener("pointerdown",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointermove",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointerup",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointercancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("forceCancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("blur",this.handleInterruptEvents),this.root.addEventListener("contextmenu",this.handleInterruptEvents)}handleInterruptEvents=e=>{if(this.preventEventInterruption&&"pointerType"in e&&"touch"===e.pointerType)return void e.preventDefault();const t=new PointerEvent("forceCancel",{bubbles:!1,cancelable:!1}),n=this.pointers.values().next().value;if(this.pointers.size>0&&n){Object.defineProperties(t,{clientX:{value:n.clientX},clientY:{value:n.clientY},pointerId:{value:n.pointerId},pointerType:{value:n.pointerType}});for(const[e,t]of this.pointers.entries()){const n=l({},t,{type:"forceCancel"});this.pointers.set(e,n)}}this.notifyHandlers(t),this.pointers.clear()};handlePointerEvent=e=>{const{type:t,pointerId:n}=e;if("pointerdown"===t||"pointermove"===t)this.pointers.set(n,this.createPointerData(e));else if("pointerup"===t||"pointercancel"===t||"forceCancel"===t)return this.pointers.set(n,this.createPointerData(e)),this.notifyHandlers(e),void this.pointers.delete(n);this.notifyHandlers(e)};notifyHandlers(e){this.gestureHandlers.forEach(t=>t(this.pointers,e))}createPointerData(e){return{pointerId:e.pointerId,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,target:e.target,timeStamp:e.timeStamp,type:e.type,isPrimary:e.isPrimary,pressure:e.pressure,width:e.width,height:e.height,pointerType:e.pointerType,srcEvent:e}}destroy(){this.root.removeEventListener("pointerdown",this.handlePointerEvent),this.root.removeEventListener("pointermove",this.handlePointerEvent),this.root.removeEventListener("pointerup",this.handlePointerEvent),this.root.removeEventListener("pointercancel",this.handlePointerEvent),this.root.removeEventListener("forceCancel",this.handlePointerEvent),this.root.removeEventListener("blur",this.handleInterruptEvents),this.root.removeEventListener("contextmenu",this.handleInterruptEvents),this.pointers.clear(),this.gestureHandlers.clear()}}class Re{gestureTemplates=(()=>new Map)();elementGestureMap=(()=>new Map)();activeGesturesRegistry=(()=>new Oe)();keyboardManager=(()=>new je)();constructor(e){this.pointerManager=new Le({root:e.root,touchAction:e.touchAction,passive:e.passive}),e.gestures&&e.gestures.length>0&&e.gestures.forEach(e=>{this.addGestureTemplate(e)})}addGestureTemplate(e){this.gestureTemplates.has(e.name)&&console.warn(`Gesture template with name "${e.name}" already exists. It will be overwritten.`),this.gestureTemplates.set(e.name,e)}setGestureOptions(e,t,n){const r=this.elementGestureMap.get(t);if(!r||!r.has(e))return void console.error(`Gesture "${e}" not found on the provided element.`);const i=new CustomEvent(`${e}ChangeOptions`,{detail:n,bubbles:!1,cancelable:!1,composed:!1});t.dispatchEvent(i)}setGestureState(e,t,n){const r=this.elementGestureMap.get(t);if(!r||!r.has(e))return void console.error(`Gesture "${e}" not found on the provided element.`);const i=new CustomEvent(`${e}ChangeState`,{detail:n,bubbles:!1,cancelable:!1,composed:!1});t.dispatchEvent(i)}registerElement(e,t,n){return Array.isArray(e)||(e=[e]),e.forEach(e=>{const r=n?.[e];this.registerSingleGesture(e,t,r)}),t}registerSingleGesture(e,t,n){const r=this.gestureTemplates.get(e);if(!r)return console.error(`Gesture template "${e}" not found.`),!1;this.elementGestureMap.has(t)||this.elementGestureMap.set(t,new Map);const i=this.elementGestureMap.get(t);i.has(e)&&(console.warn(`Element already has gesture "${e}" registered. It will be replaced.`),this.unregisterElement(e,t));const o=r.clone(n);return o.init(t,this.pointerManager,this.activeGesturesRegistry,this.keyboardManager),i.set(e,o),!0}unregisterElement(e,t){const n=this.elementGestureMap.get(t);return!(!n||!n.has(e))&&(n.get(e).destroy(),n.delete(e),this.activeGesturesRegistry.unregisterElement(t),0===n.size&&this.elementGestureMap.delete(t),!0)}unregisterAllGestures(e){const t=this.elementGestureMap.get(e);if(t){for(const[,n]of t)n.destroy(),this.activeGesturesRegistry.unregisterElement(e);this.elementGestureMap.delete(e)}}destroy(){for(const[e]of this.elementGestureMap)this.unregisterAllGestures(e);this.gestureTemplates.clear(),this.elementGestureMap.clear(),this.activeGesturesRegistry.destroy(),this.keyboardManager.destroy(),this.pointerManager.destroy()}}const De={abort:!0,animationcancel:!0,animationend:!0,animationiteration:!0,animationstart:!0,auxclick:!0,beforeinput:!0,beforetoggle:!0,blur:!0,cancel:!0,canplay:!0,canplaythrough:!0,change:!0,click:!0,close:!0,compositionend:!0,compositionstart:!0,compositionupdate:!0,contextlost:!0,contextmenu:!0,contextrestored:!0,copy:!0,cuechange:!0,cut:!0,dblclick:!0,drag:!0,dragend:!0,dragenter:!0,dragleave:!0,dragover:!0,dragstart:!0,drop:!0,durationchange:!0,emptied:!0,ended:!0,error:!0,focus:!0,focusin:!0,focusout:!0,formdata:!0,gotpointercapture:!0,input:!0,invalid:!0,keydown:!0,keypress:!0,keyup:!0,load:!0,loadeddata:!0,loadedmetadata:!0,loadstart:!0,lostpointercapture:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,paste:!0,pause:!0,play:!0,playing:!0,pointercancel:!0,pointerdown:!0,pointerenter:!0,pointerleave:!0,pointermove:!0,pointerout:!0,pointerover:!0,pointerup:!0,progress:!0,ratechange:!0,reset:!0,resize:!0,scroll:!0,scrollend:!0,securitypolicyviolation:!0,seeked:!0,seeking:!0,select:!0,selectionchange:!0,selectstart:!0,slotchange:!0,stalled:!0,submit:!0,suspend:!0,timeupdate:!0,toggle:!0,touchcancel:!0,touchend:!0,touchmove:!0,touchstart:!0,transitioncancel:!0,transitionend:!0,transitionrun:!0,transitionstart:!0,volumechange:!0,waiting:!0,webkitanimationend:!0,webkitanimationiteration:!0,webkitanimationstart:!0,webkittransitionend:!0,wheel:!0,beforematch:!0,pointerrawupdate:!0};class $e{customData={};constructor(e){if(!e||!e.name)throw new Error("Gesture must be initialized with a valid name.");if(e.name in De)throw new Error(`Gesture can't be created with a native event name. Tried to use "${e.name}". Please use a custom name instead.`);this.name=e.name,this.preventDefault=e.preventDefault??!1,this.stopPropagation=e.stopPropagation??!1,this.preventIf=e.preventIf??[],this.requiredKeys=e.requiredKeys??[],this.pointerMode=e.pointerMode??[],this.pointerOptions=e.pointerOptions??{}}init(e,t,n,r){this.element=e,this.pointerManager=t,this.gesturesRegistry=n,this.keyboardManager=r;const i=`${this.name}ChangeOptions`;this.element.addEventListener(i,this.handleOptionsChange);const o=`${this.name}ChangeState`;this.element.addEventListener(o,this.handleStateChange)}handleOptionsChange=e=>{e&&e.detail&&this.updateOptions(e.detail)};updateOptions(e){this.preventDefault=e.preventDefault??this.preventDefault,this.stopPropagation=e.stopPropagation??this.stopPropagation,this.preventIf=e.preventIf??this.preventIf,this.requiredKeys=e.requiredKeys??this.requiredKeys,this.pointerMode=e.pointerMode??this.pointerMode,this.pointerOptions=e.pointerOptions??this.pointerOptions}getBaseConfig(){return{requiredKeys:this.requiredKeys}}getEffectiveConfig(e,t){if("mouse"!==e&&"touch"!==e&&"pen"!==e)return t;const n=this.pointerOptions[e];return n?l({},t,n):t}handleStateChange=e=>{e&&e.detail&&this.updateState(e.detail)};updateState(e){Object.assign(this.state,e)}getTargetElement(e){return this.isActive||this.element===e.target||"contains"in this.element&&this.element.contains(e.target)||"getRootNode"in this.element&&this.element.getRootNode()instanceof ShadowRoot&&e.composedPath().includes(this.element)?this.element:null}set isActive(e){e?this.gesturesRegistry.registerActiveGesture(this.element,this):this.gesturesRegistry.unregisterActiveGesture(this.element,this)}get isActive(){return this.gesturesRegistry.isGestureActive(this.element,this)??!1}shouldPreventGesture(e,t){const n=this.getEffectiveConfig(t,this.getBaseConfig());if(!this.keyboardManager.areKeysPressed(n.requiredKeys))return!0;if(0===this.preventIf.length)return!1;const r=this.gesturesRegistry.getActiveGestures(e);return this.preventIf.some(e=>r[e])}isPointerTypeAllowed(e){return!this.pointerMode||0===this.pointerMode.length||this.pointerMode.includes(e)}destroy(){const e=`${this.name}ChangeOptions`;this.element.removeEventListener(e,this.handleOptionsChange);const t=`${this.name}ChangeState`;this.element.removeEventListener(t,this.handleStateChange)}}class ze extends $e{unregisterHandler=null;originalTarget=null;constructor(e){super(e),this.minPointers=e.minPointers??1,this.maxPointers=e.maxPointers??1/0}init(e,t,n,r){super.init(e,t,n,r),this.unregisterHandler=this.pointerManager.registerGestureHandler(this.handlePointerEvent)}updateOptions(e){super.updateOptions(e),this.minPointers=e.minPointers??this.minPointers,this.maxPointers=e.maxPointers??this.maxPointers}getBaseConfig(){return{requiredKeys:this.requiredKeys,minPointers:this.minPointers,maxPointers:this.maxPointers}}isWithinPointerCount(e,t){const n=this.getEffectiveConfig(t,this.getBaseConfig());return e.length>=n.minPointers&&e.length<=n.maxPointers}getRelevantPointers(e,t){return e.filter(e=>this.isPointerTypeAllowed(e.pointerType)&&(t===e.target||e.target===this.originalTarget||t===this.originalTarget||"contains"in t&&t.contains(e.target))||"getRootNode"in t&&t.getRootNode()instanceof ShadowRoot&&e.srcEvent.composedPath().includes(t))}destroy(){this.unregisterHandler&&(this.unregisterHandler(),this.unregisterHandler=null),super.destroy()}}function Ne(e){if(0===e.length)return{x:0,y:0};const t=e.reduce((e,t)=>(e.x+=t.clientX,e.y+=t.clientY,e),{x:0,y:0});return{x:t.x/e.length,y:t.y/e.length}}const _e=1e-5;function Fe(e,t){return`${e}${"ongoing"===t?"":t.charAt(0).toUpperCase()+t.slice(1)}`}class He extends ze{state=(()=>({startPointers:new Map,startCentroid:null,lastCentroid:null,movementThresholdReached:!1,totalDeltaX:0,totalDeltaY:0,activeDeltaX:0,activeDeltaY:0,lastDirection:{vertical:null,horizontal:null,mainAxis:null},lastDeltas:null}))();constructor(e){super(e),this.direction=e.direction||["up","down","left","right"],this.threshold=e.threshold||0}clone(e){return new He(l({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,direction:[...this.direction],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},e))}destroy(){this.resetState(),super.destroy()}updateOptions(e){super.updateOptions(e),this.direction=e.direction||this.direction,this.threshold=e.threshold??this.threshold}resetState(){this.isActive=!1,this.state=l({},this.state,{startPointers:new Map,startCentroid:null,lastCentroid:null,lastDeltas:null,activeDeltaX:0,activeDeltaY:0,movementThresholdReached:!1,lastDirection:{vertical:null,horizontal:null,mainAxis:null}})}handlePointerEvent=(e,t)=>{const n=Array.from(e.values());if("forceCancel"===t.type)return void this.cancel(t.target,n,t);const r=this.getTargetElement(t);if(!r)return;if(this.shouldPreventGesture(r,t.pointerType))return void this.cancel(r,n,t);const i=this.getRelevantPointers(n,r);if(this.isWithinPointerCount(i,t.pointerType))switch(t.type){case"pointerdown":if(this.isActive||this.state.startCentroid){if(this.state.startCentroid&&this.state.lastCentroid){const e=this.state.lastCentroid,t=Ne(i),n=t.x-e.x,r=t.y-e.y;this.state.startCentroid={x:this.state.startCentroid.x+n,y:this.state.startCentroid.y+r},this.state.lastCentroid=t,i.forEach(e=>{this.state.startPointers.has(e.pointerId)||this.state.startPointers.set(e.pointerId,e)})}}else i.forEach(e=>{this.state.startPointers.set(e.pointerId,e)}),this.originalTarget=r,this.state.startCentroid=Ne(i),this.state.lastCentroid=l({},this.state.startCentroid);break;case"pointermove":if(this.state.startCentroid&&this.isWithinPointerCount(n,t.pointerType)){const e=Ne(i),n=e.x-this.state.startCentroid.x,o=e.y-this.state.startCentroid.y,a=Math.sqrt(n*n+o*o),s=function(e,t){const n=t.x-e.x,r=t.y-e.y,i={vertical:null,horizontal:null,mainAxis:null},o=function(e,t){const n=t.x-e.x,r=t.y-e.y,i=180*Math.atan2(r,n)/Math.PI;return i>=-44.99999&&i<=-22.49999||i>=22.50001&&i<=45.00001||i>=135.00001&&i<=157.50001||i>=-157.49999&&i<=-134.99999}(t,e),a=Math.abs(n)>Math.abs(r)?"horizontal":"vertical",s=o||"horizontal"===a?_e:.15,l=o?_e:"horizontal"===a?.15:_e;return Math.abs(n)>s&&(i.horizontal=n>0?"right":"left"),Math.abs(r)>l&&(i.vertical=r>0?"down":"up"),i.mainAxis=o?"diagonal":a,i}(this.state.lastCentroid??this.state.startCentroid,e),l=this.state.lastCentroid?e.x-this.state.lastCentroid.x:0,c=this.state.lastCentroid?e.y-this.state.lastCentroid.y:0;!this.state.movementThresholdReached&&a>=this.threshold&&function(e,t){if(!e.vertical&&!e.horizontal)return!1;if(0===t.length)return!0;const n=null===e.vertical||t.includes(e.vertical),r=null===e.horizontal||t.includes(e.horizontal);return n&&r}(s,this.direction)?(this.state.movementThresholdReached=!0,this.isActive=!0,this.state.lastDeltas={x:l,y:c},this.state.totalDeltaX+=l,this.state.totalDeltaY+=c,this.state.activeDeltaX+=l,this.state.activeDeltaY+=c,this.emitPanEvent(r,"start",i,t,e),this.emitPanEvent(r,"ongoing",i,t,e)):this.state.movementThresholdReached&&this.isActive&&(this.state.lastDeltas={x:l,y:c},this.state.totalDeltaX+=l,this.state.totalDeltaY+=c,this.state.activeDeltaX+=l,this.state.activeDeltaY+=c,this.emitPanEvent(r,"ongoing",i,t,e)),this.state.lastCentroid=e,this.state.lastDirection=s}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive&&this.state.movementThresholdReached){const e=i.filter(e=>"pointerup"!==e.type&&"pointercancel"!==e.type);if(this.isWithinPointerCount(e,t.pointerType)){if(e.length>=1&&this.state.lastCentroid){const t=Ne(e),n=t.x-this.state.lastCentroid.x,r=t.y-this.state.lastCentroid.y;this.state.startCentroid={x:this.state.startCentroid.x+n,y:this.state.startCentroid.y+r},this.state.lastCentroid=t;const o=i.find(e=>"pointerup"===e.type||"pointercancel"===e.type)?.pointerId;void 0!==o&&this.state.startPointers.delete(o)}}else{const e=this.state.lastCentroid||this.state.startCentroid;"pointercancel"===t.type&&this.emitPanEvent(r,"cancel",i,t,e),this.emitPanEvent(r,"end",i,t,e),this.resetState()}}else this.resetState()}else this.cancel(r,i,t)};emitPanEvent(e,t,n,r,i){if(!this.state.startCentroid)return;const o=this.state.lastDeltas?.x??0,a=this.state.lastDeltas?.y??0,s=this.state.startPointers.values().next().value,l=s?(r.timeStamp-s.timeStamp)/1e3:0,c=l>0?o/l:0,u=l>0?a/l:0,d=Math.sqrt(c*c+u*u),p=this.gesturesRegistry.getActiveGestures(e),h={gestureName:this.name,initialCentroid:this.state.startCentroid,centroid:i,target:r.target,srcEvent:r,phase:t,pointers:n,timeStamp:r.timeStamp,deltaX:o,deltaY:a,direction:this.state.lastDirection,velocityX:c,velocityY:u,velocity:d,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,activeDeltaX:this.state.activeDeltaX,activeDeltaY:this.state.activeDeltaY,activeGestures:p,customData:this.customData},m=Fe(this.name,t),f=new CustomEvent(m,{bubbles:!0,cancelable:!0,composed:!0,detail:h});e.dispatchEvent(f),this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation()}cancel(e,t,n){if(this.isActive){const r=e??this.element;this.emitPanEvent(r,"cancel",t,n,this.state.lastCentroid),this.emitPanEvent(r,"end",t,n,this.state.lastCentroid)}this.resetState()}}class Be extends ze{state={lastPosition:null};constructor(e){super(e),this.threshold=e.threshold||0}clone(e){return new Be(l({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},e))}init(e,t,n,r){super.init(e,t,n,r),this.element.addEventListener("pointerenter",this.handleElementEnter),this.element.addEventListener("pointerleave",this.handleElementLeave)}destroy(){this.element.removeEventListener("pointerenter",this.handleElementEnter),this.element.removeEventListener("pointerleave",this.handleElementLeave),this.resetState(),super.destroy()}updateOptions(e){super.updateOptions(e)}resetState(){this.isActive=!1,this.state={lastPosition:null}}handleElementEnter=e=>{if("mouse"!==e.pointerType&&"pen"!==e.pointerType)return;const t=this.pointerManager.getPointers()||new Map,n=Array.from(t.values());if(this.isWithinPointerCount(n,e.pointerType)){this.isActive=!0;const t={x:e.clientX,y:e.clientY};this.state.lastPosition=t,this.emitMoveEvent(this.element,"start",n,e),this.emitMoveEvent(this.element,"ongoing",n,e)}};handleElementLeave=e=>{if("mouse"!==e.pointerType&&"pen"!==e.pointerType)return;if(!this.isActive)return;const t=this.pointerManager.getPointers()||new Map,n=Array.from(t.values());this.emitMoveEvent(this.element,"end",n,e),this.resetState()};handlePointerEvent=(e,t)=>{if("pointermove"!==t.type||"mouse"!==t.pointerType&&"pen"!==t.pointerType)return;this.preventDefault&&t.preventDefault(),this.stopPropagation&&t.stopPropagation();const n=Array.from(e.values()),r=this.getTargetElement(t);if(!r)return;if(!this.isWithinPointerCount(n,t.pointerType))return;if(this.shouldPreventGesture(r,t.pointerType)){if(!this.isActive)return;return this.resetState(),void this.emitMoveEvent(r,"end",n,t)}const i={x:t.clientX,y:t.clientY};this.state.lastPosition=i,this.isActive||(this.isActive=!0,this.emitMoveEvent(r,"start",n,t)),this.emitMoveEvent(r,"ongoing",n,t)};emitMoveEvent(e,t,n,r){const i=this.state.lastPosition||Ne(n),o=this.gesturesRegistry.getActiveGestures(e),a={gestureName:this.name,centroid:i,target:r.target,srcEvent:r,phase:t,pointers:n,timeStamp:r.timeStamp,activeGestures:o,customData:this.customData},s=Fe(this.name,t),l=new CustomEvent(s,{bubbles:!0,cancelable:!0,composed:!0,detail:a});e.dispatchEvent(l)}}class Ve extends ze{state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null};constructor(e){super(e),this.maxDistance=e.maxDistance??10,this.taps=e.taps??1}clone(e){return new Ve(l({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,maxDistance:this.maxDistance,taps:this.taps,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},e))}destroy(){this.resetState(),super.destroy()}updateOptions(e){super.updateOptions(e),this.maxDistance=e.maxDistance??this.maxDistance,this.taps=e.taps??this.taps}resetState(){this.isActive=!1,this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null}}handlePointerEvent=(e,t)=>{const n=Array.from(e.values()),r=this.getTargetElement(t);if(!r)return;const i=this.getRelevantPointers(n,r);if(!this.shouldPreventGesture(r,t.pointerType)&&this.isWithinPointerCount(i,t.pointerType))switch(t.type){case"pointerdown":this.isActive||(this.state.startCentroid=Ne(i),this.state.lastPosition=l({},this.state.startCentroid),this.isActive=!0,this.originalTarget=r);break;case"pointermove":if(this.isActive&&this.state.startCentroid){const e=Ne(i);this.state.lastPosition=e;const n=e.x-this.state.startCentroid.x,o=e.y-this.state.startCentroid.y;Math.sqrt(n*n+o*o)>this.maxDistance&&this.cancelTap(r,i,t)}break;case"pointerup":if(this.isActive){this.state.currentTapCount+=1;const e=this.state.lastPosition||this.state.startCentroid;if(!e)return void this.cancelTap(r,i,t);this.state.currentTapCount>=this.taps?(this.fireTapEvent(r,i,t,e),this.resetState()):(this.state.lastTapTime=t.timeStamp,this.isActive=!1,this.state.startCentroid=null,setTimeout(()=>{this.state&&this.state.currentTapCount>0&&this.state.currentTapCount{const n=Array.from(e.values());if("forceCancel"===t.type)return void this.cancelPress(t.target,n,t);const r=this.getTargetElement(t);if(!r)return;if(this.shouldPreventGesture(r,t.pointerType))return void(this.isActive&&this.cancelPress(r,n,t));const i=this.getRelevantPointers(n,r);if(this.isWithinPointerCount(i,t.pointerType))switch(t.type){case"pointerdown":this.isActive||this.state.startCentroid||(this.state.startCentroid=Ne(i),this.state.lastPosition=l({},this.state.startCentroid),this.state.startTime=t.timeStamp,this.isActive=!0,this.originalTarget=r,this.clearPressTimer(),this.state.timerId=setTimeout(()=>{if(this.isActive&&this.state.startCentroid){this.state.pressThresholdReached=!0;const e=this.state.lastPosition;this.emitPressEvent(r,"start",i,t,e),this.emitPressEvent(r,"ongoing",i,t,e)}},this.duration));break;case"pointermove":if(this.isActive&&this.state.startCentroid){const e=Ne(i);this.state.lastPosition=e;const n=e.x-this.state.startCentroid.x,o=e.y-this.state.startCentroid.y;Math.sqrt(n*n+o*o)>this.maxDistance&&this.cancelPress(r,i,t)}break;case"pointerup":if(this.isActive){if(this.state.pressThresholdReached){const e=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(r,"end",i,t,e)}this.resetState()}break;case"pointercancel":case"forceCancel":this.cancelPress(r,i,t)}else this.isActive&&this.cancelPress(r,i,t)};emitPressEvent(e,t,n,r,i){const o=this.gesturesRegistry.getActiveGestures(e),a=r.timeStamp-this.state.startTime,s={gestureName:this.name,centroid:i,target:r.target,srcEvent:r,phase:t,pointers:n,timeStamp:r.timeStamp,x:i.x,y:i.y,duration:a,activeGestures:o,customData:this.customData},l=Fe(this.name,t),c=new CustomEvent(l,{bubbles:!0,cancelable:!0,composed:!0,detail:s});e.dispatchEvent(c),this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation()}cancelPress(e,t,n){if(this.isActive&&this.state.pressThresholdReached){const r=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(e??this.element,"cancel",t,n,r),this.emitPressEvent(e??this.element,"end",t,n,r)}this.resetState()}}function Ye(e,t){const n=t.x-e.x,r=t.y-e.y;return Math.sqrt(n*n+r*r)}function We(e){if(e.length<2)return 0;let t=0,n=0;for(let r=0;r0?t/n:0}class Ge extends ze{state={startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,totalScale:1,deltaScale:0};constructor(e){super(l({},e,{minPointers:e.minPointers??2})),this.threshold=e.threshold??0}clone(e){return new Ge(l({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},e))}destroy(){this.resetState(),super.destroy()}updateOptions(e){super.updateOptions(e)}resetState(){this.isActive=!1,this.state=l({},this.state,{startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,deltaScale:0})}handlePointerEvent=(e,t)=>{const n=Array.from(e.values()),r=this.getTargetElement(t);if(!r)return;if(this.shouldPreventGesture(r,t.pointerType))return void(this.isActive&&(this.emitPinchEvent(r,"cancel",n,t),this.resetState()));const i=this.getRelevantPointers(n,r);switch(t.type){case"pointerdown":if(i.length>=2&&!this.isActive){const e=We(i);this.state.startDistance=e,this.state.lastDistance=e,this.state.lastTime=t.timeStamp,this.originalTarget=r}else if(this.isActive&&i.length>=2){const e=We(i);this.state.startDistance=e/this.state.lastScale,this.state.lastDistance=e,this.state.lastTime=t.timeStamp}break;case"pointermove":if(this.state.startDistance&&this.isWithinPointerCount(i,t.pointerType)){const e=We(i),n=Math.abs(e-this.state.lastDistance);if(0!==n&&n>=this.threshold){const n=this.state.startDistance?e/this.state.startDistance:1,o=n/this.state.lastScale;this.state.totalScale*=o;const a=(t.timeStamp-this.state.lastTime)/1e3;if(this.state.lastDistance){const t=(e-this.state.lastDistance)/a;this.state.velocity=Number.isNaN(t)?0:t}this.state.lastDistance=e,this.state.deltaScale=n-this.state.lastScale,this.state.lastScale=n,this.state.lastTime=t.timeStamp,this.isActive||(this.isActive=!0,this.emitPinchEvent(r,"start",i,t)),this.emitPinchEvent(r,"ongoing",i,t)}}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive){const e=i.filter(e=>"pointerup"!==e.type&&"pointercancel"!==e.type);if(this.isWithinPointerCount(e,t.pointerType)){if(e.length>=2){const n=We(e);this.state.startDistance=n/this.state.lastScale,this.state.lastDistance=n,this.state.lastTime=t.timeStamp}}else"pointercancel"===t.type&&this.emitPinchEvent(r,"cancel",i,t),this.emitPinchEvent(r,"end",i,t),this.resetState()}}};emitPinchEvent(e,t,n,r){const i=Ne(n),o=this.state.lastDistance,a=this.state.lastScale,s=this.gesturesRegistry.getActiveGestures(e),l={gestureName:this.name,centroid:i,target:r.target,srcEvent:r,phase:t,pointers:n,timeStamp:r.timeStamp,scale:a,deltaScale:this.state.deltaScale,totalScale:this.state.totalScale,distance:o,velocity:this.state.velocity,activeGestures:s,direction:(c=this.state.velocity,c>0?1:c<-0?-1:0),customData:this.customData};var c;this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const u=Fe(this.name,t),d=new CustomEvent(u,{bubbles:!0,cancelable:!0,composed:!0,detail:l});e.dispatchEvent(d)}}class Ke extends $e{state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0};constructor(e){super(e),this.sensitivity=e.sensitivity??1,this.max=e.max??Number.MAX_SAFE_INTEGER,this.min=e.min??Number.MIN_SAFE_INTEGER,this.initialDelta=e.initialDelta??0,this.invert=e.invert??!1,this.state.totalDeltaX=this.initialDelta,this.state.totalDeltaY=this.initialDelta,this.state.totalDeltaZ=this.initialDelta}clone(e){return new Ke(l({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,sensitivity:this.sensitivity,max:this.max,min:this.min,initialDelta:this.initialDelta,invert:this.invert,requiredKeys:[...this.requiredKeys],preventIf:[...this.preventIf]},e))}init(e,t,n,r){super.init(e,t,n,r),this.element.addEventListener("wheel",this.handleWheelEvent)}destroy(){this.element.removeEventListener("wheel",this.handleWheelEvent),this.resetState(),super.destroy()}resetState(){this.isActive=!1,this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0}}updateOptions(e){super.updateOptions(e),this.sensitivity=e.sensitivity??this.sensitivity,this.max=e.max??this.max,this.min=e.min??this.min,this.initialDelta=e.initialDelta??this.initialDelta,this.invert=e.invert??this.invert}handleWheelEvent=e=>{if(this.shouldPreventGesture(this.element,"mouse"))return;const t=this.pointerManager.getPointers()||new Map,n=Array.from(t.values());this.state.totalDeltaX+=e.deltaX*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaY+=e.deltaY*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaZ+=e.deltaZ*this.sensitivity*(this.invert?-1:1),["totalDeltaX","totalDeltaY","totalDeltaZ"].forEach(e=>{this.state[e]this.max&&(this.state[e]=this.max)}),this.emitWheelEvent(n,e)};emitWheelEvent(e,t){const n=e.length>0?Ne(e):{x:t.clientX,y:t.clientY},r=this.gesturesRegistry.getActiveGestures(this.element),i={gestureName:this.name,centroid:n,target:t.target,srcEvent:t,phase:"ongoing",pointers:e,timeStamp:t.timeStamp,deltaX:t.deltaX*this.sensitivity*(this.invert?-1:1),deltaY:t.deltaY*this.sensitivity*(this.invert?-1:1),deltaZ:t.deltaZ*this.sensitivity*(this.invert?-1:1),deltaMode:t.deltaMode,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,totalDeltaZ:this.state.totalDeltaZ,activeGestures:r,customData:this.customData};this.preventDefault&&t.preventDefault(),this.stopPropagation&&t.stopPropagation();const o=Fe(this.name,"ongoing"),a=new CustomEvent(o,{bubbles:!0,cancelable:!0,composed:!0,detail:i});this.element.dispatchEvent(a)}}const qe=e=>{e.cancelable&&e.preventDefault()};class Xe extends ze{state={phase:"waitingForTap",dragTimeoutId:null};constructor(e){super(e),this.tapMaxDistance=e.tapMaxDistance??10,this.dragTimeout=e.dragTimeout??1e3,this.dragThreshold=e.dragThreshold??0,this.dragDirection=e.dragDirection||["up","down","left","right"],this.tapGesture=new Ve({name:`${this.name}-tap`,maxDistance:this.tapMaxDistance,maxPointers:this.maxPointers,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}),this.panGesture=new He({name:`${this.name}-pan`,minPointers:this.minPointers,maxPointers:this.maxPointers,threshold:this.dragThreshold,direction:this.dragDirection,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)})}clone(e){return new Xe(l({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,tapMaxDistance:this.tapMaxDistance,dragTimeout:this.dragTimeout,dragThreshold:this.dragThreshold,dragDirection:[...this.dragDirection],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},e))}init(e,t,n,r){super.init(e,t,n,r),this.tapGesture.init(e,t,n,r),this.panGesture.init(e,t,n,r),this.element.addEventListener(this.tapGesture.name,this.tapHandler),this.element.addEventListener(`${this.panGesture.name}Start`,this.dragStartHandler),this.element.addEventListener(this.panGesture.name,this.dragMoveHandler),this.element.addEventListener(`${this.panGesture.name}End`,this.dragEndHandler),this.element.addEventListener(`${this.panGesture.name}Cancel`,this.dragEndHandler)}destroy(){this.resetState(),this.tapGesture.destroy(),this.panGesture.destroy(),this.element.removeEventListener(this.tapGesture.name,this.tapHandler),this.element.removeEventListener(`${this.panGesture.name}Start`,this.dragStartHandler),this.element.removeEventListener(this.panGesture.name,this.dragMoveHandler),this.element.removeEventListener(`${this.panGesture.name}End`,this.dragEndHandler),this.element.removeEventListener(`${this.panGesture.name}Cancel`,this.dragEndHandler),super.destroy()}updateOptions(e){super.updateOptions(e),this.tapMaxDistance=e.tapMaxDistance??this.tapMaxDistance,this.dragTimeout=e.dragTimeout??this.dragTimeout,this.dragThreshold=e.dragThreshold??this.dragThreshold,this.dragDirection=e.dragDirection||this.dragDirection,this.element.dispatchEvent(new CustomEvent(`${this.panGesture.name}ChangeOptions`,{detail:{minPointers:this.minPointers,maxPointers:this.maxPointers,threshold:this.dragThreshold,direction:this.dragDirection,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}})),this.element.dispatchEvent(new CustomEvent(`${this.tapGesture.name}ChangeOptions`,{detail:{maxDistance:this.tapMaxDistance,maxPointers:this.maxPointers,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}}))}resetState(){null!==this.state.dragTimeoutId&&clearTimeout(this.state.dragTimeoutId),this.restoreTouchAction(),this.isActive=!1,this.state={phase:"waitingForTap",dragTimeoutId:null}}handlePointerEvent(){}tapHandler=()=>{"waitingForTap"===this.state.phase&&(this.state.phase="tapDetected",this.setTouchAction(),this.state.dragTimeoutId=setTimeout(()=>{this.resetState()},this.dragTimeout))};dragStartHandler=e=>{"tapDetected"===this.state.phase&&(null!==this.state.dragTimeoutId&&(clearTimeout(this.state.dragTimeoutId),this.state.dragTimeoutId=null),this.restoreTouchAction(),this.state.phase="dragging",this.isActive=!0,this.element.dispatchEvent(new CustomEvent(Fe(this.name,e.detail.phase),e)))};dragMoveHandler=e=>{"dragging"===this.state.phase&&this.element.dispatchEvent(new CustomEvent(Fe(this.name,e.detail.phase),e))};dragEndHandler=e=>{"dragging"===this.state.phase&&(this.resetState(),this.element.dispatchEvent(new CustomEvent(Fe(this.name,e.detail.phase),e)))};setTouchAction(){this.element.addEventListener("touchstart",qe,{passive:!1})}restoreTouchAction(){this.element.removeEventListener("touchstart",qe)}}class Ze extends ze{state={phase:"waitingForPress",dragTimeoutId:null};constructor(e){super(e),this.pressDuration=e.pressDuration??500,this.pressMaxDistance=e.pressMaxDistance??10,this.dragTimeout=e.dragTimeout??1e3,this.dragThreshold=e.dragThreshold??0,this.dragDirection=e.dragDirection||["up","down","left","right"],this.pressGesture=new Ue({name:`${this.name}-press`,duration:this.pressDuration,maxDistance:this.pressMaxDistance,maxPointers:this.maxPointers,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}),this.panGesture=new He({name:`${this.name}-pan`,minPointers:this.minPointers,maxPointers:this.maxPointers,threshold:this.dragThreshold,direction:this.dragDirection,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)})}clone(e){return new Ze(l({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,pressDuration:this.pressDuration,pressMaxDistance:this.pressMaxDistance,dragTimeout:this.dragTimeout,dragThreshold:this.dragThreshold,dragDirection:[...this.dragDirection],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},e))}init(e,t,n,r){super.init(e,t,n,r),this.pressGesture.init(e,t,n,r),this.panGesture.init(e,t,n,r),this.element.addEventListener(this.pressGesture.name,this.pressHandler),this.element.addEventListener(`${this.panGesture.name}Start`,this.dragStartHandler),this.element.addEventListener(this.panGesture.name,this.dragMoveHandler),this.element.addEventListener(`${this.panGesture.name}End`,this.dragEndHandler),this.element.addEventListener(`${this.panGesture.name}Cancel`,this.dragEndHandler)}destroy(){this.resetState(),this.pressGesture.destroy(),this.panGesture.destroy(),this.element.removeEventListener(this.pressGesture.name,this.pressHandler),this.element.removeEventListener(`${this.panGesture.name}Start`,this.dragStartHandler),this.element.removeEventListener(this.panGesture.name,this.dragMoveHandler),this.element.removeEventListener(`${this.panGesture.name}End`,this.dragEndHandler),this.element.removeEventListener(`${this.panGesture.name}Cancel`,this.dragEndHandler),super.destroy()}updateOptions(e){super.updateOptions(e),this.pressDuration=e.pressDuration??this.pressDuration,this.pressMaxDistance=e.pressMaxDistance??this.pressMaxDistance,this.dragTimeout=e.dragTimeout??this.dragTimeout,this.dragThreshold=e.dragThreshold??this.dragThreshold,this.dragDirection=e.dragDirection||this.dragDirection,this.element.dispatchEvent(new CustomEvent(`${this.panGesture.name}ChangeOptions`,{detail:{minPointers:this.minPointers,maxPointers:this.maxPointers,threshold:this.dragThreshold,direction:this.dragDirection,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}})),this.element.dispatchEvent(new CustomEvent(`${this.pressGesture.name}ChangeOptions`,{detail:{duration:this.pressDuration,maxDistance:this.pressMaxDistance,maxPointers:this.maxPointers,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}}))}resetState(){null!==this.state.dragTimeoutId&&clearTimeout(this.state.dragTimeoutId),this.restoreTouchAction(),this.isActive=!1,this.state={phase:"waitingForPress",dragTimeoutId:null}}handlePointerEvent(){}pressHandler=()=>{"waitingForPress"===this.state.phase&&(this.state.phase="pressDetected",this.setTouchAction(),this.state.dragTimeoutId=setTimeout(()=>{this.resetState()},this.dragTimeout))};dragStartHandler=e=>{"pressDetected"===this.state.phase&&(null!==this.state.dragTimeoutId&&(clearTimeout(this.state.dragTimeoutId),this.state.dragTimeoutId=null),this.restoreTouchAction(),this.state.phase="dragging",this.isActive=!0,this.element.dispatchEvent(new CustomEvent(Fe(this.name,e.detail.phase),e)))};dragMoveHandler=e=>{"dragging"===this.state.phase&&this.element.dispatchEvent(new CustomEvent(Fe(this.name,e.detail.phase),e))};dragEndHandler=e=>{"dragging"===this.state.phase&&(this.resetState(),this.element.dispatchEvent(new CustomEvent(Fe(this.name,e.detail.phase),e)))};setTouchAction(){this.element.addEventListener("touchstart",qe,{passive:!1}),this.element.addEventListener("touchmove",qe,{passive:!1}),this.element.addEventListener("touchend",qe,{passive:!1})}restoreTouchAction(){this.element.removeEventListener("touchstart",qe),this.element.removeEventListener("touchmove",qe),this.element.removeEventListener("touchend",qe)}}const Je=e=>e.preventDefault(),Qe=({svgRef:t})=>{const n=e.useRef(null);e.useEffect(()=>{const e=t.current;n.current||(n.current=new Re({gestures:[new He({name:"pan",threshold:0,maxPointers:1}),new Be({name:"move",preventIf:["pan","zoomPinch","zoomPan"]}),new Ve({name:"tap",preventIf:["pan","zoomPinch","zoomPan"]}),new Ue({name:"quickPress",duration:50}),new He({name:"brush",threshold:0,maxPointers:1}),new He({name:"zoomPan",threshold:0,preventIf:["zoomTapAndDrag","zoomPressAndDrag"]}),new Ge({name:"zoomPinch",threshold:5}),new Ke({name:"zoomTurnWheel",sensitivity:.01,initialDelta:1}),new Ke({name:"panTurnWheel",sensitivity:.5}),new Xe({name:"zoomTapAndDrag",dragThreshold:10}),new Ze({name:"zoomPressAndDrag",dragThreshold:10,preventIf:["zoomPinch"]}),new Ve({name:"zoomDoubleTapReset",taps:2})]}));const r=n.current;if(e&&r)return r.registerElement(["pan","move","zoomPinch","zoomPan","zoomTurnWheel","panTurnWheel","tap","quickPress","zoomTapAndDrag","zoomPressAndDrag","zoomDoubleTapReset","brush"],e),()=>{r.unregisterAllGestures(e)}},[t,n]);const r=e.useCallback((e,n,r)=>{const i=t.current;return i?.addEventListener(e,n,r),{cleanup:()=>i?.removeEventListener(e,n)}},[t]),i=e.useCallback((e,r)=>{const i=t.current,o=n.current;o&&i&&o.setGestureOptions(e,i,r??{})},[t,n]);return e.useEffect(()=>{const e=t.current;return e?.addEventListener("gesturestart",Je),e?.addEventListener("gesturechange",Je),e?.addEventListener("gestureend",Je),()=>{e?.removeEventListener("gesturestart",Je),e?.removeEventListener("gesturechange",Je),e?.removeEventListener("gestureend",Je)}},[t]),{instance:{addInteractionListener:r,updateZoomInteractionListeners:i}}};Qe.params={},Qe.getInitialState=()=>({});const et=[we,xe,be,Te,Qe,U];function tt(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}const nt=["apiRef"],rt=e=>{let{plugins:t}=e,n=tt(e.props,nt);const r={};t.forEach(e=>{Object.assign(r,e.params)});const i={};return Object.keys(n).forEach(e=>{const t=n[e];r[e]&&(i[e]=t)}),t.reduce((e,t)=>t.getDefaultizedParams?t.getDefaultizedParams({params:e}):e,i)};let it=0;const ot=e.createContext(null),at={};function st(t,n){const r=e.useRef(at);return r.current===at&&(r.current=t(n)),r}const lt=[],ct=()=>{};function ut(e){const{store:t,selector:n}=e;let r=n(t.state);const i={effect:ct,dispose:null,subscribe:()=>{i.dispose??=t.subscribe(e=>{const t=n(e);if(!Object.is(r,t)){const e=r;r=t,i.effect(e,t)}})},onMount:()=>(i.subscribe(),()=>{i.dispose?.(),i.dispose=null})};return i.subscribe(),i}const dt=e=>e.series,pt=ae(dt,e=>e.defaultizedSeries),ht=ae(dt,e=>e.seriesConfig),mt=ae(dt,e=>e.dataset),ft=le(pt,ht,mt,function(e,t,n){return((e,t,n)=>{const r={};return Object.keys(t).forEach(i=>{const o=e[i];void 0!==o&&(r[i]=t[i]?.seriesProcessor?.(o,n)??o)}),r})(e,t,n)}),gt=le(ft,ht,he,function(e,t,n){return((e,t,n)=>{let r=!1;const i={};return Object.keys(e).forEach(o=>{const a=t[o]?.seriesLayout,s=e[o];if(void 0!==a&&void 0!==s){const t=a(s,n);t&&t!==e[o]&&(r=!0,i[o]=t)}}),r?i:{}})(e,t,n)}),yt=4,vt=40,bt=20+2*yt,xt=40+2*yt,It="hover",wt={top:5,bottom:5,left:5,right:5},kt={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",reverse:!1,slider:{enabled:!1,preview:!1,size:bt,showTooltip:It}},St=(e,t,n,r)=>{if(e)return!0===e?l({axisId:t,axisDirection:n},kt,{reverse:r??!1}):l({axisId:t,axisDirection:n},kt,{reverse:r??!1},e,{slider:l({},kt.slider,{size:e.slider?.preview??kt.slider.preview?xt:bt},e.slider)})};function Mt(e,t){const n={top:0,bottom:0,none:0},r=(e&&e.length>0?e:[{id:W,scaleType:"linear"}]).map((e,r)=>{const i=e.dataKey,o=0===r?"bottom":"none",a=e.position??o,s=25+(e.label?20:0),c=e.id??`defaultized-x-axis-${r}`,u=l({offset:n[a]},e,{id:c,position:a,height:e.height??s,zoom:St(e.zoom,c,"x",e.reverse)});if("none"!==a&&(n[a]+=u.height,u.zoom?.slider.enabled&&(n[a]+=u.zoom.slider.size)),void 0===i||void 0!==e.data)return u;if(void 0===t)throw new Error("MUI X Charts: x-axis uses `dataKey` but no `dataset` is provided.");return l({},u,{data:t.map(e=>e[i])})});return r}function Ct(e,t){const n={right:0,left:0,none:0},r=(e&&e.length>0?e:[{id:G,scaleType:"linear"}]).map((e,r)=>{const i=e.dataKey,o=0===r?"left":"none",a=e.position??o,s=45+(e.label?20:0),c=e.id??`defaultized-y-axis-${r}`,u=l({offset:n[a]},e,{id:c,position:a,width:e.width??s,zoom:St(e.zoom,c,"y",e.reverse)});if("none"!==a&&(n[a]+=u.width,u.zoom?.slider.enabled&&(n[a]+=u.zoom.slider.size)),void 0===i||void 0!==e.data)return u;if(void 0===t)throw new Error("MUI X Charts: y-axis uses `dataKey` but no `dataset` is provided.");return l({},u,{data:t.map(e=>e[i])})});return r}function Pt(e,t){return function(n,r){if("tick"===r.location){const t=r.scale.domain();return t[0]===t[1]?r.scale.tickFormat(1)(n):r.scale.tickFormat(e)(n)}return"zoom-slider-tooltip"===r.location?t.tickFormat(2)(n):`${n}`}}function Et(e){return"band"===e.scaleType}function Tt(e){return"point"===e.scaleType}function At(e,t){return null==e||null==t?NaN:et?1:e>=t?0:NaN}function Ot(e,t){return null==e||null==t?NaN:te?1:t>=e?0:NaN}function jt(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i>>1;n(e[t],r)<0?i=t+1:o=t}while(iAt(e(t),n),r=(t,n)=>e(t)-n):(t=e===At||e===Ot?e:Lt,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i>>1;n(e[t],r)<=0?i=t+1:o=t}while(i>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?sn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?sn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=qt.exec(e))?new cn(t[1],t[2],t[3],1):(t=Xt.exec(e))?new cn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Zt.exec(e))?sn(t[1],t[2],t[3],t[4]):(t=Jt.exec(e))?sn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Qt.exec(e))?fn(t[1],t[2]/100,t[3]/100,1):(t=en.exec(e))?fn(t[1],t[2]/100,t[3]/100,t[4]):tn.hasOwnProperty(e)?an(tn[e]):"transparent"===e?new cn(NaN,NaN,NaN,0):null}function an(e){return new cn(e>>16&255,e>>8&255,255&e,1)}function sn(e,t,n,r){return r<=0&&(e=t=n=NaN),new cn(e,t,n,r)}function ln(e,t,n,r){return 1===arguments.length?((i=e)instanceof Bt||(i=on(i)),i?new cn((i=i.rgb()).r,i.g,i.b,i.opacity):new cn):new cn(e,t,n,null==r?1:r);var i}function cn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function un(){return`#${mn(this.r)}${mn(this.g)}${mn(this.b)}`}function dn(){const e=pn(this.opacity);return`${1===e?"rgb(":"rgba("}${hn(this.r)}, ${hn(this.g)}, ${hn(this.b)}${1===e?")":`, ${e})`}`}function pn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function mn(e){return((e=hn(e))<16?"0":"")+e.toString(16)}function fn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new yn(e,t,n,r)}function gn(e){if(e instanceof yn)return new yn(e.h,e.s,e.l,e.opacity);if(e instanceof Bt||(e=on(e)),!e)return new yn;if(e instanceof yn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n0&&l<1?0:a,new yn(a,s,l,e.opacity)}function yn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function vn(e){return(e=(e||0)%360)<0?e+360:e}function bn(e){return Math.max(0,Math.min(1,e||0))}function xn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function In(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}Ft(Bt,on,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nn,formatHex:nn,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return gn(this).formatHsl()},formatRgb:rn,toString:rn}),Ft(cn,ln,Ht(Bt,{brighter(e){return e=null==e?Ut:Math.pow(Ut,e),new cn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Vt:Math.pow(Vt,e),new cn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cn(hn(this.r),hn(this.g),hn(this.b),pn(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:un,formatHex:un,formatHex8:function(){return`#${mn(this.r)}${mn(this.g)}${mn(this.b)}${mn(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:dn,toString:dn})),Ft(yn,function(e,t,n,r){return 1===arguments.length?gn(e):new yn(e,t,n,null==r?1:r)},Ht(Bt,{brighter(e){return e=null==e?Ut:Math.pow(Ut,e),new yn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Vt:Math.pow(Vt,e),new yn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new cn(xn(e>=240?e-240:e+120,i,r),xn(e,i,r),xn(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new yn(vn(this.h),bn(this.s),bn(this.l),pn(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 e=pn(this.opacity);return`${1===e?"hsl(":"hsla("}${vn(this.h)}, ${100*bn(this.s)}%, ${100*bn(this.l)}%${1===e?")":`, ${e})`}`}}));const wn=e=>()=>e;function kn(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):wn(isNaN(e)?t:e)}const Sn=function e(t){var n=function(e){return 1===(e=+e)?kn:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):wn(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=ln(e)).r,(t=ln(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=kn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Mn(e){return function(t){var n,r,i=t.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=ro&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Tn(n,r)})),o=jn.lastIndex;return ot&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?Bn:Hn,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),Tn)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,zn),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=$n,u()},d.clamp=function(e){return arguments.length?(c=!!e||_n,u()):c!==_n},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function Yn(){return Un()(_n,_n)}const Wn=Math.sqrt(50),Gn=Math.sqrt(10),Kn=Math.sqrt(2);function qn(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=Wn?10:o>=Gn?5:o>=Kn?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/ct&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*ct&&--l),l0))return[];if((e=+e)===(t=+t))return[e];const r=t=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function tr(e){if(!(t=er.exec(e)))throw new Error("invalid format: "+e);var t;return new nr({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function nr(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function rr(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ir(e){return(e=rr(Math.abs(e)))?e[1]:NaN}function or(e,t){var n=rr(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}tr.prototype=nr.prototype,nr.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 ar={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>or(100*e,t),r:or,s:function(e,t){var n=rr(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Qn=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")+rr(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function sr(e){return e}var lr,cr,ur,dr=Array.prototype.map,pr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function hr(e){var t=e.domain;return e.ticks=function(e){var n=t();return Xn(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return function(e,t,n,r){var i,o=Jn(e,t,n);switch((r=tr(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ir(t)/3)))-ir(Math.abs(e)))}(o,a))||(r.precision=i),ur(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ir(t)-ir(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-ir(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return cr(r)}(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c0;){if((i=Zn(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function mr(){var e=Yn();return e.copy=function(){return Vn(e,mr())},zt.apply(e,arguments),hr(e)}function fr(){var e=hr(function(){var e,t,n,r,i,o=0,a=1,s=_n,l=!1;function c(t){return null==t||isNaN(t=+t)?i:s(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),c):[s(0),s(1)]}}return c.domain=function(i){return arguments.length?([o,a]=i,e=r(o=+o),t=r(a=+a),n=e===t?0:1/(t-e),c):[o,a]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=u(Dn),c.rangeRound=u($n),c.unknown=function(e){return arguments.length?(i=e,c):i},function(i){return r=i,e=i(o),t=i(a),n=e===t?0:1/(t-e),c}}()(_n));return e.copy=function(){return t=e,fr().domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown());var t},Nt.apply(e,arguments)}lr=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?sr:(t=dr.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?sr:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(dr.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=tr(e)).fill,n=e.align,d=e.sign,p=e.symbol,h=e.zero,m=e.width,f=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(f=!0,v="g"):ar[v]||(void 0===g&&(g=12),y=!0,v="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var b="$"===p?i:"#"===p&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===p?o:/[%p]/.test(v)?l:"",I=ar[v],w=/[defgprs%]/.test(v);function k(e){var i,o,l,p=b,k=x;if("c"===v)k=I(e)+k,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:I(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0===+e&&"+"!==d&&(S=!1),p=(S?"("===d?d:c:"-"===d||"("===d?"":d)+p,k=("s"===v?pr[8+Qn/3]:"")+k+(S&&"("===d?")":""),w)for(i=-1,o=e.length;++i(l=e.charCodeAt(i))||l>57){k=(46===l?a+e.slice(i+1):e.slice(i))+k,e=e.slice(0,i);break}}f&&!h&&(e=r(e,1/0));var M=p.length+e.length+k.length,C=M>1)+p+e+k+C.slice(M);break;default:e=C+p+e+k}return s(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return e+""},k}return{format:d,formatPrefix:function(e,t){var n=d(((e=tr(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(ir(t)/3))),i=Math.pow(10,-r),o=pr[8+r/3];return function(e){return n(i*e)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),cr=lr.format,ur=lr.formatPrefix;class gr extends Map{constructor(e,t=vr){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(yr(this,e))}has(e){return super.has(yr(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}(this,e))}}function yr({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function vr(e){return null!==e&&"object"==typeof e?e.valueOf():e}Set;const br=Symbol("implicit");function xr(){var e=new gr,t=[],n=[],r=br;function i(i){let o=e.get(i);if(void 0===o){if(r!==br)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new gr;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return xr(t,n).unknown(r)},zt.apply(i,arguments),i}function Ir(e){return"piecewise"===e.type?_t(e.thresholds,e.colors):fr([e.min??0,e.max??100],e.color)}function wr(e){return e.values?xr(e.values,e.colors).unknown(e.unknownColor??null):xr(e.colors.map((e,t)=>t),e.colors).unknown(e.unknownColor??null)}function kr(e){return"ordinal"===e.type?wr(e):Ir(e)}function Sr(e,t,n){const{tickMaxStep:r,tickMinStep:i,tickNumber:o}=e,a=void 0===i?999:Math.floor(Math.abs(t[1]-t[0])/i),s=void 0===r?2:Math.ceil(Math.abs(t[1]-t[0])/r),l=o??n;return Math.min(a,Math.max(s,l))}function Mr(e,t){return 0===t[1]-t[0]?1:e/((t[1]-t[0])/100)}function Cr(e){return Math.floor(Math.abs(e)/50)}function Pr(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a-e(-t,n)}function Rr(){const e=function(e){const t=e(Er,Tr),n=t.domain;let r,i,o=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(o),i=function(e){return 10===e?jr:e===Math.E?Math.exp:t=>Math.pow(e,t)}(o),n()[0]<0?(r=Lr(r),i=Lr(i),e(Ar,Or)):e(Er,Tr),t}return t.base=function(e){return arguments.length?(o=+e,a()):o},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s0){for(;d<=p;++d)for(c=1;cs)break;m.push(u)}}else for(;d<=p;++d)for(c=o-1;c>=1;--c)if(u=d>0?c/i(-d):c*i(d),!(us)break;m.push(u)}2*m.length{if(null==e&&(e=10),null==n&&(n=10===o?"s":","),"function"!=typeof n&&(o%1||null!=(n=tr(n)).precision||(n.trim=!0),n=cr(n)),e===1/0)return n;const a=Math.max(1,o*e/t.ticks().length);return e=>{let t=e/i(Math.round(r(e)));return t*on(Pr(n(),{floor:e=>i(Math.floor(r(e))),ceil:e=>i(Math.ceil(r(e)))})),t}(Un()).domain([1,10]);return e.copy=()=>Vn(e,Rr()).base(e.base()),zt.apply(e,arguments),e}function Dr(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function $r(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function zr(e){return e<0?-e*e:e*e}function Nr(){var e=function(e){var t=e(_n,_n),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(_n,_n):.5===n?e($r,zr):e(Dr(n),Dr(1/n)):n},hr(t)}(Un());return e.copy=function(){return Vn(e,Nr()).exponent(e.exponent())},zt.apply(e,arguments),e}const _r=1e3,Fr=6e4,Hr=36e5,Br=864e5,Vr=6048e5,Ur=31536e6,Yr=new Date,Wr=new Date;function Gr(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(sGr(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Yr.setTime(+t),Wr.setTime(+r),e(Yr),e(Wr),Math.floor(n(Yr,Wr))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const Kr=Gr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Kr.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?Gr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Kr:null),Kr.range;const qr=Gr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*_r)},(e,t)=>(t-e)/_r,e=>e.getUTCSeconds()),Xr=(qr.range,Gr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*_r)},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getMinutes())),Zr=(Xr.range,Gr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getUTCMinutes())),Jr=(Zr.range,Gr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*_r-e.getMinutes()*Fr)},(e,t)=>{e.setTime(+e+t*Hr)},(e,t)=>(t-e)/Hr,e=>e.getHours())),Qr=(Jr.range,Gr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Hr)},(e,t)=>(t-e)/Hr,e=>e.getUTCHours())),ei=(Qr.range,Gr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Fr)/Br,e=>e.getDate()-1)),ti=(ei.range,Gr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Br,e=>e.getUTCDate()-1)),ni=(ti.range,Gr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Br,e=>Math.floor(e/Br)));function ri(e){return Gr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Fr)/Vr)}ni.range;const ii=ri(0),oi=ri(1),ai=ri(2),si=ri(3),li=ri(4),ci=ri(5),ui=ri(6);function di(e){return Gr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/Vr)}ii.range,oi.range,ai.range,si.range,li.range,ci.range,ui.range;const pi=di(0),hi=di(1),mi=di(2),fi=di(3),gi=di(4),yi=di(5),vi=di(6),bi=(pi.range,hi.range,mi.range,fi.range,gi.range,yi.range,vi.range,Gr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth())),xi=(bi.range,Gr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth())),Ii=(xi.range,Gr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear()));Ii.every=e=>isFinite(e=Math.floor(e))&&e>0?Gr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,Ii.range;const wi=Gr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function ki(e,t,n,r,i,o){const a=[[qr,1,_r],[qr,5,5e3],[qr,15,15e3],[qr,30,3e4],[o,1,Fr],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,Hr],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,Br],[r,2,1728e5],[n,1,Vr],[t,1,2592e6],[t,3,7776e6],[e,1,Ur]];function s(t,n,r){const i=Math.abs(n-t)/r,o=jt(([,,e])=>e).right(a,i);if(o===a.length)return e.every(Jn(t/Ur,n/Ur,r));if(0===o)return Kr.every(Math.max(Jn(t,n,r),1));const[s,l]=a[i/a[o-1][2]isFinite(e=Math.floor(e))&&e>0?Gr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,wi.range;const[Si,Mi]=ki(wi,xi,pi,ni,Qr,Zr),[Ci,Pi]=ki(Ii,bi,ii,ei,Jr,Xr);function Ei(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Ti(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ai(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var Oi,ji,Li,Ri={"-":"",_:" ",0:"0"},Di=/^\s*\d+/,$i=/^%/,zi=/[\\^$*+?|[\]().{}]/g;function Ni(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[e.toLowerCase(),t]))}function Bi(e,t,n){var r=Di.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Vi(e,t,n){var r=Di.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ui(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Yi(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Wi(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Gi(e,t,n){var r=Di.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Ki(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function qi(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Xi(e,t,n){var r=Di.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Zi(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Ji(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Qi(e,t,n){var r=Di.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function eo(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function to(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function no(e,t,n){var r=Di.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ro(e,t,n){var r=Di.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function io(e,t,n){var r=Di.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function oo(e,t,n){var r=$i.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ao(e,t,n){var r=Di.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function so(e,t,n){var r=Di.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function lo(e,t){return Ni(e.getDate(),t,2)}function co(e,t){return Ni(e.getHours(),t,2)}function uo(e,t){return Ni(e.getHours()%12||12,t,2)}function po(e,t){return Ni(1+ei.count(Ii(e),e),t,3)}function ho(e,t){return Ni(e.getMilliseconds(),t,3)}function mo(e,t){return ho(e,t)+"000"}function fo(e,t){return Ni(e.getMonth()+1,t,2)}function go(e,t){return Ni(e.getMinutes(),t,2)}function yo(e,t){return Ni(e.getSeconds(),t,2)}function vo(e){var t=e.getDay();return 0===t?7:t}function bo(e,t){return Ni(ii.count(Ii(e)-1,e),t,2)}function xo(e){var t=e.getDay();return t>=4||0===t?li(e):li.ceil(e)}function Io(e,t){return e=xo(e),Ni(li.count(Ii(e),e)+(4===Ii(e).getDay()),t,2)}function wo(e){return e.getDay()}function ko(e,t){return Ni(oi.count(Ii(e)-1,e),t,2)}function So(e,t){return Ni(e.getFullYear()%100,t,2)}function Mo(e,t){return Ni((e=xo(e)).getFullYear()%100,t,2)}function Co(e,t){return Ni(e.getFullYear()%1e4,t,4)}function Po(e,t){var n=e.getDay();return Ni((e=n>=4||0===n?li(e):li.ceil(e)).getFullYear()%1e4,t,4)}function Eo(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ni(t/60|0,"0",2)+Ni(t%60,"0",2)}function To(e,t){return Ni(e.getUTCDate(),t,2)}function Ao(e,t){return Ni(e.getUTCHours(),t,2)}function Oo(e,t){return Ni(e.getUTCHours()%12||12,t,2)}function jo(e,t){return Ni(1+ti.count(wi(e),e),t,3)}function Lo(e,t){return Ni(e.getUTCMilliseconds(),t,3)}function Ro(e,t){return Lo(e,t)+"000"}function Do(e,t){return Ni(e.getUTCMonth()+1,t,2)}function $o(e,t){return Ni(e.getUTCMinutes(),t,2)}function zo(e,t){return Ni(e.getUTCSeconds(),t,2)}function No(e){var t=e.getUTCDay();return 0===t?7:t}function _o(e,t){return Ni(pi.count(wi(e)-1,e),t,2)}function Fo(e){var t=e.getUTCDay();return t>=4||0===t?gi(e):gi.ceil(e)}function Ho(e,t){return e=Fo(e),Ni(gi.count(wi(e),e)+(4===wi(e).getUTCDay()),t,2)}function Bo(e){return e.getUTCDay()}function Vo(e,t){return Ni(hi.count(wi(e)-1,e),t,2)}function Uo(e,t){return Ni(e.getUTCFullYear()%100,t,2)}function Yo(e,t){return Ni((e=Fo(e)).getUTCFullYear()%100,t,2)}function Wo(e,t){return Ni(e.getUTCFullYear()%1e4,t,4)}function Go(e,t){var n=e.getUTCDay();return Ni((e=n>=4||0===n?gi(e):gi.ceil(e)).getUTCFullYear()%1e4,t,4)}function Ko(){return"+0000"}function qo(){return"%"}function Xo(e){return+e}function Zo(e){return Math.floor(+e/1e3)}function Jo(e){return new Date(e)}function Qo(e){return e instanceof Date?+e:+new Date(+e)}function ea(e,t,n,r,i,o,a,s,l,c){var u=Yn(),d=u.invert,p=u.domain,h=c(".%L"),m=c(":%S"),f=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),v=c("%b %d"),b=c("%B"),x=c("%Y");function I(e){return(l(e){const a=n(e),s=t.constant();let l=0,c=0,u=0;a.forEach(e=>{e>-s&&e=s&&(u+=1)});const d=[];if(l>0&&d.push(...r.ticks(l)),c>0){const e=i.ticks(c);d.at(-1)===e[0]?d.push(...e.slice(1)):d.push(...e)}if(u>0){const e=o.ticks(u);d.at(-1)===e[0]?d.push(...e.slice(1)):d.push(...e)}return d},t.tickFormat=(e=10,n)=>{const a=t.constant(),[s,l]=t.domain(),c=l-s,u=r.domain(),d=u[1]-u[0],p=(0===c?0:d/c)*e,h=i.domain(),m=h[1]-h[0],f=(0===c?0:m/c)*e,g=o.domain(),y=g[1]-g[0],v=(0===c?0:y/c)*e,b=r.tickFormat(p,n),x=i.tickFormat(f,n),I=o.tickFormat(v,n);return e=>(e.valueOf()<=-a?b:e.valueOf()>=a?I:x)(e)},t.copy=()=>oa(t.domain(),t.range()).constant(t.constant()),t}function aa(e,t,n){switch(e){case"log":return Rr(t,n);case"pow":return Nr(t,n);case"sqrt":return function(){return Nr.apply(null,arguments).exponent(.5)}(t,n);case"time":return ta(t,n);case"utc":return function(){return zt.apply(ea(Si,Mi,wi,xi,pi,ti,Qr,Zr,qr,Li).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}(t,n);case"symlog":return oa(t,n);default:return mr(t,n)}}Oi=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Fi(i),u=Hi(i),d=Fi(o),p=Hi(o),h=Fi(a),m=Hi(a),f=Fi(s),g=Hi(s),y=Fi(l),v=Hi(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:lo,e:lo,f:mo,g:Mo,G:Po,H:co,I:uo,j:po,L:ho,m:fo,M:go,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Xo,s:Zo,S:yo,u:vo,U:bo,V:Io,w:wo,W:ko,x:null,X:null,y:So,Y:Co,Z:Eo,"%":qo},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:To,e:To,f:Ro,g:Yo,G:Go,H:Ao,I:Oo,j:jo,L:Lo,m:Do,M:$o,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Xo,s:Zo,S:zo,u:No,U:_o,V:Ho,w:Bo,W:Vo,x:null,X:null,y:Uo,Y:Wo,Z:Ko,"%":qo},I={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:Ji,e:Ji,f:io,g:Ki,G:Gi,H:eo,I:eo,j:Qi,L:ro,m:Zi,M:to,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:Xi,Q:ao,s:so,S:no,u:Vi,U:Ui,V:Yi,w:Bi,W:Wi,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:Ki,Y:Gi,Z:qi,"%":oo};function w(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Ti(Ai(o.y,0,1))).getUTCDay(),r=i>4||0===i?hi.ceil(r):hi(r),r=ti.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Ei(Ai(o.y,0,1))).getDay(),r=i>4||0===i?oi.ceil(r):oi(r),r=ei.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Ti(Ai(o.y,0,1)).getUTCDay():Ei(Ai(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Ti(o)):Ei(o)}}function S(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=I[i in Ri?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(t,b),x.x=w(n,x),x.X=w(r,x),x.c=w(t,x),{format:function(e){var t=w(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=k(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=k(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),ji=Oi.format,Oi.parse,Li=Oi.utcFormat,Oi.utcParse;const sa=e=>e?.[0]instanceof Date;function la(e,t,n){const r=ta(e,t);return(e,{location:t})=>"tick"===t?r.tickFormat(n)(e):`${e.toLocaleString()}`}let ca,ua;const da=new class{types=(()=>new Set)();constructor(){if(ca)throw new Error("You can only create one instance!");ca=this.types}addType(e){this.types.add(e)}getTypes(){return this.types}};da.addType("bar"),da.addType("line"),da.addType("scatter");const pa=new class{types=(()=>new Set)();constructor(){if(ua)throw new Error("You can only create one instance!");ua=this.types}addType(e){this.types.add(e)}getTypes(){return this.types}};function ha(e){return da.getTypes().has(e)}function ma(e){return ha(e.type)}function fa(e){return void 0!==e.bandwidth}function ga(e){return fa(e)&&void 0!==e.paddingOuter}function ya({scales:e,drawingArea:t,formattedSeries:n,axis:r,seriesConfig:i,axisDirection:o,zoomMap:a,domains:s}){if(void 0===r)return{axis:{},axisIds:[]};const c=((e,t,n,r)=>{const i=new Set;return Object.keys(t).filter(ha).forEach(o=>{const a=n[o]?.series??{},s=t[o].axisTooltipGetter?.(a);void 0!==s&&s.forEach(({axisId:t,direction:n})=>{n===e&&i.add(t??r)})}),i})(o,i,n,r[0].id),u={};return r.forEach(n=>{const r=n,i=e[r.id],d=a?.get(r.id),p=d?[d.start,d.end]:[0,100],h=function(e,t,n){const r="x"===t?[e.left,e.left+e.width]:[e.top+e.height,e.top];return n?[r[1],r[0]]:r}(t,o,r.reverse??!1),m=s[r.id].tickNumber,f=!r.ignoreTooltip&&c.has(r.id),g=Mr(m,p),y=r.data??[];if(fa(i)){const e="y"===o?[h[1],h[0]]:h;if(ga(i)&&Et(r)){const e=r.categoryGapRatio??.2,t=function(e,t){return e.step()*t<.1}(i,e),n=t?0:e,o=t?0:r.barGapRatio??.1;u[r.id]=l({offset:0,height:0,categoryGapRatio:n,barGapRatio:o,triggerTooltip:f},r,{data:y,scale:t?i.copy().padding(0):i,tickNumber:g,colorScale:r.colorMap&&("ordinal"===r.colorMap.type?wr(l({values:r.data},r.colorMap)):kr(r.colorMap))})}if(Tt(r)&&(u[r.id]=l({offset:0,height:0,triggerTooltip:f},r,{data:y,scale:i,tickNumber:g,colorScale:r.colorMap&&("ordinal"===r.colorMap.type?wr(l({values:r.data},r.colorMap)):kr(r.colorMap))})),sa(r.data)){const t=la(r.data,e,r.tickNumber);u[r.id].valueFormatter=r.valueFormatter??t}return}if("band"===r.scaleType||"point"===r.scaleType)return;const v=r,b=v.scaleType??"linear";u[r.id]=l({offset:0,height:0,triggerTooltip:f},v,{data:y,scaleType:b,scale:i,tickNumber:g,colorScale:v.colorMap&&Ir(v.colorMap),valueFormatter:r.valueFormatter??Pt(g,aa(b,h.map(e=>i.invert(e)),h))})}),{axis:u,axisIds:r.map(({id:e})=>e)}}function va(e){return null!=e}function ba(e,t,n,r){const i=e?.length??0,o=Math.floor(t*i/100),a=Math.ceil(n*i/100);return function(t,n){return null==(t[r]??e?.[n])||n>=o&&n=s&&n<=l}}pa.addType("radar");const Ia=e=>(t=[])=>t.reduce((t,n)=>{const{zoom:r,id:i,reverse:o}=n,a=St(r,i,e,o);return a&&(t[i]=a),t},{}),wa=ae(e=>e.experimentalFeatures,e=>Boolean(e?.preferStrictDomainInLineCharts));function ka(e){return Array.isArray(e)?JSON.stringify(e):"object"==typeof e&&null!==e?e.valueOf():e}function Sa(...e){let t,n,r=new gr(void 0,ka),i=[],o=[],a=0,s=1,l=!1,c=0,u=0,d=.5;const p=e=>{const t=r.get(e);if(void 0!==t)return o[t%o.length]},h=()=>{const e=i.length,r=sg+t*e);return o=r?v.reverse():v,p};p.domain=function(e){if(!arguments.length)return i.slice();i=[],r=new gr(void 0,ka);for(const t of e)r.has(t)||r.set(t,i.push(t)-1);return h()},p.range=function(e){if(!arguments.length)return[a,s];const[t,n]=e;return a=+t,s=+n,h()},p.rangeRound=function(e){const[t,n]=e;return a=+t,s=+n,l=!0,h()},p.bandwidth=function(){return n},p.step=function(){return t},p.round=function(e){return arguments.length?(l=!!e,h()):l},p.padding=function(e){return arguments.length?(c=Math.min(1,u=+e),h()):c},p.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),h()):c},p.paddingOuter=function(e){return arguments.length?(u=+e,h()):u},p.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),h()):d},p.copy=()=>Sa(i,[a,s]).round(l).paddingInner(c).paddingOuter(u).align(d);const[m,f]=e;return e.length>1?(p.domain(m),p.range(f)):m?p.range(m):h(),p}function Ma(...e){const t=Sa(...e).paddingInner(1),n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=()=>{const e=n();return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=t.copy,e},t}function Ca(e,t,n){const r="x"===t?[e.left,e.left+e.width]:[e.top+e.height,e.top];return n.reverse?[r[1],r[0]]:r}function Pa(e,t){const n=[0,1];if(Et(e)){const r=e.categoryGapRatio??.2;return Sa(t,n).paddingInner(r).paddingOuter(r/2)}if(Tt(e))return Ma(t,n);const r=aa(e.scaleType??"linear",t,n);return"symlog"===e.scaleType&&null!=e.constant&&r.constant(e.constant),r}const Ea=(e,t)=>{const n=e[1]-e[0],r=t[1]-t[0];return[e[0]-t[0]*n/r,e[1]+(100-t[1])*n/r]},Ta=(e,t,n,r,i,o,a)=>{const s="x"===n?r[e].xExtremumGetter:r[e].yExtremumGetter,l=o[e]?.series??{};return s?.({series:l,axis:t,axisIndex:i,isDefaultAxis:0===i,getFilters:a})??[1/0,-1/0]};function Aa(e,t,n,r,i,o){const a=Object.keys(n).filter(ha);let s=[1/0,-1/0];for(const l of a){const[a,c]=Ta(l,e,t,n,r,i,o);s=[Math.min(s[0],a),Math.max(s[1],c)]}return Number.isNaN(s[0])||Number.isNaN(s[1])?[1/0,-1/0]:s}function Oa(e,t,n){return aa(e??"linear",t,[0,1]).nice(n).domain()}function ja(e,t,n,r,[i,o],a,s){const l=Ra(e,t,n,r,s);let c=Da(e,i,o);if("function"==typeof l){const{min:e,max:t}=l(i.valueOf(),o.valueOf());c[0]=e,c[1]=t}const u=Sr(e,c,a);return"nice"===l&&(c=Oa(e.scaleType,c,u)),c=["min"in e?e.min??c[0]:c[0],"max"in e?e.max??c[1]:c[1]],{domain:c,tickNumber:u}}function La(e,t,n,r,[i,o],a,s){const l=Ra(e,t,n,r,s);let c=Da(e,i,o);if("function"==typeof l){const{min:e,max:t}=l(i.valueOf(),o.valueOf());c[0]=e,c[1]=t}return"nice"===l&&(c=Oa(e.scaleType,c,a)),[e.min??c[0],e.max??c[1]]}function Ra(e,t,n,r,i){return i?((e,t,n,r)=>{if(void 0!==e.domainLimit)return e.domainLimit;if("x"===t)for(const t of r.line?.seriesOrder??[]){const i=r.line.series[t];if(i.xAxisId===e.id||void 0===i.xAxisId&&0===n)return"strict"}return"nice"})(e,t,n,r):e.domainLimit??"nice"}function Da(e,t,n){let r=t,i=n;return"max"in e&&null!=e.max&&e.maxt&&(i=e.min),"min"in e||"max"in e?[e.min??r,e.max??i]:[r,i]}class $a{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(e,t){let n=this.length++;for(;n>0;){const e=n-1>>1,r=this.values[e];if(t>=r)break;this.ids[n]=this.ids[e],this.values[n]=r,n=e}this.ids[n]=e,this.values[n]=t}pop(){if(0===this.length)return;const e=this.ids,t=this.values,n=e[0],r=--this.length;if(r>0){const n=e[r],i=t[r];let o=0;const a=r>>1;for(;o=i)break;e[o]=e[s],t[o]=t[s],o=s}e[o]=n,t[o]=i}return n}peek(){return this.length>0?this.ids[0]:void 0}peekValue(){return this.length>0?this.values[0]:void 0}shrink(){this.ids.length=this.values.length=this.length}}const za=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class Na{static from(e,t=0){if(t%8!=0)throw new Error("byteOffset must be 8-byte aligned.");if(!e||void 0===e.byteLength||e.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");const[n,r]=new Uint8Array(e,t+0,2);if(251!==n)throw new Error("Data does not appear to be in a Flatbush format.");const i=r>>4;if(3!==i)throw new Error(`Got v${i} data when expected v3.`);const o=za[15&r];if(!o)throw new Error("Unrecognized array type.");const[a]=new Uint16Array(e,t+2,1),[s]=new Uint32Array(e,t+4,1);return new Na(s,a,o,void 0,e,t)}constructor(e,t=16,n=Float64Array,r=ArrayBuffer,i,o=0){if(void 0===e)throw new Error("Missing required argument: numItems.");if(isNaN(e)||e<=0)throw new Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.byteOffset=o;let a=e,s=a;this._levelBounds=[4*a];do{a=Math.ceil(a/this.nodeSize),s+=a,this._levelBounds.push(4*s)}while(1!==a);this.ArrayType=n,this.IndexArrayType=s<16384?Uint16Array:Uint32Array;const l=za.indexOf(n),c=4*s*n.BYTES_PER_ELEMENT;if(l<0)throw new Error(`Unexpected typed array class: ${n}.`);if(i)this.data=i,this._boxes=new n(i,o+8,4*s),this._indices=new this.IndexArrayType(i,o+8+c,s),this._pos=4*s,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1];else{const i=this.data=new r(8+c+s*this.IndexArrayType.BYTES_PER_ELEMENT);this._boxes=new n(i,8,4*s),this._indices=new this.IndexArrayType(i,8+c,s),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(i,0,2).set([251,48+l]),new Uint16Array(i,2,1)[0]=t,new Uint32Array(i,4,1)[0]=e}this._queue=new $a}add(e,t,n=e,r=t){const i=this._pos>>2,o=this._boxes;return this._indices[i]=i,o[this._pos++]=e,o[this._pos++]=t,o[this._pos++]=n,o[this._pos++]=r,ethis.maxX&&(this.maxX=n),r>this.maxY&&(this.maxY=r),i}finish(){if(this._pos>>2!==this.numItems)throw new Error(`Added ${this._pos>>2} items when expected ${this.numItems}.`);const e=this._boxes;if(this.numItems<=this.nodeSize)return e[this._pos++]=this.minX,e[this._pos++]=this.minY,e[this._pos++]=this.maxX,void(e[this._pos++]=this.maxY);const t=this.maxX-this.minX||1,n=this.maxY-this.minY||1,r=new Uint32Array(this.numItems);for(let i=0,o=0;i>2]=t,e[this._pos++]=i,e[this._pos++]=o,e[this._pos++]=a,e[this._pos++]=s}}}search(e,t,n,r,i){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let o=this._boxes.length-4;const a=[],s=[];for(;void 0!==o;){const l=Math.min(o+4*this.nodeSize,Fa(o,this._levelBounds));for(let c=o;cthis._boxes[c+2])continue;if(t>this._boxes[c+3])continue;const l=0|this._indices[c>>2];o>=4*this.numItems?a.push(l):(void 0===i||i(l))&&(s.push(l),s.push(this._boxes[c]),s.push(this._boxes[c+1]))}o=a.pop()}return s}neighbors(e,t,n=1/0,r=1/0,i,o=_a){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let a=this._boxes.length-4;const s=this._queue,l=[];e:for(;void 0!==a;){const c=Math.min(a+4*this.nodeSize,Fa(a,this._levelBounds));for(let n=a;n>2],c=this._boxes[n],u=this._boxes[n+1],d=this._boxes[n+2],p=this._boxes[n+3],h=o(ed?e-d:0,tp?t-p:0);h>r||(a>=4*this.numItems?s.push(l<<1,h):(void 0===i||i(l))&&s.push(1+(l<<1),h))}for(;s.length&&1&s.peek();){if(s.peekValue()>r)break e;if(l.push(s.pop()>>1),l.length===n)break e}a=s.length?s.pop()>>1:void 0}return s.clear(),l}}function _a(e,t){return e*e+t*t}function Fa(e,t){let n=0,r=t.length-1;for(;n>1;t[i]>e?r=i:n=i+1}return t[n]}function Ha(e,t,n,r,i,o){if(Math.floor(r/o)>=Math.floor(i/o))return;const a=e[r],s=e[r+i>>1],l=e[i];let c=l;const u=Math.max(a,s);l>u?c=u:u===a?c=Math.max(s,l):u===s&&(c=Math.max(a,l));let d=r-1,p=i+1;for(;;){do{d++}while(e[d]c);if(d>=p)break;Ba(e,t,n,d,p)}Ha(e,t,n,r,p,o),Ha(e,t,n,p+1,i,o)}function Ba(e,t,n,r,i){const o=e[r];e[r]=e[i],e[i]=o;const a=4*r,s=4*i,l=t[a],c=t[a+1],u=t[a+2],d=t[a+3];t[a]=t[s],t[a+1]=t[s+1],t[a+2]=t[s+2],t[a+3]=t[s+3],t[s]=l,t[s+1]=c,t[s+2]=u,t[s+3]=d;const p=n[r];n[r]=n[i],n[i]=p}function Va(e,t){let n=e^t,r=65535^n,i=65535^(e|t),o=e&(65535^t),a=n|r>>1,s=n>>1^n,l=i>>1^r&o>>1^i,c=n&i>>1^o>>1^o;n=a,r=s,i=l,o=c,a=n&n>>2^r&r>>2,s=n&r>>2^r&(n^r)>>2,l^=n&i>>2^r&o>>2,c^=r&i>>2^(n^r)&o>>2,n=a,r=s,i=l,o=c,a=n&n>>4^r&r>>4,s=n&r>>4^r&(n^r)>>4,l^=n&i>>4^r&o>>4,c^=r&i>>4^(n^r)&o>>4,n=a,r=s,i=l,o=c,l^=n&i>>8^r&o>>8,c^=r&i>>8^(n^r)&o>>8,n=l^l>>1,r=c^c>>1;let u=e^t,d=r|65535^(u|n);return u=16711935&(u|u<<8),u=252645135&(u|u<<4),u=858993459&(u|u<<2),u=1431655765&(u|u<<1),d=16711935&(d|d<<8),d=252645135&(d|d<<4),d=858993459&(d|d<<2),d=1431655765&(d|d<<1),(d<<1|u)>>>0}const Ua=e=>e.zoom,Ya=ae(ce,ue,(e,t)=>e?.some(e=>Boolean(e.zoom))||t?.some(e=>Boolean(e.zoom))||!1),Wa=ae(Ua,e=>e?.isInteracting),Ga=le(Ua,function(e){return e?.zoomData&&(e=>{const t=new Map;return e.forEach(e=>{t.set(e.axisId,e)}),t})(e?.zoomData)}),Ka=ae(Ga,(e,t)=>e?.get(t)),qa=le(ce,ue,function(e,t){return l({},Ia("x")(e),Ia("y")(t))}),Xa=ae(qa,(e,t)=>e[t]),Za=ae(he,function(e){return Cr(e.width)}),Ja=ae(he,function(e){return Cr(e.height)}),Qa=le(ce,ft,ht,wa,Za,function(e,t,n,r,i){const o={};return e?.forEach((e,a)=>{const s=e;if(Et(s)||Tt(s))return o[s.id]={domain:s.data},void(void 0!==s.ordinalTimeTicks&&(o[s.id].tickNumber=Sr(s,[s.data?.find(e=>null!==e),s.data?.findLast(e=>null!==e)],i)));const l=Aa(s,"x",n,a,t);o[s.id]=ja(s,"x",a,t,l,i,r)}),{axes:e,domains:o}}),es=le(ue,ft,ht,wa,Ja,function(e,t,n,r,i){const o={};return e?.forEach((e,a)=>{const s=e;if(Et(s)||Tt(s))return o[s.id]={domain:s.data},void(void 0!==s.ordinalTimeTicks&&(o[s.id].tickNumber=Sr(s,[s.data?.find(e=>null!==e),s.data?.findLast(e=>null!==e)],i)));const l=Aa(s,"y",n,a,t);o[s.id]=ja(s,"y",a,t,l,i,r)}),{axes:e,domains:o}}),ts=le(Ga,qa,Qa,es,function(e,t,{axes:n,domains:r},{axes:i,domains:o}){if(!e||!t)return;let a=!1;const s={},l=[...n??[],...i??[]];for(let i=0;i=100)continue;const d=i<(n?.length??0)?"x":"y";if("band"===c.scaleType||"point"===c.scaleType)s[c.id]=ba(c.data,u.start,u.end,d);else{const{domain:e}="x"===d?r[c.id]:o[c.id];s[c.id]=xa(e,u.start,u.end,d,c.data)}a=!0}return a?(e=>({currentAxisId:t,seriesXAxisId:n,seriesYAxisId:r,isDefaultAxis:i})=>(o,a)=>!(t===n?r:n)||i?Object.values(e??{})[0]?.(o,a)??!0:[r,n].filter(e=>e!==t).map(t=>e[t??""]).filter(va).every(e=>e(o,a)))(s):void 0}),ns=le(ft,ht,Ga,qa,ts,wa,Qa,function(e,t,n,r,i,o,{axes:a,domains:s}){const l={};return a?.forEach((a,c)=>{const u=s[a.id].domain;if(Et(a)||Tt(a))return void(l[a.id]=u);const d=n?.get(a.id),p=r?.[a.id],h=void 0!==d||p?void 0:i;if(!h)return void(l[a.id]=u);const m=s[a.id].tickNumber,f=Aa(a,"x",t,c,e,h);l[a.id]=La(a,"x",c,e,f,m,o)}),l}),rs=le(ft,ht,Ga,qa,ts,wa,es,function(e,t,n,r,i,o,{axes:a,domains:s}){const l={};return a?.forEach((a,c)=>{const u=s[a.id].domain;if(Et(a)||Tt(a))return void(l[a.id]=u);const d=n?.get(a.id),p=r?.[a.id],h=void 0!==d||p?void 0:i;if(!h)return void(l[a.id]=u);const m=s[a.id].tickNumber,f=Aa(a,"y",t,c,e,h);l[a.id]=La(a,"y",c,e,f,m,o)}),l}),is=le(ce,ns,function(e,t){const n={};return e?.forEach(e=>{const r=e,i=t[r.id];n[r.id]=Pa(r,i)}),n}),os=le(ue,rs,function(e,t){const n={};return e?.forEach(e=>{const r=e,i=t[r.id];n[r.id]=Pa(r,i)}),n}),as=le(ce,is,he,Ga,function(e,t,n,r){const i={};return e?.forEach(e=>{const o=e,a=r?.get(o.id),s=a?[a.start,a.end]:[0,100],l=Ca(n,"x",o),c=t[o.id].copy(),u=Ea(l,s);c.range(u),i[o.id]=c}),i}),ss=le(ue,os,he,Ga,function(e,t,n,r){const i={};return e?.forEach(e=>{const o=e,a=r?.get(o.id),s=a?[a.start,a.end]:[0,100],l=Ca(n,"y",o),c=t[o.id].copy(),u=fa(c)?l.reverse():l,d=Ea(u,s);c.range(d),i[o.id]=c}),i}),ls=le(he,ft,ht,Ga,Qa,as,function(e,t,n,r,{axes:i,domains:o},a){return ya({scales:a,drawingArea:e,formattedSeries:t,axis:i,seriesConfig:n,axisDirection:"x",zoomMap:r,domains:o})}),cs=le(he,ft,ht,Ga,es,ss,function(e,t,n,r,{axes:i,domains:o},a){return ya({scales:a,drawingArea:e,formattedSeries:t,axis:i,seriesConfig:n,axisDirection:"y",zoomMap:r,domains:o})}),us=ae(ls,cs,(e,t,n)=>e?.axis[n]??t?.axis[n]),ds=ae(ce,ue,(e,t,n)=>{const r=e?.find(e=>e.id===n)??t?.find(e=>e.id===n)??null;if(r)return r}),ps=ae(ce,e=>e[0].id),hs=ae(ue,e=>e[0].id),ms=new Map,fs=()=>ms,gs=le(ft,is,os,ps,hs,function(e,t,n,r,i){const o=e.scatter,a=new Map;return o?(o.seriesOrder.forEach(e=>{const{data:s,xAxisId:l=r,yAxisId:c=i}=o.series[e],u=new Na(s.length),d=t[l],p=n[c];for(const e of s)u.add(d(e.x),p(e.y));u.finish(),a.set(e,u)}),a):a});function ys(e){return e instanceof Date?e.getTime():e}function vs(e,t){const{scale:n,data:r,reverse:i}=e;if(!fa(n)){const e=n.invert(t);if(void 0===r)return-1;const i=ys(e),o=r?.findIndex((t,n)=>{const o=ys(t);return o>i&&(0===n||Math.abs(i-o)<=Math.abs(i-ys(r[n-1])))||o<=i&&(n===r.length-1||Math.abs(ys(e)-o)=r.length?-1:i?r.length-1-o:o}function bs(e,t,n,r){if(!fa(e)){if(null===r){const t=e.invert(n);return Number.isNaN(t)?null:t}return t[r]}return null===r||r<0||r>=t.length?null:t[r]}function xs(e,t){const n=e.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n.matrixTransform(e.getScreenCTM().inverse())}const Is=e=>e.interaction,ws=ae(Is,e=>void 0!==e),ks=ae(Is,e=>e?.pointer??null),Ss=ae(ks,e=>e&&e.x),Ms=ae(ks,e=>e&&e.y),Cs=ae(Is,e=>e?.lastUpdate);function Ps(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const n=e.length;if(n!==t.length)return!1;for(let r=0;rvs(t.axis[n],e)):vs(t.axis[n],e)}const Ts=(e,t,n)=>{if(null===e)return null;const r=Es(e,t,n);return-1===r?null:r},As=ae(Ss,ls,Ts),Os=ae(Ms,cs,Ts),js=ae(Ss,Ms,ls,cs,(e,t,n,r)=>[...null===e?[]:n.axisIds.map(t=>({axisId:t,dataIndex:Es(e,n,t)})),...null===t?[]:r.axisIds.map(e=>({axisId:e,dataIndex:Es(t,r,e)}))].filter(e=>null!==e.dataIndex&&e.dataIndex>=0));function Ls(e,t,n,r=t.axisIds[0]){return Array.isArray(r)?r.map((r,i)=>{const o=t.axis[r];return bs(o.scale,o.data,e,n[i])}):bs(t.axis[r].scale,t.axis[r].data,e,n)}const Rs=ae(Ss,ls,As,(e,t,n,r)=>null===e||0===t.axisIds.length?null:Ls(e,t,n,r)),Ds=ae(Ms,cs,Os,(e,t,n,r)=>null===e||0===t.axisIds.length?null:Ls(e,t,n,r)),$s=[],zs=se({memoizeOptions:{resultEqualityCheck:Ps}})(Ss,ls,(e,t)=>null===e?$s:t.axisIds.filter(e=>t.axis[e].triggerTooltip).map(n=>({axisId:n,dataIndex:vs(t.axis[n],e)})).filter(({dataIndex:e})=>e>=0)),Ns=se({memoizeOptions:{resultEqualityCheck:Ps}})(Ms,cs,(e,t)=>null===e?$s:t.axisIds.filter(e=>t.axis[e].triggerTooltip).map(n=>({axisId:n,dataIndex:vs(t.axis[n],e)})).filter(({dataIndex:e})=>e>=0)),_s=ae(zs,Ns,(e,t)=>e.length>0||t.length>0);function Fs(e){return void 0!==e.setPointerCoordinate}const Hs=new Set(["bar","rangeBar","line"]),Bs=({params:t,store:n,seriesConfig:r,svgRef:i,instance:o})=>{const{xAxis:a,yAxis:s,dataset:l,onHighlightedAxisChange:c}=t,u=n.use(he),d=n.use(ft),p=n.use(ws),{axis:h,axisIds:m}=n.use(ls),{axis:f,axisIds:g}=n.use(cs);t.highlightedAxis,V(()=>{void 0!==t.highlightedAxis&&n.set("controlledCartesianAxisHighlight",t.highlightedAxis)},[n,t.highlightedAxis]);const y=e.useRef(!0);e.useEffect(()=>{y.current?y.current=!1:n.set("cartesianAxis",{x:Mt(a,l),y:Ct(s,l)})},[r,u,a,s,l,n]);const v=m[0],b=g[0];!function(t,n,r){const i=st(ut,{store:t,selector:n}).current;var o;i.effect=r,o=i.onMount,e.useEffect(o,lt)}(n,js,(e,t)=>{c&&(Object.is(e,t)||(e.length===t.length?e?.some(({axisId:e,dataIndex:n},r)=>t[r].axisId!==e||t[r].dataIndex!==n)&&c(t):c(t)))});const x=Fs(o);return e.useEffect(()=>{const e=i.current;if(!p||!x||!e||t.disableAxisListener)return()=>{};const n=o.addInteractionListener("moveEnd",e=>{e.detail.activeGestures.pan||o.cleanInteraction()}),r=o.addInteractionListener("panEnd",e=>{e.detail.activeGestures.move||o.cleanInteraction()}),a=o.addInteractionListener("quickPressEnd",e=>{e.detail.activeGestures.move||e.detail.activeGestures.pan||o.cleanInteraction()}),s=t=>{const n=t.detail.srcEvent,r=t.detail.target,i=xs(e,n);t.detail.srcEvent.buttons>=1&&r?.hasPointerCapture(t.detail.srcEvent.pointerId)&&!r?.closest("[data-charts-zoom-slider]")&&r?.releasePointerCapture(t.detail.srcEvent.pointerId),o.isPointInside(i.x,i.y,r)?o.setPointerCoordinate(i):o.cleanInteraction?.()},l=o.addInteractionListener("move",s),c=o.addInteractionListener("pan",s),u=o.addInteractionListener("quickPress",s);return()=>{l.cleanup(),n.cleanup(),c.cleanup(),r.cleanup(),u.cleanup(),a.cleanup()}},[i,n,h,v,f,b,o,t.disableAxisListener,p,x]),e.useEffect(()=>{const e=i.current,n=t.onAxisClick;if(null===e||!n)return()=>{};const r=o.addInteractionListener("tap",t=>{let r=null,i=!1;const o=xs(e,t.detail.srcEvent),a=vs(h[v],o.x);i=-1!==a,r=i?a:vs(f[b],o.y);const s=i?m[0]:g[0];if(null==r||-1===r)return;const l=(i?h:f)[s].data[r],c={};Object.keys(d).filter(e=>Hs.has(e)).forEach(e=>{const t=d[e];t?.seriesOrder.forEach(e=>{const n=t.series[e],o=n.xAxisId,a=n.yAxisId,l=i?o:a;void 0!==l&&l!==s||(c[e]=n.data[r])})}),n(t.detail.srcEvent,{dataIndex:r,axisValue:l,seriesValues:c})});return()=>{r.cleanup()}},[t.onAxisClick,d,i,h,m,f,g,v,b,o]),{}};Bs.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0},Bs.getDefaultizedParams=({params:e})=>l({},e,{colors:e.colors??Ce,theme:e.theme??"light",defaultizedXAxis:Mt(e.xAxis,e.dataset),defaultizedYAxis:Ct(e.yAxis,e.dataset)}),Bs.getInitialState=e=>l({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},void 0===e.highlightedAxis?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});const Vs=Object.is;function Us(e,t){if(e===t)return!0;if(!(e instanceof Object&&t instanceof Object))return!1;let n=0,r=0;for(const r in e){if(n+=1,!Vs(e[r],t[r]))return!1;if(!(r in t))return!1}for(const e in t)r+=1;return n===r}const Ys=({store:e})=>{const t=ke(function(t){const n=e.state.tooltip.item;t?null!==n&&Us(n,t)&&e.set("tooltip",{item:null}):null!==n&&e.set("tooltip",{item:null})});return{instance:{setTooltipItem:ke(function(t){Us(e.state.tooltip.item,t)||e.set("tooltip",{item:t})}),removeTooltipItem:t}}};Ys.getInitialState=()=>({tooltip:{item:null}}),Ys.params={};const Ws=({store:e})=>({instance:{cleanInteraction:ke(function(){e.update({interaction:l({},e.state.interaction,{pointer:null})})}),setLastUpdateSource:ke(function(t){e.state.interaction.lastUpdate!==t&&e.set("interaction",l({},e.state.interaction,{lastUpdate:t}))}),setPointerCoordinate:ke(function(t){e.set("interaction",l({},e.state.interaction,{pointer:t,lastUpdate:null!==t?"pointer":e.state.interaction.lastUpdate}))})}});function Gs(e,t){return void 0!==e.id?e:l({id:t},e)}function Ks(e){return e.colorMap?l({},e,{colorScale:"ordinal"===e.colorMap.type&&e.data?wr(l({values:e.data},e.colorMap)):kr("continuous"===e.colorMap.type?l({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function qs(e,t){if(!e||0===e.length)return{axis:{},axisIds:[]};const n={},r=[];return e.forEach((e,i)=>{const o=e.dataKey,a=e.id??`defaultized-z-axis-${i}`;if(void 0===o||void 0!==e.data)return n[a]=Ks(Gs(e,a)),void r.push(a);if(void 0===t)throw new Error("MUI X Charts: z-axis uses `dataKey` but no `dataset` is provided.");n[a]=Ks(Gs(l({},e,{data:t.map(e=>e[o])}),a)),r.push(a)}),{axis:n,axisIds:r}}Ws.getInitialState=()=>({interaction:{item:null,pointer:null,lastUpdate:"pointer"}}),Ws.params={};const Xs=({params:t,store:n})=>{const{zAxis:r,dataset:i}=t,o=e.useRef(!0);return e.useEffect(()=>{o.current?o.current=!1:n.set("zAxis",qs(r,i))},[r,i,n]),{}};Xs.params={zAxis:!0,dataset:!0},Xs.getInitialState=e=>({zAxis:qs(e.zAxis,e.dataset)});const Zs=({store:e,params:t})=>(t.highlightedItem,V(()=>{e.state.highlight.item!==t.highlightedItem&&e.set("highlight",l({},e.state.highlight,{item:t.highlightedItem}))},[e,t.highlightedItem]),{instance:{clearHighlight:ke(()=>{t.onHighlightChange?.(null);const n=e.state.highlight;null===n.item||n.isControlled||e.set("highlight",{item:null,lastUpdate:"pointer",isControlled:!1})}),setHighlight:ke(n=>{const r=e.state.highlight;Us(r.item,n)||(t.onHighlightChange?.(n),r.isControlled||e.set("highlight",{item:n,lastUpdate:"pointer",isControlled:!1}))})}});function Js(e){let t=1/0,n=-1/0;for(const r of e??[])rn&&(n=r);return[t,n]}Zs.getInitialState=e=>({highlight:{item:e.highlightedItem,lastUpdate:"pointer",isControlled:void 0!==e.highlightedItem}}),Zs.params={highlightedItem:!0,onHighlightChange:!0};const Qs=(e,t)=>"x"===t?{x:e,y:null}:{x:null,y:e},el=e=>{const{axis:t,getFilters:n,isDefaultAxis:r}=e,i=n?.({currentAxisId:t.id,isDefaultAxis:r}),o=i?t.data?.filter((e,t)=>i({x:null,y:null},t)):t.data;return Js(o??[])},tl=e=>t=>{const{series:n,axis:r,getFilters:i,isDefaultAxis:o}=t;return Object.keys(n).filter(t=>{const i="x"===e?n[t].xAxisId:n[t].yAxisId;return i===r.id||o&&void 0===i}).reduce((t,a)=>{const{stackedData:s}=n[a],l=i?.({currentAxisId:r.id,isDefaultAxis:o,seriesXAxisId:n[a].xAxisId,seriesYAxisId:n[a].yAxisId}),[c,u]=s?.reduce((t,n,r)=>!l||l(Qs(n[0],e),r)&&l(Qs(n[1],e),r)?[Math.min(...n,t[0]),Math.max(...n,t[1])]:t,[1/0,-1/0])??[1/0,-1/0];return[Math.min(c,t[0]),Math.max(u,t[1])]},[1/0,-1/0])};function nl(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function rl(e){return function(){return e}}function il(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o=0;)n[t]=t;return n}function al(e,t){return e[t]}function sl(e){const t=[];return t.key=e,t}function ll(){var e=rl([]),t=ol,n=il,r=al;function i(i){var o,a,s=Array.from(e.apply(this,arguments),sl),l=s.length,c=-1;for(const e of i)for(o=0,++c;oo&&(o=t,r=n);return r}function dl(e){var t=e.map(pl);return ol(e).sort(function(e,n){return t[e]-t[n]})}function pl(e){for(var t,n=0,r=-1,i=e.length;++r0){for(var n,r,i,o=0,a=e[0].length;o0?(s[0]=i,i+=l,s[1]=i):l<0?(s[1]=o,o+=l,s[0]=o):s.data[n.key]>0?(s[0]=i,s[1]=i):s.data[n.key]<0?(s[1]=o,s[0]=o):(s[0]=0,s[1]=0)}}},none:il,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a{const{series:t,seriesOrder:n,defaultStrategy:r}=e,i=[],o={};return n.forEach(e=>{const{stack:n,stackOrder:a,stackOffset:s}=t[e];void 0===n?i.push({ids:[e],stackingOrder:hl.none,stackingOffset:ml.none}):void 0===o[n]?(o[n]=i.length,i.push({ids:[e],stackingOrder:hl[a??r?.stackOrder??"none"],stackingOffset:ml[s??r?.stackOffset??"diverging"]})):(i[o[n]].ids.push(e),void 0!==a&&(i[o[n]].stackingOrder=hl[a]),void 0!==s&&(i[o[n]].stackingOffset=ml[s]))}),i},gl=e=>null==e?"":e.toLocaleString();function yl(e,t){return"function"==typeof e?e(t):e}function vl(e){return e.colorGetter?e.colorGetter:()=>e.color}const bl=(e,t,n)=>{const r="vertical"===e.layout,i=r?t?.colorScale:n?.colorScale,o=r?n?.colorScale:t?.colorScale,a=r?t?.data:n?.data,s=vl(e);return o?t=>{if(void 0===t)return e.color;const n=e.data[t],r=null===n?s({value:n,dataIndex:t}):o(n);return null===r?s({value:n,dataIndex:t}):r}:i&&a?t=>{if(void 0===t)return e.color;const n=a[t],r=null===n?s({value:n,dataIndex:t}):i(n);return null===r?s({value:n,dataIndex:t}):r}:t=>{if(void 0===t)return e.color;const n=e.data[t];return s({value:n,dataIndex:t})}};function xl(e,t){return Object.keys(e).filter(e=>t.has(e)).flatMap(t=>{const n=e[t];return n.seriesOrder.filter(e=>n.series[e].data.length>0&&n.series[e].data.some(e=>null!=e)).map(e=>({type:t,seriesId:e}))})}function Il(e,t,n,r){const i=xl(e,t);if(0===i.length)return null;const o=void 0!==n&&void 0!==r?i.findIndex(e=>e.type===n&&e.seriesId===r):-1;return o<=0?i[i.length-1]:i[(o-1+i.length)%i.length]}function wl(e,t){return Object.keys(e).filter(e=>t.has(e)).flatMap(t=>{const n=e[t];return n.seriesOrder.filter(e=>n.series[e].data.length>0&&n.series[e].data.some(e=>null!=e)).map(e=>n.series[e].data.length)}).reduce((e,t)=>Math.max(e,t),0)}function kl(e,t,n,r){const i=xl(e,t);if(0===i.length)return null;const o=void 0!==n&&void 0!==r?i.findIndex(e=>e.type===n&&e.seriesId===r):-1;return i[(o+1)%i.length]}function Sl(e,t,n){if("sankey"===t)return!1;const r=e[t]?.series[n]?.data;return null!=r&&r.length>0}function Ml(e){return function(t,n){const r=ft(n);let i=t?.seriesId,o=t?.type;if(!o||null==i||!Sl(r,o,i)){const t=kl(r,e,o,i);if(null===t)return null;o=t.type,i=t.seriesId}const a=wl(r,e);return{type:o,seriesId:i,dataIndex:Math.min(a-1,null==t?.dataIndex?0:t.dataIndex+1)}}}function Cl(e){return function(t,n){const r=ft(n);let i=t?.seriesId,o=t?.type;if(!o||null==i||!Sl(r,o,i)){const t=Il(r,e,o,i);if(null===t)return null;o=t.type,i=t.seriesId}const a=wl(r,e);return{type:o,seriesId:i,dataIndex:Math.max(0,null==t?.dataIndex?a-1:t.dataIndex-1)}}}function Pl(e){return function(t,n){const r=ft(n);let i=t?.seriesId,o=t?.type;const a=kl(r,e,o,i);return null===a?null:(o=a.type,i=a.seriesId,{type:o,seriesId:i,dataIndex:null==t?.dataIndex?0:t.dataIndex})}}function El(e){return function(t,n){const r=ft(n);let i=t?.seriesId,o=t?.type;const a=Il(r,e,o,i);if(null===a)return null;o=a.type,i=a.seriesId;const s=r[o].series[i].data;return{type:o,seriesId:i,dataIndex:null==t?.dataIndex?s.length-1:t.dataIndex}}}const Tl=new Set(["bar","line","scatter"]);function Al(e,t,n){if(0===n)return{barWidth:e/t,offset:0};const r=e/(t+(t-1)*n);return{barWidth:r,offset:n*r}}function Ol(e){const{verticalLayout:t,xAxisConfig:n,yAxisConfig:r,series:i,dataIndex:o,numberOfGroups:a,groupIndex:s}=e,l=t?n:r,c=(t?r.reverse:n.reverse)??!1,{barWidth:u,offset:d}=Al(l.scale.bandwidth(),a,l.barGapRatio),p=s*(u+d),h=n.scale,m=r.scale,f=l.data[o],g=i.data[o];if(null==g)return null;const y=i.stackedData[o].map(e=>t?m(e):h(e)),v=Math.round(Math.min(...y)),b=Math.round(Math.max(...y)),x=0===g?0:Math.max(i.minBarSize,b-v),I=function(e,t,n){const r=e&&t>0||!e&&t<0;return n?!r:r}(t,g,c)?b-x:v;return{x:t?h(f)+p:I,y:t?I:m(f)+p,height:t?x:u,width:t?u:x}}const jl=e=>{return`${r=e.type,`Type(${r})`}${n=e.seriesId,`Series(${n})`}${t=e.dataIndex,void 0===t?"":`Index(${t})`}`;var t,n,r},Ll={seriesProcessor:(e,t)=>{const{seriesOrder:n,series:r}=e,i=fl(e),o=t??[];n.forEach(e=>{const n=r[e].data;if(void 0!==n)n.forEach((t,n)=>{o.length<=n?o.push({[e]:t}):o[n][e]=t});else if(void 0===t)throw new Error([`MUI X Charts: bar series with id='${e}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join("\n"))});const a={};return i.forEach(e=>{const{ids:n,stackingOffset:i,stackingOrder:s}=e,c=ll().keys(n.map(e=>{const t=r[e].dataKey;return void 0===r[e].data&&void 0!==t?t:e})).value((e,t)=>e[t]??0).order(s).offset(i)(o);n.forEach((e,n)=>{const i=r[e].dataKey;a[e]=l({layout:"vertical",labelMarkType:"square",minBarSize:0,valueFormatter:r[e].valueFormatter??gl},r[e],{data:i?t.map(e=>{const t=e[i];return"number"==typeof t?t:null}):r[e].data,stackedData:c[n].map(([e,t])=>[e,t])})})}),{seriesOrder:n,stackingGroups:i,series:a}},colorProcessor:bl,legendGetter:e=>{const{seriesOrder:t,series:n}=e;return t.reduce((e,t)=>{const r=yl(n[t].label,"legend");return void 0===r||e.push({type:"bar",markType:n[t].labelMarkType,id:t,seriesId:t,color:n[t].color,label:r}),e},[])},tooltipGetter:e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||void 0===r.dataIndex)return null;const i=yl(t.label,"tooltip"),o=t.data[r.dataIndex];if(null==o)return null;const a=t.valueFormatter(o,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:i,value:o,formattedValue:a,markType:t.labelMarkType}},tooltipItemPositionGetter:e=>{const{series:t,identifier:n,axesConfig:r,placement:i}=e;if(!n||void 0===n.dataIndex)return null;const o=t.bar?.series[n.seriesId];if(null==t.bar||null==o)return null;if(void 0===r.x||void 0===r.y)return null;const a=Ol({verticalLayout:"vertical"===o.layout,xAxisConfig:r.x,yAxisConfig:r.y,series:o,dataIndex:n.dataIndex,numberOfGroups:t.bar.stackingGroups.length,groupIndex:t.bar.stackingGroups.findIndex(e=>e.ids.includes(o.id))});if(null==a)return null;const{x:s,y:l,width:c,height:u}=a;switch(i){case"right":return{x:s+c,y:l+u/2};case"bottom":return{x:s+c/2,y:l+u};case"left":return{x:s,y:l+u/2};default:return{x:s+c/2,y:l}}},axisTooltipGetter:e=>Object.values(e).map(e=>"horizontal"===e.layout?{direction:"y",axisId:e.yAxisId}:{direction:"x",axisId:e.xAxisId}),xExtremumGetter:e=>Object.keys(e.series).some(t=>"horizontal"===e.series[t].layout)?tl("x")(e):el(e),yExtremumGetter:e=>Object.keys(e.series).some(t=>"horizontal"===e.series[t].layout)?el(e):tl("y")(e),getSeriesWithDefaultValues:function(e,t,n){return l({},e,{id:e.id??`auto-generated-id-${t}`,color:e.color??n[t%n.length]})},keyboardFocusHandler:e=>{switch(e.key){case"ArrowRight":return Ml(Tl);case"ArrowLeft":return Cl(Tl);case"ArrowDown":return El(Tl);case"ArrowUp":return Pl(Tl);default:return null}},identifierSerializer:jl},Rl=new Set(["bar","line","scatter"]),Dl={seriesProcessor:({series:e,seriesOrder:t},n)=>({series:Object.fromEntries(Object.entries(e).map(([e,t])=>{const r=t?.datasetKeys,i=["x","y"].filter(e=>"string"!=typeof r?.[e]);if(t?.datasetKeys&&i.length>0)throw new Error([`MUI X Charts: scatter series with id='${e}' has incomplete datasetKeys.`,`Properties ${i.map(e=>`"${e}"`).join(", ")} are missing.`].join("\n"));const o=r?n?.map(e=>({x:e[r.x]??null,y:e[r.y]??null,z:r.z&&e[r.z],id:r.id&&e[r.id]}))??[]:t.data??[];return[e,l({labelMarkType:"circle",markerSize:4},t,{preview:l({markerSize:1},t?.preview),data:o,valueFormatter:t.valueFormatter??(e=>e&&`(${e.x}, ${e.y})`)})]})),seriesOrder:t}),colorProcessor:(e,t,n,r)=>{const i=r?.colorScale,o=n?.colorScale,a=t?.colorScale,s=vl(e);return i?t=>{if(void 0===t)return e.color;if(void 0!==r?.data?.[t]){const e=i(r?.data?.[t]);if(null!==e)return e}const n=e.data[t],o=null===n?s({value:n,dataIndex:t}):i(n.z);return null===o?s({value:n,dataIndex:t}):o}:o?t=>{if(void 0===t)return e.color;const n=e.data[t],r=null===n?s({value:n,dataIndex:t}):o(n.y);return null===r?s({value:n,dataIndex:t}):r}:a?t=>{if(void 0===t)return e.color;const n=e.data[t],r=null===n?s({value:n,dataIndex:t}):a(n.x);return null===r?s({value:n,dataIndex:t}):r}:t=>{if(void 0===t)return e.color;const n=e.data[t];return s({value:n,dataIndex:t})}},legendGetter:e=>{const{seriesOrder:t,series:n}=e;return t.reduce((e,t)=>{const r=yl(n[t].label,"legend");return void 0===r||e.push({type:"scatter",markType:n[t].labelMarkType,id:t,seriesId:t,color:n[t].color,label:r}),e},[])},tooltipGetter:e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||void 0===r.dataIndex)return null;const i=yl(t.label,"tooltip"),o=t.data[r.dataIndex],a=t.valueFormatter(o,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:i,value:o,formattedValue:a,markType:t.labelMarkType}},tooltipItemPositionGetter:e=>{const{series:t,identifier:n,axesConfig:r}=e;if(!n||void 0===n.dataIndex)return null;const i=t.scatter?.series[n.seriesId];if(null==i)return null;if(void 0===r.x||void 0===r.y)return null;const o=i.data?.[n.dataIndex].x,a=i.data?.[n.dataIndex].y;return null==o||null==a?null:{x:r.x.scale(o),y:r.y.scale(a)}},xExtremumGetter:e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e;let o=1/0,a=-1/0;for(const e in t){if(!Object.hasOwn(t,e))continue;const s=t[e].xAxisId;if(!(s===n.id||void 0===s&&r))continue;const l=i?.({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[e].xAxisId,seriesYAxisId:t[e].yAxisId}),c=t[e].data??[];for(let e=0;ea&&(a=t.x))}}return[o,a]},yExtremumGetter:e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e;let o=1/0,a=-1/0;for(const e in t){if(!Object.hasOwn(t,e))continue;const s=t[e].yAxisId;if(!(s===n.id||void 0===s&&r))continue;const l=i?.({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[e].xAxisId,seriesYAxisId:t[e].yAxisId}),c=t[e].data??[];for(let e=0;ea&&(a=t.y))}}return[o,a]},getSeriesWithDefaultValues:(e,t,n)=>l({},e,{id:e.id??`auto-generated-id-${t}`,color:e.color??n[t%n.length]}),keyboardFocusHandler:e=>{switch(e.key){case"ArrowRight":return Ml(Rl);case"ArrowLeft":return Cl(Rl);case"ArrowDown":return El(Rl);case"ArrowUp":return Pl(Rl);default:return null}},identifierSerializer:jl},$l=(e,t,n)=>{const r=n?.colorScale,i=t?.colorScale,o=vl(e);return r?t=>{if(void 0===t)return e.color;const n=e.data[t],i=null===n?o({value:n,dataIndex:t}):r(n);return null===i?o({value:n,dataIndex:t}):i}:i?n=>{if(void 0===n)return e.color;const r=t.data?.[n],a=null===r?o({value:r,dataIndex:n}):i(r);return null===a?o({value:r,dataIndex:n}):a}:t=>{if(void 0===t)return e.color;const n=e.data[t];return o({value:n,dataIndex:t})}},zl=new Set(["bar","line","scatter"]),Nl={colorProcessor:$l,seriesProcessor:(e,t)=>{const{seriesOrder:n,series:r}=e,i=fl(l({},e,{defaultStrategy:{stackOffset:"none"}})),o=t??[];n.forEach(e=>{const t=r[e].data;void 0!==t&&t.forEach((t,n)=>{o.length<=n?o.push({[e]:t}):o[n][e]=t})});const a={};return i.forEach(e=>{const{ids:n,stackingOrder:i,stackingOffset:s}=e,c=ll().keys(n.map(e=>{const t=r[e].dataKey;return void 0===r[e].data&&void 0!==t?t:e})).value((e,t)=>e[t]??0).order(i).offset(s)(o);n.forEach((e,n)=>{const i=r[e].dataKey;a[e]=l({labelMarkType:"line"},r[e],{data:i?t.map(e=>{const t=e[i];return"number"==typeof t?t:null}):r[e].data,stackedData:c[n].map(([e,t])=>[e,t]),valueFormatter:r[e]?.valueFormatter??(e=>null==e?"":e.toLocaleString())})})}),{seriesOrder:n,stackingGroups:i,series:a}},legendGetter:e=>{const{seriesOrder:t,series:n}=e;return t.reduce((e,t)=>{const r=yl(n[t].label,"legend");return void 0===r||e.push({type:"line",markType:n[t].labelMarkType,id:t,seriesId:t,color:n[t].color,label:r}),e},[])},tooltipGetter:e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||void 0===r.dataIndex)return null;const i=yl(t.label,"tooltip"),o=t.data[r.dataIndex],a=t.valueFormatter(o,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:i,value:o,formattedValue:a,markType:t.labelMarkType}},tooltipItemPositionGetter:e=>{const{series:t,identifier:n,axesConfig:r}=e;if(!n||void 0===n.dataIndex)return null;const i=t.line?.series[n.seriesId];if(null==i)return null;if(void 0===r.x||void 0===r.y)return null;const o=r.x.data?.[n.dataIndex],a=i.data[n.dataIndex];return null==o||null==a?null:{x:r.x.scale(o),y:r.y.scale(a)}},axisTooltipGetter:e=>Object.values(e).map(e=>({direction:"x",axisId:e.xAxisId})),xExtremumGetter:e=>{const{axis:t}=e;return Js(t.data??[])},yExtremumGetter:e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e;return Object.keys(t).filter(e=>{const i=t[e].yAxisId;return i===n.id||r&&void 0===i}).reduce((e,o)=>{const{area:a,stackedData:s,data:l}=t[o],c=void 0!==a,u=i?.({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[o].xAxisId,seriesYAxisId:t[o].yAxisId}),d=function(e,t,n,r){return n.reduce((n,i,o)=>{if(null===t[o])return n;const[a,s]=e(i);return!r||r({y:a,x:null},o)&&r({y:s,x:null},o)?[Math.min(a,s,n[0]),Math.max(a,s,n[1])]:n},[1/0,-1/0])}(c&&"log"!==n.scaleType&&"string"!=typeof t[o].baseline?e=>e:e=>[e[1],e[1]],l,s,u),[p,h]=d;return[Math.min(p,e[0]),Math.max(h,e[1])]},[1/0,-1/0])},getSeriesWithDefaultValues:(e,t,n)=>l({},e,{id:e.id??`auto-generated-id-${t}`,color:e.color??n[t%n.length]}),keyboardFocusHandler:e=>{switch(e.key){case"ArrowRight":return Ml(zl);case"ArrowLeft":return Cl(zl);case"ArrowDown":return El(zl);case"ArrowUp":return Pl(zl);default:return null}},identifierSerializer:jl};function _l(e,t){return te?1:t>=e?0:NaN}function Fl(e){return e}const Hl=Math.abs,Bl=Math.atan2,Vl=Math.cos,Ul=Math.max,Yl=Math.min,Wl=Math.sin,Gl=Math.sqrt,Kl=1e-12,ql=Math.PI,Xl=ql/2,Zl=2*ql;function Jl(e){return e>=1?Xl:e<=-1?-Xl:Math.asin(e)}const Ql=(e,t)=>void 0===e?t:Math.PI*e/180;function ec(e,t){if("number"==typeof e)return e;if("100%"===e)return t;if(e.endsWith("%")){const n=Number.parseFloat(e.slice(0,e.length-1));if(!Number.isNaN(n))return n*t/100}if(e.endsWith("px")){const t=Number.parseFloat(e.slice(0,e.length-2));if(!Number.isNaN(t))return t}throw new Error(`MUI X Charts: Received an unknown value "${e}". It should be a number, or a string with a percentage value.`)}function tc(e,t){const{height:n,width:r}=t,{cx:i,cy:o}=e,a=Math.min(r,n)/2;return{cx:ec(i??"50%",r),cy:ec(o??"50%",n),availableRadius:a}}const nc=new Set(["pie"]),rc={bar:Ll,scatter:Dl,line:Nl,pie:{colorProcessor:e=>t=>e.data[t].color,seriesProcessor:e=>{const{seriesOrder:t,series:n}=e,r={};return t.forEach(e=>{const t=function(){var e=Fl,t=_l,n=null,r=rl(0),i=rl(Zl),o=rl(0);function a(a){var s,l,c,u,d,p=(a=nl(a)).length,h=0,m=new Array(p),f=new Array(p),g=+r.apply(this,arguments),y=Math.min(Zl,Math.max(-Zl,i.apply(this,arguments)-g)),v=Math.min(Math.abs(y)/p,o.apply(this,arguments)),b=v*(y<0?-1:1);for(s=0;s0&&(h+=d);for(null!=t?m.sort(function(e,n){return t(f[e],f[n])}):null!=n&&m.sort(function(e,t){return n(a[e],a[t])}),s=0,c=h?(y-p*b)/h:0;s0?d*c:0)+b,f[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:v};return f}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:rl(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:rl(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:rl(+e),a):i},a.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:rl(+e),a):o},a}().startAngle(Ql(n[e].startAngle??0)).endAngle(Ql(n[e].endAngle??360)).padAngle(Ql(n[e].paddingAngle??0)).sortValues(((e="none")=>{if("function"==typeof e)return e;switch(e){case"none":default:return null;case"desc":return(e,t)=>t-e;case"asc":return(e,t)=>e-t}})(n[e].sortingValues??"none"))(n[e].data.map(e=>e.value));r[e]=l({labelMarkType:"circle",valueFormatter:e=>e.value.toLocaleString()},n[e],{data:n[e].data.map((n,r)=>l({},n,{id:n.id??`auto-generated-pie-id-${e}-${r}`},t[r])).map((t,r)=>l({labelMarkType:"circle"},t,{formattedValue:n[e].valueFormatter?.(l({},t,{label:yl(t.label,"arc")}),{dataIndex:r})??t.value.toLocaleString()}))})}),{seriesOrder:t,series:r}},seriesLayout:(e,t)=>{const n={};for(const r of e.seriesOrder){const{innerRadius:i,outerRadius:o,arcLabelRadius:a,cx:s,cy:l}=e.series[r],{cx:c,cy:u,availableRadius:d}=tc({cx:s,cy:l},{width:t.width,height:t.height}),p=ec(o??d,d),h=ec(i??0,d),m=void 0===a?(h+p)/2:ec(a,d);n[r]={radius:{available:d,inner:h,outer:p,label:m},center:{x:t.left+c,y:t.top+u}}}return n},legendGetter:e=>{const{seriesOrder:t,series:n}=e;return t.reduce((e,t)=>(n[t].data.forEach((r,i)=>{const o=yl(r.label,"legend");if(void 0===o)return;const a=r.id??i;e.push({type:"pie",markType:r.labelMarkType??n[t].labelMarkType,seriesId:t,id:a,itemId:a,dataIndex:i,color:r.color,label:o})}),e),[])},tooltipGetter:e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||void 0===r.dataIndex)return null;const i=t.data[r.dataIndex];if(null==i)return null;const o=yl(i.label,"tooltip"),a=l({},i,{label:o}),s=t.valueFormatter(a,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:o,value:a,formattedValue:s,markType:i.labelMarkType??t.labelMarkType}},tooltipItemPositionGetter:e=>{const{series:t,identifier:n,placement:r,seriesLayout:i}=e;if(!n||void 0===n.dataIndex)return null;const o=t.pie?.series[n.seriesId],a=i.pie?.[n.seriesId];if(null==o||null==a)return null;const{center:s,radius:l}=a,{data:c}=o,u=c[n.dataIndex];if(!u)return null;const d=[[l.inner,u.startAngle],[l.inner,u.endAngle],[l.outer,u.startAngle],[l.outer,u.endAngle]].map(([e,t])=>({x:s.x+e*Math.sin(t),y:s.y-e*Math.cos(t)})),[p,h]=Js(d.map(e=>e.x)),[m,f]=Js(d.map(e=>e.y));switch(r){case"bottom":return{x:(h+p)/2,y:f};case"left":return{x:p,y:(f+m)/2};case"right":return{x:h,y:(f+m)/2};default:return{x:(h+p)/2,y:m}}},getSeriesWithDefaultValues:(e,t,n)=>l({},e,{id:e.id??`auto-generated-id-${t}`,data:e.data.map((e,t)=>l({},e,{color:e.color??n[t%n.length]}))}),keyboardFocusHandler:e=>{switch(e.key){case"ArrowRight":return Ml(nc);case"ArrowLeft":return Cl(nc);case"ArrowDown":return El(nc);case"ArrowUp":return Pl(nc);default:return null}},identifierSerializer:jl}},ic=[Xs,Ys,Ws,Bs,Zs];function oc(t){const{children:n,plugins:r=ic,pluginParams:i={},seriesConfig:o=rc}=t,{contextValue:a}=function(t,n,r){const i=z(),o=e.useMemo(()=>[...et,...t],[t]),a=rt({plugins:o,props:n});a.id=a.id??i;const s=e.useRef({}).current,l=function(t){const n=e.useRef({});return t?function(e){return null==e.current&&(e.current={}),e}(t):n}(n.apiRef),c=e.useRef(null),u=e.useRef(null),d=e.useRef(null);if(null==d.current){it+=1;const e={cacheKey:{id:it}};o.forEach(t=>{t.getInitialState&&Object.assign(e,t.getInitialState(a,e,r))}),d.current=new B(e)}return o.forEach(e=>{const t=e({instance:s,params:a,plugins:o,store:d.current,svgRef:u,chartRootRef:c,seriesConfig:r});t.publicAPI&&Object.assign(l.current,t.publicAPI),t.instance&&Object.assign(s,t.instance)}),{contextValue:e.useMemo(()=>({store:d.current,publicAPI:l.current,instance:s,svgRef:u,chartRootRef:c}),[s,l])}}(r,i,o);return(0,O.jsx)(ot.Provider,{value:a,children:n})}const ac=e.createContext(null);function sc(){const t=e.useContext(ac);if(null==t)throw new Error(["MUI X Charts: Could not find the Charts Slots context.","It looks like you rendered your component outside of a ChartDataProvider.","This can also happen if you are bundling multiple versions of the library."].join("\n"));return t}function lc(t){const{slots:n,slotProps:r={},defaultSlots:i,children:o}=t,a=e.useMemo(()=>({slots:l({},i,n),slotProps:r}),[i,n,r]);return(0,O.jsx)(ac.Provider,{value:a,children:o})}function cc(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if("components"===i||"slots"===i)n[i]={...e[i],...n[i]};else if("componentsProps"===i||"slotProps"===i){const r=e[i],o=t[i];if(o)if(r){n[i]={...o};for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const t=e;n[i][t]=cc(r[t],o[t])}}else n[i]=o;else n[i]=r||{}}else void 0===n[i]&&(n[i]=e[i])}return n}function uc(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?cc(t.components[n].defaultProps,r):r}var dc=a(4405);function pc(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function hc(t){if(e.isValidElement(t)||(0,dc.Hy)(t)||!pc(t))return t;const n={};return Object.keys(t).forEach(e=>{n[e]=hc(t[e])}),n}function mc(t,n,r={clone:!0}){const i=r.clone?{...t}:t;return pc(t)&&pc(n)&&Object.keys(n).forEach(o=>{e.isValidElement(n[o])||(0,dc.Hy)(n[o])?i[o]=n[o]:pc(n[o])&&Object.prototype.hasOwnProperty.call(t,o)&&pc(t[o])?i[o]=mc(t[o],n[o],r):r.clone?i[o]=pc(n[o])?hc(n[o]):n[o]:i[o]=n[o]}),i}function fc(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,o=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),a=Object.keys(o);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,i){const o=a.indexOf(i);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==o&&"number"==typeof t[a[o]]?t[a[o]]:i)-r/100}${n})`}return{keys:a,values:o,up:s,down:l,between:c,only:function(e){return a.indexOf(e)+1e.startsWith("@container")).sort((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e},{...t}):t}const yc={borderRadius:4},vc={xs:0,sm:600,md:900,lg:1200,xl:1536},bc={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${vc[e]}px)`},xc={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:vc[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Ic(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||bc;return t.reduce((r,i,o)=>(r[e.up(e.keys[o])]=n(t[o]),r),{})}if("object"==typeof t){const e=r.breakpoints||bc;return Object.keys(t).reduce((i,o)=>{if(function(e,t){return"@"===t||t.startsWith("@")&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}(e.keys,o)){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,i]=n,o=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(o)}(r.containerQueries?r:xc,o);e&&(i[e]=n(t[o],o))}else if(Object.keys(e.values||vc).includes(o))i[e.up(o)]=n(t[o],o);else{const e=o;i[e]=t[e]}return i},{})}return n(t)}function wc(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function kc(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${n} for the full message.`}function Sc(e){if("string"!=typeof e)throw new Error(kc(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Mc(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function Cc(e,t,n,r=n){let i;return i="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:Mc(e,n)||r,t&&(i=t(i,r,e)),i}const Pc=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=e=>{if(null==e[t])return null;const o=e[t],a=Mc(e.theme,r)||{};return Ic(e,o,e=>{let r=Cc(a,i,e);return e===r&&"string"==typeof e&&(r=Cc(a,i,`${t}${"default"===e?"":Sc(e)}`,e)),!1===n?r:{[n]:r}})};return o.propTypes={},o.filterProps=[t],o},Ec=function(e,t){return t?mc(e,t,{clone:!1}):e},Tc={m:"margin",p:"padding"},Ac={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Oc={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},jc=function(){const e={};return t=>(void 0===e[t]&&(e[t]=(e=>{if(e.length>2){if(!Oc[e])return[e];e=Oc[e]}const[t,n]=e.split(""),r=Tc[t],i=Ac[n]||"";return Array.isArray(i)?i.map(e=>r+e):[r+i]})(t)),e[t])}(),Lc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Rc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Dc=[...Lc,...Rc];function $c(e,t,n,r){const i=Mc(e,t,!0)??n;return"number"==typeof i||"string"==typeof i?e=>"string"==typeof e?e:"string"==typeof i?`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if("string"==typeof e)return e;const t=Math.abs(e),n=i[t];return e>=0?n:"number"==typeof n?-n:`-${n}`}:"function"==typeof i?i:()=>{}}function zc(e){return $c(e,"spacing",8)}function Nc(e,t){return"string"==typeof t||null==t?t:e(t)}function _c(e,t){const n=zc(e.theme);return Object.keys(e).map(r=>function(e,t,n,r){if(!t.includes(n))return null;const i=function(e,t){return n=>e.reduce((e,r)=>(e[r]=Nc(t,n),e),{})}(jc(n),r);return Ic(e,e[n],i)}(e,t,r,n)).reduce(Ec,{})}function Fc(e){return _c(e,Lc)}function Hc(e){return _c(e,Rc)}function Bc(e){return _c(e,Dc)}function Vc(e=8,t=zc({spacing:e})){if(e.mui)return e;const n=(...e)=>(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?`${n}px`:n}).join(" ");return n.mui=!0,n}Fc.propTypes={},Fc.filterProps=Lc,Hc.propTypes={},Hc.filterProps=Rc,Bc.propTypes={},Bc.filterProps=Dc;const Uc=function(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?Ec(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n};function Yc(e){return"number"!=typeof e?e:`${e}px solid`}function Wc(e,t){return Pc({prop:e,themeKey:"borders",transform:t})}const Gc=Wc("border",Yc),Kc=Wc("borderTop",Yc),qc=Wc("borderRight",Yc),Xc=Wc("borderBottom",Yc),Zc=Wc("borderLeft",Yc),Jc=Wc("borderColor"),Qc=Wc("borderTopColor"),eu=Wc("borderRightColor"),tu=Wc("borderBottomColor"),nu=Wc("borderLeftColor"),ru=Wc("outline",Yc),iu=Wc("outlineColor"),ou=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=$c(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:Nc(t,e)});return Ic(e,e.borderRadius,n)}return null};ou.propTypes={},ou.filterProps=["borderRadius"],Uc(Gc,Kc,qc,Xc,Zc,Jc,Qc,eu,tu,nu,ou,ru,iu);const au=e=>{if(void 0!==e.gap&&null!==e.gap){const t=$c(e.theme,"spacing",8),n=e=>({gap:Nc(t,e)});return Ic(e,e.gap,n)}return null};au.propTypes={},au.filterProps=["gap"];const su=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=$c(e.theme,"spacing",8),n=e=>({columnGap:Nc(t,e)});return Ic(e,e.columnGap,n)}return null};su.propTypes={},su.filterProps=["columnGap"];const lu=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=$c(e.theme,"spacing",8),n=e=>({rowGap:Nc(t,e)});return Ic(e,e.rowGap,n)}return null};function cu(e,t){return"grey"===t?t:e}function uu(e){return e<=1&&0!==e?100*e+"%":e}lu.propTypes={},lu.filterProps=["rowGap"],Uc(au,su,lu,Pc({prop:"gridColumn"}),Pc({prop:"gridRow"}),Pc({prop:"gridAutoFlow"}),Pc({prop:"gridAutoColumns"}),Pc({prop:"gridAutoRows"}),Pc({prop:"gridTemplateColumns"}),Pc({prop:"gridTemplateRows"}),Pc({prop:"gridTemplateAreas"}),Pc({prop:"gridArea"})),Uc(Pc({prop:"color",themeKey:"palette",transform:cu}),Pc({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:cu}),Pc({prop:"backgroundColor",themeKey:"palette",transform:cu}));const du=Pc({prop:"width",transform:uu}),pu=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||vc[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:uu(t)}};return Ic(e,e.maxWidth,t)}return null};pu.filterProps=["maxWidth"];const hu=Pc({prop:"minWidth",transform:uu}),mu=Pc({prop:"height",transform:uu}),fu=Pc({prop:"maxHeight",transform:uu}),gu=Pc({prop:"minHeight",transform:uu}),yu=(Pc({prop:"size",cssProperty:"width",transform:uu}),Pc({prop:"size",cssProperty:"height",transform:uu}),Uc(du,pu,hu,mu,fu,gu,Pc({prop:"boxSizing"})),{border:{themeKey:"borders",transform:Yc},borderTop:{themeKey:"borders",transform:Yc},borderRight:{themeKey:"borders",transform:Yc},borderBottom:{themeKey:"borders",transform:Yc},borderLeft:{themeKey:"borders",transform:Yc},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Yc},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ou},color:{themeKey:"palette",transform:cu},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:cu},backgroundColor:{themeKey:"palette",transform:cu},p:{style:Hc},pt:{style:Hc},pr:{style:Hc},pb:{style:Hc},pl:{style:Hc},px:{style:Hc},py:{style:Hc},padding:{style:Hc},paddingTop:{style:Hc},paddingRight:{style:Hc},paddingBottom:{style:Hc},paddingLeft:{style:Hc},paddingX:{style:Hc},paddingY:{style:Hc},paddingInline:{style:Hc},paddingInlineStart:{style:Hc},paddingInlineEnd:{style:Hc},paddingBlock:{style:Hc},paddingBlockStart:{style:Hc},paddingBlockEnd:{style:Hc},m:{style:Fc},mt:{style:Fc},mr:{style:Fc},mb:{style:Fc},ml:{style:Fc},mx:{style:Fc},my:{style:Fc},margin:{style:Fc},marginTop:{style:Fc},marginRight:{style:Fc},marginBottom:{style:Fc},marginLeft:{style:Fc},marginX:{style:Fc},marginY:{style:Fc},marginInline:{style:Fc},marginInlineStart:{style:Fc},marginInlineEnd:{style:Fc},marginBlock:{style:Fc},marginBlockStart:{style:Fc},marginBlockEnd:{style:Fc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:au},rowGap:{style:lu},columnGap:{style:su},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:uu},maxWidth:{style:pu},minWidth:{transform:uu},height:{transform:uu},maxHeight:{transform:uu},minHeight:{transform:uu},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}}),vu=yu,bu=function(){function e(e,t,n,r){const i={[e]:t,theme:n},o=r[e];if(!o)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:c}=o;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const u=Mc(n,s)||{};return c?c(i):Ic(i,t,t=>{let n=Cc(u,l,t);return t===n&&"string"==typeof t&&(n=Cc(u,l,`${e}${"default"===t?"":Sc(t)}`,t)),!1===a?n:{[a]:n}})}return function t(n){const{sx:r,theme:i={},nested:o}=n||{};if(!r)return null;const a=i.unstable_sxConfig??vu;function s(n){let r=n;if("function"==typeof n)r=n(i);else if("object"!=typeof n)return n;if(!r)return null;const s=function(e={}){const t=e.keys?.reduce((t,n)=>(t[e.up(n)]={},t),{});return t||{}}(i.breakpoints),l=Object.keys(s);let c=s;return Object.keys(r).forEach(n=>{const o=function(e,t){return"function"==typeof e?e(t):e}(r[n],i);if(null!=o)if("object"==typeof o)if(a[n])c=Ec(c,e(n,o,i,a));else{const e=Ic({theme:i},o,e=>({[n]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}(e,o)?c=Ec(c,e):c[n]=t({sx:o,theme:i,nested:!0})}else c=Ec(c,e(n,o,i,a))}),!o&&i.modularCssLayers?{"@layer sx":gc(i,wc(l,c))}:gc(i,wc(l,c))}return Array.isArray(r)?r.map(s):s(r)}}();bu.filterProps=["sx"];const xu=bu;function Iu(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!=typeof n.getColorSchemeSelector)return{};let r=n.getColorSchemeSelector(e);return"&"===r?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}const wu=function(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={},...a}=e;let s=mc({breakpoints:fc(n),direction:"ltr",components:{},palette:{mode:"light",...r},spacing:Vc(i),shape:{...yc,...o}},a);return s=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const i=t(e.breakpoints.not(...n),r);return i.includes("not all and")?i.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):i}}const r={},i=e=>(n(r,e),r);return n(i),{...e,containerQueries:i}}(s),s.applyStyles=Iu,s=t.reduce((e,t)=>mc(e,t),s),s.unstable_sxConfig={...vu,...a?.unstable_sxConfig},s.unstable_sx=function(e){return xu({sx:e,theme:this})},s};var ku=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?Au(Fu,--Nu):0,$u--,10===_u&&($u=1,Du--),_u}function Uu(){return _u=Nu2||Ku(_u)>3?"":" "}function Qu(e,t){for(;--t&&Uu()&&!(_u<48||_u>102||_u>57&&_u<65||_u>70&&_u<97););return Gu(e,Wu()+(t<6&&32==Yu()&&32==Uu()))}function ed(e){for(;Uu();)switch(_u){case e:return Nu;case 34:case 39:34!==e&&39!==e&&ed(_u);break;case 40:41===e&&ed(e);break;case 92:Uu()}return Nu}function td(e,t){for(;Uu()&&e+_u!==57&&(e+_u!==84||47!==Yu()););return"/*"+Gu(t,Nu-1)+"*"+Mu(47===e?e:Uu())}function nd(e){for(;!Ku(Yu());)Uu();return Gu(e,Nu)}var rd="-ms-",id="-moz-",od="-webkit-",ad="comm",sd="rule",ld="decl",cd="@keyframes";function ud(e,t){for(var n="",r=Lu(e),i=0;i0&&ju(k)-d&&Ru(h>32?gd(k+";",r,n,d-1):gd(Eu(k," ","")+";",r,n,d-2),l);break;case 59:k+=";";default:if(Ru(w=md(k,t,n,c,u,i,s,b,x=[],I=[],d),o),123===v)if(0===u)hd(k,t,w,w,x,o,d,s,I);else switch(99===p&&110===Au(k,3)?100:p){case 100:case 108:case 109:case 115:hd(e,w,w,r&&Ru(md(e,w,w,0,0,i,s,b,i,x=[],d),I),i,I,d,s,r?x:I);break;default:hd(k,w,w,w,[""],I,0,s,I)}}c=u=h=0,f=y=1,b=k="",d=a;break;case 58:d=1+ju(k),h=m;default:if(f<1)if(123==v)--f;else if(125==v&&0==f++&&125==Vu())continue;switch(k+=Mu(v),v*f){case 38:y=u>0?1:(k+="\f",-1);break;case 44:s[c++]=(ju(k)-1)*y,y=1;break;case 64:45===Yu()&&(k+=Zu(Uu())),p=Yu(),u=d=ju(b=k+=nd(Wu())),v++;break;case 45:45===m&&2==ju(k)&&(f=0)}}return o}function md(e,t,n,r,i,o,a,s,l,c,u){for(var d=i-1,p=0===i?o:[""],h=Lu(p),m=0,f=0,g=0;m0?p[y]+" "+v:Eu(v,/&\f/g,p[y])))&&(l[g++]=b);return Hu(e,t,n,0===i?sd:s,l,c,u)}function fd(e,t,n){return Hu(e,t,n,ad,Mu(_u),Ou(e,2,-2),0)}function gd(e,t,n,r){return Hu(e,t,n,ld,Ou(e,0,r),Ou(e,r+1,-1),r)}var yd=function(e,t,n){for(var r=0,i=0;r=i,i=Yu(),38===r&&12===i&&(t[n]=1),!Ku(i);)Uu();return Gu(e,Nu)},vd=new WeakMap,bd=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||vd.get(n))&&!r){vd.set(e,!0);for(var i=[],o=function(e,t){return Xu(function(e,t){var n=-1,r=44;do{switch(Ku(r)){case 0:38===r&&12===Yu()&&(t[n]=1),e[n]+=yd(Nu-1,t,n);break;case 2:e[n]+=Zu(r);break;case 4:if(44===r){e[++n]=58===Yu()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Mu(r)}}while(r=Uu());return e}(qu(e),t))}(t,i),a=n.props,s=0,l=0;s6)switch(Au(e,t+1)){case 109:if(45!==Au(e,t+4))break;case 102:return Eu(e,/(.+:)(.+)-([^]+)/,"$1"+od+"$2-$3$1"+id+(108==Au(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Tu(e,"stretch")?Id(Eu(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Au(e,t+1))break;case 6444:switch(Au(e,ju(e)-3-(~Tu(e,"!important")&&10))){case 107:return Eu(e,":",":"+od)+e;case 101:return Eu(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+od+(45===Au(e,14)?"inline-":"")+"box$3$1"+od+"$2$3$1"+rd+"$2box$3")+e}break;case 5936:switch(Au(e,t+11)){case 114:return od+e+rd+Eu(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return od+e+rd+Eu(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return od+e+rd+Eu(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return od+e+rd+e+e}return e}var wd=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ld:e.return=Id(e.value,e.length);break;case cd:return ud([Bu(e,{value:Eu(e.value,"@","@"+od)})],r);case sd:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return ud([Bu(e,{props:[Eu(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ud([Bu(e,{props:[Eu(t,/:(plac\w+)/,":"+od+"input-$1")]}),Bu(e,{props:[Eu(t,/:(plac\w+)/,":-moz-$1")]}),Bu(e,{props:[Eu(t,/:(plac\w+)/,rd+"input-$1")]})],r)}return""})}}],kd=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,i,o=e.stylisPlugins||wd,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:$d}}var _d=!!e.useInsertionEffect&&e.useInsertionEffect,Fd=_d||function(e){return e()},Hd=_d||e.useLayoutEffect,Bd=e.createContext("undefined"!=typeof HTMLElement?kd({key:"css"}):null),Vd=(Bd.Provider,function(t){return(0,e.forwardRef)(function(n,r){var i=(0,e.useContext)(Bd);return t(n,i,r)})}),Ud=e.createContext({}),Yd={}.hasOwnProperty,Wd="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Gd=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Md(t,n,r),Fd(function(){return Cd(t,n,r)}),null},Kd=Vd(function(t,n,r){var i=t.css;"string"==typeof i&&void 0!==n.registered[i]&&(i=n.registered[i]);var o=t[Wd],a=[i],s="";"string"==typeof t.className?s=Sd(n.registered,a,t.className):null!=t.className&&(s=t.className+" ");var l=Nd(a,void 0,e.useContext(Ud));s+=n.key+"-"+l.name;var c={};for(var u in t)Yd.call(t,u)&&"css"!==u&&u!==Wd&&(c[u]=t[u]);return c.className=s,r&&(c.ref=r),e.createElement(e.Fragment,null,e.createElement(Gd,{cache:n,serialized:l,isStringTag:"string"==typeof o}),e.createElement(o,c))});const qd=function(t=null){const n=e.useContext(Ud);return n&&(r=n,0!==Object.keys(r).length)?n:t;var r},Xd=wu(),Zd=function(e=Xd){return qd(e)},Jd=function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))};function Qd(e,t=0,n=1){return Jd(e,t,n)}function ep(e){if(e.type)return e;if("#"===e.charAt(0))return ep(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(kc(9,e));let r,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),r=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(kc(10,r))}else i=i.split(",");return i=i.map(e=>parseFloat(e)),{type:n,values:i,colorSpace:r}}const tp=(e,t)=>{try{return(e=>{const t=ep(e);return t.values.slice(0,3).map((e,n)=>t.type.includes("hsl")&&0!==n?`${e}%`:e).join(" ")})(e)}catch(t){return e}};function np(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function rp(e){e=ep(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=(e,t=(e+n/30)%12)=>i-o*Math.max(Math.min(t-3,9-t,1),-1);let s="rgb";const l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),np({type:s,values:l})}function ip(e){let t="hsl"===(e=ep(e)).type||"hsla"===e.type?ep(rp(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function op(e,t){return e=ep(e),t=Qd(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,np(e)}function ap(e,t,n){try{return op(e,t)}catch(t){return e}}function sp(e,t){if(e=ep(e),t=Qd(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return np(e)}function lp(e,t,n){try{return sp(e,t)}catch(t){return e}}function cp(e,t){if(e=ep(e),t=Qd(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return np(e)}function up(e,t,n){try{return cp(e,t)}catch(t){return e}}function dp(e,t,n){try{return function(e,t=.15){return ip(e)>.5?sp(e,t):cp(e,t)}(e,t)}catch(t){return e}}const pp={black:"#000",white:"#fff"},hp={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},mp="#f3e5f5",fp="#ce93d8",gp="#ba68c8",yp="#ab47bc",vp="#9c27b0",bp="#7b1fa2",xp="#e57373",Ip="#ef5350",wp="#f44336",kp="#d32f2f",Sp="#c62828",Mp="#ffb74d",Cp="#ffa726",Pp="#ff9800",Ep="#f57c00",Tp="#e65100",Ap="#e3f2fd",Op="#90caf9",jp="#42a5f5",Lp="#1976d2",Rp="#1565c0",Dp="#4fc3f7",$p="#29b6f6",zp="#03a9f4",Np="#0288d1",_p="#01579b",Fp="#81c784",Hp="#66bb6a",Bp="#4caf50",Vp="#388e3c",Up="#2e7d32",Yp="#1b5e20";function Wp(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:pp.white,default:pp.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Gp=Wp();function Kp(){return{text:{primary:pp.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:pp.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const qp=Kp();function Xp(e,t,n,r){const i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=cp(e.main,i):"dark"===t&&(e.dark=sp(e.main,o)))}function Zp(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...i}=e,o=e.primary||function(e="light"){return"dark"===e?{main:Op,light:Ap,dark:jp}:{main:Lp,light:jp,dark:Rp}}(t),a=e.secondary||function(e="light"){return"dark"===e?{main:fp,light:mp,dark:yp}:{main:vp,light:gp,dark:bp}}(t),s=e.error||function(e="light"){return"dark"===e?{main:wp,light:xp,dark:kp}:{main:kp,light:Ip,dark:Sp}}(t),l=e.info||function(e="light"){return"dark"===e?{main:$p,light:Dp,dark:Np}:{main:Np,light:zp,dark:_p}}(t),c=e.success||function(e="light"){return"dark"===e?{main:Hp,light:Fp,dark:Vp}:{main:Up,light:Bp,dark:Yp}}(t),u=e.warning||function(e="light"){return"dark"===e?{main:Cp,light:Mp,dark:Ep}:{main:"#ed6c02",light:Pp,dark:Tp}}(t);function d(e){const t=function(e,t){const n=ip(e),r=ip(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,qp.text.primary)>=n?qp.text.primary:Gp.text.primary;return t}const p=({color:e,name:t,mainShade:n=500,lightShade:i=300,darkShade:o=700})=>{if(!(e={...e}).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(kc(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(kc(12,t?` (${t})`:"",JSON.stringify(e.main)));return Xp(e,"light",i,r),Xp(e,"dark",o,r),e.contrastText||(e.contrastText=d(e.main)),e};let h;return"light"===t?h=Wp():"dark"===t&&(h=Kp()),mc({common:{...pp},mode:t,primary:p({color:o,name:"primary"}),secondary:p({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:s,name:"error"}),warning:p({color:u,name:"warning"}),info:p({color:l,name:"info"}),success:p({color:c,name:"success"}),grey:hp,contrastThreshold:n,getContrastText:d,augmentColor:p,tonalOffset:r,...h},i)}function Jp(e=""){function t(...n){if(!n.length)return"";const r=n[0];return"string"!=typeof r||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${e?`${e}-`:""}${r}${t(...n.slice(1))})`}return(n,...r)=>`var(--${e?`${e}-`:""}${n}${t(...r)})`}function Qp(e){const t={};return Object.entries(e).forEach(e=>{const[n,r]=e;"object"==typeof r&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:""}${r.fontVariant?`${r.fontVariant} `:""}${r.fontWeight?`${r.fontWeight} `:""}${r.fontStretch?`${r.fontStretch} `:""}${r.fontSize||""}${r.lineHeight?`/${r.lineHeight} `:""}${r.fontFamily||""}`)}),t}const eh=(e,t,n,r=[])=>{let i=e;t.forEach((e,o)=>{o===t.length-1?Array.isArray(i)?i[Number(e)]=n:i&&"object"==typeof i&&(i[e]=n):i&&"object"==typeof i&&(i[e]||(i[e]=r.includes(e)?[]:{}),i=i[e])})};function th(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};var s,l;return s=(e,t,s)=>{if(!("string"!=typeof t&&"number"!=typeof t||r&&r(e,t))){const r=`--${n?`${n}-`:""}${e.join("-")}`,l=((e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t)(e,t);Object.assign(i,{[r]:l}),eh(o,e,`var(${r})`,s),eh(a,e,`var(${r}, ${l})`,s)}},l=e=>"vars"===e[0],function e(t,n=[],r=[]){Object.entries(t).forEach(([t,i])=>{(!l||l&&!l([...n,t]))&&null!=i&&("object"==typeof i&&Object.keys(i).length>0?e(i,[...n,t],Array.isArray(i)?[...r,t]:r):s([...n,t],i,r))})}(e),{css:i,vars:o,varsWithDefaults:a}}function nh(e){return Math.round(1e5*e)/1e5}const rh={textTransform:"uppercase"},ih='"Roboto", "Helvetica", "Arial", sans-serif';function oh(e,t){const{fontFamily:n=ih,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}="function"==typeof t?t(e):t,p=r/14,h=u||(e=>e/l*p+"rem"),m=(e,t,r,i,o)=>({fontFamily:n,fontWeight:e,fontSize:h(t),lineHeight:r,...n===ih?{letterSpacing:`${nh(i/t)}em`}:{},...o,...c}),f={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(o,48,1.167,0),h4:m(o,34,1.235,.25),h5:m(o,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(o,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(o,16,1.5,.15),body2:m(o,14,1.43,.15),button:m(a,14,1.75,.4,rh),caption:m(o,12,1.66,.4),overline:m(o,12,2.66,1,rh),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return mc({htmlFontSize:l,pxToRem:h,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:s,...f},d,{clone:!1})}function ah(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const sh=["none",ah(0,2,1,-1,0,1,1,0,0,1,3,0),ah(0,3,1,-2,0,2,2,0,0,1,5,0),ah(0,3,3,-2,0,3,4,0,0,1,8,0),ah(0,2,4,-1,0,4,5,0,0,1,10,0),ah(0,3,5,-1,0,5,8,0,0,1,14,0),ah(0,3,5,-1,0,6,10,0,0,1,18,0),ah(0,4,5,-2,0,7,10,1,0,2,16,1),ah(0,5,5,-3,0,8,10,1,0,3,14,2),ah(0,5,6,-3,0,9,12,1,0,3,16,2),ah(0,6,6,-3,0,10,14,1,0,4,18,3),ah(0,6,7,-4,0,11,15,1,0,4,20,3),ah(0,7,8,-4,0,12,17,2,0,5,22,4),ah(0,7,8,-4,0,13,19,2,0,5,24,4),ah(0,7,9,-4,0,14,21,2,0,5,26,4),ah(0,8,9,-5,0,15,22,2,0,6,28,5),ah(0,8,10,-5,0,16,24,2,0,6,30,5),ah(0,8,11,-5,0,17,26,2,0,6,32,5),ah(0,9,11,-5,0,18,28,2,0,7,34,6),ah(0,9,12,-6,0,19,29,2,0,7,36,6),ah(0,10,13,-6,0,20,31,3,0,8,38,7),ah(0,10,13,-6,0,21,33,3,0,8,40,7),ah(0,10,14,-6,0,22,35,3,0,8,42,7),ah(0,11,14,-7,0,23,36,3,0,9,44,8),ah(0,11,15,-7,0,24,38,3,0,9,46,8)],lh={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},ch={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function uh(e){return`${Math.round(e)}ms`}function dh(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function ph(e){const t={...lh,...e.easing},n={...ch,...e.duration};return{getAutoHeightDuration:dh,create:(e=["all"],r={})=>{const{duration:i=n.standard,easing:o=t.easeInOut,delay:a=0,...s}=r;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"==typeof i?i:uh(i)} ${o} ${"string"==typeof a?a:uh(a)}`).join(",")},...e,easing:t,duration:n}}const hh={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function mh(e){return pc(e)||void 0===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||Array.isArray(e)}function fh(e={}){const t={...e};return function e(t){const n=Object.entries(t);for(let r=0;rmc(e,t),p),p.unstable_sxConfig={...vu,...c?.unstable_sxConfig},p.unstable_sx=function(e){return xu({sx:e,theme:this})},p.toRuntimeSource=fh,p};function yh(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(10*t)/1e3}const vh=[...Array(25)].map((e,t)=>{if(0===t)return"none";const n=yh(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function bh(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function xh(e){return"dark"===e?vh:[]}function Ih(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const wh=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let o=i;if("class"===i&&(o=".%s"),"data"===i&&(o="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(o=`[${i}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const i={};return(a=e.cssVarPrefix,[...[...Array(25)].map((e,t)=>`--${a?`${a}-`:""}overlays-${t}`),`--${a?`${a}-`:""}palette-AppBar-darkBg`,`--${a?`${a}-`:""}palette-AppBar-darkColor`]).forEach(e=>{i[e]=n[e],delete n[e]}),"media"===o?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:o?{[o.replace("%s",t)]:i,[`${r}, ${o.replace("%s",t)}`]:n}:{[r]:{...n,...i}}}if(o&&"media"!==o)return`${r}, ${o.replace("%s",String(t))}`}else if(t){if("media"===o)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(o)return o.replace("%s",String(t))}var a;return r};function kh(e,t,n){!e[t]&&n&&(e[t]=n)}function Sh(e){return"string"==typeof e&&e.startsWith("hsl")?rp(e):e}function Mh(e,t){`${t}Channel`in e||(e[`${t}Channel`]=tp(Sh(e[t])))}const Ch=e=>{try{return e()}catch(e){}};function Ph(e,t,n,r){if(!t)return;t=!0===t?{}:t;const i="dark"===r?"dark":"light";if(!n)return void(e[r]=function(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...i}=e,o=Zp(t);return{palette:o,opacity:{...bh(o.mode),...n},overlays:r||xh(o.mode),...i}}({...t,palette:{mode:i,...t?.palette}}));const{palette:o,...a}=gh({...n,palette:{mode:i,...t?.palette}});return e[r]={...t,palette:o,opacity:{...bh(i),...t?.opacity},overlays:t?.overlays||xh(i)},a}function Eh(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:a=Ih,colorSchemeSelector:s=(n.light&&n.dark?"media":void 0),rootSelector:l=":root",...c}=e,u=Object.keys(n)[0],d=r||(n.light&&"light"!==u?"light":u),p=((e="mui")=>Jp(e))(o),{[d]:h,light:m,dark:f,...g}=n,y={...g};let v=h;if(("dark"===d&&!("dark"in n)||"light"===d&&!("light"in n))&&(v=!0),!v)throw new Error(kc(21,d));const b=Ph(y,v,c,d);m&&!y.light&&Ph(y,m,void 0,"light"),f&&!y.dark&&Ph(y,f,void 0,"dark");let x={defaultColorScheme:d,...b,cssVarPrefix:o,colorSchemeSelector:s,rootSelector:l,getCssVar:p,colorSchemes:y,font:{...Qp(b.typography),...b.font},spacing:(I=c.spacing,"number"==typeof I?`${I}px`:"string"==typeof I||"function"==typeof I||Array.isArray(I)?I:"8px")};var I;Object.keys(x.colorSchemes).forEach(e=>{const t=x.colorSchemes[e].palette,n=e=>{const n=e.split("-"),r=n[1],i=n[2];return p(e,t[r][i])};var r;if("light"===t.mode&&(kh(t.common,"background","#fff"),kh(t.common,"onBackground","#000")),"dark"===t.mode&&(kh(t.common,"background","#000"),kh(t.common,"onBackground","#fff")),r=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach(e=>{r[e]||(r[e]={})}),"light"===t.mode){kh(t.Alert,"errorColor",lp(t.error.light,.6)),kh(t.Alert,"infoColor",lp(t.info.light,.6)),kh(t.Alert,"successColor",lp(t.success.light,.6)),kh(t.Alert,"warningColor",lp(t.warning.light,.6)),kh(t.Alert,"errorFilledBg",n("palette-error-main")),kh(t.Alert,"infoFilledBg",n("palette-info-main")),kh(t.Alert,"successFilledBg",n("palette-success-main")),kh(t.Alert,"warningFilledBg",n("palette-warning-main")),kh(t.Alert,"errorFilledColor",Ch(()=>t.getContrastText(t.error.main))),kh(t.Alert,"infoFilledColor",Ch(()=>t.getContrastText(t.info.main))),kh(t.Alert,"successFilledColor",Ch(()=>t.getContrastText(t.success.main))),kh(t.Alert,"warningFilledColor",Ch(()=>t.getContrastText(t.warning.main))),kh(t.Alert,"errorStandardBg",up(t.error.light,.9)),kh(t.Alert,"infoStandardBg",up(t.info.light,.9)),kh(t.Alert,"successStandardBg",up(t.success.light,.9)),kh(t.Alert,"warningStandardBg",up(t.warning.light,.9)),kh(t.Alert,"errorIconColor",n("palette-error-main")),kh(t.Alert,"infoIconColor",n("palette-info-main")),kh(t.Alert,"successIconColor",n("palette-success-main")),kh(t.Alert,"warningIconColor",n("palette-warning-main")),kh(t.AppBar,"defaultBg",n("palette-grey-100")),kh(t.Avatar,"defaultBg",n("palette-grey-400")),kh(t.Button,"inheritContainedBg",n("palette-grey-300")),kh(t.Button,"inheritContainedHoverBg",n("palette-grey-A100")),kh(t.Chip,"defaultBorder",n("palette-grey-400")),kh(t.Chip,"defaultAvatarColor",n("palette-grey-700")),kh(t.Chip,"defaultIconColor",n("palette-grey-700")),kh(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),kh(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),kh(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),kh(t.LinearProgress,"primaryBg",up(t.primary.main,.62)),kh(t.LinearProgress,"secondaryBg",up(t.secondary.main,.62)),kh(t.LinearProgress,"errorBg",up(t.error.main,.62)),kh(t.LinearProgress,"infoBg",up(t.info.main,.62)),kh(t.LinearProgress,"successBg",up(t.success.main,.62)),kh(t.LinearProgress,"warningBg",up(t.warning.main,.62)),kh(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.11)`),kh(t.Slider,"primaryTrack",up(t.primary.main,.62)),kh(t.Slider,"secondaryTrack",up(t.secondary.main,.62)),kh(t.Slider,"errorTrack",up(t.error.main,.62)),kh(t.Slider,"infoTrack",up(t.info.main,.62)),kh(t.Slider,"successTrack",up(t.success.main,.62)),kh(t.Slider,"warningTrack",up(t.warning.main,.62));const e=dp(t.background.default,.8);kh(t.SnackbarContent,"bg",e),kh(t.SnackbarContent,"color",Ch(()=>t.getContrastText(e))),kh(t.SpeedDialAction,"fabHoverBg",dp(t.background.paper,.15)),kh(t.StepConnector,"border",n("palette-grey-400")),kh(t.StepContent,"border",n("palette-grey-400")),kh(t.Switch,"defaultColor",n("palette-common-white")),kh(t.Switch,"defaultDisabledColor",n("palette-grey-100")),kh(t.Switch,"primaryDisabledColor",up(t.primary.main,.62)),kh(t.Switch,"secondaryDisabledColor",up(t.secondary.main,.62)),kh(t.Switch,"errorDisabledColor",up(t.error.main,.62)),kh(t.Switch,"infoDisabledColor",up(t.info.main,.62)),kh(t.Switch,"successDisabledColor",up(t.success.main,.62)),kh(t.Switch,"warningDisabledColor",up(t.warning.main,.62)),kh(t.TableCell,"border",up(ap(t.divider,1),.88)),kh(t.Tooltip,"bg",ap(t.grey[700],.92))}if("dark"===t.mode){kh(t.Alert,"errorColor",up(t.error.light,.6)),kh(t.Alert,"infoColor",up(t.info.light,.6)),kh(t.Alert,"successColor",up(t.success.light,.6)),kh(t.Alert,"warningColor",up(t.warning.light,.6)),kh(t.Alert,"errorFilledBg",n("palette-error-dark")),kh(t.Alert,"infoFilledBg",n("palette-info-dark")),kh(t.Alert,"successFilledBg",n("palette-success-dark")),kh(t.Alert,"warningFilledBg",n("palette-warning-dark")),kh(t.Alert,"errorFilledColor",Ch(()=>t.getContrastText(t.error.dark))),kh(t.Alert,"infoFilledColor",Ch(()=>t.getContrastText(t.info.dark))),kh(t.Alert,"successFilledColor",Ch(()=>t.getContrastText(t.success.dark))),kh(t.Alert,"warningFilledColor",Ch(()=>t.getContrastText(t.warning.dark))),kh(t.Alert,"errorStandardBg",lp(t.error.light,.9)),kh(t.Alert,"infoStandardBg",lp(t.info.light,.9)),kh(t.Alert,"successStandardBg",lp(t.success.light,.9)),kh(t.Alert,"warningStandardBg",lp(t.warning.light,.9)),kh(t.Alert,"errorIconColor",n("palette-error-main")),kh(t.Alert,"infoIconColor",n("palette-info-main")),kh(t.Alert,"successIconColor",n("palette-success-main")),kh(t.Alert,"warningIconColor",n("palette-warning-main")),kh(t.AppBar,"defaultBg",n("palette-grey-900")),kh(t.AppBar,"darkBg",n("palette-background-paper")),kh(t.AppBar,"darkColor",n("palette-text-primary")),kh(t.Avatar,"defaultBg",n("palette-grey-600")),kh(t.Button,"inheritContainedBg",n("palette-grey-800")),kh(t.Button,"inheritContainedHoverBg",n("palette-grey-700")),kh(t.Chip,"defaultBorder",n("palette-grey-700")),kh(t.Chip,"defaultAvatarColor",n("palette-grey-300")),kh(t.Chip,"defaultIconColor",n("palette-grey-300")),kh(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),kh(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),kh(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),kh(t.LinearProgress,"primaryBg",lp(t.primary.main,.5)),kh(t.LinearProgress,"secondaryBg",lp(t.secondary.main,.5)),kh(t.LinearProgress,"errorBg",lp(t.error.main,.5)),kh(t.LinearProgress,"infoBg",lp(t.info.main,.5)),kh(t.LinearProgress,"successBg",lp(t.success.main,.5)),kh(t.LinearProgress,"warningBg",lp(t.warning.main,.5)),kh(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.13)`),kh(t.Slider,"primaryTrack",lp(t.primary.main,.5)),kh(t.Slider,"secondaryTrack",lp(t.secondary.main,.5)),kh(t.Slider,"errorTrack",lp(t.error.main,.5)),kh(t.Slider,"infoTrack",lp(t.info.main,.5)),kh(t.Slider,"successTrack",lp(t.success.main,.5)),kh(t.Slider,"warningTrack",lp(t.warning.main,.5));const e=dp(t.background.default,.98);kh(t.SnackbarContent,"bg",e),kh(t.SnackbarContent,"color",Ch(()=>t.getContrastText(e))),kh(t.SpeedDialAction,"fabHoverBg",dp(t.background.paper,.15)),kh(t.StepConnector,"border",n("palette-grey-600")),kh(t.StepContent,"border",n("palette-grey-600")),kh(t.Switch,"defaultColor",n("palette-grey-300")),kh(t.Switch,"defaultDisabledColor",n("palette-grey-600")),kh(t.Switch,"primaryDisabledColor",lp(t.primary.main,.55)),kh(t.Switch,"secondaryDisabledColor",lp(t.secondary.main,.55)),kh(t.Switch,"errorDisabledColor",lp(t.error.main,.55)),kh(t.Switch,"infoDisabledColor",lp(t.info.main,.55)),kh(t.Switch,"successDisabledColor",lp(t.success.main,.55)),kh(t.Switch,"warningDisabledColor",lp(t.warning.main,.55)),kh(t.TableCell,"border",lp(ap(t.divider,1),.68)),kh(t.Tooltip,"bg",ap(t.grey[700],.92))}Mh(t.background,"default"),Mh(t.background,"paper"),Mh(t.common,"background"),Mh(t.common,"onBackground"),Mh(t,"divider"),Object.keys(t).forEach(e=>{const n=t[e];"tonalOffset"!==e&&n&&"object"==typeof n&&(n.main&&kh(t[e],"mainChannel",tp(Sh(n.main))),n.light&&kh(t[e],"lightChannel",tp(Sh(n.light))),n.dark&&kh(t[e],"darkChannel",tp(Sh(n.dark))),n.contrastText&&kh(t[e],"contrastTextChannel",tp(Sh(n.contrastText))),"text"===e&&(Mh(t[e],"primary"),Mh(t[e],"secondary")),"action"===e&&(n.active&&Mh(t[e],"active"),n.selected&&Mh(t[e],"selected")))})}),x=t.reduce((e,t)=>mc(e,t),x);const w={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:wh(x)},{vars:k,generateThemeVars:S,generateStyleSheets:M}=function(e,t={}){const{getSelector:n=g,disableCssColorScheme:r,colorSchemeSelector:i}=t,{colorSchemes:o={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=th(l,t);let p=d;const h={},{[s]:m,...f}=o;if(Object.entries(f||{}).forEach(([e,n])=>{const{vars:r,css:i,varsWithDefaults:o}=th(n,t);p=mc(p,o),h[e]={css:i,vars:r}}),m){const{css:e,vars:n,varsWithDefaults:r}=th(m,t);p=mc(p,r),h[s]={css:e,vars:n}}function g(t,n){let r=i;if("class"===i&&(r=".%s"),"data"===i&&(r="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(r=`[${i}="%s"]`),t){if("media"===r){if(e.defaultColorScheme===t)return":root";const r=o[t]?.palette?.mode||t;return{[`@media (prefers-color-scheme: ${r})`]:{":root":n}}}if(r)return e.defaultColorScheme===t?`:root, ${r.replace("%s",String(t))}`:r.replace("%s",String(t))}return":root"}return{vars:p,generateThemeVars:()=>{let e={...c};return Object.entries(h).forEach(([,{vars:t}])=>{e=mc(e,t)}),e},generateStyleSheets:()=>{const t=[],i=e.defaultColorScheme||"light";function a(e,n){Object.keys(n).length&&t.push("string"==typeof e?{[e]:{...n}}:e)}a(n(void 0,{...u}),u);const{[i]:s,...l}=h;if(s){const{css:e}=s,t=o[i]?.palette?.mode,l=!r&&t?{colorScheme:t,...e}:{...e};a(n(i,{...l}),l)}return Object.entries(l).forEach(([e,{css:t}])=>{const i=o[e]?.palette?.mode,s=!r&&i?{colorScheme:i,...t}:{...t};a(n(e,{...s}),s)}),t}}}(x,w);return x.vars=k,Object.entries(x.colorSchemes[x.defaultColorScheme]).forEach(([e,t])=>{x[e]=t}),x.generateThemeVars=S,x.generateStyleSheets=M,x.generateSpacing=function(){return Vc(c.spacing,zc(this))},x.getColorSchemeSelector=function(e){return function(t){return"media"===e?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:"class"===e?`.${t} &`:"data"===e?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}(s),x.spacing=x.generateSpacing(),x.shouldSkipGeneratingVar=a,x.unstable_sxConfig={...vu,...c?.unstable_sxConfig},x.unstable_sx=function(e){return xu({sx:e,theme:this})},x.toRuntimeSource=fh,x}function Th(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...!0!==n&&n,palette:Zp({...!0===n?{}:n.palette,mode:t})})}function Ah(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:i=(n?void 0:{light:!0}),defaultColorScheme:o=n?.mode,...a}=e,s=o||"light",l=i?.[s],c={...i,...n?{[s]:{..."boolean"!=typeof l&&l,palette:n}}:void 0};if(!1===r){if(!("colorSchemes"in e))return gh(e,...t);let r=n;"palette"in e||c[s]&&(!0!==c[s]?r=c[s].palette:"dark"===s&&(r={mode:"dark"}));const i=gh({...e,palette:r},...t);return i.defaultColorScheme=s,i.colorSchemes=c,"light"===i.palette.mode&&(i.colorSchemes.light={...!0!==c.light&&c.light,palette:i.palette},Th(i,"dark",c.dark)),"dark"===i.palette.mode&&(i.colorSchemes.dark={...!0!==c.dark&&c.dark,palette:i.palette},Th(i,"light",c.light)),i}return n||"light"in c||"light"!==s||(c.light=!0),Eh({...a,colorSchemes:c,defaultColorScheme:s,..."boolean"!=typeof r&&r},...t)}const Oh=Ah(),jh="$$material";function Lh({props:e,name:t}){return function({props:e,name:t,defaultTheme:n,themeId:r}){let i=Zd(n);return r&&(i=i[r]||i),uc({theme:i,name:t,props:e})}({props:e,name:t,defaultTheme:Oh,themeId:jh})}const Rh={"image/png":"PNG","image/jpeg":"JPEG","image/webp":"WebP"},Dh={loading:"Loading data…",noData:"No data to display",zoomIn:"Zoom in",zoomOut:"Zoom out",toolbarExport:"Export",toolbarExportPrint:"Print",toolbarExportImage:e=>`Export as ${Rh[e]??e}`,chartTypeBar:"Bar",chartTypeColumn:"Column",chartTypeLine:"Line",chartTypeArea:"Area",chartTypePie:"Pie",chartPaletteLabel:"Color palette",chartPaletteNameRainbowSurge:"Rainbow Surge",chartPaletteNameBlueberryTwilight:"Blueberry Twilight",chartPaletteNameMangoFusion:"Mango Fusion",chartPaletteNameCheerfulFiesta:"Cheerful Fiesta",chartPaletteNameStrawberrySky:"Strawberry Sky",chartPaletteNameBlue:"Blue",chartPaletteNameGreen:"Green",chartPaletteNamePurple:"Purple",chartPaletteNameRed:"Red",chartPaletteNameOrange:"Orange",chartPaletteNameYellow:"Yellow",chartPaletteNameCyan:"Cyan",chartPaletteNamePink:"Pink",chartConfigurationSectionChart:"Chart",chartConfigurationSectionColumns:"Columns",chartConfigurationSectionBars:"Bars",chartConfigurationSectionAxes:"Axes",chartConfigurationGrid:"Grid",chartConfigurationBorderRadius:"Border radius",chartConfigurationCategoryGapRatio:"Category gap ratio",chartConfigurationBarGapRatio:"Series gap ratio",chartConfigurationStacked:"Stacked",chartConfigurationShowToolbar:"Show toolbar",chartConfigurationSkipAnimation:"Skip animation",chartConfigurationInnerRadius:"Inner radius",chartConfigurationOuterRadius:"Outer radius",chartConfigurationColors:"Colors",chartConfigurationHideLegend:"Hide legend",chartConfigurationShowMark:"Show mark",chartConfigurationHeight:"Height",chartConfigurationWidth:"Width",chartConfigurationSeriesGap:"Series gap",chartConfigurationTickPlacement:"Tick placement",chartConfigurationTickLabelPlacement:"Tick label placement",chartConfigurationCategoriesAxisLabel:"Categories axis label",chartConfigurationSeriesAxisLabel:"Series axis label",chartConfigurationXAxisPosition:"X-axis position",chartConfigurationYAxisPosition:"Y-axis position",chartConfigurationSeriesAxisReverse:"Reverse series axis",chartConfigurationTooltipPlacement:"Placement",chartConfigurationTooltipTrigger:"Trigger",chartConfigurationLegendPosition:"Position",chartConfigurationLegendDirection:"Direction",chartConfigurationBarLabels:"Bar labels",chartConfigurationColumnLabels:"Column labels",chartConfigurationInterpolation:"Interpolation",chartConfigurationSectionTooltip:"Tooltip",chartConfigurationSectionLegend:"Legend",chartConfigurationSectionLines:"Lines",chartConfigurationSectionAreas:"Areas",chartConfigurationSectionArcs:"Arcs",chartConfigurationPaddingAngle:"Padding angle",chartConfigurationCornerRadius:"Corner radius",chartConfigurationArcLabels:"Arc labels",chartConfigurationStartAngle:"Start angle",chartConfigurationEndAngle:"End angle",chartConfigurationPieTooltipTrigger:"Trigger",chartConfigurationPieLegendPosition:"Position",chartConfigurationPieLegendDirection:"Direction",chartConfigurationOptionNone:"None",chartConfigurationOptionValue:"Value",chartConfigurationOptionAuto:"Auto",chartConfigurationOptionTop:"Top",chartConfigurationOptionTopLeft:"Top Left",chartConfigurationOptionTopRight:"Top Right",chartConfigurationOptionBottom:"Bottom",chartConfigurationOptionBottomLeft:"Bottom Left",chartConfigurationOptionBottomRight:"Bottom Right",chartConfigurationOptionLeft:"Left",chartConfigurationOptionRight:"Right",chartConfigurationOptionAxis:"Axis",chartConfigurationOptionItem:"Item",chartConfigurationOptionHorizontal:"Horizontal",chartConfigurationOptionVertical:"Vertical",chartConfigurationOptionBoth:"Both",chartConfigurationOptionStart:"Start",chartConfigurationOptionMiddle:"Middle",chartConfigurationOptionEnd:"End",chartConfigurationOptionExtremities:"Extremities",chartConfigurationOptionTick:"Tick",chartConfigurationOptionMonotoneX:"Monotone X",chartConfigurationOptionMonotoneY:"Monotone Y",chartConfigurationOptionCatmullRom:"Catmull-Rom",chartConfigurationOptionLinear:"Linear",chartConfigurationOptionNatural:"Natural",chartConfigurationOptionStep:"Step",chartConfigurationOptionStepBefore:"Step Before",chartConfigurationOptionStepAfter:"Step After",chartConfigurationOptionBumpX:"Bump X",chartConfigurationOptionBumpY:"Bump Y"},$h=Dh;l({},Dh);const zh=["localeText"],Nh=e.createContext(null);function _h(t){const{localeText:n}=t,r=tt(t,zh),{localeText:i}=e.useContext(Nh)??{localeText:void 0},o=Lh({props:r,name:"MuiChartsLocalizationProvider"}),{children:a,localeText:s}=o,c=e.useMemo(()=>l({},$h,s,i,n),[s,i,n]),u=e.useMemo(()=>({localeText:c}),[c]);return(0,O.jsx)(Nh.Provider,{value:u,children:a})}function Fh(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t{this.currentId=null,t()},e)}clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Wh(){const t=Vh(Yh.create).current;var n;return n=t.disposeEffect,e.useEffect(n,Uh),t}function Gh(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let e=0;ee.useContext(Kh)??!1,Xh=function({value:e,...t}){return(0,O.jsx)(Kh.Provider,{value:e??!0,...t})};function Zh(e){try{return e.matches(":focus-visible")}catch(e){}return!1}function Jh(t){return parseInt(e.version,10)>=19?t?.props?.ref||null:t?.ref||null}var Qh=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,em=Ed(function(e){return Qh.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),tm=function(e){return"theme"!==e},nm=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?em:tm},rm=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},im=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Md(t,n,r),Fd(function(){return Cd(t,n,r)}),null},om=function t(n,r){var i,o,a=n.__emotion_real===n,s=a&&n.__emotion_base||n;void 0!==r&&(i=r.label,o=r.target);var c=rm(n,r,a),u=c||nm(s),d=!u("as");return function(){var p=arguments,h=a&&void 0!==n.__emotion_styles?n.__emotion_styles.slice(0):[];if(void 0!==i&&h.push("label:"+i+";"),null==p[0]||void 0===p[0].raw)h.push.apply(h,p);else{var m=p[0];h.push(m[0]);for(var f=p.length,g=1;g{"function"!=typeof e.style&&(e.style=sm(e.style))}),r}const cm=wu();function um(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function dm(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function pm(e){return e?(t,n)=>n[e]:null}function hm(e,t,n){const r="function"==typeof t?t(e):t;if(Array.isArray(r))return r.flatMap(t=>hm(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?dm(r.style,n):r.style;else{const{variants:e,...i}=r;t=n?dm(sm(i),n):i}return mm(e,r.variants,[t],n)}return r?.isProcessed?n?dm(sm(r.style),n):r.style:n?dm(sm(r),n):r}function mm(e,t,n=[],r=void 0){let i;e:for(let o=0;ogm(e)&&"classes"!==e,vm=function(e={}){const{themeId:t,defaultTheme:n=cm,rootShouldForwardProp:r=um,slotShouldForwardProp:i=um}=e;function o(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return(e,t={})=>{!function(e){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=(e=>e.filter(e=>e!==xu))(e.__emotion_styles))}(e);const{name:n,slot:a,skipVariantsResolver:s,skipSx:l,overridesResolver:c=pm(fm(a)),...u}=t,d=n&&n.startsWith("Mui")||a?"components":"custom",p=void 0!==s?s:a&&"Root"!==a&&"root"!==a||!1,h=l||!1;let m=um;"Root"===a||"root"===a?m=r:a?m=i:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(m=void 0);const f=function(e,t){return om(e,t)}(e,{shouldForwardProp:m,label:void 0,...u}),g=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return hm(t,e,t.theme.modularCssLayers?d:void 0)};if(pc(e)){const t=lm(e);return function(e){return t.variants?hm(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?dm(t.style,d):t.style}}return e},y=(...t)=>{const r=[],i=t.map(g),a=[];if(r.push(o),n&&c&&a.push(function(e){const t=e.theme,r=t.components?.[n]?.styleOverrides;if(!r)return null;const i={};for(const t in r)i[t]=hm(e,r[t],e.theme.modularCssLayers?"theme":void 0);return c(e,i)}),n&&!p&&a.push(function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?mm(e,r,[],e.theme.modularCssLayers?"theme":void 0):null}),h||a.push(xu),Array.isArray(i[0])){const e=i.shift(),t=new Array(r.length).fill(""),n=new Array(a.length).fill("");let o;o=[...t,...e,...n],o.raw=[...t,...e.raw,...n],r.unshift(o)}const s=[...r,...i,...a],l=f(...s);return e.muiName&&(l.muiName=e.muiName),l};return f.withConfig&&(y.withConfig=f.withConfig),y}}({themeId:jh,defaultTheme:Oh,rootShouldForwardProp:ym}),bm=vm;function xm(){const e=Zd(Oh);return e[jh]||e}const Im={theme:void 0},wm=function(e){let t,n;return function(r){let i=t;return void 0!==i&&r.theme===n||(Im.theme=r.theme,i=lm(e(Im)),t=i,n=r.theme),i}},km=e.createContext(void 0);const Sm=function({value:e,children:t}){return(0,O.jsx)(km.Provider,{value:e,children:t})};function Mm(t){return function({props:t,name:n}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?cc(i.defaultProps,r):i.styleOverrides||i.variants?r:cc(i,r)}({props:t,name:n,theme:{components:e.useContext(km)}})}(t)}const Cm=Sc;function Pm(e,t){return Pm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pm(e,t)}function Em(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Pm(e,t)}const Tm=window.ReactDOM;var Am=a.n(Tm);const Om=n().createContext(null);var jm="unmounted",Lm="exited",Rm="entering",Dm="entered",$m="exiting",zm=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=Lm,r.appearStatus=Rm):i=Dm:i=t.unmountOnExit||t.mountOnEnter?jm:Lm,r.state={status:i},r.nextCallback=null,r}Em(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===jm?{status:Lm}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Rm&&n!==Dm&&(t=Rm):n!==Rm&&n!==Dm||(t=$m)}this.updateStatus(!1,t)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},r.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Rm){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Am().findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Lm&&this.setState({status:jm})},r.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Am().findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;e||n?(this.props.onEnter(o,a),this.safeSetState({status:Rm},function(){t.props.onEntering(o,a),t.onTransitionEnd(l,function(){t.safeSetState({status:Dm},function(){t.props.onEntered(o,a)})})})):this.safeSetState({status:Dm},function(){t.props.onEntered(o)})},r.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Am().findDOMNode(this);t?(this.props.onExit(r),this.safeSetState({status:$m},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Lm},function(){e.props.onExited(r)})})})):this.safeSetState({status:Lm},function(){e.props.onExited(r)})},r.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},r.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},r.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Am().findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},r.render=function(){var e=this.state.status;if(e===jm)return null;var t=this.props,r=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,tt(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return n().createElement(Om.Provider,{value:null},"function"==typeof r?r(e,i):n().cloneElement(n().Children.only(r),i))},t}(n().Component);function Nm(){}zm.contextType=Om,zm.propTypes={},zm.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Nm,onEntering:Nm,onEntered:Nm,onExit:Nm,onExiting:Nm,onExited:Nm},zm.UNMOUNTED=jm,zm.EXITED=Lm,zm.ENTERING=Rm,zm.ENTERED=Dm,zm.EXITING=$m;const _m=zm,Fm=e=>e.scrollTop;function Hm(e,t){const{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??("number"==typeof n?n:n[t.mode]||0),easing:i.transitionTimingFunction??("object"==typeof r?r[t.mode]:r),delay:i.transitionDelay}}function Bm(...t){const n=e.useRef(void 0),r=e.useCallback(e=>{const n=t.map(t=>{if(null==t)return null;if("function"==typeof t){const n=t,r=n(e);return"function"==typeof r?r:()=>{n(null)}}return t.current=e,()=>{t.current=null}});return()=>{n.forEach(e=>e?.())}},t);return e.useMemo(()=>t.every(e=>null==e)?null:e=>{n.current&&(n.current(),n.current=void 0),null!=e&&(n.current=r(e))},t)}const Vm=Bm;function Um(e){return`scale(${e}, ${e**2})`}const Ym={entering:{opacity:1,transform:Um(1)},entered:{opacity:1,transform:"none"}},Wm="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Gm=e.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:h,style:m,timeout:f="auto",TransitionComponent:g=_m,...y}=t,v=Wh(),b=e.useRef(),x=xm(),I=e.useRef(null),w=Vm(I,Jh(o),n),k=e=>t=>{if(e){const n=I.current;void 0===t?e(n):e(n,t)}},S=k(u),M=k((e,t)=>{Fm(e);const{duration:n,delay:r,easing:i}=Hm({style:m,timeout:f,easing:a},{mode:"enter"});let o;"auto"===f?(o=x.transitions.getAutoHeightDuration(e.clientHeight),b.current=o):o=n,e.style.transition=[x.transitions.create("opacity",{duration:o,delay:r}),x.transitions.create("transform",{duration:Wm?o:.666*o,delay:r,easing:i})].join(","),l&&l(e,t)}),C=k(c),P=k(h),E=k(e=>{const{duration:t,delay:n,easing:r}=Hm({style:m,timeout:f,easing:a},{mode:"exit"});let i;"auto"===f?(i=x.transitions.getAutoHeightDuration(e.clientHeight),b.current=i):i=t,e.style.transition=[x.transitions.create("opacity",{duration:i,delay:n}),x.transitions.create("transform",{duration:Wm?i:.666*i,delay:Wm?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=Um(.75),d&&d(e)}),T=k(p);return(0,O.jsx)(g,{appear:i,in:s,nodeRef:I,onEnter:M,onEntered:C,onEntering:S,onExit:E,onExited:T,onExiting:P,addEndListener:e=>{"auto"===f&&v.start(b.current||0,e),r&&r(I.current,e)},timeout:"auto"===f?null:f,...y,children:(t,{ownerState:n,...r})=>e.cloneElement(o,{style:{opacity:0,transform:Um(.75),visibility:"exited"!==t||s?void 0:"hidden",...Ym[t],...m,...o.props.style},ref:w,...r})})});Gm&&(Gm.muiSupportAuto=!0);const Km=Gm,qm="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function Xm(e){return e&&e.ownerDocument||document}function Zm(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jm(e){return e instanceof Zm(e).Element||e instanceof Element}function Qm(e){return e instanceof Zm(e).HTMLElement||e instanceof HTMLElement}function ef(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Zm(e).ShadowRoot||e instanceof ShadowRoot)}var tf=Math.max,nf=Math.min,rf=Math.round;function of(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function af(){return!/^((?!chrome|android).)*safari/i.test(of())}function sf(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Qm(e)&&(i=e.offsetWidth>0&&rf(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&rf(r.height)/e.offsetHeight||1);var a=(Jm(e)?Zm(e):window).visualViewport,s=!af()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/i,c=(r.top+(s&&a?a.offsetTop:0))/o,u=r.width/i,d=r.height/o;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function lf(e){var t=Zm(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function cf(e){return e?(e.nodeName||"").toLowerCase():null}function uf(e){return((Jm(e)?e.ownerDocument:e.document)||window.document).documentElement}function df(e){return sf(uf(e)).left+lf(e).scrollLeft}function pf(e){return Zm(e).getComputedStyle(e)}function hf(e){var t=pf(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function mf(e,t,n){void 0===n&&(n=!1);var r=Qm(t),i=Qm(t)&&function(e){var t=e.getBoundingClientRect(),n=rf(t.width)/e.offsetWidth||1,r=rf(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),o=uf(t),a=sf(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==cf(t)||hf(o))&&(s=function(e){return e!==Zm(e)&&Qm(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:lf(e);var t}(t)),Qm(t)?((l=sf(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=df(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function ff(e){var t=sf(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function gf(e){return"html"===cf(e)?e:e.assignedSlot||e.parentNode||(ef(e)?e.host:null)||uf(e)}function yf(e){return["html","body","#document"].indexOf(cf(e))>=0?e.ownerDocument.body:Qm(e)&&hf(e)?e:yf(gf(e))}function vf(e,t){var n;void 0===t&&(t=[]);var r=yf(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=Zm(r),a=i?[o].concat(o.visualViewport||[],hf(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(vf(gf(a)))}function bf(e){return["table","td","th"].indexOf(cf(e))>=0}function xf(e){return Qm(e)&&"fixed"!==pf(e).position?e.offsetParent:null}function If(e){for(var t=Zm(e),n=xf(e);n&&bf(n)&&"static"===pf(n).position;)n=xf(n);return n&&("html"===cf(n)||"body"===cf(n)&&"static"===pf(n).position)?t:n||function(e){var t=/firefox/i.test(of());if(/Trident/i.test(of())&&Qm(e)&&"fixed"===pf(e).position)return null;var n=gf(e);for(ef(n)&&(n=n.host);Qm(n)&&["html","body"].indexOf(cf(n))<0;){var r=pf(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var wf="top",kf="bottom",Sf="right",Mf="left",Cf="auto",Pf=[wf,kf,Sf,Mf],Ef="start",Tf="end",Af="viewport",Of="popper",jf=Pf.reduce(function(e,t){return e.concat([t+"-"+Ef,t+"-"+Tf])},[]),Lf=[].concat(Pf,[Cf]).reduce(function(e,t){return e.concat([t,t+"-"+Ef,t+"-"+Tf])},[]),Rf=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Df(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||i(e)}),r}var $f={placement:"bottom",modifiers:[],strategy:"absolute"};function zf(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function Vf(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?Ff(i):null,a=i?Hf(i):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case wf:t={x:s,y:n.y-r.height};break;case kf:t={x:s,y:n.y+n.height};break;case Sf:t={x:n.x+n.width,y:l};break;case Mf:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?Bf(o):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case Ef:t[c]=t[c]-(n[u]/2-r[u]/2);break;case Tf:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var Uf={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Yf(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=a.x,h=void 0===p?0:p,m=a.y,f=void 0===m?0:m,g="function"==typeof u?u({x:h,y:f}):{x:h,y:f};h=g.x,f=g.y;var y=a.hasOwnProperty("x"),v=a.hasOwnProperty("y"),b=Mf,x=wf,I=window;if(c){var w=If(n),k="clientHeight",S="clientWidth";w===Zm(n)&&"static"!==pf(w=uf(n)).position&&"absolute"===s&&(k="scrollHeight",S="scrollWidth"),(i===wf||(i===Mf||i===Sf)&&o===Tf)&&(x=kf,f-=(d&&w===I&&I.visualViewport?I.visualViewport.height:w[k])-r.height,f*=l?1:-1),i!==Mf&&(i!==wf&&i!==kf||o!==Tf)||(b=Sf,h-=(d&&w===I&&I.visualViewport?I.visualViewport.width:w[S])-r.width,h*=l?1:-1)}var M,C=Object.assign({position:s},c&&Uf),P=!0===u?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:rf(n*i)/i||0,y:rf(r*i)/i||0}}({x:h,y:f},Zm(n)):{x:h,y:f};return h=P.x,f=P.y,l?Object.assign({},C,((M={})[x]=v?"0":"",M[b]=y?"0":"",M.transform=(I.devicePixelRatio||1)<=1?"translate("+h+"px, "+f+"px)":"translate3d("+h+"px, "+f+"px, 0)",M)):Object.assign({},C,((t={})[x]=v?f+"px":"",t[b]=y?h+"px":"",t.transform="",t))}const Wf={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];Qm(i)&&cf(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});Qm(r)&&cf(r)&&(Object.assign(r.style,o),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};var Gf={left:"right",right:"left",bottom:"top",top:"bottom"};function Kf(e){return e.replace(/left|right|bottom|top/g,function(e){return Gf[e]})}var qf={start:"end",end:"start"};function Xf(e){return e.replace(/start|end/g,function(e){return qf[e]})}function Zf(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ef(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Jf(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Qf(e,t,n){return t===Af?Jf(function(e,t){var n=Zm(e),r=uf(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=af();(c||!c&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+df(e),y:l}}(e,n)):Jm(t)?function(e,t){var n=sf(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Jf(function(e){var t,n=uf(e),r=lf(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=tf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=tf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+df(e),l=-r.scrollTop;return"rtl"===pf(i||n).direction&&(s+=tf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(uf(e)))}function eg(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function tg(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function ng(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,a=void 0===o?e.strategy:o,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?Af:c,d=n.elementContext,p=void 0===d?Of:d,h=n.altBoundary,m=void 0!==h&&h,f=n.padding,g=void 0===f?0:f,y=eg("number"!=typeof g?g:tg(g,Pf)),v=p===Of?"reference":Of,b=e.rects.popper,x=e.elements[m?v:p],I=function(e,t,n,r){var i="clippingParents"===t?function(e){var t=vf(gf(e)),n=["absolute","fixed"].indexOf(pf(e).position)>=0&&Qm(e)?If(e):e;return Jm(n)?t.filter(function(e){return Jm(e)&&Zf(e,n)&&"body"!==cf(e)}):[]}(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(t,n){var i=Qf(e,n,r);return t.top=tf(i.top,t.top),t.right=nf(i.right,t.right),t.bottom=nf(i.bottom,t.bottom),t.left=tf(i.left,t.left),t},Qf(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(Jm(x)?x:x.contextElement||uf(e.elements.popper),l,u,a),w=sf(e.elements.reference),k=Vf({reference:w,element:b,strategy:"absolute",placement:i}),S=Jf(Object.assign({},b,k)),M=p===Of?S:w,C={top:I.top-M.top+y.top,bottom:M.bottom-I.bottom+y.bottom,left:I.left-M.left+y.left,right:M.right-I.right+y.right},P=e.modifiersData.offset;if(p===Of&&P){var E=P[i];Object.keys(C).forEach(function(e){var t=[Sf,kf].indexOf(e)>=0?1:-1,n=[wf,kf].indexOf(e)>=0?"y":"x";C[e]+=E[n]*t})}return C}const rg={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,h=n.flipVariations,m=void 0===h||h,f=n.allowedAutoPlacements,g=t.options.placement,y=Ff(g),v=l||(y!==g&&m?function(e){if(Ff(e)===Cf)return[];var t=Kf(e);return[Xf(e),t,Xf(t)]}(g):[Kf(g)]),b=[g].concat(v).reduce(function(e,n){return e.concat(Ff(n)===Cf?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Lf:l,u=Hf(r),d=u?s?jf:jf.filter(function(e){return Hf(e)===u}):Pf,p=d.filter(function(e){return c.indexOf(e)>=0});0===p.length&&(p=d);var h=p.reduce(function(t,n){return t[n]=ng(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[Ff(n)],t},{});return Object.keys(h).sort(function(e,t){return h[e]-h[t]})}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:f}):n)},[]),x=t.rects.reference,I=t.rects.popper,w=new Map,k=!0,S=b[0],M=0;M=0,A=T?"width":"height",O=ng(t,{placement:C,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),j=T?E?Sf:Mf:E?kf:wf;x[A]>I[A]&&(j=Kf(j));var L=Kf(j),R=[];if(o&&R.push(O[P]<=0),s&&R.push(O[j]<=0,O[L]<=0),R.every(function(e){return e})){S=C,k=!1;break}w.set(C,R)}if(k)for(var D=function(e){var t=b.find(function(t){var n=w.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return S=t,"break"},$=m?3:1;$>0&&"break"!==D($);$--);t.placement!==S&&(t.modifiersData[r]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ig(e,t,n){return tf(e,nf(t,n))}const og={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,h=void 0===p||p,m=n.tetherOffset,f=void 0===m?0:m,g=ng(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=Ff(t.placement),v=Hf(t.placement),b=!v,x=Bf(y),I="x"===x?"y":"x",w=t.modifiersData.popperOffsets,k=t.rects.reference,S=t.rects.popper,M="function"==typeof f?f(Object.assign({},t.rects,{placement:t.placement})):f,C="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(w){if(o){var T,A="y"===x?wf:Mf,O="y"===x?kf:Sf,j="y"===x?"height":"width",L=w[x],R=L+g[A],D=L-g[O],$=h?-S[j]/2:0,z=v===Ef?k[j]:S[j],N=v===Ef?-S[j]:-k[j],_=t.elements.arrow,F=h&&_?ff(_):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},B=H[A],V=H[O],U=ig(0,k[j],F[j]),Y=b?k[j]/2-$-U-B-C.mainAxis:z-U-B-C.mainAxis,W=b?-k[j]/2+$+U+V+C.mainAxis:N+U+V+C.mainAxis,G=t.elements.arrow&&If(t.elements.arrow),K=G?"y"===x?G.clientTop||0:G.clientLeft||0:0,q=null!=(T=null==P?void 0:P[x])?T:0,X=L+W-q,Z=ig(h?nf(R,L+Y-q-K):R,L,h?tf(D,X):D);w[x]=Z,E[x]=Z-L}if(s){var J,Q="x"===x?wf:Mf,ee="x"===x?kf:Sf,te=w[I],ne="y"===I?"height":"width",re=te+g[Q],ie=te-g[ee],oe=-1!==[wf,Mf].indexOf(y),ae=null!=(J=null==P?void 0:P[I])?J:0,se=oe?re:te-k[ne]-S[ne]-ae+C.altAxis,le=oe?te+k[ne]+S[ne]-ae-C.altAxis:ie,ce=h&&oe?function(e,t,n){var r=ig(e,t,n);return r>n?n:r}(se,te,le):ig(h?se:re,te,h?le:ie);w[I]=ce,E[I]=ce-te}t.modifiersData[r]=E}},requiresIfExists:["offset"]},ag={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Ff(n.placement),l=Bf(s),c=[Mf,Sf].indexOf(s)>=0?"height":"width";if(o&&a){var u=function(e,t){return eg("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:tg(e,Pf))}(i.padding,n),d=ff(o),p="y"===l?wf:Mf,h="y"===l?kf:Sf,m=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],f=a[l]-n.rects.reference[l],g=If(o),y=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,v=m/2-f/2,b=u[p],x=y-d[c]-u[h],I=y/2-d[c]/2+v,w=ig(b,I,x),k=l;n.modifiersData[r]=((t={})[k]=w,t.centerOffset=w-I,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Zf(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function sg(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function lg(e){return[wf,Sf,kf,Mf].some(function(t){return e[t]>=0})}var cg=Nf({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,s=void 0===a||a,l=Zm(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(e){e.addEventListener("scroll",n.update,_f)}),s&&l.addEventListener("resize",n.update,_f),function(){o&&c.forEach(function(e){e.removeEventListener("scroll",n.update,_f)}),s&&l.removeEventListener("resize",n.update,_f)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Vf({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,l=void 0===s||s,c={placement:Ff(t.placement),variation:Hf(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Yf(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Yf(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Wf,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=Lf.reduce(function(e,n){return e[n]=function(e,t,n){var r=Ff(e),i=[Mf,wf].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Mf,Sf].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e},{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},rg,og,ag,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=ng(t,{elementContext:"reference"}),s=ng(t,{altBoundary:!0}),l=sg(a,r),c=sg(s,i,o),u=lg(l),d=lg(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]});const ug=function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}},dg=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n},pg=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t},hg=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=Hh(n?.className,o,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},a={...n,...i,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=dg({...i,...r}),s=pg(r),l=pg(i),c=t(a),u=Hh(c?.className,n?.className,o,i?.className,r?.className),d={...c?.style,...n?.style,...i?.style,...r?.style},p={...c,...n,...l,...s};return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}},mg=function(e,t,n){return"function"==typeof e?e(t,n):e},fg=function(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,a=i?{}:mg(n,r),{props:s,internalRef:l}=hg({...o,externalSlotProps:a}),c=Bm(l,a?.ref,e.additionalProps?.ref);return ug(t,{...s,ref:c},r)};function gg(e,t){"function"==typeof e?e(t):e&&(e.current=t)}const yg=e.forwardRef(function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[a,s]=e.useState(null),l=Bm(e.isValidElement(r)?Jh(r):null,n);if(qm(()=>{o||s(function(e){return"function"==typeof e?e():e}(i)||document.body)},[i,o]),qm(()=>{if(a&&!o)return gg(n,a),()=>{gg(n,null)}},[n,a,o]),o){if(e.isValidElement(r)){const t={ref:l};return e.cloneElement(r,t)}return r}return a?Tm.createPortal(r,a):a}),vg=e=>e,bg=(()=>{let e=vg;return{configure(t){e=t},generate:t=>e(t),reset(){e=vg}}})(),xg={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ig(e,t,n="Mui"){const r=xg[t];return r?`${n}-${r}`:`${bg.generate(e)}-${t}`}function wg(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=Ig(e,t,n)}),r}function kg(e){return Ig("MuiPopper",e)}function Sg(e){return"function"==typeof e?e():e}wg("MuiPopper",["root"]);const Mg={},Cg=e.forwardRef(function(t,n){const{anchorEl:r,children:i,direction:o,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:d,slotProps:p={},slots:h={},TransitionProps:m,ownerState:f,...g}=t,y=e.useRef(null),v=Bm(y,n),b=e.useRef(null),x=Bm(b,d),I=e.useRef(x);qm(()=>{I.current=x},[x]),e.useImperativeHandle(d,()=>b.current,[]);const w=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(c,o),[k,S]=e.useState(w),[M,C]=e.useState(Sg(r));e.useEffect(()=>{b.current&&b.current.forceUpdate()}),e.useEffect(()=>{r&&C(Sg(r))},[r]),qm(()=>{if(!M||!l)return;let e=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{S(e.placement)}}];null!=s&&(e=e.concat(s)),u&&null!=u.modifiers&&(e=e.concat(u.modifiers));const t=cg(M,y.current,{placement:w,...u,modifiers:e});return I.current(t),()=>{t.destroy(),I.current(null)}},[M,a,s,l,u,w]);const P={placement:k};null!==m&&(P.TransitionProps=m);const E=(e=>{const{classes:t}=e;return Gh({root:["root"]},kg,t)})(t),T=h.root??"div",A=fg({elementType:T,externalSlotProps:p.root,externalForwardedProps:g,additionalProps:{role:"tooltip",ref:v},ownerState:t,className:E.root});return(0,O.jsx)(T,{...A,children:"function"==typeof i?i(P):i})}),Pg=bm(e.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:p=Mg,popperRef:h,style:m,transition:f=!1,slotProps:g={},slots:y={},...v}=t,[b,x]=e.useState(!0);if(!l&&!u&&(!f||b))return null;let I;if(o)I=o;else if(r){const e=Sg(r);I=e&&void 0!==e.nodeType?Xm(e).body:Xm(null).body}const w=u||!l||f&&!b?void 0:"none",k=f?{in:u,onEnter:()=>{x(!1)},onExited:()=>{x(!0)}}:void 0;return(0,O.jsx)(yg,{disablePortal:s,container:I,children:(0,O.jsx)(Cg,{anchorEl:r,direction:a,disablePortal:s,modifiers:c,ref:n,open:f?!b:u,placement:d,popperOptions:p,popperRef:h,slotProps:g,slots:y,...v,style:{position:"fixed",top:0,left:0,display:w,...m},TransitionProps:k,children:i})})}),{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Eg=e.forwardRef(function(e,t){const n=qh(),r=Mm({props:e,name:"MuiPopper"}),{anchorEl:i,component:o,components:a,componentsProps:s,container:l,disablePortal:c,keepMounted:u,modifiers:d,open:p,placement:h,popperOptions:m,popperRef:f,transition:g,slots:y,slotProps:v,...b}=r,x=y?.root??a?.Root,I={anchorEl:i,container:l,disablePortal:c,keepMounted:u,modifiers:d,open:p,placement:h,popperOptions:m,popperRef:f,transition:g,...b};return(0,O.jsx)(Pg,{as:o,direction:n?"rtl":"ltr",slots:{root:x},slotProps:v??s,...I,ref:t})}),Tg=Eg,Ag=function(t){const n=e.useRef(t);return qm(()=>{n.current=t}),e.useRef((...e)=>(0,n.current)(...e)).current},Og=Ag;let jg=0;const Lg={...e}.useId;function Rg(t){if(void 0!==Lg){const e=Lg();return t??e}return function(t){const[n,r]=e.useState(t),i=t||n;return e.useEffect(()=>{null==n&&(jg+=1,r(`mui-${jg}`))},[n]),i}(t)}const Dg=Rg;function $g({controlled:t,default:n,name:r,state:i="value"}){const{current:o}=e.useRef(void 0!==t),[a,s]=e.useState(n);return[o?t:a,e.useCallback(e=>{o||s(e)},[])]}const zg=$g;function Ng(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...p}=o,h=u[e]||r,m=mg(d[e],i),{props:{component:f,...g},internalRef:y}=hg({className:n,...l,externalForwardedProps:"root"===e?p:void 0,externalSlotProps:m}),v=Bm(y,m?.ref,t.ref),b="root"===e?f||c:f;return[h,ug(h,{..."root"===e&&!c&&!u[e]&&a,..."root"!==e&&!u[e]&&a,...g,...b&&!s&&{as:b},...b&&s&&{component:b},ref:v},i)]}function _g(e){return Ig("MuiTooltip",e)}const Fg=wg("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function Hg(e){return Math.round(1e5*e)/1e5}const Bg=bm(Tg,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(wm(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:e})=>!e.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:e})=>!e,style:{pointerEvents:"none"}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${Fg.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Fg.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Fg.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Fg.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="right"] .${Fg.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="right"] .${Fg.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="left"] .${Fg.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="left"] .${Fg.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),Vg=bm("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Cm(n.placement.split("-")[0])}`]]}})(wm(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:op(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${Fg.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Fg.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Fg.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Fg.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:e})=>e.arrow,style:{position:"relative",margin:0}},{props:({ownerState:e})=>e.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${Hg(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>!e.isRtl,style:{[`.${Fg.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Fg.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:e})=>!e.isRtl&&e.touch,style:{[`.${Fg.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Fg.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:e})=>!!e.isRtl,style:{[`.${Fg.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Fg.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:e})=>!!e.isRtl&&e.touch,style:{[`.${Fg.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Fg.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${Fg.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${Fg.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),Ug=bm("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(wm(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:op(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let Yg=!1;const Wg=new Yh;let Gg={x:0,y:0};function Kg(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const qg=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiTooltip"}),{arrow:i=!1,children:o,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:p=!1,disableTouchListener:h=!1,enterDelay:m=100,enterNextDelay:f=0,enterTouchDelay:g=700,followCursor:y=!1,id:v,leaveDelay:b=0,leaveTouchDelay:x=1500,onClose:I,onOpen:w,open:k,placement:S="bottom",PopperComponent:M,PopperProps:C={},slotProps:P={},slots:E={},title:T,TransitionComponent:A,TransitionProps:j,...L}=r,R=e.isValidElement(o)?o:(0,O.jsx)("span",{children:o}),D=xm(),$=qh(),[z,N]=e.useState(),[_,F]=e.useState(null),H=e.useRef(!1),B=p||y,V=Wh(),U=Wh(),Y=Wh(),W=Wh(),[G,K]=zg({controlled:k,default:!1,name:"Tooltip",state:"open"});let q=G;const X=Dg(v),Z=e.useRef(),J=Og(()=>{void 0!==Z.current&&(document.body.style.WebkitUserSelect=Z.current,Z.current=void 0),W.clear()});e.useEffect(()=>J,[J]);const Q=e=>{Wg.clear(),Yg=!0,K(!0),w&&!q&&w(e)},ee=Og(e=>{Wg.start(800+b,()=>{Yg=!1}),K(!1),I&&q&&I(e),V.start(D.transitions.duration.shortest,()=>{H.current=!1})}),te=e=>{H.current&&"touchstart"!==e.type||(z&&z.removeAttribute("title"),U.clear(),Y.clear(),m||Yg&&f?U.start(Yg?f:m,()=>{Q(e)}):Q(e))},ne=e=>{U.clear(),Y.start(b,()=>{ee(e)})},[,re]=e.useState(!1),ie=e=>{Zh(e.target)||(re(!1),ne(e))},oe=e=>{z||N(e.currentTarget),Zh(e.target)&&(re(!0),te(e))},ae=e=>{H.current=!0;const t=R.props;t.onTouchStart&&t.onTouchStart(e)};e.useEffect(()=>{if(q)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"===e.key&&ee(e)}},[ee,q]);const se=Vm(Jh(R),N,n);T||0===T||(q=!1);const le=e.useRef(),ce={},ue="string"==typeof T;c?(ce.title=q||!ue||d?null:T,ce["aria-describedby"]=q?X:null):(ce["aria-label"]=ue?T:null,ce["aria-labelledby"]=q&&!ue?X:null);const de={...ce,...L,...R.props,className:Hh(L.className,R.props.className),onTouchStart:ae,ref:se,...y?{onMouseMove:e=>{const t=R.props;t.onMouseMove&&t.onMouseMove(e),Gg={x:e.clientX,y:e.clientY},le.current&&le.current.update()}}:{}},pe={};h||(de.onTouchStart=e=>{ae(e),Y.clear(),V.clear(),J(),Z.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",W.start(g,()=>{document.body.style.WebkitUserSelect=Z.current,te(e)})},de.onTouchEnd=e=>{R.props.onTouchEnd&&R.props.onTouchEnd(e),J(),Y.start(x,()=>{ee(e)})}),d||(de.onMouseOver=Kg(te,de.onMouseOver),de.onMouseLeave=Kg(ne,de.onMouseLeave),B||(pe.onMouseOver=te,pe.onMouseLeave=ne)),u||(de.onFocus=Kg(oe,de.onFocus),de.onBlur=Kg(ie,de.onBlur),B||(pe.onFocus=oe,pe.onBlur=ie));const he={...r,isRtl:$,arrow:i,disableInteractive:B,placement:S,PopperComponentProp:M,touch:H.current},me="function"==typeof P.popper?P.popper(he):P.popper,fe=e.useMemo(()=>{let e=[{name:"arrow",enabled:Boolean(_),options:{element:_,padding:4}}];return C.popperOptions?.modifiers&&(e=e.concat(C.popperOptions.modifiers)),me?.popperOptions?.modifiers&&(e=e.concat(me.popperOptions.modifiers)),{...C.popperOptions,...me?.popperOptions,modifiers:e}},[_,C.popperOptions,me?.popperOptions]),ge=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e;return Gh({popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${Cm(o.split("-")[0])}`],arrow:["arrow"]},_g,t)})(he),ye="function"==typeof P.transition?P.transition(he):P.transition,ve={slots:{popper:s.Popper,transition:s.Transition??A,tooltip:s.Tooltip,arrow:s.Arrow,...E},slotProps:{arrow:P.arrow??l.arrow,popper:{...C,...me??l.popper},tooltip:P.tooltip??l.tooltip,transition:{...j,...ye??l.transition}}},[be,xe]=Ng("popper",{elementType:Bg,externalForwardedProps:ve,ownerState:he,className:Hh(ge.popper,C?.className)}),[Ie,we]=Ng("transition",{elementType:Km,externalForwardedProps:ve,ownerState:he}),[ke,Se]=Ng("tooltip",{elementType:Vg,className:ge.tooltip,externalForwardedProps:ve,ownerState:he}),[Me,Ce]=Ng("arrow",{elementType:Ug,className:ge.arrow,externalForwardedProps:ve,ownerState:he,ref:F});return(0,O.jsxs)(e.Fragment,{children:[e.cloneElement(R,de),(0,O.jsx)(be,{as:M??Tg,placement:S,anchorEl:y?{getBoundingClientRect:()=>({top:Gg.y,left:Gg.x,right:Gg.x,bottom:Gg.y,width:0,height:0})}:z,popperRef:le,open:!!z&&q,id:X,transition:!0,...pe,...xe,popperOptions:fe,children:({TransitionProps:e})=>(0,O.jsx)(Ie,{timeout:D.transitions.duration.shorter,...e,...we,children:(0,O.jsxs)(ke,{...Se,children:[T,i?(0,O.jsx)(Me,{...Ce}):null]})})})]})}),Xg=Xm,Zg=e.createContext({});function Jg(e){return Ig("MuiList",e)}wg("MuiList",["root","padding","dense","subheader"]);const Qg=bm("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),ey=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiList"}),{children:i,className:o,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c,...u}=r,d=e.useMemo(()=>({dense:s}),[s]),p={...r,component:a,dense:s,disablePadding:l},h=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Gh({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},Jg,t)})(p);return(0,O.jsx)(Zg.Provider,{value:d,children:(0,O.jsxs)(Qg,{as:a,className:Hh(h.root,o),ref:n,ownerState:p,...u,children:[c,i]})})}),ty=ey;function ny(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}const ry=ny,iy=qm;function oy(e){return Xm(e).defaultView||window}const ay=oy;function sy(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function ly(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function cy(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join("")))}function uy(e,t,n,r,i,o){let a=!1,s=i(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&cy(s,o)&&!t)return s.focus(),!0;s=i(e,s,n)}return!1}const dy=e.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu",...p}=t,h=e.useRef(null),m=e.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});iy(()=>{i&&h.current.focus()},[i]),e.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!h.current.style.width;if(e.clientHeight{e.isValidElement(t)?(t.props.disabled||("selectedMenu"===d&&t.props.selected||-1===g)&&(g=n),g===n&&(t.props.disabled||t.props.muiSkipListHighlight||t.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))):g===n&&(g+=1,g>=a.length&&(g=-1))});const y=e.Children.map(a,(t,n)=>{if(n===g){const n={};return o&&(n.autoFocus=!0),void 0===t.props.tabIndex&&"selectedMenu"===d&&(n.tabIndex=0),e.cloneElement(t,n)}return t});return(0,O.jsx)(ty,{role:"menu",ref:f,className:s,onKeyDown:e=>{const t=h.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey)return void(u&&u(e));const r=Xg(t).activeElement;if("ArrowDown"===n)e.preventDefault(),uy(t,r,c,l,sy);else if("ArrowUp"===n)e.preventDefault(),uy(t,r,c,l,ly);else if("Home"===n)e.preventDefault(),uy(t,null,c,l,sy);else if("End"===n)e.preventDefault(),uy(t,null,c,l,ly);else if(1===n.length){const i=m.current,o=n.toLowerCase(),a=performance.now();i.keys.length>0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);const s=r&&!i.repeating&&cy(r,i);i.previousKeyMatched&&(s||uy(t,r,!1,l,sy,i))?e.preventDefault():i.previousKeyMatched=!1}u&&u(e)},tabIndex:i?0:-1,...p,children:y})});function py(e){return Ig("MuiDivider",e)}const hy=wg("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),my=bm("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(wm(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:op(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&"vertical"!==e.orientation,style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>"vertical"===e.orientation&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>"right"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>"left"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),fy=bm("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(wm(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),gy=e.forwardRef(function(e,t){const n=Mm({props:e,name:"MuiDivider"}),{absolute:r=!1,children:i,className:o,orientation:a="horizontal",component:s=(i||"vertical"===a?"div":"hr"),flexItem:l=!1,light:c=!1,role:u=("hr"!==s?"separator":void 0),textAlign:d="center",variant:p="fullWidth",...h}=n,m={...n,absolute:r,component:s,flexItem:l,light:c,orientation:a,role:u,textAlign:d,variant:p},f=(e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:a,textAlign:s,variant:l}=e;return Gh({root:["root",t&&"absolute",l,o&&"light","vertical"===a&&"vertical",i&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},py,r)})(m);return(0,O.jsx)(my,{as:s,className:Hh(f.root,o),role:u,ref:t,ownerState:m,"aria-orientation":"separator"!==u||"hr"===s&&"vertical"!==a?void 0:a,...h,children:i?(0,O.jsx)(fy,{className:f.wrapper,ownerState:m,children:i}):null})});gy&&(gy.muiSkipListHighlight=!0);const yy=gy;function vy(e=[]){return([,t])=>t&&function(e,t=[]){if(!function(e){return"string"==typeof e.main}(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||"string"!=typeof e[n])return!1;return!0}(t,e)}class by{static create(){return new by}static use(){const t=Vh(by.create).current,[n,r]=e.useState(!1);return t.shouldMount=n,t.setShouldMount=r,e.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=function(){let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&null!==this.ref.current&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}}function xy(t,n){var r=Object.create(null);return t&&e.Children.map(t,function(e){return e}).forEach(function(t){r[t.key]=function(t){return n&&(0,e.isValidElement)(t)?n(t):t}(t)}),r}function Iy(e,t,n){return null!=n[t]?n[t]:e.props[t]}function wy(t,n,r){var i=xy(t.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Cm(n.color)}`]]}})(wm(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:qy||{animation:`${Gy} 1.4s linear infinite`}},...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Jy=bm("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),Qy=bm("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Cm(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(wm(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:Xy||{animation:`${Ky} 1.4s ease-in-out infinite`}}]}))),ev=e.forwardRef(function(e,t){const n=Mm({props:e,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:o=!1,size:a=40,style:s,thickness:l=3.6,value:c=0,variant:u="indeterminate",...d}=n,p={...n,color:i,disableShrink:o,size:a,thickness:l,value:c,variant:u},h=(e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e;return Gh({root:["root",n,`color${Cm(r)}`],svg:["svg"],circle:["circle",`circle${Cm(n)}`,i&&"circleDisableShrink"]},Wy,t)})(p),m={},f={},g={};if("determinate"===u){const e=2*Math.PI*((44-l)/2);m.strokeDasharray=e.toFixed(3),g["aria-valuenow"]=Math.round(c),m.strokeDashoffset=`${((100-c)/100*e).toFixed(3)}px`,f.transform="rotate(-90deg)"}return(0,O.jsx)(Zy,{className:Hh(h.root,r),style:{width:a,height:a,...f,...s},ownerState:p,ref:t,role:"progressbar",...g,...d,children:(0,O.jsx)(Jy,{className:h.svg,ownerState:p,viewBox:"22 22 44 44",children:(0,O.jsx)(Qy,{className:h.circle,style:m,ownerState:p,cx:44,cy:44,r:(44-l)/2,fill:"none",strokeWidth:l})})})}),tv=ev;function nv(e){return Ig("MuiIconButton",e)}const rv=wg("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),iv=bm(Yy,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${Cm(n.color)}`],n.edge&&t[`edge${Cm(n.edge)}`],t[`size${Cm(n.size)}`]]}})(wm(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:op(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),wm(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:op((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${rv.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${rv.loading}`]:{color:"transparent"}}))),ov=bm("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),av=e.forwardRef(function(e,t){const n=Mm({props:e,name:"MuiIconButton"}),{edge:r=!1,children:i,className:o,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium",id:u,loading:d=null,loadingIndicator:p,...h}=n,m=Dg(u),f=p??(0,O.jsx)(tv,{"aria-labelledby":m,color:"inherit",size:16}),g={...n,edge:r,color:a,disabled:s,disableFocusRipple:l,loading:d,loadingIndicator:f,size:c},y=(e=>{const{classes:t,disabled:n,color:r,edge:i,size:o,loading:a}=e;return Gh({root:["root",a&&"loading",n&&"disabled","default"!==r&&`color${Cm(r)}`,i&&`edge${Cm(i)}`,`size${Cm(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},nv,t)})(g);return(0,O.jsxs)(iv,{id:d?m:u,className:Hh(y.root,o),centerRipple:!0,focusRipple:!l,disabled:s||d,ref:t,...h,ownerState:g,children:["boolean"==typeof d&&(0,O.jsx)("span",{className:y.loadingWrapper,style:{display:"contents"},children:(0,O.jsx)(ov,{className:y.loadingIndicator,ownerState:g,children:d&&f})}),i]})}),sv=av;function lv(e){return Ig("MuiButton",e)}const cv=wg("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),uv=e.createContext({}),dv=e.createContext(void 0),pv=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],hv=bm(Yy,{shouldForwardProp:e=>ym(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Cm(n.color)}`],t[`size${Cm(n.size)}`],t[`${n.variant}Size${Cm(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(wm(({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],n="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${cv.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${cv.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${cv.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${cv.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:op(e.palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:op(e.palette[t].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:op(e.palette[t].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:op(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:op(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${cv.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${cv.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${cv.loading}`]:{color:"transparent"}}}]}})),mv=bm("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${Cm(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...pv]})),fv=bm("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${Cm(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...pv]})),gv=bm("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),yv=bm("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),vv=e.forwardRef(function(t,n){const r=e.useContext(uv),i=e.useContext(dv),o=Mm({props:cc(r,t),name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:c,disabled:u=!1,disableElevation:d=!1,disableFocusRipple:p=!1,endIcon:h,focusVisibleClassName:m,fullWidth:f=!1,id:g,loading:y=null,loadingIndicator:v,loadingPosition:b="center",size:x="medium",startIcon:I,type:w,variant:k="text",...S}=o,M=Dg(g),C=v??(0,O.jsx)(tv,{"aria-labelledby":M,color:"inherit",size:16}),P={...o,color:s,component:l,disabled:u,disableElevation:d,disableFocusRipple:p,fullWidth:f,loading:y,loadingIndicator:C,loadingPosition:b,size:x,type:w,variant:k},E=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,loading:a,loadingPosition:s,classes:l}=e,c=Gh({root:["root",a&&"loading",o,`${o}${Cm(t)}`,`size${Cm(i)}`,`${o}Size${Cm(i)}`,`color${Cm(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${Cm(s)}`],startIcon:["icon","startIcon",`iconSize${Cm(i)}`],endIcon:["icon","endIcon",`iconSize${Cm(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},lv,l);return{...l,...c}})(P),T=(I||y&&"start"===b)&&(0,O.jsx)(mv,{className:E.startIcon,ownerState:P,children:I||(0,O.jsx)(yv,{className:E.loadingIconPlaceholder,ownerState:P})}),A=(h||y&&"end"===b)&&(0,O.jsx)(fv,{className:E.endIcon,ownerState:P,children:h||(0,O.jsx)(yv,{className:E.loadingIconPlaceholder,ownerState:P})}),j=i||"",L="boolean"==typeof y?(0,O.jsx)("span",{className:E.loadingWrapper,style:{display:"contents"},children:y&&(0,O.jsx)(gv,{className:E.loadingIndicator,ownerState:P,children:C})}):null;return(0,O.jsxs)(hv,{ownerState:P,className:Hh(r.className,E.root,c,j),component:l,disabled:u||y,focusRipple:!p,focusVisibleClassName:Hh(E.focusVisible,m),ref:n,type:w,id:y?M:g,...S,classes:E,children:[T,"end"!==b&&L,a,"end"===b&&L,A]})}),bv=l({},{baseButton:vv,baseIconButton:sv},{});function xv(e){return Ig("MuiListItemIcon",e)}const Iv=wg("MuiListItemIcon",["root","alignItemsFlexStart"]);function wv(e){return Ig("MuiListItemText",e)}const kv=wg("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Sv(e){return Ig("MuiMenuItem",e)}const Mv=wg("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Cv=bm(Yy,{shouldForwardProp:e=>ym(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(wm(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Mv.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:op(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Mv.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:op(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Mv.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:op(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:op(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Mv.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Mv.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${hy.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${hy.inset}`]:{marginLeft:52},[`& .${kv.root}`]:{marginTop:0,marginBottom:0},[`& .${kv.inset}`]:{paddingLeft:36},[`& .${Iv.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${Iv.root} svg`]:{fontSize:"1.25rem"}}}]}))),Pv=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:p,...h}=r,m=e.useContext(Zg),f=e.useMemo(()=>({dense:a||m.dense||!1,disableGutters:l}),[m.dense,a,l]),g=e.useRef(null);iy(()=>{i&&g.current&&g.current.focus()},[i]);const y={...r,dense:f.dense,divider:s,disableGutters:l},v=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:a}=e,s=Gh({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},Sv,a);return{...a,...s}})(r),b=Vm(g,n);let x;return r.disabled||(x=void 0!==d?d:-1),(0,O.jsx)(Zg.Provider,{value:f,children:(0,O.jsx)(Cv,{ref:b,role:u,tabIndex:x,component:o,focusVisibleClassName:Hh(v.focusVisible,c),className:Hh(v.root,p),...h,ownerState:y,classes:v})})}),Ev=Pv,Tv=bm("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(wm(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),Av=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiListItemIcon"}),{className:i,...o}=r,a=e.useContext(Zg),s={...r,alignItems:a.alignItems},l=(e=>{const{alignItems:t,classes:n}=e;return Gh({root:["root","flex-start"===t&&"alignItemsFlexStart"]},xv,n)})(s);return(0,O.jsx)(Tv,{className:Hh(l.root,i),ownerState:s,ref:n,...o})});function Ov(e){return Ig("MuiTypography",e)}const jv=wg("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Lv={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Rv=function(e){const{sx:t,...n}=e,{systemProps:r,otherProps:i}=(e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??vu;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t})(n);let o;return o=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return pc(n)?{...r,...n}:r}:{...r,...t},{...i,sx:o}},Dv=bm("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${Cm(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(wm(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([e,t])=>"inherit"!==e&&t&&"object"==typeof t).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>"string"==typeof e).map(([t])=>({props:{color:`text${Cm(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>"inherit"!==e.align,style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),$v={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},zv=e.forwardRef(function(e,t){const{color:n,...r}=Mm({props:e,name:"MuiTypography"}),i=Rv({...r,...!Lv[n]&&{color:n}}),{align:o="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=$v,...h}=i,m={...i,align:o,color:n,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:p},f=s||(u?"p":p[d]||$v[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e;return Gh({root:["root",o,"inherit"!==e.align&&`align${Cm(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]},Ov,a)})(m);return(0,O.jsx)(Dv,{as:f,ref:t,className:Hh(g.root,a),...h,ownerState:m,style:{..."inherit"!==o&&{"--Typography-textAlign":o},...h.style}})}),Nv=zv,_v=bm("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${kv.primary}`]:t.primary},{[`& .${kv.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${jv.root}:where(& .${kv.primary})`]:{display:"block"},[`.${jv.root}:where(& .${kv.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Fv=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiListItemText"}),{children:i,className:o,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d,slots:p={},slotProps:h={},...m}=r,{dense:f}=e.useContext(Zg);let g=null!=l?l:i,y=u;const v={...r,disableTypography:a,inset:s,primary:!!g,secondary:!!y,dense:f},b=(e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return Gh({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},wv,t)})(v),x={slots:p,slotProps:{primary:c,secondary:d,...h}},[I,w]=Ng("root",{className:Hh(b.root,o),elementType:_v,externalForwardedProps:{...x,...m},ownerState:v,ref:n}),[k,S]=Ng("primary",{className:b.primary,elementType:Nv,externalForwardedProps:x,ownerState:v}),[M,C]=Ng("secondary",{className:b.secondary,elementType:Nv,externalForwardedProps:x,ownerState:v});return null==g||g.type===Nv||a||(g=(0,O.jsx)(k,{variant:f?"body2":"body1",component:S?.variant?void 0:"span",...S,children:g})),null==y||y.type===Nv||a||(y=(0,O.jsx)(M,{variant:"body2",color:"textSecondary",...C,children:y})),(0,O.jsxs)(I,{...w,children:[g,y]})}),Hv=["inert","iconStart","iconEnd","children"],Bv=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Vv(e){const t=[],n=[];return Array.from(e.querySelectorAll(Bv)).forEach((e,r)=>{const i=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==i&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===i?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function Uv(){return!0}const Yv=function(t){const{children:n,disableAutoFocus:r=!1,disableEnforceFocus:i=!1,disableRestoreFocus:o=!1,getTabbable:a=Vv,isEnabled:s=Uv,open:l}=t,c=e.useRef(!1),u=e.useRef(null),d=e.useRef(null),p=e.useRef(null),h=e.useRef(null),m=e.useRef(!1),f=e.useRef(null),g=Bm(Jh(n),f),y=e.useRef(null);e.useEffect(()=>{l&&f.current&&(m.current=!r)},[r,l]),e.useEffect(()=>{if(!l||!f.current)return;const e=Xm(f.current);return f.current.contains(e.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex","-1"),m.current&&f.current.focus()),()=>{o||(p.current&&p.current.focus&&(c.current=!0,p.current.focus()),p.current=null)}},[l]),e.useEffect(()=>{if(!l||!f.current)return;const e=Xm(f.current),t=t=>{y.current=t,!i&&s()&&"Tab"===t.key&&e.activeElement===f.current&&t.shiftKey&&(c.current=!0,d.current&&d.current.focus())},n=()=>{const t=f.current;if(null===t)return;if(!e.hasFocus()||!s()||c.current)return void(c.current=!1);if(t.contains(e.activeElement))return;if(i&&e.activeElement!==u.current&&e.activeElement!==d.current)return;if(e.activeElement!==h.current)h.current=null;else if(null!==h.current)return;if(!m.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==d.current||(n=a(f.current)),n.length>0){const e=Boolean(y.current?.shiftKey&&"Tab"===y.current?.key),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const r=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(r),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[r,i,o,s,l,a]);const v=e=>{null===p.current&&(p.current=e.relatedTarget),m.current=!0};return(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)("div",{tabIndex:l?0:-1,onFocus:v,ref:u,"data-testid":"sentinelStart"}),e.cloneElement(n,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),m.current=!0,h.current=e.target;const t=n.props.onFocus;t&&t(e)}}),(0,O.jsx)("div",{tabIndex:l?0:-1,onFocus:v,ref:d,"data-testid":"sentinelEnd"})]})};function Wv(e){return e.substring(2).toLowerCase()}function Gv(t){const{children:n,disableReactTree:r=!1,mouseEvent:i="onClick",onClickAway:o,touchEvent:a="onTouchEnd"}=t,s=e.useRef(!1),l=e.useRef(null),c=e.useRef(!1),u=e.useRef(!1);e.useEffect(()=>(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const d=Bm(Jh(n),l),p=Ag(e=>{const t=u.current;u.current=!1;const n=Xm(l.current);if(!c.current||!l.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidtht=>{u.current=!0;const r=n.props[e];r&&r(t)},m={ref:d};return!1!==a&&(m[a]=h(a)),e.useEffect(()=>{if(!1!==a){const e=Wv(a),t=Xm(l.current),n=()=>{s.current=!0};return t.addEventListener(e,p),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,p),t.removeEventListener("touchmove",n)}}},[p,a]),!1!==i&&(m[i]=h(i)),e.useEffect(()=>{if(!1!==i){const e=Wv(i),t=Xm(l.current);return t.addEventListener(e,p),()=>{t.removeEventListener(e,p)}}},[p,i]),e.cloneElement(n,m)}function Kv(e){return Ig("MuiPaper",e)}wg("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const qv=bm("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})(wm(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Xv=e.forwardRef(function(e,t){const n=Mm({props:e,name:"MuiPaper"}),r=xm(),{className:i,component:o="div",elevation:a=1,square:s=!1,variant:l="elevation",...c}=n,u={...n,component:o,elevation:a,square:s,variant:l},d=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e;return Gh({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},Kv,i)})(u);return(0,O.jsx)(qv,{as:o,ownerState:u,className:Hh(d.root,i),ref:t,...c,style:{..."elevation"===l&&{"--Paper-shadow":(r.vars||r).shadows[a],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[a]},...!r.vars&&"dark"===r.palette.mode&&{"--Paper-overlay":`linear-gradient(${op("#fff",yh(a))}, ${op("#fff",yh(a))})`}},...c.style}})}),Zv=Xv,Jv=["ref","open","children","className","clickAwayTouchEvent","clickAwayMouseEvent","flip","focusTrap","onExited","onClickAway","onDidShow","onDidHide","id","target","transition","placement"];function Qv(e,t){return function(e,t){return void 0===e.focusTrap?t:(0,O.jsx)(Yv,{open:!0,disableEnforceFocus:!0,disableAutoFocus:!0,children:(0,O.jsx)("div",{tabIndex:-1,children:t})})}(e,function(e,t){return void 0===e.onClickAway?t:(0,O.jsx)(Gv,{onClickAway:e.onClickAway,touchEvent:e.clickAwayTouchEvent,mouseEvent:e.clickAwayMouseEvent,children:t})}(e,t))}const eb={"bottom-start":"top left","bottom-end":"top right"};function tb(e){return Ig("MuiSvgIcon",e)}wg("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const nb=bm("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Cm(n.color)}`],t[`fontSize${Cm(n.fontSize)}`]]}})(wm(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),rb=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:p="0 0 24 24",...h}=r,m=e.isValidElement(i)&&"svg"===i.type,f={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:p,hasSvgAsChild:m},g={};u||(g.viewBox=p);const y=(e=>{const{color:t,fontSize:n,classes:r}=e;return Gh({root:["root","inherit"!==t&&`color${Cm(t)}`,`fontSize${Cm(n)}`]},tb,r)})(f);return(0,O.jsxs)(nb,{as:s,className:Hh(y.root,o),focusable:"false",color:c,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:n,...g,...h,...m&&i.props,ownerState:f,children:[m?i.props.children:i,d?(0,O.jsx)("title",{children:d}):null]})});rb.muiName="SvgIcon";const ib=rb;function ob(t,n){function r(e,r){return(0,O.jsx)(ib,{"data-testid":`${n}Icon`,ref:r,...e,children:t})}return r.muiName=ib.muiName,e.memo(e.forwardRef(r))}const ab=ob,sb=ab((0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),(0,O.jsx)("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2z"})]}),"ZoomIn"),lb=ab((0,O.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14M7 9h5v1H7z"}),"ZoomOut"),cb=ab((0,O.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"Export"),ub={baseTooltip:qg,basePopper:function(t){const{open:n,children:r,className:i,flip:o,onExited:a,onDidShow:s,onDidHide:c,id:u,target:d,transition:p,placement:h}=t,m=tt(t,Jv),f=e.useMemo(()=>{const e=[{name:"preventOverflow",options:{padding:8}}];return o&&e.push({name:"flip",enabled:!0,options:{rootBoundary:"document"}}),(s||c)&&e.push({name:"isPlaced",enabled:!0,phase:"main",fn:()=>{s?.()},effect:()=>()=>{c?.()}}),e},[o,s,c]);let g;if(p){const e=e=>t=>{e&&e(),a&&a(t)};g=n=>Qv(t,(0,O.jsx)(Km,l({},n.TransitionProps,{style:{transformOrigin:eb[n.placement]},onExited:e(n.TransitionProps?.onExited),children:(0,O.jsx)(Zv,{children:r})})))}else g=Qv(t,r);return(0,O.jsx)(Tg,l({id:u,className:i,open:n,anchorEl:d,transition:p,placement:h,modifiers:f},m,{children:g}))},baseMenuList:dy,baseMenuItem:function(e){const{inert:t,iconStart:n,iconEnd:r,children:i}=e,o=tt(e,Hv);return(0,O.jsxs)(Ev,l({},o,{disableRipple:!!t||o.disableRipple,children:[n&&(0,O.jsx)(Av,{children:n},"1"),(0,O.jsx)(Fv,{children:i},"2"),r&&(0,O.jsx)(Av,{children:r},"3")]}))},baseDivider:yy},db=l({},bv,ub,{zoomInIcon:sb,zoomOutIcon:lb,exportIcon:cb}),pb=e=>e.brush,hb=(ae(pb,e=>e?.start),ae(pb,e=>e?.current),ae(pb,e=>e?.start?.x??null)),mb=ae(pb,e=>e?.start?.y??null),fb=ae(pb,e=>e?.current?.x??null),gb=ae(pb,e=>e?.current?.y??null),yb=le(hb,mb,fb,gb,(e,t,n,r)=>null===e||null===t||null===n||null===r?null:{start:{x:e,y:t},current:{x:n,y:r}}),vb=ae(ft,e=>{let t=!1,n=!1;return e&&Object.entries(e).forEach(([e,r])=>{Object.values(r.series).some(e=>"horizontal"===e.layout)&&(t=!0),"scatter"===e&&r.seriesOrder.length>0&&(n=!0)}),n?"xy":t?"y":"x"}),bb=ae(qa,function(e){let t=!1,n=!1;return Object.values(e).forEach(e=>{"y"===e.axisDirection&&(n=!0),"x"===e.axisDirection&&(t=!0)}),t&&n?"xy":n?"y":t?"x":null}),xb=ae(vb,bb,(e,t)=>t??e),Ib=ae(pb,e=>e?.enabled||e?.isZoomBrushEnabled),wb=ae(Ib,pb,(e,t)=>e&&null!==t?.start&&null!==t?.current),kb=ae(pb,wb,(e,t)=>t&&e?.preventHighlight),Sb=ae(pb,wb,(e,t)=>t&&e?.preventTooltip),Mb=({store:t,svgRef:n,instance:r,params:i})=>{const o=t.use(Ib);V(()=>{t.set("brush",l({},t.state.brush,{enabled:i.brushConfig.enabled,preventTooltip:i.brushConfig.preventTooltip,preventHighlight:i.brushConfig.preventHighlight}))},[t,i.brushConfig.enabled,i.brushConfig.preventTooltip,i.brushConfig.preventHighlight]);const a=ke(function(e){t.set("brush",l({},t.state.brush,{start:t.state.brush.start??e,current:e}))}),s=ke(function(){t.set("brush",l({},t.state.brush,{start:null,current:null}))}),c=ke(function(e){t.state.brush.isZoomBrushEnabled!==e&&t.set("brush",l({},t.state.brush,{isZoomBrushEnabled:e}))});return e.useEffect(()=>{const e=n.current;if(null===e||!o)return()=>{};const t=r.addInteractionListener("brushStart",t=>{if(t.detail.target?.closest("[data-charts-zoom-slider]"))return;const n=xs(e,{clientX:t.detail.initialCentroid.x,clientY:t.detail.initialCentroid.y});a(n)}),i=r.addInteractionListener("brush",t=>{const n=xs(e,{clientX:t.detail.centroid.x,clientY:t.detail.centroid.y});a(n)}),l=r.addInteractionListener("brushCancel",s),c=r.addInteractionListener("brushEnd",s);return()=>{t.cleanup(),i.cleanup(),c.cleanup(),l.cleanup()}},[n,r,t,s,a,o]),{instance:{setBrushCoordinates:a,clearBrush:s,setZoomBrushEnabled:c}}};function Cb(e,t,n){const r="rotation"===n?"DEFAULT_ROTATION_AXIS_KEY":"DEFAULT_RADIUS_AXIS_KEY";return(e&&e.length>0?e:[{id:r}]).map((e,r)=>{const i=`defaultized-${n}-axis-${r}`,o=e.dataKey;if(void 0===o||void 0!==e.data)return l({id:i},e);if(void 0===t)throw new Error(`MUI X Charts: ${n}-axis uses \`dataKey\` but no \`dataset\` is provided.`);return l({id:i,data:t.map(e=>e[o])},e)})}function Pb(e){return pa.getTypes().has(e)}Mb.params={brushConfig:!0},Mb.getDefaultizedParams=({params:e})=>l({},e,{brushConfig:{enabled:e?.brushConfig?.enabled??!1,preventTooltip:e?.brushConfig?.preventTooltip??!0,preventHighlight:e?.brushConfig?.preventHighlight??!0}}),Mb.getInitialState=e=>({brush:{enabled:e.brushConfig.enabled,isZoomBrushEnabled:!1,preventTooltip:e.brushConfig.preventTooltip,preventHighlight:e.brushConfig.preventHighlight,start:null,current:null}});function Eb({drawingArea:e,formattedSeries:t,axis:n,seriesConfig:r,axisDirection:i}){if(void 0===n)return{axis:{},axisIds:[]};const o=((e,t,n,r)=>{const i=new Set;return Object.keys(t).filter(Pb).forEach(o=>{const a=n[o]?.series??{},s=t[o].axisTooltipGetter?.(a);void 0!==s&&s.forEach(({axisId:t,direction:n})=>{n===e&&i.add(t??r)})}),i})(i,r,t,n[0].id),a={};return n.forEach((n,s)=>{const c=n,u=function(e,t,n){if("rotation"===t){if("point"===n.scaleType){const e=[Ql(n.startAngle,0),Ql(n.endAngle,2*Math.PI)],t=e[1]-e[0];return t>2*Math.PI-.1&&(e[1]-=t/n.data.length),e}return[Ql(n.startAngle,0),Ql(n.endAngle,2*Math.PI)]}return[0,Math.min(e.height,e.width)/2]}(e,i,c),[d,p]=((e,t,n,r,i)=>{const o=Object.keys(n).filter(Pb).reduce((o,a)=>((e,t,n,r,i,o,a)=>{const s="rotation"===r?i[t].rotationExtremumGetter:i[t].radiusExtremumGetter,l=a[t]?.series??{},[c,u]=s?.({series:l,axis:n,axisIndex:o,isDefaultAxis:0===o})??[1/0,-1/0],[d,p]=e;return[Math.min(c,d),Math.max(u,p)]})(o,a,e,t,n,r,i),[1/0,-1/0]);return Number.isNaN(o[0])||Number.isNaN(o[1])?[1/0,-1/0]:o})(c,i,r,s,t),h=!c.ignoreTooltip&&o.has(c.id),m=c.data??[];if(Et(c)){const e=c.categoryGapRatio??.2,t=c.barGapRatio??.1;if(a[c.id]=l({offset:0,categoryGapRatio:e,barGapRatio:t,triggerTooltip:h},c,{data:m,scale:Sa(c.data,u).paddingInner(e).paddingOuter(e/2),tickNumber:c.data.length,colorScale:c.colorMap&&("ordinal"===c.colorMap.type?wr(l({values:c.data},c.colorMap)):kr(c.colorMap))}),sa(c.data)){const e=la(c.data,u,c.tickNumber);a[c.id].valueFormatter=c.valueFormatter??e}}if(Tt(c)&&(a[c.id]=l({offset:0,triggerTooltip:h},c,{data:m,scale:Ma(c.data,u),tickNumber:c.data.length,colorScale:c.colorMap&&("ordinal"===c.colorMap.type?wr(l({values:c.data},c.colorMap)):kr(c.colorMap))}),sa(c.data))){const e=la(c.data,u,c.tickNumber);a[c.id].valueFormatter=c.valueFormatter??e}if("point"===(f=c).scaleType||"band"===f.scaleType)return;var f;const g=c.scaleType??"linear",y=c.domainLimit??"nice",v=[c.min??d,c.max??p];if("function"==typeof y){const{min:e,max:t}=y(d,p);v[0]=e,v[1]=t}const b=Sr(c,v,Cr(Math.abs(u[1]-u[0]))),x=Mr(b,u),I=aa(g,v,u),w="nice"===y?I.nice(b):I,[k,S]=w.domain(),M=[c.min??k,c.max??S];a[c.id]=l({offset:0,triggerTooltip:h},c,{data:m,scaleType:g,scale:w.domain(M),tickNumber:x,colorScale:c.colorMap&&kr(c.colorMap)})}),{axis:a,axisIds:n.map(({id:e})=>e)}}const Tb=e=>e.polarAxis,Ab=ae(Tb,e=>e?.rotation),Ob=ae(Tb,e=>e?.radius),jb=le(Ab,he,ft,ht,(e,t,n,r)=>Eb({drawingArea:t,formattedSeries:n,axis:e,seriesConfig:r,axisDirection:"rotation"})),Lb=le(Ob,he,ft,ht,(e,t,n,r)=>Eb({drawingArea:t,formattedSeries:n,axis:e,seriesConfig:r,axisDirection:"radius"})),Rb=le(he,function(e){return{cx:e.left+e.width/2,cy:e.top+e.height/2}}),Db=e=>(t,n)=>Math.atan2(t-e.cx,e.cy-n);function $b(e){return(e%360+360)%360}const zb=2*Math.PI;function Nb(e,t){const{scale:n,data:r,reverse:i}=e;if(!fa(n))throw new Error("MUI X Charts: getAxisValue is not implemented for polare continuous axes.");if(!r)return-1;const o=((t-Math.min(...n.range()))%zb+zb)%zb,a=0===n.bandwidth()?Math.floor((o+n.step()/2)/n.step())%r.length:Math.floor(o/n.step());return a<0||a>=r.length?-1:i?r.length-1-a:a}const _b=({params:t,store:n,seriesConfig:r,svgRef:i,instance:o})=>{const{rotationAxis:a,radiusAxis:s,dataset:c}=t,u=n.use(he),d=n.use(ft),p=n.use(Rb),h=n.use(ws),{axis:m,axisIds:f}=n.use(jb),{axis:g,axisIds:y}=n.use(Lb),v=e.useRef(!0);e.useEffect(()=>{v.current?v.current=!1:n.set("polarAxis",l({},n.state.polarAxis,{rotation:Cb(a,c,"rotation"),radius:Cb(s,c,"radius")}))},[r,u,a,s,c,n]);const b=e.useMemo(()=>Db({cx:p.cx,cy:p.cy}),[p.cx,p.cy]),x=e.useMemo(()=>(e=>(t,n)=>{const r=Math.atan2(t-e.cx,e.cy-n);return[Math.sqrt((t-e.cx)**2+(e.cy-n)**2),r]})({cx:p.cx,cy:p.cy}),[p.cx,p.cy]),I=e.useMemo(()=>(e=>(t,n)=>[e.cx+t*Math.sin(n),e.cy-t*Math.cos(n)])({cx:p.cx,cy:p.cy}),[p.cx,p.cy]),w=f[0],k=y[0],S=e.useRef({isInChart:!1}),M=Fs(o);return e.useEffect(()=>{const e=i.current;if(!h||!M||null===e||t.disableAxisListener)return()=>{};const n=o.addInteractionListener("moveEnd",e=>{e.detail.activeGestures.pan||(S.current.isInChart=!1,o.cleanInteraction())}),r=o.addInteractionListener("panEnd",e=>{e.detail.activeGestures.move||(S.current.isInChart=!1,o.cleanInteraction?.())}),a=o.addInteractionListener("quickPressEnd",e=>{e.detail.activeGestures.move||e.detail.activeGestures.pan||(S.current.isInChart=!1,o.cleanInteraction?.())}),s=t=>{const n=t.detail.srcEvent;if("touch"===t.detail.srcEvent.pointerType){const t=e.getBoundingClientRect();if(n.clientXt.right||n.clientYt.bottom)return S.current.isInChart=!1,void o.cleanInteraction?.();const r=xs(e,n);return S.current.isInChart=!0,void o.setPointerCoordinate?.(r)}const r=xs(e,n);o.isPointInside(r.x,r.y,t.detail.target)?(p.cx-r.x)**2+(p.cy-r.y)**2>g[k].scale.range()[1]**2?S.current.isInChart&&(o.cleanInteraction?.(),S.current.isInChart=!1):(S.current.isInChart=!0,o.setPointerCoordinate?.(r)):S.current.isInChart&&(o.cleanInteraction?.(),S.current.isInChart=!1)},l=o.addInteractionListener("move",s),c=o.addInteractionListener("pan",s),u=o.addInteractionListener("quickPress",s);return()=>{l.cleanup(),n.cleanup(),c.cleanup(),r.cleanup(),u.cleanup(),a.cleanup()}},[i,n,p,g,k,m,w,o,t.disableAxisListener,h,b,M]),e.useEffect(()=>{const e=i.current,n=t.onAxisClick;if(null===e||!n)return()=>{};const r=o.addInteractionListener("tap",t=>{let r=null,i=!1;const o=xs(e,t.detail.srcEvent),a=Db(p)(o.x,o.y),s=Nb(m[w],a);if(i=-1!==s,r=i?s:null,null==r||-1===r)return;const l=(i?m:g)[i?w:k].data[r],c={};Object.keys(d).filter(e=>"radar"===e).forEach(e=>{d[e]?.seriesOrder.forEach(t=>{const n=d[e].series[t];c[t]=n.data[r]})}),n(t.detail.srcEvent,{dataIndex:r,axisValue:l,seriesValues:c})});return()=>{r.cleanup()}},[p,o,t.onAxisClick,d,g,m,i,k,w]),{instance:{svg2polar:x,svg2rotation:b,polar2svg:I}}};_b.params={rotationAxis:!0,radiusAxis:!0,dataset:!0,disableAxisListener:!0,onAxisClick:!0},_b.getInitialState=e=>({polarAxis:{rotation:Cb(e.rotationAxis,e.dataset,"rotation"),radius:Cb(e.radiusAxis,e.dataset,"radius")}});const Fb=new Map,Hb=(le(ae(e=>e.visibilityManager,e=>e?.visibilityMap??Fb),e=>(t,n)=>((e,t,n)=>{const r=Ee(n,t);return!e.has(r)})(e,n,t)),(e,t)=>{const n=new Map;return e&&e.forEach(e=>{const r=Ee(t,e);n.set(r,e)}),n}),Bb=({store:e,params:t,seriesConfig:n,instance:r})=>{Y(()=>{void 0!==t.hiddenItems&&e.set("visibilityManager",l({},e.state.visibilityManager,{visibilityMap:Hb(t.hiddenItems,n)}))},[e,t.hiddenItems,n]);const i=ke(n=>{const i=e.state.visibilityManager.visibilityMap,o=r.serializeIdentifier(n);if(i.has(o))return;const a=new Map(i);a.set(o,n),e.set("visibilityManager",l({},e.state.visibilityManager,{visibilityMap:a})),t.onHiddenItemsChange?.(Array.from(a.values()))}),o=ke(n=>{const i=e.state.visibilityManager.visibilityMap,o=r.serializeIdentifier(n);if(!i.has(o))return;const a=new Map(i);a.delete(o),e.set("visibilityManager",l({},e.state.visibilityManager,{visibilityMap:a})),t.onHiddenItemsChange?.(Array.from(a.values()))}),a=ke(t=>{const n=e.state.visibilityManager.visibilityMap,a=r.serializeIdentifier(t);n.has(a)?o(t):i(t)});return{instance:{hideItem:i,showItem:o,toggleItemVisibility:a}}};function Vb(e){return e&&e.ownerDocument||document}function Ub(e,t,n){const r=[],i=t.querySelectorAll("style, link[rel='stylesheet']");for(let t=0;t{a.addEventListener("load",()=>e())}))}n&&a.setAttribute("nonce",n),e.head.appendChild(a),n&&a.setAttribute("nonce",n)}return r}function Yb(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}function Wb(e,t){const n={};return Object.entries(t).forEach(([t,r])=>{const i=e.style.getPropertyValue(t);n[t]=i,e.style.setProperty(t,r)}),n}Bb.getInitialState=(e,t,n)=>({visibilityManager:{visibilityMap:e.hiddenItems?Hb(e.hiddenItems,n):Fb,isControlled:void 0!==e.hiddenItems}}),Bb.params={onHiddenItemsChange:!0,hiddenItems:!0};const Gb=e=>e,Kb=(()=>{let e=Gb;return{configure(t){e=t},generate:t=>e(t),reset(){e=Gb}}})(),qb={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Xb(e,t,n="Mui"){const r=qb[t];return r?`${n}-${r}`:`${Kb.generate(e)}-${t}`}function Zb(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=Xb(e,t,n)}),r}const Jb=Zb("MuiChartsToolbar",["root"]);function Qb(e){const t=e.contentDocument.querySelector(`.${Jb.root}`);t?.remove()}function ex(){let e;const t=new Promise(t=>{e=t});return window.requestAnimationFrame(()=>{e()}),t}const tx=({chartRootRef:e,svgRef:t,instance:n})=>{const r=async t=>{const r=e.current;if(r){const e=n.disableAnimation();try{await ex(),function(e,{fileName:t,onBeforeExport:n=Qb,copyStyles:r=!0,nonce:i}={}){const o=Yb(t),a=Vb(e);o.onload=async()=>{const t=o.contentDocument,s=e.cloneNode(!0);t.body.replaceChildren(s),t.body.style.margin="0px";const l=e.getRootNode(),c="ShadowRoot"===l.constructor.name?l:a;r&&await Promise.all(Ub(t,c,i)),o.contentWindow.matchMedia("print").addEventListener("change",e=>{!1===e.matches&&a.body.removeChild(o)}),await n(o),o.contentWindow.print()},a.body.appendChild(o)}(r,t)}catch(e){console.error("MUI X Charts: Error exporting chart as print:",e)}finally{e()}}},i=async r=>{const i=e.current,o=t.current;if(i&&o){const e=n.disableAnimation();try{await ex(),await async function(e,t,n){const{fileName:r,type:i="image/png",quality:o=.9,onBeforeExport:s=Qb,copyStyles:l=!0,nonce:c}=n??{},u=(async()=>{try{const e=await a.e(235).then(a.t.bind(a,3436,19));return(e.default||e).drawDocument}catch(e){throw new Error("MUI X Charts: Failed to import 'rasterizehtml' module. This dependency is mandatory when exporting a chart as an image. Make sure you have it installed as a dependency.",{cause:e})}})(),d=Vb(e),p=Yb(r),h=Wb(t,{width:`${t.getBoundingClientRect().width}px`});let m;const f=new Promise(e=>{m=e});p.onload=async()=>{const n=p.contentDocument,r=e.cloneNode(!0);Wb(t,h),n.body.replaceChildren(r),n.body.style.margin="0px",n.body.style.width="fit-content";const i=e.getRootNode(),o="ShadowRoot"===i.constructor.name?i:d;l&&await Promise.all(Ub(n,o,c)),m()},d.body.appendChild(p),await f,await s(p);const g=await u,y=p.contentDocument.body.getBoundingClientRect(),v=document.createElement("canvas"),b=window.devicePixelRatio||1;v.width=y.width*b,v.height=y.height*b,v.style.width=`${y.width}px`,v.style.height=`${y.height}px`;try{await g(p.contentDocument,v,{zoom:b,nonce:c})}finally{d.body.removeChild(p)}let x;const I=new Promise(e=>{x=e});let w;try{v.toBlob(e=>x(e),i,o),w=await I}catch(e){throw new Error("MUI X Charts: Failed to create blob from canvas.",{cause:e})}if(!w)throw new Error("MUI X Charts: Failed to create blob from canvas.");const k=URL.createObjectURL(w);!function(e,t){const n=document.createElement("a");n.href=e,n.download=t,n.click()}(k,r||document.title),URL.revokeObjectURL(k)}(i,o,r)}catch(e){console.error("MUI X Charts: Error exporting chart as image:",e)}finally{e()}}};return{publicAPI:{exportAsPrint:r,exportAsImage:i},instance:{exportAsPrint:r,exportAsImage:i}}};function nx(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const n=e.length;if(n!==t.length)return!1;for(let r=0;r{n=null,e(...t)};function i(...e){t=e,n||(n=requestAnimationFrame(r))}return i.clear=()=>{n&&(cancelAnimationFrame(n),n=null)},i}tx.params={},tx.getDefaultizedParams=({params:e})=>l({},e),tx.getInitialState=()=>({export:{}});const ix=(e,t,n,r)=>{const i=r.minStart,o=r.maxEnd,a=r.minSpan,s=n.start,l=n.end,c=s+e*(l-s);let u=(s+c*(t-1))/t,d=(l+c*(t-1))/t,p=0,h=0;return uo&&(h=Math.abs(d-o),d=o),p>0&&h>0?[i,o]:(d+=p,u-=h,u=Math.min(o-a,Math.max(i,u)),d=Math.max(a,Math.min(o,d)),[u,d])};function ox(e,t,n,r){const i=t-e;return!(i<0||n&&ir.maxSpan||er.maxEnd)}function ax(e,t,n){const{left:r,width:i}=t,o=(e.x-r)/i;return n?1-o:o}function sx(e,t,n){const{top:r,height:i}=t,o=(r-e.y)/i+1;return n?1-o:o}function lx(e,t,n,r,i="xy"){return e.map(e=>{const o=r[e.axisId];if(!o||!o.panning||"x"===o.axisDirection&&"y"===i||"y"===o.axisDirection&&"x"===i)return e;const a=e.start,s=e.end,c=s-a,u=o.minStart,d=o.maxEnd,p="x"===o.axisDirection?t.x:t.y,h=o.reverse?-p:p,m="x"===o.axisDirection?n.width:n.height;let f=a-h/m*c,g=s-h/m*c;return fd&&(g=d,f=g-c),fd||co.maxSpan?e:l({},e,{start:f,end:g})})}ne({memoize:J,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const cx=(e,t,n,r,i,o,a,s,...l)=>{if(l.length>0)throw new Error("Unsupported number of selectors");let c;if(e&&t&&n&&r&&i&&o&&a&&s)c=(l,c,u,d)=>{const p=e(l,c,u,d),h=t(l,c,u,d),m=n(l,c,u,d),f=r(l,c,u,d),g=i(l,c,u,d),y=o(l,c,u,d),v=a(l,c,u,d);return s(p,h,m,f,g,y,v,c,u,d)};else if(e&&t&&n&&r&&i&&o&&a)c=(s,l,c,u)=>{const d=e(s,l,c,u),p=t(s,l,c,u),h=n(s,l,c,u),m=r(s,l,c,u),f=i(s,l,c,u),g=o(s,l,c,u);return a(d,p,h,m,f,g,l,c,u)};else if(e&&t&&n&&r&&i&&o)c=(a,s,l,c)=>{const u=e(a,s,l,c),d=t(a,s,l,c),p=n(a,s,l,c),h=r(a,s,l,c),m=i(a,s,l,c);return o(u,d,p,h,m,s,l,c)};else if(e&&t&&n&&r&&i)c=(o,a,s,l)=>{const c=e(o,a,s,l),u=t(o,a,s,l),d=n(o,a,s,l),p=r(o,a,s,l);return i(c,u,d,p,a,s,l)};else if(e&&t&&n&&r)c=(i,o,a,s)=>{const l=e(i,o,a,s),c=t(i,o,a,s),u=n(i,o,a,s);return r(l,c,u,o,a,s)};else if(e&&t&&n)c=(r,i,o,a)=>{const s=e(r,i,o,a),l=t(r,i,o,a);return n(s,l,i,o,a)};else if(e&&t)c=(n,r,i,o)=>{const a=e(n,r,i,o);return t(a,r,i,o)};else{if(!e)throw new Error("Missing arguments");c=e}return c},ux=e=>e.zoom,dx=(cx(ux,e=>e.isInteracting),cx(qa,e=>Object.keys(e).length>0)),px=cx(Ga,(e,t)=>e?.get(t)),hx=cx(ux,qa,(e,t)=>e.zoomData.every(e=>{const n=e.end-e.start,r=t[e.axisId];return e.start===r.minStart&&e.end===r.maxEnd||n===r.maxSpan})),mx=cx(ux,qa,(e,t)=>e.zoomData.every(e=>e.end-e.start===t[e.axisId].minSpan)),fx=cx(ux,(e,t)=>e.zoomInteractionConfig.zoom[t]??null),gx=cx(ux,(e,t)=>e.zoomInteractionConfig.pan[t]??null),yx=(cx(qa,e=>fx(e,"brush"),(e,t)=>Object.keys(e).length>0&&t||!1),({store:t,instance:n,svgRef:r},i)=>{const o=t.use(he),a=t.use(qa),s=e.useRef(!1),l=e.useRef(null),c=t.use(fx,"wheel"),u=Object.keys(a).length>0&&Boolean(c);e.useEffect(()=>{u&&n.updateZoomInteractionListeners("zoomTurnWheel",{requiredKeys:c.requiredKeys})},[c,u,n]),e.useEffect(()=>{const e=r.current;if(null===e||!u)return()=>{};const t=rx(i),c=n.addInteractionListener("zoomTurnWheel",r=>{const i=xs(e,{clientX:r.detail.centroid.x,clientY:r.detail.centroid.y});if(s.current||!n.isPointInside(i.x,i.y))return s.current=!0,l.current&&clearTimeout(l.current),void(l.current=setTimeout(()=>{s.current=!1,l.current=null},100));r.detail.srcEvent.preventDefault(),t(e=>e.map(e=>{const t=a[e.axisId];if(!t)return e;const n="x"===t.axisDirection?ax(i,o,t.reverse):sx(i,o,t.reverse),{scaleRatio:s,isZoomIn:l}=function(e,t){const n=-e.deltaY,r=function(e){const t=e.ctrlKey?3:1;return 1===e.deltaMode?1*t:e.deltaMode?10*t:.2*t}(e),i=t*r*n/1e3;return{scaleRatio:Math.min(Math.max(1+i,.1),1.9),isZoomIn:n>0}}(r.detail.srcEvent,t.step),[c,u]=ix(n,s,e,t);return ox(c,u,l,t)?{axisId:e.axisId,start:c,end:u}:e}))});return()=>{c.cleanup(),l.current&&(clearTimeout(l.current),l.current=null),s.current=!1,t.clear()}},[r,o,u,a,n,i,t])}),vx=(e,t)=>{const n={zoom:{},pan:{}};if(n.zoom=e?.zoom?bx("zoom",e.zoom):{wheel:{type:"wheel",requiredKeys:[],mouse:{},touch:{}},pinch:{type:"pinch",requiredKeys:[],mouse:{},touch:{}}},e?.pan)n.pan=bx("pan",e.pan);else{n.pan={drag:{type:"drag",requiredKeys:[],mouse:{},touch:{}}};let e=!1,r=!1;t&&Object.values(t).forEach(t=>{"x"===t.axisDirection&&(e=!0),"y"===t.axisDirection&&(r=!0)}),e&&!r&&(n.pan.wheel={type:"wheel",requiredKeys:[],allowedDirection:"x",mouse:{},touch:{}})}return n};function bx(e,t){const n=t.reduce((e,t)=>{if("string"==typeof t)return e[t]||(e[t]=[]),e[t].push({type:t,requiredKeys:[]}),e;const n=t.type;return e[n]||(e[n]=[]),e[n].push({type:n,pointerMode:t.pointerMode,requiredKeys:t.requiredKeys,allowedDirection:t.allowedDirection}),e},{}),r={};for(const[t,i]of Object.entries(n)){const n=i.findLast(e=>!e.pointerMode),o=i.findLast(e=>"mouse"===e.pointerMode),a=i.findLast(e=>"touch"===e.pointerMode);r[t]={type:t,pointerMode:n?[]:Array.from(new Set(i.filter(e=>e.pointerMode).map(e=>e.pointerMode))),requiredKeys:n?.requiredKeys??[],mouse:o?{requiredKeys:o?.requiredKeys??[]}:{},touch:a?{requiredKeys:a?.requiredKeys??[]}:{}},"wheel"===t&&"pan"===e&&(r[t].allowedDirection=n?.allowedDirection??"x")}return r}function xx(e,t){const n=new Map;return t?.forEach(t=>{e[t.axisId]&&n.set(t.axisId,t)}),Object.values(e).map(({axisId:e,minStart:t,maxEnd:r})=>n.has(e)?n.get(e):{axisId:e,start:t,end:r})}const Ix=t=>{const{store:n,params:r}=t,{zoomData:i,onZoomChange:o,zoomInteractionConfig:a}=r,s=Og(o??(()=>{})),c=n.use(qa);!function(t,r){const i=e.useRef(!0);e.useEffect(()=>{i.current?i.current=!1:n.set("zoom",l({},n.state.zoom,{zoomInteractionConfig:vx(a,c)}))},r)}(0,[n,a,c]);const u=e.useMemo(()=>function(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}(()=>n.set("zoom",l({},n.state.zoom,{isInteracting:!1})),166),[n]);e.useEffect(()=>{void 0!==i&&(n.set("zoom",l({},n.state.zoom,{isInteracting:!0,zoomData:i})),u())},[n,i,u]);const d=e.useCallback(e=>{const t="function"==typeof e?e([...n.state.zoom.zoomData]):e;nx(n.state.zoom.zoomData,t)||(s(t),n.state.zoom.isControlled?n.set("zoom",l({},n.state.zoom,{isInteracting:!0})):(n.set("zoom",l({},n.state.zoom,{isInteracting:!0,zoomData:t})),u()))},[s,n,u]),p=e.useCallback((e,t)=>{d(n=>n.map(n=>n.axisId!==e?n:"function"==typeof t?t(n):t))},[d]),h=e.useCallback((e,t)=>{d(n=>n.map(n=>{if(n.axisId!==e)return n;const r=c[e];if(!r)return n;let i=n.start,o=n.end;if(t>0){const e=o-i;o=Math.min(o+t,r.maxEnd),i=o-e}else{const e=o-i;i=Math.max(i+t,r.minStart),o=i+e}return l({},n,{start:i,end:o})}))},[c,d]);e.useEffect(()=>()=>{u.clear()},[u]),(({store:t,instance:n,svgRef:r},i)=>{const o=t.use(he),a=t.use(qa),s=t.use(gx,"drag"),l=Object.values(a).some(e=>e.panning)&&Boolean(s);e.useEffect(()=>{l&&n.updateZoomInteractionListeners("zoomPan",{requiredKeys:s.requiredKeys,pointerMode:s.pointerMode,pointerOptions:{mouse:s.mouse,touch:s.touch}})},[l,s,n]),e.useEffect(()=>{const e=r.current;let t=!1;const s={x:0,y:0};if(null===e||!l)return()=>{};const c=rx(()=>{const e=s.x,t=s.y;s.x=0,s.y=0,i(n=>lx(n,{x:e,y:-t},{width:o.width,height:o.height},a))}),u=n.addInteractionListener("zoomPan",e=>{t&&(s.x+=e.detail.deltaX,s.y+=e.detail.deltaY,c())}),d=n.addInteractionListener("zoomPanStart",e=>{e.detail.target?.closest("[data-charts-zoom-slider]")||(t=!0)}),p=n.addInteractionListener("zoomPanEnd",()=>{t=!1});return()=>{d.cleanup(),u.cleanup(),p.cleanup(),c.clear()}},[n,r,l,a,o.width,o.height,i,t])})(t,d),(({store:t,instance:n,svgRef:r},i)=>{const o=t.use(he),a=t.use(qa),s=e.useRef(!1),l=e.useRef({x:0,y:0}),c=t.use(gx,"pressAndDrag"),u=Object.values(a).some(e=>e.panning)&&Boolean(c);e.useEffect(()=>{u&&n.updateZoomInteractionListeners("zoomPressAndDrag",{requiredKeys:c.requiredKeys,pointerMode:c.pointerMode,pointerOptions:{mouse:c.mouse,touch:c.touch}})},[u,c,n]),e.useEffect(()=>{if(null===r.current||!u)return()=>{};const e=rx(()=>{const e=l.current.x,t=l.current.y;l.current.x=0,l.current.y=0,i(n=>lx(n,{x:e,y:-t},{width:o.width,height:o.height},a))}),t=n.addInteractionListener("zoomPressAndDrag",t=>{s.current&&(l.current.x+=t.detail.deltaX,l.current.y+=t.detail.deltaY,e())}),c=n.addInteractionListener("zoomPressAndDragStart",e=>{e.detail.target?.closest("[data-charts-zoom-slider]")||(s.current=!0,l.current={x:0,y:0})}),d=n.addInteractionListener("zoomPressAndDragEnd",()=>{s.current=!1});return()=>{c.cleanup(),t.cleanup(),d.cleanup(),e.clear()}},[n,r,u,a,o.width,o.height,i,t,s])})(t,d),(({store:t,instance:n,svgRef:r},i)=>{const o=t.use(he),a=t.use(qa),s=e.useRef(!1),l=e.useRef(null),c=t.use(gx,"wheel"),u=Object.keys(a).length>0&&Boolean(c);e.useEffect(()=>{u&&n.updateZoomInteractionListeners("panTurnWheel",{requiredKeys:c.requiredKeys})},[c,u,n]),e.useEffect(()=>{const e=r.current,t={x:0,y:0};if(null===e||!u)return()=>{};const d=rx(i),p=n.addInteractionListener("panTurnWheel",r=>{const i=xs(e,{clientX:r.detail.centroid.x,clientY:r.detail.centroid.y});if(s.current||!n.isPointInside(i.x,i.y))return s.current=!0,l.current&&clearTimeout(l.current),void(l.current=setTimeout(()=>{s.current=!1,l.current=null},100));r.detail.srcEvent.preventDefault();const u=c?.allowedDirection??"x";0===r.detail.deltaX&&0===r.detail.deltaY||(t.x+=r.detail.deltaX,t.y+=r.detail.deltaY,d(e=>{const n=t.x,r=t.y;t.x=0,t.y=0;let i=0,s=0;return"x"!==u&&"xy"!==u||(i=-n),"y"!==u&&"xy"!==u||(s=r),0===i&&0===s?e:lx(e,{x:i,y:s},o,a,u)}))});return()=>{p.cleanup(),l.current&&(clearTimeout(l.current),l.current=null),s.current=!1,d.clear()}},[r,o,u,a,n,i,t,c])})(t,d),yx(t,d),(({store:t,instance:n,svgRef:r},i)=>{const o=t.use(he),a=t.use(qa),s=t.use(fx,"pinch"),l=Object.keys(a).length>0&&Boolean(s);e.useEffect(()=>{l&&n.updateZoomInteractionListeners("zoomPinch",{requiredKeys:s.requiredKeys})},[s,l,n]),e.useEffect(()=>{const e=r.current;if(null===e||!l)return()=>{};const t=rx(t=>{0!==t.detail.direction&&i(n=>n.map(n=>{const r=a[n.axisId];if(!r)return n;const i=t.detail.direction>0,s=1+t.detail.deltaScale,l=xs(e,{clientX:t.detail.centroid.x,clientY:t.detail.centroid.y}),c="x"===r.axisDirection?ax(l,o,r.reverse):sx(l,o,r.reverse),[u,d]=ix(c,s,n,r);return ox(u,d,i,r)?{axisId:n.axisId,start:u,end:d}:n}))}),s=n.addInteractionListener("zoomPinch",t);return()=>{s.cleanup(),t.clear()}},[r,o,l,a,t,n,i])})(t,d),(({store:t,instance:n,svgRef:r},i)=>{const o=t.use(he),a=t.use(qa),s=t.use(fx,"tapAndDrag"),l=Object.keys(a).length>0&&Boolean(s);e.useEffect(()=>{l&&n.updateZoomInteractionListeners("zoomTapAndDrag",{requiredKeys:s.requiredKeys,pointerMode:s.pointerMode,pointerOptions:{mouse:s.mouse,touch:s.touch}})},[s,l,n]),e.useEffect(()=>{const e=r.current;if(null===e||!l)return()=>{};const t=rx(t=>{0!==t.detail.deltaY&&i(n=>n.map(n=>{const r=a[n.axisId];if(!r)return n;const i=t.detail.deltaY>0,s=1+t.detail.deltaY/100,l=xs(e,{clientX:t.detail.initialCentroid.x,clientY:t.detail.initialCentroid.y}),c="x"===r.axisDirection?ax(l,o,r.reverse):sx(l,o,r.reverse),[u,d]=ix(c,s,n,r);return ox(u,d,i,r)?{axisId:n.axisId,start:u,end:d}:n}))}),s=n.addInteractionListener("zoomTapAndDrag",t);return()=>{s.cleanup(),t.clear()}},[r,o,l,a,t,n,i])})(t,d),(({store:t,instance:n,svgRef:r},i)=>{const o=t.use(he),a=t.use(qa),s=t.use(fx,"brush"),l=Object.keys(a).length>0&&Boolean(s);e.useEffect(()=>{n.setZoomBrushEnabled(l)},[l,n]),e.useEffect(()=>{const e=r.current;if(null===e||!l)return()=>{};const t=n.addInteractionListener("brushEnd",t=>{i(n=>{const r=xs(e,{clientX:t.detail.initialCentroid.x,clientY:t.detail.initialCentroid.y}),i=xs(e,{clientX:t.detail.centroid.x,clientY:t.detail.centroid.y}),s=Math.min(r.x,i.x),l=Math.max(r.x,i.x),c=Math.min(r.y,i.y),u=Math.max(r.y,i.y);return n.map(e=>{const t=a[e.axisId];if(!t)return e;let n,r;const i=t.reverse;"x"===t.axisDirection?(n=ax({x:s,y:0},o,i),r=ax({x:l,y:0},o,i)):(n=sx({x:0,y:u},o,i),r=sx({x:0,y:c},o,i));const d=Math.min(n,r),p=Math.max(n,r),h=e.start,m=e.end-h,f=h+d*m,g=h+p*m,y=Math.max(t.minStart,Math.min(t.maxEnd,f)),v=Math.max(t.minStart,Math.min(t.maxEnd,g));return ox(y,v,!0,t)?{axisId:e.axisId,start:y,end:v}:e})})});return()=>{t.cleanup()}},[r,o,l,a,n,i,t])})(t,d),(({store:t,instance:n,svgRef:r},i)=>{const o=t.use(qa),a=t.use(fx,"doubleTapReset"),s=Object.keys(o).length>0&&Boolean(a);e.useEffect(()=>{s&&n.updateZoomInteractionListeners("zoomDoubleTapReset",{requiredKeys:a.requiredKeys,pointerMode:a.pointerMode,pointerOptions:{mouse:a.mouse,touch:a.touch}})},[a,s,n]),e.useEffect(()=>{if(null===r.current||!s)return()=>{};const e=n.addInteractionListener("zoomDoubleTapReset",()=>{i(e=>e.map(e=>{const t=o[e.axisId];return t?{axisId:e.axisId,start:t.minStart,end:t.maxEnd}:e}))});return()=>{e.cleanup()}},[r,s,o,n,i,t])})(t,d);const m=e.useCallback(e=>{d(t=>t.map(t=>{const r=Xa(n.state,t.axisId);return function(e,t,{minSpan:n,maxSpan:r,minStart:i,maxEnd:o}){const a=e.end-e.start;let s=a*t/2;return s=s>0?Math.min(s,(a-n)/2):Math.max(s,(a-r)/2),l({},e,{start:Math.max(i,e.start+s),end:Math.min(o,e.end-s)})}(t,e,r)}))},[d,n]),f=e.useCallback(()=>m(.1),[m]),g=e.useCallback(()=>m(-.1),[m]);return{publicAPI:{setZoomData:d,setAxisZoomData:p,zoomIn:f,zoomOut:g},instance:{setZoomData:d,setAxisZoomData:p,moveZoomRange:h,zoomIn:f,zoomOut:g}}};Ix.params={initialZoom:!0,onZoomChange:!0,zoomData:!0,zoomInteractionConfig:!0},Ix.getInitialState=e=>{const{initialZoom:t,zoomData:n,defaultizedXAxis:r,defaultizedYAxis:i}=e,o=l({},Ia("x")(r),Ia("y")(i));return{zoom:{zoomData:xx(o,void 0!==n?n:void 0!==t?t:void 0),isInteracting:!1,isControlled:void 0!==n,zoomInteractionConfig:vx(e.zoomInteractionConfig,o)}}};const wx=[Xs,Mb,Ys,Ws,Bs,Zs,Bb,Ix,tx],kx=({params:t,store:n,svgRef:r})=>{const i=ke(function(){null!==n.state.keyboardNavigation.item&&n.set("keyboardNavigation",l({},n.state.keyboardNavigation,{item:null}))});return e.useEffect(()=>{const e=r.current;if(e&&t.enableKeyboardNavigation)return e.addEventListener("keydown",o),e.addEventListener("blur",i),()=>{e.removeEventListener("keydown",o),e.removeEventListener("blur",i)};function o(e){let t=n.state.keyboardNavigation.item,r=t?.type;if(!r&&(r=Object.keys(pt(n.state)).find(e=>void 0!==n.state.series.seriesConfig[e]),void 0===r))return;const i=n.state.series.seriesConfig[r]?.keyboardFocusHandler?.(e);i&&(t=i(t,n.state),t!==n.state.keyboardNavigation.item&&(e.preventDefault(),n.update(l({},n.state.highlight&&{highlight:l({},n.state.highlight,{lastUpdate:"keyboard"})},n.state.interaction&&{interaction:l({},n.state.interaction,{lastUpdate:"keyboard"})},{keyboardNavigation:l({},n.state.keyboardNavigation,{item:t})}))))}},[r,i,t.enableKeyboardNavigation,n]),V(()=>{n.state.keyboardNavigation.enableKeyboardNavigation!==t.enableKeyboardNavigation&&n.set("keyboardNavigation",l({},n.state.keyboardNavigation,{enableKeyboardNavigation:!!t.enableKeyboardNavigation}))},[n,t.enableKeyboardNavigation]),{}};function Sx(e,t,n,r,i,o,a,s,l,c,u=1/0,d=1){const p=n.copy(),h=r.copy();p.range([0,1]),h.range([0,1]);const m=n.range()[1]-n.range()[0],f=r.range()[1]-r.range()[0],g=m*m,y=f*f,v=p(Mx(n,l,e=>t[e]?.x)),b=h(Mx(r,c,e=>t[e]?.y));return e.neighbors(v,b,d,null!=u?u*u:1/0,function(e){const n=p(t[e].x),r=h(t[e].y);return n>=i&&n<=o&&r>=a&&r<=s},function(e,t){return g*e*e+y*t*t})}function Mx(e,t,n){return fa(e)?n(0===e.bandwidth()?Math.floor((t-Math.min(...e.range())+e.step()/2)/e.step()):Math.floor((t-Math.min(...e.range()))/e.step())):e.invert(t)}kx.getInitialState=e=>({keyboardNavigation:{item:null,enableKeyboardNavigation:!!e.enableKeyboardNavigation}}),kx.params={enableKeyboardNavigation:!0};const Cx=({svgRef:t,params:n,store:r,instance:i})=>{const{disableVoronoi:o,voronoiMaxRadius:a,onItemClick:s}=n,{axis:l,axisIds:c}=r.use(ls),{axis:u,axisIds:d}=r.use(cs),p=r.use(Wa),{series:h,seriesOrder:m}=r.use(ft)?.scatter??{},f=r.use(p?fs:gs),g=c[0],y=d[0];return V(()=>{r.set("voronoi",{isVoronoiEnabled:!o})},[r,o]),e.useEffect(()=>{if(null===t.current||o)return;const e=t.current;function n(t){const n=xs(e,t);if(!i.isPointInside(n.x,n.y))return"outside-chart";let o;for(const e of m??[]){const t=(h??{})[e],i=f.get(e);if(!i)continue;const s=t.xAxisId??g,c=t.yAxisId??y,d=Ka(r.state,s),p=Ka(r.state,c),m="item"===a?t.markerSize:a,v=(d?.start??0)/100,b=(d?.end??100)/100,x=(p?.start??0)/100,I=(p?.end??100)/100,w=l[s].scale,k=u[c].scale,S=Sx(i,t.data,w,k,v,b,x,I,n.x,n.y,m)[0];if(void 0===S)continue;const M=t.data[S],C=w(M.x),P=k(M.y),E=(C-n.x)**2+(P-n.y)**2;(void 0===o||E{e.detail.activeGestures.pan||(i.cleanInteraction?.(),i.clearHighlight?.(),i.removeTooltipItem?.())}),d=i.addInteractionListener("panEnd",e=>{e.detail.activeGestures.move||(i.cleanInteraction?.(),i.clearHighlight?.(),i.removeTooltipItem?.())}),p=i.addInteractionListener("quickPressEnd",e=>{e.detail.activeGestures.move||e.detail.activeGestures.pan||(i.cleanInteraction?.(),i.clearHighlight?.(),i.removeTooltipItem?.())}),v=e=>{const t=n(e.detail.srcEvent);if("outside-chart"===t)return i.cleanInteraction?.(),i.clearHighlight?.(),void i.removeTooltipItem?.();if("outside-voronoi-max-radius"===t||"no-point-found"===t)return i.removeTooltipItem?.(),i.clearHighlight?.(),void i.removeTooltipItem?.();const{seriesId:r,dataIndex:o}=t;i.setTooltipItem?.({type:"scatter",seriesId:r,dataIndex:o}),i.setLastUpdateSource?.("pointer"),i.setHighlight?.({seriesId:r,dataIndex:o})},b=i.addInteractionListener("tap",e=>{const t=n(e.detail.srcEvent);if("string"!=typeof t&&s){const{seriesId:n,dataIndex:r}=t;s(e.detail.srcEvent,{type:"scatter",seriesId:n,dataIndex:r})}}),x=i.addInteractionListener("move",v),I=i.addInteractionListener("pan",v),w=i.addInteractionListener("quickPress",v);return()=>{b.cleanup(),x.cleanup(),c.cleanup(),I.cleanup(),d.cleanup(),w.cleanup(),p.cleanup()}},[t,u,l,a,s,o,i,m,h,f,g,y,r]),{instance:{enableVoronoi:ke(()=>{r.set("voronoi",{isVoronoiEnabled:!0})}),disableVoronoi:ke(()=>{r.set("voronoi",{isVoronoiEnabled:!1})})}}};Cx.getDefaultizedParams=({params:e})=>l({},e,{disableVoronoi:e.disableVoronoi??!e.series.some(e=>"scatter"===e.type)}),Cx.getInitialState=e=>({voronoi:{isVoronoiEnabled:!e.disableVoronoi}}),Cx.params={disableVoronoi:!0,voronoiMaxRadius:!0,onItemClick:!0};const Px=[Xs,Mb,Ys,Ws,Bs,Zs,Bb,Cx,kx],Ex=["children","localeText","plugins","seriesConfig","slots","slotProps"],Tx=e=>{const t=Lh({props:e,name:"MuiChartDataProvider"}),{children:n,localeText:r,plugins:i=Px,seriesConfig:o,slots:a,slotProps:s}=t,c=tt(t,Ex);return{children:n,localeText:r,chartProviderProps:{plugins:i,seriesConfig:o,pluginParams:l({theme:xm().palette.mode},c)},slots:a,slotProps:s}},Ax=e=>{const{chartProviderProps:t,localeText:n,slots:r,slotProps:i,children:o}=Tx(e);return{children:o,localeText:n,chartProviderProps:t,slots:r,slotProps:i}},Ox="MTc2NzgzMDQwMDAwMA==",jx="x-charts-pro",Lx=rc;function Rx(e){const{children:t,localeText:n,chartProviderProps:r,slots:i,slotProps:o}=Ax(l({},e,{seriesConfig:e.seriesConfig??Lx,plugins:e.plugins??wx}));return A(jx,Ox),(0,O.jsxs)(oc,l({},r,{children:[(0,O.jsx)(_h,{localeText:n,children:(0,O.jsx)(lc,{slots:i,slotProps:o,defaultSlots:db,children:t})}),(0,O.jsx)(L,{packageName:jx,releaseInfo:Ox})]}))}function Dx(...t){const n=e.useRef(void 0),r=e.useCallback(e=>{const n=t.map(t=>{if(null==t)return null;if("function"==typeof t){const n=t,r=n(e);return"function"==typeof r?r:()=>{n(null)}}return t.current=e,()=>{t.current=null}});return()=>{n.forEach(e=>e?.())}},t);return e.useMemo(()=>t.every(e=>null==e)?null:e=>{n.current&&(n.current(),n.current=void 0),null!=e&&(n.current=r(e))},t)}const $x=()=>{const t=e.useContext(ot);if(null==t)throw new Error(["MUI X Charts: Could not find the Chart context.","It looks like you rendered your component outside of a ChartDataProvider.","This can also happen if you are bundling multiple versions of the library."].join("\n"));return t};function zx(){const e=$x();if(!e)throw new Error(["MUI X Charts: Could not find the charts context.","It looks like you rendered your component outside of a ChartContainer parent component."].join("\n"));return e.store}function Nx(){return zx().use(he)}function _x(){const e=zx(),{axis:t,axisIds:n}=e.use(ls);return{xAxis:t,xAxisIds:n}}function Fx(){const e=zx(),{axis:t,axisIds:n}=e.use(cs);return{yAxis:t,yAxisIds:n}}function Hx(e){const t=zx(),{axis:n,axisIds:r}=t.use(ls);return n[e??r[0]]}function Bx(e){const t=zx(),{axis:n,axisIds:r}=t.use(cs);return n[e??r[0]]}function Vx(){const e=zx(),{axis:t,axisIds:n}=e.use(jb);return{rotationAxis:t,rotationAxisIds:n}}function Ux(t){const{isReversed:n,gradientId:r,size:i,direction:o,scale:a,colorMap:s}=t;return i<=0?null:(0,O.jsx)("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${o}${n?1:2}`]:`${i}px`,gradientUnits:"userSpaceOnUse",children:s.thresholds.map((t,r)=>{const o=a(t);if(void 0===o)return null;const l=n?1-o/i:o/i;return Number.isNaN(l)?null:(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)("stop",{offset:l,stopColor:s.colors[r],stopOpacity:1}),(0,O.jsx)("stop",{offset:l,stopColor:s.colors[r+1],stopOpacity:1})]},t.toString()+r)})})}function Yx(e){const{gradientUnits:t,isReversed:n,gradientId:r,size:i,direction:o,scale:a,colorScale:s,colorMap:l}=e,c=[l.min??0,l.max??100],u=c.map(a).filter(e=>void 0!==e);if(2!==u.length)return null;const d="number"==typeof c[0]?Tn(c[0],c[1]):En(c[0],c[1]),p=Math.round((Math.max(...u)-Math.min(...u))/10),h=`${c[0]}-${c[1]}-`;return(0,O.jsx)("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${o}${n?1:2}`]:"objectBoundingBox"===t?1:`${i}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:p+1},(e,t)=>{const r=d(t/p);if(void 0===r)return null;const o=a(r);if(void 0===o)return null;const l=n?1-o/i:o/i,c=s(r);return null===c?null:(0,O.jsx)("stop",{offset:l,stopColor:c,stopOpacity:1},h+t)})})}function Wx(e){const{isReversed:t,gradientId:n,colorScale:r,colorMap:i}=e,o=[i.min??0,i.max??100],a="number"==typeof o[0]?Tn(o[0],o[1]):En(o[0],o[1]),s=`${o[0]}-${o[1]}-`;return(0,O.jsx)("linearGradient",l({id:n},(e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"})(t),{gradientUnits:"objectBoundingBox",children:Array.from({length:11},(e,t)=>{const n=t/10,i=a(n);if(void 0===i)return null;const o=r(i);return null===o?null:(0,O.jsx)("stop",{offset:n,stopColor:o,stopOpacity:1},s+t)})}))}const Gx=ae(e=>e,e=>e.zAxis);function Kx(){const e=zx(),{axis:t,axisIds:n}=e.use(Gx)??{axis:{},axisIds:[]};return{zAxis:t,zAxisIds:n}}const qx=ae(e=>e.id,e=>e.chartId);function Xx(){return zx().use(qx)}function Zx(){const t=Xx();return e.useCallback(e=>`${t}-gradient-${e}`,[t])}function Jx(){const t=Xx();return e.useCallback(e=>`${t}-gradient-${e}-object-bound`,[t])}function Qx(){const{top:t,height:n,bottom:r,left:i,width:o,right:a}=Nx(),s=t+n+r,l=i+o+a,c=Zx(),u=Jx(),{xAxis:d,xAxisIds:p}=_x(),{yAxis:h,yAxisIds:m}=Fx(),{zAxis:f,zAxisIds:g}=Kx(),y=m.filter(e=>void 0!==h[e].colorMap),v=p.filter(e=>void 0!==d[e].colorMap),b=g.filter(e=>void 0!==f[e].colorMap);return 0===y.length&&0===v.length&&0===b.length?null:(0,O.jsxs)("defs",{children:[y.map(t=>{const n=c(t),r=u(t),{colorMap:i,scale:o,colorScale:a,reverse:l}=h[t];return"piecewise"===i?.type?(0,O.jsx)(Ux,{isReversed:!l,scale:o,colorMap:i,size:s,gradientId:n,direction:"y"},n):"continuous"===i?.type?(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(Yx,{isReversed:!l,scale:o,colorScale:a,colorMap:i,size:s,gradientId:n,direction:"y"}),(0,O.jsx)(Wx,{isReversed:l,colorScale:a,colorMap:i,gradientId:r})]},n):null}),v.map(t=>{const n=c(t),r=u(t),{colorMap:i,scale:o,reverse:a,colorScale:s}=d[t];return"piecewise"===i?.type?(0,O.jsx)(Ux,{isReversed:a,scale:o,colorMap:i,size:l,gradientId:n,direction:"x"},n):"continuous"===i?.type?(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(Yx,{isReversed:a,scale:o,colorScale:s,colorMap:i,size:l,gradientId:n,direction:"x"}),(0,O.jsx)(Wx,{isReversed:a,colorScale:s,colorMap:i,gradientId:r})]},n):null}),b.map(e=>{const t=u(e),{colorMap:n,colorScale:r}=f[e];return"continuous"===n?.type?(0,O.jsx)(Wx,{colorScale:r,colorMap:n,gradientId:t},t):null})]})}function eI(){const e=$x();if(!e)throw new Error(["MUI X Charts: Could not find the svg ref context.","It looks like you rendered your component outside of a ChartContainer parent component."].join("\n"));return e.svgRef}const tI=e=>e.keyboardNavigation,nI=ae(tI,(e,t)=>null!=e?.item&&Us(e.item,t)),rI=ae(tI,e=>null!=e?.item),iI=ae(tI,e=>e?.item??null),oI=ae(tI,e=>!!e?.enableKeyboardNavigation),aI=e=>(t,n,r)=>{if(null==t||!("dataIndex"in t)||void 0===t.dataIndex)return;const i=r[t.type]?.series[t.seriesId];if(!i)return;let o="x"===e?"xAxisId"in i&&i.xAxisId:"yAxisId"in i&&i.yAxisId;return void 0!==o&&!1!==o||(o=n.axisIds[0]),{axisId:o,dataIndex:t.dataIndex}},sI=ae(iI,ls,ft,aI("x")),lI=ae(iI,cs,ft,aI("y")),cI=ae(tI,function(e){if(null==e?.item)return null;const{type:t,seriesId:n}=e.item;return void 0===t||void 0===n?null:e.item});function uI(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let e=0;e({width:e.width??"100%",height:e.height??"100%",display:"flex",position:"relative",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",touchAction:e.hasZoom?"pan-y":void 0,userSelect:"none",gridArea:"chart","&:focus":{outline:"none"}})),mI=e.forwardRef(function(e,t){const n=zx(),r=n.use(me),i=n.use(fe),o=n.use(ge),a=n.use(ye),s=n.use(oI),c=n.use(rI),u=n.use(Ya),d=Dx(eI(),t),p=Lh({props:e,name:"MuiChartsSurface"}),{children:h,className:m,title:f,desc:g}=p,y=tt(p,pI),v=uI({root:["root"]},dI),b=i>0&&r>0;return(0,O.jsxs)(hI,l({ownerState:{width:o,height:a,hasZoom:u},viewBox:`0 0 ${r} ${i}`,className:Hh(v.root,m),tabIndex:s?0:void 0,"data-has-focused-item":c||void 0},y,{ref:d,children:[f&&(0,O.jsx)("title",{children:f}),g&&(0,O.jsx)("desc",{children:g}),(0,O.jsx)(Qx,{}),b&&h]}))}),fI=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t},gI=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=Hh(n?.className,o,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},a={...n,...i,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}({...i,...r}),s=fI(r),l=fI(i),c=t(a),u=Hh(c?.className,n?.className,o,i?.className,r?.className),d={...c?.style,...n?.style,...i?.style,...r?.style},p={...c,...n,...l,...s};return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}},yI=function(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,a=i?{}:function(e,t,n){return"function"==typeof e?e(t,n):e}(n,r),{props:s,internalRef:l}=gI({...o,externalSlotProps:a});return function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(t,{...s,ref:Dx(l,a?.ref,e.additionalProps?.ref)},r)};function vI(e){"hasPointerCapture"in e.currentTarget&&e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId)}const bI=(t,n)=>{const{instance:r}=$x(),i=e.useRef(!1),o=ke(()=>{i.current=!0,r.setLastUpdateSource("pointer"),r.setTooltipItem(t),r.setHighlight("sankey"===t.type?t:{seriesId:t.seriesId,dataIndex:t.dataIndex})}),a=ke(()=>{i.current=!1,r.removeTooltipItem(t),r.clearHighlight()});return e.useEffect(()=>()=>{i.current&&a()},[a]),e.useMemo(()=>n?{}:{onPointerEnter:o,onPointerLeave:a,onPointerDown:vI},[n,o,a])};function xI(){return!1}function II(e,t){return e&&t?function(n){return!!n&&("series"===e.highlight||"item"===e.highlight&&n.dataIndex===t.dataIndex)&&n.seriesId===t.seriesId}:xI}function wI(){return!1}function kI(e,t){return e&&t?function(n){return!!n&&("series"===e.fade?n.seriesId===t.seriesId&&n.dataIndex!==t.dataIndex:"global"===e.fade&&(n.seriesId!==t.seriesId||n.dataIndex!==t.dataIndex))}:wI}function SI(e,t,n){return"series"===e?.highlight&&t?.seriesId===n}function MI(e,t,n){return"item"===e?.highlight&&t?.seriesId===n?t.dataIndex:null}const CI=ae(ft,e=>{const t=new Map;return Object.keys(e).forEach(n=>{const r=e[n];r?.seriesOrder?.forEach(e=>{const n=r?.series[e];t.set(e,n?.highlightScope)})}),t}),PI=le(e=>e.highlight,cI,function(e,t){return e.isControlled||"pointer"===e.lastUpdate?e.item:t}),EI=ae(CI,PI,function(e,t){if(!t)return null;const n=e.get(t.seriesId);return void 0===n?null:n}),TI=le(EI,PI,II),AI=le(EI,PI,kI),OI=ae(EI,PI,function(e,t,n){return II(e,t)(n)}),jI=ae(EI,PI,SI),LI=ae(EI,PI,function(e,t,n){return!SI(e,t,n)&&("global"===e?.fade&&null!=t||"series"===e?.fade&&t?.seriesId===n)}),RI=ae(EI,PI,function(e,t,n){return SI(e,t,n)||MI(e,t,n)===t?.dataIndex||"series"!==e?.fade&&"global"!==e?.fade||t?.seriesId!==n?null:t.dataIndex}),DI=ae(EI,PI,MI),$I=ae(EI,PI,function(e,t,n){return kI(e,t)(n)});function zI(e){const t=zx(),n=t.use(OI,e),r=t.use($I,e);return{isHighlighted:n,isFaded:!n&&r}}var NI=a(9853);const _I=300,FI="cubic-bezier(0.66, 0, 0.34, 1)",HI=NI(.66,0,.34,1);var BI,VI,UI=0,YI=0,WI=0,GI=0,KI=0,qI=0,XI="object"==typeof performance&&performance.now?performance:Date,ZI="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function JI(){return KI||(ZI(QI),KI=XI.now()+qI)}function QI(){KI=0}function ew(){this._call=this._time=this._next=null}function tw(e,t,n){var r=new ew;return r.restart(e,t,n),r}function nw(){KI=(GI=XI.now())+qI,UI=YI=0;try{!function(){JI(),++UI;for(var e,t=BI;t;)(e=KI-t._time)>=0&&t._call.call(void 0,e),t=t._next;--UI}()}finally{UI=0,function(){for(var e,t,n=BI,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:BI=t);VI=e,iw(r)}(),KI=0}}function rw(){var e=XI.now(),t=e-GI;t>1e3&&(qI-=t,GI=e)}function iw(e){UI||(YI&&(YI=clearTimeout(YI)),e-KI>24?(e<1/0&&(YI=setTimeout(nw,e-XI.now()-qI)),WI&&(WI=clearInterval(WI))):(WI||(GI=XI.now(),WI=setInterval(rw,1e3)),UI=1,ZI(nw)))}ew.prototype=tw.prototype={constructor:ew,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?JI():+n)+(null==t?0:+t),this._next||VI===this||(VI?VI._next=this:BI=this,VI=this),this._call=e,this._time=n,iw()},stop:function(){this._call&&(this._call=null,this._time=1/0,iw())}};class ow{elapsed=0;timer=null;constructor(e,t,n){this.duration=e,this.easingFn=t,this.onTickCallback=n,this.resume()}get running(){return null!==this.timer}timerCallback(e){this.elapsed=Math.min(e,this.duration);const t=0===this.duration?1:this.elapsed/this.duration,n=this.easingFn(t);this.onTickCallback(n),this.elapsed>=this.duration&&this.stop()}resume(){if(this.running||this.elapsed>=this.duration)return this;const e=JI()-this.elapsed;return this.timer=tw(e=>this.timerCallback(e),0,e),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),e=()=>this.timerCallback(this.duration),n=new ew,t=null==t?0:+t,n.restart(t=>{n.stop(),e()},t,void 0),this;var e,t,n}}function aw(t,{createInterpolator:n,transformProps:r,applyProps:i,skip:o,initialProps:a=t,ref:s}){const c=r??(e=>e),[u,d]=function(t,{createInterpolator:n,applyProps:r,skip:i,initialProps:o=t}){const a=e.useRef(o),s=e.useRef(null),l=e.useRef(null),c=e.useRef(t);V(()=>{c.current=t},[t]),V(()=>{i&&(s.current?.finish(),s.current=null,l.current=null,a.current=t)},[t,i]);const u=e.useCallback(e=>{const i=a.current,o=n(i,t);s.current=new ow(_I,HI,t=>{const n=o(t);a.current=n,r(e,n)})},[r,n,t]),d=e.useCallback(e=>{if(null===e)return void s.current?.stop();const n=l.current;if(n===e){if(function(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;ri(e,c(t)),skip:o});return l({},r(o?t:d),{ref:Dx(u,s)})}function sw(e){return e.replace(" ","_")}const lw=Zb("MuiAppearingMask",["animate"]),cw=bm("rect",{slot:"internal",shouldForwardProp:void 0})({animationName:"animate-width",animationTimingFunction:FI,animationDuration:"0s",[`&.${lw.animate}`]:{animationDuration:`${_I}ms`},"@keyframes animate-width":{from:{width:0}}});function uw(t){const n=Nx(),r=sw(`${Xx()}-${t.id}`);return(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)("clipPath",{id:r,children:(0,O.jsx)(cw,{className:t.skipAnimation?"":lw.animate,x:0,y:0,width:n.left+n.width+n.right,height:n.top+n.height+n.bottom})}),(0,O.jsx)("g",{clipPath:`url(#${r})`,children:t.children})]})}const dw=["skipAnimation","ownerState"];function pw(e){const{skipAnimation:t,ownerState:n}=e,r=tt(e,dw),i=function(e){return aw({d:e.d},{createInterpolator:(e,t)=>{const n=Ln(e.d,t.d);return e=>({d:n(e)})},applyProps:(e,{d:t})=>e.setAttribute("d",t),transformProps:e=>e,skip:e.skipAnimation,ref:e.ref})}(e);return(0,O.jsx)(uw,{skipAnimation:t,id:`${n.id}-area-clip`,children:(0,O.jsx)("path",l({fill:n.gradientId?`url(#${n.gradientId})`:n.color,filter:n.isHighlighted?"brightness(140%)":n.gradientId?void 0:"brightness(120%)",opacity:n.isFaded?.3:1,stroke:"none","data-series":n.id,"data-highlighted":n.isHighlighted||void 0,"data-faded":n.isFaded||void 0},r,i))})}const hw=["id","classes","color","gradientId","slots","slotProps","onClick"];function mw(e){return Xb("MuiAreaElement",e)}const fw=Zb("MuiAreaElement",["root","highlighted","faded","series"]),gw=e=>{const{classes:t,id:n,isFaded:r,isHighlighted:i}=e;return uI({root:["root",`series-${n}`,i&&"highlighted",r&&"faded"]},mw,t)};function yw(e){const{id:t,classes:n,color:r,gradientId:i,slots:o,slotProps:a,onClick:s}=e,c=tt(e,hw),u=bI({type:"line",seriesId:t}),{isFaded:d,isHighlighted:p}=zI({seriesId:t}),h={id:t,classes:n,color:r,gradientId:i,isFaded:d,isHighlighted:p},m=gw(h),f=o?.area??pw,g=yI({elementType:f,externalSlotProps:a?.area,additionalProps:l({},u,{onClick:s,cursor:s?"pointer":"unset"}),className:m.root,ownerState:h});return(0,O.jsx)(f,l({},c,g))}const vw=ae(e=>e.animation,e=>e.skip||e.skipAnimationRequests>0);function bw(e){const t=zx().use(vw);return e||t}function xw(){return zx().use(Wa)}function Iw(e){this._context=e}function ww(e){return new Iw(e)}Iw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};const kw=Math.PI,Sw=2*kw,Mw=1e-6,Cw=Sw-Mw;function Pw(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Pw;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;tMw)if(Math.abs(u*s-l*c)>Mw&&i){let p=n-o,h=r-a,m=s*s+l*l,f=p*p+h*h,g=Math.sqrt(m),y=Math.sqrt(d),v=i*Math.tan((kw-Math.acos((m+d-f)/(2*g*y)))/2),b=v/y,x=v/g;Math.abs(b-1)>Mw&&this._append`L${e+b*c},${t+b*u}`,this._append`A${i},${i},0,0,${+(u*p>c*h)},${this._x1=e+x*s},${this._y1=t+x*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,i,o){if(e=+e,t=+t,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Mw||Math.abs(this._y1-c)>Mw)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%Sw+Sw),d>Cw?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>Mw&&this._append`A${n},${n},0,${+(d>=kw)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Tw(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Ew(t)}function Aw(e){return e[0]}function Ow(e){return e[1]}function jw(e,t){var n=rl(!0),r=null,i=ww,o=null,a=Tw(s);function s(s){var l,c,u,d=(s=nl(s)).length,p=!1;for(null==r&&(o=i(u=a())),l=0;l<=d;++l)!(l=d;--p)s.point(y[p],v[p]);s.lineEnd(),s.areaEnd()}g&&(y[u]=+e(h,u,c),v[u]=+t(h,u,c),s.point(r?+r(h,u,c):y[u],n?+n(h,u,c):v[u]))}if(m)return s=null,m+""||null}function u(){return jw().defined(i).curve(a).context(o)}return e="function"==typeof e?e:void 0===e?Aw:rl(+e),t="function"==typeof t?t:rl(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?Ow:rl(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:rl(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:rl(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:rl(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:rl(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:rl(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:rl(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(i="function"==typeof e?e:rl(!!e),c):i},c.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),c):a},c.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),c):o},c}function Rw(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Dw(e,t){this._context=e,this._k=(1-t)/6}function $w(e,t){this._context=e,this._alpha=t}Ew.prototype,Dw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Rw(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Rw(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},function e(t){function n(e){return new Dw(e,t)}return n.tension=function(t){return e(+t)},n}(0),$w.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>Kl){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Kl){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const zw=function e(t){function n(e){return t?new $w(e,t):new Dw(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Nw(e){return e<0?-1:1}function _w(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Nw(o)+Nw(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Fw(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Hw(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Bw(e){this._context=e}function Vw(e){this._context=new Uw(e)}function Uw(e){this._context=e}function Yw(e){return new Bw(e)}function Ww(e){return new Vw(e)}function Gw(e){this._context=e}function Kw(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};class ek{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function tk(e){return new ek(e,!0)}function nk(e){return new ek(e,!1)}function rk(e){switch(e){case"catmullRom":return zw.alpha(.5);case"linear":return ww;case"monotoneX":default:return Yw;case"monotoneY":return Ww;case"natural":return qw;case"step":return Zw;case"stepBefore":return Jw;case"stepAfter":return Qw;case"bumpY":return nk;case"bumpX":return tk}}const ik=ae(ft,(e,t)=>e[t]),ok=le(ft,(e,t,n)=>{if(void 0===n||Array.isArray(n)&&0===n.length)return e[t]?.seriesOrder?.map(n=>e[t]?.series[n])??[];if(!Array.isArray(n))return e[t]?.series?.[n];const r=[],i=[];for(const o of n){const n=e[t]?.series?.[o];n?r.push(n):i.push(o)}return r}),ak=e=>zx().use(ik,e),sk=(e,t)=>zx().use(ok,e,t);function lk(){return ak("line")}function ck(e){if(fa(e))return t=>(e(t)??0)+e.bandwidth()/2;const t=e.domain();return t[0]===t[1]?n=>n===t[0]?e(n):NaN:t=>e(t)}function uk(e){return Hx(e).scale}function dk(e){return Bx(e).scale}function pk(t,n){const r=lk(),i=_x().xAxisIds[0],o=Fx().yAxisIds[0],a=Zx(),s=e.useMemo(()=>{if(void 0===r)return[];const{series:e,stackingGroups:s}=r,l=[];for(const r of s){const s=r.ids;for(let r=s.length-1;r>=0;r-=1){const c=s[r],{xAxisId:u=i,yAxisId:d=o,stackedData:p,data:h,connectNulls:m,baseline:f,curve:g,strictStepCurve:y,area:v}=e[c];if(!v||!(u in t)||!(d in n))continue;const b=t[u].scale,x=ck(b),I=n[d].scale,w=t[u].data,k=n[d].colorScale&&a(d)||t[u].colorScale&&a(u)||void 0,S=g?.includes("step")&&!y&&fa(b),M=w?.flatMap((e,t)=>{const n=null==h[t];if(S){const r=[{x:e,y:p[t],nullData:n,isExtension:!1}];return n||0!==t&&null!=h[t-1]||r.unshift({x:(b(e)??0)-(b.step()-b.bandwidth())/2,y:p[t],nullData:n,isExtension:!0}),n||t!==h.length-1&&null!=h[t+1]||r.push({x:(b(e)??0)+(b.step()+b.bandwidth())/2,y:p[t],nullData:n,isExtension:!0}),r}return{x:e,y:p[t],nullData:n}})??[],C=m?M.filter(e=>!e.nullData):M,P=Lw().x(e=>e.isExtension?e.x:x(e.x)).defined(e=>m||!e.nullData||!!e.isExtension).y0(e=>{if("number"==typeof f)return I(f);if("max"===f)return I.range()[1];if("min"===f)return I.range()[0];const t=e.y&&I(e.y[0]);return Number.isNaN(t)?I.range()[0]:t}).y1(e=>e.y&&I(e.y[1])),E=P.curve(rk(g))(C)||"";l.push({area:e[c].area,color:e[c].color,gradientId:k,d:E,seriesId:c})}}return l},[r,i,o,t,n,a]);return s}const hk=["slots","slotProps","onItemClick","skipAnimation"],mk=bm("g",{name:"MuiAreaPlot",slot:"Root"})({[`& .${fw.root}`]:{transitionProperty:"opacity, fill",transitionDuration:`${_I}ms`,transitionTimingFunction:FI}}),fk=()=>{const{xAxis:e}=_x(),{yAxis:t}=Fx();return pk(e,t)};function gk(e){const{slots:t,slotProps:n,onItemClick:r,skipAnimation:i}=e,o=tt(e,hk),a=bw(xw()||i),s=fk();return(0,O.jsx)(mk,l({},o,{children:s.map(({d:e,seriesId:i,color:o,area:s,gradientId:l})=>!!s&&(0,O.jsx)(yw,{id:i,d:e,color:o,gradientId:l,slots:t,slotProps:n,onClick:r&&(e=>r(e,{type:"line",seriesId:i})),skipAnimation:a},i))}))}const yk=["skipAnimation","ownerState"],vk=e.forwardRef(function(e,t){const{skipAnimation:n,ownerState:r}=e,i=tt(e,yk),o=function(e){return aw({d:e.d},{createInterpolator:(e,t)=>{const n=Ln(e.d,t.d);return e=>({d:n(e)})},applyProps:(e,{d:t})=>e.setAttribute("d",t),skip:e.skipAnimation,transformProps:e=>e,ref:e.ref})}({d:e.d,skipAnimation:n,ref:t}),a=r.isFaded?.3:1;return(0,O.jsx)(uw,{skipAnimation:n,id:`${r.id}-line-clip`,children:(0,O.jsx)("path",l({stroke:r.gradientId?`url(#${r.gradientId})`:r.color,strokeWidth:2,strokeLinejoin:"round",fill:"none",filter:r.isHighlighted?"brightness(120%)":void 0,opacity:r.hidden?0:a,"data-series":r.id,"data-highlighted":r.isHighlighted||void 0,"data-faded":r.isFaded||void 0},i,o))})}),bk=["id","classes","color","gradientId","slots","slotProps","onClick","hidden"];function xk(e){return Xb("MuiLineElement",e)}const Ik=Zb("MuiLineElement",["root","highlighted","faded","series"]),wk=e=>{const{classes:t,id:n,isFaded:r,isHighlighted:i}=e;return uI({root:["root",`series-${n}`,i&&"highlighted",r&&"faded"]},xk,t)};function kk(e){const{id:t,classes:n,color:r,gradientId:i,slots:o,slotProps:a,onClick:s,hidden:c}=e,u=tt(e,bk),d=bI({type:"line",seriesId:t}),{isFaded:p,isHighlighted:h}=zI({seriesId:t}),m={id:t,classes:n,color:r,gradientId:i,isFaded:p,isHighlighted:h,hidden:c},f=wk(m),g=o?.line??vk,y=yI({elementType:g,externalSlotProps:a?.line,additionalProps:l({},d,{onClick:s,cursor:s?"pointer":"unset"}),className:f.root,ownerState:m});return(0,O.jsx)(g,l({},u,y))}function Sk(t,n){const r=lk(),i=_x().xAxisIds[0],o=Fx().yAxisIds[0],a=Zx();return e.useMemo(()=>{if(void 0===r)return[];const{series:e,stackingGroups:s}=r,l=[];for(const r of s){const s=r.ids;for(const r of s){const{xAxisId:s=i,yAxisId:c=o,stackedData:u,data:d,connectNulls:p,curve:h,strictStepCurve:m}=e[r];if(!(s in t)||!(c in n))continue;const f=t[s].scale,g=ck(f),y=n[c].scale,v=t[s].data,b=n[c].colorScale&&a(c)||t[s].colorScale&&a(s)||void 0,x=h?.includes("step")&&!m&&fa(f),I=v?.flatMap((e,t)=>{const n=null==d[t];if(x){const r=[{x:e,y:u[t],nullData:n,isExtension:!1}];return n||0!==t&&null!=d[t-1]||r.unshift({x:(f(e)??0)-(f.step()-f.bandwidth())/2,y:u[t],nullData:n,isExtension:!0}),n||t!==d.length-1&&null!=d[t+1]||r.push({x:(f(e)??0)+(f.step()+f.bandwidth())/2,y:u[t],nullData:n,isExtension:!0}),r}return{x:e,y:u[t],nullData:n}})??[],w=p?I.filter(e=>!e.nullData):I,k=jw().x(e=>e.isExtension?e.x:g(e.x)).defined(e=>p||!e.nullData||!!e.isExtension).y(e=>y(e.y[1])),S=k.curve(rk(h))(w)||"";l.push({color:e[r].color,gradientId:b,d:S,seriesId:r})}}return l},[r,i,o,t,n,a])}const Mk=["slots","slotProps","skipAnimation","onItemClick"],Ck=bm("g",{name:"MuiAreaPlot",slot:"Root"})({[`& .${Ik.root}`]:{transitionProperty:"opacity, fill",transitionDuration:`${_I}ms`,transitionTimingFunction:FI}}),Pk=()=>{const{xAxis:e}=_x(),{yAxis:t}=Fx();return Sk(e,t)};function Ek(e){const{slots:t,slotProps:n,skipAnimation:r,onItemClick:i}=e,o=tt(e,Mk),a=bw(xw()||r),s=Pk();return(0,O.jsx)(Ck,l({},o,{children:s.map(({d:e,seriesId:r,color:o,gradientId:s})=>(0,O.jsx)(kk,{id:r,d:e,color:o,gradientId:s,skipAnimation:a,slots:t,slotProps:n,onClick:i&&(e=>i(e,{type:"line",seriesId:r}))},r))}))}function Tk(e){return Xb("MuiMarkElement",e)}const Ak=Zb("MuiMarkElement",["root","highlighted","faded","animate","series"]),Ok=e=>{const{classes:t,id:n,isFaded:r,isHighlighted:i,skipAnimation:o}=e;return uI({root:["root",`series-${n}`,i&&"highlighted",r&&"faded",o?void 0:"animate"]},Tk,t)},jk=["x","y","id","classes","color","dataIndex","onClick","skipAnimation","isFaded","isHighlighted","shape","hidden"],Lk=bm("circle",{slot:"internal",shouldForwardProp:void 0})({[`&.${Ak.animate}`]:{transitionDuration:`${_I}ms`,transitionProperty:"cx, cy, opacity",transitionTimingFunction:FI}});function Rk(e){const{x:t,y:n,id:r,classes:i,color:o,dataIndex:a,onClick:s,skipAnimation:c,isFaded:u=!1,isHighlighted:d=!1,hidden:p}=e,h=tt(e,jk),m=xm(),f=bI({type:"line",seriesId:r,dataIndex:a}),g=Ok({id:r,classes:i,isHighlighted:d,isFaded:u,skipAnimation:c});return(0,O.jsx)(Lk,l({},h,{cx:t,cy:n,r:5,fill:(m.vars||m).palette.background.paper,stroke:o,strokeWidth:2,className:g.root,onClick:s,cursor:s?"pointer":"unset",pointerEvents:p?"none":void 0},f,{"data-highlighted":d||void 0,"data-faded":u||void 0,opacity:p?0:1}))}Gl(3);const Dk={draw(e,t){const n=Gl(t/ql);e.moveTo(n,0),e.arc(0,0,n,0,Zl)}},$k={draw(e,t){const n=Gl(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},zk=Gl(1/3),Nk=2*zk,_k={draw(e,t){const n=Gl(t/Nk),r=n*zk;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Fk={draw(e,t){const n=Gl(t),r=-n/2;e.rect(r,r,n,n)}},Hk=Wl(ql/10)/Wl(7*ql/10),Bk=Wl(Zl/10)*Hk,Vk=-Vl(Zl/10)*Hk,Uk={draw(e,t){const n=Gl(.8908130915292852*t),r=Bk*n,i=Vk*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){const o=Zl*t/5,a=Vl(o),s=Wl(o);e.lineTo(s*n,-a*n),e.lineTo(a*r-s*i,s*r+a*i)}e.closePath()}},Yk=Gl(3),Wk={draw(e,t){const n=-Gl(t/(3*Yk));e.moveTo(0,2*n),e.lineTo(-Yk*n,-n),e.lineTo(Yk*n,-n),e.closePath()}},Gk=(Gl(3),-.5),Kk=Gl(3)/2,qk=1/Gl(12),Xk=3*(qk/2+1),Zk={draw(e,t){const n=Gl(t/Xk),r=n/2,i=n*qk,o=r,a=n*qk+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Gk*r-Kk*i,Kk*r+Gk*i),e.lineTo(Gk*o-Kk*a,Kk*o+Gk*a),e.lineTo(Gk*s-Kk*l,Kk*s+Gk*l),e.lineTo(Gk*r+Kk*i,Gk*i-Kk*r),e.lineTo(Gk*o+Kk*a,Gk*a-Kk*o),e.lineTo(Gk*s+Kk*l,Gk*l-Kk*s),e.closePath()}},Jk=[Dk,$k,_k,Fk,Uk,Wk,Zk];function Qk(e,t){let n=null,r=Tw(i);function i(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return e="function"==typeof e?e:rl(e||Dk),t="function"==typeof t?t:rl(void 0===t?64:+t),i.type=function(t){return arguments.length?(e="function"==typeof t?t:rl(t),i):e},i.size=function(e){return arguments.length?(t="function"==typeof e?e:rl(+e),i):t},i.context=function(e){return arguments.length?(n=null==e?null:e,i):n},i}function eS(e){switch(e){case"circle":default:return 0;case"cross":return 1;case"diamond":return 2;case"square":return 3;case"star":return 4;case"triangle":return 5;case"wye":return 6}}const tS=["x","y","id","classes","color","shape","dataIndex","onClick","skipAnimation","isFaded","isHighlighted","hidden","style"],nS=bm("path",{name:"MuiMarkElement",slot:"Root"})(({theme:e})=>({fill:(e.vars||e).palette.background.paper,[`&.${Ak.animate}`]:{transitionDuration:`${_I}ms`,transitionProperty:"transform, transform-origin, opacity",transitionTimingFunction:FI}}));function rS(e){const{x:t,y:n,id:r,classes:i,color:o,shape:a,dataIndex:s,onClick:c,skipAnimation:u,isFaded:d=!1,isHighlighted:p=!1,hidden:h,style:m}=e,f=tt(e,tS),g=bI({type:"line",seriesId:r,dataIndex:s}),y={id:r,classes:i,isHighlighted:p,isFaded:d,skipAnimation:u},v=Ok(y);return(0,O.jsx)(nS,l({},f,{style:l({},m,{transform:`translate(${t}px, ${n}px)`,transformOrigin:`${t}px ${n}px`}),ownerState:y,className:v.root,d:Qk(Jk[eS(a)])(),onClick:c,cursor:c?"pointer":"unset",pointerEvents:h?"none":void 0},g,{"data-highlighted":p||void 0,"data-faded":d||void 0,opacity:h?0:1,strokeWidth:2,stroke:o}))}function iS(){const e=zx();return{isHighlighted:e.use(TI),isFaded:e.use(AI)}}const oS=e=>e.controlledCartesianAxisHighlight,aS=(e,t,n,r)=>r?[]:void 0!==n?n.filter(e=>void 0!==t.axis[e.axisId]).map(e=>e):null===e?[]:[{axisId:t.axisIds[0],dataIndex:e}],sS=le(As,ls,oS,kb,aS),lS=(le(Os,cs,oS,kb,aS),(e,t,n,r,i,o,a)=>{if(a)return[];if(void 0!==r)return r.map(e=>l({},e,{value:n.axis[e.axisId]?.data?.[e.dataIndex]})).filter(({value:e})=>void 0!==e);const s=null!==t&&{axisId:n.axisIds[0],dataIndex:e,value:t},c=i&&n.axis[i.axisId]?.data?.[i.dataIndex],u=i&&null!=c&&l({},i,{value:c});if("pointer"===o){if(s)return[s];if(u)return[u]}if("keyboard"===o){if(u)return[u];if(s)return[s]}return[]}),cS=le(As,Rs,ls,oS,sI,Cs,kb,lS),uS=le(Os,Ds,cs,oS,lI,Cs,kb,lS),dS=(e,t)=>void 0===e?[t.axis[t.axisIds[0]]]:e.map(e=>t.axis[e.axisId]??null).filter(e=>null!==e);ae(oS,ls,dS),ae(oS,cs,dS);const pS=["slots","slotProps","skipAnimation","onItemClick"];function hS(t){const{slots:n,slotProps:r,skipAnimation:i,onItemClick:o}=t,a=tt(t,pS),s=bw(xw()||i),{xAxis:c}=_x(),{yAxis:u}=Fx(),{store:d}=$x(),{isFaded:p,isHighlighted:h}=iS(),m=d.use(sS),f=e.useMemo(()=>{const e={};for(const{dataIndex:t,axisId:n}of m)void 0===e[n]?e[n]=new Set([t]):e[n].add(t);return e},[m]),g=function(t,n){const r=lk(),i=_x().xAxisIds[0],o=Fx().yAxisIds[0],a=Xx(),{instance:s}=$x(),l=e.useMemo(()=>{if(void 0===r)return[];const{series:e,stackingGroups:l}=r,c=[];for(const r of l){const l=r.ids;for(const r of l){const{xAxisId:l=i,yAxisId:u=o,stackedData:d,data:p,showMark:h=!0,shape:m="circle"}=e[r];if(!1===h)continue;if(!(l in t)||!(u in n))continue;const f=ck(t[l].scale),g=n[u].scale,y=t[l].data,v=sw(`${a}-${r}-line-clip`),b=$l(e[r],t[l],n[u]),x=[];if(y)for(let e=0;e{const u=n?.mark??("circle"===i?Rk:rS),d=h({seriesId:e}),m=!d&&p({seriesId:e});return(0,O.jsx)("g",{clipPath:`url(#${t})`,"data-series":e,children:c.map(({x:t,y:n,index:c,color:p})=>(0,O.jsx)(u,l({id:e,dataIndex:c,shape:i,color:p,x:t,y:n,skipAnimation:s,onClick:o&&(t=>o(t,{type:"line",seriesId:e,dataIndex:c})),isHighlighted:f[a]?.has(c)||d,isFaded:m},r?.mark),`${e}-${c}`))},e)})}))}new Set;const mS=e.createContext(),fS=()=>e.useContext(mS)??!1;function gS(){const[t,n]=e.useState(!1);return e.useEffect(()=>{n(!0)},[]),t}function yS(e){return"number"==typeof e&&!Number.isFinite(e)}function vS(e,t){return Math.abs(12*t.getFullYear()+t.getMonth()-12*e.getFullYear()-e.getMonth())}function bS(e,t){return Math.abs(t.getTime()-e.getTime())/864e5}const xS={years:{getTickNumber:function(e,t){return Math.abs(t.getFullYear()-e.getFullYear())},isTick:(e,t)=>t.getFullYear()!==e.getFullYear(),format:e=>e.getFullYear().toString()},quarterly:{getTickNumber:(e,t)=>Math.floor(vS(e,t)/3),isTick:(e,t)=>t.getMonth()!==e.getMonth()&&t.getMonth()%3==0,format:new Intl.DateTimeFormat("default",{month:"short"}).format},months:{getTickNumber:vS,isTick:(e,t)=>t.getMonth()!==e.getMonth(),format:new Intl.DateTimeFormat("default",{month:"short"}).format},biweekly:{getTickNumber:(e,t)=>bS(e,t)/14,isTick:(e,t)=>(t.getDay()7)&&Math.floor(t.getDate()/7)%2==1,format:new Intl.DateTimeFormat("default",{day:"numeric"}).format},weeks:{getTickNumber:(e,t)=>bS(e,t)/7,isTick:(e,t)=>t.getDay()=7,format:new Intl.DateTimeFormat("default",{day:"numeric"}).format},days:{getTickNumber:bS,isTick:(e,t)=>t.getDate()!==e.getDate(),format:new Intl.DateTimeFormat("default",{day:"numeric"}).format},hours:{getTickNumber:function(e,t){return Math.abs(t.getTime()-e.getTime())/36e5},isTick:(e,t)=>t.getHours()!==e.getHours(),format:new Intl.DateTimeFormat("default",{hour:"2-digit",minute:"2-digit"}).format}},IS={start:0,extremities:0,end:1,middle:.5};function wS(e,t,n){return e(t)-(e.step()-e.bandwidth())/2+IS[n]*e.step()}function kS(t){const{scale:n,tickNumber:r,valueFormatter:i,tickInterval:o,tickPlacement:a="extremities",tickLabelPlacement:s,tickSpacing:l,direction:c,ordinalTimeTicks:u}=t,{instance:d}=$x(),p="x"===c?d.isXInside:d.isYInside;return e.useMemo(()=>function(e){const{scale:t,tickNumber:n,valueFormatter:r,tickInterval:i,tickPlacement:o,tickLabelPlacement:a,tickSpacing:s,isInside:l,ordinalTimeTicks:c}=e;if(void 0!==c&&sa(t.domain())&&fa(t)){const e=t.domain();if(0===e.length||1===e.length)return[];const r="middle",i=function(e,t,n,r,i){if(0===n.length)return[];const o=r.range()[0]>r.range()[1],a=e.findIndex(e=>i(wS(r,e,o?"start":"end"))),s=e.findLastIndex(e=>i(wS(r,e,o?"end":"start"))),l=e[0],c=e[e.length-1];if(!(l instanceof Date&&c instanceof Date))return[];let u=0;for(let e=0;et||t/r"string"==typeof e?xS[e]:e),t,l);return i.map(({index:n,formatter:i})=>{const o=e[n];return{value:o,formattedValue:i(o),offset:wS(t,o,r),labelOffset:0}})}const u=o??"extremities";if(fa(t)){const e=t.domain(),o=a??"middle";let c=e;if("object"==typeof i&&null!=i?c=i:("function"==typeof i&&(c=c.filter(i)),void 0!==s&&s>0&&(c=function(e,t,n){const r=Math.abs(t[1]-t[0]),i=Math.ceil(e.length/(r/n));return Number.isNaN(i)||i<=1?e:e.filter((e,t)=>t%i===0)}(c,t.range(),s))),0===c.length)return[];if(t.bandwidth()>0){const i=t.range()[0]>t.range()[1],a=c.findIndex(e=>l(wS(t,e,i?"start":"end"))),s=c.findLastIndex(e=>l(wS(t,e,i?"end":"start")));return[...c.slice(a,s+1).map(e=>{const i=`${e}`;return{value:e,formattedValue:r?.(e,{location:"tick",scale:t,tickNumber:n,defaultTickLabel:i})??i,offset:wS(t,e,u),labelOffset:"tick"===o?0:t.step()*(IS[o]-IS[u])}}),..."extremities"===u&&s===e.length-1&&l(t.range()[1])?[{formattedValue:void 0,offset:t.range()[1],labelOffset:0}]:[]]}return c.map(e=>{const i=`${e}`;return{value:e,formattedValue:r?.(e,{location:"tick",scale:t,tickNumber:n,defaultTickLabel:i})??i,offset:t(e),labelOffset:0}})}if(t.domain().some(yS))return[];const d=a,p="object"==typeof i?i:function(e,t){const n=e.domain();return n[0]===n[1]?[n[0]]:e.ticks(t)}(t,n),h=[];for(let e=0;e=t)break;return r}:function(e,t){return e.slice(0,t)},ES="…";function TS(e,t){const{width:n,height:r,measureText:i}=t,o=t.angle*(Math.PI/180),a=i(e),s=Math.abs(a.width*Math.cos(o))+Math.abs(a.height*Math.sin(o)),l=Math.abs(a.width*Math.sin(o))+Math.abs(a.height*Math.cos(o));return s<=n&&l<=r}function AS(e,t){if(t(e))return e;let n=e,r=1,i=.5;const o=MS(e);let a=o,s=o,l=null;do{if(s=a,a=Math.floor(o*i),0===a)break;n=PS(e,a).trim(),r+=1,t(n+ES)?(l=n,i+=1/2**r):i-=1/2**r}while(1!==Math.abs(a-s));return l?l+ES:""}function OS(){return"undefined"==typeof window}const jS=new Map,LS=2e3,RS=new Set(["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"]);function DS(e,t){return RS.has(e)&&t===+t?`${t}px`:t}const $S=/([A-Z])/g;function zS(e){return String(e).replace($S,e=>`-${e.toLowerCase()}`)}function NS(e){let t="";for(const n in e)if(Object.hasOwn(e,n)){const r=n,i=e[r];if(void 0===i)continue;t+=`${zS(r)}:${DS(r,i)};`}return t}const _S=(e,t={})=>{if(null==e||OS())return{width:0,height:0};const n=String(e),r=`${n}-${NS(t)}`,i=jS.get(r);if(i)return i;try{const e=BS(),i=document.createElementNS("http://www.w3.org/2000/svg","text");Object.keys(t).map(e=>(i.style[zS(e)]=DS(e,t[e]),e)),i.textContent=n,e.replaceChildren(i);const o=FS(i);return jS.set(r,o),jS.size+1>LS&&jS.clear(),o}catch{return{width:0,height:0}}};function FS(e){try{const t=e.getBBox();return{width:t.width,height:t.height}}catch{const t=e.getBoundingClientRect();return{width:t.width,height:t.height}}}let HS=null;function BS(){return null===HS&&(HS=document.createElementNS("http://www.w3.org/2000/svg","svg"),HS.setAttribute("aria-hidden","true"),HS.style.position="absolute",HS.style.top="-20000px",HS.style.left="0",HS.style.padding="0",HS.style.margin="0",HS.style.border="none",HS.style.pointerEvents="none",HS.style.visibility="hidden",HS.style.contain="strict",document.body.appendChild(HS)),HS}const VS=5;function US(e){return Xb("MuiChartsAxis",e)}const YS=Zb("MuiChartsAxis",["root","line","tickContainer","tick","tickLabel","label","directionX","directionY","top","bottom","left","right","id"]),WS=e=>{const{classes:t,position:n,id:r}=e;return uI({root:["root","directionX",n,`id-${r}`],line:["line"],tickContainer:["tickContainer"],tick:["tick"],tickLabel:["tickLabel"],label:["label"]},US,t)},GS=3,KS=4,qS={disableLine:!1,disableTicks:!1,tickSize:6,tickLabelMinGap:4},XS=["x","y","style","text","ownerState"],ZS=["angle","textAnchor","dominantBaseline"];function JS(t){const{x:n,y:r,style:i,text:o}=t,a=tt(t,XS),s=i??{},{angle:c,textAnchor:u,dominantBaseline:d}=s,p=tt(s,ZS),h=gS(),m=e.useMemo(()=>function({style:e,needsComputation:t,text:n}){return n.split("\n").map(n=>l({text:n},t?_S(n,e):{width:0,height:0}))}({style:p,needsComputation:h&&o.includes("\n"),text:o}),[p,o,h]);let f;switch(d){case"hanging":case"text-before-edge":f=0;break;case"central":f=(m.length-1)/2*-m[0].height;break;default:f=(m.length-1)*-m[0].height}return(0,O.jsx)("text",l({},a,{transform:c?`rotate(${c}, ${n}, ${r})`:void 0,x:n,y:r,textAnchor:u,dominantBaseline:d,style:p,children:m.map((e,t)=>(0,O.jsx)("tspan",{x:n,dy:`${0===t?f:m[0].height}px`,dominantBaseline:d,children:e.text},t))}))}function QS(e){const t=$b(e);return t<=30||t>=330||t<=210&&t>=150?"middle":t<=180?"end":"start"}function eM(e){const t=$b(e);return t<=30||t>=330?"hanging":t<=210&&t>=150?"auto":"central"}function tM(e){switch(e){case"start":return"end";case"end":return"start";default:return e}}const nM=["scale","tickNumber","reverse"];function rM(e){const{xAxis:t,xAxisIds:n}=_x(),r=t[e.axisId??n[0]],{scale:i,tickNumber:o,reverse:a}=r,s=Lh({props:l({},tt(r,nM),e),name:"MuiChartsXAxis"}),c=l({},qS,s),{position:u,tickLabelStyle:d,slots:p,slotProps:h}=c,m=xm(),f=fS(),g=WS(c),y="bottom"===u?1:-1,v=p?.axisTick??"line",b=p?.axisTickLabel??JS,x=QS(("bottom"===u?0:180)-(d?.angle??0)),I=eM(("bottom"===u?0:180)-(d?.angle??0));return{xScale:i,defaultizedProps:c,tickNumber:o,positionSign:y,classes:g,Tick:v,TickLabel:b,axisTickLabelProps:yI({elementType:b,externalSlotProps:h?.axisTickLabel,additionalProps:{style:l({},m.typography.caption,{fontSize:12,lineHeight:1.25,textAnchor:f?tM(x):x,dominantBaseline:I},d)},className:g.tickLabel,ownerState:{}}),reverse:a}}function iM(t){const{axisLabelHeight:n,ordinalTimeTicks:r}=t,{xScale:i,defaultizedProps:o,tickNumber:a,positionSign:s,classes:c,Tick:u,TickLabel:d,axisTickLabelProps:p,reverse:h}=rM(t),m=fS(),f=function(t=!1){const[n,r]=e.useState(!1);return V(()=>{t||r(!0)},[t]),e.useEffect(()=>{t&&r(!0)},[t]),n}(),{disableTicks:g,tickSize:y,valueFormatter:v,slotProps:b,tickInterval:x,tickLabelInterval:I,tickPlacement:w,tickLabelPlacement:k,tickLabelMinGap:S,tickSpacing:M,height:C}=o,P=Nx(),{instance:E}=$x(),T=gS(),A=g?4:y,j=kS({scale:i,tickNumber:a,valueFormatter:v,tickInterval:x,tickPlacement:w,tickLabelPlacement:k,tickSpacing:M,direction:"x",ordinalTimeTicks:r}),L=function(e,{tickLabelStyle:t,tickLabelInterval:n,tickLabelMinGap:r,reverse:i,isMounted:o,isXInside:a}){if("function"==typeof n)return new Set(e.filter((e,t)=>n(e.value,t)));let s=0;const c=i?-1:1,u=e.filter(e=>{const{offset:t,labelOffset:n,formattedValue:r}=e;return""!==r&&a(t+n)}),d=function(e,t){const n=new Set;for(const t of e)t.formattedValue&&t.formattedValue.split("\n").forEach(e=>n.add(e));return function(e,t={}){if(OS())return new Map(Array.from(e).map(e=>[e,{width:0,height:0}]));const n=new Map,r=[],i=NS(t);for(const t of e){const e=`${t}-${i}`,o=jS.get(e);o?n.set(t,o):r.push(t)}const o=BS(),a=l({},t);Object.keys(a).map(e=>(o.style[zS(e)]=DS(e,a[e]),e));const s=[];for(const e of r){const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.textContent=`${e}`,s.push(t)}o.replaceChildren(...s);for(let e=0;eLS&&jS.clear(),n}(n,t)}(u,t);return new Set(u.filter((e,n)=>{const{offset:i,labelOffset:a}=e,l=i+a;if(n>0&&c*l90-VS)return t;const i=Ql(r);return i0&&c*(l-c*h/2)0?n+KS:0)-A-GS),D=T?function(e,t,n,r,i){const o=new Map,a=$b(i?.angle??0);let s=1,l=1;"start"===i?.textAnchor?(s=1/0,l=1):"end"===i?.textAnchor?(s=1,l=1/0):(s=2,l=2),a>90&&a<270&&([s,l]=[l,s]),r&&([s,l]=[l,s]);for(const r of e)if(r.formattedValue){const e=Math.min((r.offset+r.labelOffset)*s,(t.left+t.width+t.right-r.offset-r.labelOffset)*l),c=t=>TS(t,{width:e,height:n,angle:a,measureText:e=>_S(e,i)});o.set(r,AS(r.formattedValue.toString(),c))}return o}(L,P,R,m,p.style):new Map(Array.from(L).map(e=>[e,e.formattedValue]));return(0,O.jsx)(e.Fragment,{children:j.map((e,t)=>{const{offset:n,labelOffset:r}=e,i=r??0,o=s*(A+GS),a=E.isXInside(n),h=D.get(e),m=L.has(e);return(0,O.jsxs)("g",{transform:`translate(${n}, 0)`,className:c.tickContainer,children:[!g&&a&&(0,O.jsx)(u,l({y2:s*A,className:c.tick},b?.axisTick)),void 0!==h&&m&&(0,O.jsx)(d,l({x:i,y:o},p,{text:h}))]},t)})})}const oM={start:0,extremities:0,end:1,middle:.5,tick:0};function aM(t){const{scale:n,tickInterval:r,tickLabelPlacement:i="middle",tickPlacement:o="extremities",groups:a}=t;return e.useMemo(()=>{const e=n.domain(),t="function"==typeof r&&e.filter(r)||"object"==typeof r&&r||e;if(n.bandwidth()>0){const e=sM(t,a,o,i,n);return e[0]&&(e[0].ignoreTick=!0),[{formattedValue:void 0,offset:n.range()[0],labelOffset:0,groupIndex:a.length-1},...e,{formattedValue:void 0,offset:n.range()[1],labelOffset:0,groupIndex:a.length-1}]}return sM(t,a,o,i,n)},[n,r,a,o,i])}function sM(e,t,n,r,i){const o=[],a=new Map;let s=0;for(let l=0;l{const r=e[t]??{},i=n??lM.tickSize,o=i*t*2+i;return l({},lM,r,{tickSize:r.tickSize??o})};function uM(t){const{xScale:n,defaultizedProps:r,tickNumber:i,positionSign:o,classes:a,Tick:s,TickLabel:c,axisTickLabelProps:u}=rM(t);if(!fa(n))throw new Error("MUI X Charts: ChartsGroupedXAxis only supports the `band` and `point` scale types.");const{disableTicks:d,tickSize:p,valueFormatter:h,slotProps:m,tickInterval:f,tickPlacement:g,tickLabelPlacement:y}=r,v=r.groups,{instance:b}=$x(),x=aM({scale:n,tickNumber:i,valueFormatter:h,tickInterval:f,tickPlacement:g,tickLabelPlacement:y,direction:"x",groups:v});return(0,O.jsx)(e.Fragment,{children:x.map((e,t)=>{const{offset:n,labelOffset:r}=e,i=r??0,h=b.isXInside(n),f=e.formattedValue,g=e.ignoreTick??!1,y=e.groupIndex??0,x=cM(v,y,p),I=o*x.tickSize,w=o*(x.tickSize+GS);return(0,O.jsxs)("g",{transform:`translate(${n}, 0)`,className:a.tickContainer,"data-group-index":y,children:[!d&&!g&&h&&(0,O.jsx)(s,l({y2:I,className:a.tick},m?.axisTick)),void 0!==f&&(0,O.jsx)(c,l({x:i,y:w},u,{style:l({},u.style,x.tickLabelStyle),text:f}))]},t)})})}const dM=bm("g",{name:"MuiChartsAxis",slot:"Root"})(({theme:e})=>({[`& .${YS.tickLabel}`]:l({},e.typography.caption,{fill:(e.vars||e).palette.text.primary}),[`& .${YS.label}`]:{fill:(e.vars||e).palette.text.primary},[`& .${YS.line}`]:{stroke:(e.vars||e).palette.text.primary,shapeRendering:"crispEdges",strokeWidth:1},[`& .${YS.tick}`]:{stroke:(e.vars||e).palette.text.primary,shapeRendering:"crispEdges"}})),pM=["axis"],hM=["scale","tickNumber","reverse","ordinalTimeTicks"],mM=bm(dM,{name:"MuiChartsXAxis",slot:"Root"})({});function fM(e){let{axis:t}=e,n=tt(e,pM);const{scale:r,ordinalTimeTicks:i}=t,o=Lh({props:l({},tt(t,hM),n),name:"MuiChartsXAxis"}),a=l({},qS,o),{position:s,labelStyle:c,offset:u,slots:d,slotProps:p,sx:h,disableLine:m,label:f,height:g}=a,y=xm(),v=WS(a),{left:b,top:x,width:I,height:w}=Nx(),k="bottom"===s?1:-1,S=d?.axisLine??"line",M=d?.axisLabel??JS,C=yI({elementType:M,externalSlotProps:p?.axisLabel,additionalProps:{style:l({},y.typography.body1,{lineHeight:1,fontSize:14,textAnchor:"middle",dominantBaseline:"bottom"===s?"text-after-edge":"text-before-edge"},c)},ownerState:{}});if("none"===s)return null;const P=f?_S(f,C.style).height:0,E=r.domain();let T=null;(fa(r)?0===E.length:E.some(yS))||(T="groups"in t&&Array.isArray(t.groups)?(0,O.jsx)(uM,l({},n)):(0,O.jsx)(iM,l({},n,{axisLabelHeight:P,ordinalTimeTicks:i})));const A={x:b+I/2,y:k*g};return(0,O.jsxs)(mM,{transform:`translate(0, ${"bottom"===s?x+w+u:x-u})`,className:v.root,sx:h,children:[!m&&(0,O.jsx)(S,l({x1:b,x2:b+I,className:v.line},p?.axisLine)),T,f&&(0,O.jsx)("g",{className:v.label,children:(0,O.jsx)(M,l({},A,C,{text:f}))})]})}function gM(e){const{xAxis:t,xAxisIds:n}=_x(),r=t[e.axisId??n[0]];return r?(0,O.jsx)(fM,l({},e,{axis:r})):(e.axisId,null)}const yM=e=>{const{classes:t,position:n,id:r}=e;return uI({root:["root","directionY",n,`id-${r}`],line:["line"],tickContainer:["tickContainer"],tick:["tick"],tickLabel:["tickLabel"],label:["label"]},US,t)},vM=2,bM=2,xM={disableLine:!1,disableTicks:!1,tickSize:6},IM=["scale","tickNumber","reverse"];function wM(e){const{yAxis:t,yAxisIds:n}=Fx(),r=t[e.axisId??n[0]],{scale:i,tickNumber:o}=r,a=Lh({props:l({},tt(r,IM),e),name:"MuiChartsYAxis"}),s=l({},xM,a),{position:c,tickLabelStyle:u,slots:d,slotProps:p}=s,h=xm(),m=fS(),f=yM(s),g="right"===c?1:-1,y="number"==typeof u?.fontSize?u.fontSize:12,v=d?.axisTick??"line",b=d?.axisTickLabel??JS,x=QS(("right"===c?-90:90)-(u?.angle??0)),I=eM(("right"===c?-90:90)-(u?.angle??0));return{yScale:i,defaultizedProps:s,tickNumber:o,positionSign:g,classes:f,Tick:v,TickLabel:b,axisTickLabelProps:yI({elementType:b,externalSlotProps:p?.axisTickLabel,additionalProps:{style:l({},h.typography.caption,{fontSize:y,textAnchor:m?tM(x):x,dominantBaseline:I},u)},className:f.tickLabel,ownerState:{}})}}function kM(t){const{axisLabelHeight:n,ordinalTimeTicks:r}=t,{yScale:i,defaultizedProps:o,tickNumber:a,positionSign:s,classes:c,Tick:u,TickLabel:d,axisTickLabelProps:p}=wM(t),h=fS(),{disableTicks:m,tickSize:f,valueFormatter:g,slotProps:y,tickPlacement:v,tickLabelPlacement:b,tickInterval:x,tickLabelInterval:I,tickSpacing:w,width:k}=o,S=Nx(),{instance:M}=$x(),C=gS(),P=m?4:f,E=kS({scale:i,tickNumber:a,valueFormatter:g,tickPlacement:v,tickLabelPlacement:b,tickInterval:x,tickSpacing:w,direction:"y",ordinalTimeTicks:r}),T=Math.max(0,k-(n>0?n+bM:0)-P-vM),A=C?function(e,t,n,r,i){const o=new Map,a=$b(i?.angle??0);let s=1,l=1;"start"===i?.textAnchor?(s=1/0,l=1):"end"===i?.textAnchor?(s=1,l=1/0):(s=2,l=2),a>180&&([s,l]=[l,s]),r&&([s,l]=[l,s]);for(const r of e)if(r.formattedValue){const e=Math.min((r.offset+r.labelOffset)*s,(t.top+t.height+t.bottom-r.offset-r.labelOffset)*l),c=t=>TS(t,{width:n,height:e,angle:a,measureText:e=>_S(e,i)});o.set(r,AS(r.formattedValue.toString(),c))}return o}(E,S,T,h,p.style):new Map(Array.from(E).map(e=>[e,e.formattedValue]));return(0,O.jsx)(e.Fragment,{children:E.map((e,t)=>{const{offset:n,labelOffset:r,value:i}=e,o=s*(P+vM),a=r,h="function"==typeof I&&!I?.(i,t),f=M.isYInside(n),g=A.get(e);return f?(0,O.jsxs)("g",{transform:`translate(0, ${n})`,className:c.tickContainer,children:[!m&&(0,O.jsx)(u,l({x2:s*P,className:c.tick},y?.axisTick)),void 0!==g&&!h&&(0,O.jsx)(d,l({x:o,y:a,text:g},p))]},t):null})})}const SM={tickSize:6},MM=(e,t,n)=>{const r=e[t]??{},i=n??SM.tickSize,o=i*t*2+i;return l({},SM,r,{tickSize:r.tickSize??o})};function CM(t){const{yScale:n,defaultizedProps:r,tickNumber:i,positionSign:o,classes:a,Tick:s,TickLabel:c,axisTickLabelProps:u}=wM(t);if(!fa(n))throw new Error("MUI X Charts: ChartsGroupedYAxis only supports the `band` and `point` scale types.");const{disableTicks:d,tickSize:p,valueFormatter:h,slotProps:m,tickInterval:f,tickPlacement:g,tickLabelPlacement:y}=r,v=r.groups,{instance:b}=$x(),x=aM({scale:n,tickNumber:i,valueFormatter:h,tickInterval:f,tickPlacement:g,tickLabelPlacement:y,direction:"y",groups:v});return(0,O.jsx)(e.Fragment,{children:x.map((e,t)=>{const{offset:n,labelOffset:r}=e,i=r??0,h=b.isYInside(n),f=e.formattedValue,g=e.ignoreTick??!1,y=e.groupIndex??0,x=MM(v,y,p),I=o*x.tickSize,w=o*(x.tickSize+vM);return(0,O.jsxs)("g",{transform:`translate(0, ${n})`,className:a.tickContainer,"data-group-index":y,children:[!d&&!g&&h&&(0,O.jsx)(s,l({x2:I,className:a.tick},m?.axisTick)),void 0!==f&&(0,O.jsx)(c,l({x:w,y:i},u,{style:l({},u.style,x.tickLabelStyle),text:f}))]},t)})})}const PM=["axis"],EM=["scale","tickNumber","reverse","ordinalTimeTicks"],TM=bm(dM,{name:"MuiChartsYAxis",slot:"Root"})({});function AM(e){let{axis:t}=e,n=tt(e,PM);const{scale:r,ordinalTimeTicks:i}=t,o=tt(t,EM),a=gS(),s=Lh({props:l({},o,n),name:"MuiChartsYAxis"}),c=l({},xM,s),{position:u,disableLine:d,label:p,labelStyle:h,offset:m,width:f,sx:g,slots:y,slotProps:v}=c,b=xm(),x=yM(c),{left:I,top:w,width:k,height:S}=Nx(),M="right"===u?1:-1,C=y?.axisLine??"line",P=y?.axisLabel??JS,E=yI({elementType:C,externalSlotProps:v?.axisLine,additionalProps:{strokeLinecap:"square"},ownerState:{}}),T=yI({elementType:P,externalSlotProps:v?.axisLabel,additionalProps:{style:l({},b.typography.body1,{lineHeight:1,fontSize:14,angle:90*M,textAnchor:"middle",dominantBaseline:"text-before-edge"},h)},ownerState:{}});if("none"===u)return null;const A={x:M*f,y:w+S/2},j=null==p?0:_S(p,T.style).height,L=r.domain();let R=null;return(fa(r)?0===L.length:L.some(yS))||(R="groups"in t&&Array.isArray(t.groups)?(0,O.jsx)(CM,l({},n)):(0,O.jsx)(kM,l({},n,{axisLabelHeight:j,ordinalTimeTicks:i}))),(0,O.jsxs)(TM,{transform:`translate(${"right"===u?I+k+m:I-m}, 0)`,className:x.root,sx:g,children:[!d&&(0,O.jsx)(C,l({y1:w,y2:w+S,className:x.line},E)),R,p&&a&&(0,O.jsx)("g",{className:x.label,children:(0,O.jsx)(P,l({},A,T,{text:p}))})]})}function OM(e){const{yAxis:t,yAxisIds:n}=Fx(),r=t[e.axisId??n[0]];return r?(0,O.jsx)(AM,l({},e,{axis:r})):(e.axisId,null)}function jM(e){return Xb("MuiChartsGrid",e)}const LM=Zb("MuiChartsGrid",["root","line","horizontalLine","verticalLine"]),RM=bm("g",{name:"MuiChartsGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${LM.verticalLine}`]:t.verticalLine},{[`&.${LM.horizontalLine}`]:t.horizontalLine},t.root]})({}),DM=bm("line",{name:"MuiChartsGrid",slot:"Line"})(({theme:e})=>({stroke:(e.vars||e).palette.divider,shapeRendering:"crispEdges",strokeWidth:1}));function $M(t){const{instance:n}=$x(),{axis:r,start:i,end:o,classes:a}=t,{scale:s,tickNumber:l,tickInterval:c,tickSpacing:u}=r,d=kS({scale:s,tickNumber:l,tickInterval:c,tickSpacing:u,direction:"x",ordinalTimeTicks:"ordinalTimeTicks"in r?r.ordinalTimeTicks:void 0});return(0,O.jsx)(e.Fragment,{children:d.map(({value:e,offset:t})=>n.isXInside(t)?(0,O.jsx)(DM,{y1:i,y2:o,x1:t,x2:t,className:a.verticalLine},`vertical-${e?.getTime?.()??e}`):null)})}function zM(t){const{instance:n}=$x(),{axis:r,start:i,end:o,classes:a}=t,{scale:s,tickNumber:l,tickInterval:c,tickSpacing:u}=r,d=kS({scale:s,tickNumber:l,tickInterval:c,tickSpacing:u,direction:"y",ordinalTimeTicks:"ordinalTimeTicks"in r?r.ordinalTimeTicks:void 0});return(0,O.jsx)(e.Fragment,{children:d.map(({value:e,offset:t})=>n.isYInside(t)?(0,O.jsx)(DM,{y1:t,y2:t,x1:i,x2:o,className:a.horizontalLine},`horizontal-${e?.getTime?.()??e}`):null)})}const NM=["vertical","horizontal"],_M=({classes:e})=>uI({root:["root"],verticalLine:["line","verticalLine"],horizontalLine:["line","horizontalLine"]},jM,e);function FM(e){const t=Lh({props:e,name:"MuiChartsGrid"}),n=Nx(),{vertical:r,horizontal:i}=t,o=tt(t,NM),{xAxis:a,xAxisIds:s}=_x(),{yAxis:c,yAxisIds:u}=Fx(),d=_M(t),p=c[u[0]],h=a[s[0]];return(0,O.jsxs)(RM,l({},o,{className:d.root,children:[r&&(0,O.jsx)($M,{axis:h,start:n.top,end:n.height+n.top,classes:d}),i&&(0,O.jsx)(zM,{axis:p,start:n.left,end:n.width+n.left,classes:d})]}))}function HM(e){return Xb("MuiChartsTooltip",e)}const BM=Zb("MuiChartsTooltip",["root","paper","table","row","cell","mark","markContainer","labelCell","valueCell","axisValueCell"]),VM=e=>uI({root:["root"],paper:["paper"],table:["table"],row:["row"],cell:["cell"],mark:["mark"],markContainer:["markContainer"],labelCell:["labelCell"],valueCell:["valueCell"],axisValueCell:["axisValueCell"]},HM,e);function UM(){return zx().use(ft)}const YM=ae(e=>e.tooltip,e=>e?.item??null),WM=ae(YM,e=>null!==e),GM=ae(Cs,YM,cI,(e,t,n)=>"keyboard"===e?n:t??null),KM=ae(Cs,WM,rI,(e,t,n)=>"keyboard"===e?n:t),qM=le(GM,ls,cs,jb,Lb,ft,function(e,{axis:t,axisIds:n},{axis:r,axisIds:i},o,a,s){if(!e)return{};const l=s[e.type]?.series[e.seriesId];if(!l)return{};const c={rotationAxes:o,radiusAxes:a},u=ma(l)?l.xAxisId??n[0]:void 0,d=ma(l)?l.yAxisId??i[0]:void 0;return void 0!==u&&(c.x=t[u]),void 0!==d&&(c.y=r[d]),c}),XM=le(GM,he,ht,ft,gt,qM,function(e,t,n,r,i,o,a="top"){if(!e)return null;const s=r[e.type]?.series[e.seriesId];return s?n[s.type].tooltipItemPositionGetter?.({series:r,seriesLayout:i,drawingArea:t,axesConfig:o,identifier:e,placement:a})??null:null});function ZM(){const e=zx(),t=e.use(GM),n=e.use(ht),r=UM(),{xAxis:i,xAxisIds:o}=_x(),{yAxis:a,yAxisIds:s}=Fx(),{zAxis:l,zAxisIds:c}=Kx(),{rotationAxis:u,rotationAxisIds:d}=Vx();if(!t)return null;const p=r[t.type]?.series[t.seriesId];if(!p)return null;const h=ma(p)?p.xAxisId??o[0]:void 0,m=ma(p)?p.yAxisId??s[0]:void 0,f="zAxisId"in p?p.zAxisId??c[0]:c[0],g=d[0],y=n[p.type].colorProcessor?.(p,void 0!==h?i[h]:void 0,void 0!==m?a[m]:void 0,void 0!==f?l[f]:void 0)??(()=>""),v={};return void 0!==h&&(v.x=i[h]),void 0!==m&&(v.y=a[m]),void 0!==g&&(v.rotation=u[g]),n[p.type].tooltipGetter({series:p,axesConfig:v,getColor:y,identifier:t})}const JM=bm("div",{name:"MuiChartsTooltip",slot:"Container",overridesResolver:(e,t)=>t.paper})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,borderRadius:(e.vars||e).shape?.borderRadius,border:`solid ${(e.vars||e).palette.divider} 1px`})),QM=bm("table",{name:"MuiChartsTooltip",slot:"Table"})(({theme:e})=>({borderSpacing:0,[`& .${BM.markContainer}`]:{display:"inline-block",width:`calc(20px + ${e.spacing(1.5)})`,verticalAlign:"middle"},"& caption":{borderBottom:`solid ${(e.vars||e).palette.divider} 1px`,padding:e.spacing(.5,1.5),textAlign:"start",whiteSpace:"nowrap","& span":{marginRight:e.spacing(1.5)}}})),eC=bm("tr",{name:"MuiChartsTooltip",slot:"Row"})(({theme:e})=>({"tr:first-of-type& td":{paddingTop:e.spacing(.5)},"tr:last-of-type& td":{paddingBottom:e.spacing(.5)}})),tC=bm(Nv,{name:"MuiChartsTooltip",slot:"Cell"})(({theme:e})=>({verticalAlign:"middle",color:(e.vars||e).palette.text.secondary,textAlign:"start",[`&.${BM.cell}`]:{paddingLeft:e.spacing(1),paddingRight:e.spacing(1)},[`&.${BM.labelCell}`]:{whiteSpace:"nowrap",fontWeight:e.typography.fontWeightRegular},[`&.${BM.valueCell}, &.${BM.axisValueCell}`]:{color:(e.vars||e).palette.text.primary,fontWeight:e.typography.fontWeightMedium},[`&.${BM.valueCell}`]:{paddingLeft:e.spacing(1.5),paddingRight:e.spacing(1.5)},"td:first-of-type&, th:first-of-type&":{paddingLeft:e.spacing(1.5)},"td:last-of-type&, th:last-of-type&":{paddingRight:e.spacing(1.5)}}));function nC(e){return Xb("MuiChartsLabelMark",e)}const rC=Zb("MuiChartsLabelMark",["root","line","square","circle","mask","fill"]);function iC(e,t,n=!1){const r={...t};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const o=i;if("components"===o||"slots"===o)r[o]={...e[o],...r[o]};else if("componentsProps"===o||"slotProps"===o){const i=e[o],a=t[o];if(a)if(i){r[o]={...a};for(const e in i)if(Object.prototype.hasOwnProperty.call(i,e)){const t=e;r[o][t]=iC(i[t],a[t],n)}}else r[o]=a;else r[o]=i||{}}else"className"===o&&n&&t.className?r.className=Hh(e?.className,t?.className):"style"===o&&n&&t.style?r.style={...e?.style,...t?.style}:void 0===r[o]&&(r[o]=e[o])}return r}const oC=(t,n,r)=>e.forwardRef(function(i,o){const a=Lh({props:i,name:t}),s=iC("function"==typeof n.defaultProps?n.defaultProps(a):n.defaultProps??{},a),c=xm(),u=n.classesResolver?.(s,c),d=e.forwardRef(r);return(0,O.jsx)(d,l({},s,{classes:u,ref:o}))}),aC=["type","color","className","classes"],sC=bm("div",{name:"MuiChartsLabelMark",slot:"Root"})(()=>({display:"flex",width:14,height:14,[`&.${rC.line}`]:{width:16,height:"unset",alignItems:"center",[`.${rC.mask}`]:{height:4,width:"100%",borderRadius:1,overflow:"hidden"}},[`&.${rC.square}`]:{height:13,width:13,borderRadius:2,overflow:"hidden"},[`&.${rC.circle}`]:{height:15,width:15},svg:{display:"block"},[`& .${rC.mask} > *`]:{height:"100%",width:"100%"},[`& .${rC.mask}`]:{height:"100%",width:"100%"}})),lC=oC("MuiChartsLabelMark",{defaultProps:{type:"square"},classesResolver:e=>{const{type:t}=e;return uI({root:"function"==typeof t?["root"]:["root",t],mask:["mask"],fill:["fill"]},nC,e.classes)}},function(e,t){const{type:n,color:r,className:i,classes:o}=e,a=tt(e,aC),s=n;return(0,O.jsx)(sC,l({className:Hh(o?.root,i),ownerState:e,"aria-hidden":"true",ref:t},a,{children:(0,O.jsx)("div",{className:o?.mask,children:"function"==typeof s?(0,O.jsx)(s,{className:o?.fill,color:r}):(0,O.jsx)("svg",{viewBox:"0 0 24 24",preserveAspectRatio:"line"===n?"none":void 0,children:"circle"===n?(0,O.jsx)("circle",{className:o?.fill,r:"12",cx:"12",cy:"12",fill:r}):(0,O.jsx)("rect",{className:o?.fill,width:"24",height:"24",fill:r})})})}))});function cC(e){const{classes:t,sx:n}=e,r=ZM(),i=VM(t);if(!r)return null;if("values"in r){const{label:e,color:t,markType:o}=r;return(0,O.jsx)(JM,{sx:n,className:i.paper,children:(0,O.jsxs)(QM,{className:i.table,children:[(0,O.jsxs)(Nv,{component:"caption",children:[(0,O.jsx)("div",{className:i.markContainer,children:(0,O.jsx)(lC,{type:o,color:t,className:i.mark})}),e]}),(0,O.jsx)("tbody",{children:r.values.map(({formattedValue:e,label:t})=>(0,O.jsxs)(eC,{className:i.row,children:[(0,O.jsx)(tC,{className:Hh(i.labelCell,i.cell),component:"th",children:t}),(0,O.jsx)(tC,{className:Hh(i.valueCell,i.cell),component:"td",children:e})]},t))})]})})}const{color:o,label:a,formattedValue:s,markType:l}=r;return(0,O.jsx)(JM,{sx:n,className:i.paper,children:(0,O.jsx)(QM,{className:i.table,children:(0,O.jsx)("tbody",{children:(0,O.jsxs)(eC,{className:i.row,children:[(0,O.jsxs)(tC,{className:Hh(i.labelCell,i.cell),component:"th",children:[(0,O.jsx)("div",{className:i.markContainer,children:(0,O.jsx)(lC,{type:l,color:o,className:i.mark})}),a]}),(0,O.jsx)(tC,{className:Hh(i.valueCell,i.cell),component:"td",children:s})]})})})})}function uC(t,n,r,i,o){const[a,s]=e.useState(()=>o&&r?r(t).matches:i?i(t).matches:n);return qm(()=>{if(!r)return;const e=r(t),n=()=>{s(e.matches)};return n(),e.addEventListener("change",n),()=>{e.removeEventListener("change",n)}},[t,r]),a}const dC={...e}.useSyncExternalStore;function pC(t,n,r,i,o){const a=e.useCallback(()=>n,[n]),s=e.useMemo(()=>{if(o&&r)return()=>r(t).matches;if(null!==i){const{matches:e}=i(t);return()=>e}return a},[a,t,i,o,r]),[l,c]=e.useMemo(()=>{if(null===r)return[a,()=>()=>{}];const e=r(t);return[()=>e.matches,t=>(e.addEventListener("change",t),()=>{e.removeEventListener("change",t)})]},[a,r,t]);return dC(c,l,s)}function hC(e={}){const{themeId:t}=e;return function(e,n={}){let r=qd();r&&t&&(r=r[t]||r);const i="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:o=!1,matchMedia:a=(i?window.matchMedia:null),ssrMatchMedia:s=null,noSsr:l=!1}=uc({name:"MuiUseMediaQuery",props:n,theme:r});let c="function"==typeof e?e(r):e;return c=c.replace(/^@media( ?)/m,""),c.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join("\n")),(void 0!==dC?pC:uC)(c,o,a,s,l)}}hC();const mC=hC({themeId:jh}),fC=()=>mC("@media (pointer: fine)",{defaultMatches:!0}),gC=(e,t)=>t,yC=(e,t)=>t;function vC(e,t,n){return Array.isArray(n)?n.map(n=>Nb(t.axis[n],e)):Nb(t.axis[n],e)}const bC=ae(Ss,Ms,Rb,(e,t,n)=>null===e||null===t?null:Db(n)(e,t)),xC=ae(bC,jb,gC,(e,t,n=t.axisIds[0])=>null===e?null:vC(e,t,n)),IC=ae(bC,jb,yC,(e,t,n=t.axisIds)=>null===e?null:vC(e,t,n)),wC=(ae(jb,xC,gC,(e,t,n=e.axisIds[0])=>{if(null===t||-1===t||0===e.axisIds.length)return null;const r=e.axis[n]?.data;return r?r[t]:null}),ae(jb,IC,yC,(e,t,n=e.axisIds)=>null===t?null:n.map((n,r)=>{const i=t[r];return-1===i?null:e.axis[n].data?.[i]})),se({memoizeOptions:{resultEqualityCheck:Ps}})(IC,jb,(e,t)=>null===e?[]:t.axisIds.map((t,n)=>({axisId:t,dataIndex:e[n]})).filter(({axisId:e,dataIndex:n})=>t.axis[e].triggerTooltip&&n>=0))),kC=ae(wC,e=>e.length>0);function SC(e,t,n){const r=e.data?.[t]??null,i=(e.valueFormatter??(t=>"utc"===e.scaleType?function(e){return e instanceof Date?e.toUTCString():e.toLocaleString()}(t):t.toLocaleString()))(r,{location:"tooltip",scale:e.scale});return{axisDirection:n,axisId:e.id,mainAxis:e,dataIndex:t,axisValue:r,axisFormattedValue:i,seriesItems:[]}}function MC(t){return function(t={}){const{multipleAxes:n,directions:r}=t,i=Hx(),o=Bx(),a=function(){const e=zx(),{axis:t,axisIds:n}=e.use(jb);return t[n[0]]}(),s=zx(),l=s.use(zs),c=s.use(Ns),u=s.use(wC),d=UM(),{xAxis:p}=_x(),{yAxis:h}=Fx(),{zAxis:m,zAxisIds:f}=Kx(),{rotationAxis:g}=Vx(),y=function(){const t=zx().use(ht);return e.useMemo(()=>{const e={};return Object.keys(t).forEach(n=>{e[n]=t[n].colorProcessor}),e},[t])}();if(0===l.length&&0===c.length&&0===u.length)return null;const v=[];return(void 0===r||r.includes("x"))&&l.forEach(({axisId:e,dataIndex:t})=>{!n&&v.length>1||v.push(SC(p[e],t,"x"))}),(void 0===r||r.includes("y"))&&c.forEach(({axisId:e,dataIndex:t})=>{!n&&v.length>1||v.push(SC(h[e],t,"y"))}),(void 0===r||r.includes("rotation"))&&u.forEach(({axisId:e,dataIndex:t})=>{!n&&v.length>1||v.push(SC(g[e],t,"rotation"))}),Object.keys(d).filter(ha).forEach(e=>{const t=d[e];return t?t.seriesOrder.forEach(n=>{const r=t.series[n],a=r.xAxisId??i.id,s=r.yAxisId??o.id,l=v.findIndex(({axisDirection:e,axisId:t})=>"x"===e&&t===a||"y"===e&&t===s);if(l>=0){const t="zAxisId"in r?r.zAxisId:f[0],{dataIndex:i}=v[l],o=y[e]?.(r,p[a],h[s],t?m[t]:void 0)(i)??"",c=r.data[i]??null,u=r.valueFormatter(c,{dataIndex:i}),d=yl(r.label,"tooltip")??null;v[l].seriesItems.push({seriesId:n,color:o,value:c,formattedValue:u,formattedLabel:d,markType:r.labelMarkType})}}):[]}),Object.keys(d).filter(Pb).forEach(e=>{const t=d[e];return t?t.seriesOrder.forEach(n=>{const r=t.series[n],i=r.rotationAxisId??a?.id,o=v.findIndex(({axisDirection:e,axisId:t})=>"rotation"===e&&t===i);if(o>=0){const{dataIndex:t}=v[o],i=y[e]?.(r)(t)??"",a=r.data[t]??null,s=r.valueFormatter(a,{dataIndex:t}),l=yl(r.label,"tooltip")??null;v[o].seriesItems.push({seriesId:n,color:i,value:a,formattedValue:s,formattedLabel:l,markType:r.labelMarkType})}}):[]}),n?v:0===v.length?v[0]:null}(l({},t,{multipleAxes:!0}))}function CC(e){const t=VM(e.classes),n=MC();return null===n?null:(0,O.jsx)(JM,{sx:e.sx,className:t.paper,children:n.map(({axisId:e,mainAxis:n,axisValue:r,axisFormattedValue:i,seriesItems:o})=>(0,O.jsxs)(QM,{className:t.table,children:[null!=r&&!n.hideTooltip&&(0,O.jsx)(Nv,{component:"caption",children:i}),(0,O.jsx)("tbody",{children:o.map(({seriesId:e,color:n,formattedValue:r,formattedLabel:i,markType:o})=>null==r?null:(0,O.jsxs)(eC,{className:t.row,children:[(0,O.jsxs)(tC,{className:Hh(t.labelCell,t.cell),component:"th",children:[(0,O.jsx)("div",{className:t.markContainer,children:(0,O.jsx)(lC,{type:o,color:n,className:t.mark})}),i||null]}),(0,O.jsx)(tC,{className:Hh(t.valueCell,t.cell),component:"td",children:r})]},e))})]},e))})}const PC=function(t){const{children:n,defer:r=!1,fallback:i=null}=t,[o,a]=e.useState(!1);return qm(()=>{r||a(!0)},[r]),e.useEffect(()=>{r&&a(!0)},[r]),o?n:i},EC=["trigger","position","anchor","classes","children"],TC=()=>!1,AC=()=>null,OC=bm(Tg,{name:"MuiChartsTooltip",slot:"Root"})(({theme:e})=>({pointerEvents:"none",zIndex:e.zIndex.modal}));function jC(t){const n=Lh({props:t,name:"MuiChartsTooltipContainer"}),{trigger:r="axis",position:i,anchor:o="pointer",classes:a,children:s}=n,c=tt(n,EC),u=eI(),d=e.useRef(null),p=VM(a),h=function(){const t=eI(),[n,r]=e.useState(null);return e.useEffect(()=>{const e=t.current;if(null===e)return()=>{};const n=e=>{"mouse"!==e.pointerType&&r(null)},i=e=>{r({pointerType:e.pointerType})};return e.addEventListener("pointerenter",i),e.addEventListener("pointerup",n),()=>{e.removeEventListener("pointerenter",i),e.removeEventListener("pointerup",n)}},[t]),n}(),m=fC(),f=e.useRef(null),g=st(()=>({x:0,y:0})),y=function(){const e=zx(),t=e.use(Ab),n=e.use(ce);return void 0!==t?"polar":void 0!==n?"cartesian":"none"}(),v=zx(),b=v.use(Sb),x=v.use(function(e,t,n){return n?TC:"item"===e?KM:"polar"===t?kC:"cartesian"===t?_s:TC}(r,y,b)),I="keyboard"===v.use(Cs)?"node":o,w=v.use("item"===r&&"node"===I?XM:AC,i);e.useEffect(()=>{const e=u.current;if(null===e)return()=>{};if(null!==w)return;const t=function(){let e,t;const n=()=>{t=null,((e,t)=>{g.current={x:e,y:t},f.current?.update()})(...e)};function r(...r){e=r,t||(t=requestAnimationFrame(n))}return r.clear=()=>{t&&(cancelAnimationFrame(t),t=null)},r}(),n=e=>{t(e.clientX,e.clientY)};return e.addEventListener("pointerdown",n),e.addEventListener("pointermove",n),e.addEventListener("pointerenter",n),()=>{e.removeEventListener("pointerdown",n),e.removeEventListener("pointermove",n),e.removeEventListener("pointerenter",n),t.clear()}},[u,g,w]);const k=e.useMemo(()=>({getBoundingClientRect:()=>({x:g.current.x,y:g.current.y,top:g.current.y,left:g.current.x,right:g.current.x,bottom:g.current.y,width:0,height:0,toJSON:()=>""})}),[g]),S="mouse"===h?.pointerType||m,M="touch"===h?.pointerType||!m,C=e.useMemo(()=>[{name:"offset",options:{offset:()=>M?[0,64]:[0,8]}},...S?[]:[{name:"flip",options:{fallbackPlacements:["top-end","top-start","bottom-end","bottom"]}}],{name:"preventOverflow",options:{altAxis:!0}}],[S,M]);return"none"===r?null:(null!==w&&d.current&&(d.current.setAttribute("x",String(w.x)),d.current.setAttribute("y",String(w.y))),(0,O.jsxs)(e.Fragment,{children:[u.current&&Tm.createPortal((0,O.jsx)("rect",{ref:d,display:"hidden"}),u.current),(0,O.jsx)(PC,{children:x&&(0,O.jsx)(OC,l({},c,{className:p?.root,open:x,placement:c.placement??i??(null!==h&&S?"right-start":"top"),popperRef:f,anchorEl:w?d.current:k,modifiers:C,children:s}))})]}))}function LC(e){const{classes:t,trigger:n="axis"}=e,r=VM(t);return(0,O.jsx)(jC,l({},e,{classes:t,children:"axis"===n?(0,O.jsx)(CC,{classes:r}):(0,O.jsx)(cC,{classes:r})}))}function RC(e){return Xb("MuiChartsAxisHighlight",e)}Zb("MuiChartsAxisHighlight",["root"]);const DC=bm("path",{name:"MuiChartsAxisHighlight",slot:"Root"})(({theme:e})=>({pointerEvents:"none",variants:[{props:{axisHighlight:"band"},style:l({fill:"white",fillOpacity:.1},e.applyStyles("light",{fill:"gray"}))},{props:{axisHighlight:"line"},style:l({strokeDasharray:"5 2",stroke:"#ffffff"},e.applyStyles("light",{stroke:"#000000"}))}]}));function $C(t){const{type:n,classes:r}=t,{left:i,width:o}=Nx(),a=zx(),s=a.use(uS),l=a.use(cs);return 0===s.length?null:s.map(({axisId:t,value:a})=>{const s=l.axis[t].scale,c=ck(s),u="band"===n&&null!==a&&fa(s);return(0,O.jsxs)(e.Fragment,{children:[u&&void 0!==s(a)&&(0,O.jsx)(DC,{d:`M ${i} ${s(a)-(s.step()-s.bandwidth())/2} l 0 ${s.step()} l ${o} 0 l 0 ${-s.step()} Z`,className:r.root,ownerState:{axisHighlight:"band"}}),"line"===n&&null!==a&&(0,O.jsx)(DC,{d:`M ${i} ${c(a)} L ${i+o} ${c(a)}`,className:r.root,ownerState:{axisHighlight:"line"}})]},`${t}-${a}`)})}function zC(t){const{type:n,classes:r}=t,{top:i,height:o}=Nx(),a=zx(),s=a.use(cS),l=a.use(ls);return 0===s.length?null:s.map(({axisId:t,value:a})=>{const s=l.axis[t].scale,c=ck(s),u="band"===n&&null!==a&&fa(s);return(0,O.jsxs)(e.Fragment,{children:[u&&void 0!==s(a)&&(0,O.jsx)(DC,{d:`M ${s(a)-(s.step()-s.bandwidth())/2} ${i} l ${s.step()} 0 l 0 ${o} l ${-s.step()} 0 Z`,className:r.root,ownerState:{axisHighlight:"band"}}),"line"===n&&null!==a&&(0,O.jsx)(DC,{d:`M ${c(a)} ${i} L ${c(a)} ${i+o}`,className:r.root,ownerState:{axisHighlight:"line"}})]},`${t}-${a}`)})}const NC=()=>uI({root:["root"]},RC);function _C(t){const{x:n,y:r}=t,i=NC();return(0,O.jsxs)(e.Fragment,{children:[n&&"none"!==n&&(0,O.jsx)(zC,{type:n,classes:i}),r&&"none"!==r&&(0,O.jsx)($C,{type:r,classes:i})]})}function FC(e,t){return Object.keys(e).flatMap(n=>{const r=t[n].legendGetter;return void 0===r?[]:r(e[n])})}function HC(e){return Xb("MuiChartsLegend",e)}const BC=Zb("MuiChartsLegend",["root","item","series","mark","label","vertical","horizontal"]),VC=["slots","slotProps"],UC=["ownerState"];function YC(e){return Xb("MuiChartsLabel",e)}Zb("MuiChartsLabel",["root"]);const WC=["children","className","classes"],GC=oC("MuiChartsLabel",{classesResolver:e=>uI({root:["root"]},YC,e.classes)},function(e,t){const{children:n,className:r,classes:i}=e,o=tt(e,WC);return(0,O.jsx)("span",l({className:Hh(i?.root,r),ref:t},o,{children:n}))}),KC=["direction","onItemClick","className","classes"],qC=bm("ul",{name:"MuiChartsLegend",slot:"Root"})(({ownerState:e,theme:t})=>l({},t.typography.caption,{color:(t.vars||t).palette.text.primary,lineHeight:"100%",display:"flex",flexDirection:"vertical"===e.direction?"column":"row",alignItems:"vertical"===e.direction?void 0:"center",flexShrink:0,gap:t.spacing(2),listStyleType:"none",paddingInlineStart:0,marginBlock:t.spacing(1),marginInline:t.spacing(1),flexWrap:"wrap",li:{display:"horizontal"===e.direction?"inline-flex":void 0},[`button.${BC.series}`]:{background:"none",border:"none",padding:0,fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",letterSpacing:"inherit",color:"inherit"},[`& .${BC.series}`]:{display:"vertical"===e.direction?"flex":"inline-flex",alignItems:"center",gap:t.spacing(1)},gridArea:"legend"})),XC=((t,n,r,i)=>{function o(e,t){const o=Lh({props:e,name:"MuiChartsLegend"}),a=iC("function"==typeof r.defaultProps?r.defaultProps(o):r.defaultProps??{},o),s=a,{slots:c,slotProps:u}=s,d=tt(s,VC),p=xm(),h=r.classesResolver?.(a,p),m=c?.[n]??i,f=r.propagateSlots&&!c?.[n],g=yI({elementType:m,externalSlotProps:u?.[n],additionalProps:l({},d,{classes:h},f&&{slots:c,slotProps:u}),ownerState:{}}),y=l({},tt(g,UC));for(const e of r.omitProps??[])delete y[e];return(0,O.jsx)(m,l({},y,{ref:t}))}return e.forwardRef(o)})(0,"legend",{defaultProps:{direction:"horizontal"},omitProps:["position"],classesResolver:e=>{const{classes:t,direction:n}=e;return uI({root:["root",n],item:["item"],mark:["mark"],label:["label"],series:["series"]},HC,t)}},e.forwardRef(function(e,t){const n={items:FC(UM(),zx().use(ht))},{onItemClick:r,className:i,classes:o}=e,a=tt(e,KC);if(0===n.items.length)return null;const s=r?"button":"div";return(0,O.jsx)(qC,l({className:Hh(o?.root,i),ref:t},a,{ownerState:e,children:n.items.map((e,t)=>(0,O.jsx)("li",{className:o?.item,"data-series":e.seriesId,children:(0,O.jsxs)(s,{className:o?.series,role:r?"button":void 0,type:r?"button":void 0,onClick:r?n=>{return r(n,{type:"series",color:(i=e).color,label:i.label,seriesId:i.seriesId,itemId:i.itemId,dataIndex:i.dataIndex},t);var i}:void 0,children:[(0,O.jsx)(lC,{className:o?.mark,color:e.color,type:e.markType}),(0,O.jsx)(GC,{className:o?.label,children:e.label})]})},`${e.seriesId}-${e.dataIndex}`))}))}));function ZC(e){const{id:t,offset:n}=e,{left:r,top:i,width:o,height:a}=Nx(),s=l({top:0,right:0,bottom:0,left:0},n);return(0,O.jsx)("clipPath",{id:t,children:(0,O.jsx)("rect",{x:r-s.left,y:i-s.top,width:o+s.left+s.right,height:a+s.top+s.bottom})})}function JC(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${n} for the full message.`}function QC(e,t=0,n=1){return function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}(e,t,n)}function eP(e){if(e.type)return e;if("#"===e.charAt(0))return eP(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(JC(9,e));let r,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),r=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(JC(10,r))}else i=i.split(",");return i=i.map(e=>parseFloat(e)),{type:n,values:i,colorSpace:r}}function tP(e,t){return e=eP(e),t=QC(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,function(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}(e)}let nP=0;const rP={...t}.useId;function iP(t){if(void 0!==rP){const e=rP();return t??e}return function(t){const[n,r]=e.useState(t),i=t||n;return e.useEffect(()=>{null==n&&(nP+=1,r(`mui-${nP}`))},[n]),i}(t)}function oP(e,t){return"x"===e?{left:0,top:0,width:t.width,height:vt,right:t.width,bottom:vt}:{left:0,top:0,width:vt,height:t.height,right:vt,bottom:t.height}}const aP=le(ce,he,qa,is,function(e,t,n,r,i){const o=e?.some(e=>e.id===i),a=oP(o?"x":"y",t),s=n[i],l={};return e?.forEach(e=>{const t=e,n=r[t.id].copy(),i=Ca(a,"x",t),o=Ea(i,[s.minStart,s.maxEnd]);n.range(o),l[t.id]=n}),l}),sP=le(ft,ht,qa,he,aP,Qa,(e,t,n,r,i,{axes:o,domains:a},s)=>{const l=o?.some(e=>e.id===s),c=oP(l?"x":"y",r),u=n[s],d=ya({scales:i,drawingArea:c,formattedSeries:e,axis:o,seriesConfig:t,axisDirection:"x",zoomMap:new Map([[s,{axisId:s,start:u.minStart,end:u.maxEnd}]]),domains:a});return d.axis[s]?{[s]:d.axis[s]}:d.axis}),lP=le(ue,he,qa,os,function(e,t,n,r,i){const o=e?.some(e=>e.id===i),a=oP(o?"y":"x",t),s=n[i],l={};return e?.forEach(e=>{const t=e,n=r[t.id].copy();let i=Ca(a,"y",t);fa(n)&&(i=i.reverse());const o=Ea(i,[s.minStart,s.maxEnd]);n.range(o),l[t.id]=n}),l}),cP=le(ft,ht,qa,he,lP,es,(e,t,n,r,i,{axes:o,domains:a},s)=>{const l=o?.some(e=>e.id===s),c=oP(l?"y":"x",r),u=n[s],d=ya({scales:i,drawingArea:c,formattedSeries:e,axis:o,seriesConfig:t,axisDirection:"y",zoomMap:new Map([[s,{axisId:s,start:u.minStart,end:u.maxEnd}]]),domains:a});return d.axis[s]?{[s]:d.axis[s]}:d.axis}),uP=(e,t)=>t===("x"===e?W:G)?`The first \`${e}Axis\``:`The ${e}-axis with id "${t}"`;function dP(){return ak("bar")}function pP(e,t,n){const r=dP()??{series:{},stackingGroups:[],seriesOrder:[]},i=_x().xAxisIds[0],o=Fx().yAxisIds[0],a=Xx(),{series:s,stackingGroups:c}=r,u={},d=c.flatMap(({ids:r},d)=>{const p=e.left,h=e.left+e.width,m=e.top,f=e.top+e.height,g=new Map,y=new Map;return r.map(e=>{const r=s[e].xAxisId??i,v=s[e].yAxisId??o,b=s[e].layout,x=t[r],I=n[v],w="vertical"===s[e].layout,k=(w?I.reverse:x.reverse)??!1;!function(e,t,n,r,i,o,a){const s=i[r],l=a[o],c=e?s:l,u=e?l:s,d=e?r:o,p=e?o:r,h=e?"x":"y",m=e?"y":"x";if("band"!==c.scaleType)throw new Error(`MUI X Charts: ${uP(h,d)} should be of type "band" to display the bar series of id "${t}".`);if(void 0===c.data)throw new Error(`MUI X Charts: ${uP(h,d)} should have data property.`);if("band"===u.scaleType||"point"===u.scaleType)throw new Error(`MUI X Charts: ${uP(m,p)} should be a continuous type to display the bar series of id "${t}".`)}(w,e,s[e].stackedData.length,r,t,v,n);const S=w?x:I,M=x.scale,C=I.scale,P=Math.round(M(0)??0),E=Math.round(C(0)??0),T=bl(s[e],t[r],n[v]),A=[];for(let t=0;th||i.x+i.widthf||i.y+i.height0?(v&&delete v.borderRadiusSide,i.borderRadiusSide=w?"top":"right",y.set(t,i)):S<0&&(o&&delete o.borderRadiusSide,i.borderRadiusSide=w?"bottom":"left",g.set(t,i)),u[i.maskId]||(u[i.maskId]={id:i.maskId,width:0,height:0,hasNegative:!1,hasPositive:!1,layout:b,xOrigin:P,yOrigin:E,x:0,y:0});const M=u[i.maskId];M.width="vertical"===b?i.width:M.width+i.width,M.height="vertical"===b?M.height+i.height:i.height,M.x=Math.min(0===M.x?1/0:M.x,i.x),M.y=Math.min(0===M.y?1/0:M.y,i.y);const C=i.value??0;M.hasNegative=M.hasNegative||(k?C>0:C<0),M.hasPositive=M.hasPositive||(k?C<0:C>0),A.push(i)}return{seriesId:e,barLabel:s[e].barLabel,barLabelPlacement:s[e].barLabelPlacement,data:A,layout:b,xOrigin:P,yOrigin:E}})});return{completedData:d,masksData:Object.values(u)}}function hP(e){return Xb("MuiBarElement",e)}const mP=Zb("MuiBarElement",["root","highlighted","faded","series"]);function fP(e,t){const n=Tn(e.x,t.x),r=Tn(e.y,t.y),i=Tn(e.width,t.width),o=Tn(e.height,t.height);return e=>({x:n(e),y:r(e),width:i(e),height:o(e)})}const gP=["ownerState","skipAnimation","id","dataIndex","xOrigin","yOrigin"];function yP(e){const{ownerState:t}=e,n=tt(e,gP),r=function(e){const t={x:"vertical"===e.layout?e.x:e.xOrigin,y:"vertical"===e.layout?e.yOrigin:e.y,width:"vertical"===e.layout?e.width:0,height:"vertical"===e.layout?0:e.height};return aw({x:e.x,y:e.y,width:e.width,height:e.height},{createInterpolator:fP,applyProps(e,t){e.setAttribute("x",t.x.toString()),e.setAttribute("y",t.y.toString()),e.setAttribute("width",t.width.toString()),e.setAttribute("height",t.height.toString())},transformProps:e=>e,initialProps:t,skip:e.skipAnimation,ref:e.ref})}(e);return(0,O.jsx)("rect",l({},n,{filter:t.isHighlighted?"brightness(120%)":void 0,opacity:t.isFaded?.3:1,"data-highlighted":t.isHighlighted||void 0,"data-faded":t.isFaded||void 0},r))}const vP=["id","dataIndex","classes","color","slots","slotProps","style","onClick","skipAnimation","layout","x","xOrigin","y","yOrigin","width","height"];function bP(t){const{id:n,dataIndex:r,classes:i,color:o,slots:a,slotProps:s,style:c,onClick:u,skipAnimation:d,layout:p,x:h,xOrigin:m,y:f,yOrigin:g,width:y,height:v}=t,b=tt(t,vP),x=e.useMemo(()=>({type:"bar",seriesId:n,dataIndex:r}),[n,r]),I=bI(x),{isFaded:w,isHighlighted:k}=zI(x),S=(M=e.useMemo(()=>({type:"bar",seriesId:n,dataIndex:r}),[n,r]),zx().use(nI,M));var M;const C={id:n,dataIndex:r,classes:i,color:o,isFaded:w,isHighlighted:k,isFocused:S},P=(e=>{const{classes:t,id:n,isHighlighted:r,isFaded:i}=e;return uI({root:["root",`series-${n}`,r&&"highlighted",i&&"faded"]},hP,t)})(C),E=a?.bar??yP,T=yI({elementType:E,externalSlotProps:s?.bar,externalForwardedProps:b,additionalProps:l({},I,{id:n,dataIndex:r,color:o,x:h,xOrigin:m,y:f,yOrigin:g,width:y,height:v,style:c,onClick:u,cursor:u?"pointer":"unset",stroke:"none",fill:o,skipAnimation:d,layout:p}),className:P.root,ownerState:C});return(0,O.jsx)(E,l({},T))}function xP(t,n,r,i){return e.useMemo(()=>{const e=ck(n),o=ck(r),a=[];for(let n=0;ne>=s&&e<=s+c&&t>=l&&t<=l+u,[u,c,s,l]),p=xP(n,r,i,d);return(0,O.jsx)("g",{"data-series":n.id,children:p.map((e,t)=>(0,O.jsx)(kP,{dataIndex:e.dataIndex,color:a?a(t):o,x:e.x,y:e.y,seriesId:n.id,size:n.preview.markerSize,isHighlighted:!1,isFaded:!1},e.id??e.dataIndex))})}const MP=["id","color","gradientId","onClick"],CP=bm("g",{name:"MuiAreaPlot",slot:"Root"})({});function PP({axisId:e}){const t=function(e){const t=zx();return pk(t.use(sP,e),t.use(cP,e))}(e);return(0,O.jsx)(CP,{children:t.map(({d:e,seriesId:t,color:n,area:r,gradientId:i})=>!!r&&(0,O.jsx)(EP,{id:t,d:e,color:n,gradientId:i},t))})}function EP(e){let{id:t,color:n,gradientId:r}=e,i=tt(e,MP);return(0,O.jsx)("path",l({fill:r?`url(#${r})`:n,stroke:"none","data-series":t},i))}const TP=["id","color","gradientId","onClick"];function AP({axisId:e}){const t=function(e){const t=zx();return Sk(t.use(sP,e),t.use(cP,e))}(e);return(0,O.jsx)("g",{children:t.map(({d:e,seriesId:t,color:n,gradientId:r})=>(0,O.jsx)(OP,{id:t,d:e,color:n,gradientId:r},t))})}function OP(e){let{id:t,color:n,gradientId:r}=e,i=tt(e,TP);return(0,O.jsx)("path",l({stroke:r?`url(#${r})`:n,strokeWidth:2,strokeLinejoin:"round",fill:"none","data-series":t},i))}const jP=new Map([["bar",function(e){const t={left:e.x,top:e.y,width:e.width,height:e.height,right:e.x+e.width,bottom:e.y+e.height},{completedData:n}=function(e,t){const n=zx();return pP(t,n.use(sP,e),n.use(cP,e))}(e.axisId,t);return(0,O.jsx)("g",{children:n.map(({seriesId:e,layout:t,xOrigin:n,yOrigin:r,data:i})=>(0,O.jsx)("g",{children:i.map(({dataIndex:i,color:o,x:a,y:s,width:l,height:c})=>(0,O.jsx)(bP,{id:e,dataIndex:i,color:o,skipAnimation:!0,layout:t??"vertical",x:a,xOrigin:n,y:s,yOrigin:r,width:l,height:c},i))},e))})}],["line",function({axisId:t}){return(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(PP,{axisId:t}),(0,O.jsx)(AP,{axisId:t})]})}],["scatter",function({axisId:t,x:n,y:r,height:i,width:o}){const a=zx(),s=IP(),l=a.use(sP,t),c=a.use(cP,t),u=_x().xAxisIds[0],d=Fx().yAxisIds[0],{zAxis:p,zAxisIds:h}=Kx(),m=h[0];if(void 0===s)return null;const{series:f,seriesOrder:g}=s;return(0,O.jsx)(e.Fragment,{children:g.map(e=>{const{id:t,xAxisId:a,yAxisId:s,zAxisId:h,color:g}=f[e],y=Dl.colorProcessor(f[e],l[a??u],c[s??d],p[h??m]),v=l[a??u].scale,b=c[s??d].scale;return(0,O.jsx)(SP,{xScale:v,yScale:b,color:g,colorGetter:y,series:f[e],x:n,y:r,height:i,width:o},t)})})}]]);function LP(t){const{axisId:n,x:r,y:i,width:o,height:a}=t,s=zx().use(ft),c=[],u=`zoom-preview-mask-${n}`;for(const[e,n]of jP)(s[e]?.seriesOrder?.length??0)>0&&c.push((0,O.jsx)(n,l({},t),e));return(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)("clipPath",{id:u,children:(0,O.jsx)("rect",{x:r,y:i,width:o,height:a})}),(0,O.jsx)("g",{clipPath:`url(#${u})`,children:c})]})}const RP=["axisId","axisDirection","reverse"],DP=bm("rect",{slot:"internal",shouldForwardProp:void 0})(({theme:e})=>({rx:4,ry:4,stroke:e.palette.grey[700],fill:tP(e.palette.grey[700],.4)}));function $P(e){let{axisId:t,axisDirection:n}=e,r=tt(e,RP);return(0,O.jsxs)("g",l({},r,{children:[(0,O.jsx)(zP,l({},r,{axisId:t,axisDirection:n})),(0,O.jsx)("rect",l({},r,{fill:"transparent",rx:4,ry:4})),(0,O.jsx)(LP,l({axisId:t},r))]}))}function zP(t){const{axisId:n,axisDirection:r}=t,i=zx(),o=i.use(px,n),a=i.use(Xa,n),s=iP();if(!o)return null;const l=`zoom-preview-mask-${n}-${s}`;let c,u,d,p;const h=a.maxEnd-a.minStart;return"x"===r?(c=t.x+(o.start-a.minStart)/h*t.width,u=t.y,d=(o.end-o.start)/h*t.width,p=t.height):(c=t.x,u=t.y+(1-o.end/h)*t.height,d=t.width,p=(o.end-o.start)/h*t.height),(0,O.jsxs)(e.Fragment,{children:[(0,O.jsxs)("mask",{id:l,children:[(0,O.jsx)("rect",{x:t.x,y:t.y,width:t.width,height:t.height,fill:"white"}),(0,O.jsx)("rect",{x:c,y:u,width:d,height:p,fill:"black",rx:4,ry:4})]}),(0,O.jsx)(DP,{x:t.x,y:t.y,width:t.width,height:t.height,mask:`url(#${l})`})]})}const NP=8,_P=10,FP=20,HP=10,BP=Math.max(NP,_P,FP,HP);const VP=[];function UP(e){return VP[0]=e,Nd(VP)}function YP(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function WP(t){if(e.isValidElement(t)||(0,dc.Hy)(t)||!YP(t))return t;const n={};return Object.keys(t).forEach(e=>{n[e]=WP(t[e])}),n}function GP(t,n,r={clone:!0}){const i=r.clone?{...t}:t;return YP(t)&&YP(n)&&Object.keys(n).forEach(o=>{e.isValidElement(n[o])||(0,dc.Hy)(n[o])?i[o]=n[o]:YP(n[o])&&Object.prototype.hasOwnProperty.call(t,o)&&YP(t[o])?i[o]=GP(t[o],n[o],r):r.clone?i[o]=YP(n[o])?WP(n[o]):n[o]:i[o]=n[o]}),i}function KP(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e},{...t}):t}const qP={borderRadius:4},XP={xs:0,sm:600,md:900,lg:1200,xl:1536},ZP={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${XP[e]}px)`},JP={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:XP[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function QP(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||ZP;return t.reduce((r,i,o)=>(r[e.up(e.keys[o])]=n(t[o]),r),{})}if("object"==typeof t){const e=r.breakpoints||ZP;return Object.keys(t).reduce((i,o)=>{if(function(e,t){return"@"===t||t.startsWith("@")&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}(e.keys,o)){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,i]=n,o=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(o)}(r.containerQueries?r:JP,o);e&&(i[e]=n(t[o],o))}else if(Object.keys(e.values||XP).includes(o))i[e.up(o)]=n(t[o],o);else{const e=o;i[e]=t[e]}return i},{})}return n(t)}function eE(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function tE(e){if("string"!=typeof e)throw new Error(JC(7));return e.charAt(0).toUpperCase()+e.slice(1)}function nE(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function rE(e,t,n,r=n){let i;return i="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:nE(e,n)||r,t&&(i=t(i,r,e)),i}const iE=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=e=>{if(null==e[t])return null;const o=e[t],a=nE(e.theme,r)||{};return QP(e,o,e=>{let r=rE(a,i,e);return e===r&&"string"==typeof e&&(r=rE(a,i,`${t}${"default"===e?"":tE(e)}`,e)),!1===n?r:{[n]:r}})};return o.propTypes={},o.filterProps=[t],o},oE=function(e,t){return t?GP(e,t,{clone:!1}):e},aE={m:"margin",p:"padding"},sE={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},lE={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},cE=function(){const e={};return t=>(void 0===e[t]&&(e[t]=(e=>{if(e.length>2){if(!lE[e])return[e];e=lE[e]}const[t,n]=e.split(""),r=aE[t],i=sE[n]||"";return Array.isArray(i)?i.map(e=>r+e):[r+i]})(t)),e[t])}(),uE=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],dE=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],pE=[...uE,...dE];function hE(e,t,n,r){const i=nE(e,t,!0)??n;return"number"==typeof i||"string"==typeof i?e=>"string"==typeof e?e:"string"==typeof i?i.startsWith("var(")&&0===e?0:i.startsWith("var(")&&1===e?i:`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if("string"==typeof e)return e;const t=Math.abs(e),n=i[t];return e>=0?n:"number"==typeof n?-n:"string"==typeof n&&n.startsWith("var(")?`calc(-1 * ${n})`:`-${n}`}:"function"==typeof i?i:()=>{}}function mE(e){return hE(e,"spacing",8)}function fE(e,t){return"string"==typeof t||null==t?t:e(t)}function gE(e,t){const n=mE(e.theme);return Object.keys(e).map(r=>function(e,t,n,r){if(!t.includes(n))return null;const i=function(e,t){return n=>e.reduce((e,r)=>(e[r]=fE(t,n),e),{})}(cE(n),r);return QP(e,e[n],i)}(e,t,r,n)).reduce(oE,{})}function yE(e){return gE(e,uE)}function vE(e){return gE(e,dE)}function bE(e){return gE(e,pE)}yE.propTypes={},yE.filterProps=uE,vE.propTypes={},vE.filterProps=dE,bE.propTypes={},bE.filterProps=pE;const xE=function(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?oE(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n};function IE(e){return"number"!=typeof e?e:`${e}px solid`}function wE(e,t){return iE({prop:e,themeKey:"borders",transform:t})}const kE=wE("border",IE),SE=wE("borderTop",IE),ME=wE("borderRight",IE),CE=wE("borderBottom",IE),PE=wE("borderLeft",IE),EE=wE("borderColor"),TE=wE("borderTopColor"),AE=wE("borderRightColor"),OE=wE("borderBottomColor"),jE=wE("borderLeftColor"),LE=wE("outline",IE),RE=wE("outlineColor"),DE=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=hE(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:fE(t,e)});return QP(e,e.borderRadius,n)}return null};DE.propTypes={},DE.filterProps=["borderRadius"],xE(kE,SE,ME,CE,PE,EE,TE,AE,OE,jE,DE,LE,RE);const $E=e=>{if(void 0!==e.gap&&null!==e.gap){const t=hE(e.theme,"spacing",8),n=e=>({gap:fE(t,e)});return QP(e,e.gap,n)}return null};$E.propTypes={},$E.filterProps=["gap"];const zE=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=hE(e.theme,"spacing",8),n=e=>({columnGap:fE(t,e)});return QP(e,e.columnGap,n)}return null};zE.propTypes={},zE.filterProps=["columnGap"];const NE=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=hE(e.theme,"spacing",8),n=e=>({rowGap:fE(t,e)});return QP(e,e.rowGap,n)}return null};function _E(e,t){return"grey"===t?t:e}function FE(e){return e<=1&&0!==e?100*e+"%":e}NE.propTypes={},NE.filterProps=["rowGap"],xE($E,zE,NE,iE({prop:"gridColumn"}),iE({prop:"gridRow"}),iE({prop:"gridAutoFlow"}),iE({prop:"gridAutoColumns"}),iE({prop:"gridAutoRows"}),iE({prop:"gridTemplateColumns"}),iE({prop:"gridTemplateRows"}),iE({prop:"gridTemplateAreas"}),iE({prop:"gridArea"})),xE(iE({prop:"color",themeKey:"palette",transform:_E}),iE({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:_E}),iE({prop:"backgroundColor",themeKey:"palette",transform:_E}));const HE=iE({prop:"width",transform:FE}),BE=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||XP[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:FE(t)}};return QP(e,e.maxWidth,t)}return null};BE.filterProps=["maxWidth"];const VE=iE({prop:"minWidth",transform:FE}),UE=iE({prop:"height",transform:FE}),YE=iE({prop:"maxHeight",transform:FE}),WE=iE({prop:"minHeight",transform:FE}),GE=(iE({prop:"size",cssProperty:"width",transform:FE}),iE({prop:"size",cssProperty:"height",transform:FE}),xE(HE,BE,VE,UE,YE,WE,iE({prop:"boxSizing"})),{border:{themeKey:"borders",transform:IE},borderTop:{themeKey:"borders",transform:IE},borderRight:{themeKey:"borders",transform:IE},borderBottom:{themeKey:"borders",transform:IE},borderLeft:{themeKey:"borders",transform:IE},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:IE},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:DE},color:{themeKey:"palette",transform:_E},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:_E},backgroundColor:{themeKey:"palette",transform:_E},p:{style:vE},pt:{style:vE},pr:{style:vE},pb:{style:vE},pl:{style:vE},px:{style:vE},py:{style:vE},padding:{style:vE},paddingTop:{style:vE},paddingRight:{style:vE},paddingBottom:{style:vE},paddingLeft:{style:vE},paddingX:{style:vE},paddingY:{style:vE},paddingInline:{style:vE},paddingInlineStart:{style:vE},paddingInlineEnd:{style:vE},paddingBlock:{style:vE},paddingBlockStart:{style:vE},paddingBlockEnd:{style:vE},m:{style:yE},mt:{style:yE},mr:{style:yE},mb:{style:yE},ml:{style:yE},mx:{style:yE},my:{style:yE},margin:{style:yE},marginTop:{style:yE},marginRight:{style:yE},marginBottom:{style:yE},marginLeft:{style:yE},marginX:{style:yE},marginY:{style:yE},marginInline:{style:yE},marginInlineStart:{style:yE},marginInlineEnd:{style:yE},marginBlock:{style:yE},marginBlockStart:{style:yE},marginBlockEnd:{style:yE},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:$E},rowGap:{style:NE},columnGap:{style:zE},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:FE},maxWidth:{style:BE},minWidth:{transform:FE},height:{transform:FE},maxHeight:{transform:FE},minHeight:{transform:FE},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}}),KE=GE,qE=function(){function e(e,t,n,r){const i={[e]:t,theme:n},o=r[e];if(!o)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:c}=o;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const u=nE(n,s)||{};return c?c(i):QP(i,t,t=>{let n=rE(u,l,t);return t===n&&"string"==typeof t&&(n=rE(u,l,`${e}${"default"===t?"":tE(t)}`,t)),!1===a?n:{[a]:n}})}return function t(n){const{sx:r,theme:i={},nested:o}=n||{};if(!r)return null;const a=i.unstable_sxConfig??KE;function s(n){let r=n;if("function"==typeof n)r=n(i);else if("object"!=typeof n)return n;if(!r)return null;const s=function(e={}){const t=e.keys?.reduce((t,n)=>(t[e.up(n)]={},t),{});return t||{}}(i.breakpoints),l=Object.keys(s);let c=s;return Object.keys(r).forEach(n=>{const o=function(e,t){return"function"==typeof e?e(t):e}(r[n],i);if(null!=o)if("object"==typeof o)if(a[n])c=oE(c,e(n,o,i,a));else{const e=QP({theme:i},o,e=>({[n]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}(e,o)?c=oE(c,e):c[n]=t({sx:o,theme:i,nested:!0})}else c=oE(c,e(n,o,i,a))}),!o&&i.modularCssLayers?{"@layer sx":KP(i,eE(l,c))}:KP(i,eE(l,c))}return Array.isArray(r)?r.map(s):s(r)}}();qE.filterProps=["sx"];const XE=qE;function ZE(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!=typeof n.getColorSchemeSelector)return{};let r=n.getColorSchemeSelector(e);return"&"===r?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}const JE=function(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={},...a}=e,s=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,o=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),a=Object.keys(o);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,i){const o=a.indexOf(i);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==o&&"number"==typeof t[a[o]]?t[a[o]]:i)-r/100}${n})`}return{keys:a,values:o,up:s,down:l,between:c,only:function(e){return a.indexOf(e)+1(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?`${n}px`:n}).join(" ");return n.mui=!0,n}(i);let c=GP({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...qP,...o}},a);return c=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const i=t(e.breakpoints.not(...n),r);return i.includes("not all and")?i.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):i}}const r={},i=e=>(n(r,e),r);return n(i),{...e,containerQueries:i}}(c),c.applyStyles=ZE,c=t.reduce((e,t)=>GP(e,t),c),c.unstable_sxConfig={...KE,...a?.unstable_sxConfig},c.unstable_sx=function(e){return XE({sx:e,theme:this})},c}();function QE(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function eT(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function tT(e){return e?(t,n)=>n[e]:null}function nT(e,t,n){const r="function"==typeof t?t(e):t;if(Array.isArray(r))return r.flatMap(t=>nT(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?eT(r.style,n):r.style;else{const{variants:e,...i}=r;t=n?eT(UP(i),n):i}return rT(e,r.variants,[t],n)}return r?.isProcessed?n?eT(UP(r.style),n):r.style:n?eT(UP(r),n):r}function rT(e,t,n=[],r=void 0){let i;e:for(let o=0;oe,uT=(()=>{let e=cT;return{configure(t){e=t},generate:t=>e(t),reset(){e=cT}}})();function dT(e){return`${uT.generate("MuiChartAxisZoomSliderTrack")}-${e}`}["horizontal","vertical","background","active"].reduce((e,t)=>(e[t]=dT(t),e),{});const pT=e=>{const{axisDirection:t}=e;return lT({background:["x"===t?"horizontal":"vertical","background"],active:["x"===t?"horizontal":"vertical","active"]},dT)},hT=["axisId","axisDirection","reverse","onSelectStart","onSelectEnd"],mT=bm("rect",{slot:"internal",shouldForwardProp:e=>QE(e)&&"axisDirection"!==e&&"isSelecting"!==e})(({theme:e})=>l({fill:(e.vars||e).palette.grey[300]},e.applyStyles("dark",{fill:(e.vars||e).palette.grey[800]}),{cursor:"pointer",variants:[{props:{axisDirection:"x",isSelecting:!0},style:{cursor:"ew-resize"}},{props:{axisDirection:"y",isSelecting:!0},style:{cursor:"ns-resize"}}]}));function fT(t){let{axisId:n,axisDirection:r,onSelectStart:i,onSelectEnd:o}=t,a=tt(t,hT);const s=e.useRef(null),{instance:c,svgRef:u}=$x(),d=zx(),[p,h]=e.useState(!1),m=pT({axisDirection:r});return(0,O.jsx)(mT,l({ref:s,onPointerDown:function(e){const t=s.current,r=u.current;if(!t||!r)return;const a=xs(r,e),p=oT(d.state,n,a);if(null===p)return;const m=rx(function(e){const t=xs(r,e),i=oT(d.state,n,t);if(null===i)return;const o=Xa(d.state,n);c.setAxisZoomData(n,e=>{if(i>p){const t=sT(i,l({},e,{start:p}),o),n=aT(p,l({},e,{start:p,end:t}),o);return l({},e,{start:n,end:t})}const t=aT(i,l({},e,{end:p}),o),n=sT(p,l({},e,{start:t,end:p}),o);return l({},e,{start:t,end:n})})});e.preventDefault(),e.stopPropagation(),t.setPointerCapture(e.pointerId),document.addEventListener("pointerup",function e(n){t.releasePointerCapture(n.pointerId),t.removeEventListener("pointermove",m),document.removeEventListener("pointerup",e),h(!1),o?.()}),t.addEventListener("pointermove",m),i?.(),h(!0)},axisDirection:r,isSelecting:p},a,{className:Hh(m.background,a.className)}))}function gT(e,t,n){return fa(e)?t[yT(e,n)]:e.invert(n)}function yT(e,t){return 0===e.bandwidth()?Math.floor((t-Math.min(...e.range())+e.step()/2)/e.step()):Math.floor((t-Math.min(...e.range()))/e.step())}function vT(...t){const n=e.useRef(void 0),r=e.useCallback(e=>{const n=t.map(t=>{if(null==t)return null;if("function"==typeof t){const n=t,r=n(e);return"function"==typeof r?r:()=>{n(null)}}return t.current=e,()=>{t.current=null}});return()=>{n.forEach(e=>e?.())}},t);return e.useMemo(()=>t.every(e=>null==e)?null:e=>{n.current&&(n.current(),n.current=void 0),null!=e&&(n.current=r(e))},t)}const bT="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,xT={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function IT(e,t,n="Mui"){const r=xT[t];return r?`${n}-${r}`:`${uT.generate(e)}-${t}`}function wT(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=IT(e,t,n)}),r}const kT=wT("MuiChartAxisZoomSliderThumb",["root","horizontal","vertical","start","end"]);function ST(e){return IT("MuiChartAxisZoomSliderThumb",e)}const MT=["className","onMove","orientation","placement","rx","ry"],CT=bm("rect",{slot:"internal",shouldForwardProp:void 0})(({theme:e})=>({[`&.${kT.root}`]:l({fill:(e.vars||e).palette.common.white,stroke:(e.vars||e).palette.grey[500]},e.applyStyles("dark",{fill:(e.vars||e).palette.grey[300],stroke:(e.vars||e).palette.grey[600]})),[`&.${kT.horizontal}`]:{cursor:"ew-resize"},[`&.${kT.vertical}`]:{cursor:"ns-resize"}}));function PT(e){e.preventDefault()}const ET=e.forwardRef(function(t,n){let{className:r,onMove:i,orientation:o,placement:a,rx:s=4,ry:c=4}=t,u=tt(t,MT);const d=(e=>{const{orientation:t,placement:n}=e;return lT({root:["root","horizontal"===t?"horizontal":"vertical","start"===n?"start":"end"]},ST)})({onMove:i,orientation:o,placement:a}),p=e.useRef(null),h=vT(p,n),m=function(t){const n=e.useRef(t);return bT(()=>{n.current=t}),e.useRef((...e)=>(0,n.current)(...e)).current}(i);return e.useEffect(()=>{const e=p.current;if(!e)return()=>{};e.addEventListener("touchmove",PT,{passive:!1});const t=rx(e=>{m(e)}),n=r=>{e.removeEventListener("pointermove",t),e.removeEventListener("pointerup",n),e.removeEventListener("pointercancel",n),e.releasePointerCapture(r.pointerId)},r=r=>{r.preventDefault(),r.stopPropagation(),e.setPointerCapture(r.pointerId),e.addEventListener("pointermove",t),e.addEventListener("pointercancel",n),e.addEventListener("pointerup",n)};return e.addEventListener("pointerdown",r),()=>{e.removeEventListener("pointerdown",r),e.removeEventListener("pointermove",t),e.removeEventListener("pointercancel",n),e.removeEventListener("pointerup",n),e.removeEventListener("touchmove",PT),t.clear()}},[m,o]),(0,O.jsx)(CT,l({className:Hh(d.root,r),ref:h,rx:s,ry:c},u))}),TT=bm(Tg,{name:"MuiChartsZoomSliderTooltip",slot:"Root"})(({theme:e})=>({pointerEvents:"none",zIndex:e.zIndex.modal})),AT=[{name:"offset",options:{offset:[0,4]}}];function OT({anchorEl:e,open:t,placement:n,modifiers:r=AT,children:i}){return(0,O.jsx)(PC,{children:t?(0,O.jsx)(TT,{open:t,anchorEl:e,placement:n,modifiers:r,children:(0,O.jsx)(JM,{sx:{paddingX:.5},children:(0,O.jsx)(Nv,{variant:"caption",children:i})})}):null})}const jT=bm("rect",{slot:"internal",shouldForwardProp:e=>QE(e)&&"preview"!==e})(({theme:e})=>l({fill:(e.vars||e).palette.grey[600]},e.applyStyles("dark",{fill:(e.vars||e).palette.grey[500]}),{cursor:"grab",variants:[{props:{preview:!0},style:l({fill:"transparent"},e.applyStyles("dark",{fill:"transparent"}),{rx:4,ry:4,stroke:e.palette.grey[500]})}]}));function LT({axisId:t,axisDirection:n,axisPosition:r,size:i,preview:o,zoomData:a,reverse:s,showTooltip:c,onPointerEnter:u,onPointerLeave:d}){const{instance:p,svgRef:h}=$x(),m=zx(),f=m.use(us,t),g=Nx(),y=e.useRef(null),[v,b]=e.useState(null),[x,I]=e.useState(null),{tooltipStart:w,tooltipEnd:k}=function(e,t){const n=t=>e.valueFormatter?e.valueFormatter(t,{location:"zoom-slider-tooltip",scale:e.scale}):`${t}`,r="top"===e.position||"bottom"===e.position?"x":"y";let i="x"===r?t.left:t.top;let o=i+("x"===r?t.width:t.height);"y"===r&&([i,o]=[o,i]),e.reverse&&([i,o]=[o,i]);const a=gT(e.scale,e.data??[],i)??e.data?.at(0),s=gT(e.scale,e.data??[],o)??e.data?.at(-1);return{tooltipStart:n(a),tooltipEnd:n(s)}}(f,g),S=pT({axisDirection:n}),M="x"===n?HP:FP,C="x"===n?FP:HP;let P,E,T,A,j,L,R,D;e.useEffect(()=>{const e=y.current;if(!e)return;let n=0;const r=rx(e=>{const r=h.current;if(!r)return;const i=xs(r,e),o=oT(m.state,t,i);if(null===o)return;const a=o-n;n=o,p.moveZoomRange(t,a)}),i=()=>{e.removeEventListener("pointermove",r),document.removeEventListener("pointerup",i)},o=o=>{o.preventDefault(),e.setPointerCapture(o.pointerId);const a=px(m.state,t),s=h.current;if(!a||!s)return;const l=xs(s,o),c=oT(m.state,t,l);null!==c&&(n=c,document.addEventListener("pointerup",i),e.addEventListener("pointermove",r))};return e.addEventListener("pointerdown",o),()=>{e.removeEventListener("pointerdown",o),r.clear()}},[n,t,p,s,m,h]);const{minStart:$,maxEnd:z}=Xa(m.state,t),N=z-$,_=Math.max($,a.start),F=Math.min(a.end,z);"x"===n?(P=(_-$)/N*g.width,E=0,T=g.width*(F-_)/N,A=i,j=(_-$)/N*g.width,L=FPi?(FP-i)/2:0;return(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(jT,{ref:y,x:P+("x"===n?0:H),y:E+("x"===n?H:0),preview:o,width:T,height:A,onPointerEnter:u,onPointerLeave:d,className:S.active}),(0,O.jsx)(ET,{ref:b,x:j,y:L,width:M,height:C,orientation:"x"===n?"horizontal":"vertical",onMove:e=>{const n=h.current;if(!n)return;const r=xs(n,e);p.setZoomData(e=>{const n=Xa(m.state,t);return e.map(e=>{if(e.axisId===t){const i=oT(m.state,t,r);return null===i?e:l({},e,{start:aT(i,e,n)})}return e})})},onPointerEnter:u,onPointerLeave:d,placement:"start"}),(0,O.jsx)(ET,{ref:I,x:R,y:D,width:M,height:C,orientation:"x"===n?"horizontal":"vertical",onMove:e=>{const n=h.current;if(!n)return;const r=xs(n,e);p.setZoomData(e=>{const n=Xa(m.state,t);return e.map(e=>{if(e.axisId===t){const i=oT(m.state,t,r);return null===i?e:l({},e,{end:sT(i,e,n)})}return e})})},onPointerEnter:u,onPointerLeave:d,placement:"end"}),(0,O.jsx)(OT,{anchorEl:v,open:c&&""!==w,placement:r,children:w}),(0,O.jsx)(OT,{anchorEl:x,open:c&&""!==k,placement:r,children:k})]})}function RT({axisDirection:t,axisId:n}){const r=zx(),i=Nx(),o=r.use(px,n),a=r.use(Xa,n),[s,l]=e.useState(!1),{xAxis:c}=_x(),{yAxis:u}=Fx(),d=a.slider.preview;if(!o)return null;let p,h,m,f,g;const y=d?vt:BP;if("x"===t){const e=c[n];if(!e||"none"===e.position)return null;const t=e.height;p=i.left,h="bottom"===e.position?i.top+i.height+e.offset+t+yt:i.top-e.offset-t-y-yt,m=e.reverse??!1,f=e.position??"bottom",g=e.zoom?.slider?.showTooltip??It}else{const e=u[n];if(!e||"none"===e.position)return null;const t=e.width;p="right"===e.position?i.left+i.width+e.offset+t+yt:i.left-e.offset-t-y-yt,h=i.top,m=e.reverse??!1,f=e.position??"left",g=e.zoom?.slider?.showTooltip??It}const v=(y-NP)/2,b=d?(0,O.jsx)($P,{axisId:n,axisDirection:t,reverse:m,x:0,y:0,height:"x"===t?vt:i.height,width:"x"===t?i.width:vt}):(0,O.jsx)(fT,{x:"x"===t?0:v,y:"x"===t?v:0,height:"x"===t?NP:i.height,width:"x"===t?i.width:NP,rx:NP/2,ry:NP/2,axisId:n,axisDirection:t,reverse:m,onSelectStart:"hover"===g?()=>l(!0):void 0,onSelectEnd:"hover"===g?()=>l(!1):void 0});return(0,O.jsxs)("g",{"data-charts-zoom-slider":!0,transform:`translate(${p} ${h})`,style:{touchAction:"none"},children:[b,(0,O.jsx)(LT,{zoomData:o,axisId:n,axisPosition:f,axisDirection:t,reverse:m,showTooltip:s&&"never"!==g||"always"===g,size:d?vt:_P,preview:d,onPointerEnter:"hover"===g?()=>l(!0):void 0,onPointerLeave:"hover"===g?()=>l(!1):void 0})]})}function DT(){const{xAxisIds:t,xAxis:n}=_x(),{yAxisIds:r,yAxis:i}=Fx();return(0,O.jsxs)(e.Fragment,{children:[t.map(e=>{const t=n[e],r=t.zoom?.slider;return r?.enabled?(0,O.jsx)(RT,{axisId:e,axisDirection:"x"},e):null}),r.map(e=>{const t=i[e],n=t.zoom?.slider;return n?.enabled?(0,O.jsx)(RT,{axisId:e,axisDirection:"y"},e):null})]})}function $T(e){return Xb("MuiChartsReferenceLine",e)}const zT=Zb("MuiChartsReferenceLine",["root","vertical","horizontal","line","label"]),NT=bm("g",{slot:"internal",shouldForwardProp:void 0})(({theme:e})=>({[`& .${zT.line}`]:{fill:"none",stroke:(e.vars||e).palette.text.primary,shapeRendering:"crispEdges",strokeWidth:1,pointerEvents:"none"},[`& .${zT.label}`]:l({fill:(e.vars||e).palette.text.primary,stroke:"none",pointerEvents:"none",fontSize:12},e.typography.body1)})),_T=({top:e,height:t,spacing:n,position:r,labelAlign:i="middle"})=>{const o="middle"===i?0:5,a=("object"==typeof n?n.x:n)??5,s=("object"==typeof n?n.y:o)??o;switch(i){case"start":return{x:r+a,y:e+s,style:{dominantBaseline:"hanging",textAnchor:"start"}};case"end":return{x:r+a,y:e+t-s,style:{dominantBaseline:"auto",textAnchor:"start"}};default:return{x:r+a,y:e+t/2+s,style:{dominantBaseline:"central",textAnchor:"start"}}}};function FT(e){const{x:t,label:n="",spacing:r,classes:i,labelAlign:o="middle",lineStyle:a,labelStyle:s,axisId:c}=e,{top:u,height:d}=Nx(),p=uk(c)(t);if(void 0===p)return null;const h=`M ${p} ${u} l 0 ${d}`,m=function(e){return uI({root:["root","vertical"],line:["line"],label:["label"]},$T,e)}(i),f=l({text:n,fontSize:12},_T({top:u,height:d,spacing:r,position:p,labelAlign:o}),{className:m.label});return(0,O.jsxs)(NT,{className:m.root,children:[(0,O.jsx)("path",{d:h,className:m.line,style:a}),(0,O.jsx)(JS,l({},f,{style:l({},f.style,s)}))]})}const HT=({left:e,width:t,spacing:n,position:r,labelAlign:i="middle"})=>{const o="middle"===i?0:5,a=("object"==typeof n?n.x:o)??o,s=("object"==typeof n?n.y:n)??5;switch(i){case"start":return{y:r-s,x:e+a,style:{dominantBaseline:"auto",textAnchor:"start"}};case"end":return{y:r-s,x:e+t-a,style:{dominantBaseline:"auto",textAnchor:"end"}};default:return{y:r-s,x:e+t/2+a,style:{dominantBaseline:"auto",textAnchor:"middle"}}}};function BT(e){const{y:t,label:n="",spacing:r,classes:i,labelAlign:o="middle",lineStyle:a,labelStyle:s,axisId:c}=e,{left:u,width:d}=Nx(),p=dk(c)(t);if(void 0===p)return null;const h=`M ${u} ${p} l ${d} 0`,m=function(e){return uI({root:["root","horizontal"],line:["line"],label:["label"]},$T,e)}(i),f=l({text:n,fontSize:12},HT({left:u,width:d,spacing:r,position:p,labelAlign:o}),{className:m.label});return(0,O.jsxs)(NT,{className:m.root,children:[(0,O.jsx)("path",{d:h,className:m.line,style:a}),(0,O.jsx)(JS,l({},f,{style:l({},f.style,s)}))]})}function VT(e){const{x:t,y:n}=e;if(void 0!==t&&void 0!==n)throw new Error("MUI X Charts: The ChartsReferenceLine cannot have both `x` and `y` props set.");if(void 0===t&&void 0===n)throw new Error("MUI X Charts: The ChartsReferenceLine should have a value in `x` or `y` prop.");return void 0!==t?(0,O.jsx)(FT,l({},e)):(0,O.jsx)(BT,l({},e))}const UT=Zb("MuiChartsBrushOverlay",["root","rect","x","y"]);function YT(e){return(0,O.jsx)("rect",l({className:UT.rect,strokeWidth:1,fillOpacity:.2,pointerEvents:"none"},e))}function WT(e){const t=zx(),n=t.use(he),r=xm(),i=t.use(hb),o=t.use(mb),a=t.use(fb),s=t.use(gb),c=t.use(xb);if(null===i||null===o||null===a||null===s)return null;const{left:u,top:d,width:p,height:h}=n,m=e=>Math.max(u,Math.min(u+p,e)),f=e=>Math.max(d,Math.min(d+h,e)),g=m(i),y=f(o),v=m(a),b=f(s),x="light"===r.palette.mode?r.palette.common.black:r.palette.common.white;if("xy"===c){const t=v-g,n=b-y;return(0,O.jsx)("g",{className:Hh(UT.root,UT.x,UT.y),children:(0,O.jsx)(YT,l({fill:x,x:t>=0?g:v,y:n>=0?y:b,width:Math.abs(t),height:Math.abs(n)},e))})}if("y"===c){const t=Math.min(y,b),n=Math.max(y,b)-t;return(0,O.jsx)("g",{className:Hh(UT.root,UT.y),children:(0,O.jsx)(YT,l({fill:x,x:u,y:t,width:p,height:n},e))})}const I=Math.min(g,v),w=Math.max(g,v)-I;return(0,O.jsx)("g",{className:Hh(UT.root,UT.x),children:(0,O.jsx)(YT,l({fill:x,x:I,y:d,width:w,height:h},e))})}function GT(t,n,r,i={}){return"function"==typeof n?n(r,i):n?(n.props.className&&(r.className=(o=n.props.className,a=r.className,o&&a?`${o} ${a}`:o||a)),(n.props.style||r.style)&&(r.style=l({},r.style,n.props.style)),e.cloneElement(n,r)):e.createElement(t,r);var o,a}const KT=e.createContext(void 0);function qT({children:t}){const[n,r]=e.useState(null),i=e.useRef(n),[o,a]=e.useState([]),s=e.useCallback(()=>o.sort(XT),[o]),l=e.useCallback((e,t,n=!0)=>{let r=e;const i=s(),o=i.length;for(let e=0;e=o){if(!n)return-1;r=0}else if(r<0){if(!n)return-1;r=o-1}if(!i[r].ref.current?.disabled&&"true"!==i[r].ref.current?.ariaDisabled)return r}return-1},[s]),c=e.useCallback((e,t)=>{a(n=>[...n,{id:e,ref:t}])},[]),u=e.useCallback(e=>{a(t=>t.filter(t=>t.id!==e))},[]),d=e.useCallback(e=>{if(!n)return;const t=s(),i=t.findIndex(e=>e.id===n);let o=-1;if("ArrowRight"===e.key?(e.preventDefault(),o=l(i,1)):"ArrowLeft"===e.key?(e.preventDefault(),o=l(i,-1)):"Home"===e.key?(e.preventDefault(),o=l(-1,1,!1)):"End"===e.key&&(e.preventDefault(),o=l(t.length,-1,!1)),o>=0&&o{n!==e&&r(e)},[n,r]),h=e.useCallback(e=>{const t=s(),n=t.findIndex(t=>t.id===e),i=l(n,1);if(i>=0&&i{i.current=n},[n]),e.useEffect(()=>{const e=s();if(e.length>0){if(!i.current)return void r(e[0].id);const t=e.findIndex(e=>e.id===i.current);if(e[t]){if(-1===t){const n=e[t];n&&(r(n.id),n.ref.current?.focus())}}else{const t=e[e.length-1];t&&(r(t.id),t.ref.current?.focus())}}},[s,l]);const m=e.useMemo(()=>({focusableItemId:n,registerItem:c,unregisterItem:u,onItemKeyDown:d,onItemFocus:p,onItemDisabled:h}),[n,c,u,d,p,h]);return(0,O.jsx)(KT.Provider,{value:m,children:t})}function XT(e,t){if(!e.ref.current||!t.ref.current)return 0;const n=e.ref.current.compareDocumentPosition(t.ref.current);return n?n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0:0}const ZT=["render","onKeyDown","onFocus","disabled","aria-disabled"],JT=["tabIndex"],QT=e.forwardRef(function(t,n){const{render:r}=t,i=tt(t,ZT),{slots:o,slotProps:a}=sc(),s=e.useRef(null),c=Dx(s,n),u=function(t,n){const{onKeyDown:r,onFocus:i,disabled:o,"aria-disabled":a}=t,s=z(),{focusableItemId:l,registerItem:c,unregisterItem:u,onItemKeyDown:d,onItemFocus:p,onItemDisabled:h}=function(){const t=e.useContext(KT);if(void 0===t)throw new Error("MUI X: Missing context. Toolbar subcomponents must be placed within a component.");return t}();e.useEffect(()=>(c(s,n),()=>u(s)),[s,n,c,u]);const m=e.useRef(o);e.useEffect(()=>{m.current!==o&&!0===o&&h(s,o),m.current=o},[o,s,h]);const f=e.useRef(a);return e.useEffect(()=>{f.current!==a&&!0===a&&h(s,!0),f.current=a},[a,s,h]),{tabIndex:l===s?0:-1,disabled:o,"aria-disabled":a,onKeyDown:e=>{d(e),r?.(e)},onFocus:e=>{p(s),i?.(e)}}}(t,s),{tabIndex:d}=u,p=tt(u,JT),h=GT(o.baseIconButton,r,l({},a?.baseIconButton,{tabIndex:d},i,p,{ref:c}));return(0,O.jsx)(e.Fragment,{children:h})}),eA=["className","render"],tA=bm("div",{name:"MuiChartsToolbar",slot:"Root"})(({theme:e})=>({flex:0,display:"flex",alignItems:"center",justifyContent:"end",gap:e.spacing(.25),padding:e.spacing(.5),marginBottom:e.spacing(1.5),minHeight:44,boxSizing:"border-box",border:`1px solid ${(e.vars||e).palette.divider}`,borderRadius:4})),nA=e.forwardRef(function(e,t){let{className:n,render:r}=e,i=tt(e,eA);const o=GT(tA,r,l({role:"toolbar","aria-orientation":"horizontal",className:Hh(Jb.root,n)},i,{ref:t}));return(0,O.jsx)(qT,{children:o})}),rA=()=>{const t=e.useContext(Nh);if(null===t)throw new Error(["MUI X Charts: Can not find the charts localization context.","It looks like you forgot to wrap your component in ChartsLocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-charts` package"].join("\n"));return t},iA=function(e={}){const{themeId:t,defaultTheme:n=JE,rootShouldForwardProp:r=QE,slotShouldForwardProp:i=QE}=e;function o(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return(e,t={})=>{!function(e){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=(e=>e.filter(e=>e!==XE))(e.__emotion_styles))}(e);const{name:n,slot:a,skipVariantsResolver:s,skipSx:l,overridesResolver:c=tT(iT(a)),...u}=t,d=n&&n.startsWith("Mui")||a?"components":"custom",p=void 0!==s?s:a&&"Root"!==a&&"root"!==a||!1,h=l||!1;let m=QE;"Root"===a||"root"===a?m=r:a?m=i:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(m=void 0);const f=function(e,t){return om(e,t)}(e,{shouldForwardProp:m,label:void 0,...u}),g=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return nT(t,e,t.theme.modularCssLayers?d:void 0)};if(YP(e)){const t=function(e){const{variants:t,...n}=e,r={variants:t,style:UP(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{"function"!=typeof e.style&&(e.style=UP(e.style))}),r}(e);return function(e){return t.variants?nT(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?eT(t.style,d):t.style}}return e},y=(...t)=>{const r=[],i=t.map(g),a=[];if(r.push(o),n&&c&&a.push(function(e){const t=e.theme,r=t.components?.[n]?.styleOverrides;if(!r)return null;const i={};for(const t in r)i[t]=nT(e,r[t],e.theme.modularCssLayers?"theme":void 0);return c(e,i)}),n&&!p&&a.push(function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?rT(e,r,[],e.theme.modularCssLayers?"theme":void 0):null}),h||a.push(XE),Array.isArray(i[0])){const e=i.shift(),t=new Array(r.length).fill(""),n=new Array(a.length).fill("");let o;o=[...t,...e,...n],o.raw=[...t,...e.raw,...n],r.unshift(o)}const s=[...r,...i,...a],l=f(...s);return e.muiName&&(l.muiName=e.muiName),l};return f.withConfig&&(y.withConfig=f.withConfig),y}}(),oA=iA(function(e){throw new Error("Failed assertion: should not be rendered")},{name:"MuiChartsToolbar",slot:"Divider"})(({theme:e})=>({margin:e.spacing(0,.5),height:"50%"})),aA=e.forwardRef(function(e,t){const{slots:n,slotProps:r}=sc();return(0,O.jsx)(oA,l({as:n.baseDivider,orientation:"vertical"},r.baseDivider,e,{ref:t}))}),sA=["open","target","onClose","children","position","className","onExited"];function lA(t){const{open:n,target:r,onClose:i,children:o,position:a,onExited:s}=t,c=tt(t,sA),{slots:u,slotProps:d}=sc(),p=u.basePopper,h=e.useRef(null);return bT(()=>{n?h.current=document.activeElement instanceof HTMLElement?document.activeElement:null:(h.current?.focus?.(),h.current=null)},[n]),(0,O.jsx)(p,l({open:n,target:r,transition:!0,placement:a,onClickAway:e=>{e.target&&(r===e.target||r?.contains(e.target))||i(e)},onExited:s,clickAwayMouseEvent:"onMouseDown"},c,d?.basePopper,{children:o}))}function cA(t,n,r,i={}){return"function"==typeof n?n(r,i):n?(n.props.className&&(r.className=(o=n.props.className,a=r.className,o&&a?`${o} ${a}`:o||a)),(n.props.style||r.style)&&(r.style=l({},r.style,n.props.style)),e.cloneElement(n,r)):e.createElement(t,r);var o,a}const uA=["render"],dA=e.forwardRef(function(t,n){let{render:r}=t,i=tt(t,uA);const{slots:o,slotProps:a}=sc(),{instance:s,store:c}=$x(),u=c.use(mx),d=cA(o.baseButton,r,l({},a.baseButton,{onClick:()=>s.zoomIn(),disabled:u},i,{ref:n}));return(0,O.jsx)(e.Fragment,{children:d})}),pA=["render"],hA=e.forwardRef(function(t,n){let{render:r}=t,i=tt(t,pA);const{slots:o,slotProps:a}=sc(),{instance:s,store:c}=$x(),u=c.use(hx),d=cA(o.baseButton,r,l({},a.baseButton,{onClick:()=>s.zoomOut(),disabled:u},i,{ref:n}));return(0,O.jsx)(e.Fragment,{children:d})}),mA=parseInt(e.version,10),fA=t=>{if(mA>=19){const e=e=>t(e,e.ref??null);return e.displayName=t.displayName??t.name,e}return e.forwardRef(t)};function gA(){return function(){const{publicAPI:t}=$x(),n=e.useRef(t);return e.useEffect(()=>{n.current=t},[t]),n}()}const yA=["render","options","onClick"],vA=fA(function(t,n){const{render:r,options:i,onClick:o}=t,a=tt(t,yA),{slots:s,slotProps:c}=sc(),u=gA(),d=cA(s.baseButton,r,l({},c?.baseButton,{onClick:e=>{u.current.exportAsPrint(i),o?.(e)}},a,{ref:n}));return(0,O.jsx)(e.Fragment,{children:d})}),bA=["render","options","onClick"],xA=fA(function(t,n){const{render:r,options:i,onClick:o}=t,a=tt(t,bA),{slots:s,slotProps:c}=sc(),u=gA(),d=cA(s.baseButton,r,l({},c?.baseButton,{onClick:e=>{u.current.exportAsImage(i),o?.(e)}},a,{ref:n}));return(0,O.jsx)(e.Fragment,{children:d})}),IA=["printOptions","imageExportOptions"],wA=[{type:"image/png"}];function kA(t){let{printOptions:n,imageExportOptions:r}=t,i=tt(t,IA);const{slots:o,slotProps:a}=sc(),{store:s}=$x(),{localeText:c}=rA(),[u,d]=e.useState(!1),p=e.useRef(null),h=iP(),m=iP(),f=s.use(dx),g=r??wA,y=!n?.disableToolbarButton||g.length>0,v=[];if(f){const e=o.baseTooltip,t=o.zoomOutIcon,n=o.zoomInIcon;v.push((0,O.jsx)(e,l({},a.baseTooltip,{title:c.zoomIn,children:(0,O.jsx)(dA,{render:(0,O.jsx)(QT,{size:"small"}),children:(0,O.jsx)(n,l({fontSize:"small"},a.zoomInIcon))})}),"zoom-in")),v.push((0,O.jsx)(e,l({},a.baseTooltip,{title:c.zoomOut,children:(0,O.jsx)(hA,{render:(0,O.jsx)(QT,{size:"small"}),children:(0,O.jsx)(t,l({fontSize:"small"},a.zoomOutIcon))})}),"zoom-out"))}if(y){const t=o.baseTooltip,r=o.baseMenuList,i=o.baseMenuItem,s=o.exportIcon,f=()=>d(!1),y=e=>{var t;"Tab"===e.key&&e.preventDefault(),("Tab"===(t=e.key)||"Escape"===t)&&f()};v.length>0&&v.push((0,O.jsx)(aA,{},"divider")),v.push((0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(t,{title:c.toolbarExport,disableInteractive:u,children:(0,O.jsx)(QT,{ref:p,id:m,"aria-controls":h,"aria-haspopup":"true","aria-expanded":u?"true":void 0,onClick:()=>d(!u),size:"small",children:(0,O.jsx)(s,{fontSize:"small"})})}),(0,O.jsx)(lA,{target:p.current,open:u,onClose:f,position:"bottom-end",children:(0,O.jsxs)(r,l({id:h,"aria-labelledby":m,onKeyDown:y,autoFocusItem:!0},a?.baseMenuList,{children:[!n?.disableToolbarButton&&(0,O.jsx)(vA,{render:(0,O.jsx)(i,l({dense:!0},a?.baseMenuItem)),options:n,onClick:f,children:c.toolbarExportPrint}),g.map(e=>(0,O.jsx)(xA,{render:(0,O.jsx)(i,l({dense:!0},a?.baseMenuItem)),options:e,onClick:f,children:c.toolbarExportImage(e.type)},e.type))]}))})]},"export-menu"))}return 0===v.length?null:(0,O.jsx)(nA,l({},i,{children:v}))}function SA(){return SA=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0?a:l;return n().createElement("g",null,n().createElement("line",{x1:v,y1:m,x2:v,y2:m+g,stroke:i,strokeWidth:2,strokeDasharray:"5,5",pointerEvents:"none"}),n().createElement("line",{x1:b,y1:m,x2:b,y2:m+g,stroke:i,strokeWidth:2,strokeDasharray:"5,5",pointerEvents:"none"}),n().createElement("rect",{x,y:m,width:w,height:g,fill:i,fillOpacity:.1,pointerEvents:"none"}),n().createElement("g",{transform:"translate(".concat(v,", ").concat(m+15,")")},n().createElement("rect",{x:-30,y:0,width:60,height:40,fill:i,rx:4}),n().createElement("text",{x:0,y:16,textAnchor:"middle",fill:"white",fontSize:10},String(A)),n().createElement("text",{x:0,y:32,textAnchor:"middle",fill:"white",fontSize:11,fontWeight:"bold"},"number"==typeof C?C.toFixed(2):C)),n().createElement("g",{transform:"translate(".concat(b,", ").concat(m+15,")")},n().createElement("rect",{x:-30,y:0,width:60,height:40,fill:i,rx:4}),n().createElement("text",{x:0,y:16,textAnchor:"middle",fill:"white",fontSize:10},String(O)),n().createElement("text",{x:0,y:32,textAnchor:"middle",fill:"white",fontSize:11,fontWeight:"bold"},"number"==typeof P?P.toFixed(2):P)),n().createElement("g",{transform:"translate(".concat((x+I)/2,", ").concat(m+g-30,")")},n().createElement("rect",{x:-50,y:0,width:100,height:26,fill:j,rx:4}),n().createElement("text",{x:0,y:17,textAnchor:"middle",fill:"white",fontSize:12,fontWeight:"bold"},E>=0?"+":"",E.toFixed(2)," (",T,"%)")))}function $A(t){var r,i=t.id,o=t.licenseKey,a=t.series,l=void 0===a?[]:a,c=t.xAxis,u=t.yAxis,d=t.height,p=void 0===d?400:d,h=t.width,m=t.margin,f=t.grid,g=t.colors,y=t.hideLegend,v=void 0!==y&&y,b=t.tooltip,x=t.skipAnimation,I=void 0!==x&&x,w=t.loading,k=void 0!==w&&w,S=t.zoom,M=t.initialZoom,C=t.showSlider,P=void 0!==C&&C,E=t.zoomInteractionConfig,T=t.referenceLines,A=void 0===T?[]:T,O=t.brushConfig,j=t.brushOverlay,L=void 0===j?"none":j,R=t.brushSeriesId,D=t.axisHighlight,$=void 0===D?{x:"line",y:"none"}:D,z=t.highlightedAxis,N=t.highlightedItem,_=t.tooltipItem,F=t.showToolbar,H=void 0!==F&&F,B=(t.brushData,t.zoomData,t.clickData,t.n_clicks),V=void 0===B?0:B,U=t.setProps,Y=(0,e.useId)();o&&!jA&&(s.setLicenseKey(o),jA=!0);var W=EA((0,e.useState)(function(){return S&&Array.isArray(S)&&S.length>0?S:M&&Array.isArray(M)&&M.length>0?M:[]}),2),G=W[0],K=W[1],q=(0,e.useRef)(JSON.stringify(S||M||[])),X=EA((0,e.useState)(0),2),Z=X[0],J=X[1];(0,e.useEffect)(function(){var e=JSON.stringify(S);S&&Array.isArray(S)&&e!==q.current&&(q.current=e,K(S),J(function(e){return e+1}))},[S]);var Q=(0,e.useRef)(JSON.stringify(null!=z?z:[])),ee=EA((0,e.useState)(function(){return z&&Array.isArray(z)?z:[]}),2),te=ee[0],ne=ee[1];(0,e.useEffect)(function(){var e=JSON.stringify(null!=z?z:[]);e!==Q.current&&(Q.current=e,ne(null!=z?z:[]))},[z]);var re=(0,e.useRef)(JSON.stringify(null!=N?N:null)),ie=EA((0,e.useState)(function(){return null!=N?N:null}),2),oe=ie[0],ae=ie[1];(0,e.useEffect)(function(){var e=JSON.stringify(null!=N?N:null);e!==re.current&&(re.current=e,ae(null!=N?N:null))},[N]);var se=(0,e.useRef)(JSON.stringify(null!=_?_:null)),le=EA((0,e.useState)(function(){return null!=_?_:null}),2),ce=le[0],ue=le[1];(0,e.useEffect)(function(){var e=JSON.stringify(null!=_?_:null);e!==se.current&&(se.current=e,ue(null!=_?_:null))},[_]);var de=(0,e.useMemo)(function(){return l.some(function(e){return e.area})},[l]),pe=(0,e.useMemo)(function(){return l.some(function(e){return!1!==e.showMark})},[l]),he=(0,e.useMemo)(function(){return l.map(function(e){return CA({type:"line"},e)})},[l]),me=(0,e.useMemo)(function(){var e=function(e){return!!e&&e.some(function(e){var t=e.zoom;return t&&"object"===OA(t)&&t.slider&&t.slider.enabled})};return e(c)||e(u)},[c,u]),fe=(0,e.useMemo)(function(){if(c)return c.map(function(e){var t=CA({},e);if(e.dateFormat)t.valueFormatter=function(e,t){var n=t||e;return function(t,r){return function(e,t){var n=e instanceof Date?e:new Date(e);return t.replace(/YYYY|YY|MMM|MM|dd|HH|mm|M|d/g,function(e){switch(e){case"YYYY":return n.getFullYear();case"YY":return String(n.getFullYear()).slice(-2);case"MMM":return LA[n.getMonth()];case"MM":return RA(n.getMonth()+1);case"M":return n.getMonth()+1;case"dd":return RA(n.getDate());case"d":return n.getDate();case"HH":return RA(n.getHours());case"mm":return RA(n.getMinutes());default:return e}})}(t,r&&"tick"===r.location?n:e)}}(e.dateFormat,e.dateTickFormat),delete t.dateFormat,delete t.dateTickFormat;else if(e.valueFormatter&&"function"!=typeof e.valueFormatter){var n=function(e){if("function"==typeof e)return e;if(e&&"object"===OA(e)&&"string"==typeof e.function){var t=window.dashMuiChartsFunctions;if(t&&"function"==typeof t[e.function]){var n=t[e.function],r=e.options||{};return function(){for(var e=arguments.length,t=new Array(e),i=0;i0&&(ge.initialZoom=G),ge.highlightedAxis=te,ge.onHighlightedAxisChange=function(e){var t=null!=e?e:[];ne(t),Q.current=JSON.stringify(t),U&&U({highlightedAxis:t})},ge.highlightedItem=oe,ge.onHighlightChange=function(e){var t=null!=e?e:null;ae(t),re.current=JSON.stringify(t),U&&U({highlightedItem:t})},ge.tooltipItem=ce,ge.onTooltipItemChange=function(e){var t=null!=e?e:null;ue(t),se.current=JSON.stringify(t),U&&U({tooltipItem:t})};var ye=["tickSize","disableLine","disableTicks","tickLabelStyle","labelStyle","tickLabelPlacement","tickPlacement","tickLabelMinGap","tickSpacing","tickInterval","tickLabelInterval"],ve=function(e){if(!e)return{};for(var t={},n=0,r=ye;n({x:n(e),y:r(e),width:i(e),height:o(e)})}const FA=4,HA=["seriesId","dataIndex","color","isFaded","isHighlighted","classes","skipAnimation","layout","xOrigin","yOrigin","placement","hidden"],BA=bm("text",{name:"MuiBarLabel",slot:"Root",overridesResolver:(e,t)=>[{[`&.${NA.faded}`]:t.faded},{[`&.${NA.highlighted}`]:t.highlighted},t.root]})(({theme:e})=>l({},e?.typography?.body2,{stroke:"none",fill:(e.vars||e)?.palette?.text?.primary,transitionProperty:"opacity, fill",transitionDuration:`${_I}ms`,transitionTimingFunction:FI,pointerEvents:"none"}));function VA(e){const t=Lh({props:e,name:"MuiBarLabel"}),{isFaded:n,hidden:r}=t,i=tt(t,HA),o=function(e){const{initialX:t,currentX:n,initialY:r,currentY:i}="outside"===e.placement?function(e){let t=0,n=0,r=0,i=0;return"vertical"===e.layout?(e.ye,applyProps(e,t){e.setAttribute("x",t.x.toString()),e.setAttribute("y",t.y.toString()),e.setAttribute("width",t.width.toString()),e.setAttribute("height",t.height.toString())},initialProps:o,skip:e.skipAnimation,ref:e.ref})}(t),a=function({placement:e,layout:t,xOrigin:n,x:r}){return"outside"===e&&"horizontal"===t?r{const{classes:t,seriesId:n,isFaded:r,isHighlighted:i,skipAnimation:o}=e;return uI({root:["root",`series-${n}`,i&&"highlighted",r&&"faded",!o&&"animate"]},zA,t)})(k),M=a?.barLabel??VA,C=yI({elementType:M,externalSlotProps:s?.barLabel,additionalProps:l({},x,{xOrigin:c,yOrigin:u,x:d,y:p,width:h,height:m,placement:v,className:S.root}),ownerState:k}),{ownerState:P}=C,E=tt(C,YA);if(!o)return null;const T=function(e){const{barLabel:t,value:n,dataIndex:r,seriesId:i,height:o,width:a}=e;return"value"===t?n?n?.toString():null:t({seriesId:i,dataIndex:r,value:n},{bar:{height:o,width:a}})}({barLabel:o,value:f,dataIndex:i,seriesId:t,height:m,width:h});return T?(0,O.jsx)(M,l({},E,P,{hidden:b,children:T})):null}const GA=["processedSeries","className","skipAnimation"];function KA(e){const{processedSeries:t,className:n,skipAnimation:r}=e,i=tt(e,GA),{seriesId:o,data:a,layout:s,xOrigin:c,yOrigin:u}=t,d=t.barLabel??e.barLabel;return d?(0,O.jsx)("g",{className:n,"data-series":o,children:a.map(({x:e,y:n,dataIndex:a,color:p,value:h,width:m,height:f})=>(0,O.jsx)(WA,l({seriesId:o,dataIndex:a,value:h,color:p,xOrigin:c,yOrigin:u,x:e,y:n,width:m,height:f,skipAnimation:r??!1,layout:s??"vertical"},i,{barLabel:d,barLabelPlacement:t.barLabelPlacement||"center"}),a))},o):null}function qA(e){return Xb("MuiBar",e)}Zb("MuiBar",["root","series","seriesLabels"]);const XA=e=>uI({root:["root"],series:["series"],seriesLabels:["seriesLabels"]},qA,e);function ZA(e,t){const n=Tn(e.x,t.x),r=Tn(e.y,t.y),i=Tn(e.width,t.width),o=Tn(e.height,t.height),a=Tn(e.borderRadius,t.borderRadius);return e=>({x:n(e),y:r(e),width:i(e),height:o(e),borderRadius:a(e)})}function JA(e){const{maskId:t,x:n,y:r,width:i,height:o,skipAnimation:a}=e,{ref:s,d:l}=function(e){const t={x:"vertical"===e.layout?e.x:e.xOrigin,y:"vertical"===e.layout?e.yOrigin:e.y,width:"vertical"===e.layout?e.width:0,height:"vertical"===e.layout?0:e.height,borderRadius:e.borderRadius};return aw({x:e.x,y:e.y,width:e.width,height:e.height,borderRadius:e.borderRadius},{createInterpolator:ZA,transformProps:t=>({d:QA(e.hasNegative,e.hasPositive,e.layout,t.x,t.y,t.width,t.height,e.xOrigin,e.yOrigin,t.borderRadius)}),applyProps(e,{d:t}){t&&e.setAttribute("d",t)},initialProps:t,skip:e.skipAnimation,ref:e.ref})}({layout:e.layout??"vertical",hasNegative:e.hasNegative,hasPositive:e.hasPositive,xOrigin:e.xOrigin,yOrigin:e.yOrigin,x:n,y:r,width:i,height:o,borderRadius:e.borderRadius??0,skipAnimation:a});return!e.borderRadius||e.borderRadius<=0?null:(0,O.jsx)("clipPath",{id:t,children:(0,O.jsx)("path",{ref:s,d:l})})}function QA(e,t,n,r,i,o,a,s,l,c){if("vertical"===n){if(t&&e){const e=Math.min(c,o/2,a/2);return`M${r},${i+a/2} v${-(a/2-e)} a${e},${e} 0 0 1 ${e},${-e} h${o-2*e} a${e},${e} 0 0 1 ${e},${e} v${a-2*e} a${e},${e} 0 0 1 ${-e},${e} h${-(o-2*e)} a${e},${e} 0 0 1 ${-e},${-e} v${-(a/2-e)}`}const n=Math.min(c,o/2);if(t)return`M${r},${Math.max(l,i+n)} v${Math.min(0,-(l-i-n))} a${n},${n} 0 0 1 ${n},${-n} h${o-2*n} a${n},${n} 0 0 1 ${n},${n} v${Math.max(0,l-i-n)} Z`;if(e)return`M${r},${Math.min(l,i+a-n)} v${Math.max(0,a-n)} a${n},${n} 0 0 0 ${n},${n} h${o-2*n} a${n},${n} 0 0 0 ${n},${-n} v${-Math.max(0,a-n)} Z`}if("horizontal"===n){if(t&&e){const e=Math.min(c,o/2,a/2);return`M${r+o/2},${i} h${o/2-e} a${e},${e} 0 0 1 ${e},${e} v${a-2*e} a${e},${e} 0 0 1 ${-e},${e} h${-(o-2*e)} a${e},${e} 0 0 1 ${-e},${-e} v${-(a-2*e)} a${e},${e} 0 0 1 ${e},${-e} h${o/2-e}`}const n=Math.min(c,a/2);if(t)return`M${Math.min(s,r-n)},${i} h${o} a${n},${n} 0 0 1 ${n},${n} v${a-2*n} a${n},${n} 0 0 1 ${-n},${n} h${-o} Z`;if(e)return`M${Math.max(s,r+o+n)},${i} h${-o} a${n},${n} 0 0 0 ${-n},${n} v${a-2*n} a${n},${n} 0 0 0 ${n},${n} h${o} Z`}}const eO=["completedData","masksData","borderRadius","onItemClick","skipAnimation"];function tO(t){let{completedData:n,masksData:r,borderRadius:i,onItemClick:o,skipAnimation:a}=t,s=tt(t,eO);const c=XA(),u=!i||i<=0;return(0,O.jsxs)(e.Fragment,{children:[!u&&r.map(({id:e,x:t,y:n,xOrigin:r,yOrigin:o,width:s,height:l,hasPositive:c,hasNegative:u,layout:d})=>(0,O.jsx)(JA,{maskId:e,borderRadius:i,hasNegative:u,hasPositive:c,layout:d,x:t,y:n,xOrigin:r,yOrigin:o,width:s,height:l,skipAnimation:a??!1},e)),n.map(({seriesId:e,layout:t,xOrigin:n,yOrigin:r,data:i})=>(0,O.jsx)("g",{"data-series":e,className:c.series,children:i.map(({dataIndex:i,color:c,maskId:d,x:p,y:h,width:m,height:f})=>{const g=(0,O.jsx)(bP,l({id:e,dataIndex:i,color:c,skipAnimation:a??!1,layout:t??"vertical",x:p,xOrigin:n,y:h,yOrigin:r,width:m,height:f},s,{onClick:o&&(t=>{o(t,{type:"bar",seriesId:e,dataIndex:i})})}),i);return u?g:(0,O.jsx)("g",{clipPath:`url(#${d})`,children:g},i)})},e))]})}const nO=ae(ls,cs,ft,function({axis:e,axisIds:t},{axis:n,axisIds:r},i,o){const{series:a,stackingGroups:s=[]}=i?.bar??{},l=t[0],c=r[0];let u;for(let t=0;t=P&&v<=E){const e="horizontal"===r.layout?o.x:o.y,t=r.stackedData[b],n=g.scale(t[0]),a=g.scale(t[1]);if(null==n||null==a)continue;const s=Math.min(n,a),l=Math.max(n,a);e>=s&&e<=l&&(u={seriesId:i,dataIndex:b})}}}if(u)return{type:"bar",seriesId:u.seriesId,dataIndex:u.dataIndex}});function rO(e,t,n){let r=e.get(t);return r?r.push(n):(r=[n],e.set(t,r)),r}function iO(e,t){return function(e,t,n,r,i,o,a,s){const l=Math.min(i,n/2,r/2),c=Math.min(o,n/2,r/2),u=Math.min(a,n/2,r/2),d=Math.min(s,n/2,r/2);return`M${e+l},${t}\n h${n-l-c}\n a${c},${c} 0 0 1 ${c},${c}\n v${r-c-u}\n a${u},${u} 0 0 1 -${u},${u}\n h-${n-u-d}\n a${d},${d} 0 0 1 -${d},-${d}\n v-${r-d-l}\n a${l},${l} 0 0 1 ${l},-${l}\n Z`}(e.x,e.y,e.width,e.height,"left"===e.borderRadiusSide||"top"===e.borderRadiusSide?t:0,"right"===e.borderRadiusSide||"top"===e.borderRadiusSide?t:0,"right"===e.borderRadiusSide||"bottom"===e.borderRadiusSide?t:0,"left"===e.borderRadiusSide||"bottom"===e.borderRadiusSide?t:0)}const oO=["skipAnimation","layout","xOrigin","yOrigin"],aO=["children","layout","xOrigin","yOrigin"],sO=bm("g")({'&[data-faded="true"]':{opacity:.3},"& path":{pointerEvents:"none"}});function lO(e){let{skipAnimation:t,layout:n,xOrigin:r,yOrigin:i}=e,o=tt(e,oO);return t?(0,O.jsx)(sO,l({},o)):(0,O.jsx)(uO,l({},o,{layout:n,xOrigin:r,yOrigin:i}))}const cO=bm("rect")({"@keyframes scaleInX":{from:{transform:"scaleX(0)"},to:{transform:"scaleX(1)"}},"@keyframes scaleInY":{from:{transform:"scaleY(0)"},to:{transform:"scaleY(1)"}},animationDuration:`${_I}ms`,animationFillMode:"forwards",'&[data-orientation="horizontal"]':{animationName:"scaleInX"},'&[data-orientation="vertical"]':{animationName:"scaleInY"}});function uO(t){let{children:n,layout:r,xOrigin:i,yOrigin:o}=t,a=tt(t,aO);const s=zx().use(he),c=z(),u=[];return"horizontal"===r?(u.push((0,O.jsx)(cO,{"data-orientation":"horizontal",x:s.left,width:i-s.left,y:s.top,height:s.height,style:{transformOrigin:`${i}px ${s.top+s.height/2}px`}},"left")),u.push((0,O.jsx)(cO,{"data-orientation":"horizontal",x:i,width:s.left+s.width-i,y:s.top,height:s.height,style:{transformOrigin:`${i}px ${s.top+s.height/2}px`}},"right"))):(u.push((0,O.jsx)(cO,{"data-orientation":"vertical",x:s.left,width:s.width,y:s.top,height:o-s.top,style:{transformOrigin:`${s.left+s.width/2}px ${o}px`}},"top")),u.push((0,O.jsx)(cO,{"data-orientation":"vertical",x:s.left,width:s.width,y:o,height:s.top+s.height-o,style:{transformOrigin:`${s.left+s.width/2}px ${o}px`}},"bottom"))),(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)("clipPath",{id:c,children:u}),(0,O.jsx)(sO,l({clipPath:`url(#${c})`},a,{children:n}))]})}function dO({completedData:t,borderRadius:n=0,onItemClick:r,skipAnimation:i=!1}){const o=e.useRef(null),a=eI();return function(t,n,r){const{instance:i}=$x(),o=eI(),a=zx(),s=e.useRef(!1),l=e.useRef(void 0),c=ke(()=>n?.()),u=ke(()=>r?.());e.useEffect(()=>{const e=o.current;if(!e)return;function n(){s.current=!0}function r(){const e=l.current;e&&(l.current=void 0,i.removeTooltipItem(e),i.clearHighlight(),u())}function d(){s.current=!1,r()}const p=function(n){const o=xs(e,n);if(!i.isPointInside(o.x,o.y))return void r();const s=t(a.state,o);s?(i.setLastUpdateSource("pointer"),i.setTooltipItem(s),i.setHighlight(s),c(),l.current=s):r()};return e.addEventListener("pointerleave",d),e.addEventListener("pointermove",p),e.addEventListener("pointerenter",n),()=>{e.removeEventListener("pointerenter",n),e.removeEventListener("pointermove",p),e.removeEventListener("pointerleave",d),s.current&&d()}},[t,i,c,u,a,o])}(nO,r?()=>{const e=a.current;e&&null==o.current&&(o.current=e.style.cursor,e.style.cursor="pointer")}:void 0,r?()=>{const e=a.current;e&&null!=o.current&&(e.style.cursor=o.current,o.current=null)}:void 0),function(t){const{instance:n}=$x(),r=eI(),i=zx();e.useEffect(()=>{const e=r.current;if(!e||!t)return;let o=null;const a=function(r){let a=r;o&&Math.abs(r.clientX-o.clientX)<=1&&Math.abs(r.clientY-o.clientY)<=1&&(a={clientX:o.clientX,clientY:o.clientY}),o=null;const s=xs(e,a);if(!n.isPointInside(s.x,s.y))return;const l=nO(i.state,s);l&&t(r,{type:"bar",seriesId:l.seriesId,dataIndex:l.dataIndex})},s=function(e){o=e};return e.addEventListener("click",a),e.addEventListener("pointerup",s),()=>{e.removeEventListener("click",a),e.removeEventListener("pointerup",s)}},[n,t,i,r])}(r),(0,O.jsx)(e.Fragment,{children:t.map(e=>(0,O.jsx)(hO,{series:e,borderRadius:n,skipAnimation:i},e.seriesId))})}const pO=e.memo(fO);function hO({series:t,borderRadius:n,skipAnimation:r}){const i=XA(),{store:o}=$x(),a=o.use(jI,t.seriesId),s=o.use(LI,t.seriesId);return(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(lO,{className:i.series,"data-series":t.seriesId,layout:t.layout,xOrigin:t.xOrigin,yOrigin:t.yOrigin,skipAnimation:r,"data-faded":s||void 0,"data-highlighted":a||void 0,children:(0,O.jsx)(mO,{processedSeries:t,borderRadius:n})}),(0,O.jsx)(pO,{processedSeries:t,borderRadius:n})]})}function mO({processedSeries:t,borderRadius:n}){const r=function(e,t){const n=new Map,r=new Map;for(let i=0;i=1e3&&(rO(n,o.color,s.join("")),r.delete(o.color))}for(const[e,t]of r.entries())t.length>0&&rO(n,e,t.join(""));return n}(t,n),i=[];let o=0;for(const[e,t]of r.entries())for(const n of t)i.push((0,O.jsx)("path",{fill:e,d:n},o)),o+=1;return(0,O.jsx)(e.Fragment,{children:i})}function fO({processedSeries:t,borderRadius:n}){const{store:r}=$x(),i=r.use(DI,t.seriesId),o=r.use(RI,t.seriesId),a=null!=i&&t.data.find(e=>e.dataIndex===i)||null,s=null!=o&&t.data.find(e=>e.dataIndex===o)||null,l=[];return null!=a&&l.push((0,O.jsx)("path",{fill:a.color,filter:"brightness(120%)","data-highlighted":!0,d:iO(a,n)},`highlighted-${t.seriesId}`)),null!=s&&l.push((0,O.jsx)("path",{fill:s.color,d:iO(s,n)},`unfaded-${s.seriesId}`)),(0,O.jsx)(e.Fragment,{children:l})}const gO=["skipAnimation","onItemClick","borderRadius","barLabel","renderer"],yO=bm("g",{name:"MuiBarPlot",slot:"Root"})({[`& .${mP.root}`]:{transitionProperty:"opacity, fill",transitionDuration:`${_I}ms`,transitionTimingFunction:FI}});function vO(e){const{skipAnimation:t,onItemClick:n,borderRadius:r,barLabel:i,renderer:o}=e,a=tt(e,gO),s=bw(xw()||t),c=bw(t),{xAxis:u}=_x(),{yAxis:d}=Fx(),{completedData:p,masksData:h}=pP(Nx(),u,d),m=XA(),f="svg-batch"===o?dO:tO;return(0,O.jsxs)(yO,{className:m.root,children:[(0,O.jsx)(f,l({completedData:p,masksData:h,skipAnimation:"svg-batch"===o?c:s,onItemClick:n,borderRadius:r},a)),p.map(e=>(0,O.jsx)(KA,l({className:m.seriesLabels,processedSeries:e,skipAnimation:s,barLabel:i},a),e.seriesId))]})}const bO=["x","y","id","classes","color","shape"];function xO(e){return Xb("MuiHighlightElement",e)}function IO(e){const{x:t,y:n,color:r,shape:i}=e,o=tt(e,bO),a=(e=>{const{classes:t,id:n}=e;return uI({root:["root",`series-${n}`]},xO,t)})(e),s="circle"===i?"circle":"path",c="circle"===i?{cx:0,cy:0,r:void 0===o.r?5:o.r}:{d:Qk(Jk[eS(i)])()},u=F>18?{transformOrigin:`${t} ${n}`}:{"transform-origin":`${t} ${n}`};return(0,O.jsx)(s,l({pointerEvents:"none",className:a.root,transform:`translate(${t} ${n})`,fill:r},u,c,o))}Zb("MuiHighlightElement",["root"]);const wO=["slots","slotProps"];function kO(e){const{slots:t,slotProps:n}=e,r=tt(e,wO),i=lk(),{xAxis:o,xAxisIds:a}=_x(),{yAxis:s,yAxisIds:c}=Fx(),{instance:u}=$x(),d=zx().use(sS);if(0===d.length)return null;if(void 0===i)return null;const{series:p,stackingGroups:h}=i,m=a[0],f=c[0],g=t?.lineHighlight??IO;return(0,O.jsx)("g",l({},r,{children:d.flatMap(({dataIndex:e,axisId:t})=>h.flatMap(({ids:r})=>r.flatMap(r=>{const{xAxisId:i=m,yAxisId:a=f,stackedData:c,data:d,disableHighlight:h,shape:y="circle"}=p[r];if(h||null==d[e])return null;if(t!==i)return null;const v=ck(o[i].scale),b=s[a].scale,x=o[i].data;if(void 0===x)throw new Error(`MUI X Charts: ${i===W?"The first `xAxis`":`The x-axis with id "${i}"`} should have data property to be able to display a line plot.`);const I=v(x[e]),w=b(c[e][1]);if(!u.isPointInside(I,w))return null;const k=$l(p[r],o[i],s[a]);return(0,O.jsx)(g,l({id:r,color:k(e),x:I,y:w,shape:y},n?.lineHighlight),`${r}`)})))}))}function SO(e){const{children:t,localeText:n,chartProviderProps:r,slots:i,slotProps:o}=Tx(e);return(0,O.jsx)(oc,l({},r,{children:(0,O.jsx)(_h,{localeText:n,children:(0,O.jsx)(lc,{slots:i,slotProps:o,defaultSlots:bv,children:t})})}))}function MO(){return zx().use(iI)}function CO(){const e=xm(),t=MO(),n=lk(),{xAxis:r,xAxisIds:i}=_x(),{yAxis:o,yAxisIds:a}=Fx();if(null===t||"line"!==t.type||!n)return null;const s=n.series[t.seriesId];if(null==s.data[t.dataIndex])return null;const l=s.xAxisId??i[0],c=s.yAxisId??a[0];return(0,O.jsx)("rect",{fill:"none",stroke:(e.vars??e).palette.text.primary,strokeWidth:2,x:r[l].scale(r[l].data[t.dataIndex])-6,y:o[c].scale(s.stackedData[t.dataIndex][1])-6,width:12,height:12,rx:3,ry:3})}const PO=["xAxis","yAxis","width","height","margin","color","baseline","sx","showTooltip","showHighlight","axisHighlight","children","slots","slotProps","data","plotType","valueFormatter","area","curve","className","disableClipping","clipAreaOffset","onHighlightChange","onHighlightedAxisChange","highlightedAxis","highlightedItem"],EO=5,TO=e.forwardRef(function(t,n){const{xAxis:r,yAxis:i,width:o,height:a,margin:s=EO,color:c,baseline:u,sx:d,showTooltip:p,showHighlight:h,axisHighlight:m,children:f,slots:g,slotProps:y,data:v,plotType:b="line",valueFormatter:x=e=>null===e?"":e.toString(),area:I,curve:w="linear",className:k,disableClipping:S,clipAreaOffset:M,onHighlightChange:C,onHighlightedAxisChange:P,highlightedAxis:E,highlightedItem:T}=t,A=tt(t,PO),j=`${z()}-clip-path`,L=e.useMemo(()=>({top:M?.top??1,right:M?.right??1,bottom:M?.bottom??1,left:M?.left??1}),[M?.bottom,M?.left,M?.right,M?.top]),R=e.useMemo(()=>h&&"bar"===b?{x:"band"}:{x:"none"},[b,h]),D=e.useMemo(()=>l({},R,m),[R,m]),$=t.slots?.tooltip??LC,N=e.useMemo(()=>{if(null!=c)return"function"==typeof c?e=>[c(e)]:[c]},[c]),_=e.useMemo(()=>[l({type:b,data:v,valueFormatter:x},"bar"===b?{}:{area:I,curve:w,baseline:u,disableHighlight:!h})],[I,u,w,v,b,h,x]),F=e.useMemo(()=>[l({id:W,scaleType:"bar"===b?"band":"point",hideTooltip:void 0===r},r,{data:r?.data??Array.from({length:v.length},(e,t)=>t),position:"none"})],[v.length,b,r]),H=e.useMemo(()=>[l({id:G},i,{position:"none"})],[i]);return(0,O.jsxs)(SO,{series:_,width:o,height:a,margin:s,xAxis:F,yAxis:H,colors:N,disableAxisListener:void 0===P&&(!p||"axis"!==y?.tooltip?.trigger)&&"none"===D?.x&&"none"===D?.y,onHighlightChange:C,onHighlightedAxisChange:P,highlightedAxis:E,highlightedItem:T,children:[(0,O.jsxs)(mI,l({className:k,ref:n,sx:d},A,{children:[(0,O.jsxs)("g",{clipPath:`url(#${j})`,children:["bar"===b&&(0,O.jsx)(vO,{skipAnimation:!0,slots:g,slotProps:y}),"line"===b&&(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(gk,{skipAnimation:!0,slots:g,slotProps:y}),(0,O.jsx)(Ek,{skipAnimation:!0,slots:g,slotProps:y})]})]}),"line"===b&&(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(kO,{slots:g,slotProps:y}),(0,O.jsx)(CO,{})]}),S?null:(0,O.jsx)(ZC,{id:j,offset:L}),(0,O.jsx)(_C,l({},D)),f]})),p&&(0,O.jsx)($,l({},t.slotProps?.tooltip))]})});function AO(e){return AO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},AO(e)}function OO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jO(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);no[e].position&&"none"!==o[e].position?(0,O.jsx)(gM,{slots:n,slotProps:r,axisId:e},e):null),a.map(e=>s[e].position&&"none"!==s[e].position?(0,O.jsx)(OM,{slots:n,slotProps:r,axisId:e},e):null)]})}DO.propTypes={id:i().string,data:i().arrayOf(i().number).isRequired,plotType:i().oneOf(["line","bar"]),width:i().number,height:i().number,color:i().string,colors:i().arrayOf(i().string),area:i().bool,curve:i().oneOf(["linear","monotoneX","monotoneY","natural","step","stepBefore","stepAfter","catmullRom","bumpX","bumpY"]),showTooltip:i().bool,showHighlight:i().bool,margin:i().shape({top:i().number,right:i().number,bottom:i().number,left:i().number}),xAxis:i().shape({id:i().string,data:i().array,scaleType:i().oneOf(["band","point","linear","log","time"])}),yAxis:i().shape({min:i().number,max:i().number}),axisHighlight:i().shape({x:i().oneOf(["line","band","none"]),y:i().oneOf(["line","band","none"])}),slotProps:i().object,clipAreaOffset:i().shape({top:i().number,right:i().number,bottom:i().number,left:i().number}),baseline:i().oneOfType([i().oneOf(["min","max"]),i().number]),strokeWidth:i().number,disableClipping:i().bool,highlightedIndex:i().number,highlightedItem:i().object,hoverIndex:i().number,hoverValue:i().number,n_hovers:i().number,setProps:i().func};const zO=e=>"start"===e?.horizontal?"start":"end"===e?.horizontal?"end":"center",NO=e=>"top"===e?.vertical?"flex-start":"bottom"===e?.vertical?"flex-end":"center",_O=bm("div",{name:"MuiChartsWrapper",slot:"Root",shouldForwardProp:e=>QE(e)&&"extendVertically"!==e&&"width"!==e})(({ownerState:e,width:t})=>{const n=((e=!1,t="horizontal",n="end",r)=>{const i=r?"auto":"1fr";return"horizontal"===t||e?i:"start"===n?`auto ${i}`:`${i} auto`})(e.hideLegend,e.legendDirection,e.legendPosition?.horizontal,t),r=((e=!1,t="horizontal",n="top")=>{const r="1fr";return"vertical"===t||e?r:"bottom"===n?`${r} auto`:`auto ${r}`})(e.hideLegend,e.legendDirection,e.legendPosition?.vertical),i=((e,t,n)=>e?'"chart"':"vertical"===t?"start"===n?.horizontal?'"legend chart"':'"chart legend"':"bottom"===n?.vertical?'"chart"\n "legend"':'"legend"\n "chart"')(e.hideLegend,e.legendDirection,e.legendPosition);return{variants:[{props:{extendVertically:!0},style:{height:"100%",minHeight:0}}],flex:1,display:"grid",gridTemplateColumns:n,gridTemplateRows:r,gridTemplateAreas:i,[`&:has(.${Jb.root})`]:{gridTemplateRows:`auto ${r}`,gridTemplateAreas:`"${n.split(" ").map(()=>"toolbar").join(" ")}"\n ${i}`},[`& .${Jb.root}`]:{gridArea:"toolbar",justifySelf:"center"},justifyContent:"safe center",justifyItems:zO(e.legendPosition),alignItems:NO(e.legendPosition)}});function FO(e){const{children:t,sx:n,extendVertically:r}=e,i=$x().chartRootRef,o=zx(),a=o.use(ge),s=o.use(ye);return(0,O.jsx)(_O,{ref:i,ownerState:e,sx:n,extendVertically:r??void 0===s,width:a,children:t})}const HO=["message"],BO=bm("text",{slot:"internal",shouldForwardProp:void 0})(({theme:e})=>l({},e.typography.body2,{stroke:"none",fill:(e.vars||e).palette.text.primary,shapeRendering:"crispEdges",textAnchor:"middle",dominantBaseline:"middle"}));function VO(e){const{message:t}=e,n=tt(e,HO),{top:r,left:i,height:o,width:a}=Nx(),{localeText:s}=rA();return(0,O.jsx)(BO,l({x:i+a/2,y:r+o/2},n,{children:t??s.loading}))}const UO=["message"],YO=bm("text",{slot:"internal",shouldForwardProp:void 0})(({theme:e})=>l({},e.typography.body2,{stroke:"none",fill:(e.vars||e).palette.text.primary,shapeRendering:"crispEdges",textAnchor:"middle",dominantBaseline:"middle"}));function WO(e){const{message:t}=e,n=tt(e,UO),{top:r,left:i,height:o,width:a}=Nx(),{localeText:s}=rA();return(0,O.jsx)(YO,l({x:i+a/2,y:r+o/2},n,{children:t??s.noData}))}function GO(e){const t=function(){const e=UM();return Object.values(e).every(e=>{if(!e)return!0;const{series:t,seriesOrder:n}=e;return n.every(e=>{const n=t[e];return"sankey"===n.type?0===n.data.links.length:0===n.data.length})})}();if(e.loading){const t=e.slots?.loadingOverlay??VO;return(0,O.jsx)(t,l({},e.slotProps?.loadingOverlay))}if(t){const t=e.slots?.noDataOverlay??WO;return(0,O.jsx)(t,l({},e.slotProps?.noDataOverlay))}return null}function KO(e){return Xb("MuiChartsLabelGradient",e)}const qO=Zb("MuiChartsLabelGradient",["root","vertical","horizontal","mask","fill"]),XO=["gradientId","direction","classes","className","rotate","reverse","thickness"],ZO=bm("div",{name:"MuiChartsLabelGradient",slot:"Root"})(({ownerState:e})=>{const t=((e,t,n,r)=>{const i=("vertical"===e?-90:0)+(n?90:0)+(t?180:0);return r&&"vertical"!==e?i+180:i})(e.direction,e.reverse,e.rotate,e.isRtl);return{display:"flex",alignItems:"center",justifyContent:"center",[`.${qO.mask}`]:{borderRadius:2,overflow:"hidden"},[`&.${qO.horizontal}`]:{width:"100%",[`.${qO.mask}`]:{height:e.thickness,width:"100%"}},[`&.${qO.vertical}`]:{height:"100%",[`.${qO.mask}`]:{width:e.thickness,height:"100%","> svg":{height:"100%"}}},svg:{transform:`rotate(${t}deg)`,display:"block"}}}),JO=oC("MuiChartsLabelGradient",{defaultProps:{direction:"horizontal",thickness:12},classesResolver:e=>{const{direction:t}=e;return uI({root:["root",t],mask:["mask"],fill:["fill"]},KO,e.classes)}},function(e,t){const{gradientId:n,classes:r,className:i}=e,o=tt(e,XO),a=fS();return(0,O.jsx)(ZO,l({className:Hh(r?.root,i),ownerState:l({},e,{isRtl:a}),"aria-hidden":"true",ref:t},o,{children:(0,O.jsx)("div",{className:r?.mask,children:(0,O.jsx)("svg",{viewBox:"0 0 24 24",children:(0,O.jsx)("rect",{className:r?.fill,width:"24",height:"24",fill:`url(#${n})`})})})}))});function QO(e){return Xb("MuiContinuousColorLegend",e)}const ej=Zb("MuiContinuousColorLegend",["root","minLabel","maxLabel","gradient","vertical","horizontal","start","end","extremes","label"]),tj=["minLabel","maxLabel","direction","axisDirection","axisId","rotateGradient","reverse","classes","className","gradientId","labelPosition","thickness"],nj=e=>{const t=e?"max-label":"min-label",n=e?"min-label":"max-label";return{row:{start:`\n '${t} . ${n}'\n 'gradient gradient gradient'\n `,end:`\n 'gradient gradient gradient'\n '${t} . ${n}'\n `,extremes:`\n '${t} gradient ${n}'\n `},column:{start:`\n '${n} gradient'\n '. gradient'\n '${t} gradient'\n `,end:`\n 'gradient ${n}'\n 'gradient .'\n 'gradient ${t}'\n `,extremes:`\n '${n}'\n 'gradient'\n '${t}'\n `}}},rj=bm("ul",{name:"MuiContinuousColorLegend",slot:"Root"})(({theme:e,ownerState:t})=>l({},e.typography.caption,{color:(e.vars||e).palette.text.primary,lineHeight:"100%",display:"grid",flexShrink:0,gap:e.spacing(.5),listStyleType:"none",paddingInlineStart:0,marginBlock:e.spacing(1),marginInline:e.spacing(1),gridArea:"legend",[`&.${ej.horizontal}`]:{gridTemplateRows:"min-content min-content",gridTemplateColumns:"min-content auto min-content",[`&.${ej.start}`]:{gridTemplateAreas:nj(t.reverse).row.start},[`&.${ej.end}`]:{gridTemplateAreas:nj(t.reverse).row.end},[`&.${ej.extremes}`]:{gridTemplateAreas:nj(t.reverse).row.extremes,gridTemplateRows:"min-content",alignItems:"center"}},[`&.${ej.vertical}`]:{gridTemplateRows:"min-content auto min-content",gridTemplateColumns:"min-content min-content",[`&.${ej.start}`]:{gridTemplateAreas:nj(t.reverse).column.start,[`.${ej.maxLabel}, .${ej.minLabel}`]:{justifySelf:"end"}},[`&.${ej.end}`]:{gridTemplateAreas:nj(t.reverse).column.end,[`.${ej.maxLabel}, .${ej.minLabel}`]:{justifySelf:"start"}},[`&.${ej.extremes}`]:{gridTemplateAreas:nj(t.reverse).column.extremes,gridTemplateColumns:"min-content",[`.${ej.maxLabel}, .${ej.minLabel}`]:{justifySelf:"center"}}},[`.${ej.gradient}`]:{gridArea:"gradient"},[`.${ej.maxLabel}`]:{gridArea:"max-label"},[`.${ej.minLabel}`]:{gridArea:"min-label"}})),ij=(e,t,n)=>"string"==typeof e?e:e?.({value:t,formattedValue:n})??n,oj=oC("MuiContinuousColorLegend",{defaultProps:{direction:"horizontal",labelPosition:"end",axisDirection:"z"},classesResolver:e=>{const{classes:t,direction:n,labelPosition:r}=e;return uI({root:["root",n,r],minLabel:["minLabel"],maxLabel:["maxLabel"],gradient:["gradient"],mark:["mark"],label:["label"]},QO,t)}},function(e,t){const{minLabel:n,maxLabel:r,direction:i,axisDirection:o,axisId:a,rotateGradient:s,reverse:c,classes:u,className:d,gradientId:p,thickness:h}=e,m=tt(e,tj),f=Jx(),g=function({axisDirection:e,axisId:t}){const{xAxis:n,xAxisIds:r}=_x(),{yAxis:i,yAxisIds:o}=Fx(),{zAxis:a,zAxisIds:s}=Kx();switch(e){case"x":return n["string"==typeof t?t:r[t??0]];case"y":return i["string"==typeof t?t:o[t??0]];default:return a["string"==typeof t?t:s[t??0]]}}({axisDirection:o,axisId:a}),y=g?.colorMap;if(!y||!y.type||"continuous"!==y.type)return null;const v=y.min??0,b=y.max??100,x=void 0===g.scale?void 0:g.valueFormatter,I=x?x(v,{location:"legend"}):v.toLocaleString(),w=x?x(b,{location:"legend"}):b.toLocaleString(),k=ij(n,v,I),S=ij(r,b,w),M=(0,O.jsx)("li",{className:u?.minLabel,children:(0,O.jsx)(GC,{className:u?.label,children:k})}),C=(0,O.jsx)("li",{className:u?.maxLabel,children:(0,O.jsx)(GC,{className:u?.label,children:S})});return(0,O.jsxs)(rj,l({className:Hh(u?.root,d),ref:t},m,{ownerState:e,children:[c?C:M,(0,O.jsx)("li",{className:u?.gradient,children:(0,O.jsx)(JO,{direction:i,rotate:s,reverse:c,thickness:h,gradientId:p??f(g.id)})}),c?M:C]}))});function aj(){return ak("heatmap")}const sj=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t},lj=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=Hh(n?.className,o,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},a={...n,...i,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}({...i,...r}),s=sj(r),l=sj(i),c=t(a),u=Hh(c?.className,n?.className,o,i?.className,r?.className),d={...c?.style,...n?.style,...i?.style,...r?.style},p={...c,...n,...l,...s};return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}};function cj(e){return["highlighted","faded"].includes(e)?IT("Charts",e):IT("MuiHeatmap",e)}l({},wT("MuiHeatmap",["cell","series"]),{highlighted:"Charts-highlighted",faded:"Charts-faded"});const uj=["seriesId","dataIndex","color","value","isHighlighted","isFaded","slotProps","slots"],dj=bm("rect",{name:"MuiHeatmap",slot:"Cell",overridesResolver:(e,t)=>t.arc})(({ownerState:e})=>({filter:(e.isHighlighted?"saturate(120%)":e.isFaded&&"saturate(80%)")||void 0,fill:e.color,shapeRendering:"crispEdges"}));function pj(e){const{seriesId:t,dataIndex:n,color:r,value:i,isHighlighted:o=!1,isFaded:a=!1,slotProps:s={},slots:c={}}=e,u=tt(e,uj),d=bI({type:"heatmap",seriesId:t,dataIndex:n}),p={seriesId:t,dataIndex:n,color:r,value:i,isFaded:a,isHighlighted:o},h=(e=>{const{classes:t,seriesId:n,isFaded:r,isHighlighted:i}=e;return lT({cell:["cell",`series-${n}`,r&&"faded",i&&"highlighted"]},cj,t)})(p),m=c?.cell??dj,f=function(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,a=i?{}:function(e,t){return"function"==typeof e?e(t,void 0):e}(n,r),{props:s,internalRef:l}=lj({...o,externalSlotProps:a});return function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(t,{...s,ref:vT(l,a?.ref,e.additionalProps?.ref)},r)}({elementType:m,additionalProps:d,externalForwardedProps:l({},u),externalSlotProps:s.cell,ownerState:p,className:h.cell});return(0,O.jsx)(m,l({},f))}function hj(e){const t=zx(),n=uk(),r=dk(),i=function(e){const t=function(e){const{zAxis:t,zAxisIds:n}=Kx();return t["string"==typeof e?e:n[e??0]]}(e);return t.colorScale}(),o=aj(),a=t.use(TI),s=t.use(AI),l=n.domain(),c=r.domain();if(!o||0===o.seriesOrder.length)return null;const u=o.series[o.seriesOrder[0]];return(0,O.jsx)("g",{children:u.data.map(([t,d,p],h)=>{const m=n(l[t]),f=r(c[d]),g=i?.(p);if(void 0===m||void 0===f||!g)return null;const y={seriesId:u.id,dataIndex:h};return(0,O.jsx)(pj,{width:n.bandwidth(),height:r.bandwidth(),x:m,y:f,color:g,dataIndex:h,seriesId:o.seriesOrder[0],value:p,slots:e.slots,slotProps:e.slotProps,isHighlighted:a(y),isFaded:s(y)},`${t}_${d}`)})})}const mj=e=>{const{axis:t}=e;return[Math.min(...t.data??[]),Math.max(...t.data??[])]},fj={seriesProcessor:e=>{const{series:t,seriesOrder:n}=e,r={};return Object.keys(t).forEach(e=>{r[e]=l({valueFormatter:e=>e[2].toString(),data:[],labelMarkType:"square"},t[e])}),{series:r,seriesOrder:n}},colorProcessor:(e,t,n,r)=>{const i=r?.colorScale;return i?t=>{const n=e.data[t],r=i(n[2]);return null===r?"":r}:()=>""},legendGetter:()=>[],tooltipGetter:e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||void 0===r.dataIndex)return null;const i=yl(t.label,"tooltip"),o=t.data[r.dataIndex],a=t.valueFormatter(o,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:i,value:o,formattedValue:a,markType:t.labelMarkType}},tooltipItemPositionGetter:e=>{const{series:t,identifier:n,axesConfig:r,placement:i}=e;if(!n||void 0===n.dataIndex)return null;const o=t.heatmap?.series[n.seriesId];if(null==o)return null;if(void 0===r.x||void 0===r.y||!Et(r.x)||!Et(r.y))return null;const[a,s]=o.data[n.dataIndex],l=r.x.scale(r.x.scale.domain()[a]),c=r.y.scale(r.y.scale.domain()[s]);if(void 0===l||void 0===c)return null;const u=r.x.scale.bandwidth(),d=r.y.scale.bandwidth();switch(i){case"bottom":return{x:l+u/2,y:c+d};case"left":return{x:l,y:c+d/2};case"right":return{x:l+u,y:c+d/2};default:return{x:l+u/2,y:c}}},xExtremumGetter:mj,yExtremumGetter:mj,getSeriesWithDefaultValues:(e,t,n)=>l({color:n[t%n.length]},e,{id:e.id??`auto-generated-id-${t}`}),identifierSerializer:jl},gj=bm("caption",{name:"MuiChartsHeatmapTooltip",slot:"AxesValue"})(({theme:e})=>({textAlign:"start",whiteSpace:"nowrap",padding:e.spacing(.5,1.5),color:(e.vars||e).palette.text.secondary,borderBottom:`solid ${(e.vars||e).palette.divider} 1px`,"& span":{marginRight:e.spacing(1.5)}})),yj=e=>{const{classes:t}=e;return lT({root:["root"],paper:["paper"],table:["table"],row:["row"],cell:["cell"],mark:["mark"],markContainer:["markContainer"],labelCell:["labelCell"],valueCell:["valueCell"]},HM,t)};function vj(e){const t=yj(e),n=Hx(),r=Bx(),i=aj(),o=ZM();if(!o||!i||0===i.seriesOrder.length)return null;const{series:a,seriesOrder:s}=i,l=s[0],{color:c,value:u,identifier:d,markType:p}=o,[h,m]=u,f=n.valueFormatter?.(n.data[h],{location:"tooltip",scale:n.scale})??n.data[h].toLocaleString(),g=r.valueFormatter?.(r.data[m],{location:"tooltip",scale:r.scale})??r.data[m].toLocaleString(),y=a[l].valueFormatter(u,{dataIndex:d.dataIndex}),v=yl(a[l].label,"tooltip");return(0,O.jsx)(JM,{className:t.paper,children:(0,O.jsxs)(QM,{className:t.table,children:[(0,O.jsxs)(gj,{children:[(0,O.jsx)("span",{children:f}),(0,O.jsx)("span",{children:g})]}),(0,O.jsx)("tbody",{children:(0,O.jsxs)(eC,{className:t.row,children:[(0,O.jsxs)(tC,{className:Hh(t.labelCell,t.cell),component:"th",children:[(0,O.jsx)("div",{className:t.markContainer,children:(0,O.jsx)(lC,{type:p,color:c,className:t.mark})}),v]}),(0,O.jsx)(tC,{className:Hh(t.valueCell,t.cell),component:"td",children:y})]})})]})})}function bj(e){const t=yj({classes:e.classes});return(0,O.jsx)(jC,l({trigger:"item"},e,{classes:t,children:(0,O.jsx)(vj,{classes:t})}))}const xj=[Xs,Ys,Ws,Bs,Zs,tx,Mb,Ix],Ij=Cn(["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]),wj={heatmap:fj};function kj(e,t){return void 0===e?.[0]?.data||0===e[0].data.length?[]:Array.from({length:Math.max(...e[0].data.map(e=>e[t]))+1},(e,t)=>t)}const Sj=e=>kj(e,0),Mj=e=>kj(e,1),Cj=e.forwardRef(function(t,n){const r=Lh({props:t,name:"MuiHeatmap"}),{apiRef:i,xAxis:o,yAxis:a,zAxis:s,series:c,width:u,height:d,margin:p,colors:h,dataset:m,sx:f,onAxisClick:g,children:y,slots:v,slotProps:b,loading:x,highlightedItem:I,onHighlightChange:w,hideLegend:k=!0,showToolbar:S=!1}=r,M=`${iP()}-clip-path`,C=e.useMemo(()=>(o&&o.length>0?o:[{id:W}]).map(e=>l({scaleType:"band",categoryGapRatio:0},e,{data:e.data??Sj(c)})),[c,o]),P=e.useMemo(()=>(a&&a.length>0?a:[{id:G}]).map(e=>l({scaleType:"band",categoryGapRatio:0},e,{data:e.data??Mj(c)})),[c,a]),E=e.useMemo(()=>s??[{colorMap:{type:"continuous",min:0,max:100,color:Ij}}],[s]),T={sx:f,legendPosition:r.slotProps?.legend?.position,legendDirection:r.slotProps?.legend?.direction,hideLegend:k},A=v?.tooltip??bj,j=v?.toolbar??kA;return(0,O.jsx)(Rx,{apiRef:i,seriesConfig:wj,series:c.map(e=>l({type:"heatmap"},e)),width:u,height:d,margin:p,xAxis:C,yAxis:P,zAxis:E,colors:h,dataset:m,disableAxisListener:!0,highlightedItem:I,onHighlightChange:w,onAxisClick:g,plugins:xj,children:(0,O.jsxs)(FO,l({},T,{children:[S?(0,O.jsx)(j,l({},r.slotProps?.toolbar)):null,!k&&(0,O.jsx)(XC,{slots:l({},v,{legend:v?.legend??oj}),slotProps:{legend:l({labelPosition:"extremes"},b?.legend)},sx:"vertical"===b?.legend?.direction?{height:150}:{width:"50%"}}),(0,O.jsxs)(mI,{ref:n,sx:f,children:[(0,O.jsxs)("g",{clipPath:`url(#${M})`,children:[(0,O.jsx)(hj,{slots:v,slotProps:b}),(0,O.jsx)(GO,{loading:x,slots:v,slotProps:b})]}),(0,O.jsx)($O,{slots:v,slotProps:b}),(0,O.jsx)(ZC,{id:M}),(0,O.jsx)(WT,{}),y]}),!x&&(0,O.jsx)(A,l({},b?.tooltip))]}))})});var Pj=["x","y","width","height","ownerState","onCellClick"],Ej=["x","y","width","height","ownerState","cellConfig","onCellClick"];function Tj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Aj(e){for(var t=1;tA*A+O*O&&(S=C,M=P),{cx:S,cy:M,x01:-u,y01:-d,x11:S*(i/I-1),y11:M*(i/I-1)}}function Yj(){var e=_j,t=Fj,n=rl(0),r=null,i=Hj,o=Bj,a=Vj,s=null,l=Tw(c);function c(){var c,u,d,p=+e.apply(this,arguments),h=+t.apply(this,arguments),m=i.apply(this,arguments)-Xl,f=o.apply(this,arguments)-Xl,g=Hl(f-m),y=f>m;if(s||(s=c=l()),hKl)if(g>Zl-Kl)s.moveTo(h*Vl(m),h*Wl(m)),s.arc(0,0,h,m,f,!y),p>Kl&&(s.moveTo(p*Vl(f),p*Wl(f)),s.arc(0,0,p,f,m,y));else{var v,b,x=m,I=f,w=m,k=f,S=g,M=g,C=a.apply(this,arguments)/2,P=C>Kl&&(r?+r.apply(this,arguments):Gl(p*p+h*h)),E=Yl(Hl(h-p)/2,+n.apply(this,arguments)),T=E,A=E;if(P>Kl){var O=Jl(P/p*Wl(C)),j=Jl(P/h*Wl(C));(S-=2*O)>Kl?(w+=O*=y?1:-1,k-=O):(S=0,w=k=(m+f)/2),(M-=2*j)>Kl?(x+=j*=y?1:-1,I-=j):(M=0,x=I=(m+f)/2)}var L=h*Vl(x),R=h*Wl(x),D=p*Vl(k),$=p*Wl(k);if(E>Kl){var z,N=h*Vl(I),_=h*Wl(I),F=p*Vl(w),H=p*Wl(w);if(g1?0:d<-1?ql:Math.acos(d))/2),G=Gl(z[0]*z[0]+z[1]*z[1]);T=Yl(E,(p-G)/(W-1)),A=Yl(E,(h-G)/(W+1))}else T=A=0}M>Kl?A>Kl?(v=Uj(F,H,L,R,h,A,y),b=Uj(N,_,D,$,h,A,y),s.moveTo(v.cx+v.x01,v.cy+v.y01),AKl&&S>Kl?T>Kl?(v=Uj(D,$,N,_,p,-T,y),b=Uj(L,R,F,H,p,-T,y),s.lineTo(v.cx+v.x01,v.cy+v.y01),T({startAngle:n(e),endAngle:r(e),innerRadius:i(e),outerRadius:o(e),paddingAngle:a(e),cornerRadius:s(e)})}Nj.propTypes={id:i().string,licenseKey:i().string,data:i().arrayOf(i().arrayOf(i().number)),xAxis:i().shape({data:i().array,label:i().string,scaleType:i().oneOf(["band","point"]),zoom:i().oneOfType([i().bool,i().object])}),yAxis:i().shape({data:i().array,label:i().string,scaleType:i().oneOf(["band","point"]),zoom:i().oneOfType([i().bool,i().object])}),colorScale:i().shape({type:i().oneOf(["continuous","piecewise"]),min:i().number,max:i().number,colors:i().arrayOf(i().string),thresholds:i().arrayOf(i().number)}),width:i().number,height:i().number,margin:i().shape({top:i().number,right:i().number,bottom:i().number,left:i().number}),hideLegend:i().bool,tooltip:i().shape({trigger:i().oneOf(["item","none"])}),highlightScope:i().shape({highlight:i().oneOf(["item","none"]),fade:i().oneOf(["global","none"])}),cellStyle:i().oneOfType([i().oneOf(["rounded"]),i().shape({gap:i().number,borderRadius:i().number,showValue:i().bool,fontSize:i().number,fontWeight:i().number,textColor:i().string})]),slotProps:i().object,highlightedItem:i().object,clickData:i().object,n_clicks:i().number,setProps:i().func};const Gj=["className","classes","color","dataIndex","id","isFaded","isHighlighted","isFocused","onClick","cornerRadius","startAngle","endAngle","innerRadius","outerRadius","paddingAngle","skipAnimation","stroke","skipInteraction"];function Kj(e){return Xb("MuiPieArc",e)}const qj=Zb("MuiPieArc",["root","highlighted","faded","series","focusIndicator"]),Xj=bm("path",{name:"MuiPieArc",slot:"Root",overridesResolver:(e,t)=>t.arc})({transitionProperty:"opacity, fill, filter",transitionDuration:`${_I}ms`,transitionTimingFunction:FI}),Zj=e.forwardRef(function(e,t){const{className:n,classes:r,color:i,dataIndex:o,id:a,isFaded:s,isHighlighted:c,isFocused:u,onClick:d,cornerRadius:p,startAngle:h,endAngle:m,innerRadius:f,outerRadius:g,paddingAngle:y,skipAnimation:v,stroke:b,skipInteraction:x}=e,I=tt(e,Gj),w=xm(),k=b??(w.vars||w).palette.background.paper,S={id:a,dataIndex:o,classes:r,color:i,isFaded:s,isHighlighted:c,isFocused:u},M=(e=>{const{classes:t,id:n,isFaded:r,isHighlighted:i,dataIndex:o}=e;return uI({root:["root",`series-${n}`,`data-index-${o}`,i&&"highlighted",r&&"faded"]},Kj,t)})(S),C=bI({type:"pie",seriesId:a,dataIndex:o},x),P=function(e){const t={startAngle:(e.startAngle+e.endAngle)/2,endAngle:(e.startAngle+e.endAngle)/2,innerRadius:e.innerRadius,outerRadius:e.outerRadius,paddingAngle:e.paddingAngle,cornerRadius:e.cornerRadius};return aw({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,paddingAngle:e.paddingAngle,cornerRadius:e.cornerRadius},{createInterpolator:Wj,transformProps:e=>({d:Yj().cornerRadius(e.cornerRadius)({padAngle:e.paddingAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle}),visibility:e.startAngle===e.endAngle?"hidden":"visible"}),applyProps(e,t){e.setAttribute("d",t.d),e.setAttribute("visibility",t.visibility)},initialProps:t,skip:e.skipAnimation,ref:e.ref})}({cornerRadius:p,startAngle:h,endAngle:m,innerRadius:f,outerRadius:g,paddingAngle:y,skipAnimation:v,ref:t});return(0,O.jsx)(Xj,l({onClick:d,cursor:d?"pointer":"unset",ownerState:S,className:Hh(M.root,n),fill:S.color,opacity:S.isFaded?.3:1,filter:S.isHighlighted?"brightness(120%)":"none",stroke:k,strokeWidth:1,strokeLinejoin:"round","data-highlighted":S.isHighlighted||void 0,"data-faded":S.isFaded||void 0},I,C,P))});function Jj(e,t,n,r){const{faded:i,highlighted:o,paddingAngle:a=0,cornerRadius:s=0}=e,{radius:{inner:c=0,label:u,outer:d}}=t,p=l({additionalRadius:0},r&&i||n&&o||{}),h=Math.max(0,Ql(p.paddingAngle??a)),m=Math.max(0,p.innerRadius??c),f=Math.max(0,p.outerRadius??d+p.additionalRadius);return{paddingAngle:h,innerRadius:m,outerRadius:f,cornerRadius:p.cornerRadius??s,arcLabelRadius:p.arcLabelRadius??u??(m+f)/2}}function Qj(t){const{id:n,data:r,faded:i,highlighted:o}=t,{isFaded:a,isHighlighted:s}=iS(),c=function(){const e=MO();return t=>null!==e&&Us(e,t)}();return e.useMemo(()=>r.map((e,r)=>{const u={seriesId:n,dataIndex:r},d=s(u),p=!d&&a(u),h=c({type:"pie",seriesId:n,dataIndex:r}),m=Jj(t,{radius:{inner:t.innerRadius??0,outer:t.outerRadius,label:t.arcLabelRadius??0,available:0}},d,p),f=l({additionalRadius:0},p&&i||d&&o||{});return l({},e,f,{dataIndex:r,isFaded:p,isHighlighted:d,isFocused:h},m)}),[r,n,s,a,c,t,i,o])}const eL=["slots","slotProps","innerRadius","outerRadius","cornerRadius","paddingAngle","id","highlighted","faded","data","onItemClick","skipAnimation"];function tL(e){const{slots:t,slotProps:n,innerRadius:r=0,outerRadius:i,cornerRadius:o=0,paddingAngle:a=0,id:s,highlighted:c,faded:u={additionalRadius:-5},data:d,onItemClick:p,skipAnimation:h}=e,m=tt(e,eL),f=Qj({innerRadius:r,outerRadius:i,cornerRadius:o,paddingAngle:a,id:s,highlighted:c,faded:u,data:d});if(0===d.length)return null;const g=t?.pieArc??Zj;return(0,O.jsx)("g",l({},m,{children:f.map((e,t)=>(0,O.jsx)(g,l({startAngle:e.startAngle,endAngle:e.endAngle,paddingAngle:e.paddingAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius,skipAnimation:h??!1,id:s,color:e.color,dataIndex:t,isFaded:e.isFaded,isHighlighted:e.isHighlighted,isFocused:e.isFocused,onClick:p&&(n=>{p(n,{type:"pie",seriesId:s,dataIndex:t},e)})},n?.pieArc),e.dataIndex))}))}function nL(e,t){const n=Tn(e.startAngle,t.startAngle),r=Tn(e.endAngle,t.endAngle),i=Tn(e.innerRadius,t.innerRadius),o=Tn(e.outerRadius,t.outerRadius),a=Tn(e.paddingAngle,t.paddingAngle),s=Tn(e.cornerRadius,t.cornerRadius);return e=>({startAngle:n(e),endAngle:r(e),innerRadius:i(e),outerRadius:o(e),paddingAngle:a(e),cornerRadius:s(e)})}const rL=["id","classes","color","startAngle","endAngle","paddingAngle","arcLabelRadius","innerRadius","outerRadius","cornerRadius","formattedArcLabel","isHighlighted","isFaded","skipAnimation","hidden"];function iL(e){return Xb("MuiPieArcLabel",e)}const oL=Zb("MuiPieArcLabel",["root","highlighted","faded","animate","series"]),aL=bm("text",{name:"MuiPieArcLabel",slot:"Root"})(({theme:e})=>({fill:(e.vars||e).palette.text.primary,textAnchor:"middle",dominantBaseline:"middle",pointerEvents:"none",animationName:"animate-opacity",animationDuration:"0s",animationTimingFunction:FI,transitionDuration:`${_I}ms`,transitionProperty:"opacity",transitionTimingFunction:FI,[`&.${oL.animate}`]:{animationDuration:`${_I}ms`},"@keyframes animate-opacity":{from:{opacity:0}}})),sL=e.forwardRef(function(e,t){const{id:n,classes:r,color:i,startAngle:o,endAngle:a,paddingAngle:s,arcLabelRadius:c,cornerRadius:u,formattedArcLabel:d,isHighlighted:p,isFaded:h,skipAnimation:m,hidden:f}=e,g=tt(e,rL),y=(e=>{const{classes:t,id:n,isFaded:r,isHighlighted:i,skipAnimation:o}=e;return uI({root:["root",`series-${n}`,i&&"highlighted",r&&"faded",!o&&"animate"]},iL,t)})({id:n,classes:r,color:i,isFaded:h,isHighlighted:p,skipAnimation:m}),v=function(e){const t={startAngle:(e.startAngle+e.endAngle)/2,endAngle:(e.startAngle+e.endAngle)/2,innerRadius:e.arcLabelRadius??e.innerRadius,outerRadius:e.arcLabelRadius??e.outerRadius,paddingAngle:e.paddingAngle,cornerRadius:e.cornerRadius};return aw({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.arcLabelRadius??e.innerRadius,outerRadius:e.arcLabelRadius??e.outerRadius,paddingAngle:e.paddingAngle,cornerRadius:e.cornerRadius},{createInterpolator:nL,transformProps:e=>{const[t,n]=Yj().cornerRadius(e.cornerRadius).centroid({padAngle:e.paddingAngle,startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius});return{x:t,y:n}},applyProps(e,{x:t,y:n}){e.setAttribute("x",t.toString()),e.setAttribute("y",n.toString())},initialProps:t,skip:e.skipAnimation,ref:e.ref})}({cornerRadius:u,startAngle:o,endAngle:a,innerRadius:c,outerRadius:c,paddingAngle:s,skipAnimation:m,ref:t});return(0,O.jsx)(aL,l({className:y.root},g,v,{opacity:f?0:1,children:d}))}),lL=["arcLabel","arcLabelMinAngle","arcLabelRadius","cornerRadius","data","faded","highlighted","id","innerRadius","outerRadius","paddingAngle","skipAnimation","slotProps","slots"],cL=180/Math.PI;function uL(e,t,n){if(!e)return null;if((n.endAngle-n.startAngle)*cL(0,O.jsx)(v,l({startAngle:e.startAngle,endAngle:e.endAngle,paddingAngle:e.paddingAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,arcLabelRadius:e.arcLabelRadius,cornerRadius:e.cornerRadius,id:c,color:e.color,isFaded:e.isFaded,isHighlighted:e.isHighlighted,formattedArcLabel:uL(t,n,e),skipAnimation:h??!1},m?.pieArcLabel),e.id??e.dataIndex))}))}function pL(){return ak("pie")}function hL(){return zx().use(gt).pie??{}}function mL(e){return Xb("MuiPieChart",e)}function fL(e){const{skipAnimation:t,slots:n,slotProps:r,onItemClick:i}=e,o=pL(),a=hL(),s=bw(t),l=uI({root:["root"],series:["series"],seriesLabels:["seriesLabels"]},mL,void 0);if(void 0===o)return null;const{series:c,seriesOrder:u}=o;return(0,O.jsxs)("g",{children:[u.map(e=>{const{cornerRadius:t,paddingAngle:o,data:u,highlighted:d,faded:p}=c[e];return(0,O.jsx)("g",{className:l.series,transform:`translate(${a[e].center.x}, ${a[e].center.y})`,"data-series":e,children:(0,O.jsx)(tL,{innerRadius:a[e].radius.inner,outerRadius:a[e].radius.outer,cornerRadius:t,paddingAngle:o,id:e,data:u,skipAnimation:s,highlighted:d,faded:p,onItemClick:i,slots:n,slotProps:r})},e)}),u.map(e=>{const{cornerRadius:t,paddingAngle:i,arcLabel:o,arcLabelMinAngle:u,data:d}=c[e];return(0,O.jsx)("g",{className:l.seriesLabels,transform:`translate(${a[e].center.x}, ${a[e].center.y})`,"data-series":e,children:(0,O.jsx)(dL,{innerRadius:a[e].radius.inner,outerRadius:a[e].radius.outer,arcLabelRadius:a[e].radius.label,cornerRadius:t,paddingAngle:i,id:e,data:d,skipAnimation:s,arcLabel:o,arcLabelMinAngle:u,slots:n,slotProps:r})},e)})]})}Zb("MuiPieChart",["root","series","seriesLabels"]);const gL=["width","height","margin","children","series","colors","dataset","desc","onAxisClick","highlightedAxis","onHighlightedAxisChange","disableVoronoi","voronoiMaxRadius","onItemClick","disableAxisListener","highlightedItem","onHighlightChange","sx","title","xAxis","yAxis","zAxis","rotationAxis","radiusAxis","skipAnimation","seriesConfig","plugins","localeText","slots","slotProps","experimentalFeatures","enableKeyboardNavigation","brushConfig","onHiddenItemsChange","hiddenItems"],yL=(e,t)=>{const n=e,{width:r,height:i,margin:o,children:a,series:s,colors:c,dataset:u,desc:d,onAxisClick:p,highlightedAxis:h,onHighlightedAxisChange:m,disableVoronoi:f,voronoiMaxRadius:g,onItemClick:y,disableAxisListener:v,highlightedItem:b,onHighlightChange:x,sx:I,title:w,xAxis:k,yAxis:S,zAxis:M,rotationAxis:C,radiusAxis:P,skipAnimation:E,seriesConfig:T,plugins:A,localeText:O,slots:j,slotProps:L,experimentalFeatures:R,enableKeyboardNavigation:D,brushConfig:$,onHiddenItemsChange:z,hiddenItems:N}=n,_=l({title:w,desc:d,sx:I,ref:t},tt(n,gL));return{chartDataProviderProps:{margin:o,series:s,colors:c,dataset:u,disableAxisListener:v,highlightedItem:b,onHighlightChange:x,onAxisClick:p,highlightedAxis:h,onHighlightedAxisChange:m,disableVoronoi:f,voronoiMaxRadius:g,onItemClick:y,xAxis:k,yAxis:S,zAxis:M,rotationAxis:C,radiusAxis:P,skipAnimation:E,width:r,height:i,localeText:O,seriesConfig:T,experimentalFeatures:R,enableKeyboardNavigation:D,brushConfig:$,onHiddenItemsChange:z,hiddenItems:N,plugins:A??Px,slots:j,slotProps:L},chartsSurfaceProps:_,children:a}},vL=[Ys,Ws,Zs,Bb,kx],bL=["arcLabelRadius"];function xL(e){const t=xm(),n=MO(),r=hL(),{isHighlighted:i,isFaded:o}=zI(n),a=pL();if(null===n||"pie"!==n.type||!a)return null;const s=a?.series[n.seriesId],{center:c,radius:u}=r[n.seriesId];if(!s||!c||!u)return null;const d=s.data[n.dataIndex],p=tt(Jj(s,r[n.seriesId],i,o),bL);return(0,O.jsx)(Zj,l({transform:`translate(${r[s.id].center.x}, ${r[s.id].center.y})`,startAngle:d.startAngle,endAngle:d.endAngle,color:"transparent",pointerEvents:"none",skipInteraction:!0,skipAnimation:!0,stroke:(t.vars??t).palette.text.primary,id:s.id,className:qj.focusIndicator,dataIndex:n.dataIndex,isFaded:!1,isHighlighted:!1,isFocused:!1,strokeWidth:3},p,e))}const IL=["series","width","height","margin","colors","sx","skipAnimation","hideLegend","children","slots","slotProps","onItemClick","loading","highlightedItem","onHighlightChange","className","showToolbar"],wL=e.forwardRef(function(e,t){const n=Lh({props:e,name:"MuiPieChart"}),{series:r,width:i,height:o,margin:a,colors:s,sx:c,skipAnimation:u,hideLegend:d,children:p,slots:h,slotProps:m,onItemClick:f,loading:g,highlightedItem:y,onHighlightChange:v,className:b,showToolbar:x}=n,I=tt(n,IL),w=ve(a,wt),{chartDataProviderProps:k,chartsSurfaceProps:S}=yL(l({},I,{series:r.map(e=>l({type:"pie"},e)),width:i,height:o,margin:w,colors:s,highlightedItem:y,onHighlightChange:v,className:b,skipAnimation:u,plugins:vL}),t),M=h?.tooltip??LC,C=h?.toolbar;return(0,O.jsx)(SO,l({},k,{children:(0,O.jsxs)(FO,{legendPosition:m?.legend?.position,legendDirection:m?.legend?.direction??"vertical",sx:c,hideLegend:d??!1,children:[x&&C?(0,O.jsx)(C,l({},m?.toolbar)):null,!d&&(0,O.jsx)(XC,{direction:m?.legend?.direction??"vertical",slots:h,slotProps:m}),(0,O.jsxs)(mI,l({},S,{children:[(0,O.jsx)(fL,{slots:h,slotProps:m,onItemClick:f}),(0,O.jsx)(xL,{}),(0,O.jsx)(GO,{loading:g,slots:h,slotProps:m}),p]})),!g&&(0,O.jsx)(M,l({trigger:"item"},m?.tooltip))]})}))});function kL(e){return kL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kL(e)}function SL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ML(e){for(var t=1;t0)t=a.map(function(e,t){return ML(ML({},e),{},{id:e.id||"series-".concat(t)})});else{var $={data:o};void 0!==u&&($.innerRadius=u),void 0!==d&&($.outerRadius=d),h&&($.paddingAngle=h),f&&($.cornerRadius=f),0!==y&&($.startAngle=y),360!==b&&($.endAngle=b),void 0!==x&&($.cx=x),void 0!==I&&($.cy=I),w&&($.arcLabel=w),k&&($.arcLabelMinAngle=k),E&&($.highlightScope=E),t=[$]}var z={series:t,height:c,skipAnimation:O,onItemClick:function(e,t){if(D){var n,r,i,s,l,c=0;a&&a.length>0?(c=a.findIndex(function(e,n){return(e.id||"series-".concat(n))===t.seriesId}),-1===c&&(c=0),s=((null===(l=a[c])||void 0===l?void 0:l.data)||[])[t.dataIndex]):s=o[t.dataIndex],D({clickData:{id:null===(n=s)||void 0===n?void 0:n.id,seriesId:t.seriesId,seriesIndex:c,dataIndex:t.dataIndex,value:null===(r=s)||void 0===r?void 0:r.value,label:null===(i=s)||void 0===i?void 0:i.label,timestamp:(new Date).toISOString()},n_clicks:(L||0)+1})}},onHighlightChange:function(e){D&&D({highlightedItem:e})}};return s&&(z.width=s),S&&(z.colors=S),C&&(z.hideLegend=C),P&&(z.margin=P),T&&(z.slotProps=ML(ML({},z.slotProps),{},{tooltip:{trigger:T.trigger||"item"}})),void 0!==R&&(z.highlightedItem=R),n().createElement("div",{id:r},n().createElement(wL,z))}PL.propTypes={id:i().string,data:i().arrayOf(i().shape({id:i().oneOfType([i().number,i().string]),value:i().number.isRequired,label:i().string,color:i().string})),series:i().arrayOf(i().shape({id:i().string,data:i().arrayOf(i().shape({id:i().oneOfType([i().number,i().string]),value:i().number.isRequired,label:i().string,color:i().string})).isRequired,innerRadius:i().oneOfType([i().number,i().string]),outerRadius:i().oneOfType([i().number,i().string]),paddingAngle:i().number,cornerRadius:i().number,startAngle:i().number,endAngle:i().number,arcLabel:i().oneOf(["value","label","formattedValue"]),arcLabelMinAngle:i().number,arcLabelRadius:i().number,highlightScope:i().shape({highlight:i().oneOf(["item","none"]),fade:i().oneOf(["global","none"])})})),width:i().number,height:i().number,innerRadius:i().oneOfType([i().number,i().string]),outerRadius:i().oneOfType([i().number,i().string]),paddingAngle:i().number,cornerRadius:i().number,startAngle:i().number,endAngle:i().number,cx:i().oneOfType([i().number,i().string]),cy:i().oneOfType([i().number,i().string]),arcLabel:i().oneOf(["value","label","formattedValue"]),arcLabelMinAngle:i().number,colors:i().arrayOf(i().string),hideLegend:i().bool,margin:i().shape({top:i().number,right:i().number,bottom:i().number,left:i().number}),highlightScope:i().shape({highlight:i().oneOf(["item","none"]),fade:i().oneOf(["global","none"])}),tooltip:i().shape({trigger:i().oneOf(["item","none"])}),skipAnimation:i().bool,clickData:i().object,n_clicks:i().number,highlightedItem:i().shape({seriesId:i().string,dataIndex:i().number}),setProps:i().func};const EL=ae(e=>e.voronoi,e=>e?.isVoronoiEnabled);function TL(e){return Xb("MuiScatter",e)}Zb("MuiScatter",["root"]);const AL=e=>uI({root:["root"]},TL,e),OL=["ownerState"];function jL(e){const{series:t,xScale:n,yScale:r,colorGetter:i,onItemClick:o,classes:a,slots:s,slotProps:c}=e,{instance:u}=$x(),d=zx().use(EL)||t.disableHover,{isFaded:p,isHighlighted:h}=iS(),m=xP(t,n,r,u.isPointInside),f=s?.marker??kP,g=tt(yI({elementType:f,externalSlotProps:c?.marker,additionalProps:{seriesId:t.id,size:t.markerSize},ownerState:{}}),OL),y=AL(a);return(0,O.jsx)("g",{"data-series":t.id,className:y.root,children:m.map(e=>{const n=h(e),r=!n&&p(e);return(0,O.jsx)(f,l({dataIndex:e.dataIndex,color:i(e.dataIndex),isHighlighted:n,isFaded:r,x:e.x,y:e.y,onClick:o&&(n=>o(n,{type:"scatter",seriesId:t.id,dataIndex:e.dataIndex})),"data-highlighted":n||void 0,"data-faded":r||void 0},d?void 0:function(e,t){return{onPointerEnter:function(){t&&(e.setLastUpdateSource("pointer"),e.setTooltipItem(t),e.setHighlight("sankey"===t.type?t:{seriesId:t.seriesId,dataIndex:t.dataIndex}))},onPointerLeave:function(){t&&(e.removeTooltipItem(t),e.clearHighlight())},onPointerDown:vI}}(u,e),g),e.id??e.dataIndex)})})}const LL=.01;function RL(e,t,n){return`M${e-n} ${t} a${n} ${n} 0 1 1 0 ${LL}`}function DL(t){const{series:n,xScale:r,yScale:i,color:o,colorGetter:a,markerSize:s}=t,l=function(e,t,n,r,i,o){const{instance:a}=$x(),s=ck(n),l=ck(r),c=new Map,u=new Map;for(let n=0;n=1e3&&(rO(c,m,f.join("")),u.delete(m))}for(const[e,t]of u.entries())t.length>0&&rO(c,e,t.join(""));return c}(n.data,s,r,i,o,a),c=[];let u=0;for(const[e,t]of l.entries())for(const n of t)c.push((0,O.jsx)("path",{fill:e,d:n},u)),u+=1;return(0,O.jsx)(e.Fragment,{children:c})}const $L=e.memo(DL),zL=bm("g",{slot:"internal",shouldForwardProp:void 0})({'&[data-faded="true"]':{opacity:.3},"& path":{pointerEvents:"none"}});function NL(t){const{series:n,xScale:r,yScale:i,color:o,colorGetter:a,classes:s}=t,{store:l}=$x(),c=l.use(jI,n.id),u=l.use(LI,n.id),d=l.use(DI,n.id),p=l.use(RI,n.id),h=n.markerSize*(c?1.2:1),m=AL(s),f=[];if(null!=d){const e=n.data[d],t=ck(r),s=ck(i);f.push((0,O.jsx)("path",{fill:a?a(d):o,"data-highlighted":!0,d:RL(t(e.x),s(e.y),1.2*h)},`highlighted-${n.id}`))}if(null!=p){const e=n.data[p],t=ck(r),s=ck(i);f.push((0,O.jsx)("path",{fill:a?a(p):o,d:RL(t(e.x),s(e.y),h)},`unfaded-${n.id}`))}return(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(zL,{className:m.root,"data-series":n.id,"data-faded":u||void 0,"data-highlighted":c||void 0,children:(0,O.jsx)($L,{series:n,xScale:r,yScale:i,color:o,colorGetter:a,markerSize:h})}),f]})}function _L(t){const{slots:n,slotProps:r,onItemClick:i,renderer:o}=t,a=IP(),{xAxis:s,xAxisIds:c}=_x(),{yAxis:u,yAxisIds:d}=Fx(),{zAxis:p,zAxisIds:h}=Kx();if(void 0===a)return null;const{series:m,seriesOrder:f}=a,g=c[0],y=d[0],v=h[0],b="svg-batch"===o?NL:jL,x=n?.scatter??b;return(0,O.jsx)(e.Fragment,{children:f.map(e=>{const{id:t,xAxisId:o,yAxisId:a,zAxisId:c,color:d}=m[e],h=Dl.colorProcessor(m[e],s[o??g],u[a??y],p[c??v]),f=s[o??g].scale,b=u[a??y].scale;return(0,O.jsx)(x,l({xScale:f,yScale:b,color:d,colorGetter:h,series:m[e],onItemClick:i,slots:n,slotProps:r},r?.scatter),t)})})}const FL=[Xs,Mb,Ys,Ws,Bs,Zs,Bb,Cx,kx],HL=["xAxis","yAxis","zAxis","series","axisHighlight","voronoiMaxRadius","disableVoronoi","hideLegend","width","height","margin","colors","sx","grid","onItemClick","children","slots","slotProps","loading","highlightedItem","onHighlightChange","className","showToolbar","renderer","brushConfig"];function BL(e){const t=xm(),n=MO(),r=IP(),{xAxis:i,xAxisIds:o}=_x(),{yAxis:a,yAxisIds:s}=Fx();if(null===n||"scatter"!==n.type||!r)return null;const c=r?.series[n.seriesId],u=c.xAxisId??o[0],d=c.yAxisId??s[0],p=ck(i[u].scale),h=ck(a[d].scale),m=c.data[n.dataIndex],f=p(m.x),g=h(m.y),y=c.markerSize+3;return(0,O.jsx)("rect",l({fill:"none",stroke:(t.vars??t).palette.text.primary,strokeWidth:2,x:f-y,y:g-y,width:2*y,height:2*y,rx:3,ry:3},e))}const VL=e.forwardRef(function(t,n){const r=Lh({props:t,name:"MuiScatterChart"}),{chartsWrapperProps:i,chartContainerProps:o,chartsAxisProps:a,gridProps:s,scatterPlotProps:c,overlayProps:u,legendProps:d,axisHighlightProps:p,children:h}=(t=>{const{xAxis:n,yAxis:r,zAxis:i,series:o,axisHighlight:a,voronoiMaxRadius:s,disableVoronoi:c,width:u,height:d,margin:p,colors:h,sx:m,grid:f,onItemClick:g,children:y,slots:v,slotProps:b,loading:x,highlightedItem:I,onHighlightChange:w,className:k,renderer:S,brushConfig:M}=t,C=tt(t,HL),P=e.useMemo(()=>o.map(e=>l({type:"scatter"},e)),[o]),E=!0!==c||"svg-batch"===S,T=l({},C,{series:P,width:u,height:d,margin:p,colors:h,xAxis:n,yAxis:r,zAxis:i,highlightedItem:I,onHighlightChange:w,disableVoronoi:c,voronoiMaxRadius:s,onItemClick:E?g:void 0,className:k,plugins:FL,slots:v,slotProps:b,brushConfig:M}),A={slots:v,slotProps:b},O={vertical:f?.vertical,horizontal:f?.horizontal},j={onItemClick:E?void 0:g,slots:v,slotProps:b,renderer:S},L={loading:x,slots:v,slotProps:b},R={slots:v,slotProps:b},D=l({y:"none",x:"none"},a);return{chartsWrapperProps:{sx:m,legendPosition:t.slotProps?.legend?.position,legendDirection:t.slotProps?.legend?.direction,hideLegend:t.hideLegend??!1},chartContainerProps:T,chartsAxisProps:A,gridProps:O,scatterPlotProps:j,overlayProps:L,legendProps:R,axisHighlightProps:D,children:y}})(r),{chartDataProviderProps:m,chartsSurfaceProps:f}=yL(o,n),g=r.slots?.tooltip??LC,y=r.slots?.toolbar;return(0,O.jsx)(SO,l({},m,{children:(0,O.jsxs)(FO,l({},i,{children:[r.showToolbar&&y?(0,O.jsx)(y,l({},r.slotProps?.toolbar)):null,!r.hideLegend&&(0,O.jsx)(XC,l({},d)),(0,O.jsxs)(mI,l({},f,{children:[(0,O.jsx)($O,l({},a)),(0,O.jsx)(FM,l({},s)),(0,O.jsx)("g",{"data-drawing-container":!0,children:(0,O.jsx)(_L,l({},c))}),(0,O.jsx)(GO,l({},u)),(0,O.jsx)(_C,l({},p)),(0,O.jsx)(BL,{}),h]})),!r.loading&&(0,O.jsx)(g,l({trigger:"item"},r.slotProps?.tooltip))]}))}))});function UL(e){return UL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},UL(e)}function YL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WL(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function tR(e,t){if(e){if("string"==typeof e)return nR(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nR(e,t):void 0}}function nR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ns+c||a.yl+u)){var p,h;try{var m=i.invert(a.x);p=m instanceof Date?m.getTime():m,h=o.invert(a.y)}catch(e){return}if(null!=p&&null!=h){var f={x:"number"==typeof p?Math.round(100*p)/100:p,y:"number"==typeof h?Math.round(100*h)/100:h},g="".concat(f.x,"|").concat(f.y);g!==d.current&&(d.current=g,r({crosshairPosition:f}))}}}}},onMouseLeave:function(){null!==d.current&&(d.current=null,null==r||r({crosshairPosition:null}))},onContextMenu:function(e){if(r&&null!=i&&i.invert&&null!=o&&o.invert){var t=e.currentTarget.ownerSVGElement||e.currentTarget.closest("svg");if(t){var n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;var a=n.matrixTransform(t.getScreenCTM().inverse());if(!(a.xs+c||a.yl+u)){var d,p;try{var h=i.invert(a.x);d=h instanceof Date?h.getTime():h,p=o.invert(a.y)}catch(e){return}e.preventDefault(),r({crosshairClick:{x:"number"==typeof d?Math.round(100*d)/100:d,y:"number"==typeof p?Math.round(100*p)/100:p,button:"right",timestamp:(new Date).toISOString()}})}}}}})}var aR=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],sR=function(e){return e<10?"0"+e:""+e};function lR(e){var t=e.scatterSeries,r=e.proximity,i=MC();if(!i||0===i.length)return null;var o=i[0],a=o.axisValue,s=o.axisFormattedValue,l=o.seriesItems,c=s;a instanceof Date?c=a.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):"number"==typeof a&&a>1e12&&(c=new Date(a).toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}));var u=new Set((t||[]).map(function(e){return e.id})),d=(l||[]).filter(function(e){return!u.has(e.seriesId)}),p=[];if(t&&null!=a){var h,m=a instanceof Date?a.getTime():Number(a),f=eR(t);try{for(f.s();!(h=f.n()).done;){var g=h.value;if(g.data){var y,v=eR(g.data);try{for(v.s();!(y=v.n()).done;){var b=y.value;if(Math.abs(b.x-m)<=r){var x=b.y;p.push({seriesId:g.id,color:g.color||"#666",formattedLabel:g.label||g.id,formattedValue:"number"==typeof x?x.toLocaleString(void 0,{maximumFractionDigits:2}):String(x)})}}}catch(e){v.e(e)}finally{v.f()}}}}catch(e){f.e(e)}finally{f.f()}}var I=[].concat(function(e){return function(e){if(Array.isArray(e))return nR(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||tR(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(d),p);if(0===I.length)return null;var w={display:"flex",alignItems:"center",gap:6,padding:"2px 0"},k=function(e){return{display:"inline-block",width:10,height:10,borderRadius:"50%",backgroundColor:e,flexShrink:0}};return n().createElement("div",{style:{backgroundColor:"var(--mantine-color-body, white)",border:"1px solid var(--mantine-color-default-border, #e0e0e0)",borderRadius:4,padding:"8px 12px",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",fontSize:13,color:"var(--mantine-color-text, inherit)"}},n().createElement("div",{style:{marginBottom:4,fontWeight:500}},c),I.map(function(e,t){return n().createElement("div",{key:"".concat(e.seriesId,"-").concat(t),style:w},n().createElement("span",{style:k(e.color)}),n().createElement("span",null,e.formattedLabel||e.seriesId,":"),n().createElement("span",{style:{fontWeight:500}},e.formattedValue))}))}function cR(e){var t=e.dataIndex,r=(e.seriesConfig,e.scatterSeries),i=e.proximity,o=uk(),a=Nx(),s=Hx(),l=UM();if(null==t||!a)return null;var c=null==s?void 0:s.data;if(!c||t<0||t>=c.length)return null;var u,d,p=c[t];try{u=o(p)}catch(e){return null}if(null==u||isNaN(u))return null;if(p instanceof Date)d=p.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"});else if("number"==typeof p&&p>1e12)d=new Date(p).toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"});else if(null!=s&&s.valueFormatter)try{d=s.valueFormatter(p,{location:"tooltip"})}catch(e){d=String(p)}else d=String(p);var h=[],m=l.line;if(m&&m.seriesOrder.forEach(function(e){var n,r=m.series[e];if(r){var i=null===(n=r.data)||void 0===n?void 0:n[t];null!=i&&h.push({seriesId:e,color:r.color||"#666",formattedLabel:r.label||e,formattedValue:"number"==typeof i?i.toLocaleString(void 0,{maximumFractionDigits:2}):String(i)})}}),new Set((r||[]).map(function(e){return e.id})),r&&null!=p){var f,g=p instanceof Date?p.getTime():Number(p),y=eR(r);try{for(y.s();!(f=y.n()).done;){var v=f.value;if(v.data){var b,x=eR(v.data);try{for(x.s();!(b=x.n()).done;){var I=b.value;Math.abs(I.x-g)<=i&&h.push({seriesId:v.id,color:v.color||"#666",formattedLabel:v.label||v.id,formattedValue:"number"==typeof I.y?I.y.toLocaleString(void 0,{maximumFractionDigits:2}):String(I.y)})}}catch(e){x.e(e)}finally{x.f()}}}}catch(e){y.e(e)}finally{y.f()}}if(0===h.length)return null;var w=a.left+u,k=a.left+a.width/2,S=a.left+u>k,M={display:"flex",alignItems:"center",gap:6,padding:"2px 0"},C=function(e){return{display:"inline-block",width:10,height:10,borderRadius:"50%",backgroundColor:e,flexShrink:0}};return n().createElement("div",{style:{position:"absolute",top:a.top+8,left:S?void 0:w+12,right:S?"calc(100% - ".concat(w-12,"px)"):void 0,backgroundColor:"var(--mantine-color-body, white)",border:"1px solid var(--mantine-color-default-border, #e0e0e0)",borderRadius:4,padding:"8px 12px",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",fontSize:13,zIndex:1e3,pointerEvents:"none",whiteSpace:"nowrap",color:"var(--mantine-color-text, inherit)"}},n().createElement("div",{style:{marginBottom:4,fontWeight:500}},d),h.map(function(e,t){return n().createElement("div",{key:"".concat(e.seriesId,"-").concat(t),style:M},n().createElement("span",{style:C(e.color)}),n().createElement("span",null,e.formattedLabel,":"),n().createElement("span",{style:{fontWeight:500}},e.formattedValue))}))}function uR(e){var t=e.forecast,r=e.color,i=void 0===r?"#ff9800":r,o=e.opacity,a=void 0===o?.15:o,s=e.yAxisId,l=uk(),c=dk(s);if(!t||0===t.length)return null;for(var u=[],d=0;d1e10?new Date(p.x):p.x),m=c(p.y),f=c(null!=p.upper?p.upper:p.y),g=c(null!=p.lower?p.lower:p.y);null==h||null==m||isNaN(h)||isNaN(m)||u.push({x:h,y:m,yUp:isNaN(f)?m:f,yLo:isNaN(g)?m:g})}if(u.length<2)return null;for(var y="M ".concat(u[0].x," ").concat(u[0].y),v=1;v=0;I--)b+=" L ".concat(u[I].x," ").concat(u[I].yLo);return b+=" Z",n().createElement("g",null,n().createElement("path",{d:b,fill:i,fillOpacity:a}),n().createElement("path",{d:y,stroke:i,strokeWidth:2,strokeDasharray:"6 4",fill:"none"}))}function dR(t){var r,i,o=t.id,a=t.licenseKey,l=t.series,c=void 0===l?[]:l,u=t.xAxis,d=t.yAxis,p=t.zAxis,h=t.dataset,m=t.height,f=void 0===m?400:m,g=t.width,y=t.margin,v=t.grid,b=t.colors,x=t.voronoiMaxRadius,I=t.disableVoronoi,w=void 0!==I&&I,k=t.axisHighlight,S=t.tooltip,M=t.hideLegend,C=void 0!==M&&M,P=t.skipAnimation,E=void 0!==P&&P,T=(t.loading,t.slotProps,t.referenceLines),A=t.initialZoom,O=t.showToolbar,j=void 0!==O&&O,L=t.showSlider,R=void 0!==L&&L,D=t.zoomInteractionConfig,$=t.highlightedAxis,z=t.highlightedItem,N=t.tooltipItem,_=t.syncedTooltipIndex,F=t.forecast,H=t.forecastColor,B=void 0===H?"#ff9800":H,V=t.forecastOpacity,U=void 0===V?.15:V,Y=t.enableCrosshair,W=void 0!==Y&&Y,G=(t.crosshairPosition,t.crosshairClick,t.clickData,t.n_clicks),K=void 0===G?0:G,q=(t.zoomData,t.setProps);a&&!iR&&(s.setLicenseKey(a),iR=!0);var X=(0,e.useId)(),Z="".concat(X,"-clip"),J=QL((0,e.useState)(0),2),Q=J[0],ee=J[1],te=(0,e.useRef)(JSON.stringify(A));(0,e.useEffect)(function(){var e=JSON.stringify(A);e!==te.current&&(te.current=e,ee(function(e){return e+1}))},[A]);var ne=(0,e.useRef)(JSON.stringify(null!=$?$:[])),re=QL((0,e.useState)(function(){return $&&Array.isArray($)?$:[]}),2),ie=re[0],oe=re[1];(0,e.useEffect)(function(){var e=JSON.stringify(null!=$?$:[]);e!==ne.current&&(ne.current=e,oe(null!=$?$:[]))},[$]);var ae=QL((0,e.useState)(z||null),2),se=ae[0],le=ae[1],ce=(0,e.useRef)(JSON.stringify(z));(0,e.useEffect)(function(){var e=JSON.stringify(z);e!==ce.current&&(ce.current=e,le(z||null))},[z]);var ue=(0,e.useRef)(JSON.stringify(null!=N?N:null)),de=QL((0,e.useState)(function(){return null!=N?N:null}),2),pe=de[0],he=de[1];(0,e.useEffect)(function(){var e=JSON.stringify(null!=N?N:null);e!==ue.current&&(ue.current=e,he(null!=N?N:null))},[N]);var me=(0,e.useMemo)(function(){return c&&0!==c.length?c.map(function(e,t){return ZL(ZL({},e),{},{id:e.id||"series-".concat(t)})}):[]},[c]),fe=(0,e.useMemo)(function(){return me.some(function(e){return"scatter"===e.type})},[me]),ge=(0,e.useMemo)(function(){return me.some(function(e){return"line"===e.type})},[me]),ye=(0,e.useMemo)(function(){return me.some(function(e){return"line"===e.type&&e.area})},[me]),ve=(0,e.useMemo)(function(){return me.some(function(e){return"line"===e.type&&!1!==e.showMark})},[me]),be=(0,e.useMemo)(function(){return me.filter(function(e){return"scatter"===e.type})},[me]),xe=function(e,t){q&&t&&q({clickData:{type:"line",seriesId:t.seriesId,dataIndex:t.dataIndex,timestamp:(new Date).toISOString()},n_clicks:(K||0)+1})},Ie=(0,e.useMemo)(function(){var e=function(e){return!!e&&e.some(function(e){var t=e.zoom;return t&&"object"===rR(t)&&t.slider&&t.slider.enabled})};return e(u)||e(d)},[u,d]),we=(0,e.useMemo)(function(){if(u)return u.map(function(e){var t=ZL({},e);if(e.dateFormat)t.valueFormatter=function(e,t){var n=t||e;return function(t,r){return function(e,t){var n=e instanceof Date?e:new Date(e);return t.replace(/YYYY|YY|MMM|MM|dd|HH|mm|M|d/g,function(e){switch(e){case"YYYY":return n.getFullYear();case"YY":return String(n.getFullYear()).slice(-2);case"MMM":return aR[n.getMonth()];case"MM":return sR(n.getMonth()+1);case"M":return n.getMonth()+1;case"dd":return sR(n.getDate());case"d":return n.getDate();case"HH":return sR(n.getHours());case"mm":return sR(n.getMinutes());default:return e}})}(t,r&&"tick"===r.location?n:e)}}(e.dateFormat,e.dateTickFormat),delete t.dateFormat,delete t.dateTickFormat;else if(e.valueFormatter&&"function"!=typeof e.valueFormatter){var n=function(e){if("function"==typeof e)return e;if(e&&"object"===rR(e)&&"string"==typeof e.function){var t=window.dashMuiChartsFunctions;if(t&&"function"==typeof t[e.function]){var n=t[e.function],r=e.options||{};return function(){for(var e=arguments.length,t=new Array(e),i=0;i0&&s0&&(Ae.initialZoom=A),Ae.highlightedAxis=ie,Ae.onHighlightedAxisChange=function(e){var t=null!=e?e:[];oe(t),ne.current=JSON.stringify(t),q&&q({highlightedAxis:t})},Ae.highlightedItem=se,Ae.onHighlightChange=function(e){le(e),ce.current=JSON.stringify(e),q&&q({highlightedItem:e})},Ae.tooltipItem=pe,Ae.onTooltipItemChange=function(e){var t=null!=e?e:null;he(t),ue.current=JSON.stringify(t),q&&q({tooltipItem:t})},n().createElement("div",{id:o,style:{position:"relative"}},n().createElement(Rx,qL({key:Q},Ae),j&&n().createElement(kA,null),!C&&n().createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:8}},n().createElement(XC,null)),n().createElement(mI,null,v&&n().createElement(FM,{horizontal:v.horizontal,vertical:v.vertical}),n().createElement(ZC,{id:Z}),n().createElement("g",{clipPath:"url(#".concat(Z,")")},ye&&n().createElement(gk,{skipAnimation:E}),ge&&n().createElement(Ek,{onItemClick:xe,skipAnimation:E}),fe&&n().createElement(_L,{onItemClick:function(e,t){if(q&&t){var n,r=me.find(function(e){return e.id===t.seriesId}),i=null==r||null===(n=r.data)||void 0===n?void 0:n[t.dataIndex];q({clickData:{type:"scatter",seriesId:t.seriesId,dataIndex:t.dataIndex,x:null==i?void 0:i.x,y:null==i?void 0:i.y,timestamp:(new Date).toISOString()},n_clicks:(K||0)+1})}}})),ve&&n().createElement(hS,{onItemClick:xe,skipAnimation:E}),Ee.map(function(e,t){return n().createElement(gM,qL({key:e.axisId||"x-".concat(t),axisId:e.axisId},e.renderProps))}),Te.map(function(e,t){return n().createElement(OM,qL({key:e.axisId||"y-".concat(t),axisId:e.axisId},e.renderProps))}),n().createElement(_C,{x:null!==(r=null==k?void 0:k.x)&&void 0!==r?r:ge?"line":"none",y:null!==(i=null==k?void 0:k.y)&&void 0!==i?i:"none"}),F&&F.length>0&&n().createElement(uR,{forecast:F,color:B,opacity:U}),T&&T.map(function(e,t){return n().createElement(VT,qL({key:"ref-".concat(t)},e))}),W&&n().createElement(oR,{setProps:q}),(R||Ie)&&n().createElement(DT,null)),"none"!==Se&&(Me?n().createElement(jC,{trigger:"axis"},n().createElement(lR,{scatterSeries:be,proximity:ke})):n().createElement(LC,{trigger:Se})),null!=_&&_>=0&&n().createElement(cR,{dataIndex:_,seriesConfig:me,scatterSeries:be,proximity:ke})))}function pR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hR(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n>>15,1|t);return(((e=e+Math.imul(e^e>>>7,61|e)^e)^e>>>14)>>>0)/4294967296},nextGaussian:function(){var e=this.next()||1e-4,t=this.next();return Math.sqrt(-2*Math.log(e))*Math.cos(2*Math.PI*t)}}}function wR(e){var t=e.candles,r=e.upColor,i=e.downColor,o=e.totalSlots,a=Nx().width,s=uk(),l=dk();if(!t||0===t.length)return null;var c=a/Math.max(o,1),u=Math.max(1,.6*c),d=Math.max(.5,.06*c);return n().createElement("g",null,t.map(function(e,t){var o=s(t);if(void 0===o)return null;var a=e.close>=e.open?r:i,c=l(e.high),p=l(e.low),h=l(e.open),m=l(e.close);if([c,p,h,m].some(function(e){return void 0===e}))return null;var f=Math.min(h,m),g=Math.max(1,Math.abs(h-m));return n().createElement("g",{key:"candle-".concat(t)},n().createElement("line",{x1:o,y1:c,x2:o,y2:p,stroke:a,strokeWidth:d}),n().createElement("rect",{x:o-u/2,y:f,width:u,height:g,fill:a,stroke:a,strokeWidth:.5}))}))}function kR(e){var t=e.candles,r=e.upColor,i=e.downColor,o=e.totalSlots,a=e.volumeHeightPct,s=Nx(),l=s.top,c=s.height,u=s.width,d=uk();if(!t||0===t.length)return null;var p=Math.max.apply(Math,fR(t.map(function(e){return e.volume})).concat([1])),h=c*(a/100),m=l+c-h,f=u/Math.max(o,1),g=Math.max(1,.55*f);return n().createElement("g",{opacity:.35},t.map(function(e,t){var o=d(t);if(void 0===o)return null;var a=e.close>=e.open,s=e.volume/p*h;return n().createElement("rect",{key:"vol-".concat(t),x:o-g/2,y:m+h-s,width:g,height:s,fill:a?r:i})}))}function SR(e){var t=e.candles,r=e.labelInterval,i=uk(),o=dk();if(!t||0===t.length)return null;var a=r||Math.max(1,Math.floor(t.length/8));return n().createElement("g",null,t.map(function(e,r){if(r%a!==0&&r!==t.length-1)return null;var s=i(r),l=o(e.close);if(void 0===s||void 0===l)return null;var c=e.close>=e.open?"#4caf50":"#f44336";return n().createElement("g",{key:"label-".concat(r)},n().createElement("circle",{cx:s,cy:l,r:3,fill:c}),n().createElement("text",{x:s,y:l-10,textAnchor:"middle",fill:c,fontSize:10,fontWeight:"bold"},e.close.toFixed(1)))}))}function MR(e){var t=e.forecastData,r=e.upperBound,i=e.lowerBound,o=e.startIndex,a=e.color,s=e.opacity,l=uk(),c=dk();if(!t||0===t.length)return null;for(var u=[],d=0;d=0;x--)v+=" L ".concat(u[x].x," ").concat(u[x].yLo);return v+=" Z",n().createElement("g",null,n().createElement("path",{d:v,fill:a,fillOpacity:s}),n().createElement("path",{d:g,stroke:a,strokeWidth:2,strokeDasharray:"6 4",fill:"none"}))}function CR(e){var t=e.alerts,r=e.alertUpColor,i=e.alertDownColor,o=e.formatterFn,a=uk(),s=dk();return t&&0!==t.length?n().createElement("g",null,t.map(function(e,t){var l=a(e.displayIndex),c=s(e.price);if(void 0===l||void 0===c)return null;var u="up"===e.type,d=u?r:i,p=o?o(e,{index:t}):"".concat(u?"+":"").concat(e.pctChange.toFixed(1),"%"),h=7*p.length+10;return n().createElement("g",{key:"alert-".concat(t)},n().createElement("rect",{x:l-h/2,y:u?c-32:c+10,width:h,height:18,rx:4,fill:d}),n().createElement("text",{x:l,y:u?c-19:c+23,textAnchor:"middle",fill:"white",fontSize:10,fontWeight:"bold"},p),n().createElement("circle",{cx:l,cy:c,r:4,fill:d,stroke:"white",strokeWidth:1.5}))})):null}function PR(e){var t=e.startIndex,r=e.endIndex,i=Nx(),o=i.top,a=i.bottom,s=i.height,l=uk(),c=l(t),u=l(r);return void 0===c||void 0===u?null:n().createElement("rect",{x:c,y:0,width:u-c,height:o+s+a,fill:"#9e9e9e",opacity:.08})}function ER(t){var r,i,o=t.id,a=t.licenseKey,l=t.height,c=void 0===l?500:l,u=t.width,d=t.margin,p=t.windowSize,h=void 0===p?60:p,m=t.forecastSize,f=void 0===m?15:m,g=t.running,y=void 0!==g&&g,v=t.intervalMs,b=void 0===v?300:v,x=t.seed,I=void 0===x?42:x,w=t.resetTrigger,k=void 0===w?0:w,S=t.initialPrice,M=void 0===S?100:S,C=t.volatility,P=void 0===C?.02:C,E=t.drift,T=void 0===E?.001:E,A=t.forecastVolatility,O=void 0===A?1.5:A,j=t.alertProbability,L=void 0===j?.08:j,R=t.alertThresholdPct,D=void 0===R?2:R,$=t.alertLookback,z=void 0===$?5:$,N=t.alertMinDistance,_=void 0===N?10:N,F=t.maxVisibleAlerts,H=void 0===F?6:F,B=t.alertFilter,V=t.alertFormatter,U=t.candleUpColor,Y=void 0===U?"#4caf50":U,W=t.candleDownColor,G=void 0===W?"#f44336":W,K=t.forecastColor,q=void 0===K?"#ff9800":K,X=t.alertUpColor,Z=void 0===X?"#4caf50":X,J=t.alertDownColor,Q=void 0===J?"#f44336":J,ee=t.uncertaintyOpacity,te=void 0===ee?.15:ee,ne=t.showVolume,re=void 0===ne||ne,ie=t.showLabels,oe=void 0!==ie&&ie,ae=t.volumeHeightPct,se=void 0===ae?20:ae,le=t.showGrid,ce=void 0===le||le,ue=t.showSlider,de=void 0!==ue&&ue,pe=(t.hideLegend,t.grid),he=t.xAxisLabel,me=void 0===he?"Tick":he,fe=t.yAxisLabel,ge=void 0===fe?"Price":fe,ye=(t.currentPrice,t.tickCount,t.alertHistory),ve=(t.zoomData,t.setProps);a&&!bR&&(s.setLicenseKey(a),bR=!0);var be=(0,e.useId)(),xe="".concat(be,"-clip"),Ie=(0,e.useRef)(IR(I)),we=(0,e.useRef)([]),ke=(0,e.useRef)([]),Se=(0,e.useRef)(null),Me=(0,e.useRef)(k);(0,e.useEffect)(function(){0===we.current.length&&(we.current=[{open:M,high:1.005*M,low:.995*M,close:M,volume:500}])},[M]);var Ce=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||gR(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,e.useState)({candles:[],forecast:[],upperBound:[],lowerBound:[],alerts:[],forecastStartIndex:0}),2),Pe=Ce[0],Ee=Ce[1],Te=(0,e.useCallback)(function(e,t,n){for(var r=[],i=[],o=[],a=e,s=0,l=0;l0?c[c.length-1].close:M,t=Ie.current,n=P,r=T,i=e,o=t.nextGaussian()*n,a=t.nextGaussian()*n,s=t.nextGaussian()*n,l=Math.max(.01,i*Math.exp(r+o)),{open:i,high:Math.max(i,l)*(1+.4*Math.abs(a)),low:Math.min(i,l)*(1-.4*Math.abs(s)),close:l,volume:Math.max(50,Math.round(800+400*t.nextGaussian()+3e3*Math.abs(o)))});c.push(u);var d=c.length-1-z;if(d>=z){var p=c[d],m=xR(B),g=null;if(m){var y=m(c,d,{lookback:z});!0===y?g=p.close>=p.open?"up":"down":"up"!==y&&"down"!==y||(g=y)}else{for(var v=Math.max(0,d-z),b=Math.min(c.length-1,d+z),x=!0,w=!0,k=v;k<=b&&(k===d||(c[k].high>p.high&&(x=!1),c[k].low=p.open?"up":"down":x?g="up":w&&(g="down")}var S=ke.current.length>0?ke.current[ke.current.length-1].tick:-1/0;if(g&&d-S>=_){var C=(p.close-p.open)/p.open*100;ke.current.push({tick:d,price:"up"===g?p.high:p.low,type:g,pctChange:C,message:"".concat("up"===g?"+":"").concat(C.toFixed(2),"%")})}}var E=Math.max(0,c.length-h),A=c.slice(E),O=Te(u.close,IR(I+c.length),f),j=O.forecast,L=O.upper,R=O.lower,D=ke.current.filter(function(e){return e.tick>=E&&e.tickH&&(D.sort(function(e,t){return Math.abs(t.pctChange)-Math.abs(e.pctChange)}),(D=D.slice(0,H)).sort(function(e,t){return e.displayIndex-t.displayIndex})),Ee({candles:A,forecast:j,upperBound:L,lowerBound:R,alerts:D,forecastStartIndex:A.length-1}),ve){var $={currentPrice:Math.round(100*u.close)/100,tickCount:c.length};ke.current.length!==(ye||[]).length&&($.alertHistory=ke.current.slice(-50)),ve($)}},b),function(){Se.current&&(clearInterval(Se.current),Se.current=null)};Se.current&&(clearInterval(Se.current),Se.current=null)},[y,b,P,T,Te,h,f,L,D,z,_,H,B,I,M,ve]);var Ae=(0,e.useMemo)(function(){var e=Pe.candles,t=e.length+Pe.forecast.length,n=Array.from({length:t},function(e,t){return t}),r=[].concat(fR(e.map(function(e){return e.close})),fR(Array(Pe.forecast.length).fill(null))),i=[].concat(fR(e.flatMap(function(e){return[e.high,e.low]})),fR(Pe.forecast),fR(Pe.upperBound),fR(Pe.lowerBound)).filter(function(e){return null!=e&&isFinite(e)}),o=0,a=200;if(i.length>0){o=Math.min.apply(Math,fR(i));var s=.12*((a=Math.max.apply(Math,fR(i)))-o)||5;o-=s,a+=s}return{series:[{type:"line",id:"close",label:"Close",data:r,color:"#9e9e9e",showMark:!1,connectNulls:!1}],xAxisData:n,yDomain:{min:o,max:a},forecastStartIdx:e.length-1}},[Pe]),Oe=Ae.series,je=Ae.xAxisData,Le=Ae.yDomain,Re=Ae.forecastStartIdx,De={id:"x-axis",data:je,scaleType:"linear",tickLabelStyle:{fontSize:11}};de&&(De.zoom={minSpan:10,panning:!0,filterMode:"discard",slider:{enabled:!0,preview:!0}});var $e={height:c,series:Oe,skipAnimation:!0,xAxis:[De],yAxis:[{id:"y-axis",label:ge,width:65,min:Le.min,max:Le.max,tickLabelStyle:{fontSize:11}}],onZoomChange:function(e){ve&&ve({zoomData:e})}};u&&($e.width=u),d&&($e.margin=d);var ze=je.length,Ne=Pe.candles,_e=Ne.length>0?Ne[Ne.length-1].close:M;return n().createElement("div",{id:o},n().createElement(Rx,$e,n().createElement(mI,null,(ce||pe)&&n().createElement(FM,{horizontal:null===(r=null==pe?void 0:pe.horizontal)||void 0===r||r,vertical:null!==(i=null==pe?void 0:pe.vertical)&&void 0!==i&&i}),n().createElement(ZC,{id:xe}),n().createElement("g",{clipPath:"url(#".concat(xe,")")},Pe.forecast.length>0&&n().createElement(PR,{startIndex:Re,endIndex:je.length-1}),re&&n().createElement(kR,{candles:Ne,upColor:Y,downColor:G,totalSlots:ze,volumeHeightPct:se}),n().createElement(wR,{candles:Ne,upColor:Y,downColor:G,totalSlots:ze}),Pe.forecast.length>0&&n().createElement(MR,{forecastData:[_e].concat(fR(Pe.forecast)),upperBound:[_e].concat(fR(Pe.upperBound)),lowerBound:[_e].concat(fR(Pe.lowerBound)),startIndex:Re,color:q,opacity:te})),oe&&n().createElement(SR,{candles:Ne}),n().createElement(CR,{alerts:Pe.alerts,alertUpColor:Z,alertDownColor:Q,formatterFn:xR(V)}),n().createElement(gM,{axisId:"x-axis",label:me}),n().createElement(OM,{axisId:"y-axis"}),n().createElement(_C,{x:"line",y:"none"}),n().createElement(VT,{y:M,label:"Open",lineStyle:{stroke:"#9e9e9e",strokeDasharray:"4 4",strokeWidth:1},labelStyle:{fill:"#9e9e9e",fontSize:11},labelAlign:"start"}),de&&n().createElement(DT,null)),n().createElement(LC,{trigger:"axis"})))}ER.propTypes={id:i().string,licenseKey:i().string,height:i().number,width:i().number,margin:i().shape({top:i().number,right:i().number,bottom:i().number,left:i().number}),windowSize:i().number,forecastSize:i().number,running:i().bool,intervalMs:i().number,seed:i().number,resetTrigger:i().number,initialPrice:i().number,volatility:i().number,drift:i().number,forecastVolatility:i().number,alertProbability:i().number,alertThresholdPct:i().number,alertLookback:i().number,alertMinDistance:i().number,maxVisibleAlerts:i().number,alertFilter:i().shape({function:i().string.isRequired,options:i().object}),alertFormatter:i().shape({function:i().string.isRequired,options:i().object}),candleUpColor:i().string,candleDownColor:i().string,forecastColor:i().string,alertUpColor:i().string,alertDownColor:i().string,uncertaintyOpacity:i().number,showVolume:i().bool,showLabels:i().bool,volumeHeightPct:i().number,showGrid:i().bool,showSlider:i().bool,hideLegend:i().bool,grid:i().shape({horizontal:i().bool,vertical:i().bool}),xAxisLabel:i().string,yAxisLabel:i().string,currentPrice:i().number,tickCount:i().number,alertHistory:i().array,zoomData:i().arrayOf(i().shape({axisId:i().oneOfType([i().string,i().number]),start:i().number,end:i().number})),setProps:i().func};const TR=[Xs,Mb,Ys,Ws,Bs,Zs,Bb,kx],AR=["xAxis","yAxis","series","width","height","margin","colors","dataset","sx","axisHighlight","grid","children","slots","slotProps","skipAnimation","loading","layout","onItemClick","highlightedItem","onHighlightChange","borderRadius","barLabel","className","hideLegend","showToolbar","brushConfig","renderer"],OR=t=>{const{xAxis:n,yAxis:r,series:i,width:o,height:a,margin:s,colors:c,dataset:u,sx:d,axisHighlight:p,grid:h,children:m,slots:f,slotProps:g,skipAnimation:y,loading:v,layout:b,onItemClick:x,highlightedItem:I,onHighlightChange:w,borderRadius:k,barLabel:S,className:M,brushConfig:C,renderer:P}=t,E=tt(t,AR),T=`${z()}-clip-path`,A="horizontal"===b||void 0===b&&i.some(e=>"horizontal"===e.layout),O=e.useMemo(()=>[{id:W,scaleType:"band",data:Array.from({length:Math.max(...i.map(e=>(e.data??u??[]).length))},(e,t)=>t)}],[u,i]),j=e.useMemo(()=>[{id:G,scaleType:"band",data:Array.from({length:Math.max(...i.map(e=>(e.data??u??[]).length))},(e,t)=>t)}],[u,i]),L=e.useMemo(()=>i.map(e=>l({type:"bar"},e,{layout:A?"horizontal":"vertical"})),[A,i]),R=A?void 0:O,D=e.useMemo(()=>n?A?n:n.map(e=>l({scaleType:"band"},e)):R,[R,A,n]),$=A?j:void 0,N=e.useMemo(()=>r?A?r.map(e=>l({scaleType:"band"},e)):r:$,[$,A,r]),_=l({},E,{series:L,width:o,height:a,margin:s,colors:c,dataset:u,xAxis:D,yAxis:N,highlightedItem:I,onHighlightChange:w,disableAxisListener:"axis"!==g?.tooltip?.trigger&&"none"===p?.x&&"none"===p?.y,className:M,skipAnimation:y,brushConfig:C,plugins:TR}),F={onItemClick:x,slots:f,slotProps:g,borderRadius:k,renderer:P,barLabel:S},H={vertical:h?.vertical,horizontal:h?.horizontal},B={clipPath:`url(#${T})`},V={id:T},U={slots:f,slotProps:g,loading:v},Y={slots:f,slotProps:g},K=l({},A?{y:"band"}:{x:"band"},p),q={slots:f,slotProps:g};return{chartsWrapperProps:{sx:d,legendPosition:t.slotProps?.legend?.position,legendDirection:t.slotProps?.legend?.direction,hideLegend:t.hideLegend??!1},chartContainerProps:_,barPlotProps:F,gridProps:H,clipPathProps:V,clipPathGroupProps:B,overlayProps:U,chartsAxisProps:Y,axisHighlightProps:K,legendProps:q,children:m}};function jR(e){const t=xm(),n=MO(),r=dP(),{xAxis:i,xAxisIds:o}=_x(),{yAxis:a,yAxisIds:s}=Fx();if(null===n||"bar"!==n.type||!r)return null;const c=r.series[n.seriesId];if(null==c.data[n.dataIndex])return null;const u=c.xAxisId??o[0],d=c.yAxisId??s[0],p=i[u],h=a[d],m="vertical"===r.series[n.seriesId].layout,f=r.stackingGroups.findIndex(e=>e.ids.includes(n.seriesId)),g=Ol({verticalLayout:m,xAxisConfig:p,yAxisConfig:h,series:c,dataIndex:n.dataIndex,numberOfGroups:r.stackingGroups.length,groupIndex:f});if(null===g)return null;const{x:y,y:v,height:b,width:x}=g;return(0,O.jsx)("rect",l({fill:"none",stroke:(t.vars??t).palette.text.primary,strokeWidth:2,x:y-3,y:v-3,width:x+6,height:b+6,rx:3,ry:3},e))}const LR=e.forwardRef(function(e,t){const n=Lh({props:e,name:"MuiBarChart"}),{chartsWrapperProps:r,chartContainerProps:i,barPlotProps:o,gridProps:a,clipPathProps:s,clipPathGroupProps:c,overlayProps:u,chartsAxisProps:d,axisHighlightProps:p,legendProps:h,children:m}=OR(n),{chartDataProviderProps:f,chartsSurfaceProps:g}=yL(i,t),y=n.slots?.tooltip??LC,v=n.slots?.toolbar;return(0,O.jsx)(SO,l({},f,{children:(0,O.jsxs)(FO,l({},r,{children:[n.showToolbar&&v?(0,O.jsx)(v,l({},n.slotProps?.toolbar)):null,!n.hideLegend&&(0,O.jsx)(XC,l({},h)),(0,O.jsxs)(mI,l({},g,{children:[(0,O.jsx)(FM,l({},a)),(0,O.jsxs)("g",l({},c,{children:[(0,O.jsx)(vO,l({},o)),(0,O.jsx)(GO,l({},u)),(0,O.jsx)(_C,l({},p)),(0,O.jsx)(jR,{})]})),(0,O.jsx)($O,l({},d)),(0,O.jsx)(ZC,l({},s)),m]})),!n.loading&&(0,O.jsx)(y,l({},n.slotProps?.tooltip))]}))}))}),RR=["initialZoom","zoomData","onZoomChange","zoomInteractionConfig","plugins","apiRef"],DR=[Xs,Mb,Ys,Ws,Bs,Zs,Bb,kx,Ix,tx],$R=["initialZoom","zoomData","onZoomChange","apiRef","showToolbar"],zR=e.forwardRef(function(e,t){const n=Lh({props:e,name:"MuiBarChartPro"}),{initialZoom:r,zoomData:i,onZoomChange:o,apiRef:a,showToolbar:s}=n,c=tt(n,$R),{chartsWrapperProps:u,chartContainerProps:d,barPlotProps:p,gridProps:h,clipPathProps:m,clipPathGroupProps:f,overlayProps:g,chartsAxisProps:y,axisHighlightProps:v,legendProps:b,children:x}=OR(c),{chartDataProviderProProps:I,chartsSurfaceProps:w}=((e,t)=>{const n=e,{initialZoom:r,zoomData:i,onZoomChange:o,zoomInteractionConfig:a,plugins:s,apiRef:c}=n,u=tt(n,RR),{chartDataProviderProps:d,chartsSurfaceProps:p,children:h}=yL(u,t);return{chartDataProviderProProps:l({},d,{initialZoom:r,zoomData:i,onZoomChange:o,zoomInteractionConfig:a,apiRef:c,plugins:s??wx}),chartsSurfaceProps:p,children:h}})(l({},d,{initialZoom:r,zoomData:i,onZoomChange:o,apiRef:a,plugins:DR}),t),k=n.slots?.tooltip??LC,S=n.slots?.toolbar??kA;return(0,O.jsx)(Rx,l({},I,{children:(0,O.jsxs)(FO,l({},u,{children:[s?(0,O.jsx)(S,l({},n.slotProps?.toolbar)):null,!n.hideLegend&&(0,O.jsx)(XC,l({},b)),(0,O.jsxs)(mI,l({},w,{children:[(0,O.jsx)(FM,l({},h)),(0,O.jsxs)("g",l({},f,{children:[(0,O.jsx)(vO,l({},p)),(0,O.jsx)(GO,l({},g)),(0,O.jsx)(_C,l({},v))]})),(0,O.jsx)($O,l({},y)),(0,O.jsx)(DT,{}),(0,O.jsx)(WT,{}),(0,O.jsx)(ZC,l({},m)),x]})),!n.loading&&(0,O.jsx)(k,l({},n.slotProps?.tooltip))]}))}))});function NR(e){return NR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},NR(e)}function _R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FR(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&(ne.initialZoom=X),ne.onZoomChange=J,$&&(ne.showToolbar=!0),z&&(ne.brushConfig=z),N&&(ne.zoomInteractionConfig=N));var re=A&&A.length>0?A.map(function(e,t){return n().createElement(VT,{key:"ref-line-".concat(t),x:e.x,y:e.y,axisId:e.axisId,label:e.label||void 0,labelAlign:e.labelAlign||"middle",lineStyle:e.lineStyle||void 0,labelStyle:e.labelStyle||void 0,spacing:e.spacing||void 0})}):null,ie=B?zR:LR;return n().createElement("div",{id:r},n().createElement(ie,ne,re))}function WR(e){return WR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},WR(e)}function GR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KR(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.open?i||"#4caf50":o||"#f44336",g=u(Math.max(e.open,e.close)),y=u(Math.min(e.open,e.close)),v=u(e.high),b=u(e.low),x=Math.max(1,y-g);return n().createElement("g",{key:t,style:{cursor:l?"pointer":"default"},onClick:l?function(n){return l(n,t,e)}:void 0},n().createElement("line",{x1:p,y1:v,x2:p,y2:g,stroke:f,strokeWidth:s||2}),n().createElement("line",{x1:p,y1:y,x2:p,y2:b,stroke:f,strokeWidth:s||2}),n().createElement("rect",{x:p-m/2,y:g,width:m,height:x,fill:f,stroke:f,strokeWidth:1,rx:1}))}))}function nD(e){var t=e.volumeData,r=e.labels,i=e.ohlcData,o=e.upColor,a=e.downColor,s=e.maxHeightRatio,l=uk(),c=Nx(),u=(c.left,c.top),d=c.width,p=c.height;if(!l||!t||0===t.length)return null;var h=l.bandwidth?l.bandwidth():d/t.length,m=.5*h,f=Math.max.apply(Math,ZR(t));if(0===f)return null;var g=p*(s||.2),y=u+p;return n().createElement("g",{opacity:.3},t.map(function(e,t){var s=r[t],c=l(s);if(void 0===c||0===e)return null;var u=c+h/2,d=e/f*g,p=i[t]&&i[t].close>=i[t].open?o||"#4caf50":a||"#f44336";return n().createElement("rect",{key:t,x:u-m/2,y:y-d,width:m,height:d,fill:p,rx:1})}))}function rD(t){var r=t.ohlcData,i=t.labels,o=t.tooltipEnabled,a=uk(),s=(dk(),Nx()),l=s.left,c=s.top,u=s.width,d=s.height,p=XR((0,e.useState)(null),2),h=p[0],m=p[1],f=(0,e.useRef)(null);if(!o||!a||!r||0===r.length)return null;var g=a.bandwidth?a.bandwidth():u/r.length,y=null!==h?r[h]:null;return n().createElement(n().Fragment,null,n().createElement("rect",{x:l,y:c,width:u,height:d,fill:"transparent",onMouseMove:function(e){var t=e.currentTarget.ownerSVGElement||e.currentTarget.closest("svg");if(t){var n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;var r=n.matrixTransform(t.getScreenCTM().inverse());if(r.xl+u||r.yc+d)m(null);else{for(var o=0;o=s&&r.x=y.open?"#4caf50":"#f44336"}},y.close))))))}function iD(t){var r=t.id,i=t.series,o=void 0===i?[]:i,a=t.dataset,l=t.xAxis,c=t.yAxis,u=t.height,d=void 0===u?400:u,p=t.width,h=t.margin,m=t.grid,f=t.skipAnimation,g=void 0!==f&&f,y=t.hideLegend,v=void 0===y||y,b=t.tooltip,x=t.referenceLines,I=void 0===x?[]:x,w=t.bodyWidthRatio,k=t.wickWidth,S=t.showVolume,M=void 0!==S&&S,C=t.volumeHeightRatio,P=t.licenseKey,E=t.initialZoom,T=t.showSlider,A=void 0!==T&&T,O=t.showToolbar,j=void 0!==O&&O,L=t.zoomInteractionConfig,R=(t.clickData,t.hoverData,t.zoomData,t.setProps),D=(0,e.useId)();P&&!eD&&(s.setLicenseKey(P),eD=!0);var $=(0,e.useMemo)(function(){var e=o[0]||{},t=[],n=[],r=[],i=e.upColor||"#4caf50",s=e.downColor||"#f44336";if(e.data&&Array.isArray(e.data))t=e.data.map(function(e){return Array.isArray(e)?{open:e[0],high:e[1],low:e[2],close:e[3]}:e});else if(a&&e.datasetKeys){var c=e.datasetKeys;t=a.map(function(e){return{open:e[c.open||"open"],high:e[c.high||"high"],low:e[c.low||"low"],close:e[c.close||"close"]}})}return l&&l[0]&&(l[0].data?n=l[0].data:l[0].dataKey&&a&&(n=a.map(function(e){return e[l[0].dataKey]}))),0===n.length&&(n=t.map(function(e,t){return String(t)})),e.volumeKey&&a?r=a.map(function(t){return t[e.volumeKey]||0}):e.volume&&Array.isArray(e.volume)&&(r=e.volume),{ohlcData:t,labels:n,volumeData:r,upColor:i,downColor:s}},[o,a,l]),z=$.ohlcData,N=$.labels,_=$.volumeData,F=$.upColor,H=$.downColor,B=(0,e.useMemo)(function(){if(0===z.length)return{min:0,max:100};var e=z.map(function(e){return e.low}),t=z.map(function(e){return e.high}),n=Math.min.apply(Math,ZR(e)),r=Math.max.apply(Math,ZR(t)),i=.05*(r-n);return{min:n-i,max:r+i}},[z]),V=XR((0,e.useState)(function(){return E&&Array.isArray(E)?E:[]}),2),U=V[0],Y=V[1],W=(0,e.useRef)(JSON.stringify(E||[])),G=(0,e.useCallback)(function(e){var t="function"==typeof e?e(U):e;Y(t),W.current=JSON.stringify(t),R&&R({zoomData:t})},[R,U]),K=(0,e.useCallback)(function(e,t,n){R&&R({clickData:{dataIndex:t,label:N[t],open:n.open,high:n.high,low:n.low,close:n.close,timestamp:(new Date).toISOString()}})},[R,N]),q={height:d,series:(0,e.useMemo)(function(){return[{type:"bar",id:"__candle_placeholder",data:z.map(function(e){return e.close}),color:"transparent",highlightScope:{highlight:"none",fade:"none"}}]},[z]),xAxis:(0,e.useMemo)(function(){var e=l&&l[0]?KR({},l[0]):{},t=KR({id:e.id||"x-axis-candle",scaleType:"band",data:N},e);if(A){var n=t.zoom||{},r=!0===n?{}:"object"===WR(n)?n:{};t.zoom=KR(KR({},r),{},{slider:KR(KR({},r.slider),{},{enabled:!0})})}return[t]},[l,N,A]),yAxis:(0,e.useMemo)(function(){var e=c&&c[0]?KR({},c[0]):{};return[KR(KR(KR({id:e.id||"y-axis-candle",min:B.min,max:B.max},e),void 0!==e.min?{min:e.min}:{min:B.min}),void 0!==e.max?{max:e.max}:{max:B.max})]},[c,B]),onZoomChange:G};p&&(q.width=p),h&&(q.margin=h),g&&(q.skipAnimation=g),L&&(q.zoomInteractionConfig=L),U&&U.length>0&&(q.initialZoom=U);var X=!b||"none"!==b.trigger;return n().createElement("div",{id:r},n().createElement(Rx,q,j&&n().createElement(kA,null),!v&&n().createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:8}},n().createElement(XC,null)),n().createElement(mI,null,n().createElement(ZC,{id:D}),m&&n().createElement(FM,{horizontal:m.horizontal,vertical:m.vertical}),n().createElement("g",{clipPath:"url(#".concat(D,")")},M&&_.length>0&&n().createElement(nD,{volumeData:_,labels:N,ohlcData:z,upColor:F,downColor:H,maxHeightRatio:C}),n().createElement(tD,{ohlcData:z,labels:N,upColor:F,downColor:H,bodyWidthRatio:w,wickWidth:k,onCandleClick:K})),n().createElement(gM,null),n().createElement(OM,null),I&&I.map(function(e,t){return n().createElement(VT,{key:"ref-line-".concat(t),x:e.x,y:e.y,axisId:e.axisId,label:e.label||void 0,labelAlign:e.labelAlign||"middle",lineStyle:e.lineStyle||void 0,labelStyle:e.labelStyle||void 0,spacing:e.spacing||void 0})}),n().createElement(rD,{ohlcData:z,labels:N,tooltipEnabled:X}),A&&n().createElement(DT,null))))}iD.propTypes={id:i().string,series:i().arrayOf(i().object),dataset:i().arrayOf(i().object),xAxis:i().arrayOf(i().object),yAxis:i().arrayOf(i().object),height:i().number,width:i().number,margin:i().exact({top:i().number,bottom:i().number,left:i().number,right:i().number}),grid:i().exact({horizontal:i().bool,vertical:i().bool}),skipAnimation:i().bool,hideLegend:i().bool,tooltip:i().exact({trigger:i().oneOf(["item","none"])}),bodyWidthRatio:i().number,wickWidth:i().number,showVolume:i().bool,volumeHeightRatio:i().number,referenceLines:i().arrayOf(i().object),licenseKey:i().string,initialZoom:i().arrayOf(i().object),showSlider:i().bool,showToolbar:i().bool,zoomInteractionConfig:i().object,clickData:i().object,hoverData:i().object,zoomData:i().arrayOf(i().object),setProps:i().func};const oD={};function aD(t,n){const r=e.useRef(oD);return r.current===oD&&(r.current=t(n)),r}function sD(e,t,n,r){const i=aD(lD).current;return function(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}(i,e,t,n,r)&&function(e,t){e.refs=t,t.every(e=>null==e)?e.callback=null:e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){const r=Array(t.length).fill(null);for(let e=0;e{for(let e=0;e=19?function(t,n,r,i,o){const a=e.useCallback(()=>n(t.getSnapshot(),r,i,o),[t,n,r,i,o]);return(0,N.useSyncExternalStore)(t.subscribe,a,a)}:function(e,t,n,r,i){return(0,_.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))};function uD(e,t,n,r,i){return cD(e,t,n,r,i)}function dD(e){return Ig("MuiAlert",e)}const pD=wg("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),hD=ob((0,O.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),mD=ob((0,O.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),fD=ob((0,O.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),gD=ob((0,O.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),yD=ob((0,O.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),vD=bm(Zv,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Cm(n.color||n.severity)}`]]}})(wm(({theme:e})=>{const t="light"===e.palette.mode?sp:cp,n="light"===e.palette.mode?cp:sp;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(vy(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${pD.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(vy(["light"])).map(([n])=>({props:{colorSeverity:n,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),border:`1px solid ${(e.vars||e).palette[n].light}`,[`& .${pD.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}})),...Object.entries(e.palette).filter(vy(["dark"])).map(([t])=>({props:{colorSeverity:t,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${t}FilledColor`],backgroundColor:e.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:"dark"===e.palette.mode?e.palette[t].dark:e.palette[t].main,color:e.palette.getContrastText(e.palette[t].main)}}}))]}})),bD=bm("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),xD=bm("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),ID=bm("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),wD={success:(0,O.jsx)(hD,{fontSize:"inherit"}),warning:(0,O.jsx)(mD,{fontSize:"inherit"}),error:(0,O.jsx)(fD,{fontSize:"inherit"}),info:(0,O.jsx)(gD,{fontSize:"inherit"})},kD=e.forwardRef(function(e,t){const n=Mm({props:e,name:"MuiAlert"}),{action:r,children:i,className:o,closeText:a="Close",color:s,components:l={},componentsProps:c={},icon:u,iconMapping:d=wD,onClose:p,role:h="alert",severity:m="success",slotProps:f={},slots:g={},variant:y="standard",...v}=n,b={...n,color:s,severity:m,variant:y,colorSeverity:s||m},x=(e=>{const{variant:t,color:n,severity:r,classes:i}=e;return Gh({root:["root",`color${Cm(n||r)}`,`${t}${Cm(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]},dD,i)})(b),I={slots:{closeButton:l.CloseButton,closeIcon:l.CloseIcon,...g},slotProps:{...c,...f}},[w,k]=Ng("root",{ref:t,shouldForwardComponentProp:!0,className:Hh(x.root,o),elementType:vD,externalForwardedProps:{...I,...v},ownerState:b,additionalProps:{role:h,elevation:0}}),[S,M]=Ng("icon",{className:x.icon,elementType:bD,externalForwardedProps:I,ownerState:b}),[C,P]=Ng("message",{className:x.message,elementType:xD,externalForwardedProps:I,ownerState:b}),[E,T]=Ng("action",{className:x.action,elementType:ID,externalForwardedProps:I,ownerState:b}),[A,j]=Ng("closeButton",{elementType:sv,externalForwardedProps:I,ownerState:b}),[L,R]=Ng("closeIcon",{elementType:yD,externalForwardedProps:I,ownerState:b});return(0,O.jsxs)(w,{...k,children:[!1!==u?(0,O.jsx)(S,{...M,children:u||d[m]||wD[m]}):null,(0,O.jsx)(C,{...P,children:i}),null!=r?(0,O.jsx)(E,{...T,children:r}):null,null==r&&p?(0,O.jsx)(E,{...T,children:(0,O.jsx)(A,{size:"small","aria-label":a,title:a,color:"inherit",onClick:p,...j,children:(0,O.jsx)(L,{fontSize:"small",...R})})}):null]})}),SD=kD;function MD(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let e=0;en.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n},PD=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t},ED=function(e,t,n){return"function"==typeof e?e(t,n):e},TD=function(t){const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1,...a}=t,s=o?{}:ED(r,i),{props:l,internalRef:c}=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=Hh(n?.className,o,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},a={...n,...i,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=CD({...i,...r}),s=PD(r),l=PD(i),c=t(a),u=Hh(c?.className,n?.className,o,i?.className,r?.className),d={...c?.style,...n?.style,...i?.style,...r?.style},p={...c,...n,...l,...s};return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}}({...a,externalSlotProps:s}),u=function(...t){const n=e.useRef(void 0),r=e.useCallback(e=>{const n=t.map(t=>{if(null==t)return null;if("function"==typeof t){const n=t,r=n(e);return"function"==typeof r?r:()=>{n(null)}}return t.current=e,()=>{t.current=null}});return()=>{n.forEach(e=>e?.())}},t);return e.useMemo(()=>t.every(e=>null==e)?null:e=>{n.current&&(n.current(),n.current=void 0),null!=e&&(n.current=r(e))},t)}(c,s?.ref,t.additionalProps?.ref);return function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(n,{...l,ref:u},i)},AD=e=>e,OD=(()=>{let e=AD;return{configure(t){e=t},generate:t=>e(t),reset(){e=AD}}})(),jD={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function LD(e,t,n="Mui"){const r=jD[t];return r?`${n}-${r}`:`${OD.generate(e)}-${t}`}function RD(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=LD(e,t,n)}),r}function DD(e){return LD("MuiRichTreeView",e)}function $D(e){return Lh}RD("MuiRichTreeView",["root","item","itemContent","itemGroupTransition","itemIconContainer","itemLabel","itemCheckbox","itemLabelInput"]);const zD=Object.freeze([]),ND=Object.freeze({}),_D=e.createContext(null),FD=()=>{const t=e.useContext(_D);if(null==t)throw new Error(["MUI X: Could not find the Tree View context.","It looks like you rendered your component outside of a SimpleTreeView or RichTreeView parent component.","This can also happen if you are bundling multiple versions of the Tree View."].join("\n"));return t},HD=e.createContext({classes:{},slots:{},slotProps:{}}),BD=()=>e.useContext(HD);function VD(t){const{store:n,apiRef:r,rootRef:i,classes:o=ND,slots:a=ND,slotProps:s=ND,children:l}=t,c=(t=>{const{store:n,apiRef:r,rootRef:i}=t,o=aD(()=>n.buildPublicAPI()).current;!function(e,t){null!=t&&null==t.current&&(t.current=e)}(o,r);const a=e.useCallback(e=>{let t=null,r=null;const i=[],o={};n.itemPluginManager.listPlugins().forEach(n=>{const a=n({props:e,rootRef:t,contentRef:r});a?.rootRef&&(t=a.rootRef),a?.contentRef&&(r=a.contentRef),a?.propsEnhancers&&(i.push(a.propsEnhancers),Object.keys(a.propsEnhancers).forEach(e=>{o[e]=!0}))});const a=Object.fromEntries(Object.keys(o).map(e=>{return[e,(t=e,e=>{const n={};return i.forEach(r=>{const i=r[t];null!=i&&Object.assign(n,i(e))}),n})];var t}));return{contentRef:r,rootRef:t,propsEnhancers:a}},[n]),s=e.useCallback(({itemId:e,children:t,idAttribute:r})=>{let i=t;const o=n.itemPluginManager.listWrappers();for(let t=o.length-1;t>=0;t-=1)i=(0,o[t])({store:n,itemId:e,children:i,idAttribute:r});return i},[n]);return e.useMemo(()=>({runItemPlugins:a,wrapItem:s,publicAPI:o,store:n,rootRef:i}),[a,s,o,n,i])})({store:n,apiRef:r,rootRef:i}),u=e.useMemo(()=>({classes:o,slots:{collapseIcon:a.collapseIcon,expandIcon:a.expandIcon,endIcon:a.endIcon},slotProps:{collapseIcon:s.collapseIcon,expandIcon:s.expandIcon,endIcon:s.endIcon}}),[o,a.collapseIcon,a.expandIcon,a.endIcon,s.collapseIcon,s.expandIcon,s.endIcon]);return(0,O.jsx)(_D.Provider,{value:c,children:(0,O.jsx)(HD.Provider,{value:u,children:l})})}const UD=Object.is;function YD(e,t){if(e===t)return!0;if(!(e instanceof Object&&t instanceof Object))return!1;let n=0,r=0;for(const r in e){if(n+=1,!UD(e[r],t[r]))return!1;if(!(r in t))return!1}for(const e in t)r+=1;return n===r}function WD(e){return Ig("MuiCollapse",e)}wg("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const GD=bm("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})(wm(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:e})=>"exited"===e.state&&!e.in&&"0px"===e.collapsedSize,style:{visibility:"hidden"}}]}))),KD=bm("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),qD=bm("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),XD=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:a,collapsedSize:s="0px",component:l,easing:c,in:u,onEnter:d,onEntered:p,onEntering:h,onExit:m,onExited:f,onExiting:g,orientation:y="vertical",style:v,timeout:b=ch.standard,TransitionComponent:x=_m,...I}=r,w={...r,orientation:y,collapsedSize:s},k=(e=>{const{orientation:t,classes:n}=e;return Gh({root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]},WD,n)})(w),S=xm(),M=Wh(),C=e.useRef(null),P=e.useRef(),E="number"==typeof s?`${s}px`:s,T="horizontal"===y,A=T?"width":"height",j=e.useRef(null),L=Vm(n,j),R=e=>t=>{if(e){const n=j.current;void 0===t?e(n):e(n,t)}},D=()=>C.current?C.current[T?"clientWidth":"clientHeight"]:0,$=R((e,t)=>{C.current&&T&&(C.current.style.position="absolute"),e.style[A]=E,d&&d(e,t)}),z=R((e,t)=>{const n=D();C.current&&T&&(C.current.style.position="");const{duration:r,easing:i}=Hm({style:v,timeout:b,easing:c},{mode:"enter"});if("auto"===b){const t=S.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,P.current=t}else e.style.transitionDuration="string"==typeof r?r:`${r}ms`;e.style[A]=`${n}px`,e.style.transitionTimingFunction=i,h&&h(e,t)}),N=R((e,t)=>{e.style[A]="auto",p&&p(e,t)}),_=R(e=>{e.style[A]=`${D()}px`,m&&m(e)}),F=R(f),H=R(e=>{const t=D(),{duration:n,easing:r}=Hm({style:v,timeout:b,easing:c},{mode:"exit"});if("auto"===b){const n=S.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,P.current=n}else e.style.transitionDuration="string"==typeof n?n:`${n}ms`;e.style[A]=E,e.style.transitionTimingFunction=r,g&&g(e)});return(0,O.jsx)(x,{in:u,onEnter:$,onEntered:N,onEntering:z,onExit:_,onExited:F,onExiting:H,addEndListener:e=>{"auto"===b&&M.start(P.current||0,e),i&&i(j.current,e)},nodeRef:j,timeout:"auto"===b?null:b,...I,children:(e,{ownerState:t,...n})=>(0,O.jsx)(GD,{as:l,className:Hh(k.root,a,{entered:k.entered,exited:!u&&"0px"===E&&k.hidden}[e]),style:{[T?"minWidth":"minHeight"]:E,...v},ref:L,ownerState:{...w,state:e},...n,children:(0,O.jsx)(KD,{ownerState:{...w,state:e},className:k.wrapper,ref:C,children:(0,O.jsx)(qD,{ownerState:{...w,state:e},className:k.wrapperInner,children:o})})})})});XD&&(XD.muiSupportAuto=!0);const ZD=XD,JD=e.createContext(void 0);function QD(e){return Ig("PrivateSwitchBase",e)}wg("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const e$=bm(Yy,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),t$=bm("input",{name:"MuiSwitchBase",shouldForwardProp:ym})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),n$=e.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:d,inputProps:p,inputRef:h,name:m,onBlur:f,onChange:g,onFocus:y,readOnly:v,required:b=!1,tabIndex:x,type:I,value:w,slots:k={},slotProps:S={},...M}=t,[C,P]=zg({controlled:i,default:Boolean(a),name:"SwitchBase",state:"checked"}),E=e.useContext(JD);let T=s;E&&void 0===T&&(T=E.disabled);const A="checkbox"===I||"radio"===I,j={...t,checked:C,disabled:T,disableFocusRipple:l,edge:c},L=(e=>{const{classes:t,checked:n,disabled:r,edge:i}=e;return Gh({root:["root",n&&"checked",r&&"disabled",i&&`edge${Cm(i)}`],input:["input"]},QD,t)})(j),R={slots:k,slotProps:{input:p,...S}},[D,$]=Ng("root",{ref:n,elementType:e$,className:L.root,shouldForwardComponentProp:!0,externalForwardedProps:{...R,component:"span",...M},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{y&&y(e),E&&E.onFocus&&E.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{f&&f(e),E&&E.onBlur&&E.onBlur(e)})(t)}}),ownerState:j,additionalProps:{centerRipple:!0,focusRipple:!l,disabled:T,role:void 0,tabIndex:null}}),[z,N]=Ng("input",{ref:h,elementType:t$,className:L.input,externalForwardedProps:R,getSlotProps:e=>({onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;P(t),g&&g(e,t)})(t)}}),ownerState:j,additionalProps:{autoFocus:r,checked:i,defaultChecked:a,disabled:T,id:A?d:void 0,name:m,readOnly:v,required:b,tabIndex:x,type:I,..."checkbox"===I&&void 0===w?{}:{value:w}}});return(0,O.jsxs)(D,{...$,children:[(0,O.jsx)(z,{...N}),C?o:u]})}),r$=n$,i$=ob((0,O.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),o$=ob((0,O.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),a$=ob((0,O.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function s$(e){return Ig("MuiCheckbox",e)}const l$=wg("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);function c$(e,t){if(!e)return t;if("function"==typeof e||"function"==typeof t)return n=>{const r="function"==typeof t?t(n):t,i="function"==typeof e?e({...n,...r}):e,o=Hh(n?.className,r?.className,i?.className);return{...r,...i,...!!o&&{className:o},...r?.style&&i?.style&&{style:{...r.style,...i.style}},...r?.sx&&i?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(i.sx)?i.sx:[i.sx]]}}};const n=t,r=Hh(n?.className,e?.className);return{...t,...e,...!!r&&{className:r},...n?.style&&e?.style&&{style:{...n.style,...e.style}},...n?.sx&&e?.sx&&{sx:[...Array.isArray(n.sx)?n.sx:[n.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const u$=bm(r$,{shouldForwardProp:e=>ym(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Cm(n.size)}`],"default"!==n.color&&t[`color${Cm(n.color)}`]]}})(wm(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:op(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:op(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t},style:{[`&.${l$.checked}, &.${l$.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${l$.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),d$=(0,O.jsx)(o$,{}),p$=(0,O.jsx)(i$,{}),h$=(0,O.jsx)(a$,{}),m$=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiCheckbox"}),{checkedIcon:i=d$,color:o="primary",icon:a=p$,indeterminate:s=!1,indeterminateIcon:l=h$,inputProps:c,size:u="medium",disableRipple:d=!1,className:p,slots:h={},slotProps:m={},...f}=r,g=s?l:a,y=s?l:i,v={...r,disableRipple:d,color:o,indeterminate:s,size:u},b=(e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o=Gh({root:["root",n&&"indeterminate",`color${Cm(r)}`,`size${Cm(i)}`]},s$,t);return{...t,...o}})(v),x=m.input??c,[I,w]=Ng("root",{ref:n,elementType:u$,className:Hh(b.root,p),shouldForwardComponentProp:!0,externalForwardedProps:{slots:h,slotProps:m,...f},ownerState:v,additionalProps:{type:"checkbox",icon:e.cloneElement(g,{fontSize:g.props.fontSize??u}),checkedIcon:e.cloneElement(y,{fontSize:y.props.fontSize??u}),disableRipple:d,slots:h,slotProps:{input:c$("function"==typeof x?x(v):x,{"data-indeterminate":s})}}});return(0,O.jsx)(I,{...w,classes:b})}),f$=m$,g$=ne({memoize:J,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),y$=(e,t,n,r,i,o,a,s,...l)=>{if(l.length>0)throw new Error("Unsupported number of selectors");let c;if(e&&t&&n&&r&&i&&o&&a&&s)c=(l,c,u,d)=>{const p=e(l,c,u,d),h=t(l,c,u,d),m=n(l,c,u,d),f=r(l,c,u,d),g=i(l,c,u,d),y=o(l,c,u,d),v=a(l,c,u,d);return s(p,h,m,f,g,y,v,c,u,d)};else if(e&&t&&n&&r&&i&&o&&a)c=(s,l,c,u)=>{const d=e(s,l,c,u),p=t(s,l,c,u),h=n(s,l,c,u),m=r(s,l,c,u),f=i(s,l,c,u),g=o(s,l,c,u);return a(d,p,h,m,f,g,l,c,u)};else if(e&&t&&n&&r&&i&&o)c=(a,s,l,c)=>{const u=e(a,s,l,c),d=t(a,s,l,c),p=n(a,s,l,c),h=r(a,s,l,c),m=i(a,s,l,c);return o(u,d,p,h,m,s,l,c)};else if(e&&t&&n&&r&&i)c=(o,a,s,l)=>{const c=e(o,a,s,l),u=t(o,a,s,l),d=n(o,a,s,l),p=r(o,a,s,l);return i(c,u,d,p,a,s,l)};else if(e&&t&&n&&r)c=(i,o,a,s)=>{const l=e(i,o,a,s),c=t(i,o,a,s),u=n(i,o,a,s);return r(l,c,u,o,a,s)};else if(e&&t&&n)c=(r,i,o,a)=>{const s=e(r,i,o,a),l=t(r,i,o,a);return n(s,l,i,o,a)};else if(e&&t)c=(n,r,i,o)=>{const a=e(n,r,i,o);return t(a,r,i,o)};else{if(!e)throw new Error("Missing arguments");c=e}return c},v$=(...e)=>{const t=new WeakMap;let n=1;const r=e[e.length-1],i=e.length-1||1,o=Math.max(r.length-i,0);if(o>3)throw new Error("Unsupported number of arguments");return(i,a,s,l)=>{let c=i.__cacheKey__;c||(c={id:n},i.__cacheKey__=c,n+=1);let u=t.get(c);if(!u){const n=1===e.length?[e=>e,r]:e;let i=e;const a=[void 0,void 0,void 0];switch(o){case 0:break;case 1:i=[...n.slice(0,-1),()=>a[0],r];break;case 2:i=[...n.slice(0,-1),()=>a[0],()=>a[1],r];break;case 3:i=[...n.slice(0,-1),()=>a[0],()=>a[1],()=>a[2],r];break;default:throw new Error("Unsupported number of arguments")}u=g$(...i),u.selectorArgs=a,t.set(c,u)}switch(o){case 3:u.selectorArgs[2]=l;case 2:u.selectorArgs[1]=s;case 1:u.selectorArgs[0]=a}switch(o){case 0:return u(i);case 1:return u(i,a);case 2:return u(i,a,s);case 3:return u(i,a,s,l);default:throw new Error("unreachable")}}},b$="__TREE_VIEW_ROOT_PARENT_ID__",x$=e=>{const t={};return e.forEach((e,n)=>{t[e]=n}),t},I$=(e,t)=>{if(null==t)return!1;let n=e[t];if(!n)return!1;if(n.disabled)return!0;for(;null!=n.parentId;){if(n=e[n.parentId],!n)return!1;if(n.disabled)return!0}return!1};function w$(e){const{storeParameters:t,items:n,parentId:r,depth:i,isItemExpandable:o,otherItemsMetaLookup:a}=e,s={},l={},c=[],u=[],d=e=>{const n=t.getItemId?t.getItemId(e):e.id;!function({id:e,parentId:t,item:n,itemMetaLookup:r,siblingsMetaLookup:i}){if(null==e)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.","An item was provided without id in the `items` prop:",JSON.stringify(n)].join("\n"));if(null!=i[e]||null!=r[e]&&r[e].parentId!==t)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.",`Two items were provided with the same id in the \`items\` prop: "${e}"`].join("\n"))}({id:n,parentId:r,item:e,itemMetaLookup:a,siblingsMetaLookup:s});const d=t.getItemLabel?t.getItemLabel(e):e.label;if(null==d)throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.","Alternatively, you can use the `getItemLabel` prop to specify a custom label for each item.","An item was provided without label in the `items` prop:",JSON.stringify(e)].join("\n"));const p=(t.getItemChildren?t.getItemChildren(e):e.children)||[];u.push({id:n,children:p}),l[n]=e,s[n]={id:n,label:d,parentId:r,idAttribute:void 0,expandable:o(e,p),disabled:!!t.isItemDisabled&&t.isItemDisabled(e),selectable:!t.isItemSelectionDisabled||!t.isItemSelectionDisabled(e),depth:i},c.push(n)};for(const e of n)d(e);return{metaLookup:s,modelLookup:l,orderedChildrenIds:c,childrenIndexes:x$(c),itemsChildren:u}}const k$=[],S$={domStructure:y$(e=>e.domStructure),disabledItemFocusable:y$(e=>e.disabledItemsFocusable),itemMetaLookup:y$(e=>e.itemMetaLookup),itemOrderedChildrenIdsLookup:y$(e=>e.itemOrderedChildrenIdsLookup),itemMeta:y$((e,t)=>e.itemMetaLookup[t??b$]??null),itemOrderedChildrenIds:y$((e,t)=>e.itemOrderedChildrenIdsLookup[t??b$]??k$),itemModel:y$((e,t)=>e.itemModelLookup[t]),isItemDisabled:y$((e,t)=>I$(e.itemMetaLookup,t)),itemIndex:y$((e,t)=>{const n=e.itemMetaLookup[t];return null==n?-1:e.itemChildrenIndexesLookup[n.parentId??b$][n.id]}),itemParentId:y$((e,t)=>e.itemMetaLookup[t]?.parentId??null),itemDepth:y$((e,t)=>e.itemMetaLookup[t]?.depth??0),canItemBeFocused:y$((e,t)=>e.disabledItemsFocusable||null!=e.itemModelLookup[t]&&!I$(e.itemMetaLookup,t)),itemChildrenIndentation:y$(e=>e.itemChildrenIndentation)},M$=v$(e=>e.expandedItems,e=>{const t=new Map;return e.forEach(e=>{t.set(e,!0)}),t}),C$={expandedItemsRaw:y$(e=>e.expandedItems),expandedItemsMap:M$,flatList:v$(S$.itemOrderedChildrenIdsLookup,M$,(e,t)=>(e[b$]??[]).flatMap(function n(r){if(!t.has(r))return[r];const i=[r],o=e[r]||[];for(const e of o)i.push(...n(e));return i})),triggerSlot:y$(e=>e.expansionTrigger),isItemExpanded:y$(M$,(e,t)=>e.has(t)),isItemExpandable:y$(S$.itemMeta,(e,t)=>e?.expandable??!1)},P$=v$(e=>e.selectedItems,e=>Array.isArray(e)?e:null!=e?[e]:[]),E$=v$(P$,e=>{const t=new Map;return e.forEach(e=>{t.set(e,!0)}),t}),T$=y$((e,t)=>e.itemMetaLookup[t]?.selectable??!0),A$={selectedItemsRaw:y$(e=>e.selectedItems),selectedItems:P$,selectedItemsMap:E$,enabled:y$(e=>!e.disableSelection),isMultiSelectEnabled:y$(e=>e.multiSelect),isCheckboxSelectionEnabled:y$(e=>e.checkboxSelection),propagationRules:y$(e=>e.selectionPropagation),isItemSelected:y$(E$,(e,t)=>e.has(t)),isFeatureEnabledForItem:y$(T$,e=>!e.disableSelection,(e,t,n)=>t&&e),canItemBeSelected:y$(S$.isItemDisabled,T$,e=>!e.disableSelection,(e,t,n,r)=>n&&!e&&t),isItemSelectable:T$},O$=v$(A$.selectedItems,C$.expandedItemsMap,S$.itemMetaLookup,S$.disabledItemFocusable,e=>S$.itemOrderedChildrenIds(e,null),(e,t,n,r,i)=>{const o=e.find(e=>{if(!r&&I$(n,e))return!1;const i=n[e];return i&&(null==i.parentId||t.has(i.parentId))});if(null!=o)return o;const a=i.find(e=>r||!I$(n,e));return null!=a?a:null}),j$={defaultFocusableItemId:O$,isItemTheDefaultFocusableItem:y$(O$,(e,t)=>e===t),focusedItemId:y$(e=>e.focusedItemId),isItemFocused:y$((e,t)=>e.focusedItemId===t)},L$={isEmpty:y$(e=>null==e.lazyLoadedItems||0===Object.keys(e.lazyLoadedItems.loading).length&&0===Object.keys(e.lazyLoadedItems.errors).length),isItemLoading:y$((e,t)=>e.lazyLoadedItems?.loading[t??b$]??!1),itemHasError:y$((e,t)=>!!e.lazyLoadedItems?.errors[t??b$]),itemError:y$((e,t)=>e.lazyLoadedItems?.errors[t??b$])},R$={isItemEditable:y$(e=>e.isItemEditable,S$.itemModel,(e,t,n)=>!(!t||null==e)&&("boolean"==typeof e?e:e(t))),isItemBeingEdited:y$((e,t)=>null!=t&&e.editedItemId===t),isAnyItemBeingEdited:y$(e=>!!e.editedItemId)},D$=e=>Array.isArray(e)?e.length>0&&e.some(D$):Boolean(e),$$=e.createContext(()=>-1),z$=(e,t)=>{let n=t.length-1;for(;n>=0&&!S$.canItemBeFocused(e,t[n]);)n-=1;if(-1!==n)return t[n]},N$=(e,t)=>{const n=S$.itemMeta(e,t);if(!n)return null;const r=S$.itemOrderedChildrenIds(e,n.parentId),i=S$.itemIndex(e,t);if(0===i)return n.parentId;let o=i-1;for(;!S$.canItemBeFocused(e,r[o])&&o>=0;)o-=1;if(-1===o)return null==n.parentId?null:N$(e,n.parentId);let a=r[o],s=z$(e,S$.itemOrderedChildrenIds(e,a));for(;C$.isItemExpanded(e,a)&&null!=s;)a=s,s=z$(e,S$.itemOrderedChildrenIds(e,a));return a},_$=(e,t)=>{if(C$.isItemExpanded(e,t)){const n=S$.itemOrderedChildrenIds(e,t).find(t=>S$.canItemBeFocused(e,t));if(null!=n)return n}let n=S$.itemMeta(e,t);for(;null!=n;){const t=S$.itemOrderedChildrenIds(e,n.parentId),r=S$.itemIndex(e,n.id);if(r{let t=null;for(;null==t||C$.isItemExpanded(e,t);){const n=S$.itemOrderedChildrenIds(e,t),r=z$(e,n);if(null==r)return t;t=r}return t},H$=e=>S$.itemOrderedChildrenIds(e,null).find(t=>S$.canItemBeFocused(e,t)),B$=(e,t,n)=>{if(t===n)return[t,n];const r=S$.itemMeta(e,t),i=S$.itemMeta(e,n);if(!r||!i)return[t,n];if(r.parentId===i.id||i.parentId===r.id)return i.parentId===r.id?[r.id,i.id]:[i.id,r.id];const o=[r.id],a=[i.id];let s=r.parentId,l=i.parentId,c=-1!==a.indexOf(s),u=-1!==o.indexOf(l),d=!0,p=!0;for(;!u&&!c;)d&&(o.push(s),c=-1!==a.indexOf(s),d=null!==s,!c&&d&&(s=S$.itemParentId(e,s))),p&&!c&&(a.push(l),u=-1!==o.indexOf(l),p=null!==l,!u&&p&&(l=S$.itemParentId(e,l)));const h=c?s:l,m=S$.itemOrderedChildrenIds(e,h),f=o[o.indexOf(h)-1],g=a[a.indexOf(h)-1];return m.indexOf(f)t!==e.closest('*[role="treeitem"]'),U$=y$(e=>e.providedTreeId??e.treeId),Y$={treeId:U$,treeItemIdAttribute:y$(U$,(e,t,n)=>null!=n?n:`${e??""}-${t}`)},W$=(e,t,n)=>"function"==typeof n?n(e,t):n;function G$(e){return LD("MuiTreeItem",e)}RD("MuiTreeItem",["root","content","groupTransition","iconContainer","label","checkbox","labelInput","dragAndDropOverlay","errorIcon","loadingIcon","expanded","selected","focused","disabled","editable","editing"]);const K$=ob((0,O.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"TreeViewExpandIcon"),q$=ob((0,O.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"TreeViewCollapseIcon"),X$=["ownerState"];function Z$(e,t,n){return void 0!==e?e:void 0!==t?t:n}function J$(e){const{slots:t,slotProps:n,status:r}=e,{slots:i,slotProps:o}=BD(),a={collapseIcon:Z$(t?.collapseIcon,i.collapseIcon,q$),expandIcon:Z$(t?.expandIcon,i.expandIcon,K$),endIcon:Z$(t?.endIcon,i.endIcon),icon:t?.icon};let s;s=a?.icon?"icon":r.expandable?r.expanded?"collapseIcon":"expandIcon":"endIcon";const c=a[s],u=tt(TD({elementType:c,externalSlotProps:e=>l({},ED(o[s],e),ED(n?.[s],e)),ownerState:{}}),X$);return c?(0,O.jsx)(c,l({},u)):null}const Q$=bm("div",{name:"MuiTreeItemDragAndDropOverlay",slot:"Root",shouldForwardProp:e=>QE(e)&&"action"!==e})(({theme:e})=>({position:"absolute",left:0,display:"flex",top:0,bottom:0,right:0,pointerEvents:"none",variants:[{props:{action:"make-child"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderRadius:e.shape.borderRadius,backgroundColor:e.vars?`rgba(${e.vars.palette.primary.darkChannel} / ${e.vars.palette.action.focusOpacity})`:op(e.palette.primary.dark,e.palette.action.focusOpacity)}},{props:{action:"reorder-above"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderTop:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"reorder-below"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"move-to-parent"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * calc(var(--TreeView-itemDepth) - 1))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}}]}));function ez(e){return null==e.action?null:(0,O.jsx)(Q$,l({},e))}function tz(t){const{children:n,itemId:r,id:i}=t,{wrapItem:o,store:a}=FD(),s=uD(a,Y$.treeItemIdAttribute,r,i);return(0,O.jsx)(e.Fragment,{children:o({children:n,itemId:r,store:a,idAttribute:s})})}const nz=bm("input",{name:"MuiTreeItem",slot:"LabelInput"})(({theme:e})=>l({},e.typography.body1,{width:"100%",backgroundColor:(e.vars||e).palette.background.paper,borderRadius:e.shape.borderRadius,border:"none",padding:"0 2px",boxSizing:"border-box","&:focus":{outline:`1px solid ${(e.vars||e).palette.primary.main}`}})),rz=["visible"],iz=["id","itemId","label","disabled","disableSelection","children","slots","slotProps","classes"],oz=$D(),az=bm("li",{name:"MuiTreeItem",slot:"Root"})({listStyle:"none",margin:0,padding:0,outline:0}),sz=bm("div",{name:"MuiTreeItem",slot:"Content",shouldForwardProp:e=>QE(e)&&"status"!==e})(({theme:e})=>({padding:e.spacing(.5,1),paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`,borderRadius:e.shape.borderRadius,width:"100%",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",gap:e.spacing(1),cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},"&[data-disabled]":{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent",cursor:"auto"},"&[data-focused]":{backgroundColor:(e.vars||e).palette.action.focus},"&[data-selected]":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:op(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:op(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:op(e.palette.primary.main,e.palette.action.selectedOpacity)}}},"&[data-selected][data-focused]":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:op(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}})),lz=bm("div",{name:"MuiTreeItem",slot:"Label",shouldForwardProp:e=>QE(e)&&"editable"!==e})(({theme:e})=>l({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative",overflow:"hidden"},e.typography.body1,{variants:[{props:({editable:e})=>e,style:{paddingLeft:"2px"}}]})),cz=bm("div",{name:"MuiTreeItem",slot:"IconContainer"})({width:16,display:"flex",flexShrink:0,justifyContent:"center",position:"relative",cursor:"inherit","& svg":{fontSize:18}}),uz=bm(ZD,{name:"MuiTreeItem",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition})({margin:0,padding:0}),dz=bm("div",{name:"MuiTreeItem",slot:"ErrorIcon"})({position:"absolute",right:-3,width:7,height:7,borderRadius:"50%",backgroundColor:"red"}),pz=bm(tv,{name:"MuiTreeItem",slot:"LoadingIcon"})({color:"text.primary"}),hz=bm(e.forwardRef((e,t)=>{const{visible:n}=e,r=tt(e,rz);return n?(0,O.jsx)(f$,l({},r,{ref:t})):null}),{name:"MuiTreeItem",slot:"Checkbox"})({padding:0}),mz=e.forwardRef(function(t,n){const r=oz({props:t,name:"MuiTreeItem"}),{id:i,itemId:o,label:a,disabled:s,disableSelection:c,children:u,slots:d={},slotProps:p={},classes:h}=r,m=tt(r,iz),{getContextProviderProps:f,getRootProps:g,getContentProps:y,getIconContainerProps:v,getCheckboxProps:b,getLabelProps:x,getGroupTransitionProps:I,getLabelInputProps:w,getDragAndDropOverlayProps:k,getErrorContainerProps:S,getLoadingContainerProps:M,status:C}=(t=>{const{runItemPlugins:n,publicAPI:r,store:i}=FD(),o=e.useContext($$),a=uD(i,W$,t.itemId,o),{id:s,itemId:c,label:u,children:d,rootRef:p}=t,{rootRef:h,contentRef:m,propsEnhancers:f}=n(t),{interactions:g,status:y}=(({itemId:e,children:t})=>{const{store:n,publicAPI:r}=FD(),i=uD(n,C$.isItemExpandable,e),o=uD(n,L$.isItemLoading,e),a=uD(n,L$.itemHasError,e),s=D$(t)||i,l=uD(n,C$.isItemExpanded,e),c=uD(n,j$.isItemFocused,e),u=uD(n,A$.isItemSelected,e),d=uD(n,S$.isItemDisabled,e),p=uD(n,R$.isItemBeingEdited,e),h=uD(n,R$.isItemEditable,e),m={expandable:s,expanded:l,focused:c,selected:u,disabled:d,editing:p,editable:h,loading:o,error:a},f=()=>{n.labelEditing&&(p?n.labelEditing.setEditedItem(null):n.labelEditing.setEditedItem(e))};return{interactions:{handleExpansion:t=>{if(m.disabled)return;m.focused||n.focus.focusItem(t,e);const r=A$.isMultiSelectEnabled(n.state)&&(t.shiftKey||t.ctrlKey||t.metaKey);!m.expandable||r&&C$.isItemExpanded(n.state,e)||n.expansion.setItemExpansion({event:t,itemId:e})},handleSelection:t=>{A$.canItemBeSelected(n.state,e)&&(m.focused||m.editing||n.focus.focusItem(t,e),A$.isMultiSelectEnabled(n.state)&&(t.shiftKey||t.ctrlKey||t.metaKey)?t.shiftKey?n.selection.expandSelectionRange(t,e):n.selection.setItemSelection({event:t,itemId:e,keepExistingSelection:!0}):n.selection.setItemSelection({event:t,itemId:e,shouldBeSelected:!0}))},handleCheckboxSelection:t=>{const r=t.nativeEvent.shiftKey,i=A$.isMultiSelectEnabled(n.state);i&&r?n.selection.expandSelectionRange(t,e):n.selection.setItemSelection({event:t,itemId:e,keepExistingSelection:i,shouldBeSelected:t.target.checked})},toggleItemEditing:f,handleSaveItemLabel:(t,r)=>{n.labelEditing&&R$.isItemBeingEdited(n.state,e)&&(n.labelEditing.updateItemLabel(e,r),f(),n.focus.focusItem(t,e))},handleCancelItemLabelEditing:t=>{n.labelEditing&&R$.isItemBeingEdited(n.state,e)&&(f(),n.focus.focusItem(t,e))}},status:m,publicAPI:r}})({itemId:c,children:d}),v=e.useRef(null),b=e.useRef(null),x=sD(p,h,v),I=sD(m,b),w=e.useRef(null),k=uD(i,A$.isCheckboxSelectionEnabled),S=uD(i,Y$.treeItemIdAttribute,c,s),M=uD(i,j$.isItemTheDefaultFocusableItem,c),C={rootRefObject:v,contentRefObject:b,interactions:g},P=e=>t=>{if(e.onBlur?.(t),t.defaultMuiPrevented)return;const n=i.items.getItemDOMElement(c);y.editing||t.relatedTarget&&V$(t.relatedTarget,n)&&(t.target&&"labelInput"===t.target?.dataset?.element&&V$(t.target,n)||"labelInput"===t.relatedTarget?.dataset?.element)||i.focus.removeFocusedItem()},E=e=>t=>{e.onKeyDown?.(t),t.defaultMuiPrevented||"labelInput"===t.target?.dataset?.element||i.keyboardNavigation.handleItemKeyDown(t,c)},T=e=>t=>{e.onMouseDown?.(t),t.defaultMuiPrevented||(t.shiftKey||t.ctrlKey||t.metaKey||y.disabled)&&t.preventDefault()};return{getContextProviderProps:()=>({itemId:c,id:s}),getRootProps:(e={})=>{const n=l({},CD(t),CD(e)),r=l({},n,{ref:x,role:"treeitem",tabIndex:M?0:-1,id:S,"aria-expanded":y.expandable?y.expanded:void 0,"aria-disabled":y.disabled||void 0},e,{style:l({},e.style??{},{"--TreeView-itemDepth":a}),onFocus:(o=n,e=>{o.onFocus?.(e),e.defaultMuiPrevented||!y.focused&&S$.canItemBeFocused(i.state,c)&&e.currentTarget===e.target&&i.focus.focusItem(e,c)}),onBlur:P(n),onKeyDown:E(n)});var o;const s=f.root?.(l({},C,{externalEventHandlers:n}))??{};return l({},r,s)},getContentProps:(e={})=>{const t=CD(e),n=l({},t,e,{ref:I,onClick:(r=t,e=>{r.onClick?.(e),i.items.handleItemClick(e,c),e.defaultMuiPrevented||w.current?.contains(e.target)||("content"===C$.triggerSlot(i.state)&&g.handleExpansion(e),k||g.handleSelection(e))}),onMouseDown:T(t),status:y});var r;["expanded","selected","focused","disabled","editing","editable"].forEach(e=>{y[e]&&(n[`data-${e}`]="")});const o=f.content?.(l({},C,{externalEventHandlers:t}))??{};return l({},n,o)},getGroupTransitionProps:(e={})=>l({},CD(e),{unmountOnExit:!0,component:"ul",role:"group",in:y.expanded,children:d},e),getIconContainerProps:(e={})=>{const t=CD(e);return l({},t,e,{onClick:(n=t,e=>{n.onClick?.(e),e.defaultMuiPrevented||"iconContainer"===C$.triggerSlot(i.state)&&g.handleExpansion(e)})});var n},getCheckboxProps:(e={})=>{const t=CD(e),n=l({},t,{ref:w,"aria-hidden":!0},e),r=f.checkbox?.(l({},C,{externalEventHandlers:t}))??{};return l({},n,r)},getLabelProps:(e={})=>{const t=l({},CD(e)),n=l({},t,{children:u},e,{onDoubleClick:(r=t,e=>{r.onDoubleClick?.(e),e.defaultMuiPrevented||g.toggleItemEditing()})});var r;const i=f.label?.(l({},C,{externalEventHandlers:t}))??{};return l({},i,n)},getLabelInputProps:(e={})=>{const t=CD(e),n=f.labelInput?.(l({},C,{externalEventHandlers:t}))??{};return l({},e,n)},getDragAndDropOverlayProps:(e={})=>{const t=CD(e),n=f.dragAndDropOverlay?.(l({},C,{externalEventHandlers:t}))??{};return l({},e,n)},getErrorContainerProps:(e={})=>l({},CD(e),e),getLoadingContainerProps:(e={})=>l({size:"12px",thickness:6},CD(e),e),rootRef:x,status:y,publicAPI:r}})({id:i,itemId:o,children:u,label:a,disabled:s,disableSelection:c}),P=(e=>{const{classes:t}=BD();return MD({root:["root"],content:["content"],iconContainer:["iconContainer"],checkbox:["checkbox"],label:["label"],groupTransition:["groupTransition"],labelInput:["labelInput"],dragAndDropOverlay:["dragAndDropOverlay"],errorIcon:["errorIcon"],loadingIcon:["loadingIcon"],expanded:["expanded"],editing:["editing"],editable:["editable"],selected:["selected"],focused:["focused"],disabled:["disabled"]},G$,l({},e,{root:Hh(e?.root,t.root),content:Hh(e?.content,t.itemContent),iconContainer:Hh(e?.iconContainer,t.itemIconContainer),checkbox:Hh(e?.checkbox,t.itemCheckbox),label:Hh(e?.label,t.itemLabel),groupTransition:Hh(e?.groupTransition,t.itemGroupTransition),labelInput:Hh(e?.labelInput,t.itemLabelInput),dragAndDropOverlay:Hh(e?.dragAndDropOverlay,t.itemDragAndDropOverlay),errorIcon:Hh(e?.errorIcon,t.itemErrorIcon),loadingIcon:Hh(e?.loadingIcon,t.itemLoadingIcon)}))})(h),E=d.root??az,T=TD({elementType:E,getSlotProps:g,externalForwardedProps:m,externalSlotProps:p.root,additionalProps:{ref:n},ownerState:{},className:P.root}),A=d.content??sz,j=TD({elementType:A,getSlotProps:y,externalSlotProps:p.content,ownerState:{},className:Hh(P.content,C.expanded&&P.expanded,C.selected&&P.selected,C.focused&&P.focused,C.disabled&&P.disabled,C.editing&&P.editing,C.editable&&P.editable)}),L=d.iconContainer??cz,R=TD({elementType:L,getSlotProps:v,externalSlotProps:p.iconContainer,ownerState:{},className:P.iconContainer}),D=d.label??lz,$=TD({elementType:D,getSlotProps:x,externalSlotProps:p.label,ownerState:{},className:P.label}),z=d.checkbox??hz,N=TD({elementType:z,getSlotProps:b,externalSlotProps:p.checkbox,ownerState:{},className:P.checkbox}),_=d.groupTransition??void 0,F=TD({elementType:_,getSlotProps:I,externalSlotProps:p.groupTransition,ownerState:{},className:P.groupTransition}),H=d.labelInput??nz,B=TD({elementType:H,getSlotProps:w,externalSlotProps:p.labelInput,ownerState:{},className:P.labelInput}),V=d.dragAndDropOverlay??ez,U=TD({elementType:V,getSlotProps:k,externalSlotProps:p.dragAndDropOverlay,ownerState:{},className:P.dragAndDropOverlay}),Y=d.errorIcon??dz,W=TD({elementType:Y,getSlotProps:S,externalSlotProps:p.errorIcon,ownerState:{},className:P.errorIcon}),G=d.loadingIcon??pz,K=TD({elementType:G,getSlotProps:M,externalSlotProps:p.loadingIcon,ownerState:{},className:P.loadingIcon});return(0,O.jsx)(tz,l({},f(),{children:(0,O.jsxs)(E,l({},T,{children:[(0,O.jsxs)(A,l({},j,{children:[(0,O.jsxs)(L,l({},R,{children:[C.error&&(0,O.jsx)(Y,l({},W)),C.loading?(0,O.jsx)(G,l({},K)):(0,O.jsx)(J$,{status:C,slots:d,slotProps:p})]})),(0,O.jsx)(z,l({},N)),C.editing?(0,O.jsx)(H,l({},B)):(0,O.jsx)(D,l({},$)),(0,O.jsx)(V,l({},U))]})),u&&(0,O.jsx)(uz,l({as:_},F))]}))}))}),fz=["ownerState"],gz=e.createContext(null),yz=()=>zD,vz=e=>S$.itemOrderedChildrenIds(e,null),bz=e.memo(function({itemSlot:t,itemSlotProps:n,itemId:r,skipChildren:i}){const o=e.useContext(gz),{store:a}=FD(),s=uD(a,S$.itemMeta,r),c=uD(a,i?yz:S$.itemOrderedChildrenIds,r),u=t??mz,d=tt(TD({elementType:u,externalSlotProps:n,additionalProps:{label:s?.label,id:s?.idAttribute,itemId:r},ownerState:{itemId:r,label:s?.label}}),fz);return(0,O.jsx)(u,l({},d,{children:c?.map(o)}))},YD);function xz(t){const{slots:n,slotProps:r}=t,{store:i}=FD(),o=n?.item,a=r?.item,s=uD(i,S$.domStructure),l=uD(i,"flat"===s?C$.flatList:vz),c="flat"===s,u=e.useCallback(e=>(0,O.jsx)(bz,{itemSlot:o,itemSlotProps:a,itemId:e,skipChildren:c},e),[o,a,c]);return(0,O.jsx)(gz.Provider,{value:u,children:l.map(u)})}function Iz(e,t,n){const r=uD(e,Y$.treeId),i=uD(e,S$.itemChildrenIndentation),o=uD(e,A$.isMultiSelectEnabled);return a=>l({ref:n,role:"tree",id:r,"aria-multiselectable":o},t,a,{style:l({},t.style,{"--TreeView-itemChildrenIndentation":"number"==typeof i?`${i}px`:i}),onFocus:t=>{a.onFocus?.(t),e.focus.handleRootFocus(t)},onBlur:t=>{a.onBlur?.(t),e.focus.handleRootBlur(t)}})}const wz=["apiRef","slots","slotProps","disabledItemsFocusable","items","isItemDisabled","isItemSelectionDisabled","getItemLabel","getItemChildren","getItemId","onItemClick","itemChildrenIndentation","id","expandedItems","defaultExpandedItems","onExpandedItemsChange","onItemExpansionToggle","expansionTrigger","disableSelection","selectedItems","defaultSelectedItems","multiSelect","checkboxSelection","selectionPropagation","onSelectedItemsChange","onItemSelectionToggle","onItemFocus","onItemLabelChange","isItemEditable"],kz="undefined"!=typeof document?e.useLayoutEffect:()=>{},Sz=[];function Mz(t,n){const r=fS(),i=aD(()=>new t(l({},n,{isRtl:r}))).current;var o;return kz(()=>i.updateStateFromParameters(l({},n,{isRtl:r})),[i,r,n]),o=i.disposeEffect,e.useEffect(o,Sz),i}const Cz=({props:t})=>{const{store:n}=FD(),{label:r,itemId:i}=t,[o,a]=e.useState(r),s=uD(n,R$.isItemEditable,i),l=uD(n,R$.isItemBeingEdited,i);return e.useEffect(()=>{l||a(r)},[l,r]),{propsEnhancers:{label:()=>({editable:s}),labelInput:({externalEventHandlers:e,interactions:t})=>s?{value:o??"","data-element":"labelInput",onChange:t=>{e.onChange?.(t),a(t.target.value)},onKeyDown:n=>{if(e.onKeyDown?.(n),n.defaultMuiPrevented)return;const r=n.target;"Enter"===n.key&&r.value?t.handleSaveItemLabel(n,r.value):"Escape"===n.key&&t.handleCancelItemLabelEditing(n)},onBlur:n=>{e.onBlur?.(n),n.defaultMuiPrevented||n.target.value&&t.handleSaveItemLabel(n,n.target.value)},autoFocus:!0,type:"text"}:{}}}};class Pz{constructor(e){this.store=e,e.itemPluginManager.register(Cz,null)}buildPublicAPI=()=>({setEditedItem:this.setEditedItem,updateItemLabel:this.updateItemLabel});setEditedItem=e=>{(null===e||R$.isItemEditable(this.store.state,e))&&this.store.set("editedItemId",e)};updateItemLabel=(e,t)=>{if(!t)throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.","The label of an item cannot be empty.",e].join("\n"));const n=this.store.state.itemMetaLookup[e];n.label!==t&&(this.store.set("itemMetaLookup",l({},this.store.state.itemMetaLookup,{[e]:l({},n,{label:t})})),this.store.parameters.onItemLabelChange&&this.store.parameters.onItemLabelChange(e,t))}}class Ez{static create(e){return new Ez(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){this.state=e,this.updateTick+=1;const t=this.updateTick,n=this.listeners.values();let r;for(;r=n.next(),!r.done;){if(t!==this.updateTick)return;(0,r.value)(e)}}update(e){for(const t in e)if(!Object.is(this.state[t],e[t]))return void this.setState(l({},this.state,e))}set(e,t){Object.is(this.state[e],t)||this.setState(l({},this.state,{[e]:t}))}use=(()=>(e,t,n,r)=>uD(this,e,t,n,r))()}class Tz{maxListeners=20;warnOnce=!1;events={};on(e,t,n={}){let r=this.events[e];r||(r={highPriority:new Map,regular:new Map},this.events[e]=r),n.isFirst?r.highPriority.set(t,!0):r.regular.set(t,!0)}removeListener(e,t){this.events[e]&&(this.events[e].regular.delete(t),this.events[e].highPriority.delete(t))}removeAllListeners(){this.events={}}emit(e,...t){const n=this.events[e];if(!n)return;const r=Array.from(n.highPriority.keys()),i=Array.from(n.regular.keys());for(let e=r.length-1;e>=0;e-=1){const i=r[e];n.highPriority.has(i)&&i.apply(this,t)}for(let e=0;et||(e?"iconContainer":"content");class Oz{constructor(e){this.store=e}static shouldRebuildItemsState=(e,t)=>["items","isItemDisabled","isItemSelectionDisabled","getItemId","getItemLabel","getItemChildren"].some(n=>{const r=n;return e[r]!==t[r]});static buildItemsStateIfNeeded=e=>{const t={},n={},r={},i={};return function o(a,s,l){const c=s??b$,{metaLookup:u,modelLookup:d,orderedChildrenIds:p,childrenIndexes:h,itemsChildren:m}=w$({storeParameters:e,items:a,parentId:s,depth:l,isItemExpandable:(e,t)=>!!t&&t.length>0,otherItemsMetaLookup:t});Object.assign(t,u),Object.assign(n,d),r[c]=p,i[c]=h;for(const e of m)o(e.children||[],e.id,l+1)}(e.items,null,0),{itemMetaLookup:t,itemModelLookup:n,itemOrderedChildrenIdsLookup:r,itemChildrenIndexesLookup:i}};getItem=e=>S$.itemModel(this.store.state,e);getItemTree=()=>{const e=t=>{const n=l({},S$.itemModel(this.store.state,t)),r=S$.itemOrderedChildrenIds(this.store.state,t);return r.length>0?n.children=r.map(e):delete n.children,n};return S$.itemOrderedChildrenIds(this.store.state,null).map(e)};getItemOrderedChildrenIds=e=>S$.itemOrderedChildrenIds(this.store.state,e);getParentId=e=>{const t=S$.itemMeta(this.store.state,e);return t?.parentId||null};setIsItemDisabled=({itemId:e,shouldBeDisabled:t})=>{if(!this.store.state.itemMetaLookup[e])return;const n=l({},this.store.state.itemMetaLookup);n[e]=l({},n[e],{disabled:t??!n[e].disabled}),this.store.set("itemMetaLookup",n)};buildPublicAPI=()=>({getItem:this.getItem,getItemDOMElement:this.getItemDOMElement,getItemOrderedChildrenIds:this.getItemOrderedChildrenIds,getItemTree:this.getItemTree,getParentId:this.getParentId,setIsItemDisabled:this.setIsItemDisabled});getItemDOMElement=e=>{const t=S$.itemMeta(this.store.state,e);if(null==t)return null;const n=Y$.treeItemIdAttribute(this.store.state,e,t.idAttribute);return document.getElementById(n)};setItemChildren=({items:e,parentId:t,getChildrenCount:n})=>{const r=t??b$,i=null==t?-1:S$.itemDepth(this.store.state,t),{metaLookup:o,modelLookup:a,orderedChildrenIds:s,childrenIndexes:c}=w$({storeParameters:this.store.parameters,items:e,parentId:t,depth:i+1,isItemExpandable:n?e=>0!==n(e):()=>!1,otherItemsMetaLookup:S$.itemMetaLookup(this.store.state)});this.store.update({itemModelLookup:l({},this.store.state.itemModelLookup,a),itemMetaLookup:l({},this.store.state.itemMetaLookup,o),itemOrderedChildrenIdsLookup:l({},this.store.state.itemOrderedChildrenIdsLookup,{[r]:s}),itemChildrenIndexesLookup:l({},this.store.state.itemChildrenIndexesLookup,{[r]:c})})};removeChildren=e=>{const t=this.store.state.itemMetaLookup,n=Object.keys(t).reduce((n,r)=>{const i=t[r];return i.parentId===e?n:l({},n,{[i.id]:i})},{}),r=l({},this.store.state.itemOrderedChildrenIdsLookup),i=l({},this.store.state.itemChildrenIndexesLookup),o=e??b$;delete i[o],delete r[o],this.store.update({itemMetaLookup:n,itemOrderedChildrenIdsLookup:r,itemChildrenIndexesLookup:i})};handleItemClick=(e,t)=>{this.store.parameters.onItemClick?.(e,t)}}function jz(e){return{disabledItemsFocusable:e.disabledItemsFocusable??!1,domStructure:"nested",itemChildrenIndentation:e.itemChildrenIndentation??"12px",providedTreeId:e.id,expansionTrigger:Az({isItemEditable:e.isItemEditable,expansionTrigger:e.expansionTrigger}),disableSelection:e.disableSelection??!1,multiSelect:e.multiSelect??!1,checkboxSelection:e.checkboxSelection??!1,selectionPropagation:e.selectionPropagation??ND}}function Lz(e,t,n){return void 0!==e?e:void 0!==t?t:n}let Rz=0;class Dz{timeoutIds=(()=>new Map)();intervalIds=(()=>new Map)();startTimeout=(e,t,n)=>{this.clearTimeout(e);const r=setTimeout(()=>{this.timeoutIds.delete(e),n()},t);this.timeoutIds.set(e,r)};startInterval=(e,t,n)=>{this.clearTimeout(e);const r=setInterval(n,t);this.intervalIds.set(e,r)};clearTimeout=e=>{const t=this.timeoutIds.get(e);null!=t&&(clearTimeout(t),this.timeoutIds.delete(e))};clearInterval=e=>{const t=this.intervalIds.get(e);null!=t&&(clearInterval(t),this.intervalIds.delete(e))};clearAll=()=>{this.timeoutIds.forEach(clearTimeout),this.timeoutIds.clear(),this.intervalIds.forEach(clearInterval),this.intervalIds.clear()}}class $z{typeaheadQuery="";constructor(e){this.store=e,this.labelMap=zz(S$.itemMetaLookup(this.store.state)),this.store.registerStoreEffect(S$.itemMetaLookup,(e,t)=>{this.store.shouldIgnoreItemsStateUpdate()||(this.labelMap=zz(t))})}canToggleItemSelection=e=>A$.canItemBeSelected(this.store.state,e);canToggleItemExpansion=e=>!S$.isItemDisabled(this.store.state,e)&&C$.isItemExpandable(this.store.state,e);getFirstItemMatchingTypeaheadQuery=(e,t)=>{const n=e=>{const t=_$(this.store.state,e);return null===t?H$(this.store.state):t},r=t=>{let r=null;const i={};let o=t.length>1?e:n(e);for(;null==r&&!i[o];){const e=this.labelMap[o];e?.startsWith(t)?r=o:(i[o]=!0,o=n(o))}return r},i=t.toLowerCase(),o=`${this.typeaheadQuery}${i}`,a=r(o);if(null!=a)return this.typeaheadQuery=o,a;const s=r(i);return null!=s?(this.typeaheadQuery=i,s):(this.typeaheadQuery="",null)};updateLabelMap=e=>{this.labelMap=e(this.labelMap)};handleItemKeyDown=async(e,t)=>{if(e.defaultMuiPrevented)return;if(e.altKey||V$(e.target,e.currentTarget))return;const n=e.ctrlKey||e.metaKey,r=e.key,i=A$.isMultiSelectEnabled(this.store.state);switch(!0){case" "===r&&this.canToggleItemSelection(t):e.preventDefault(),i&&e.shiftKey?this.store.selection.expandSelectionRange(e,t):this.store.selection.setItemSelection({event:e,itemId:t,keepExistingSelection:i,shouldBeSelected:void 0});break;case"Enter"===r:this.store.labelEditing?.setEditedItem&&R$.isItemEditable(this.store.state,t)&&!R$.isItemBeingEdited(this.store.state,t)?this.store.labelEditing.setEditedItem(t):this.canToggleItemExpansion(t)?(this.store.expansion.setItemExpansion({event:e,itemId:t}),e.preventDefault()):this.canToggleItemSelection(t)&&(i?(e.preventDefault(),this.store.selection.setItemSelection({event:e,itemId:t,keepExistingSelection:!0})):A$.isItemSelected(this.store.state,t)||(this.store.selection.setItemSelection({event:e,itemId:t}),e.preventDefault()));break;case"ArrowDown"===r:{const n=_$(this.store.state,t);n&&(e.preventDefault(),this.store.focus.focusItem(e,n),i&&e.shiftKey&&this.canToggleItemSelection(n)&&this.store.selection.selectItemFromArrowNavigation(e,t,n));break}case"ArrowUp"===r:{const n=N$(this.store.state,t);n&&(e.preventDefault(),this.store.focus.focusItem(e,n),i&&e.shiftKey&&this.canToggleItemSelection(n)&&this.store.selection.selectItemFromArrowNavigation(e,t,n));break}case"ArrowRight"===r&&!this.store.parameters.isRtl||"ArrowLeft"===r&&this.store.parameters.isRtl:if(n)return;if(C$.isItemExpanded(this.store.state,t)){const n=_$(this.store.state,t);n&&(this.store.focus.focusItem(e,n),e.preventDefault())}else this.canToggleItemExpansion(t)&&(this.store.expansion.setItemExpansion({event:e,itemId:t}),e.preventDefault());break;case"ArrowLeft"===r&&!this.store.parameters.isRtl||"ArrowRight"===r&&this.store.parameters.isRtl:if(n)return;if(this.canToggleItemExpansion(t)&&C$.isItemExpanded(this.store.state,t))this.store.expansion.setItemExpansion({event:e,itemId:t}),e.preventDefault();else{const n=S$.itemParentId(this.store.state,t);n&&(this.store.focus.focusItem(e,n),e.preventDefault())}break;case"Home"===r:this.canToggleItemSelection(t)&&i&&n&&e.shiftKey?this.store.selection.selectRangeFromStartToItem(e,t):this.store.focus.focusItem(e,H$(this.store.state)),e.preventDefault();break;case"End"===r:this.canToggleItemSelection(t)&&i&&n&&e.shiftKey?this.store.selection.selectRangeFromItemToEnd(e,t):this.store.focus.focusItem(e,F$(this.store.state)),e.preventDefault();break;case"*"===r:this.store.expansion.expandAllSiblings(e,t),e.preventDefault();break;case"A"===String.fromCharCode(e.keyCode)&&n&&i&&A$.enabled(this.store.state):this.store.selection.selectAllNavigableItems(e),e.preventDefault();break;case!n&&!e.shiftKey&&function(e){return!!e&&1===e.length&&!!e.match(/\S/)}(r):{this.store.timeoutManager.clearTimeout("typeahead");const n=this.getFirstItemMatchingTypeaheadQuery(t,r);null!=n?(this.store.focus.focusItem(e,n),e.preventDefault()):this.typeaheadQuery="",this.store.timeoutManager.startTimeout("typeahead",500,()=>{this.typeaheadQuery=""});break}}}}function zz(e){const t={};return Object.values(e).forEach(e=>{t[e.id]=e.label.toLowerCase()}),t}class Nz{constructor(e){this.store=e;let t=e.state;this.store.subscribe(e=>{if(e.itemMetaLookup===t.itemMetaLookup)return void(t=e);const n=j$.focusedItemId(e);if(null==n||S$.itemMeta(e,n))return void(t=e);const r=t=>null!=t&&S$.itemMeta(e,t)?t:null,i=r(_$(t,n))??r(N$(t,n))??H$(e);null==i?this.setFocusedItemId(null):this.applyItemFocus(null,i),t=e})}setFocusedItemId=e=>{j$.focusedItemId(this.store.state)!==e&&this.store.set("focusedItemId",e)};applyItemFocus=(e,t)=>{this.store.items.getItemDOMElement(t)?.focus(),this.setFocusedItemId(t),this.store.parameters.onItemFocus?.(e,t)};buildPublicAPI=()=>({focusItem:this.focusItem});focusItem=(e,t)=>{const n=S$.itemMeta(this.store.state,t);n&&(null==n.parentId||C$.isItemExpanded(this.store.state,n.parentId))&&this.applyItemFocus(e,t)};removeFocusedItem=()=>{const e=j$.focusedItemId(this.store.state);if(null!=e){if(S$.itemMeta(this.store.state,e)){const t=this.store.items.getItemDOMElement(e);t&&t.blur()}this.setFocusedItemId(null)}};handleRootFocus=e=>{if(e.defaultMuiPrevented)return;const t=j$.defaultFocusableItemId(this.store.state);e.target===e.currentTarget&&null!=t&&this.applyItemFocus(e,t)};handleRootBlur=e=>{e.defaultMuiPrevented||this.setFocusedItemId(null)}}const _z=y$((e,t)=>{if(A$.isItemSelected(e,t))return"checked";let n=!1,r=!1;const i=o=>{o!==t&&(A$.isItemSelected(e,o)?n=!0:r=!0),S$.itemOrderedChildrenIds(e,o).forEach(i)};return i(t),A$.propagationRules(e).parents?n&&r?"indeterminate":n&&!r?"checked":"empty":n?"indeterminate":"empty"}),Fz=({props:e})=>{const{itemId:t}=e,{store:n}=FD(),r=uD(n,A$.isCheckboxSelectionEnabled),i=uD(n,A$.isFeatureEnabledForItem,t),o=uD(n,A$.canItemBeSelected,t),a=uD(n,_z,t);return{propsEnhancers:{root:()=>{let e;return e="checked"===a||("indeterminate"===a?"mixed":!o&&void 0),{"aria-checked":e}},checkbox:({externalEventHandlers:e,interactions:s})=>({tabIndex:-1,onChange:r=>{e.onChange?.(r),r.defaultMuiPrevented||A$.canItemBeSelected(n.state,t)&&s.handleCheckboxSelection(r)},visible:r&&i,disabled:!o,checked:"checked"===a,indeterminate:"indeterminate"===a})}}};class Hz{lastSelectedItem=null;lastSelectedRange={};constructor(e){this.store=e,e.itemPluginManager.register(Fz,null)}setSelectedItems=(e,t,n)=>{const{selectionPropagation:r=ND,selectedItems:i,onItemSelectionToggle:o,onSelectedItemsChange:a}=this.store.parameters,s=A$.selectedItemsRaw(this.store.state);let l;const c=A$.isMultiSelectEnabled(this.store.state);if(l=c&&(r.descendants||r.parents)?function({store:e,selectionPropagation:t,newModel:n,oldModel:r,additionalItemsToPropagate:i}){if(!t.descendants&&!t.parents)return n;let o=!1;const a=Vz(n),s=Bz({store:e,newModel:n,oldModel:r});return i?.forEach(e=>{a[e]?s.added.includes(e)||s.added.push(e):s.removed.includes(e)||s.removed.push(e)}),s.added.forEach(n=>{if(t.descendants){const t=r=>{r!==n&&(o=!0,a[r]=!0),S$.itemOrderedChildrenIds(e.state,r).forEach(t)};t(n)}if(t.parents){const t=n=>!!a[n]&&S$.itemOrderedChildrenIds(e.state,n).every(t),r=n=>{const i=S$.itemParentId(e.state,n);null!=i&&S$.itemOrderedChildrenIds(e.state,i).every(t)&&(o=!0,a[i]=!0,r(i))};r(n)}}),s.removed.forEach(n=>{if(t.parents){let t=S$.itemParentId(e.state,n);for(;null!=t;)a[t]&&(o=!0,delete a[t]),t=S$.itemParentId(e.state,t)}if(t.descendants){const t=r=>{r!==n&&(o=!0,delete a[r]),S$.itemOrderedChildrenIds(e.state,r).forEach(t)};t(n)}}),o?Object.keys(a):n}({store:this.store,selectionPropagation:r,newModel:t,oldModel:s,additionalItemsToPropagate:n}):t,o)if(c){const t=Bz({store:this.store,newModel:l,oldModel:s});o&&(t.added.forEach(t=>{o(e,t,!0)}),t.removed.forEach(t=>{o(e,t,!1)}))}else l!==s&&(null!=s&&o(e,s,!1),null!=l&&o(e,l,!0));void 0===i&&this.store.set("selectedItems",l),a?.(e,l)};selectRange=(e,[t,n])=>{if(!A$.isMultiSelectEnabled(this.store.state))return;let r=A$.selectedItems(this.store.state).slice();Object.keys(this.lastSelectedRange).length>0&&(r=r.filter(e=>!this.lastSelectedRange[e]));const i=Vz(r),o=((e,t,n)=>{const r=t=>{if(C$.isItemExpandable(e,t)&&C$.isItemExpanded(e,t))return S$.itemOrderedChildrenIds(e,t)[0];let n=S$.itemMeta(e,t);for(;null!=n;){const t=S$.itemOrderedChildrenIds(e,n.parentId),r=S$.itemIndex(e,n.id);if(rA$.isItemSelectable(this.store.state,e)),a=o.filter(e=>!i[e]);r=r.concat(a),this.setSelectedItems(e,r),this.lastSelectedRange=Vz(o)};buildPublicAPI=()=>({setItemSelection:this.setItemSelection});setItemSelection=({itemId:e,event:t=null,keepExistingSelection:n=!1,shouldBeSelected:r})=>{if(!A$.enabled(this.store.state))return;let i;const o=A$.isMultiSelectEnabled(this.store.state);if(n){const t=A$.selectedItems(this.store.state),n=A$.isItemSelected(this.store.state,e);i=!n||!1!==r&&null!=r?n||!0!==r&&null!=r?t:[e].concat(t):t.filter(t=>t!==e)}else i=!1===r||null==r&&A$.isItemSelected(this.store.state,e)?o?[]:null:o?[e]:e;this.setSelectedItems(t,i,[e]),this.lastSelectedItem=e,this.lastSelectedRange={}};selectAllNavigableItems=e=>{if(!A$.isMultiSelectEnabled(this.store.state))return;const t=(e=>{let t=H$(e);const n=[];for(;null!=t;)n.push(t),t=_$(e,t);return n})(this.store.state);this.setSelectedItems(e,t),this.lastSelectedRange=Vz(t)};expandSelectionRange=(e,t)=>{if(null!=this.lastSelectedItem){const[n,r]=B$(this.store.state,t,this.lastSelectedItem);this.selectRange(e,[n,r])}};selectRangeFromStartToItem=(e,t)=>{this.selectRange(e,[H$(this.store.state),t])};selectRangeFromItemToEnd=(e,t)=>{this.selectRange(e,[t,F$(this.store.state)])};selectItemFromArrowNavigation=(e,t,n)=>{if(!A$.isMultiSelectEnabled(this.store.state))return;let r=A$.selectedItems(this.store.state).slice();0===Object.keys(this.lastSelectedRange).length?(r.push(n),this.lastSelectedRange={[t]:!0,[n]:!0}):(this.lastSelectedRange[t]||(this.lastSelectedRange={}),this.lastSelectedRange[n]?(r=r.filter(e=>e!==t),delete this.lastSelectedRange[t]):(r.push(n),this.lastSelectedRange[n]=!0)),this.setSelectedItems(e,r)}}function Bz({store:e,oldModel:t,newModel:n}){const r=new Map;return n.forEach(e=>{r.set(e,!0)}),{added:n.filter(t=>!A$.isItemSelected(e.state,t)),removed:t.filter(e=>!r.has(e))}}function Vz(e){const t={};return e.forEach(e=>{t[e]=!0}),t}class Uz{constructor(e){this.store=e}setExpandedItems=(e,t)=>{void 0===this.store.parameters.expandedItems&&this.store.set("expandedItems",t),this.store.parameters.onExpandedItemsChange?.(e,t)};isItemExpanded=e=>C$.isItemExpanded(this.store.state,e);buildPublicAPI=()=>({isItemExpanded:this.isItemExpanded,setItemExpansion:this.setItemExpansion});setItemExpansion=({itemId:e,event:t=null,shouldBeExpanded:n})=>{const r=C$.isItemExpanded(this.store.state,e),i=n??!r;if(r===i)return;const o={isExpansionPrevented:!1,shouldBeExpanded:i,itemId:e};this.store.publishEvent("beforeItemToggleExpansion",o,t),o.isExpansionPrevented||this.applyItemExpansion({itemId:e,event:t,shouldBeExpanded:i})};applyItemExpansion=({itemId:e,event:t,shouldBeExpanded:n})=>{const r=C$.expandedItemsRaw(this.store.state);let i;i=n?[e].concat(r):r.filter(t=>t!==e),this.store.parameters.onItemExpansionToggle?.(t,e,n),this.setExpandedItems(t,i)};expandAllSiblings=(e,t)=>{const n=S$.itemMeta(this.store.state,t);if(null==n)return;const r=S$.itemOrderedChildrenIds(this.store.state,n.parentId).filter(e=>C$.isItemExpandable(this.store.state,e)&&!C$.isItemExpanded(this.store.state,e)),i=C$.expandedItemsRaw(this.store.state).concat(r);r.length>0&&(this.store.parameters.onItemExpansionToggle&&r.forEach(t=>{this.store.parameters.onItemExpansionToggle(e,t,!0)}),this.setExpandedItems(e,i))};addExpandableItems=e=>{const t=l({},this.store.state.itemMetaLookup);for(const n of e)t[n]=l({},t[n],{expandable:!0});this.store.set("itemMetaLookup",t)}}class Yz{itemPlugins=[];itemWrappers=[];register=(e,t)=>{this.itemPlugins.push(e),t&&this.itemWrappers.push(t)};listPlugins=()=>this.itemPlugins;listWrappers=()=>this.itemWrappers}class Wz extends Ez{initialParameters=null;eventManager=(()=>new Tz)();timeoutManager=(()=>new Dz)();itemPluginManager=(()=>new Yz)();constructor(e,t,n){const r=function(e){return l({treeId:void 0,focusedItemId:null},jz(e),Oz.buildItemsStateIfNeeded(e),{expandedItems:Lz(e.expandedItems,e.defaultExpandedItems,[]),selectedItems:Lz(e.selectedItems,e.defaultSelectedItems,e.multiSelect?zD:null)})}(e);super(n.getInitialState(r,e)),this.parameters=e,this.instanceName=t,this.mapper=n,this.items=new Oz(this),this.focus=new Nz(this),this.expansion=new Uz(this),this.selection=new Hz(this),this.keyboardNavigation=new $z(this)}buildPublicAPI(){return l({},this.items.buildPublicAPI(),this.focus.buildPublicAPI(),this.expansion.buildPublicAPI(),this.selection.buildPublicAPI())}updateStateFromParameters(e){const t=(t,n,r)=>{void 0!==e[n]&&(t[n]=e[n])},n=jz(e);t(n,"expandedItems"),t(n,"selectedItems"),this.state.providedTreeId===e.id&&void 0!==this.state.treeId||(n.treeId=(Rz+=1,`mui-tree-view-${Rz}`)),!this.mapper.shouldIgnoreItemsStateUpdate(e)&&Oz.shouldRebuildItemsState(e,this.parameters)&&Object.assign(n,Oz.buildItemsStateIfNeeded(e));const r=this.mapper.updateStateFromParameters(n,e,t);this.update(r),this.parameters=e}disposeEffect=()=>this.timeoutManager.clearAll;shouldIgnoreItemsStateUpdate=()=>this.mapper.shouldIgnoreItemsStateUpdate(this.parameters);registerStoreEffect=(e,t)=>{let n=e(this.state);this.subscribe(r=>{const i=e(r);i!==n&&(t(n,i),n=i)})};publishEvent=(e,t,n)=>{(function(e){return void 0!==e?.isPropagationStopped})(n)&&n.isPropagationStopped()||this.eventManager.emit(e,t,n)};subscribeEvent=(e,t)=>{this.eventManager.on(e,t)}}const Gz=e=>({isItemEditable:e.isItemEditable??!1}),Kz={getInitialState:(e,t)=>l({},e,Gz(t),{editedItemId:null,lazyLoadedItems:null}),updateStateFromParameters:(e,t)=>l({},e,Gz(t)),shouldIgnoreItemsStateUpdate:()=>!1};class qz extends Wz{labelEditing=(()=>new Pz(this))();static rawMapper=(()=>Kz)();buildPublicAPI(){return l({},super.buildPublicAPI(),this.labelEditing.buildPublicAPI())}}class Xz extends qz{constructor(e){super(e,"RichTreeView",Kz)}}const Zz=$D(),Jz=bm("ul",{name:"MuiRichTreeView",slot:"Root"})({padding:0,margin:0,listStyle:"none",outline:0,position:"relative"}),Qz=e.forwardRef(function(t,n){const r=Zz({props:t,name:"MuiRichTreeView"}),{slots:i,slotProps:o,apiRef:a,parameters:s,forwardedProps:c}=function(t){const{apiRef:n,slots:r,slotProps:i,disabledItemsFocusable:o,items:a,isItemDisabled:s,isItemSelectionDisabled:l,getItemLabel:c,getItemChildren:u,getItemId:d,onItemClick:p,itemChildrenIndentation:h,id:m,expandedItems:f,defaultExpandedItems:g,onExpandedItemsChange:y,onItemExpansionToggle:v,expansionTrigger:b,disableSelection:x,selectedItems:I,defaultSelectedItems:w,multiSelect:k,checkboxSelection:S,selectionPropagation:M,onSelectedItemsChange:C,onItemSelectionToggle:P,onItemFocus:E,onItemLabelChange:T,isItemEditable:A}=t,O=tt(t,wz);return{apiRef:n,slots:r,slotProps:i,parameters:e.useMemo(()=>({disabledItemsFocusable:o,items:a,isItemDisabled:s,isItemSelectionDisabled:l,getItemLabel:c,getItemChildren:u,getItemId:d,onItemClick:p,itemChildrenIndentation:h,id:m,expandedItems:f,defaultExpandedItems:g,onExpandedItemsChange:y,onItemExpansionToggle:v,expansionTrigger:b,disableSelection:x,selectedItems:I,defaultSelectedItems:w,multiSelect:k,checkboxSelection:S,selectionPropagation:M,onSelectedItemsChange:C,onItemSelectionToggle:P,onItemFocus:E,onItemLabelChange:T,isItemEditable:A}),[o,a,s,l,c,u,d,p,h,m,f,g,y,v,b,x,I,w,k,S,M,C,P,E,T,A]),forwardedProps:O}}(r),u=Mz(Xz,s),d=e.useRef(null),p=Iz(u,c,sD(n,d)),h=(t=>{const{classes:n}=t;return e.useMemo(()=>MD({root:["root"],item:["item"],itemContent:["itemContent"],itemGroupTransition:["itemGroupTransition"],itemIconContainer:["itemIconContainer"],itemLabel:["itemLabel"],itemLabelInput:["itemLabelInput"],itemCheckbox:["itemCheckbox"]},DD,n),[n])})(r),m=uD(u,L$.isItemLoading,null),f=uD(u,L$.itemError,null),g=i?.root??Jz,y=TD({elementType:g,externalSlotProps:o?.root,className:h.root,getSlotProps:p,ownerState:r});return m?(0,O.jsx)(Nv,{children:"Loading..."}):f?(0,O.jsx)(SD,{severity:"error",children:f.message}):(0,O.jsx)(VD,{store:u,classes:h,slots:i,slotProps:o,apiRef:a,rootRef:d,children:(0,O.jsx)($$.Provider,{value:S$.itemDepth,children:(0,O.jsx)(g,l({},y,{children:(0,O.jsx)(xz,{slots:i,slotProps:o})}))})})}),eN=ob((0,O.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),tN=ob((0,O.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),nN=ob((0,O.jsx)("path",{d:"M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"Folder"),rN=ob((0,O.jsx)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 12H4V8h16z"}),"FolderOpen"),iN=ob((0,O.jsx)("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z"}),"InsertDriveFile"),oN=ob((0,O.jsx)("path",{d:"M19 13H5v-2h14z"}),"Remove"),aN=ob((0,O.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),sN=ob((0,O.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),lN=ob((0,O.jsx)("path",{d:"m10 17 5-5-5-5z"}),"ArrowRight"),cN=ob((0,O.jsx)("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3z"}),"AccountTree"),uN=ob((0,O.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),dN=ob((0,O.jsx)("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"}),"Code"),pN=ob((0,O.jsx)("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),hN=ob((0,O.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),mN=ob((0,O.jsx)("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home"),fN=ob((0,O.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star"),gN=ob((0,O.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),yN=ob((0,O.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),vN=ob((0,O.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),bN=ob((0,O.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"}),"Lock"),xN=ob((0,O.jsx)("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"}),"ShowChart"),IN=ob((0,O.jsx)("path",{d:"M4 9h4v11H4zm12 4h4v7h-4zm-6-9h4v16h-4z"}),"BarChart"),wN=ob((0,O.jsx)("path",{d:"M11 2v20c-5.07-.5-9-4.79-9-10s3.93-9.5 9-10m2.03 0v8.99H22c-.47-4.74-4.24-8.52-8.97-8.99m0 11.01V22c4.74-.47 8.5-4.25 8.97-8.99z"}),"PieChart"),kN=ob([(0,O.jsx)("circle",{cx:"7",cy:"14",r:"3"},"0"),(0,O.jsx)("circle",{cx:"11",cy:"6",r:"3"},"1"),(0,O.jsx)("circle",{cx:"16.6",cy:"17.6",r:"3"},"2")],"ScatterPlot"),SN=ob((0,O.jsx)("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M8 20H4v-4h4zm0-6H4v-4h4zm0-6H4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4z"}),"GridOn"),MN=ob((0,O.jsx)("path",{d:"M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2"}),"Timeline"),CN=ob((0,O.jsx)("path",{d:"M9 4H7v2H5v12h2v2h2v-2h2V6H9zm10 4h-2V4h-2v4h-2v7h2v5h2v-5h2z"}),"CandlestickChart"),PN=ob((0,O.jsx)("path",{d:"m20.38 8.57-1.23 1.85a8 8 0 0 1-.22 7.58H5.07A8 8 0 0 1 15.58 6.85l1.85-1.23A10 10 0 0 0 3.35 19a2 2 0 0 0 1.72 1h13.85a2 2 0 0 0 1.74-1 10 10 0 0 0-.27-10.44zm-9.79 6.84a2 2 0 0 0 2.83 0l5.66-8.49-8.49 5.66a2 2 0 0 0 0 2.83"}),"Speed"),EN=ob((0,O.jsx)("path",{d:"m11.99 18.54-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27z"}),"Layers"),TN=ob((0,O.jsx)("path",{d:"m16 6 2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"}),"TrendingUp"),AN=ob((0,O.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z"}),"History"),ON=ob((0,O.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),jN=ob((0,O.jsx)("path",{d:"M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"}),"Tune"),LN=ob((0,O.jsx)("path",{d:"M7 14c-1.66 0-3 1.34-3 3 0 1.31-1.16 2-2 2 .92 1.22 2.49 2 4 2 2.21 0 4-1.79 4-4 0-1.66-1.34-3-3-3m13.71-9.37-1.34-1.34a.996.996 0 0 0-1.41 0L9 12.25 11.75 15l8.96-8.96c.39-.39.39-1.02 0-1.41"}),"Brush"),RN=ob((0,O.jsx)("path",{d:"m6 14 3 3v5h6v-5l3-3V9H6zm5-12h2v3h-2zM3.5 5.88l1.41-1.41 2.12 2.12L5.62 8zm13.46.71 2.12-2.12 1.41 1.41L18.38 8z"}),"Highlight"),DN=ob((0,O.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z"}),"Sync"),$N=ob([(0,O.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"},"0"),(0,O.jsx)("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2z"},"1")],"ZoomIn"),zN=ob((0,O.jsx)("path",{d:"M9 11.24V7.5C9 6.12 10.12 5 11.5 5S14 6.12 14 7.5v3.74c1.21-.81 2-2.18 2-3.74C16 5.01 13.99 3 11.5 3S7 5.01 7 7.5c0 1.56.79 2.93 2 3.74m9.84 4.63-4.54-2.26c-.17-.07-.35-.11-.54-.11H13v-6c0-.83-.67-1.5-1.5-1.5S10 6.67 10 7.5v10.74c-3.6-.76-3.54-.75-3.67-.75-.31 0-.59.13-.79.33l-.79.8 4.94 4.94c.27.27.65.44 1.06.44h6.79c.75 0 1.33-.55 1.44-1.28l.75-5.27c.01-.07.02-.14.02-.2 0-.62-.38-1.16-.91-1.38"}),"TouchApp"),NN=ob((0,O.jsx)("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2M3 19c0 1.1.9 2 2 2h3V10H3z"}),"TableChart"),_N=ob((0,O.jsx)("path",{d:"M4 9h4v11H4zm0-5h4v4H4zm6 3h4v4h-4zm6 3h4v4h-4zm0 5h4v5h-4zm-6-3h4v8h-4z"}),"StackedBarChart"),FN=ob((0,O.jsx)("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10c1.38 0 2.5-1.12 2.5-2.5 0-.61-.23-1.2-.64-1.67-.08-.1-.13-.21-.13-.33 0-.28.22-.5.5-.5H16c3.31 0 6-2.69 6-6 0-4.96-4.49-9-10-9m5.5 11c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m-3-4c-.83 0-1.5-.67-1.5-1.5S13.67 6 14.5 6s1.5.67 1.5 1.5S15.33 9 14.5 9M5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S7.33 13 6.5 13 5 12.33 5 11.5m6-4c0 .83-.67 1.5-1.5 1.5S8 8.33 8 7.5 8.67 6 9.5 6s1.5.67 1.5 1.5"}),"Palette"),HN=ob((0,O.jsx)("path",{d:"M16.54 11 13 7.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41zM11 7H2v2h9zm10 6.41L19.59 12 17 14.59 14.41 12 13 13.41 15.59 16 13 18.59 14.41 20 17 17.41 19.59 20 21 18.59 18.41 16zM11 15H2v2h9z"}),"Rule"),BN=ob((0,O.jsx)("path",{d:"M13 1.07V9h7c0-4.08-3.05-7.44-7-7.93M4 15c0 4.42 3.58 8 8 8s8-3.58 8-8v-4H4zm7-13.93C7.05 1.56 4 4.92 4 9h7z"}),"Mouse"),VN=ob((0,O.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2m-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckBox"),UN=ob((0,O.jsx)("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"}),"UnfoldMore"),YN=ob((0,O.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block"),WN=ob((0,O.jsx)("path",{d:"M12.16 3h-.32L9.21 8.25h5.58zm4.3 5.25h5.16L19 3h-5.16zm4.92 1.5h-8.63V20.1zM11.25 20.1V9.75H2.62zM7.54 8.25 10.16 3H5L2.38 8.25z"}),"Diamond"),GN=ob((0,O.jsx)("path",{d:"M14.06 9.94 12 9l2.06-.94L15 6l.94 2.06L18 9l-2.06.94L15 12zM4 14l.94-2.06L7 11l-2.06-.94L4 8l-.94 2.06L1 11l2.06.94zm4.5-5 1.09-2.41L12 5.5 9.59 4.41 8.5 2 7.41 4.41 5 5.5l2.41 1.09zm-4 11.5 6-6.01 4 4L23 8.93l-1.41-1.41-7.09 7.97-4-4L3 19z"}),"AutoGraph"),KN=ob((0,O.jsx)("path",{d:"M3 14h4v-4H3zm0 5h4v-4H3zM3 9h4V5H3zm5 5h13v-4H8zm0 5h13v-4H8zM8 5v4h13V5z"}),"ViewList"),qN=ob((0,O.jsx)("path",{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7"}),"GpsFixed"),XN=ob((0,O.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),ZN=ob((0,O.jsx)("path",{d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m-9-2V7H4v3H1v2h3v3h2v-3h3v-2zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"PersonAdd"),JN=ob((0,O.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),QN=ob((0,O.jsx)("path",{d:"m20.54 5.23-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27M12 17.5 6.5 12H10v-2h4v2h3.5zM5.12 5l.81-1h12l.94 1z"}),"Archive"),e_=ob((0,O.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert");var t_={ExpandMore:eN,ChevronRight:tN,Folder:nN,FolderOpen:rN,InsertDriveFile:iN,Remove:oN,Add:aN,ArrowDropDown:sN,ArrowRight:lN,AccountTree:cN,Description:uN,Code:dN,Image:pN,Settings:hN,Home:mN,Star:fN,Delete:gN,Edit:yN,Visibility:vN,Lock:bN,ShowChart:xN,BarChart:IN,PieChart:wN,ScatterPlot:kN,GridOn:SN,Timeline:MN,CandlestickChart:CN,Speed:PN,Layers:EN,TrendingUp:TN,History:AN,PlayArrow:ON,Tune:jN,Brush:LN,Highlight:RN,Sync:DN,ZoomIn:$N,TouchApp:zN,TableChart:NN,StackedBarChart:_N,Palette:FN,Rule:HN,Mouse:BN,CheckBox:VN,UnfoldMore:UN,Block:YN,Diamond:WN,AutoGraph:GN,ViewList:KN,GpsFixed:qN,ContentCopy:XN,PersonAdd:ZN,CheckCircle:JN,Archive:QN,MoreVert:e_},n_=function(e){if(e)return t_[e]||void 0},r_=["id","items","getItemId","getItemLabel","getItemChildren","selectedItems","defaultSelectedItems","multiSelect","checkboxSelection","disableSelection","selectionPropagation","expandedItems","defaultExpandedItems","expansionTrigger","isItemEditable","editableItems","disabledItems","disabledItemsFocusable","itemChildrenIndentation","height","sx","collapseIcon","expandIcon","endIcon","ariaLabel","ariaLabelledBy","setProps"],i_=function(t){var r=t.id,i=t.items,o=t.getItemId,a=t.getItemLabel,s=t.getItemChildren,l=t.selectedItems,c=t.defaultSelectedItems,u=t.multiSelect,d=t.checkboxSelection,p=t.disableSelection,h=t.selectionPropagation,m=t.expandedItems,f=t.defaultExpandedItems,g=t.expansionTrigger,y=t.isItemEditable,v=t.editableItems,b=t.disabledItems,x=t.disabledItemsFocusable,I=t.itemChildrenIndentation,w=t.height,k=t.sx,S=t.collapseIcon,M=t.expandIcon,C=t.endIcon,P=t.ariaLabel,E=t.ariaLabelledBy,T=t.setProps,A=(function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r0){var e=new Set(v);return function(t){return e.has(A(t))}}return!1},[y,v,A]),D=(0,e.useMemo)(function(){var e={};return S&&(e.collapseIcon=n_(S)),M&&(e.expandIcon=n_(M)),C&&(e.endIcon=n_(C)),Object.keys(e).length>0?e:void 0},[S,M,C]),$=(0,e.useCallback)(function(e,t){T&&T({selectedItems:t})},[T]),z=(0,e.useCallback)(function(e,t){T&&T({expandedItems:t})},[T]),N=(0,e.useCallback)(function(e,t){T&&T({clickedItem:{itemId:t,event_timestamp:Date.now()}})},[T]),_=(0,e.useCallback)(function(e,t){T&&T({focusedItem:{itemId:t,event_timestamp:Date.now()}})},[T]),F=(0,e.useCallback)(function(e,t){T&&T({editedItemLabel:{itemId:e,newLabel:t,event_timestamp:Date.now()}})},[T]),H=(0,e.useMemo)(function(){var e={};return w&&(e.height="number"==typeof w?"".concat(w,"px"):w),e},[w]);return n().createElement("div",{id:r,style:H},n().createElement(Qz,{items:i||[],getItemId:A,getItemLabel:O,getItemChildren:j,selectedItems:l,defaultSelectedItems:c,multiSelect:u,checkboxSelection:d,disableSelection:p,selectionPropagation:h,expandedItems:m,defaultExpandedItems:f,expansionTrigger:g,isItemEditable:R,isItemDisabled:L,disabledItemsFocusable:x,itemChildrenIndentation:I,sx:k,slots:D,onSelectedItemsChange:$,onExpandedItemsChange:z,onItemClick:N,onItemFocus:_,onItemLabelChange:F,"aria-label":P,"aria-labelledby":E}))};i_.defaultProps={items:[],getItemId:"id",getItemLabel:"label",getItemChildren:"children",multiSelect:!1,checkboxSelection:!1,disableSelection:!1,disabledItemsFocusable:!1,isItemEditable:!1,expansionTrigger:"content",itemChildrenIndentation:"12px"},i_.propTypes={id:i().string,items:i().arrayOf(i().object),getItemId:i().string,getItemLabel:i().string,getItemChildren:i().string,selectedItems:i().oneOfType([i().string,i().arrayOf(i().string)]),defaultSelectedItems:i().oneOfType([i().string,i().arrayOf(i().string)]),multiSelect:i().bool,checkboxSelection:i().bool,disableSelection:i().bool,selectionPropagation:i().exact({parents:i().bool,descendants:i().bool}),expandedItems:i().arrayOf(i().string),defaultExpandedItems:i().arrayOf(i().string),expansionTrigger:i().oneOf(["content","iconContainer"]),isItemEditable:i().bool,editableItems:i().arrayOf(i().string),disabledItems:i().arrayOf(i().string),disabledItemsFocusable:i().bool,itemChildrenIndentation:i().oneOfType([i().number,i().string]),height:i().oneOfType([i().number,i().string]),sx:i().object,collapseIcon:i().string,expandIcon:i().string,endIcon:i().string,ariaLabel:i().string,ariaLabelledBy:i().string,clickedItem:i().exact({itemId:i().string,event_timestamp:i().number}),focusedItem:i().exact({itemId:i().string,event_timestamp:i().number}),editedItemLabel:i().exact({itemId:i().string,newLabel:i().string,event_timestamp:i().number}),setProps:i().func};const o_=i_;function a_(e){return LD("MuiSimpleTreeView",e)}RD("MuiSimpleTreeView",["root","item","itemContent","itemGroupTransition","itemIconContainer","itemLabel","itemCheckbox"]);const s_=["apiRef","slots","slotProps","disabledItemsFocusable","onItemClick","itemChildrenIndentation","id","expandedItems","defaultExpandedItems","onExpandedItemsChange","onItemExpansionToggle","expansionTrigger","disableSelection","selectedItems","defaultSelectedItems","multiSelect","checkboxSelection","selectionPropagation","onSelectedItemsChange","onItemSelectionToggle","onItemFocus"],l_=e.createContext(null);function c_(t){const{children:n,itemId:r=null,idAttribute:i}=t,{store:o,rootRef:a}=FD(),s=e.useRef(new Map);e.useEffect(()=>{if(!a.current)return;const e=S$.itemOrderedChildrenIds(o.state,r??null)??[],t=(i??a.current.id).replace(/["\\]/g,"\\$&");if(null!=r){const e=a.current.querySelector(`*[id="${t}"][role="treeitem"]`);if(e&&"false"===e.getAttribute("aria-expanded"))return}const n=a.current.querySelectorAll(`${null==r?"":`*[id="${t}"] `}[role="treeitem"]:not(*[id="${t}"] [role="treeitem"] [role="treeitem"])`),l=Array.from(n).map(e=>s.current.get(e.id));(l.length!==e.length||l.some((t,n)=>t!==e[n]))&&o.jsxItems.setJSXItemsOrderedChildrenIds(r??null,l)});const l=e.useMemo(()=>({registerChild:(e,t)=>s.current.set(e,t),unregisterChild:e=>s.current.delete(e),parentId:r}),[r]);return(0,O.jsx)(l_.Provider,{value:l,children:n})}const u_=({props:t,rootRef:n,contentRef:r})=>{const{store:i}=FD(),{children:o,disabled:a=!1,disableSelection:s=!1,label:l,itemId:c,id:u}=t,d=e.useContext(l_);if(null==d)throw new Error(["MUI X: Could not find the Tree View Children Item context.","It looks like you rendered your component outside of a SimpleTreeView parent component.","This can also happen if you are bundling multiple versions of the Tree View."].join("\n"));const{registerChild:p,unregisterChild:h,parentId:m}=d,f=D$(o),g=e.useRef(null),y=sD(g,r),v=uD(i,Y$.treeItemIdAttribute,c,u),b=e.useRef(!0),x=aD(Symbol);return kz(()=>(p(v,c),()=>{h(v),h(v)}),[i,p,h,v,c]),kz(()=>(b.current=!0,()=>{b.current=!1}),[]),kz(()=>{const e=i.jsxItems.upsertJSXItem({id:c,idAttribute:u,parentId:m,expandable:f,disabled:a,selectable:!s},x.current);return()=>{b.current||e()}},[i,m,c,f,a,s,u,x]),e.useEffect(()=>{if(l)return i.jsxItems.mapLabelFromJSX(c,(g.current?.textContent??"").toLowerCase())},[i,c,l]),{contentRef:y,rootRef:n}},d_=({children:t,itemId:n,idAttribute:r})=>{const i=e.useContext($$);return(0,O.jsx)(c_,{itemId:n,idAttribute:r,children:(0,O.jsx)($$.Provider,{value:i+1,children:t})})};class p_{itemOwners=(()=>new Map)();constructor(e){this.store=e,e.itemPluginManager.register(u_,d_)}upsertJSXItem=(e,t)=>{const n=this.itemOwners.get(e.id);if(null!=n&&n!==t)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.",`Two items were provided with the same id in the \`items\` prop: "${e.id}"`].join("\n"));this.itemOwners.set(e.id,t);const r=S$.itemMeta(this.store.state,e.id);if(null!=r){let t=!1;for(const n of Object.keys(e))if(r[n]!==e[n]){t=!0;break}t&&this.store.update({itemMetaLookup:l({},this.store.state.itemMetaLookup,{[e.id]:l({},r,e)})})}else this.store.update({itemMetaLookup:l({},this.store.state.itemMetaLookup,{[e.id]:e}),itemModelLookup:l({},this.store.state.itemModelLookup,{[e.id]:{id:e.id,label:e.label??""}})});return()=>{this.itemOwners.delete(e.id);const t=l({},this.store.state.itemMetaLookup),n=l({},this.store.state.itemModelLookup);delete t[e.id],delete n[e.id],this.store.update({itemMetaLookup:t,itemModelLookup:n})}};mapLabelFromJSX=(e,t)=>(this.store.keyboardNavigation.updateLabelMap(n=>(n[e]=t,n)),()=>{this.store.keyboardNavigation.updateLabelMap(t=>{const n=l({},t);return delete n[e],n})});setJSXItemsOrderedChildrenIds=(e,t)=>{const n=e??b$;this.store.update({itemOrderedChildrenIdsLookup:l({},this.store.state.itemOrderedChildrenIdsLookup,{[n]:t}),itemChildrenIndexesLookup:l({},this.store.state.itemChildrenIndexesLookup,{[n]:x$(t)})})}}const h_={getInitialState:e=>e,updateStateFromParameters:e=>e,shouldIgnoreItemsStateUpdate:()=>!0};class m_ extends Wz{jsxItems=(()=>new p_(this))();constructor(e){super(l({},e,{items:zD}),"SimpleTreeView",h_)}updateStateFromParameters(e){super.updateStateFromParameters(l({},e,{items:zD}))}}const f_=$D(),g_=bm("ul",{name:"MuiSimpleTreeView",slot:"Root"})({padding:0,margin:0,listStyle:"none",outline:0,position:"relative"}),y_=e.forwardRef(function(t,n){const r=f_({props:t,name:"MuiSimpleTreeView"}),{slots:i,slotProps:o,apiRef:a,parameters:s,forwardedProps:c}=function(t){const{apiRef:n,slots:r,slotProps:i,disabledItemsFocusable:o,onItemClick:a,itemChildrenIndentation:s,id:l,expandedItems:c,defaultExpandedItems:u,onExpandedItemsChange:d,onItemExpansionToggle:p,expansionTrigger:h,disableSelection:m,selectedItems:f,defaultSelectedItems:g,multiSelect:y,checkboxSelection:v,selectionPropagation:b,onSelectedItemsChange:x,onItemSelectionToggle:I,onItemFocus:w}=t,k=tt(t,s_);return{apiRef:n,slots:r,slotProps:i,parameters:e.useMemo(()=>({disabledItemsFocusable:o,onItemClick:a,itemChildrenIndentation:s,id:l,expandedItems:c,defaultExpandedItems:u,onExpandedItemsChange:d,onItemExpansionToggle:p,expansionTrigger:h,disableSelection:m,selectedItems:f,defaultSelectedItems:g,multiSelect:y,checkboxSelection:v,selectionPropagation:b,onSelectedItemsChange:x,onItemSelectionToggle:I,onItemFocus:w}),[o,a,s,l,c,u,d,p,h,m,f,g,y,v,b,x,I,w]),forwardedProps:k}}(r),u=Mz(m_,s),d=e.useRef(null),p=Iz(u,c,sD(n,d)),h=(t=>{const{classes:n}=t;return e.useMemo(()=>MD({root:["root"],item:["item"],itemContent:["itemContent"],itemGroupTransition:["itemGroupTransition"],itemIconContainer:["itemIconContainer"],itemLabel:["itemLabel"],itemCheckbox:["itemCheckbox"]},a_,n),[n])})(r),m=i?.root??g_,f=TD({elementType:m,externalSlotProps:o?.root,className:h.root,getSlotProps:p,ownerState:r});return(0,O.jsx)(VD,{store:u,classes:h,slots:i,slotProps:o,apiRef:a,rootRef:d,children:(0,O.jsx)(c_,{itemId:null,idAttribute:null,children:(0,O.jsx)($$.Provider,{value:0,children:(0,O.jsx)(m,l({},f))})})})});var v_=function(e){return e&&0!==e.length?e.map(function(e){var t=e.icon?n_(e.icon):null,r=t?n().createElement("span",{style:{display:"flex",alignItems:"center",gap:8}},n().createElement(t,{style:{fontSize:18,opacity:.7,flexShrink:0}}),n().createElement("span",null,e.label)):e.label;return n().createElement(mz,{key:e.itemId,itemId:e.itemId,label:r,disabled:e.disabled,disableSelection:e.disableSelection},v_(e.children))}):null},b_=function(t){var r=t.id,i=t.items,o=void 0===i?[]:i,a=t.selectedItems,s=t.defaultSelectedItems,l=t.multiSelect,c=void 0!==l&&l,u=t.checkboxSelection,d=void 0!==u&&u,p=t.disableSelection,h=void 0!==p&&p,m=t.expandedItems,f=t.defaultExpandedItems,g=t.expansionTrigger,y=void 0===g?"content":g,v=t.disabledItemsFocusable,b=void 0!==v&&v,x=t.itemChildrenIndentation,I=void 0===x?"12px":x,w=t.height,k=t.sx,S=t.collapseIcon,M=t.expandIcon,C=t.endIcon,P=t.ariaLabel,E=t.ariaLabelledBy,T=t.setProps,A=(0,e.useMemo)(function(){var e={};return S&&(e.collapseIcon=n_(S)),M&&(e.expandIcon=n_(M)),C&&(e.endIcon=n_(C)),Object.keys(e).length>0?e:void 0},[S,M,C]),O=(0,e.useCallback)(function(e,t){T&&T({selectedItems:t})},[T]),j=(0,e.useCallback)(function(e,t){T&&T({expandedItems:t})},[T]),L=(0,e.useCallback)(function(e,t){T&&T({clickedItem:{itemId:t,event_timestamp:Date.now()}})},[T]),R=(0,e.useMemo)(function(){var e={};return w&&(e.height="number"==typeof w?"".concat(w,"px"):w),e},[w]);return n().createElement("div",{id:r,style:R},n().createElement(y_,{selectedItems:a,defaultSelectedItems:s,multiSelect:c,checkboxSelection:d,disableSelection:h,expandedItems:m,defaultExpandedItems:f,expansionTrigger:y,disabledItemsFocusable:b,itemChildrenIndentation:I,sx:k,slots:A,onSelectedItemsChange:O,onExpandedItemsChange:j,onItemClick:L,"aria-label":P,"aria-labelledby":E},v_(o)))};b_.propTypes={id:i().string,items:i().arrayOf(i().shape({itemId:i().string.isRequired,label:i().string.isRequired,children:i().array,disabled:i().bool,disableSelection:i().bool})),selectedItems:i().oneOfType([i().string,i().arrayOf(i().string)]),defaultSelectedItems:i().oneOfType([i().string,i().arrayOf(i().string)]),multiSelect:i().bool,checkboxSelection:i().bool,disableSelection:i().bool,expandedItems:i().arrayOf(i().string),defaultExpandedItems:i().arrayOf(i().string),expansionTrigger:i().oneOf(["content","iconContainer"]),disabledItemsFocusable:i().bool,itemChildrenIndentation:i().oneOfType([i().number,i().string]),height:i().oneOfType([i().number,i().string]),sx:i().object,collapseIcon:i().string,expandIcon:i().string,endIcon:i().string,ariaLabel:i().string,ariaLabelledBy:i().string,clickedItem:i().exact({itemId:i().string,event_timestamp:i().number}),setProps:i().func};const x_=b_,I_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",w_=e=>{let t,n,r,i,o,a,s,l="",c=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");c>4,n=(15&o)<<4|a>>2,r=(3&a)<<6|s,l+=String.fromCharCode(t),64!=a&&(l+=String.fromCharCode(n)),64!=s&&(l+=String.fromCharCode(r));return l},k_=[];let S_=0;for(;S_<64;)k_[S_]=0|4294967296*Math.sin(++S_%Math.PI);let M_=function(e){return e.NotFound="NotFound",e.Invalid="Invalid",e.ExpiredAnnual="ExpiredAnnual",e.ExpiredAnnualGrace="ExpiredAnnualGrace",e.ExpiredVersion="ExpiredVersion",e.Valid="Valid",e.OutOfScope="OutOfScope",e.NotAvailableInInitialProPlan="NotAvailableInInitialProPlan",e}({});const C_=["pro","premium"],P_=["perpetual","annual","subscription"],E_=/^.*EXPIRY=([0-9]+),.*$/,T_=/^.*ORDER:([0-9]+),.*$/,A_=["x-data-grid-pro","x-date-pickers-pro"];function O_({releaseInfo:e,licenseKey:t,packageName:n}){if(!e)throw new Error("MUI X: The release information is missing. Not able to validate license.");if(!t)return{status:M_.NotFound};const r=t.substr(0,32),i=t.substr(32);if(r!==function(e){const t=[];let n,r,i,o=unescape(encodeURI(e))+"€",a=o.length;const s=[n=1732584193,r=4023233417,~n,~r];for(e=--a/4+2|15,t[--e]=8*a;~a;)t[a>>2]|=o.charCodeAt(a)<<8*a--;for(S_=o=0;S_>4]+k_[o]+~~t[S_|15&[o,5*o+1,3*o+5,7*o][a]])<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+o++%4])|i>>>-a),n,r])n=0|a[1],r=a[2];for(o=4;o;)s[--o]+=a[o]}for(e="";o<32;)e+=(s[o>>3]>>4*(1^o++)&15).toString(16);return e}(i))return{status:M_.Invalid};const o=function(e){const t=w_(e);return t.includes("KEYVERSION=1")?function(e){let t,n;try{t=parseInt(e.match(E_)[1],10),t&&!Number.isNaN(t)||(t=null),n=parseInt(e.match(T_)[1],10),n&&!Number.isNaN(n)||(n=null)}catch(e){t=null,n=null}return{version:1,licenseModel:"perpetual",planScope:"pro",planVersion:"initial",expiryTimestamp:t,expiryDate:t?new Date(t):null,orderId:n}}(t):t.includes("KV=2")?function(e){const t={version:2,licenseModel:null,planScope:null,planVersion:"initial",expiryTimestamp:null,expiryDate:null,orderId:null};return e.split(",").map(e=>e.split("=")).filter(e=>2===e.length).forEach(([e,n])=>{if("S"===e&&(t.planScope=n),"LM"===e&&(t.licenseModel=n),"E"===e){const e=parseInt(n,10);e&&!Number.isNaN(e)&&(t.expiryTimestamp=e,t.expiryDate=new Date(e))}if("PV"===e&&(t.planVersion=n),"O"===e){const e=parseInt(n,10);e&&!Number.isNaN(e)&&(t.orderId=e)}}),t}(t):null}(i);if(null==o)return console.error("MUI X: Error checking license. Key version not found!"),{status:M_.Invalid};if(null==o.licenseModel||!P_.includes(o.licenseModel))return console.error("MUI X: Error checking license. License model not found or invalid!"),{status:M_.Invalid};if(null==o.expiryTimestamp)return console.error("MUI X: Error checking license. Expiry timestamp not found or invalid!"),{status:M_.Invalid};o.licenseModel;{const t=parseInt(w_(e),10);if(Number.isNaN(t))throw new Error("MUI X: The release information is invalid. Not able to validate license.");if(o.expiryTimestamp{const e=r??j_.getLicenseKey();if($_[t]&&$_[t].key===e)return $_[t].licenseVerifier;const i=t.includes("premium")?"Premium":"Pro",o=O_({releaseInfo:n,licenseKey:e,packageName:t}),a=`@mui/${t}`;return p(h.licenseVerification({licenseKey:e},{packageName:t,packageReleaseInfo:n,licenseStatus:o?.status})),o.status===M_.Valid||(o.status===M_.Invalid?R_(["MUI X: Invalid license key.","","Your MUI X license key format isn't valid. It could be because the license key is missing a character or has a typo.","","To solve the issue, you need to double check that `setLicenseKey()` is called with the right argument","Please check the license key installation https://mui.com/r/x-license-key-installation."]):o.status===M_.NotAvailableInInitialProPlan?R_(["MUI X: Component not included in your license.","","The component you are trying to use is not included in the Pro Plan you purchased.","","Your license is from an old version of the Pro Plan that is only compatible with the `@mui/x-data-grid-pro` and `@mui/x-date-pickers-pro` commercial packages.","","To start using another Pro package, please consider reaching to our sales team to upgrade your license or visit https://mui.com/r/x-get-license to get a new license key."]):o.status===M_.OutOfScope?function({packageName:e}){const t=e.replace(/-(premium|pro)$/,"");R_(["MUI X: License key plan mismatch.","","Your use of MUI X is not compatible with the plan of your license key. The feature you are trying to use is not included in the plan of your license key. This happens if you try to use Data Grid Premium with a license key for the Pro plan.","","To solve the issue, you can upgrade your plan from Pro to Premium at https://mui.com/r/x-get-license?scope=premium.",`Or if you didn't intend to use Premium features, you can replace the import of \`${t}-premium\` with \`${t}-pro\`.`])}({packageName:a}):o.status===M_.NotFound?function({plan:e,packageName:t}){R_(["MUI X: Missing license key.","",`The license key is missing. You might not be allowed to use \`${t}\` which is part of MUI X ${e}.`,"","To solve the issue, you can check the free trial conditions: https://mui.com/r/x-license-trial.","If you are eligible no actions are required. If you are not eligible to the free trial, you need to purchase a license https://mui.com/r/x-get-license or stop using the software immediately."])}({plan:i,packageName:a}):o.status===M_.ExpiredAnnualGrace?function({plan:e,licenseKey:t,expiryTimestamp:n}){R_(["MUI X: Expired license key.","",`Your annual license key to use MUI X ${e} in non-production environments has expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${e} component (more details in https://mui.com/r/x-license-annual).`,"","To solve the problem you can either:","","- Renew your license https://mui.com/r/x-get-license and use the new key",`- Stop making changes to code depending directly or indirectly on MUI X ${e}'s APIs`,"","Note that your license is perpetual in production environments with any version released before your license term ends.","",`- License key expiry timestamp: ${new Date(n)}`,`- Installed license key: ${t}`,""])}(l({plan:i},o.meta)):o.status===M_.ExpiredAnnual?function({plan:e,licenseKey:t,expiryTimestamp:n}){throw new Error(["MUI X: Expired license key.","",`Your annual license key to use MUI X ${e} in non-production environments has expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${e} component (more details in https://mui.com/r/x-license-annual).`,"","To solve the problem you can either:","","- Renew your license https://mui.com/r/x-get-license and use the new key",`- Stop making changes to code depending directly or indirectly on MUI X ${e}'s APIs`,"","Note that your license is perpetual in production environments with any version released before your license term ends.","",`- License key expiry timestamp: ${new Date(n)}`,`- Installed license key: ${t}`,""].join("\n"))}(l({plan:i},o.meta)):o.status===M_.ExpiredVersion&&function({packageName:e}){R_(["MUI X: Expired package version.","",`You have installed a version of \`${e}\` that is outside of the maintenance plan of your license key. By default, commercial licenses provide access to new versions released during the first year after the purchase.`,"","To solve the issue, you can renew your license https://mui.com/r/x-get-license or install an older version of the npm package that is compatible with your license key."])}({packageName:a})),$_[t]={key:e,licenseVerifier:o},o},[t,n,r])}const N_=Object.is;function __(e,t){if(e===t)return!0;if(!(e instanceof Object&&t instanceof Object))return!1;let n=0,r=0;for(const r in e){if(n+=1,!N_(e[r],t[r]))return!1;if(!(r in t))return!1}for(const e in t)r+=1;return n===r}function F_(e){switch(e){case M_.ExpiredAnnualGrace:case M_.ExpiredAnnual:return"MUI X Expired license key";case M_.ExpiredVersion:return"MUI X Expired package version";case M_.Invalid:return"MUI X Invalid license key";case M_.OutOfScope:return"MUI X License key plan mismatch";case M_.NotAvailableInInitialProPlan:return"MUI X Product not covered by plan";case M_.NotFound:return"MUI X Missing license key";default:throw new Error("Unhandled MUI X license status.")}}const H_=function(t){return e.memo(t,__)}(function(e){const{packageName:t,releaseInfo:n}=e,r=z_(t,n);return r.status===M_.Valid?null:(0,O.jsx)("div",{style:{position:"absolute",pointerEvents:"none",color:"#8282829e",zIndex:1e5,width:"100%",textAlign:"center",bottom:"50%",right:0,letterSpacing:5,fontSize:24},children:F_(r.status)})}),B_=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t},V_=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=Hh(n?.className,o,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},a={...n,...i,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}({...i,...r}),s=B_(r),l=B_(i),c=t(a),u=Hh(c?.className,n?.className,o,i?.className,r?.className),d={...c?.style,...n?.style,...i?.style,...r?.style},p={...c,...n,...l,...s};return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}},U_=e=>e,Y_=(()=>{let e=U_;return{configure(t){e=t},generate:t=>e(t),reset(){e=U_}}})(),W_={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function G_(e,t,n="Mui"){const r=W_[t];return r?`${n}-${r}`:`${Y_.generate(e)}-${t}`}function K_(e){return G_("MuiRichTreeViewPro",e)}!function(e,t,n="Mui"){const r={};["root","item","itemContent","itemGroupTransition","itemIconContainer","itemLabel","itemCheckbox","itemLabelInput","itemDragAndDropOverlay","itemErrorIcon","itemLoadingIcon"].forEach(t=>{r[t]=G_(e,t,n)})}("MuiRichTreeViewPro");const q_=["apiRef","slots","slotProps","disabledItemsFocusable","items","isItemDisabled","isItemSelectionDisabled","getItemLabel","getItemChildren","getItemId","onItemClick","itemChildrenIndentation","id","expandedItems","defaultExpandedItems","onExpandedItemsChange","onItemExpansionToggle","expansionTrigger","disableSelection","selectedItems","defaultSelectedItems","multiSelect","checkboxSelection","selectionPropagation","onSelectedItemsChange","onItemSelectionToggle","onItemFocus","onItemLabelChange","isItemEditable","dataSource","dataSourceCache","itemsReordering","isItemReorderable","canMoveItemToNewPosition","onItemPositionChange"];class X_{constructor({ttl:e=3e5}){this.cache={},this.ttl=e}set(e,t){const n=Date.now()+this.ttl;this.cache[e]={value:t,expiry:n}}get(e){const t=this.cache[e];if(t)return Date.now()>t.expiry?(delete this.cache[e],-1):t.value}clear(){this.cache={}}}let Z_=function(e){return e[e.QUEUED=0]="QUEUED",e[e.PENDING=1]="PENDING",e[e.SETTLED=2]="SETTLED",e[e.UNKNOWN=3]="UNKNOWN",e}({});class J_{pendingRequests=(()=>new Set)();queuedRequests=(()=>new Set)();settledRequests=(()=>new Set)();constructor(e,t=1/0){this.lazyLoadingPlugin=e,this.maxConcurrentRequests=t}processQueue=async()=>{if(0===this.queuedRequests.size||this.pendingRequests.size>=this.maxConcurrentRequests)return;const e=Math.min(this.maxConcurrentRequests-this.pendingRequests.size,this.queuedRequests.size);if(0===e)return;const t=Array.from(this.queuedRequests),n=[];for(let r=0;r{const t={};e.forEach(e=>{this.queuedRequests.add(e),t[e]=!0}),await this.processQueue()};setRequestSettled=async e=>{this.pendingRequests.delete(e),this.settledRequests.add(e),await this.processQueue()};clear=()=>{this.queuedRequests.clear(),Array.from(this.pendingRequests).forEach(e=>this.clearPendingRequest(e))};clearPendingRequest=async e=>{this.pendingRequests.delete(e),await this.processQueue()};getRequestStatus=e=>this.pendingRequests.has(e)?Z_.PENDING:this.queuedRequests.has(e)?Z_.QUEUED:this.settledRequests.has(e)?Z_.SETTLED:Z_.UNKNOWN;getActiveRequestsCount=()=>this.pendingRequests.size+this.queuedRequests.size}const Q_={loading:{},errors:{}};class eF{nestedDataManager=(()=>new J_(this))();constructor(e){this.store=e,this.cache=e.parameters.dataSourceCache??new X_({}),null!=e.parameters.dataSource&&(this.init(),e.subscribeEvent("beforeItemToggleExpansion",this.handleBeforeItemToggleExpansion))}init=()=>{const e=this.store,t=this;(async()=>{if(e.parameters.items.length){const t=function(e,t){return Object.values(e.state.itemMetaLookup).filter(n=>!n.expandable&&0!==t.getChildrenCount(e.state.itemModelLookup[n.id])).map(e=>e.id)}(e,e.parameters.dataSource);t.length>0&&e.expansion.addExpandableItems(t)}else await t.fetchItemChildren({itemId:null});await async function n(r){const i=r.filter(t=>C$.isItemExpanded(e.state,t));if(i.length>0){const r=i.filter(t=>0===S$.itemOrderedChildrenIds(e.state,t).length);r.length>0&&await t.fetchItems(r);const o=i.flatMap(t=>S$.itemOrderedChildrenIds(e.state,t));await n(o)}}(S$.itemOrderedChildrenIds(e.state,null))})()};handleBeforeItemToggleExpansion=async(e,t)=>{this.store.parameters.dataSource&&e.shouldBeExpanded&&(e.isExpansionPrevented=!0,await this.fetchItems([e.itemId]),L$.itemHasError(this.store.state,e.itemId)||(this.store.expansion.applyItemExpansion({itemId:e.itemId,shouldBeExpanded:!0,event:t}),A$.isItemSelected(this.store.state,e.itemId)&&this.store.selection.setItemSelection({event:t,itemId:e.itemId,keepExistingSelection:!0,shouldBeSelected:!0})))};setItemLoading=(e,t)=>{if(!this.store.parameters.dataSource||!this.store.state.lazyLoadedItems)return;if(L$.isItemLoading(this.store.state,e)===t)return;const n=e??b$,r=l({},this.store.state.lazyLoadedItems.loading);!1===t?delete r[n]:r[n]=t,this.store.set("lazyLoadedItems",l({},this.store.state.lazyLoadedItems,{loading:r}))};setItemError=(e,t)=>{if(!this.store.parameters.dataSource||!this.store.state.lazyLoadedItems)return;if(L$.itemError(this.store.state,e)===t)return;const n=e??b$,r=l({},this.store.state.lazyLoadedItems.errors);null===t&&void 0!==r[n]?delete r[n]:r[n]=t,this.store.set("lazyLoadedItems",l({},this.store.state.lazyLoadedItems,{errors:r}))};buildPublicAPI=()=>({updateItemChildren:this.updateItemChildren});fetchItems=e=>this.nestedDataManager.queue(e);updateItemChildren=e=>this.fetchItemChildren({itemId:e,forceRefresh:!0});fetchItemChildren=async({itemId:e,forceRefresh:t})=>{if(!this.store.parameters.dataSource)return;const{getChildrenCount:n,getTreeItems:r}=this.store.parameters.dataSource;if(null!=e&&!S$.itemMeta(this.store.state,e))return void this.nestedDataManager.clearPendingRequest(e);null!=e||L$.isEmpty(this.store.state)||this.store.set("lazyLoadedItems",Q_);const i=e??b$;if(!t){const t=this.cache.get(i);if(void 0!==t&&-1!==t)return null!=e&&this.nestedDataManager.setRequestSettled(e),this.store.items.setItemChildren({items:t,parentId:e,getChildrenCount:n}),void this.setItemLoading(e,!1);this.setItemLoading(e,!0),-1===t&&this.store.items.removeChildren(e)}L$.itemError(this.store.state,e)&&this.setItemError(e,null);try{let t;null==e?t=await r():(t=await r(e),this.nestedDataManager.setRequestSettled(e)),this.cache.set(i,t),this.store.items.setItemChildren({items:t,parentId:e,getChildrenCount:n})}catch(n){const r=n;this.setItemError(e,r),t&&this.store.items.removeChildren(e)}finally{this.setItemLoading(e,!1),null!=e&&this.nestedDataManager.setRequestSettled(e)}}}const tF=ne({memoize:J,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),nF=(e,t,n,r,i,o,a,s,...l)=>{if(l.length>0)throw new Error("Unsupported number of selectors");let c;if(e&&t&&n&&r&&i&&o&&a&&s)c=(l,c,u,d)=>{const p=e(l,c,u,d),h=t(l,c,u,d),m=n(l,c,u,d),f=r(l,c,u,d),g=i(l,c,u,d),y=o(l,c,u,d),v=a(l,c,u,d);return s(p,h,m,f,g,y,v,c,u,d)};else if(e&&t&&n&&r&&i&&o&&a)c=(s,l,c,u)=>{const d=e(s,l,c,u),p=t(s,l,c,u),h=n(s,l,c,u),m=r(s,l,c,u),f=i(s,l,c,u),g=o(s,l,c,u);return a(d,p,h,m,f,g,l,c,u)};else if(e&&t&&n&&r&&i&&o)c=(a,s,l,c)=>{const u=e(a,s,l,c),d=t(a,s,l,c),p=n(a,s,l,c),h=r(a,s,l,c),m=i(a,s,l,c);return o(u,d,p,h,m,s,l,c)};else if(e&&t&&n&&r&&i)c=(o,a,s,l)=>{const c=e(o,a,s,l),u=t(o,a,s,l),d=n(o,a,s,l),p=r(o,a,s,l);return i(c,u,d,p,a,s,l)};else if(e&&t&&n&&r)c=(i,o,a,s)=>{const l=e(i,o,a,s),c=t(i,o,a,s),u=n(i,o,a,s);return r(l,c,u,o,a,s)};else if(e&&t&&n)c=(r,i,o,a)=>{const s=e(r,i,o,a),l=t(r,i,o,a);return n(s,l,i,o,a)};else if(e&&t)c=(n,r,i,o)=>{const a=e(n,r,i,o);return t(a,r,i,o)};else{if(!e)throw new Error("Missing arguments");c=e}return c},rF=(...e)=>{const t=new WeakMap;let n=1;const r=e[e.length-1],i=e.length-1||1,o=Math.max(r.length-i,0);if(o>3)throw new Error("Unsupported number of arguments");return(i,a,s,l)=>{let c=i.__cacheKey__;c||(c={id:n},i.__cacheKey__=c,n+=1);let u=t.get(c);if(!u){const n=1===e.length?[e=>e,r]:e;let i=e;const a=[void 0,void 0,void 0];switch(o){case 0:break;case 1:i=[...n.slice(0,-1),()=>a[0],r];break;case 2:i=[...n.slice(0,-1),()=>a[0],()=>a[1],r];break;case 3:i=[...n.slice(0,-1),()=>a[0],()=>a[1],()=>a[2],r];break;default:throw new Error("Unsupported number of arguments")}u=tF(...i),u.selectorArgs=a,t.set(c,u)}switch(o){case 3:u.selectorArgs[2]=l;case 2:u.selectorArgs[1]=s;case 1:u.selectorArgs[0]=a}switch(o){case 0:return u(i);case 1:return u(i,a);case 2:return u(i,a,s);case 3:return u(i,a,s,l);default:throw new Error("unreachable")}}},iF={currentReorder:nF(e=>e.currentReorder),draggedItemProperties:rF(e=>e.currentReorder,S$.itemMetaLookup,(e,t,n)=>{if(!e||e.targetItemId!==n||null==e.action)return null;const r=null==e.newPosition?.parentId?0:t[n].depth+1;return{newPosition:e.newPosition,action:e.action,targetDepth:r}}),isDragging:nF(e=>!!e.currentReorder?.draggedItemId),canItemBeReordered:nF(e=>e.isItemReorderable,R$.isAnyItemBeingEdited,(e,t,n)=>!t&&e(n))},oF=(e,t,n)=>{const r=S$.itemMeta(e.state,t);return r.parentId===n||null!=r.parentId&&oF(e,r.parentId,n)},aF=parseInt(e.version,10)>=19?function(t,n,r,i,o){const a=e.useCallback(()=>n(t.getSnapshot(),r,i,o),[t,n,r,i,o]);return(0,N.useSyncExternalStore)(t.subscribe,a,a)}:function(e,t,n,r,i){return(0,_.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))};function sF(e,t,n,r,i){return aF(e,t,n,r,i)}const lF=({props:t})=>{const{store:n}=FD(),{itemId:r}=t,i=e.useRef(null),o=sF(n,iF.draggedItemProperties,r),a=sF(n,iF.canItemBeReordered,r),s=sF(n,iF.isDragging,r);return{propsEnhancers:{root:({rootRefObject:e,contentRefObject:t,externalEventHandlers:i})=>({draggable:!!a||void 0,onDragStart:o=>{if(i.onDragStart?.(o),!a||o.defaultMuiPrevented||o.defaultPrevented)return;if(V$(o.target,e.current))return;o.dataTransfer.effectAllowed="move",o.dataTransfer.setDragImage(t.current,0,0);const{types:s}=o.dataTransfer;!navigator.userAgent.toLowerCase().includes("android")||s.includes("text/plain")||s.includes("text/uri-list")||o.dataTransfer.setData("text/plain","android-fallback"),o.dataTransfer.setData("application/mui-x",""),n.itemsReordering.startDraggingItem(r)},onDragOver:e=>{i.onDragOver?.(e),e.defaultMuiPrevented||e.preventDefault()},onDragEnd:e=>{i.onDragEnd?.(e),e.defaultMuiPrevented||("none"!==e.dataTransfer.dropEffect?n.itemsReordering.completeDraggingItem(r):n.itemsReordering.cancelDraggingItem())}}),content:({externalEventHandlers:e,contentRefObject:t})=>s?{onDragEnter:t=>{e.onDragEnter?.(t),t.defaultMuiPrevented||(i.current=n.itemsReordering.getDroppingTargetValidActions(r))},onDragOver:o=>{if(e.onDragOver?.(o),o.defaultMuiPrevented||null==i.current||!t.current)return;const a=t.current.getBoundingClientRect(),s=o.clientY-a.top,l=o.clientX-a.left;n.itemsReordering.setDragTargetItem({itemId:r,validActions:i.current,targetHeight:a.height,cursorY:s,cursorX:l,contentElement:t.current})}}:{},dragAndDropOverlay:()=>o?{action:o.action,style:{"--TreeView-targetDepth":o.targetDepth}}:{}}}};class cF{constructor(e){this.store=e,e.itemPluginManager.register(lF,null)}getDroppingTargetValidActions=e=>{const t=iF.currentReorder(this.store.state);if(!t)throw new Error("There is no ongoing reordering.");if(e===t.draggedItemId)return{};const n=this.store.parameters.canMoveItemToNewPosition,r=S$.itemMeta(this.store.state,e),i=S$.itemIndex(this.store.state,r.id),o=S$.itemMeta(this.store.state,t.draggedItemId),a=S$.itemIndex(this.store.state,o.id),s=i===S$.itemOrderedChildrenIds(this.store.state,r.parentId).length-1,l={parentId:o.parentId,index:a},c={"make-child":{parentId:r.id,index:0},"reorder-above":{parentId:r.parentId,index:r.parentId===o.parentId&&i>a?i-1:i},"reorder-below":!r.expandable||s?{parentId:r.parentId,index:r.parentId===o.parentId&&i>a?i:i+1}:null,"move-to-parent":null==r.parentId?null:{parentId:r.parentId,index:S$.itemOrderedChildrenIds(this.store.state,r.parentId).length}},u={};return Object.keys(c).forEach(e=>{const r=c[e];null!=r&&(e=>{let r;return r=(e.parentId!==l.parentId||e.index!==l.index)&&(!n||n({itemId:t.draggedItemId,oldPosition:l,newPosition:e})),r})(r)&&(u[e]=r)}),u};startDraggingItem=e=>{R$.isItemBeingEdited(this.store.state,e)||this.store.set("currentReorder",{targetItemId:e,draggedItemId:e,action:null,newPosition:null})};cancelDraggingItem=()=>{this.store.set("currentReorder",null)};completeDraggingItem=e=>{const t=iF.currentReorder(this.store.state);if(null==t||t.draggedItemId!==e)return;if(t.draggedItemId===t.targetItemId||null==t.action||null==t.newPosition)return void this.cancelDraggingItem();const n=S$.itemMeta(this.store.state,t.draggedItemId),r={parentId:n.parentId,index:S$.itemIndex(this.store.state,n.id)},i=t.newPosition;this.store.update(l({currentReorder:null},(({itemToMoveId:e,oldPosition:t,newPosition:n,prevState:r})=>{const i=r.itemMetaLookup[e],o=t.parentId??b$,a=n.parentId??b$,s=l({},r.itemOrderedChildrenIdsLookup);if(o===a){const r=[...s[o]];r.splice(t.index,1),r.splice(n.index,0,e),s[i.parentId??b$]=r}else{const r=[...s[o]];r.splice(t.index,1),s[o]=r;const i=[...s[a]??[]];i.splice(n.index,0,e),s[a]=i}const c=l({},r.itemChildrenIndexesLookup);c[o]=x$(s[o]),a!==o&&(c[a]=x$(s[a]));const u=l({},r.itemMetaLookup);function d(e){const t=s[e].length>0;u[e].expandable!==t&&(u[e]=l({},u[e],{expandable:t}))}o!==b$&&o!==a&&d(o),a!==b$&&a!==o&&d(a);const p=null==n.parentId?0:u[a].depth+1;u[e]=l({},i,{parentId:n.parentId,depth:p});const h=(e,t)=>{u[e]=l({},u[e],{depth:t}),s[e]?.forEach(e=>h(e,t+1))};return s[e]?.forEach(e=>h(e,p+1)),{itemOrderedChildrenIdsLookup:s,itemChildrenIndexesLookup:c,itemMetaLookup:u}})({itemToMoveId:e,newPosition:i,oldPosition:r,prevState:this.store.state})));const o=this.store.parameters.onItemPositionChange;o?.({itemId:e,newPosition:i,oldPosition:r})};setDragTargetItem=({itemId:e,validActions:t,targetHeight:n,cursorY:r,cursorX:i,contentElement:o})=>{const a=this.store.state.currentReorder;if(null==a||oF(this.store,e,a.draggedItemId))return;const s=(({itemChildrenIndentation:e,validActions:t,targetHeight:n,targetDepth:r,cursorX:i,cursorY:o,contentElement:a})=>{let s;const l=((e,t)=>{if("number"==typeof e)return e;const n=/^(\d.+)(px)$/.exec(e);if(n)return parseFloat(n[1]);const r=document.createElement("div");r.style.width=e,r.style.position="absolute",t.appendChild(r);const i=r.offsetWidth;return t.removeChild(r),i})(e,a);return s=t["move-to-parent"]&&i3/4*n?"reorder-below":"make-child":t["reorder-above"]&&o<.5*n?"reorder-above":t["reorder-below"]&&o>=.5*n?"reorder-below":null,s})({itemChildrenIndentation:this.store.state.itemChildrenIndentation,validActions:t,targetHeight:n,targetDepth:this.store.state.itemMetaLookup[e].depth,cursorY:r,cursorX:i,contentElement:o}),c=null==s?null:t[s];a.targetItemId===e&&a.action===s&&a.newPosition?.parentId===c?.parentId&&a.newPosition?.index===c?.index||this.store.set("currentReorder",l({},a,{targetItemId:e,newPosition:c,action:s}))}}const uF=()=>!0,dF=()=>!1,pF=e=>({lazyLoadedItems:e.dataSource?Q_:null,currentReorder:null,isItemReorderable:e.itemsReordering?e.isItemReorderable??uF:dF}),hF={getInitialState:(e,t)=>l({},qz.rawMapper.getInitialState(e,t),pF(t)),updateStateFromParameters:(e,t,n)=>l({},qz.rawMapper.updateStateFromParameters(e,t,n),pF(t)),shouldIgnoreItemsStateUpdate:e=>!!e.dataSource};class mF extends qz{itemsReordering=(()=>new cF(this))();constructor(e){super(e,"RichTreeViewPro",hF),this.lazyLoading=new eF(this)}buildPublicAPI(){return l({},super.buildPublicAPI(),this.lazyLoading.buildPublicAPI())}}const fF=Lh,gF=bm("ul",{name:"MuiRichTreeViewPro",slot:"Root"})({padding:0,margin:0,listStyle:"none",outline:0,position:"relative"}),yF="MTc3MTU0NTYwMDAwMA==",vF=e.forwardRef(function(t,n){const r=fF({props:t,name:"MuiRichTreeViewPro"});z_("x-tree-view-pro",yF);const{slots:i,slotProps:o,apiRef:a,parameters:s,forwardedProps:c}=function(t){const{apiRef:n,slots:r,slotProps:i,disabledItemsFocusable:o,items:a,isItemDisabled:s,isItemSelectionDisabled:l,getItemLabel:c,getItemChildren:u,getItemId:d,onItemClick:p,itemChildrenIndentation:h,id:m,expandedItems:f,defaultExpandedItems:g,onExpandedItemsChange:y,onItemExpansionToggle:v,expansionTrigger:b,disableSelection:x,selectedItems:I,defaultSelectedItems:w,multiSelect:k,checkboxSelection:S,selectionPropagation:M,onSelectedItemsChange:C,onItemSelectionToggle:P,onItemFocus:E,onItemLabelChange:T,isItemEditable:A,dataSource:O,dataSourceCache:j,itemsReordering:L,isItemReorderable:R,canMoveItemToNewPosition:D,onItemPositionChange:$}=t,z=tt(t,q_);return{apiRef:n,slots:r,slotProps:i,parameters:e.useMemo(()=>({disabledItemsFocusable:o,items:a,isItemDisabled:s,isItemSelectionDisabled:l,getItemLabel:c,getItemChildren:u,getItemId:d,onItemClick:p,itemChildrenIndentation:h,id:m,expandedItems:f,defaultExpandedItems:g,onExpandedItemsChange:y,onItemExpansionToggle:v,expansionTrigger:b,disableSelection:x,selectedItems:I,defaultSelectedItems:w,multiSelect:k,checkboxSelection:S,selectionPropagation:M,onSelectedItemsChange:C,onItemSelectionToggle:P,onItemFocus:E,onItemLabelChange:T,isItemEditable:A,dataSource:O,dataSourceCache:j,itemsReordering:L,isItemReorderable:R,canMoveItemToNewPosition:D,onItemPositionChange:$}),[o,a,s,l,c,u,d,p,h,m,f,g,y,v,b,x,I,w,k,S,M,C,P,E,T,A,O,j,L,R,D,$]),forwardedProps:z}}(r),u=Mz(mF,s),d=e.useRef(null),p=Iz(u,c,sD(n,d)),h=(t=>{const{classes:n}=t;return e.useMemo(()=>function(e,t,n){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let e=0;e{const n=t.map(t=>{if(null==t)return null;if("function"==typeof t){const n=t,r=n(e);return"function"==typeof r?r:()=>{n(null)}}return t.current=e,()=>{t.current=null}});return()=>{n.forEach(e=>e?.())}},t);return e.useMemo(()=>t.every(e=>null==e)?null:e=>{n.current&&(n.current(),n.current=void 0),null!=e&&(n.current=r(e))},t)}(c,s?.ref,t.additionalProps?.ref);return function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(n,{...l,ref:u},i)}({elementType:m,externalSlotProps:o?.root,className:h.root,getSlotProps:p,ownerState:r});return(0,O.jsx)(VD,{store:u,classes:h,slots:i,slotProps:o,apiRef:a,rootRef:d,children:(0,O.jsx)($$.Provider,{value:S$.itemDepth,children:(0,O.jsxs)(m,l({},f,{children:[(0,O.jsx)(xz,{slots:i,slotProps:o}),(0,O.jsx)(H_,{packageName:"x-tree-view-pro",releaseInfo:yF})]}))})})}),bF=e.createContext(null);function xF(){return e.useContext(bF)}const IF="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",wF=function(t){const{children:n,theme:r}=t,i=xF(),o=e.useMemo(()=>{const e=null===i?{...r}:function(e,t){return"function"==typeof t?t(e):{...e,...t}}(i,r);return null!=e&&(e[IF]=null!==i),e},[r,i]);return(0,O.jsx)(bF.Provider,{value:o,children:n})};function kF(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return(0,O.jsx)(Ty,{styles:r})}function SF(e){const t=sm(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}const MF=function({styles:e,themeId:t,defaultTheme:n={}}){const r=Zd(n),i=t&&r[t]||r;let o="function"==typeof e?e(i):e;return i.modularCssLayers&&(o=Array.isArray(o)?o.map(e=>SF("function"==typeof e?e(i):e)):SF(o)),(0,O.jsx)(kF,{styles:o})},CF={};function PF(t,n,r,i=!1){return e.useMemo(()=>{const e=t&&n[t]||n;if("function"==typeof r){const o=r(e),a=t?{...n,[t]:o}:o;return i?()=>a:a}return t?{...n,[t]:r}:{...n,...r}},[t,n,r,i])}const EF=function(e){const{children:t,theme:n,themeId:r}=e,i=qd(CF),o=xF()||CF,a=PF(r,i,n),s=PF(r,o,n,!0),l="rtl"===(r?a[r]:a).direction,c=function(e){const t=qd(),n=Rg()||"",{modularCssLayers:r}=e;let i="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return i=r&&null===t?"string"==typeof r?r.replace(/mui(?!\.)/g,i):`@layer ${i};`:"",qm(()=>{const e=document.querySelector("head");if(!e)return;const t=e.firstChild;if(i){if(t&&t.hasAttribute?.("data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===n)return;const r=document.createElement("style");r.setAttribute("data-mui-layer-order",n),r.textContent=i,e.prepend(r)}else e.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[i,n]),i?(0,O.jsx)(MF,{styles:i}):null}(a);return(0,O.jsx)(wF,{theme:s,children:(0,O.jsx)(Ud.Provider,{value:a,children:(0,O.jsx)(Xh,{value:l,children:(0,O.jsxs)(Sm,{value:r?a[r].components:a.components,children:[c,t]})})})})};function TF({theme:e,...t}){const n=jh in e?e[jh]:void 0;return(0,O.jsx)(EF,{...t,themeId:n?jh:void 0,theme:n||e})}const AF="mode",OF="color-scheme",jF="data-color-scheme";function LF(){}const RF=({key:e,storageWindow:t})=>(t||"undefined"==typeof window||(t=window),{get(n){if("undefined"==typeof window)return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return LF;const r=t=>{const r=t.newValue;t.key===e&&n(r)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function DF(){}function $F(e){if("undefined"!=typeof window&&"function"==typeof window.matchMedia&&"system"===e)return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function zF(e,t){return"light"===e.mode||"system"===e.mode&&"light"===e.systemMode?t("light"):"dark"===e.mode||"system"===e.mode&&"dark"===e.systemMode?t("dark"):void 0}const NF="mui-color-scheme",_F="light",FF="dark",HF="mui-mode",{CssVarsProvider:BF,useColorScheme:VF,getInitColorSchemeScript:UF}=function(t){const{themeId:n,theme:r={},modeStorageKey:i=AF,colorSchemeStorageKey:o=OF,disableTransitionOnChange:a=!1,defaultColorScheme:s,resolveTheme:l}=t,c={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},u=e.createContext(void 0),d={},p={},h="string"==typeof s?s:s.light,m="string"==typeof s?s:s.dark;return{CssVarsProvider:function(t){const{children:c,theme:h,modeStorageKey:m=i,colorSchemeStorageKey:f=o,disableTransitionOnChange:g=a,storageManager:y,storageWindow:v=("undefined"==typeof window?void 0:window),documentNode:b=("undefined"==typeof document?void 0:document),colorSchemeNode:x=("undefined"==typeof document?void 0:document.documentElement),disableNestedContext:I=!1,disableStyleSheetGeneration:w=!1,defaultMode:k="system",noSsr:S}=t,M=e.useRef(!1),C=xF(),P=e.useContext(u),E=!!P&&!I,T=e.useMemo(()=>h||("function"==typeof r?r():r),[h]),A=T[n],j=A||T,{colorSchemes:L=d,components:R=p,cssVarPrefix:D}=j,$=Object.keys(L).filter(e=>!!L[e]).join(","),z=e.useMemo(()=>$.split(","),[$]),N="string"==typeof s?s:s.light,_="string"==typeof s?s:s.dark,F=L[N]&&L[_]?k:L[j.defaultColorScheme]?.palette?.mode||j.palette?.mode,{mode:H,setMode:B,systemMode:V,lightColorScheme:U,darkColorScheme:Y,colorScheme:W,setColorScheme:G}=function(t){const{defaultMode:n="light",defaultLightColorScheme:r,defaultDarkColorScheme:i,supportedColorSchemes:o=[],modeStorageKey:a=AF,colorSchemeStorageKey:s=OF,storageWindow:l=("undefined"==typeof window?void 0:window),storageManager:c=RF,noSsr:u=!1}=t,d=o.join(","),p=o.length>1,h=e.useMemo(()=>c?.({key:a,storageWindow:l}),[c,a,l]),m=e.useMemo(()=>c?.({key:`${s}-light`,storageWindow:l}),[c,s,l]),f=e.useMemo(()=>c?.({key:`${s}-dark`,storageWindow:l}),[c,s,l]),[g,y]=e.useState(()=>{const e=h?.get(n)||n,t=m?.get(r)||r,o=f?.get(i)||i;return{mode:e,systemMode:$F(e),lightColorScheme:t,darkColorScheme:o}}),[v,b]=e.useState(u||!p);e.useEffect(()=>{b(!0)},[]);const x=function(e){return zF(e,t=>"light"===t?e.lightColorScheme:"dark"===t?e.darkColorScheme:void 0)}(g),I=e.useCallback(e=>{y(t=>{if(e===t.mode)return t;const r=e??n;return h?.set(r),{...t,mode:r,systemMode:$F(r)}})},[h,n]),w=e.useCallback(e=>{e?"string"==typeof e?e&&!d.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):y(t=>{const n={...t};return zF(t,t=>{"light"===t&&(m?.set(e),n.lightColorScheme=e),"dark"===t&&(f?.set(e),n.darkColorScheme=e)}),n}):y(t=>{const n={...t},o=null===e.light?r:e.light,a=null===e.dark?i:e.dark;return o&&(d.includes(o)?(n.lightColorScheme=o,m?.set(o)):console.error(`\`${o}\` does not exist in \`theme.colorSchemes\`.`)),a&&(d.includes(a)?(n.darkColorScheme=a,f?.set(a)):console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)),n}):y(e=>(m?.set(r),f?.set(i),{...e,lightColorScheme:r,darkColorScheme:i}))},[d,m,f,r,i]),k=e.useCallback(e=>{"system"===g.mode&&y(t=>{const n=e?.matches?"dark":"light";return t.systemMode===n?t:{...t,systemMode:n}})},[g.mode]),S=e.useRef(k);return S.current=k,e.useEffect(()=>{if("function"!=typeof window.matchMedia||!p)return;const e=(...e)=>S.current(...e),t=window.matchMedia("(prefers-color-scheme: dark)");return t.addListener(e),e(t),()=>{t.removeListener(e)}},[p]),e.useEffect(()=>{if(p){const e=h?.subscribe(e=>{e&&!["light","dark","system"].includes(e)||I(e||n)})||DF,t=m?.subscribe(e=>{e&&!d.match(e)||w({light:e})})||DF,r=f?.subscribe(e=>{e&&!d.match(e)||w({dark:e})})||DF;return()=>{e(),t(),r()}}},[w,I,d,n,l,p,h,m,f]),{...g,mode:v?g.mode:void 0,systemMode:v?g.systemMode:void 0,colorScheme:v?x:void 0,setMode:I,setColorScheme:w}}({supportedColorSchemes:z,defaultLightColorScheme:N,defaultDarkColorScheme:_,modeStorageKey:m,colorSchemeStorageKey:f,defaultMode:F,storageManager:y,storageWindow:v,noSsr:S});let K=H,q=W;E&&(K=P.mode,q=P.colorScheme);const X=e.useMemo(()=>{const e=q||j.defaultColorScheme,t=j.generateThemeVars?.()||j.vars,n={...j,components:R,colorSchemes:L,cssVarPrefix:D,vars:t};if("function"==typeof n.generateSpacing&&(n.spacing=n.generateSpacing()),e){const t=L[e];t&&"object"==typeof t&&Object.keys(t).forEach(e=>{t[e]&&"object"==typeof t[e]?n[e]={...n[e],...t[e]}:n[e]=t[e]})}return l?l(n):n},[j,q,R,L,D]),Z=j.colorSchemeSelector;qm(()=>{if(q&&x&&Z&&"media"!==Z){const e=Z;let t=Z;if("class"===e&&(t=".%s"),"data"===e&&(t="[data-%s]"),e?.startsWith("data-")&&!e.includes("%s")&&(t=`[${e}="%s"]`),t.startsWith("."))x.classList.remove(...z.map(e=>t.substring(1).replace("%s",e))),x.classList.add(t.substring(1).replace("%s",q));else{const e=t.replace("%s",q).match(/\[([^\]]+)\]/);if(e){const[t,n]=e[1].split("=");n||z.forEach(e=>{x.removeAttribute(t.replace(q,e))}),x.setAttribute(t,n?n.replace(/"|'/g,""):"")}else x.setAttribute(t,q)}}},[q,Z,x,z]),e.useEffect(()=>{let e;if(g&&M.current&&b){const t=b.createElement("style");t.appendChild(b.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),b.head.appendChild(t),window.getComputedStyle(b.body),e=setTimeout(()=>{b.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[q,g,b]),e.useEffect(()=>(M.current=!0,()=>{M.current=!1}),[]);const J=e.useMemo(()=>({allColorSchemes:z,colorScheme:q,darkColorScheme:Y,lightColorScheme:U,mode:K,setColorScheme:G,setMode:B,systemMode:V}),[z,q,Y,U,K,G,B,V,X.colorSchemeSelector]);let Q=!0;(w||!1===j.cssVariables||E&&C?.cssVarPrefix===D)&&(Q=!1);const ee=(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(EF,{themeId:A?n:void 0,theme:X,children:c}),Q&&(0,O.jsx)(kF,{styles:X.generateStyleSheets?.()||[]})]});return E?ee:(0,O.jsx)(u.Provider,{value:J,children:ee})},useColorScheme:()=>e.useContext(u)||c,getInitColorSchemeScript:e=>function(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:i=AF,colorSchemeStorageKey:o=OF,attribute:a=jF,colorSchemeNode:s="document.documentElement",nonce:l}=e||{};let c="",u=a;if("class"===a&&(u=".%s"),"data"===a&&(u="[data-%s]"),u.startsWith(".")){const e=u.substring(1);c+=`${s}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));\n ${s}.classList.add('${e}'.replace('%s', colorScheme));`}const d=u.match(/\[([^\]]+)\]/);if(d){const[e,t]=d[1].split("=");t||(c+=`${s}.removeAttribute('${e}'.replace('%s', light));\n ${s}.removeAttribute('${e}'.replace('%s', dark));`),c+=`\n ${s}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:'""'});`}else c+=`${s}.setAttribute('${u}', colorScheme);`;return(0,O.jsx)("script",{suppressHydrationWarning:!0,nonce:"undefined"==typeof window?l:"",dangerouslySetInnerHTML:{__html:`(function() {\ntry {\n let colorScheme = '';\n const mode = localStorage.getItem('${i}') || '${t}';\n const dark = localStorage.getItem('${o}-dark') || '${r}';\n const light = localStorage.getItem('${o}-light') || '${n}';\n if (mode === 'system') {\n // handle system mode\n const mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n colorScheme = dark\n } else {\n colorScheme = light\n }\n }\n if (mode === 'light') {\n colorScheme = light;\n }\n if (mode === 'dark') {\n colorScheme = dark;\n }\n if (colorScheme) {\n ${c}\n }\n} catch(e){}})();`}},"mui-color-scheme-init")}({colorSchemeStorageKey:o,defaultLightColorScheme:h,defaultDarkColorScheme:m,modeStorageKey:i,...e})}}({themeId:jh,theme:()=>Ah({cssVariables:!0}),colorSchemeStorageKey:NF,modeStorageKey:HF,defaultColorScheme:{light:_F,dark:FF},resolveTheme:e=>{const t={...e,typography:oh(e.palette,e.typography)};return t.unstable_sx=function(e){return xu({sx:e,theme:this})},t}}),YF=BF;function WF({theme:t,...n}){const r=e.useMemo(()=>{if("function"==typeof t)return t;const e=jh in t?t[jh]:t;return"colorSchemes"in e?null:"vars"in e?t:{...t,vars:null}},[t]);return r?(0,O.jsx)(TF,{theme:r,...n}):(0,O.jsx)(YF,{theme:t,...n})}const GF={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function KF(e,t,n,r,i){return 1===n?Math.min(e+t,i):Math.max(e-t,r)}function qF(e,t){return e-t}function XF(e,t){const{index:n}=e.reduce((e,n,r)=>{const i=Math.abs(t-n);return null===e||ie===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}(e,t)}const nH={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},rH=e=>e;let iH;function oH(){return void 0===iH&&(iH="undefined"==typeof CSS||"function"!=typeof CSS.supports||CSS.supports("touch-action","none")),iH}function aH(t){const{"aria-labelledby":n,defaultValue:r,disabled:i=!1,disableSwap:o=!1,isRtl:a=!1,marks:s=!1,max:l=100,min:c=0,name:u,onChange:d,onChangeCommitted:p,orientation:h="horizontal",rootRef:m,scale:f=rH,step:g=1,shiftStep:y=10,tabIndex:v,value:b}=t,x=e.useRef(void 0),[I,w]=e.useState(-1),[k,S]=e.useState(-1),[M,C]=e.useState(!1),P=e.useRef(0),E=e.useRef(null),[T,A]=$g({controlled:b,default:r??c,name:"Slider"}),O=d&&((e,t,n)=>{const r=e.nativeEvent||e,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:t,name:u}}),E.current=t,d(i,t,n)}),j=Array.isArray(T);let L=j?T.slice().sort(qF):[T];L=L.map(e=>null==e?c:Jd(e,c,l));const R=!0===s&&null!==g?[...Array(Math.floor((l-c)/g)+1)].map((e,t)=>({value:c+g*t})):s||[],D=R.map(e=>e.value),[$,z]=e.useState(-1),N=e.useRef(null),_=Bm(m,N),F=e=>t=>{const n=Number(t.currentTarget.getAttribute("data-index"));Zh(t.target)&&z(n),S(n),e?.onFocus?.(t)},H=e=>t=>{Zh(t.target)||z(-1),S(-1),e?.onBlur?.(t)},B=(e,t)=>{const n=Number(e.currentTarget.getAttribute("data-index")),r=L[n],i=D.indexOf(r);let a=t;if(R&&null==g){const e=D[D.length-1];a=a>=e?e:a<=D[0]?D[0]:at=>{if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(t.key)){t.preventDefault();const e=Number(t.currentTarget.getAttribute("data-index")),n=L[e];let r=null;if(null!=g){const e=t.shiftKey?y:g;switch(t.key){case"ArrowUp":r=KF(n,e,1,c,l);break;case"ArrowRight":r=KF(n,e,a?-1:1,c,l);break;case"ArrowDown":r=KF(n,e,-1,c,l);break;case"ArrowLeft":r=KF(n,e,a?1:-1,c,l);break;case"PageUp":r=KF(n,y,1,c,l);break;case"PageDown":r=KF(n,y,-1,c,l);break;case"Home":r=c;break;case"End":r=l}}else if(R){const e=D[D.length-1],i=D.indexOf(n),o=[a?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];[a?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"].includes(t.key)?r=0===i?D[0]:D[i-1]:o.includes(t.key)&&(r=i===D.length-1?e:D[i+1])}null!=r&&B(t,r)}e?.onKeyDown?.(t)};qm(()=>{i&&N.current.contains(document.activeElement)&&document.activeElement?.blur()},[i]),i&&-1!==I&&w(-1),i&&-1!==$&&z(-1);const U=e.useRef(void 0);let Y=h;a&&"horizontal"===h&&(Y+="-reverse");const W=({finger:e,move:t=!1})=>{const{current:n}=N,{width:r,height:i,bottom:a,left:s}=n.getBoundingClientRect();let u,d;if(u=Y.startsWith("vertical")?(a-e.y)/i:(e.x-s)/r,Y.includes("-reverse")&&(u=1-u),d=function(e,t,n){return(n-t)*e+t}(u,c,l),g)d=function(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(function(e){if(Math.abs(e)<1){const t=e.toExponential().split("e-"),n=t[0].split(".")[1];return(n?n.length:0)+parseInt(t[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}(t)))}(d,g,c);else{const e=XF(D,d);d=D[e]}d=Jd(d,c,l);let p=0;if(j){p=t?U.current:XF(L,d),o&&(d=Jd(d,L[p-1]||-1/0,L[p+1]||1/0));const e=d;d=QF({values:L,newValue:d,index:p}),o&&t||(p=d.indexOf(e),U.current=p)}return{newValue:d,activeIndex:p}},G=Ag(e=>{const t=ZF(e,x);if(!t)return;if(P.current+=1,"mousemove"===e.type&&0===e.buttons)return void K(e);const{newValue:n,activeIndex:r}=W({finger:t,move:!0});eH({sliderRef:N,activeIndex:r,setActive:w}),A(n),!M&&P.current>2&&C(!0),O&&!tH(n,T)&&O(e,n,r)}),K=Ag(e=>{const t=ZF(e,x);if(C(!1),!t)return;const{newValue:n}=W({finger:t,move:!0});w(-1),"touchend"===e.type&&S(-1),p&&p(e,E.current??n),x.current=void 0,X()}),q=Ag(e=>{if(i)return;oH()||e.preventDefault();const t=e.changedTouches[0];null!=t&&(x.current=t.identifier);const n=ZF(e,x);if(!1!==n){const{newValue:t,activeIndex:r}=W({finger:n});eH({sliderRef:N,activeIndex:r,setActive:w}),A(t),O&&!tH(t,T)&&O(e,t,r)}P.current=0;const r=Xm(N.current);r.addEventListener("touchmove",G,{passive:!0}),r.addEventListener("touchend",K,{passive:!0})}),X=e.useCallback(()=>{const e=Xm(N.current);e.removeEventListener("mousemove",G),e.removeEventListener("mouseup",K),e.removeEventListener("touchmove",G),e.removeEventListener("touchend",K)},[K,G]);e.useEffect(()=>{const{current:e}=N;return e.addEventListener("touchstart",q,{passive:oH()}),()=>{e.removeEventListener("touchstart",q),X()}},[X,q]),e.useEffect(()=>{i&&X()},[i,X]);const Z=JF(j?L[0]:c,c,l),J=JF(L[L.length-1],c,l)-Z,Q=e=>t=>{e.onMouseLeave?.(t),S(-1)};let ee;return"vertical"===h&&(ee=a?"vertical-rl":"vertical-lr"),{active:I,axis:Y,axisProps:nH,dragging:M,focusedThumbIndex:$,getHiddenInputProps:(e={})=>{const r=dg(e),o={onChange:(s=r||{},e=>{s.onChange?.(e),B(e,e.target.valueAsNumber)}),onFocus:F(r||{}),onBlur:H(r||{}),onKeyDown:V(r||{})};var s;const d={...r,...o};return{tabIndex:v,"aria-labelledby":n,"aria-orientation":h,"aria-valuemax":f(l),"aria-valuemin":f(c),name:u,type:"range",min:t.min,max:t.max,step:null===t.step&&t.marks?"any":t.step??void 0,disabled:i,...e,...d,style:{...GF,direction:a?"rtl":"ltr",width:"100%",height:"100%",writingMode:ee}}},getRootProps:(e={})=>{const t=dg(e),n={onMouseDown:(r=t||{},e=>{if(r.onMouseDown?.(e),i)return;if(e.defaultPrevented)return;if(0!==e.button)return;e.preventDefault();const t=ZF(e,x);if(!1!==t){const{newValue:n,activeIndex:r}=W({finger:t});eH({sliderRef:N,activeIndex:r,setActive:w}),A(n),O&&!tH(n,T)&&O(e,n,r)}P.current=0;const n=Xm(N.current);n.addEventListener("mousemove",G,{passive:!0}),n.addEventListener("mouseup",K)})};var r;const o={...t,...n};return{...e,ref:_,...o}},getThumbProps:(e={})=>{const t=dg(e),n={onMouseOver:(r=t||{},e=>{r.onMouseOver?.(e);const t=Number(e.currentTarget.getAttribute("data-index"));S(t)}),onMouseLeave:Q(t||{})};var r;return{...e,...t,...n}},marks:R,open:k,range:j,rootRef:_,trackLeap:J,trackOffset:Z,values:L,getThumbStyle:e=>({pointerEvents:-1!==I&&I!==e?"none":void 0})}}const sH=function(e){return"string"==typeof e};function lH(e){return Ig("MuiSlider",e)}const cH=wg("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]);function uH(e){return e}const dH=bm("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Cm(n.color)}`],"medium"!==n.size&&t[`size${Cm(n.size)}`],n.marked&&t.marked,"vertical"===n.orientation&&t.vertical,"inverted"===n.track&&t.trackInverted,!1===n.track&&t.trackFalse]}})(wm(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${cH.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${cH.dragging}`]:{[`& .${cH.thumb}, & .${cH.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),pH=bm("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),hH=bm("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(wm(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:cp(e.palette[t].main,.62),borderColor:cp(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:sp(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:sp(e.palette[t].main,.5)})}}}))]}))),mH=bm("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${Cm(n.color)}`],"medium"!==n.size&&t[`thumbSize${Cm(n.size)}`]]}})(wm(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${cH.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${cH.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${op(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${cH.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${op(e.palette[t].main,.16)}`}}}}))]}))),fH=bm(function(t){const{children:n,className:r,value:i}=t,o=(e=>{const{open:t}=e;return{offset:Hh(t&&cH.valueLabelOpen),circle:cH.valueLabelCircle,label:cH.valueLabelLabel}})(t);return n?e.cloneElement(n,{className:Hh(n.props.className)},(0,O.jsxs)(e.Fragment,{children:[n.props.children,(0,O.jsx)("span",{className:Hh(o.offset,r),"aria-hidden":!0,children:(0,O.jsx)("span",{className:o.circle,children:(0,O.jsx)("span",{className:o.label,children:i})})})]})):null},{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(wm(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${cH.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${cH.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]}))),gH=bm("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>gm(e)&&"markActive"!==e,overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(wm(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),yH=bm("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>gm(e)&&"markLabelActive"!==e,overridesResolver:(e,t)=>t.markLabel})(wm(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),vH=({children:e})=>e,bH=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiSlider"}),i=qh(),{"aria-label":o,"aria-valuetext":a,"aria-labelledby":s,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:p,className:h,disableSwap:m=!1,disabled:f=!1,getAriaLabel:g,getAriaValueText:y,marks:v=!1,max:b=100,min:x=0,name:I,onChange:w,onChangeCommitted:k,orientation:S="horizontal",shiftStep:M=10,size:C="medium",step:P=1,scale:E=uH,slotProps:T,slots:A,tabIndex:j,track:L="normal",value:R,valueLabelDisplay:D="off",valueLabelFormat:$=uH,...z}=r,N={...r,isRtl:i,max:b,min:x,classes:p,disabled:f,disableSwap:m,orientation:S,marks:v,color:d,size:C,step:P,shiftStep:M,scale:E,track:L,valueLabelDisplay:D,valueLabelFormat:$},{axisProps:_,getRootProps:F,getHiddenInputProps:H,getThumbProps:B,open:V,active:U,axis:Y,focusedThumbIndex:W,range:G,dragging:K,marks:q,values:X,trackOffset:Z,trackLeap:J,getThumbStyle:Q}=aH({...N,rootRef:n});N.marked=q.length>0&&q.some(e=>e.label),N.dragging=K,N.focusedThumbIndex=W;const ee=(e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:o,classes:a,color:s,size:l}=e;return Gh({root:["root",t&&"disabled",n&&"dragging",r&&"marked","vertical"===i&&"vertical","inverted"===o&&"trackInverted",!1===o&&"trackFalse",s&&`color${Cm(s)}`,l&&`size${Cm(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${Cm(l)}`,s&&`thumbColor${Cm(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]},lH,a)})(N),te=A?.root??c.Root??dH,ne=A?.rail??c.Rail??pH,re=A?.track??c.Track??hH,ie=A?.thumb??c.Thumb??mH,oe=A?.valueLabel??c.ValueLabel??fH,ae=A?.mark??c.Mark??gH,se=A?.markLabel??c.MarkLabel??yH,le=A?.input??c.Input??"input",ce=T?.root??u.root,ue=T?.rail??u.rail,de=T?.track??u.track,pe=T?.thumb??u.thumb,he=T?.valueLabel??u.valueLabel,me=T?.mark??u.mark,fe=T?.markLabel??u.markLabel,ge=T?.input??u.input,ye=fg({elementType:te,getSlotProps:F,externalSlotProps:ce,externalForwardedProps:z,additionalProps:{...(Me=te,(!Me||!sH(Me))&&{as:l})},ownerState:{...N,...ce?.ownerState},className:[ee.root,h]}),ve=fg({elementType:ne,externalSlotProps:ue,ownerState:N,className:ee.rail}),be=fg({elementType:re,externalSlotProps:de,additionalProps:{style:{..._[Y].offset(Z),..._[Y].leap(J)}},ownerState:{...N,...de?.ownerState},className:ee.track}),xe=fg({elementType:ie,getSlotProps:B,externalSlotProps:pe,ownerState:{...N,...pe?.ownerState},className:ee.thumb}),Ie=fg({elementType:oe,externalSlotProps:he,ownerState:{...N,...he?.ownerState},className:ee.valueLabel}),we=fg({elementType:ae,externalSlotProps:me,ownerState:N,className:ee.mark}),ke=fg({elementType:se,externalSlotProps:fe,ownerState:N,className:ee.markLabel}),Se=fg({elementType:le,getSlotProps:H,externalSlotProps:ge,ownerState:N});var Me;return(0,O.jsxs)(te,{...ye,children:[(0,O.jsx)(ne,{...ve}),(0,O.jsx)(re,{...be}),q.filter(e=>e.value>=x&&e.value<=b).map((t,n)=>{const r=JF(t.value,x,b),i=_[Y].offset(r);let o;return o=!1===L?X.includes(t.value):"normal"===L&&(G?t.value>=X[0]&&t.value<=X[X.length-1]:t.value<=X[0])||"inverted"===L&&(G?t.value<=X[0]||t.value>=X[X.length-1]:t.value>=X[0]),(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(ae,{"data-index":n,...we,...!sH(ae)&&{markActive:o},style:{...i,...we.style},className:Hh(we.className,o&&ee.markActive)}),null!=t.label?(0,O.jsx)(se,{"aria-hidden":!0,"data-index":n,...ke,...!sH(se)&&{markLabelActive:o},style:{...i,...ke.style},className:Hh(ee.markLabel,ke.className,o&&ee.markLabelActive),children:t.label}):null]},n)}),X.map((e,t)=>{const n=JF(e,x,b),r=_[Y].offset(n),i="off"===D?vH:oe;return(0,O.jsx)(i,{...!sH(i)&&{valueLabelFormat:$,valueLabelDisplay:D,value:"function"==typeof $?$(E(e),t):$,index:t,open:V===t||U===t||"on"===D,disabled:f},...Ie,children:(0,O.jsx)(ie,{"data-index":t,...xe,className:Hh(ee.thumb,xe.className,U===t&&ee.active,W===t&&ee.focusVisible),style:{...r,...Q(t),...xe.style},children:(0,O.jsx)(le,{"data-index":t,"aria-label":g?g(t):o,"aria-valuenow":E(e),"aria-labelledby":s,"aria-valuetext":y?y(E(e),t):a,value:X[t],...Se})})},t)})]})}),xH=bH,IH={entering:{opacity:1},entered:{opacity:1}},wH=e.forwardRef(function(t,n){const r=xm(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:p,onExit:h,onExited:m,onExiting:f,style:g,timeout:y=i,TransitionComponent:v=_m,...b}=t,x=e.useRef(null),I=Vm(x,Jh(s),n),w=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},k=w(p),S=w((e,t)=>{Fm(e);const n=Hm({style:g,timeout:y,easing:l},{mode:"enter"});e.style.webkitTransition=r.transitions.create("opacity",n),e.style.transition=r.transitions.create("opacity",n),u&&u(e,t)}),M=w(d),C=w(f),P=w(e=>{const t=Hm({style:g,timeout:y,easing:l},{mode:"exit"});e.style.webkitTransition=r.transitions.create("opacity",t),e.style.transition=r.transitions.create("opacity",t),h&&h(e)}),E=w(m);return(0,O.jsx)(v,{appear:a,in:c,nodeRef:x,onEnter:S,onEntered:M,onEntering:k,onExit:P,onExited:E,onExiting:C,addEndListener:e=>{o&&o(x.current,e)},timeout:y,...b,children:(t,{ownerState:n,...r})=>e.cloneElement(s,{style:{opacity:0,visibility:"exited"!==t||c?void 0:"hidden",...IH[t],...g,...s.props.style},ref:I,...r})})}),kH=wH;function SH(e){return Ig("MuiBackdrop",e)}wg("MuiBackdrop",["root","invisible"]);const MH=bm("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),CH=e.forwardRef(function(e,t){const n=Mm({props:e,name:"MuiBackdrop"}),{children:r,className:i,component:o="div",invisible:a=!1,open:s,components:l={},componentsProps:c={},slotProps:u={},slots:d={},TransitionComponent:p,transitionDuration:h,...m}=n,f={...n,component:o,invisible:a},g=(e=>{const{classes:t,invisible:n}=e;return Gh({root:["root",n&&"invisible"]},SH,t)})(f),y={slots:{transition:p,root:l.Root,...d},slotProps:{...c,...u}},[v,b]=Ng("root",{elementType:MH,externalForwardedProps:y,className:Hh(g.root,i),ownerState:f}),[x,I]=Ng("transition",{elementType:kH,externalForwardedProps:y,ownerState:f});return(0,O.jsx)(x,{in:s,timeout:h,...m,...I,children:(0,O.jsx)(v,{"aria-hidden":!0,...b,classes:g,ref:t,children:r})})}),PH=CH;function EH(...e){return e.reduce((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}function TH(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function AH(e){return parseInt(oy(e).getComputedStyle(e).paddingRight,10)||0}function OH(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,e=>{const t=!o.includes(e),n=!function(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&TH(e,i)})}function jH(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}const LH=()=>{},RH=new class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&TH(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);OH(t,e.mount,e.modalRef,r,!0);const i=jH(this.containers,e=>e.container===t);return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=jH(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||(r.restore=function(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Xm(e);return t.body===e?oy(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=ny(oy(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${AH(r)+e}px`;const t=Xm(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${AH(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=Xm(r).body;else{const t=r.parentElement,n=oy(r);e="HTML"===t?.nodeName&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=jH(this.containers,t=>t.modals.includes(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&TH(e.modalRef,t),OH(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=i.modals[i.modals.length-1];e.modalRef&&TH(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function DH(e){return Ig("MuiModal",e)}wg("MuiModal",["root","hidden","backdrop"]);const $H=bm("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(wm(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]}))),zH=bm(PH,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),NH=e.forwardRef(function(t,n){const r=Mm({name:"MuiModal",props:t}),{BackdropComponent:i=zH,BackdropProps:o,classes:a,className:s,closeAfterTransition:l=!1,children:c,container:u,component:d,components:p={},componentsProps:h={},disableAutoFocus:m=!1,disableEnforceFocus:f=!1,disableEscapeKeyDown:g=!1,disablePortal:y=!1,disableRestoreFocus:v=!1,disableScrollLock:b=!1,hideBackdrop:x=!1,keepMounted:I=!1,onBackdropClick:w,onClose:k,onTransitionEnter:S,onTransitionExited:M,open:C,slotProps:P={},slots:E={},theme:T,...A}=r,j={...r,closeAfterTransition:l,disableAutoFocus:m,disableEnforceFocus:f,disableEscapeKeyDown:g,disablePortal:y,disableRestoreFocus:v,disableScrollLock:b,hideBackdrop:x,keepMounted:I},{getRootProps:L,getBackdropProps:R,getTransitionProps:D,portalRef:$,isTopModal:z,exited:N,hasTransition:_}=function(t){const{container:n,disableEscapeKeyDown:r=!1,disableScrollLock:i=!1,closeAfterTransition:o=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:c,open:u,rootRef:d}=t,p=e.useRef({}),h=e.useRef(null),m=e.useRef(null),f=Bm(m,d),[g,y]=e.useState(!u),v=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let b=!0;"false"!==t["aria-hidden"]&&!1!==t["aria-hidden"]||(b=!1);const x=()=>(p.current.modalRef=m.current,p.current.mount=h.current,p.current),I=()=>{RH.mount(x(),{disableScrollLock:i}),m.current&&(m.current.scrollTop=0)},w=Ag(()=>{const e=function(e){return"function"==typeof e?e():e}(n)||Xm(h.current).body;RH.add(x(),e),m.current&&I()}),k=()=>RH.isTopModal(x()),S=Ag(e=>{h.current=e,e&&(u&&k()?I():m.current&&TH(m.current,b))}),M=e.useCallback(()=>{RH.remove(x(),b)},[b]);e.useEffect(()=>()=>{M()},[M]),e.useEffect(()=>{u?w():v&&o||M()},[u,M,v,o,w]);const C=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&k()&&(r||(t.stopPropagation(),c&&c(t,"escapeKeyDown")))},P=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&c&&c(t,"backdropClick")};return{getRootProps:(e={})=>{const n=dg(t);delete n.onTransitionEnter,delete n.onTransitionExited;const r={...n,...e};return{role:"presentation",...r,onKeyDown:C(r),ref:f}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:P(t),open:u}},getTransitionProps:()=>({onEnter:EH(()=>{y(!1),a&&a()},l?.props.onEnter??LH),onExited:EH(()=>{y(!0),s&&s(),o&&M()},l?.props.onExited??LH)}),rootRef:f,portalRef:S,isTopModal:k,exited:g,hasTransition:v}}({...j,rootRef:n}),F={...j,exited:N},H=(e=>{const{open:t,exited:n,classes:r}=e;return Gh({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},DH,r)})(F),B={};if(void 0===c.props.tabIndex&&(B.tabIndex="-1"),_){const{onEnter:e,onExited:t}=D();B.onEnter=e,B.onExited=t}const V={slots:{root:p.Root,backdrop:p.Backdrop,...E},slotProps:{...h,...P}},[U,Y]=Ng("root",{ref:n,elementType:$H,externalForwardedProps:{...V,...A,component:d},getSlotProps:L,ownerState:F,className:Hh(s,H?.root,!F.open&&F.exited&&H?.hidden)}),[W,G]=Ng("backdrop",{ref:o?.ref,elementType:i,externalForwardedProps:V,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:e=>R({...e,onClick:t=>{w&&w(t),e?.onClick&&e.onClick(t)}}),className:Hh(o?.className,H?.backdrop),ownerState:F});return I||C||_&&!N?(0,O.jsx)(yg,{ref:$,container:u,disablePortal:y,children:(0,O.jsxs)(U,{...Y,children:[!x&&i?(0,O.jsx)(W,{...G}):null,(0,O.jsx)(Yv,{disableEnforceFocus:f,disableAutoFocus:m,disableRestoreFocus:v,isEnabled:z,open:C,children:e.cloneElement(c,B)})]})}):null}),_H=NH;function FH(e){return Ig("MuiPopover",e)}function HH(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function BH(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function VH(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function UH(e){return"function"==typeof e?e():e}wg("MuiPopover",["root","paper"]);const YH=bm(_H,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),WH=bm(Zv,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),GH=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiPopover"}),{action:i,anchorEl:o,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:c,className:u,container:d,elevation:p=8,marginThreshold:h=16,open:m,PaperProps:f={},slots:g={},slotProps:y={},transformOrigin:v={vertical:"top",horizontal:"left"},TransitionComponent:b,transitionDuration:x="auto",TransitionProps:I={},disableScrollLock:w=!1,...k}=r,S=e.useRef(),M={...r,anchorOrigin:a,anchorReference:l,elevation:p,marginThreshold:h,transformOrigin:v,TransitionComponent:b,transitionDuration:x,TransitionProps:I},C=(e=>{const{classes:t}=e;return Gh({root:["root"],paper:["paper"]},FH,t)})(M),P=e.useCallback(()=>{if("anchorPosition"===l)return s;const e=UH(o),t=(e&&1===e.nodeType?e:Xg(S.current).body).getBoundingClientRect();return{top:t.top+HH(t,a.vertical),left:t.left+BH(t,a.horizontal)}},[o,a.horizontal,a.vertical,s,l]),E=e.useCallback(e=>({vertical:HH(e,v.vertical),horizontal:BH(e,v.horizontal)}),[v.horizontal,v.vertical]),T=e.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=E(t);if("none"===l)return{top:null,left:null,transformOrigin:VH(n)};const r=P();let i=r.top-n.vertical,a=r.left-n.horizontal;const s=i+t.height,c=a+t.width,u=ay(UH(o)),d=u.innerHeight-h,p=u.innerWidth-h;if(null!==h&&id){const e=s-d;i-=e,n.vertical+=e}if(null!==h&&ap){const e=c-p;a-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(a)}px`,transformOrigin:VH(n)}},[o,l,P,E,h]),[A,j]=e.useState(m),L=e.useCallback(()=>{const e=S.current;if(!e)return;const t=T(e);null!==t.top&&e.style.setProperty("top",t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,j(!0)},[T]);e.useEffect(()=>(w&&window.addEventListener("scroll",L),()=>window.removeEventListener("scroll",L)),[o,w,L]),e.useEffect(()=>{m&&L()}),e.useImperativeHandle(i,()=>m?{updatePosition:()=>{L()}}:null,[m,L]),e.useEffect(()=>{if(!m)return;const e=function(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}(()=>{L()}),t=ay(UH(o));return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[o,m,L]);let R=x;const D={slots:{transition:b,...g},slotProps:{transition:I,paper:f,...y}},[$,z]=Ng("transition",{elementType:Km,externalForwardedProps:D,ownerState:M,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),L()},onExited:t=>{e.onExited?.(t),j(!1)}}),additionalProps:{appear:!0,in:m}});"auto"!==x||$.muiSupportAuto||(R=void 0);const N=d||(o?Xg(UH(o)).body:void 0),[_,{slots:F,slotProps:H,...B}]=Ng("root",{ref:n,elementType:YH,externalForwardedProps:{...D,...k},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:g.backdrop},slotProps:{backdrop:c$("function"==typeof y.backdrop?y.backdrop(M):y.backdrop,{invisible:!0})},container:N,open:m},ownerState:M,className:Hh(C.root,u)}),[V,U]=Ng("paper",{ref:S,className:C.paper,elementType:WH,externalForwardedProps:D,shouldForwardComponentProp:!0,additionalProps:{elevation:p,style:A?void 0:{opacity:0}},ownerState:M});return(0,O.jsx)(_,{...B,...!sH(_)&&{slots:F,slotProps:H,disableScrollLock:w},children:(0,O.jsx)($,{...z,timeout:R,children:(0,O.jsx)(V,{...U,children:c})})})}),KH=GH;function qH(e){return Ig("MuiMenu",e)}wg("MuiMenu",["root","paper","list"]);const XH={vertical:"top",horizontal:"right"},ZH={vertical:"top",horizontal:"left"},JH=bm(KH,{shouldForwardProp:e=>ym(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),QH=bm(WH,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),eB=bm(dy,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),tB=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiMenu"}),{autoFocus:i=!0,children:o,className:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:c,open:u,PaperProps:d={},PopoverClasses:p,transitionDuration:h="auto",TransitionProps:{onEntering:m,...f}={},variant:g="selectedMenu",slots:y={},slotProps:v={},...b}=r,x=qh(),I={...r,autoFocus:i,disableAutoFocusItem:s,MenuListProps:l,onEntering:m,PaperProps:d,transitionDuration:h,TransitionProps:f,variant:g},w=(e=>{const{classes:t}=e;return Gh({root:["root"],paper:["paper"],list:["list"]},qH,t)})(I),k=i&&!s&&u,S=e.useRef(null);let M=-1;e.Children.map(o,(t,n)=>{e.isValidElement(t)&&(t.props.disabled||("selectedMenu"===g&&t.props.selected||-1===M)&&(M=n))});const C={slots:y,slotProps:{list:l,transition:f,paper:d,...v}},P=fg({elementType:y.root,externalSlotProps:v.root,ownerState:I,className:[w.root,a]}),[E,T]=Ng("paper",{className:w.paper,elementType:QH,externalForwardedProps:C,shouldForwardComponentProp:!0,ownerState:I}),[A,j]=Ng("list",{className:Hh(w.list,l.className),elementType:eB,shouldForwardComponentProp:!0,externalForwardedProps:C,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{"Tab"===e.key&&(e.preventDefault(),c&&c(e,"tabKeyDown"))})(t),e.onKeyDown?.(t)}}),ownerState:I}),L="function"==typeof C.slotProps.transition?C.slotProps.transition(I):C.slotProps.transition;return(0,O.jsx)(JH,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?XH:ZH,slots:{root:y.root,paper:E,backdrop:y.backdrop,...y.transition&&{transition:y.transition}},slotProps:{root:P,paper:T,backdrop:"function"==typeof v.backdrop?v.backdrop(I):v.backdrop,transition:{...L,onEntering:(...e)=>{((e,t)=>{S.current&&S.current.adjustStyleForScrollbar(e,{direction:x?"rtl":"ltr"}),m&&m(e,t)})(...e),L?.onEntering?.(...e)}}},open:u,ref:n,transitionDuration:h,ownerState:I,...b,classes:p,children:(0,O.jsx)(A,{actions:S,autoFocus:i&&(-1===M||s),autoFocusItem:k,variant:g,...j,children:o})})});function nB(e){return nB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nB(e)}var rB=["itemId","children","className","editable","ownerState"];function iB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oB(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function cB(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||uB(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uB(e,t){if(e){if("string"==typeof e)return dB(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dB(e,t):void 0}}function dB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0){var e=new Set(L);return function(t){return e.has(he(t))}}return!1},[j,L,he]),ve=(0,e.useMemo)(function(){if(K&&0!==K.length){var e=new Set(K);return function(t){return e.has(t)}}},[K]),be=(0,e.useRef)(te||{});be.current=te||be.current||{};var xe=(0,e.useCallback)(function(e,t,n){var r=oB(oB({},be.current),{},aB({},e,t));be.current=r,ue&&(ue({sliderValues:r}),n&&ue({sliderChange:{itemId:e,value:t,event_timestamp:Date.now()}}))},[ue]),Ie=(0,e.useCallback)(function(e,t){ue&&ue({kebabAction:{itemId:e,action:t,event_timestamp:Date.now()}})},[ue]),we=(0,e.useMemo)(function(){return ee&&0!==ee.length?new Set(ee):null},[ee]),ke=(0,e.useMemo)(function(){return function(e){if(e&&"string"==typeof e){var t=e.match(gB);if(t){var n=t[1],r=null!=t[3]?t[3]:"6";return"var(--mantine-color-".concat(n,"-").concat(r,")")}return e}}(le)},[le]),Se=(0,e.useMemo)(function(){return{controlsItemSet:we,sliderValues:te||{},sliderMin:re,sliderMax:oe,sliderStep:se,sliderColor:ke,onSliderChange:xe,kebabMenuItems:ce||[],onKebabAction:Ie}},[we,te,re,oe,se,ke,ce,xe,Ie]),Me=(0,e.useMemo)(function(){var e={};return H&&(e.collapseIcon=n_(H)),B&&(e.expandIcon=n_(B)),V&&(e.endIcon=n_(V)),Q&&(e.item=xB),Object.keys(e).length>0?e:void 0},[H,B,V,Q]),Ce=(0,e.useCallback)(function(e,t){ue&&ue({selectedItems:t})},[ue]),Pe=(0,e.useCallback)(function(e,t){if(ue&&ue({expandedItems:t}),X&&ue&&t){var n,r=h||"id",i=y||"children",o=function(e,t){if(!e)return null;var n,a=lB(e);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(s[r]===t)return s;var l=o(s[i],t);if(l)return l}}catch(e){a.e(e)}finally{a.f()}return null},a=lB(t);try{for(a.s();!(n=a.n()).done;){var s=n.value,l=o(pe,s);if(l&&!l[i]){ue({lazyLoadRequest:{itemId:s,event_timestamp:Date.now()}});break}}}catch(e){a.e(e)}finally{a.f()}}},[ue,X,pe,h,y]),Ee=(0,e.useCallback)(function(e,t){ue&&ue({clickedItem:{itemId:t,event_timestamp:Date.now()}})},[ue]),Te=(0,e.useCallback)(function(e,t){ue&&ue({focusedItem:{itemId:t,event_timestamp:Date.now()}})},[ue]),Ae=(0,e.useCallback)(function(e,t){ue&&ue({editedItemLabel:{itemId:e,newLabel:t,event_timestamp:Date.now()}})},[ue]),Oe=(0,e.useRef)(c||[]);(0,e.useEffect)(function(){Oe.current=c||[]},[c]);var je=(0,e.useCallback)(function(e){var t=function(e,t,n,r){if(!e||!t||!t.itemId)return e;var i=n||"id",o=r||"children",a=JSON.parse(JSON.stringify(e)),s=null,l=function(e,n){if(null==n){var r=e.findIndex(function(e){return e[i]===t.itemId});return r>=0&&(s=e.splice(r,1)[0]),null!=s}var a,c=lB(e);try{for(c.s();!(a=c.n()).done;){var u=a.value;if(u[i]===n){var d=u[o]||[],p=d.findIndex(function(e){return e[i]===t.itemId});return p>=0&&(s=d.splice(p,1)[0]),null!=s}if(u[o]&&l(u[o],n))return!0}}catch(e){c.e(e)}finally{c.f()}return!1},c=function(e,t,n){if(null==t)return e.splice(n,0,s),!0;var r,a=lB(e);try{for(a.s();!(r=a.n()).done;){var l=r.value;if(l[i]===t)return l[o]||(l[o]=[]),l[o].splice(n,0,s),!0;if(l[o]&&c(l[o],t,n))return!0}}catch(e){a.e(e)}finally{a.f()}return!1};return l(a,t.oldPosition?t.oldPosition.parentId:null),s&&c(a,t.newPosition?t.newPosition.parentId:null,t.newPosition?t.newPosition.index:0),a}(Oe.current,e,h,y);Oe.current=t,ue&&ue({itemPositionChanged:{itemId:e.itemId,oldPosition:e.oldPosition,newPosition:e.newPosition,event_timestamp:Date.now()},orderedItems:t})},[ue,h,y]),Le=(0,e.useMemo)(function(){var e={};return _&&(e.height="number"==typeof _?"".concat(_,"px"):_),e},[_]);return n().createElement(WF,{theme:de},n().createElement("div",{id:a,style:Le},n().createElement(yB.Provider,{value:Se},n().createElement(vF,{items:pe||[],getItemId:he,getItemLabel:me,getItemChildren:fe,selectedItems:v,defaultSelectedItems:b,multiSelect:I,checkboxSelection:k,disableSelection:M,selectionPropagation:C,expandedItems:P,defaultExpandedItems:E,expansionTrigger:A,isItemEditable:ye,isItemDisabled:ge,disabledItemsFocusable:$,itemChildrenIndentation:N,sx:F,slots:Me,itemsReordering:G,isItemReorderable:ve,onItemPositionChange:je,onSelectedItemsChange:Ce,onExpandedItemsChange:Pe,onItemClick:Ee,onItemFocus:Te,onItemLabelChange:Ae,"aria-label":U,"aria-labelledby":Y}))))};IB.propTypes={id:i().string,licenseKey:i().string,items:i().arrayOf(i().object),getItemId:i().string,getItemLabel:i().string,getItemChildren:i().string,selectedItems:i().oneOfType([i().string,i().arrayOf(i().string)]),defaultSelectedItems:i().oneOfType([i().string,i().arrayOf(i().string)]),multiSelect:i().bool,checkboxSelection:i().bool,disableSelection:i().bool,selectionPropagation:i().exact({parents:i().bool,descendants:i().bool}),expandedItems:i().arrayOf(i().string),defaultExpandedItems:i().arrayOf(i().string),expansionTrigger:i().oneOf(["content","iconContainer"]),isItemEditable:i().bool,editableItems:i().arrayOf(i().string),disabledItems:i().arrayOf(i().string),disabledItemsFocusable:i().bool,itemChildrenIndentation:i().oneOfType([i().number,i().string]),height:i().oneOfType([i().number,i().string]),sx:i().object,collapseIcon:i().string,expandIcon:i().string,endIcon:i().string,ariaLabel:i().string,ariaLabelledBy:i().string,itemsReordering:i().bool,reorderableItems:i().arrayOf(i().string),itemPositionChanged:i().object,orderedItems:i().arrayOf(i().object),lazyLoading:i().bool,lazyLoadedChildren:i().object,lazyLoadRequest:i().exact({itemId:i().string,event_timestamp:i().number}),showItemControls:i().bool,controlsItems:i().arrayOf(i().string),sliderValues:i().object,sliderMin:i().number,sliderMax:i().number,sliderStep:i().number,sliderColor:i().string,kebabMenuItems:i().arrayOf(i().exact({label:i().string.isRequired,value:i().string.isRequired,icon:i().string})),sliderChange:i().exact({itemId:i().string,value:i().number,event_timestamp:i().number}),kebabAction:i().exact({itemId:i().string,action:i().string,event_timestamp:i().number}),clickedItem:i().exact({itemId:i().string,event_timestamp:i().number}),focusedItem:i().exact({itemId:i().string,event_timestamp:i().number}),editedItemLabel:i().exact({itemId:i().string,newLabel:i().string,event_timestamp:i().number}),setProps:i().func};const wB=IB;var kB=a(4353),SB=a.n(kB);const MB=["localeText"],CB=e.createContext(null),PB=function(t){const{localeText:n}=t,r=tt(t,MB),{adapter:i,localeText:o}=e.useContext(CB)??{utils:void 0,adapter:void 0,localeText:void 0},a=Lh({props:r,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:c,dateFormats:u,dateLibInstance:d,adapterLocale:p,localeText:h}=a,m=e.useMemo(()=>l({},h,o,n),[h,o,n]),f=e.useMemo(()=>{if(!c)return i||null;const e=new c({locale:p,formats:u,instance:d});if(!e.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/quickstart/#installation"].join("\n"));return e},[c,p,u,d,i]),g=e.useMemo(()=>f?{minDate:f.date("1900-01-01T00:00:00.000"),maxDate:f.date("2099-12-31T00:00:00.000")}:null,[f]),y=e.useMemo(()=>({utils:f,adapter:f,defaultDates:g,localeText:m}),[g,f,m]);return(0,O.jsx)(CB.Provider,{value:y,children:s})};var EB=a(8134),TB=a(445),AB=a(5750),OB=a(7872),jB=a(7375);kB.extend(AB),kB.extend(EB),kB.extend(OB),kB.extend(jB);const LB={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},RB={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",dayOfMonthFull:"Do",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},DB=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join("\n"),$B=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join("\n");class zB{isMUIAdapter=!0;isTimezoneCompatible=!0;lib="dayjs";escapedCharacters={start:"[",end:"]"};formatTokenMap=(()=>LB)();constructor({locale:e,formats:t}={}){this.locale=e,this.formats=l({},RB,t),kB.extend(TB)}setLocaleToValue=e=>{const t=this.getCurrentLocaleCode();return t===e.locale()?e:e.locale(t)};hasUTCPlugin=()=>void 0!==kB.utc;hasTimezonePlugin=()=>void 0!==kB.tz;isSame=(e,t,n)=>{const r=this.setTimezone(t,this.getTimezone(e));return e.format(n)===r.format(n)};cleanTimezone=e=>{switch(e){case"default":return;case"system":return kB.tz.guess();default:return e}};createSystemDate=e=>{let t;if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const n=kB.tz.guess();t="UTC"===n?kB(e):kB.tz(e,n)}else t=kB(e);return this.setLocaleToValue(t)};createUTCDate=e=>{if(!this.hasUTCPlugin())throw new Error(DB);return this.setLocaleToValue(kB.utc(e))};createTZDate=(e,t)=>{if(!this.hasUTCPlugin())throw new Error(DB);if(!this.hasTimezonePlugin())throw new Error($B);const n=void 0!==e&&!e.endsWith("Z");return this.setLocaleToValue(kB(e).tz(this.cleanTimezone(t),n))};getLocaleFormats=()=>{const e=kB.Ls;let t=e[this.locale||"en"];return void 0===t&&(t=e.en),t.formats};adjustOffset=e=>{if(!this.hasTimezonePlugin())return e;const t=this.getTimezone(e);if("UTC"!==t){const n=e.tz(this.cleanTimezone(t),!0);if(n.$offset===(e.$offset??0))return e;e.$offset=n.$offset}return e};date=(e,t="default")=>null===e?null:"UTC"===t?this.createUTCDate(e):"system"===t||"default"===t&&!this.hasTimezonePlugin()?this.createSystemDate(e):this.createTZDate(e,t);getInvalidDate=()=>kB(new Date("Invalid date"));getTimezone=e=>{if(this.hasTimezonePlugin()){const t=e.$x?.$timezone;if(t)return t}return this.hasUTCPlugin()&&e.isUTC()?"UTC":"system"};setTimezone=(e,t)=>{if(this.getTimezone(e)===t)return e;if("UTC"===t){if(!this.hasUTCPlugin())throw new Error(DB);return e.utc()}if("system"===t)return e.local();if(!this.hasTimezonePlugin()){if("default"===t)return e;throw new Error($B)}return this.setLocaleToValue(kB.tz(e,this.cleanTimezone(t)))};toJsDate=e=>e.toDate();parse=(e,t)=>""===e?null:kB(e,t,this.locale,!0);getCurrentLocaleCode=()=>this.locale||"en";is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||"");expandFormat=e=>{const t=this.getLocaleFormats();return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(e,n,r)=>{const i=r&&r.toUpperCase();return n||t[r]||t[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(e,t,n)=>t||n.slice(1))})};isValid=e=>null!=e&&e.isValid();format=(e,t)=>this.formatByString(e,this.formats[t]);formatByString=(e,t)=>this.setLocaleToValue(e).format(t);formatNumber=e=>e;isEqual=(e,t)=>null===e&&null===t||null!==e&&null!==t&&e.toDate().getTime()===t.toDate().getTime();isSameYear=(e,t)=>this.isSame(e,t,"YYYY");isSameMonth=(e,t)=>this.isSame(e,t,"YYYY-MM");isSameDay=(e,t)=>this.isSame(e,t,"YYYY-MM-DD");isSameHour=(e,t)=>e.isSame(t,"hour");isAfter=(e,t)=>e>t;isAfterYear=(e,t)=>this.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()>t.utc():e.isAfter(t,"year");isAfterDay=(e,t)=>this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()>t.utc():e.isAfter(t,"day");isBefore=(e,t)=>ethis.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()e>=t&&e<=n;startOfYear=e=>this.adjustOffset(e.startOf("year"));startOfMonth=e=>this.adjustOffset(e.startOf("month"));startOfWeek=e=>this.adjustOffset(this.setLocaleToValue(e).startOf("week"));startOfDay=e=>this.adjustOffset(e.startOf("day"));endOfYear=e=>this.adjustOffset(e.endOf("year"));endOfMonth=e=>this.adjustOffset(e.endOf("month"));endOfWeek=e=>this.adjustOffset(this.setLocaleToValue(e).endOf("week"));endOfDay=e=>this.adjustOffset(e.endOf("day"));addYears=(e,t)=>this.adjustOffset(e.add(t,"year"));addMonths=(e,t)=>this.adjustOffset(e.add(t,"month"));addWeeks=(e,t)=>this.adjustOffset(e.add(t,"week"));addDays=(e,t)=>this.adjustOffset(e.add(t,"day"));addHours=(e,t)=>this.adjustOffset(e.add(t,"hour"));addMinutes=(e,t)=>this.adjustOffset(e.add(t,"minute"));addSeconds=(e,t)=>this.adjustOffset(e.add(t,"second"));getYear=e=>e.year();getMonth=e=>e.month();getDate=e=>e.date();getHours=e=>e.hour();getMinutes=e=>e.minute();getSeconds=e=>e.second();getMilliseconds=e=>e.millisecond();setYear=(e,t)=>this.adjustOffset(e.set("year",t));setMonth=(e,t)=>this.adjustOffset(e.set("month",t));setDate=(e,t)=>this.adjustOffset(e.set("date",t));setHours=(e,t)=>this.adjustOffset(e.set("hour",t));setMinutes=(e,t)=>this.adjustOffset(e.set("minute",t));setSeconds=(e,t)=>this.adjustOffset(e.set("second",t));setMilliseconds=(e,t)=>this.adjustOffset(e.set("millisecond",t));getDaysInMonth=e=>e.daysInMonth();getWeekArray=e=>{const t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e));let r=0,i=t;const o=[];for(;ie.week();getDayOfWeek(e){return e.day()+1}getYearRange=([e,t])=>{const n=this.startOfYear(e),r=this.endOfYear(t),i=[];let o=n;for(;this.isBefore(o,r);)i.push(o),o=this.addYears(o,1);return i}}function NB(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let e=0;e"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",nextStepButtonLabel:"Next",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",timeRangePickerToolbarTitle:"Select time range",clockLabelText:(e,t)=>`Select ${e}. ${t?`Selected time is ${t}`:"No time selected"}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:e=>e?`Choose date, selected date is ${e}`:"Choose date",openTimePickerDialogue:e=>e?`Choose time, selected time is ${e}`:"Choose time",openRangePickerDialogue:e=>e?`Choose range, selected range is ${e}`:"Choose range",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},BB=HB;l({},HB);const VB=()=>{const t=e.useContext(CB);if(null===t)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join("\n"));if(null===t.adapter)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join("\n"));const n=e.useMemo(()=>l({},BB,t.localeText),[t.localeText]);return e.useMemo(()=>l({},t,{localeText:n}),[t,n])},UB=()=>VB().adapter,YB=()=>VB().localeText,WB=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t},GB=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=Hh(n?.className,o,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},a={...n,...i,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}({...i,...r}),s=WB(r),l=WB(i),c=t(a),u=Hh(c?.className,n?.className,o,i?.className,r?.className),d={...c?.style,...n?.style,...i?.style,...r?.style},p={...c,...n,...l,...s};return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}},KB=function(t){const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1,...a}=t,s=o?{}:function(e,t,n){return"function"==typeof e?e(t,n):e}(r,i),{props:l,internalRef:c}=GB({...a,externalSlotProps:s}),u=function(...t){const n=e.useRef(void 0),r=e.useCallback(e=>{const n=t.map(t=>{if(null==t)return null;if("function"==typeof t){const n=t,r=n(e);return"function"==typeof r?r:()=>{n(null)}}return t.current=e,()=>{t.current=null}});return()=>{n.forEach(e=>e?.())}},t);return e.useMemo(()=>t.every(e=>null==e)?null:e=>{n.current&&(n.current(),n.current=void 0),null!=e&&(n.current=r(e))},t)}(c,s?.ref,t.additionalProps?.ref);return function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(n,{...l,ref:u},i)},qB=(ob((0,O.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),ob((0,O.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft")),XB=ob((0,O.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),ZB=(ob((0,O.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),ob((0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,O.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),ob((0,O.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),ob((0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,O.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),ob((0,O.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),e=>e),JB=(()=>{let e=ZB;return{configure(t){e=t},generate:t=>e(t),reset(){e=ZB}}})(),QB={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function eV(e,t,n="Mui"){const r=QB[t];return r?`${n}-${r}`:`${JB.generate(e)}-${t}`}function tV(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=eV(e,t,n)}),r}function nV(e){return eV("MuiPickersArrowSwitcher",e)}tV("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const rV=e.createContext({ownerState:{isPickerDisabled:!1,isPickerReadOnly:!1,isPickerValueEmpty:!1,isPickerOpen:!1,pickerVariant:"desktop",pickerOrientation:"portrait"},rootRefObject:{current:null},labelId:void 0,dismissViews:()=>{},hasUIView:!0,getCurrentViewMode:()=>"UI",triggerElement:null,viewContainerRole:null,defaultActionBarActions:[],onPopperExited:void 0}),iV=()=>e.useContext(rV),oV=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId","classes"],aV=["ownerState"],sV=["ownerState"],lV=bm("div",{name:"MuiPickersArrowSwitcher",slot:"Root"})({display:"flex"}),cV=bm("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer"})(({theme:e})=>({width:e.spacing(3)})),uV=bm(sv,{name:"MuiPickersArrowSwitcher",slot:"Button"})({variants:[{props:{isButtonHidden:!0},style:{visibility:"hidden"}}]}),dV=e.forwardRef(function(e,t){const n=fS(),r=Lh({props:e,name:"MuiPickersArrowSwitcher"}),{children:i,className:o,slots:a,slotProps:s,isNextDisabled:c,isNextHidden:u,onGoToNext:d,nextLabel:p,isPreviousDisabled:h,isPreviousHidden:m,onGoToPrevious:f,previousLabel:g,labelId:y,classes:v}=r,b=tt(r,oV),{ownerState:x}=iV(),I=(e=>NB({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},nV,e))(v),w={isDisabled:c,isHidden:u,goTo:d,label:p},k={isDisabled:h,isHidden:m,goTo:f,label:g},S=a?.previousIconButton??uV,M=KB({elementType:S,externalSlotProps:s?.previousIconButton,additionalProps:{size:"medium",title:k.label,"aria-label":k.label,disabled:k.isDisabled,edge:"end",onClick:k.goTo},ownerState:l({},x,{isButtonHidden:k.isHidden??!1}),className:Hh(I.button,I.previousIconButton)}),C=a?.nextIconButton??uV,P=KB({elementType:C,externalSlotProps:s?.nextIconButton,additionalProps:{size:"medium",title:w.label,"aria-label":w.label,disabled:w.isDisabled,edge:"start",onClick:w.goTo},ownerState:l({},x,{isButtonHidden:w.isHidden??!1}),className:Hh(I.button,I.nextIconButton)}),E=a?.leftArrowIcon??qB,T=tt(KB({elementType:E,externalSlotProps:s?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:x,className:I.leftArrowIcon}),aV),A=a?.rightArrowIcon??XB,j=tt(KB({elementType:A,externalSlotProps:s?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:x,className:I.rightArrowIcon}),sV);return(0,O.jsxs)(lV,l({ref:t,className:Hh(I.root,o),ownerState:x},b,{children:[(0,O.jsx)(S,l({},M,{children:n?(0,O.jsx)(A,l({},j)):(0,O.jsx)(E,l({},T))})),i?(0,O.jsx)(Nv,{variant:"subtitle1",component:"span",id:y,children:i}):(0,O.jsx)(cV,{className:I.spacer,ownerState:x}),(0,O.jsx)(C,l({},P,{children:n?(0,O.jsx)(E,l({},T)):(0,O.jsx)(A,l({},j))}))]}))}),pV=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?"am"===t?e-12:e+12:e,hV=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),mV=(e,t)=>(n,r)=>e?t.isAfter(n,r):hV(n,t)>hV(r,t),fV="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,gV=function(t){const n=e.useRef(t);return fV(()=>{n.current=t}),e.useRef((...e)=>(0,n.current)(...e)).current};function yV(t){const{controlled:n,default:r,name:i,state:o="value"}=t,{current:a}=e.useRef(void 0!==n),[s,l]=e.useState(r);return[a?n:s,e.useCallback(e=>{a||l(e)},[])]}const vV={hasNextStep:!1,hasSeveralSteps:!1,goToNextStep:()=>{},areViewsInSameStep:()=>!0};const bV=bm("div",{slot:"internal",shouldForwardProp:void 0})({overflow:"hidden",width:320,maxHeight:336,display:"flex",flexDirection:"column",margin:"0 auto"});function xV(e){return eV("MuiTimeClock",e)}tV("MuiTimeClock",["root","arrowSwitcher"]);const IV=110,wV=110,kV=IV-IV,SV=0-wV,MV=(e,t,n)=>{const r=t-IV,i=n-wV;let o=(Math.atan2(kV,SV)-Math.atan2(r,i))*(180/Math.PI);o=Math.round(o/e)*e,o%=360;const a=r**2+i**2;return{value:Math.floor(o/e)||0,distance:Math.sqrt(a)}};function CV(e){return eV("MuiClockPointer",e)}tV("MuiClockPointer",["root","thumb"]);const PV=["className","classes","isBetweenTwoClockValues","isInner","type","viewValue"],EV=bm("div",{name:"MuiClockPointer",slot:"Root"})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{isClockPointerAnimated:!0},style:{transition:e.transitions.create(["transform","height"])}}]})),TV=bm("div",{name:"MuiClockPointer",slot:"Thumb"})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - 18px)",border:`16px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{isClockPointerBetweenTwoValues:!1},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function AV(t){const n=Lh({props:t,name:"MuiClockPointer"}),{className:r,classes:i,isBetweenTwoClockValues:o,isInner:a,type:s,viewValue:c}=n,u=tt(n,PV),d=e.useRef(s);e.useEffect(()=>{d.current=s},[s]);const{ownerState:p}=iV(),h=l({},p,{isClockPointerAnimated:d.current!==s,isClockPointerBetweenTwoValues:o}),m=(e=>NB({root:["root"],thumb:["thumb"]},CV,e))(i);return(0,O.jsx)(EV,l({style:(()=>{let e=360/("hours"===s?12:60)*c;return"hours"===s&&c>12&&(e-=360),{height:Math.round(220*(a?.26:.4)),transform:`rotateZ(${e}deg)`}})(),className:Hh(m.root,r),ownerState:h},u,{children:(0,O.jsx)(TV,{ownerState:h,className:m.thumb})}))}function OV(e){return eV("MuiClock",e)}tV("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const jV=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},LV=(e,t,n)=>"date"===n?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),RV=(e,t)=>{const n=e.setHours(e.date(),"am"===t?2:14);return e.format(n,"meridiem")},DV=bm("div",{name:"MuiClock",slot:"Root"})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),$V=bm("div",{name:"MuiClock",slot:"Clock"})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),zV=bm("div",{name:"MuiClock",slot:"Wrapper"})({"&:focus":{outline:"none"}}),NV=bm("div",{name:"MuiClock",slot:"SquareMask"})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{isClockDisabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),_V=bm("div",{name:"MuiClock",slot:"Pin"})(({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),FV=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:36,variants:[{props:{clockMeridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),HV=bm(sv,{name:"MuiClock",slot:"AmButton"})(({theme:e})=>l({},FV(e,"am"),{position:"absolute",left:8})),BV=bm(sv,{name:"MuiClock",slot:"PmButton"})(({theme:e})=>l({},FV(e,"pm"),{position:"absolute",right:8})),VV=bm(Nv,{name:"MuiClock",slot:"MeridiemText"})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function UV(t){const n=Lh({props:t,name:"MuiClock"}),{ampm:r,ampmInClock:i,autoFocus:o,children:a,value:s,handleMeridiemChange:c,isTimeDisabled:u,meridiemMode:d,minutesStep:p=1,onChange:h,selectedId:m,type:f,viewValue:g,viewRange:[y,v],disabled:b=!1,readOnly:x,className:I,classes:w}=n,k=UB(),S=YB(),{ownerState:M}=iV(),C=l({},M,{isClockDisabled:b,clockMeridiemMode:d}),P=e.useRef(!1),E=((e,t)=>NB({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton","am"===t.clockMeridiemMode&&"selected"],pmButton:["pmButton","pm"===t.clockMeridiemMode&&"selected"],meridiemText:["meridiemText"]},OV,e))(w,C),T=u(g,f),A=!r&&"hours"===f&&(g<1||g>12),j=(e,t)=>{b||x||u(e,f)||h(e,t)},L=(e,t)=>{let{offsetX:n,offsetY:i}=e;if(void 0===n){const t=e.target.getBoundingClientRect();n=e.changedTouches[0].clientX-t.left,i=e.changedTouches[0].clientY-t.top}const o="seconds"===f||"minutes"===f?((e,t,n=1)=>{const r=6*n;let{value:i}=MV(r,e,t);return i=i*n%60,i})(n,i,p):((e,t,n)=>{const{value:r,distance:i}=MV(30,e,t);let o=r||12;return n?o%=12:i<74&&(o+=12,o%=24),o})(n,i,Boolean(r));j(o,t)},R=e=>{P.current=!0,L(e,"shallow")},D="hours"!==f&&g%5!=0,$="minutes"===f?p:1,z=e.useRef(null);fV(()=>{o&&z.current.focus()},[o]);const N=e=>Math.max(y,Math.min(v,e)),_=e=>(e+(v+1))%(v+1);return(0,O.jsxs)(DV,{className:Hh(E.root,I),children:[(0,O.jsxs)($V,{className:E.clock,children:[(0,O.jsx)(NV,{onTouchMove:R,onTouchStart:R,onTouchEnd:e=>{P.current&&(L(e,"finish"),P.current=!1),e.preventDefault()},onMouseUp:e=>{P.current&&(P.current=!1),L(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&L(e.nativeEvent,"shallow")},ownerState:C,className:E.squareMask}),!T&&(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(_V,{className:E.pin}),null!=s&&(0,O.jsx)(AV,{type:f,viewValue:g,isInner:A,isBetweenTwoClockValues:D})]}),(0,O.jsx)(zV,{"aria-activedescendant":m,"aria-label":S.clockLabelText(f,null==s?null:k.format(s,r?"fullTime12h":"fullTime24h")),ref:z,role:"listbox",onKeyDown:e=>{if(!P.current)switch(e.key){case"Home":j(y,"partial"),e.preventDefault();break;case"End":j(v,"partial"),e.preventDefault();break;case"ArrowUp":j(_(g+$),"partial"),e.preventDefault();break;case"ArrowDown":j(_(g-$),"partial"),e.preventDefault();break;case"PageUp":j(N(g+5),"partial"),e.preventDefault();break;case"PageDown":j(N(g-5),"partial"),e.preventDefault();break;case"Enter":case" ":j(g,"finish"),e.preventDefault()}},tabIndex:0,className:E.wrapper,children:a})]}),r&&i&&(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(HV,{onClick:x?void 0:()=>c("am"),disabled:b||null===d,ownerState:C,className:E.amButton,title:RV(k,"am"),children:(0,O.jsx)(VV,{variant:"caption",className:E.meridiemText,children:RV(k,"am")})}),(0,O.jsx)(BV,{disabled:b||null===d,onClick:x?void 0:()=>c("pm"),ownerState:C,className:E.pmButton,title:RV(k,"pm"),children:(0,O.jsx)(VV,{variant:"caption",className:E.meridiemText,children:RV(k,"pm")})})]})]})}function YV(e){return eV("MuiClockNumber",e)}const WV=tV("MuiClockNumber",["root","selected","disabled"]),GV=["className","classes","disabled","index","inner","label","selected"],KV=bm("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${WV.disabled}`]:t.disabled},{[`&.${WV.selected}`]:t.selected}]})(({theme:e})=>({height:36,width:36,position:"absolute",left:"calc((100% - 36px) / 2)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${WV.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${WV.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{isClockNumberInInnerRing:!0},style:l({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function qV(e){const t=Lh({props:e,name:"MuiClockNumber"}),{className:n,classes:r,disabled:i,index:o,inner:a,label:s,selected:c}=t,u=tt(t,GV),{ownerState:d}=iV(),p=l({},d,{isClockNumberInInnerRing:a,isClockNumberSelected:c,isClockNumberDisabled:i}),h=((e,t)=>NB({root:["root",t.isClockNumberSelected&&"selected",t.isClockNumberDisabled&&"disabled"]},YV,e))(r,p),m=o%12/12*Math.PI*2-Math.PI/2,f=91*(a?.65:1),g=Math.round(Math.cos(m)*f),y=Math.round(Math.sin(m)*f);return(0,O.jsx)(KV,l({className:Hh(h.root,n),"aria-disabled":!!i||void 0,"aria-selected":!!c||void 0,role:"option",style:{transform:`translate(${g}px, ${y+92}px`},ownerState:p},u,{children:s}))}const XV=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:i,adapter:o})=>{const a=t?o.getHours(t):null,s=[],l=e?12:23,c=t=>null!==a&&(e?12===t?12===a||0===a:a===t||a-12===t:a===t);for(let t=e?1:0;t<=l;t+=1){let a=t.toString();0===t&&(a="00");const l=!e&&(0===t||t>12);a=o.formatNumber(a);const u=c(t);s.push((0,O.jsx)(qV,{id:u?i:void 0,index:t,inner:l,selected:u,disabled:r(t),label:a,"aria-label":n(a)},t))}return s},ZV=({adapter:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:i})=>{const o=e.formatNumber;return[[5,o("05")],[10,o("10")],[15,o("15")],[20,o("20")],[25,o("25")],[30,o("30")],[35,o("35")],[40,o("40")],[45,o("45")],[50,o("50")],[55,o("55")],[0,o("00")]].map(([e,o],a)=>{const s=e===t;return(0,O.jsx)(qV,{label:o,id:s?i:void 0,index:a+1,inner:!1,disabled:n(e),selected:s,"aria-label":r(o)},e)})},JV=1,QV=2,eU=3,tU=5,nU=6,rU=7,iU=(e,t,n)=>{if(t===JV)return e.startOfYear(n);if(t===QV)return e.startOfMonth(n);if(t===eU)return e.startOfDay(n);let r=n;return t{let{value:t,referenceDate:n}=e,r=tt(e,oU);return r.adapter.isValid(t)?t:null!=n?n:(({props:e,adapter:t,granularity:n,timezone:r,getTodayDate:i})=>{let o=i?i():iU(t,n,LV(t,r));null!=e.minDate&&t.isAfterDay(e.minDate,o)&&(o=iU(t,n,e.minDate)),null!=e.maxDate&&t.isBeforeDay(e.maxDate,o)&&(o=iU(t,n,e.maxDate));const a=mV(e.disableIgnoringDatePartForTimeValidation??!1,t);return null!=e.minTime&&a(e.minTime,o)&&(o=iU(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:jV(t,o,e.minTime))),null!=e.maxTime&&a(o,e.maxTime)&&(o=iU(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:jV(t,o,e.maxTime))),o})(r)},cleanValue:(e,t)=>e.isValid(t)?t:null,areValuesEqual:(e,t,n)=>!e.isValid(t)&&null!=t&&!e.isValid(n)&&null!=n||e.isEqual(t,n),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>null==n?null:e.setTimezone(n,t)},sU=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","classes","disabled","readOnly","timezone"],lU=bm(bV,{name:"MuiTimeClock",slot:"Root"})({display:"flex",flexDirection:"column",position:"relative"}),cU=bm(dV,{name:"MuiTimeClock",slot:"ArrowSwitcher"})({position:"absolute",right:12,top:15}),uU=["hours","minutes"],dU=e.forwardRef(function(t,n){const r=UB(),i=Lh({props:t,name:"MuiTimeClock"}),{ampm:o=r.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:s,slots:c,slotProps:u,value:d,defaultValue:p,referenceDate:h,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:f,minTime:g,disableFuture:y,disablePast:v,minutesStep:b=1,shouldDisableTime:x,showViewSwitcher:I,onChange:w,view:k,views:S=uU,openTo:M,onViewChange:C,focusedView:P,onFocusedViewChange:E,className:T,classes:A,disabled:j,readOnly:L,timezone:R}=i,D=tt(i,sU),{value:$,handleValueChange:z,timezone:N}=(({name:t,timezone:n,value:r,defaultValue:i,referenceDate:o,onChange:a,valueManager:s})=>{const l=UB(),[c,u]=yV({name:t,state:"value",controlled:r,default:i??s.emptyValue}),d=e.useMemo(()=>s.getTimezone(l,c),[l,s,c]),p=gV(e=>null==d?e:s.setTimezone(l,d,e)),h=e.useMemo(()=>n||d||(o?l.getTimezone(Array.isArray(o)?o[0]:o):"default"),[n,d,o,l]);return{value:e.useMemo(()=>s.setTimezone(l,h,c),[s,l,h,c]),handleValueChange:gV((e,...t)=>{const n=p(e);u(n),a?.(n,...t)}),timezone:h}})({name:"TimeClock",timezone:R,value:d,defaultValue:p,referenceDate:h,onChange:w,valueManager:aU}),_=(({value:t,referenceDate:n,adapter:r,props:i,timezone:o})=>{const a=e.useMemo(()=>aU.getInitialReferenceValue({value:t,adapter:r,props:i,referenceDate:n,granularity:eU,timezone:o,getTodayDate:()=>LV(r,o,"date")}),[n,o]);return t??a})({value:$,referenceDate:h,adapter:r,props:i,timezone:N}),F=YB(),H=(t=>{const n=UB(),r=e.useRef(void 0);return void 0===r.current&&(r.current=n.date(void 0,t)),r.current})(N),B=function(t){if(void 0!==FB){const e=FB();return t??e}return function(t){const[n,r]=e.useState(t),i=t||n;return e.useEffect(()=>{null==n&&(_B+=1,r(`mui-${_B}`))},[n]),i}(t)}(),{ownerState:V}=iV(),{view:U,setView:Y,previousView:W,nextView:G,setValueAndGoToNextView:K}=function({onChange:t,onViewChange:n,openTo:r,view:i,views:o,autoFocus:a,focusedView:s,onFocusedViewChange:c,getStepNavigation:u}){const d=e.useRef(r),p=e.useRef(o),h=e.useRef(o.includes(r)?r:o[0]),[m,f]=yV({name:"useViews",state:"view",controlled:i,default:h.current}),g=e.useRef(a?m:null),[y,v]=yV({name:"useViews",state:"focusedView",controlled:s,default:g.current}),b=u?u({setView:f,view:m,defaultView:h.current,views:o}):vV;e.useEffect(()=>{(d.current&&d.current!==r||p.current&&p.current.some(e=>!o.includes(e)))&&(f(o.includes(r)?r:o[0]),p.current=o,d.current=r)},[r,f,m,o]);const x=o.indexOf(m),I=o[x-1]??null,w=o[x+1]??null,k=gV((e,t)=>{v(t?e:t=>e===t?null:t),c?.(e,t)}),S=gV(e=>{k(e,!0),e!==m&&(f(e),n&&n(e))}),M=gV(()=>{w&&S(w)}),C=gV((e,n,r)=>{const i="finish"===n,a=r?o.indexOf(r)o.isValid(t)?t:null,[o,t]),s=((e,t)=>e?t.getHours(e)>=12?"pm":"am":null)(a,o),l=e.useCallback(e=>{const t=null==a?null:((e,t,n,r)=>{const i=pV(r.getHours(e),t,n);return r.setHours(e,i)})(a,e,Boolean(n),o);r(t,i??"partial")},[n,a,r,i,o]);return{meridiemMode:s,handleMeridiemChange:l}}(_,o,K),Z=e.useCallback((e,t)=>{const n=mV(m,r),i="hours"===t||"minutes"===t&&S.includes("seconds"),a=({start:e,end:t})=>!(g&&n(g,t)||f&&n(e,f)||y&&n(e,H)||v&&n(H,i?t:e)),s=(e,n=1)=>{if(e%n!==0)return!1;if(x)switch(t){case"hours":return!x(r.setHours(_,e),"hours");case"minutes":return!x(r.setMinutes(_,e),"minutes");case"seconds":return!x(r.setSeconds(_,e),"seconds");default:return!1}return!0};switch(t){case"hours":{const t=pV(e,q,o),n=r.setHours(_,t);return r.getHours(n)!==t||(!a({start:r.setSeconds(r.setMinutes(n,0),0),end:r.setSeconds(r.setMinutes(n,59),59)})||!s(t))}case"minutes":{const t=r.setMinutes(_,e);return!a({start:r.setSeconds(t,0),end:r.setSeconds(t,59)})||!s(e,b)}case"seconds":{const t=r.setSeconds(_,e);return!a({start:t,end:t})||!s(e)}default:throw new Error("not supported")}},[o,_,m,f,q,g,b,x,r,y,v,H,S]),J=e.useMemo(()=>{switch(U){case"hours":{const e=(e,t)=>{const n=pV(e,q,o);K(r.setHours(_,n),t,"hours")},t=r.getHours(_);let n;return n=o?t>12?[12,23]:[0,11]:[0,23],{onChange:e,viewValue:t,children:XV({value:$,adapter:r,ampm:o,onChange:e,getClockNumberText:F.hoursClockNumberText,isDisabled:e=>j||Z(e,"hours"),selectedId:B}),viewRange:n}}case"minutes":{const e=r.getMinutes(_),t=(e,t)=>{K(r.setMinutes(_,e),t,"minutes")};return{viewValue:e,onChange:t,children:ZV({adapter:r,value:e,onChange:t,getClockNumberText:F.minutesClockNumberText,isDisabled:e=>j||Z(e,"minutes"),selectedId:B}),viewRange:[0,59]}}case"seconds":{const e=r.getSeconds(_),t=(e,t)=>{K(r.setSeconds(_,e),t,"seconds")};return{viewValue:e,onChange:t,children:ZV({adapter:r,value:e,onChange:t,getClockNumberText:F.secondsClockNumberText,isDisabled:e=>j||Z(e,"seconds"),selectedId:B}),viewRange:[0,59]}}default:throw new Error("You must provide the type for ClockView")}},[U,r,$,o,F.hoursClockNumberText,F.minutesClockNumberText,F.secondsClockNumberText,q,K,_,Z,B,j]),Q=(e=>NB({root:["root"],arrowSwitcher:["arrowSwitcher"]},xV,e))(A);return(0,O.jsxs)(lU,l({ref:n,className:Hh(Q.root,T),ownerState:V},D,{children:[(0,O.jsx)(UV,l({autoFocus:s??!!P,ampmInClock:a&&S.includes("hours"),value:$,type:U,ampm:o,minutesStep:b,isTimeDisabled:Z,meridiemMode:q,handleMeridiemChange:X,selectedId:B,disabled:j,readOnly:L},J)),I&&(0,O.jsx)(cU,{className:Q.arrowSwitcher,slots:c,slotProps:u,onGoToPrevious:()=>Y(W),isPreviousDisabled:!W,previousLabel:F.openPreviousView,onGoToNext:()=>Y(G),isNextDisabled:!G,nextLabel:F.openNextView,ownerState:V})]}))});function pU(){return pU=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Cm(n.color)}`]]}})(wm(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:qy||{animation:`${Gy} 1.4s linear infinite`}},...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Jy=bm("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),Qy=bm("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Cm(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(wm(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:Xy||{animation:`${Ky} 1.4s ease-in-out infinite`}}]}))),ev=e.forwardRef(function(e,t){const n=Mm({props:e,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:o=!1,size:a=40,style:s,thickness:l=3.6,value:c=0,variant:u="indeterminate",...d}=n,p={...n,color:i,disableShrink:o,size:a,thickness:l,value:c,variant:u},h=(e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e;return Gh({root:["root",n,`color${Cm(r)}`],svg:["svg"],circle:["circle",`circle${Cm(n)}`,i&&"circleDisableShrink"]},Wy,t)})(p),m={},f={},g={};if("determinate"===u){const e=2*Math.PI*((44-l)/2);m.strokeDasharray=e.toFixed(3),g["aria-valuenow"]=Math.round(c),m.strokeDashoffset=`${((100-c)/100*e).toFixed(3)}px`,f.transform="rotate(-90deg)"}return(0,O.jsx)(Zy,{className:Hh(h.root,r),style:{width:a,height:a,...f,...s},ownerState:p,ref:t,role:"progressbar",...g,...d,children:(0,O.jsx)(Jy,{className:h.svg,ownerState:p,viewBox:"22 22 44 44",children:(0,O.jsx)(Qy,{className:h.circle,style:m,ownerState:p,cx:44,cy:44,r:(44-l)/2,fill:"none",strokeWidth:l})})})}),tv=ev;function nv(e){return Ig("MuiIconButton",e)}const rv=wg("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),iv=bm(Yy,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${Cm(n.color)}`],n.edge&&t[`edge${Cm(n.edge)}`],t[`size${Cm(n.size)}`]]}})(wm(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:op(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),wm(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:op((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${rv.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${rv.loading}`]:{color:"transparent"}}))),ov=bm("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),av=e.forwardRef(function(e,t){const n=Mm({props:e,name:"MuiIconButton"}),{edge:r=!1,children:i,className:o,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium",id:u,loading:d=null,loadingIndicator:p,...h}=n,m=Dg(u),f=p??(0,O.jsx)(tv,{"aria-labelledby":m,color:"inherit",size:16}),g={...n,edge:r,color:a,disabled:s,disableFocusRipple:l,loading:d,loadingIndicator:f,size:c},y=(e=>{const{classes:t,disabled:n,color:r,edge:i,size:o,loading:a}=e;return Gh({root:["root",a&&"loading",n&&"disabled","default"!==r&&`color${Cm(r)}`,i&&`edge${Cm(i)}`,`size${Cm(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},nv,t)})(g);return(0,O.jsxs)(iv,{id:d?m:u,className:Hh(y.root,o),centerRipple:!0,focusRipple:!l,disabled:s||d,ref:t,...h,ownerState:g,children:["boolean"==typeof d&&(0,O.jsx)("span",{className:y.loadingWrapper,style:{display:"contents"},children:(0,O.jsx)(ov,{className:y.loadingIndicator,ownerState:g,children:d&&f})}),i]})}),sv=av;function lv(e){return Ig("MuiButton",e)}const cv=wg("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),uv=e.createContext({}),dv=e.createContext(void 0),pv=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],hv=bm(Yy,{shouldForwardProp:e=>ym(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Cm(n.color)}`],t[`size${Cm(n.size)}`],t[`${n.variant}Size${Cm(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(wm(({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],n="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${cv.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${cv.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${cv.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${cv.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:op(e.palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:op(e.palette[t].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:op(e.palette[t].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:op(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:op(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${cv.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${cv.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${cv.loading}`]:{color:"transparent"}}}]}})),mv=bm("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${Cm(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...pv]})),fv=bm("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${Cm(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...pv]})),gv=bm("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),yv=bm("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),vv=e.forwardRef(function(t,n){const r=e.useContext(uv),i=e.useContext(dv),o=Mm({props:cc(r,t),name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:c,disabled:u=!1,disableElevation:d=!1,disableFocusRipple:p=!1,endIcon:h,focusVisibleClassName:m,fullWidth:f=!1,id:g,loading:y=null,loadingIndicator:v,loadingPosition:b="center",size:x="medium",startIcon:I,type:w,variant:k="text",...S}=o,M=Dg(g),C=v??(0,O.jsx)(tv,{"aria-labelledby":M,color:"inherit",size:16}),P={...o,color:s,component:l,disabled:u,disableElevation:d,disableFocusRipple:p,fullWidth:f,loading:y,loadingIndicator:C,loadingPosition:b,size:x,type:w,variant:k},E=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,loading:a,loadingPosition:s,classes:l}=e,c=Gh({root:["root",a&&"loading",o,`${o}${Cm(t)}`,`size${Cm(i)}`,`${o}Size${Cm(i)}`,`color${Cm(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${Cm(s)}`],startIcon:["icon","startIcon",`iconSize${Cm(i)}`],endIcon:["icon","endIcon",`iconSize${Cm(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},lv,l);return{...l,...c}})(P),T=(I||y&&"start"===b)&&(0,O.jsx)(mv,{className:E.startIcon,ownerState:P,children:I||(0,O.jsx)(yv,{className:E.loadingIconPlaceholder,ownerState:P})}),A=(h||y&&"end"===b)&&(0,O.jsx)(fv,{className:E.endIcon,ownerState:P,children:h||(0,O.jsx)(yv,{className:E.loadingIconPlaceholder,ownerState:P})}),j=i||"",L="boolean"==typeof y?(0,O.jsx)("span",{className:E.loadingWrapper,style:{display:"contents"},children:y&&(0,O.jsx)(gv,{className:E.loadingIndicator,ownerState:P,children:C})}):null;return(0,O.jsxs)(hv,{ownerState:P,className:Hh(r.className,E.root,c,j),component:l,disabled:u||y,focusRipple:!p,focusVisibleClassName:Hh(E.focusVisible,m),ref:n,type:w,id:y?M:g,...S,classes:E,children:[T,"end"!==b&&L,a,"end"===b&&L,A]})}),bv=l({},{baseButton:vv,baseIconButton:sv},{});function xv(e){return Ig("MuiListItemIcon",e)}const Iv=wg("MuiListItemIcon",["root","alignItemsFlexStart"]);function wv(e){return Ig("MuiListItemText",e)}const kv=wg("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Sv(e){return Ig("MuiMenuItem",e)}const Mv=wg("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Cv=bm(Yy,{shouldForwardProp:e=>ym(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(wm(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Mv.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:op(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Mv.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:op(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Mv.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:op(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:op(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Mv.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Mv.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${hy.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${hy.inset}`]:{marginLeft:52},[`& .${kv.root}`]:{marginTop:0,marginBottom:0},[`& .${kv.inset}`]:{paddingLeft:36},[`& .${Iv.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${Iv.root} svg`]:{fontSize:"1.25rem"}}}]}))),Pv=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:p,...h}=r,m=e.useContext(Zg),f=e.useMemo(()=>({dense:a||m.dense||!1,disableGutters:l}),[m.dense,a,l]),g=e.useRef(null);iy(()=>{i&&g.current&&g.current.focus()},[i]);const y={...r,dense:f.dense,divider:s,disableGutters:l},v=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:a}=e,s=Gh({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},Sv,a);return{...a,...s}})(r),b=Vm(g,n);let x;return r.disabled||(x=void 0!==d?d:-1),(0,O.jsx)(Zg.Provider,{value:f,children:(0,O.jsx)(Cv,{ref:b,role:u,tabIndex:x,component:o,focusVisibleClassName:Hh(v.focusVisible,c),className:Hh(v.root,p),...h,ownerState:y,classes:v})})}),Ev=Pv,Tv=bm("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(wm(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),Av=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiListItemIcon"}),{className:i,...o}=r,a=e.useContext(Zg),s={...r,alignItems:a.alignItems},l=(e=>{const{alignItems:t,classes:n}=e;return Gh({root:["root","flex-start"===t&&"alignItemsFlexStart"]},xv,n)})(s);return(0,O.jsx)(Tv,{className:Hh(l.root,i),ownerState:s,ref:n,...o})});function Ov(e){return Ig("MuiTypography",e)}const jv=wg("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Lv={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Rv=function(e){const{sx:t,...n}=e,{systemProps:r,otherProps:i}=(e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??vu;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t})(n);let o;return o=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return pc(n)?{...r,...n}:r}:{...r,...t},{...i,sx:o}},Dv=bm("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${Cm(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(wm(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([e,t])=>"inherit"!==e&&t&&"object"==typeof t).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>"string"==typeof e).map(([t])=>({props:{color:`text${Cm(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>"inherit"!==e.align,style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),$v={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},zv=e.forwardRef(function(e,t){const{color:n,...r}=Mm({props:e,name:"MuiTypography"}),i=Rv({...r,...!Lv[n]&&{color:n}}),{align:o="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=$v,...h}=i,m={...i,align:o,color:n,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:p},f=s||(u?"p":p[d]||$v[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e;return Gh({root:["root",o,"inherit"!==e.align&&`align${Cm(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]},Ov,a)})(m);return(0,O.jsx)(Dv,{as:f,ref:t,className:Hh(g.root,a),...h,ownerState:m,style:{..."inherit"!==o&&{"--Typography-textAlign":o},...h.style}})}),Nv=zv,_v=bm("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${kv.primary}`]:t.primary},{[`& .${kv.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${jv.root}:where(& .${kv.primary})`]:{display:"block"},[`.${jv.root}:where(& .${kv.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Fv=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiListItemText"}),{children:i,className:o,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d,slots:p={},slotProps:h={},...m}=r,{dense:f}=e.useContext(Zg);let g=null!=l?l:i,y=u;const v={...r,disableTypography:a,inset:s,primary:!!g,secondary:!!y,dense:f},b=(e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return Gh({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},wv,t)})(v),x={slots:p,slotProps:{primary:c,secondary:d,...h}},[I,w]=Ng("root",{className:Hh(b.root,o),elementType:_v,externalForwardedProps:{...x,...m},ownerState:v,ref:n}),[k,S]=Ng("primary",{className:b.primary,elementType:Nv,externalForwardedProps:x,ownerState:v}),[M,C]=Ng("secondary",{className:b.secondary,elementType:Nv,externalForwardedProps:x,ownerState:v});return null==g||g.type===Nv||a||(g=(0,O.jsx)(k,{variant:f?"body2":"body1",component:S?.variant?void 0:"span",...S,children:g})),null==y||y.type===Nv||a||(y=(0,O.jsx)(M,{variant:"body2",color:"textSecondary",...C,children:y})),(0,O.jsxs)(I,{...w,children:[g,y]})}),Hv=["inert","iconStart","iconEnd","children"],Bv=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Vv(e){const t=[],n=[];return Array.from(e.querySelectorAll(Bv)).forEach((e,r)=>{const i=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==i&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===i?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function Uv(){return!0}const Yv=function(t){const{children:n,disableAutoFocus:r=!1,disableEnforceFocus:i=!1,disableRestoreFocus:o=!1,getTabbable:a=Vv,isEnabled:s=Uv,open:l}=t,c=e.useRef(!1),u=e.useRef(null),d=e.useRef(null),p=e.useRef(null),h=e.useRef(null),m=e.useRef(!1),f=e.useRef(null),g=Bm(Jh(n),f),y=e.useRef(null);e.useEffect(()=>{l&&f.current&&(m.current=!r)},[r,l]),e.useEffect(()=>{if(!l||!f.current)return;const e=Xm(f.current);return f.current.contains(e.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex","-1"),m.current&&f.current.focus()),()=>{o||(p.current&&p.current.focus&&(c.current=!0,p.current.focus()),p.current=null)}},[l]),e.useEffect(()=>{if(!l||!f.current)return;const e=Xm(f.current),t=t=>{y.current=t,!i&&s()&&"Tab"===t.key&&e.activeElement===f.current&&t.shiftKey&&(c.current=!0,d.current&&d.current.focus())},n=()=>{const t=f.current;if(null===t)return;if(!e.hasFocus()||!s()||c.current)return void(c.current=!1);if(t.contains(e.activeElement))return;if(i&&e.activeElement!==u.current&&e.activeElement!==d.current)return;if(e.activeElement!==h.current)h.current=null;else if(null!==h.current)return;if(!m.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==d.current||(n=a(f.current)),n.length>0){const e=Boolean(y.current?.shiftKey&&"Tab"===y.current?.key),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const r=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(r),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[r,i,o,s,l,a]);const v=e=>{null===p.current&&(p.current=e.relatedTarget),m.current=!0};return(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)("div",{tabIndex:l?0:-1,onFocus:v,ref:u,"data-testid":"sentinelStart"}),e.cloneElement(n,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),m.current=!0,h.current=e.target;const t=n.props.onFocus;t&&t(e)}}),(0,O.jsx)("div",{tabIndex:l?0:-1,onFocus:v,ref:d,"data-testid":"sentinelEnd"})]})};function Wv(e){return e.substring(2).toLowerCase()}function Gv(t){const{children:n,disableReactTree:r=!1,mouseEvent:i="onClick",onClickAway:o,touchEvent:a="onTouchEnd"}=t,s=e.useRef(!1),l=e.useRef(null),c=e.useRef(!1),u=e.useRef(!1);e.useEffect(()=>(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const d=Bm(Jh(n),l),p=Ag(e=>{const t=u.current;u.current=!1;const n=Xm(l.current);if(!c.current||!l.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidtht=>{u.current=!0;const r=n.props[e];r&&r(t)},m={ref:d};return!1!==a&&(m[a]=h(a)),e.useEffect(()=>{if(!1!==a){const e=Wv(a),t=Xm(l.current),n=()=>{s.current=!0};return t.addEventListener(e,p),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,p),t.removeEventListener("touchmove",n)}}},[p,a]),!1!==i&&(m[i]=h(i)),e.useEffect(()=>{if(!1!==i){const e=Wv(i),t=Xm(l.current);return t.addEventListener(e,p),()=>{t.removeEventListener(e,p)}}},[p,i]),e.cloneElement(n,m)}function Kv(e){return Ig("MuiPaper",e)}wg("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const qv=bm("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})(wm(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Xv=e.forwardRef(function(e,t){const n=Mm({props:e,name:"MuiPaper"}),r=xm(),{className:i,component:o="div",elevation:a=1,square:s=!1,variant:l="elevation",...c}=n,u={...n,component:o,elevation:a,square:s,variant:l},d=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e;return Gh({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},Kv,i)})(u);return(0,O.jsx)(qv,{as:o,ownerState:u,className:Hh(d.root,i),ref:t,...c,style:{..."elevation"===l&&{"--Paper-shadow":(r.vars||r).shadows[a],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[a]},...!r.vars&&"dark"===r.palette.mode&&{"--Paper-overlay":`linear-gradient(${op("#fff",yh(a))}, ${op("#fff",yh(a))})`}},...c.style}})}),Zv=Xv,Jv=["ref","open","children","className","clickAwayTouchEvent","clickAwayMouseEvent","flip","focusTrap","onExited","onClickAway","onDidShow","onDidHide","id","target","transition","placement"];function Qv(e,t){return function(e,t){return void 0===e.focusTrap?t:(0,O.jsx)(Yv,{open:!0,disableEnforceFocus:!0,disableAutoFocus:!0,children:(0,O.jsx)("div",{tabIndex:-1,children:t})})}(e,function(e,t){return void 0===e.onClickAway?t:(0,O.jsx)(Gv,{onClickAway:e.onClickAway,touchEvent:e.clickAwayTouchEvent,mouseEvent:e.clickAwayMouseEvent,children:t})}(e,t))}const eb={"bottom-start":"top left","bottom-end":"top right"};function tb(e){return Ig("MuiSvgIcon",e)}wg("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const nb=bm("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Cm(n.color)}`],t[`fontSize${Cm(n.fontSize)}`]]}})(wm(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),rb=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:p="0 0 24 24",...h}=r,m=e.isValidElement(i)&&"svg"===i.type,f={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:p,hasSvgAsChild:m},g={};u||(g.viewBox=p);const y=(e=>{const{color:t,fontSize:n,classes:r}=e;return Gh({root:["root","inherit"!==t&&`color${Cm(t)}`,`fontSize${Cm(n)}`]},tb,r)})(f);return(0,O.jsxs)(nb,{as:s,className:Hh(y.root,o),focusable:"false",color:c,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:n,...g,...h,...m&&i.props,ownerState:f,children:[m?i.props.children:i,d?(0,O.jsx)("title",{children:d}):null]})});rb.muiName="SvgIcon";const ib=rb;function ob(t,n){function r(e,r){return(0,O.jsx)(ib,{"data-testid":`${n}Icon`,ref:r,...e,children:t})}return r.muiName=ib.muiName,e.memo(e.forwardRef(r))}const ab=ob,sb=ab((0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),(0,O.jsx)("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2z"})]}),"ZoomIn"),lb=ab((0,O.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14M7 9h5v1H7z"}),"ZoomOut"),cb=ab((0,O.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"Export"),ub={baseTooltip:qg,basePopper:function(t){const{open:n,children:r,className:i,flip:o,onExited:a,onDidShow:s,onDidHide:c,id:u,target:d,transition:p,placement:h}=t,m=tt(t,Jv),f=e.useMemo(()=>{const e=[{name:"preventOverflow",options:{padding:8}}];return o&&e.push({name:"flip",enabled:!0,options:{rootBoundary:"document"}}),(s||c)&&e.push({name:"isPlaced",enabled:!0,phase:"main",fn:()=>{s?.()},effect:()=>()=>{c?.()}}),e},[o,s,c]);let g;if(p){const e=e=>t=>{e&&e(),a&&a(t)};g=n=>Qv(t,(0,O.jsx)(Km,l({},n.TransitionProps,{style:{transformOrigin:eb[n.placement]},onExited:e(n.TransitionProps?.onExited),children:(0,O.jsx)(Zv,{children:r})})))}else g=Qv(t,r);return(0,O.jsx)(Tg,l({id:u,className:i,open:n,anchorEl:d,transition:p,placement:h,modifiers:f},m,{children:g}))},baseMenuList:dy,baseMenuItem:function(e){const{inert:t,iconStart:n,iconEnd:r,children:i}=e,o=tt(e,Hv);return(0,O.jsxs)(Ev,l({},o,{disableRipple:!!t||o.disableRipple,children:[n&&(0,O.jsx)(Av,{children:n},"1"),(0,O.jsx)(Fv,{children:i},"2"),r&&(0,O.jsx)(Av,{children:r},"3")]}))},baseDivider:yy},db=l({},bv,ub,{zoomInIcon:sb,zoomOutIcon:lb,exportIcon:cb}),pb=e=>e.brush,hb=(ae(pb,e=>e?.start),ae(pb,e=>e?.current),ae(pb,e=>e?.start?.x??null)),mb=ae(pb,e=>e?.start?.y??null),fb=ae(pb,e=>e?.current?.x??null),gb=ae(pb,e=>e?.current?.y??null),yb=le(hb,mb,fb,gb,(e,t,n,r)=>null===e||null===t||null===n||null===r?null:{start:{x:e,y:t},current:{x:n,y:r}}),vb=ae(ft,e=>{let t=!1,n=!1;return e&&Object.entries(e).forEach(([e,r])=>{Object.values(r.series).some(e=>"horizontal"===e.layout)&&(t=!0),"scatter"===e&&r.seriesOrder.length>0&&(n=!0)}),n?"xy":t?"y":"x"}),bb=ae(qa,function(e){let t=!1,n=!1;return Object.values(e).forEach(e=>{"y"===e.axisDirection&&(n=!0),"x"===e.axisDirection&&(t=!0)}),t&&n?"xy":n?"y":t?"x":null}),xb=ae(vb,bb,(e,t)=>t??e),Ib=ae(pb,e=>e?.enabled||e?.isZoomBrushEnabled),wb=ae(Ib,pb,(e,t)=>e&&null!==t?.start&&null!==t?.current),kb=ae(pb,wb,(e,t)=>t&&e?.preventHighlight),Sb=ae(pb,wb,(e,t)=>t&&e?.preventTooltip),Mb=({store:t,svgRef:n,instance:r,params:i})=>{const o=t.use(Ib);V(()=>{t.set("brush",l({},t.state.brush,{enabled:i.brushConfig.enabled,preventTooltip:i.brushConfig.preventTooltip,preventHighlight:i.brushConfig.preventHighlight}))},[t,i.brushConfig.enabled,i.brushConfig.preventTooltip,i.brushConfig.preventHighlight]);const a=ke(function(e){t.set("brush",l({},t.state.brush,{start:t.state.brush.start??e,current:e}))}),s=ke(function(){t.set("brush",l({},t.state.brush,{start:null,current:null}))}),c=ke(function(e){t.state.brush.isZoomBrushEnabled!==e&&t.set("brush",l({},t.state.brush,{isZoomBrushEnabled:e}))});return e.useEffect(()=>{const e=n.current;if(null===e||!o)return()=>{};const t=r.addInteractionListener("brushStart",t=>{if(t.detail.target?.closest("[data-charts-zoom-slider]"))return;const n=xs(e,{clientX:t.detail.initialCentroid.x,clientY:t.detail.initialCentroid.y});a(n)}),i=r.addInteractionListener("brush",t=>{const n=xs(e,{clientX:t.detail.centroid.x,clientY:t.detail.centroid.y});a(n)}),l=r.addInteractionListener("brushCancel",s),c=r.addInteractionListener("brushEnd",s);return()=>{t.cleanup(),i.cleanup(),c.cleanup(),l.cleanup()}},[n,r,t,s,a,o]),{instance:{setBrushCoordinates:a,clearBrush:s,setZoomBrushEnabled:c}}};function Cb(e,t,n){const r="rotation"===n?"DEFAULT_ROTATION_AXIS_KEY":"DEFAULT_RADIUS_AXIS_KEY";return(e&&e.length>0?e:[{id:r}]).map((e,r)=>{const i=`defaultized-${n}-axis-${r}`,o=e.dataKey;if(void 0===o||void 0!==e.data)return l({id:i},e);if(void 0===t)throw new Error(`MUI X Charts: ${n}-axis uses \`dataKey\` but no \`dataset\` is provided.`);return l({id:i,data:t.map(e=>e[o])},e)})}function Pb(e){return pa.getTypes().has(e)}Mb.params={brushConfig:!0},Mb.getDefaultizedParams=({params:e})=>l({},e,{brushConfig:{enabled:e?.brushConfig?.enabled??!1,preventTooltip:e?.brushConfig?.preventTooltip??!0,preventHighlight:e?.brushConfig?.preventHighlight??!0}}),Mb.getInitialState=e=>({brush:{enabled:e.brushConfig.enabled,isZoomBrushEnabled:!1,preventTooltip:e.brushConfig.preventTooltip,preventHighlight:e.brushConfig.preventHighlight,start:null,current:null}});function Eb({drawingArea:e,formattedSeries:t,axis:n,seriesConfig:r,axisDirection:i}){if(void 0===n)return{axis:{},axisIds:[]};const o=((e,t,n,r)=>{const i=new Set;return Object.keys(t).filter(Pb).forEach(o=>{const a=n[o]?.series??{},s=t[o].axisTooltipGetter?.(a);void 0!==s&&s.forEach(({axisId:t,direction:n})=>{n===e&&i.add(t??r)})}),i})(i,r,t,n[0].id),a={};return n.forEach((n,s)=>{const c=n,u=function(e,t,n){if("rotation"===t){if("point"===n.scaleType){const e=[Ql(n.startAngle,0),Ql(n.endAngle,2*Math.PI)],t=e[1]-e[0];return t>2*Math.PI-.1&&(e[1]-=t/n.data.length),e}return[Ql(n.startAngle,0),Ql(n.endAngle,2*Math.PI)]}return[0,Math.min(e.height,e.width)/2]}(e,i,c),[d,p]=((e,t,n,r,i)=>{const o=Object.keys(n).filter(Pb).reduce((o,a)=>((e,t,n,r,i,o,a)=>{const s="rotation"===r?i[t].rotationExtremumGetter:i[t].radiusExtremumGetter,l=a[t]?.series??{},[c,u]=s?.({series:l,axis:n,axisIndex:o,isDefaultAxis:0===o})??[1/0,-1/0],[d,p]=e;return[Math.min(c,d),Math.max(u,p)]})(o,a,e,t,n,r,i),[1/0,-1/0]);return Number.isNaN(o[0])||Number.isNaN(o[1])?[1/0,-1/0]:o})(c,i,r,s,t),h=!c.ignoreTooltip&&o.has(c.id),m=c.data??[];if(Et(c)){const e=c.categoryGapRatio??.2,t=c.barGapRatio??.1;if(a[c.id]=l({offset:0,categoryGapRatio:e,barGapRatio:t,triggerTooltip:h},c,{data:m,scale:Sa(c.data,u).paddingInner(e).paddingOuter(e/2),tickNumber:c.data.length,colorScale:c.colorMap&&("ordinal"===c.colorMap.type?wr(l({values:c.data},c.colorMap)):kr(c.colorMap))}),sa(c.data)){const e=la(c.data,u,c.tickNumber);a[c.id].valueFormatter=c.valueFormatter??e}}if(Tt(c)&&(a[c.id]=l({offset:0,triggerTooltip:h},c,{data:m,scale:Ma(c.data,u),tickNumber:c.data.length,colorScale:c.colorMap&&("ordinal"===c.colorMap.type?wr(l({values:c.data},c.colorMap)):kr(c.colorMap))}),sa(c.data))){const e=la(c.data,u,c.tickNumber);a[c.id].valueFormatter=c.valueFormatter??e}if("point"===(f=c).scaleType||"band"===f.scaleType)return;var f;const g=c.scaleType??"linear",y=c.domainLimit??"nice",v=[c.min??d,c.max??p];if("function"==typeof y){const{min:e,max:t}=y(d,p);v[0]=e,v[1]=t}const b=Sr(c,v,Cr(Math.abs(u[1]-u[0]))),x=Mr(b,u),I=aa(g,v,u),w="nice"===y?I.nice(b):I,[k,S]=w.domain(),M=[c.min??k,c.max??S];a[c.id]=l({offset:0,triggerTooltip:h},c,{data:m,scaleType:g,scale:w.domain(M),tickNumber:x,colorScale:c.colorMap&&kr(c.colorMap)})}),{axis:a,axisIds:n.map(({id:e})=>e)}}const Tb=e=>e.polarAxis,Ab=ae(Tb,e=>e?.rotation),Ob=ae(Tb,e=>e?.radius),jb=le(Ab,he,ft,ht,(e,t,n,r)=>Eb({drawingArea:t,formattedSeries:n,axis:e,seriesConfig:r,axisDirection:"rotation"})),Lb=le(Ob,he,ft,ht,(e,t,n,r)=>Eb({drawingArea:t,formattedSeries:n,axis:e,seriesConfig:r,axisDirection:"radius"})),Rb=le(he,function(e){return{cx:e.left+e.width/2,cy:e.top+e.height/2}}),Db=e=>(t,n)=>Math.atan2(t-e.cx,e.cy-n);function $b(e){return(e%360+360)%360}const zb=2*Math.PI;function Nb(e,t){const{scale:n,data:r,reverse:i}=e;if(!fa(n))throw new Error("MUI X Charts: getAxisValue is not implemented for polare continuous axes.");if(!r)return-1;const o=((t-Math.min(...n.range()))%zb+zb)%zb,a=0===n.bandwidth()?Math.floor((o+n.step()/2)/n.step())%r.length:Math.floor(o/n.step());return a<0||a>=r.length?-1:i?r.length-1-a:a}const _b=({params:t,store:n,seriesConfig:r,svgRef:i,instance:o})=>{const{rotationAxis:a,radiusAxis:s,dataset:c}=t,u=n.use(he),d=n.use(ft),p=n.use(Rb),h=n.use(ws),{axis:m,axisIds:f}=n.use(jb),{axis:g,axisIds:y}=n.use(Lb),v=e.useRef(!0);e.useEffect(()=>{v.current?v.current=!1:n.set("polarAxis",l({},n.state.polarAxis,{rotation:Cb(a,c,"rotation"),radius:Cb(s,c,"radius")}))},[r,u,a,s,c,n]);const b=e.useMemo(()=>Db({cx:p.cx,cy:p.cy}),[p.cx,p.cy]),x=e.useMemo(()=>(e=>(t,n)=>{const r=Math.atan2(t-e.cx,e.cy-n);return[Math.sqrt((t-e.cx)**2+(e.cy-n)**2),r]})({cx:p.cx,cy:p.cy}),[p.cx,p.cy]),I=e.useMemo(()=>(e=>(t,n)=>[e.cx+t*Math.sin(n),e.cy-t*Math.cos(n)])({cx:p.cx,cy:p.cy}),[p.cx,p.cy]),w=f[0],k=y[0],S=e.useRef({isInChart:!1}),M=Fs(o);return e.useEffect(()=>{const e=i.current;if(!h||!M||null===e||t.disableAxisListener)return()=>{};const n=o.addInteractionListener("moveEnd",e=>{e.detail.activeGestures.pan||(S.current.isInChart=!1,o.cleanInteraction())}),r=o.addInteractionListener("panEnd",e=>{e.detail.activeGestures.move||(S.current.isInChart=!1,o.cleanInteraction?.())}),a=o.addInteractionListener("quickPressEnd",e=>{e.detail.activeGestures.move||e.detail.activeGestures.pan||(S.current.isInChart=!1,o.cleanInteraction?.())}),s=t=>{const n=t.detail.srcEvent;if("touch"===t.detail.srcEvent.pointerType){const t=e.getBoundingClientRect();if(n.clientXt.right||n.clientYt.bottom)return S.current.isInChart=!1,void o.cleanInteraction?.();const r=xs(e,n);return S.current.isInChart=!0,void o.setPointerCoordinate?.(r)}const r=xs(e,n);o.isPointInside(r.x,r.y,t.detail.target)?(p.cx-r.x)**2+(p.cy-r.y)**2>g[k].scale.range()[1]**2?S.current.isInChart&&(o.cleanInteraction?.(),S.current.isInChart=!1):(S.current.isInChart=!0,o.setPointerCoordinate?.(r)):S.current.isInChart&&(o.cleanInteraction?.(),S.current.isInChart=!1)},l=o.addInteractionListener("move",s),c=o.addInteractionListener("pan",s),u=o.addInteractionListener("quickPress",s);return()=>{l.cleanup(),n.cleanup(),c.cleanup(),r.cleanup(),u.cleanup(),a.cleanup()}},[i,n,p,g,k,m,w,o,t.disableAxisListener,h,b,M]),e.useEffect(()=>{const e=i.current,n=t.onAxisClick;if(null===e||!n)return()=>{};const r=o.addInteractionListener("tap",t=>{let r=null,i=!1;const o=xs(e,t.detail.srcEvent),a=Db(p)(o.x,o.y),s=Nb(m[w],a);if(i=-1!==s,r=i?s:null,null==r||-1===r)return;const l=(i?m:g)[i?w:k].data[r],c={};Object.keys(d).filter(e=>"radar"===e).forEach(e=>{d[e]?.seriesOrder.forEach(t=>{const n=d[e].series[t];c[t]=n.data[r]})}),n(t.detail.srcEvent,{dataIndex:r,axisValue:l,seriesValues:c})});return()=>{r.cleanup()}},[p,o,t.onAxisClick,d,g,m,i,k,w]),{instance:{svg2polar:x,svg2rotation:b,polar2svg:I}}};_b.params={rotationAxis:!0,radiusAxis:!0,dataset:!0,disableAxisListener:!0,onAxisClick:!0},_b.getInitialState=e=>({polarAxis:{rotation:Cb(e.rotationAxis,e.dataset,"rotation"),radius:Cb(e.radiusAxis,e.dataset,"radius")}});const Fb=new Map,Hb=(le(ae(e=>e.visibilityManager,e=>e?.visibilityMap??Fb),e=>(t,n)=>((e,t,n)=>{const r=Ee(n,t);return!e.has(r)})(e,n,t)),(e,t)=>{const n=new Map;return e&&e.forEach(e=>{const r=Ee(t,e);n.set(r,e)}),n}),Bb=({store:e,params:t,seriesConfig:n,instance:r})=>{Y(()=>{void 0!==t.hiddenItems&&e.set("visibilityManager",l({},e.state.visibilityManager,{visibilityMap:Hb(t.hiddenItems,n)}))},[e,t.hiddenItems,n]);const i=ke(n=>{const i=e.state.visibilityManager.visibilityMap,o=r.serializeIdentifier(n);if(i.has(o))return;const a=new Map(i);a.set(o,n),e.set("visibilityManager",l({},e.state.visibilityManager,{visibilityMap:a})),t.onHiddenItemsChange?.(Array.from(a.values()))}),o=ke(n=>{const i=e.state.visibilityManager.visibilityMap,o=r.serializeIdentifier(n);if(!i.has(o))return;const a=new Map(i);a.delete(o),e.set("visibilityManager",l({},e.state.visibilityManager,{visibilityMap:a})),t.onHiddenItemsChange?.(Array.from(a.values()))}),a=ke(t=>{const n=e.state.visibilityManager.visibilityMap,a=r.serializeIdentifier(t);n.has(a)?o(t):i(t)});return{instance:{hideItem:i,showItem:o,toggleItemVisibility:a}}};function Vb(e){return e&&e.ownerDocument||document}function Ub(e,t,n){const r=[],i=t.querySelectorAll("style, link[rel='stylesheet']");for(let t=0;t{a.addEventListener("load",()=>e())}))}n&&a.setAttribute("nonce",n),e.head.appendChild(a),n&&a.setAttribute("nonce",n)}return r}function Yb(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}function Wb(e,t){const n={};return Object.entries(t).forEach(([t,r])=>{const i=e.style.getPropertyValue(t);n[t]=i,e.style.setProperty(t,r)}),n}Bb.getInitialState=(e,t,n)=>({visibilityManager:{visibilityMap:e.hiddenItems?Hb(e.hiddenItems,n):Fb,isControlled:void 0!==e.hiddenItems}}),Bb.params={onHiddenItemsChange:!0,hiddenItems:!0};const Gb=e=>e,Kb=(()=>{let e=Gb;return{configure(t){e=t},generate:t=>e(t),reset(){e=Gb}}})(),qb={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Xb(e,t,n="Mui"){const r=qb[t];return r?`${n}-${r}`:`${Kb.generate(e)}-${t}`}function Zb(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=Xb(e,t,n)}),r}const Jb=Zb("MuiChartsToolbar",["root"]);function Qb(e){const t=e.contentDocument.querySelector(`.${Jb.root}`);t?.remove()}function ex(){let e;const t=new Promise(t=>{e=t});return window.requestAnimationFrame(()=>{e()}),t}const tx=({chartRootRef:e,svgRef:t,instance:n})=>{const r=async t=>{const r=e.current;if(r){const e=n.disableAnimation();try{await ex(),function(e,{fileName:t,onBeforeExport:n=Qb,copyStyles:r=!0,nonce:i}={}){const o=Yb(t),a=Vb(e);o.onload=async()=>{const t=o.contentDocument,s=e.cloneNode(!0);t.body.replaceChildren(s),t.body.style.margin="0px";const l=e.getRootNode(),c="ShadowRoot"===l.constructor.name?l:a;r&&await Promise.all(Ub(t,c,i)),o.contentWindow.matchMedia("print").addEventListener("change",e=>{!1===e.matches&&a.body.removeChild(o)}),await n(o),o.contentWindow.print()},a.body.appendChild(o)}(r,t)}catch(e){console.error("MUI X Charts: Error exporting chart as print:",e)}finally{e()}}},i=async r=>{const i=e.current,o=t.current;if(i&&o){const e=n.disableAnimation();try{await ex(),await async function(e,t,n){const{fileName:r,type:i="image/png",quality:o=.9,onBeforeExport:s=Qb,copyStyles:l=!0,nonce:c}=n??{},u=(async()=>{try{const e=await a.e(235).then(a.t.bind(a,3436,19));return(e.default||e).drawDocument}catch(e){throw new Error("MUI X Charts: Failed to import 'rasterizehtml' module. This dependency is mandatory when exporting a chart as an image. Make sure you have it installed as a dependency.",{cause:e})}})(),d=Vb(e),p=Yb(r),h=Wb(t,{width:`${t.getBoundingClientRect().width}px`});let m;const f=new Promise(e=>{m=e});p.onload=async()=>{const n=p.contentDocument,r=e.cloneNode(!0);Wb(t,h),n.body.replaceChildren(r),n.body.style.margin="0px",n.body.style.width="fit-content";const i=e.getRootNode(),o="ShadowRoot"===i.constructor.name?i:d;l&&await Promise.all(Ub(n,o,c)),m()},d.body.appendChild(p),await f,await s(p);const g=await u,y=p.contentDocument.body.getBoundingClientRect(),v=document.createElement("canvas"),b=window.devicePixelRatio||1;v.width=y.width*b,v.height=y.height*b,v.style.width=`${y.width}px`,v.style.height=`${y.height}px`;try{await g(p.contentDocument,v,{zoom:b,nonce:c})}finally{d.body.removeChild(p)}let x;const I=new Promise(e=>{x=e});let w;try{v.toBlob(e=>x(e),i,o),w=await I}catch(e){throw new Error("MUI X Charts: Failed to create blob from canvas.",{cause:e})}if(!w)throw new Error("MUI X Charts: Failed to create blob from canvas.");const k=URL.createObjectURL(w);!function(e,t){const n=document.createElement("a");n.href=e,n.download=t,n.click()}(k,r||document.title),URL.revokeObjectURL(k)}(i,o,r)}catch(e){console.error("MUI X Charts: Error exporting chart as image:",e)}finally{e()}}};return{publicAPI:{exportAsPrint:r,exportAsImage:i},instance:{exportAsPrint:r,exportAsImage:i}}};function nx(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const n=e.length;if(n!==t.length)return!1;for(let r=0;r{n=null,e(...t)};function i(...e){t=e,n||(n=requestAnimationFrame(r))}return i.clear=()=>{n&&(cancelAnimationFrame(n),n=null)},i}tx.params={},tx.getDefaultizedParams=({params:e})=>l({},e),tx.getInitialState=()=>({export:{}});const ix=(e,t,n,r)=>{const i=r.minStart,o=r.maxEnd,a=r.minSpan,s=n.start,l=n.end,c=s+e*(l-s);let u=(s+c*(t-1))/t,d=(l+c*(t-1))/t,p=0,h=0;return uo&&(h=Math.abs(d-o),d=o),p>0&&h>0?[i,o]:(d+=p,u-=h,u=Math.min(o-a,Math.max(i,u)),d=Math.max(a,Math.min(o,d)),[u,d])};function ox(e,t,n,r){const i=t-e;return!(i<0||n&&ir.maxSpan||er.maxEnd)}function ax(e,t,n){const{left:r,width:i}=t,o=(e.x-r)/i;return n?1-o:o}function sx(e,t,n){const{top:r,height:i}=t,o=(r-e.y)/i+1;return n?1-o:o}function lx(e,t,n,r,i="xy"){return e.map(e=>{const o=r[e.axisId];if(!o||!o.panning||"x"===o.axisDirection&&"y"===i||"y"===o.axisDirection&&"x"===i)return e;const a=e.start,s=e.end,c=s-a,u=o.minStart,d=o.maxEnd,p="x"===o.axisDirection?t.x:t.y,h=o.reverse?-p:p,m="x"===o.axisDirection?n.width:n.height;let f=a-h/m*c,g=s-h/m*c;return fd&&(g=d,f=g-c),fd||co.maxSpan?e:l({},e,{start:f,end:g})})}ne({memoize:J,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const cx=(e,t,n,r,i,o,a,s,...l)=>{if(l.length>0)throw new Error("Unsupported number of selectors");let c;if(e&&t&&n&&r&&i&&o&&a&&s)c=(l,c,u,d)=>{const p=e(l,c,u,d),h=t(l,c,u,d),m=n(l,c,u,d),f=r(l,c,u,d),g=i(l,c,u,d),y=o(l,c,u,d),v=a(l,c,u,d);return s(p,h,m,f,g,y,v,c,u,d)};else if(e&&t&&n&&r&&i&&o&&a)c=(s,l,c,u)=>{const d=e(s,l,c,u),p=t(s,l,c,u),h=n(s,l,c,u),m=r(s,l,c,u),f=i(s,l,c,u),g=o(s,l,c,u);return a(d,p,h,m,f,g,l,c,u)};else if(e&&t&&n&&r&&i&&o)c=(a,s,l,c)=>{const u=e(a,s,l,c),d=t(a,s,l,c),p=n(a,s,l,c),h=r(a,s,l,c),m=i(a,s,l,c);return o(u,d,p,h,m,s,l,c)};else if(e&&t&&n&&r&&i)c=(o,a,s,l)=>{const c=e(o,a,s,l),u=t(o,a,s,l),d=n(o,a,s,l),p=r(o,a,s,l);return i(c,u,d,p,a,s,l)};else if(e&&t&&n&&r)c=(i,o,a,s)=>{const l=e(i,o,a,s),c=t(i,o,a,s),u=n(i,o,a,s);return r(l,c,u,o,a,s)};else if(e&&t&&n)c=(r,i,o,a)=>{const s=e(r,i,o,a),l=t(r,i,o,a);return n(s,l,i,o,a)};else if(e&&t)c=(n,r,i,o)=>{const a=e(n,r,i,o);return t(a,r,i,o)};else{if(!e)throw new Error("Missing arguments");c=e}return c},ux=e=>e.zoom,dx=(cx(ux,e=>e.isInteracting),cx(qa,e=>Object.keys(e).length>0)),px=cx(Ga,(e,t)=>e?.get(t)),hx=cx(ux,qa,(e,t)=>e.zoomData.every(e=>{const n=e.end-e.start,r=t[e.axisId];return e.start===r.minStart&&e.end===r.maxEnd||n===r.maxSpan})),mx=cx(ux,qa,(e,t)=>e.zoomData.every(e=>e.end-e.start===t[e.axisId].minSpan)),fx=cx(ux,(e,t)=>e.zoomInteractionConfig.zoom[t]??null),gx=cx(ux,(e,t)=>e.zoomInteractionConfig.pan[t]??null),yx=(cx(qa,e=>fx(e,"brush"),(e,t)=>Object.keys(e).length>0&&t||!1),({store:t,instance:n,svgRef:r},i)=>{const o=t.use(he),a=t.use(qa),s=e.useRef(!1),l=e.useRef(null),c=t.use(fx,"wheel"),u=Object.keys(a).length>0&&Boolean(c);e.useEffect(()=>{u&&n.updateZoomInteractionListeners("zoomTurnWheel",{requiredKeys:c.requiredKeys})},[c,u,n]),e.useEffect(()=>{const e=r.current;if(null===e||!u)return()=>{};const t=rx(i),c=n.addInteractionListener("zoomTurnWheel",r=>{const i=xs(e,{clientX:r.detail.centroid.x,clientY:r.detail.centroid.y});if(s.current||!n.isPointInside(i.x,i.y))return s.current=!0,l.current&&clearTimeout(l.current),void(l.current=setTimeout(()=>{s.current=!1,l.current=null},100));r.detail.srcEvent.preventDefault(),t(e=>e.map(e=>{const t=a[e.axisId];if(!t)return e;const n="x"===t.axisDirection?ax(i,o,t.reverse):sx(i,o,t.reverse),{scaleRatio:s,isZoomIn:l}=function(e,t){const n=-e.deltaY,r=function(e){const t=e.ctrlKey?3:1;return 1===e.deltaMode?1*t:e.deltaMode?10*t:.2*t}(e),i=t*r*n/1e3;return{scaleRatio:Math.min(Math.max(1+i,.1),1.9),isZoomIn:n>0}}(r.detail.srcEvent,t.step),[c,u]=ix(n,s,e,t);return ox(c,u,l,t)?{axisId:e.axisId,start:c,end:u}:e}))});return()=>{c.cleanup(),l.current&&(clearTimeout(l.current),l.current=null),s.current=!1,t.clear()}},[r,o,u,a,n,i,t])}),vx=(e,t)=>{const n={zoom:{},pan:{}};if(n.zoom=e?.zoom?bx("zoom",e.zoom):{wheel:{type:"wheel",requiredKeys:[],mouse:{},touch:{}},pinch:{type:"pinch",requiredKeys:[],mouse:{},touch:{}}},e?.pan)n.pan=bx("pan",e.pan);else{n.pan={drag:{type:"drag",requiredKeys:[],mouse:{},touch:{}}};let e=!1,r=!1;t&&Object.values(t).forEach(t=>{"x"===t.axisDirection&&(e=!0),"y"===t.axisDirection&&(r=!0)}),e&&!r&&(n.pan.wheel={type:"wheel",requiredKeys:[],allowedDirection:"x",mouse:{},touch:{}})}return n};function bx(e,t){const n=t.reduce((e,t)=>{if("string"==typeof t)return e[t]||(e[t]=[]),e[t].push({type:t,requiredKeys:[]}),e;const n=t.type;return e[n]||(e[n]=[]),e[n].push({type:n,pointerMode:t.pointerMode,requiredKeys:t.requiredKeys,allowedDirection:t.allowedDirection}),e},{}),r={};for(const[t,i]of Object.entries(n)){const n=i.findLast(e=>!e.pointerMode),o=i.findLast(e=>"mouse"===e.pointerMode),a=i.findLast(e=>"touch"===e.pointerMode);r[t]={type:t,pointerMode:n?[]:Array.from(new Set(i.filter(e=>e.pointerMode).map(e=>e.pointerMode))),requiredKeys:n?.requiredKeys??[],mouse:o?{requiredKeys:o?.requiredKeys??[]}:{},touch:a?{requiredKeys:a?.requiredKeys??[]}:{}},"wheel"===t&&"pan"===e&&(r[t].allowedDirection=n?.allowedDirection??"x")}return r}function xx(e,t){const n=new Map;return t?.forEach(t=>{e[t.axisId]&&n.set(t.axisId,t)}),Object.values(e).map(({axisId:e,minStart:t,maxEnd:r})=>n.has(e)?n.get(e):{axisId:e,start:t,end:r})}const Ix=t=>{const{store:n,params:r}=t,{zoomData:i,onZoomChange:o,zoomInteractionConfig:a}=r,s=Og(o??(()=>{})),c=n.use(qa);!function(t,r){const i=e.useRef(!0);e.useEffect(()=>{i.current?i.current=!1:n.set("zoom",l({},n.state.zoom,{zoomInteractionConfig:vx(a,c)}))},r)}(0,[n,a,c]);const u=e.useMemo(()=>function(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}(()=>n.set("zoom",l({},n.state.zoom,{isInteracting:!1})),166),[n]);e.useEffect(()=>{void 0!==i&&(n.set("zoom",l({},n.state.zoom,{isInteracting:!0,zoomData:i})),u())},[n,i,u]);const d=e.useCallback(e=>{const t="function"==typeof e?e([...n.state.zoom.zoomData]):e;nx(n.state.zoom.zoomData,t)||(s(t),n.state.zoom.isControlled?n.set("zoom",l({},n.state.zoom,{isInteracting:!0})):(n.set("zoom",l({},n.state.zoom,{isInteracting:!0,zoomData:t})),u()))},[s,n,u]),p=e.useCallback((e,t)=>{d(n=>n.map(n=>n.axisId!==e?n:"function"==typeof t?t(n):t))},[d]),h=e.useCallback((e,t)=>{d(n=>n.map(n=>{if(n.axisId!==e)return n;const r=c[e];if(!r)return n;let i=n.start,o=n.end;if(t>0){const e=o-i;o=Math.min(o+t,r.maxEnd),i=o-e}else{const e=o-i;i=Math.max(i+t,r.minStart),o=i+e}return l({},n,{start:i,end:o})}))},[c,d]);e.useEffect(()=>()=>{u.clear()},[u]),(({store:t,instance:n,svgRef:r},i)=>{const o=t.use(he),a=t.use(qa),s=t.use(gx,"drag"),l=Object.values(a).some(e=>e.panning)&&Boolean(s);e.useEffect(()=>{l&&n.updateZoomInteractionListeners("zoomPan",{requiredKeys:s.requiredKeys,pointerMode:s.pointerMode,pointerOptions:{mouse:s.mouse,touch:s.touch}})},[l,s,n]),e.useEffect(()=>{const e=r.current;let t=!1;const s={x:0,y:0};if(null===e||!l)return()=>{};const c=rx(()=>{const e=s.x,t=s.y;s.x=0,s.y=0,i(n=>lx(n,{x:e,y:-t},{width:o.width,height:o.height},a))}),u=n.addInteractionListener("zoomPan",e=>{t&&(s.x+=e.detail.deltaX,s.y+=e.detail.deltaY,c())}),d=n.addInteractionListener("zoomPanStart",e=>{e.detail.target?.closest("[data-charts-zoom-slider]")||(t=!0)}),p=n.addInteractionListener("zoomPanEnd",()=>{t=!1});return()=>{d.cleanup(),u.cleanup(),p.cleanup(),c.clear()}},[n,r,l,a,o.width,o.height,i,t])})(t,d),(({store:t,instance:n,svgRef:r},i)=>{const o=t.use(he),a=t.use(qa),s=e.useRef(!1),l=e.useRef({x:0,y:0}),c=t.use(gx,"pressAndDrag"),u=Object.values(a).some(e=>e.panning)&&Boolean(c);e.useEffect(()=>{u&&n.updateZoomInteractionListeners("zoomPressAndDrag",{requiredKeys:c.requiredKeys,pointerMode:c.pointerMode,pointerOptions:{mouse:c.mouse,touch:c.touch}})},[u,c,n]),e.useEffect(()=>{if(null===r.current||!u)return()=>{};const e=rx(()=>{const e=l.current.x,t=l.current.y;l.current.x=0,l.current.y=0,i(n=>lx(n,{x:e,y:-t},{width:o.width,height:o.height},a))}),t=n.addInteractionListener("zoomPressAndDrag",t=>{s.current&&(l.current.x+=t.detail.deltaX,l.current.y+=t.detail.deltaY,e())}),c=n.addInteractionListener("zoomPressAndDragStart",e=>{e.detail.target?.closest("[data-charts-zoom-slider]")||(s.current=!0,l.current={x:0,y:0})}),d=n.addInteractionListener("zoomPressAndDragEnd",()=>{s.current=!1});return()=>{c.cleanup(),t.cleanup(),d.cleanup(),e.clear()}},[n,r,u,a,o.width,o.height,i,t,s])})(t,d),(({store:t,instance:n,svgRef:r},i)=>{const o=t.use(he),a=t.use(qa),s=e.useRef(!1),l=e.useRef(null),c=t.use(gx,"wheel"),u=Object.keys(a).length>0&&Boolean(c);e.useEffect(()=>{u&&n.updateZoomInteractionListeners("panTurnWheel",{requiredKeys:c.requiredKeys})},[c,u,n]),e.useEffect(()=>{const e=r.current,t={x:0,y:0};if(null===e||!u)return()=>{};const d=rx(i),p=n.addInteractionListener("panTurnWheel",r=>{const i=xs(e,{clientX:r.detail.centroid.x,clientY:r.detail.centroid.y});if(s.current||!n.isPointInside(i.x,i.y))return s.current=!0,l.current&&clearTimeout(l.current),void(l.current=setTimeout(()=>{s.current=!1,l.current=null},100));r.detail.srcEvent.preventDefault();const u=c?.allowedDirection??"x";0===r.detail.deltaX&&0===r.detail.deltaY||(t.x+=r.detail.deltaX,t.y+=r.detail.deltaY,d(e=>{const n=t.x,r=t.y;t.x=0,t.y=0;let i=0,s=0;return"x"!==u&&"xy"!==u||(i=-n),"y"!==u&&"xy"!==u||(s=r),0===i&&0===s?e:lx(e,{x:i,y:s},o,a,u)}))});return()=>{p.cleanup(),l.current&&(clearTimeout(l.current),l.current=null),s.current=!1,d.clear()}},[r,o,u,a,n,i,t,c])})(t,d),yx(t,d),(({store:t,instance:n,svgRef:r},i)=>{const o=t.use(he),a=t.use(qa),s=t.use(fx,"pinch"),l=Object.keys(a).length>0&&Boolean(s);e.useEffect(()=>{l&&n.updateZoomInteractionListeners("zoomPinch",{requiredKeys:s.requiredKeys})},[s,l,n]),e.useEffect(()=>{const e=r.current;if(null===e||!l)return()=>{};const t=rx(t=>{0!==t.detail.direction&&i(n=>n.map(n=>{const r=a[n.axisId];if(!r)return n;const i=t.detail.direction>0,s=1+t.detail.deltaScale,l=xs(e,{clientX:t.detail.centroid.x,clientY:t.detail.centroid.y}),c="x"===r.axisDirection?ax(l,o,r.reverse):sx(l,o,r.reverse),[u,d]=ix(c,s,n,r);return ox(u,d,i,r)?{axisId:n.axisId,start:u,end:d}:n}))}),s=n.addInteractionListener("zoomPinch",t);return()=>{s.cleanup(),t.clear()}},[r,o,l,a,t,n,i])})(t,d),(({store:t,instance:n,svgRef:r},i)=>{const o=t.use(he),a=t.use(qa),s=t.use(fx,"tapAndDrag"),l=Object.keys(a).length>0&&Boolean(s);e.useEffect(()=>{l&&n.updateZoomInteractionListeners("zoomTapAndDrag",{requiredKeys:s.requiredKeys,pointerMode:s.pointerMode,pointerOptions:{mouse:s.mouse,touch:s.touch}})},[s,l,n]),e.useEffect(()=>{const e=r.current;if(null===e||!l)return()=>{};const t=rx(t=>{0!==t.detail.deltaY&&i(n=>n.map(n=>{const r=a[n.axisId];if(!r)return n;const i=t.detail.deltaY>0,s=1+t.detail.deltaY/100,l=xs(e,{clientX:t.detail.initialCentroid.x,clientY:t.detail.initialCentroid.y}),c="x"===r.axisDirection?ax(l,o,r.reverse):sx(l,o,r.reverse),[u,d]=ix(c,s,n,r);return ox(u,d,i,r)?{axisId:n.axisId,start:u,end:d}:n}))}),s=n.addInteractionListener("zoomTapAndDrag",t);return()=>{s.cleanup(),t.clear()}},[r,o,l,a,t,n,i])})(t,d),(({store:t,instance:n,svgRef:r},i)=>{const o=t.use(he),a=t.use(qa),s=t.use(fx,"brush"),l=Object.keys(a).length>0&&Boolean(s);e.useEffect(()=>{n.setZoomBrushEnabled(l)},[l,n]),e.useEffect(()=>{const e=r.current;if(null===e||!l)return()=>{};const t=n.addInteractionListener("brushEnd",t=>{i(n=>{const r=xs(e,{clientX:t.detail.initialCentroid.x,clientY:t.detail.initialCentroid.y}),i=xs(e,{clientX:t.detail.centroid.x,clientY:t.detail.centroid.y}),s=Math.min(r.x,i.x),l=Math.max(r.x,i.x),c=Math.min(r.y,i.y),u=Math.max(r.y,i.y);return n.map(e=>{const t=a[e.axisId];if(!t)return e;let n,r;const i=t.reverse;"x"===t.axisDirection?(n=ax({x:s,y:0},o,i),r=ax({x:l,y:0},o,i)):(n=sx({x:0,y:u},o,i),r=sx({x:0,y:c},o,i));const d=Math.min(n,r),p=Math.max(n,r),h=e.start,m=e.end-h,f=h+d*m,g=h+p*m,y=Math.max(t.minStart,Math.min(t.maxEnd,f)),v=Math.max(t.minStart,Math.min(t.maxEnd,g));return ox(y,v,!0,t)?{axisId:e.axisId,start:y,end:v}:e})})});return()=>{t.cleanup()}},[r,o,l,a,n,i,t])})(t,d),(({store:t,instance:n,svgRef:r},i)=>{const o=t.use(qa),a=t.use(fx,"doubleTapReset"),s=Object.keys(o).length>0&&Boolean(a);e.useEffect(()=>{s&&n.updateZoomInteractionListeners("zoomDoubleTapReset",{requiredKeys:a.requiredKeys,pointerMode:a.pointerMode,pointerOptions:{mouse:a.mouse,touch:a.touch}})},[a,s,n]),e.useEffect(()=>{if(null===r.current||!s)return()=>{};const e=n.addInteractionListener("zoomDoubleTapReset",()=>{i(e=>e.map(e=>{const t=o[e.axisId];return t?{axisId:e.axisId,start:t.minStart,end:t.maxEnd}:e}))});return()=>{e.cleanup()}},[r,s,o,n,i,t])})(t,d);const m=e.useCallback(e=>{d(t=>t.map(t=>{const r=Xa(n.state,t.axisId);return function(e,t,{minSpan:n,maxSpan:r,minStart:i,maxEnd:o}){const a=e.end-e.start;let s=a*t/2;return s=s>0?Math.min(s,(a-n)/2):Math.max(s,(a-r)/2),l({},e,{start:Math.max(i,e.start+s),end:Math.min(o,e.end-s)})}(t,e,r)}))},[d,n]),f=e.useCallback(()=>m(.1),[m]),g=e.useCallback(()=>m(-.1),[m]);return{publicAPI:{setZoomData:d,setAxisZoomData:p,zoomIn:f,zoomOut:g},instance:{setZoomData:d,setAxisZoomData:p,moveZoomRange:h,zoomIn:f,zoomOut:g}}};Ix.params={initialZoom:!0,onZoomChange:!0,zoomData:!0,zoomInteractionConfig:!0},Ix.getInitialState=e=>{const{initialZoom:t,zoomData:n,defaultizedXAxis:r,defaultizedYAxis:i}=e,o=l({},Ia("x")(r),Ia("y")(i));return{zoom:{zoomData:xx(o,void 0!==n?n:void 0!==t?t:void 0),isInteracting:!1,isControlled:void 0!==n,zoomInteractionConfig:vx(e.zoomInteractionConfig,o)}}};const wx=[Xs,Mb,Ys,Ws,Bs,Zs,Bb,Ix,tx],kx=({params:t,store:n,svgRef:r})=>{const i=ke(function(){null!==n.state.keyboardNavigation.item&&n.set("keyboardNavigation",l({},n.state.keyboardNavigation,{item:null}))});return e.useEffect(()=>{const e=r.current;if(e&&t.enableKeyboardNavigation)return e.addEventListener("keydown",o),e.addEventListener("blur",i),()=>{e.removeEventListener("keydown",o),e.removeEventListener("blur",i)};function o(e){let t=n.state.keyboardNavigation.item,r=t?.type;if(!r&&(r=Object.keys(pt(n.state)).find(e=>void 0!==n.state.series.seriesConfig[e]),void 0===r))return;const i=n.state.series.seriesConfig[r]?.keyboardFocusHandler?.(e);i&&(t=i(t,n.state),t!==n.state.keyboardNavigation.item&&(e.preventDefault(),n.update(l({},n.state.highlight&&{highlight:l({},n.state.highlight,{lastUpdate:"keyboard"})},n.state.interaction&&{interaction:l({},n.state.interaction,{lastUpdate:"keyboard"})},{keyboardNavigation:l({},n.state.keyboardNavigation,{item:t})}))))}},[r,i,t.enableKeyboardNavigation,n]),V(()=>{n.state.keyboardNavigation.enableKeyboardNavigation!==t.enableKeyboardNavigation&&n.set("keyboardNavigation",l({},n.state.keyboardNavigation,{enableKeyboardNavigation:!!t.enableKeyboardNavigation}))},[n,t.enableKeyboardNavigation]),{}};function Sx(e,t,n,r,i,o,a,s,l,c,u=1/0,d=1){const p=n.copy(),h=r.copy();p.range([0,1]),h.range([0,1]);const m=n.range()[1]-n.range()[0],f=r.range()[1]-r.range()[0],g=m*m,y=f*f,v=p(Mx(n,l,e=>t[e]?.x)),b=h(Mx(r,c,e=>t[e]?.y));return e.neighbors(v,b,d,null!=u?u*u:1/0,function(e){const n=p(t[e].x),r=h(t[e].y);return n>=i&&n<=o&&r>=a&&r<=s},function(e,t){return g*e*e+y*t*t})}function Mx(e,t,n){return fa(e)?n(0===e.bandwidth()?Math.floor((t-Math.min(...e.range())+e.step()/2)/e.step()):Math.floor((t-Math.min(...e.range()))/e.step())):e.invert(t)}kx.getInitialState=e=>({keyboardNavigation:{item:null,enableKeyboardNavigation:!!e.enableKeyboardNavigation}}),kx.params={enableKeyboardNavigation:!0};const Cx=({svgRef:t,params:n,store:r,instance:i})=>{const{disableVoronoi:o,voronoiMaxRadius:a,onItemClick:s}=n,{axis:l,axisIds:c}=r.use(ls),{axis:u,axisIds:d}=r.use(cs),p=r.use(Wa),{series:h,seriesOrder:m}=r.use(ft)?.scatter??{},f=r.use(p?fs:gs),g=c[0],y=d[0];return V(()=>{r.set("voronoi",{isVoronoiEnabled:!o})},[r,o]),e.useEffect(()=>{if(null===t.current||o)return;const e=t.current;function n(t){const n=xs(e,t);if(!i.isPointInside(n.x,n.y))return"outside-chart";let o;for(const e of m??[]){const t=(h??{})[e],i=f.get(e);if(!i)continue;const s=t.xAxisId??g,c=t.yAxisId??y,d=Ka(r.state,s),p=Ka(r.state,c),m="item"===a?t.markerSize:a,v=(d?.start??0)/100,b=(d?.end??100)/100,x=(p?.start??0)/100,I=(p?.end??100)/100,w=l[s].scale,k=u[c].scale,S=Sx(i,t.data,w,k,v,b,x,I,n.x,n.y,m)[0];if(void 0===S)continue;const M=t.data[S],C=w(M.x),P=k(M.y),E=(C-n.x)**2+(P-n.y)**2;(void 0===o||E{e.detail.activeGestures.pan||(i.cleanInteraction?.(),i.clearHighlight?.(),i.removeTooltipItem?.())}),d=i.addInteractionListener("panEnd",e=>{e.detail.activeGestures.move||(i.cleanInteraction?.(),i.clearHighlight?.(),i.removeTooltipItem?.())}),p=i.addInteractionListener("quickPressEnd",e=>{e.detail.activeGestures.move||e.detail.activeGestures.pan||(i.cleanInteraction?.(),i.clearHighlight?.(),i.removeTooltipItem?.())}),v=e=>{const t=n(e.detail.srcEvent);if("outside-chart"===t)return i.cleanInteraction?.(),i.clearHighlight?.(),void i.removeTooltipItem?.();if("outside-voronoi-max-radius"===t||"no-point-found"===t)return i.removeTooltipItem?.(),i.clearHighlight?.(),void i.removeTooltipItem?.();const{seriesId:r,dataIndex:o}=t;i.setTooltipItem?.({type:"scatter",seriesId:r,dataIndex:o}),i.setLastUpdateSource?.("pointer"),i.setHighlight?.({seriesId:r,dataIndex:o})},b=i.addInteractionListener("tap",e=>{const t=n(e.detail.srcEvent);if("string"!=typeof t&&s){const{seriesId:n,dataIndex:r}=t;s(e.detail.srcEvent,{type:"scatter",seriesId:n,dataIndex:r})}}),x=i.addInteractionListener("move",v),I=i.addInteractionListener("pan",v),w=i.addInteractionListener("quickPress",v);return()=>{b.cleanup(),x.cleanup(),c.cleanup(),I.cleanup(),d.cleanup(),w.cleanup(),p.cleanup()}},[t,u,l,a,s,o,i,m,h,f,g,y,r]),{instance:{enableVoronoi:ke(()=>{r.set("voronoi",{isVoronoiEnabled:!0})}),disableVoronoi:ke(()=>{r.set("voronoi",{isVoronoiEnabled:!1})})}}};Cx.getDefaultizedParams=({params:e})=>l({},e,{disableVoronoi:e.disableVoronoi??!e.series.some(e=>"scatter"===e.type)}),Cx.getInitialState=e=>({voronoi:{isVoronoiEnabled:!e.disableVoronoi}}),Cx.params={disableVoronoi:!0,voronoiMaxRadius:!0,onItemClick:!0};const Px=[Xs,Mb,Ys,Ws,Bs,Zs,Bb,Cx,kx],Ex=["children","localeText","plugins","seriesConfig","slots","slotProps"],Tx=e=>{const t=Lh({props:e,name:"MuiChartDataProvider"}),{children:n,localeText:r,plugins:i=Px,seriesConfig:o,slots:a,slotProps:s}=t,c=tt(t,Ex);return{children:n,localeText:r,chartProviderProps:{plugins:i,seriesConfig:o,pluginParams:l({theme:xm().palette.mode},c)},slots:a,slotProps:s}},Ax=e=>{const{chartProviderProps:t,localeText:n,slots:r,slotProps:i,children:o}=Tx(e);return{children:o,localeText:n,chartProviderProps:t,slots:r,slotProps:i}},Ox="MTc2NzgzMDQwMDAwMA==",jx="x-charts-pro",Lx=rc;function Rx(e){const{children:t,localeText:n,chartProviderProps:r,slots:i,slotProps:o}=Ax(l({},e,{seriesConfig:e.seriesConfig??Lx,plugins:e.plugins??wx}));return A(jx,Ox),(0,O.jsxs)(oc,l({},r,{children:[(0,O.jsx)(_h,{localeText:n,children:(0,O.jsx)(lc,{slots:i,slotProps:o,defaultSlots:db,children:t})}),(0,O.jsx)(L,{packageName:jx,releaseInfo:Ox})]}))}function Dx(...t){const n=e.useRef(void 0),r=e.useCallback(e=>{const n=t.map(t=>{if(null==t)return null;if("function"==typeof t){const n=t,r=n(e);return"function"==typeof r?r:()=>{n(null)}}return t.current=e,()=>{t.current=null}});return()=>{n.forEach(e=>e?.())}},t);return e.useMemo(()=>t.every(e=>null==e)?null:e=>{n.current&&(n.current(),n.current=void 0),null!=e&&(n.current=r(e))},t)}const $x=()=>{const t=e.useContext(ot);if(null==t)throw new Error(["MUI X Charts: Could not find the Chart context.","It looks like you rendered your component outside of a ChartDataProvider.","This can also happen if you are bundling multiple versions of the library."].join("\n"));return t};function zx(){const e=$x();if(!e)throw new Error(["MUI X Charts: Could not find the charts context.","It looks like you rendered your component outside of a ChartContainer parent component."].join("\n"));return e.store}function Nx(){return zx().use(he)}function _x(){const e=zx(),{axis:t,axisIds:n}=e.use(ls);return{xAxis:t,xAxisIds:n}}function Fx(){const e=zx(),{axis:t,axisIds:n}=e.use(cs);return{yAxis:t,yAxisIds:n}}function Hx(e){const t=zx(),{axis:n,axisIds:r}=t.use(ls);return n[e??r[0]]}function Bx(e){const t=zx(),{axis:n,axisIds:r}=t.use(cs);return n[e??r[0]]}function Vx(){const e=zx(),{axis:t,axisIds:n}=e.use(jb);return{rotationAxis:t,rotationAxisIds:n}}function Ux(t){const{isReversed:n,gradientId:r,size:i,direction:o,scale:a,colorMap:s}=t;return i<=0?null:(0,O.jsx)("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${o}${n?1:2}`]:`${i}px`,gradientUnits:"userSpaceOnUse",children:s.thresholds.map((t,r)=>{const o=a(t);if(void 0===o)return null;const l=n?1-o/i:o/i;return Number.isNaN(l)?null:(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)("stop",{offset:l,stopColor:s.colors[r],stopOpacity:1}),(0,O.jsx)("stop",{offset:l,stopColor:s.colors[r+1],stopOpacity:1})]},t.toString()+r)})})}function Yx(e){const{gradientUnits:t,isReversed:n,gradientId:r,size:i,direction:o,scale:a,colorScale:s,colorMap:l}=e,c=[l.min??0,l.max??100],u=c.map(a).filter(e=>void 0!==e);if(2!==u.length)return null;const d="number"==typeof c[0]?Tn(c[0],c[1]):En(c[0],c[1]),p=Math.round((Math.max(...u)-Math.min(...u))/10),h=`${c[0]}-${c[1]}-`;return(0,O.jsx)("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${o}${n?1:2}`]:"objectBoundingBox"===t?1:`${i}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:p+1},(e,t)=>{const r=d(t/p);if(void 0===r)return null;const o=a(r);if(void 0===o)return null;const l=n?1-o/i:o/i,c=s(r);return null===c?null:(0,O.jsx)("stop",{offset:l,stopColor:c,stopOpacity:1},h+t)})})}function Wx(e){const{isReversed:t,gradientId:n,colorScale:r,colorMap:i}=e,o=[i.min??0,i.max??100],a="number"==typeof o[0]?Tn(o[0],o[1]):En(o[0],o[1]),s=`${o[0]}-${o[1]}-`;return(0,O.jsx)("linearGradient",l({id:n},(e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"})(t),{gradientUnits:"objectBoundingBox",children:Array.from({length:11},(e,t)=>{const n=t/10,i=a(n);if(void 0===i)return null;const o=r(i);return null===o?null:(0,O.jsx)("stop",{offset:n,stopColor:o,stopOpacity:1},s+t)})}))}const Gx=ae(e=>e,e=>e.zAxis);function Kx(){const e=zx(),{axis:t,axisIds:n}=e.use(Gx)??{axis:{},axisIds:[]};return{zAxis:t,zAxisIds:n}}const qx=ae(e=>e.id,e=>e.chartId);function Xx(){return zx().use(qx)}function Zx(){const t=Xx();return e.useCallback(e=>`${t}-gradient-${e}`,[t])}function Jx(){const t=Xx();return e.useCallback(e=>`${t}-gradient-${e}-object-bound`,[t])}function Qx(){const{top:t,height:n,bottom:r,left:i,width:o,right:a}=Nx(),s=t+n+r,l=i+o+a,c=Zx(),u=Jx(),{xAxis:d,xAxisIds:p}=_x(),{yAxis:h,yAxisIds:m}=Fx(),{zAxis:f,zAxisIds:g}=Kx(),y=m.filter(e=>void 0!==h[e].colorMap),v=p.filter(e=>void 0!==d[e].colorMap),b=g.filter(e=>void 0!==f[e].colorMap);return 0===y.length&&0===v.length&&0===b.length?null:(0,O.jsxs)("defs",{children:[y.map(t=>{const n=c(t),r=u(t),{colorMap:i,scale:o,colorScale:a,reverse:l}=h[t];return"piecewise"===i?.type?(0,O.jsx)(Ux,{isReversed:!l,scale:o,colorMap:i,size:s,gradientId:n,direction:"y"},n):"continuous"===i?.type?(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(Yx,{isReversed:!l,scale:o,colorScale:a,colorMap:i,size:s,gradientId:n,direction:"y"}),(0,O.jsx)(Wx,{isReversed:l,colorScale:a,colorMap:i,gradientId:r})]},n):null}),v.map(t=>{const n=c(t),r=u(t),{colorMap:i,scale:o,reverse:a,colorScale:s}=d[t];return"piecewise"===i?.type?(0,O.jsx)(Ux,{isReversed:a,scale:o,colorMap:i,size:l,gradientId:n,direction:"x"},n):"continuous"===i?.type?(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(Yx,{isReversed:a,scale:o,colorScale:s,colorMap:i,size:l,gradientId:n,direction:"x"}),(0,O.jsx)(Wx,{isReversed:a,colorScale:s,colorMap:i,gradientId:r})]},n):null}),b.map(e=>{const t=u(e),{colorMap:n,colorScale:r}=f[e];return"continuous"===n?.type?(0,O.jsx)(Wx,{colorScale:r,colorMap:n,gradientId:t},t):null})]})}function eI(){const e=$x();if(!e)throw new Error(["MUI X Charts: Could not find the svg ref context.","It looks like you rendered your component outside of a ChartContainer parent component."].join("\n"));return e.svgRef}const tI=e=>e.keyboardNavigation,nI=ae(tI,(e,t)=>null!=e?.item&&Us(e.item,t)),rI=ae(tI,e=>null!=e?.item),iI=ae(tI,e=>e?.item??null),oI=ae(tI,e=>!!e?.enableKeyboardNavigation),aI=e=>(t,n,r)=>{if(null==t||!("dataIndex"in t)||void 0===t.dataIndex)return;const i=r[t.type]?.series[t.seriesId];if(!i)return;let o="x"===e?"xAxisId"in i&&i.xAxisId:"yAxisId"in i&&i.yAxisId;return void 0!==o&&!1!==o||(o=n.axisIds[0]),{axisId:o,dataIndex:t.dataIndex}},sI=ae(iI,ls,ft,aI("x")),lI=ae(iI,cs,ft,aI("y")),cI=ae(tI,function(e){if(null==e?.item)return null;const{type:t,seriesId:n}=e.item;return void 0===t||void 0===n?null:e.item});function uI(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let e=0;e({width:e.width??"100%",height:e.height??"100%",display:"flex",position:"relative",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",touchAction:e.hasZoom?"pan-y":void 0,userSelect:"none",gridArea:"chart","&:focus":{outline:"none"}})),mI=e.forwardRef(function(e,t){const n=zx(),r=n.use(me),i=n.use(fe),o=n.use(ge),a=n.use(ye),s=n.use(oI),c=n.use(rI),u=n.use(Ya),d=Dx(eI(),t),p=Lh({props:e,name:"MuiChartsSurface"}),{children:h,className:m,title:f,desc:g}=p,y=tt(p,pI),v=uI({root:["root"]},dI),b=i>0&&r>0;return(0,O.jsxs)(hI,l({ownerState:{width:o,height:a,hasZoom:u},viewBox:`0 0 ${r} ${i}`,className:Hh(v.root,m),tabIndex:s?0:void 0,"data-has-focused-item":c||void 0},y,{ref:d,children:[f&&(0,O.jsx)("title",{children:f}),g&&(0,O.jsx)("desc",{children:g}),(0,O.jsx)(Qx,{}),b&&h]}))}),fI=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t},gI=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=Hh(n?.className,o,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},a={...n,...i,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}({...i,...r}),s=fI(r),l=fI(i),c=t(a),u=Hh(c?.className,n?.className,o,i?.className,r?.className),d={...c?.style,...n?.style,...i?.style,...r?.style},p={...c,...n,...l,...s};return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}},yI=function(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,a=i?{}:function(e,t,n){return"function"==typeof e?e(t,n):e}(n,r),{props:s,internalRef:l}=gI({...o,externalSlotProps:a});return function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(t,{...s,ref:Dx(l,a?.ref,e.additionalProps?.ref)},r)};function vI(e){"hasPointerCapture"in e.currentTarget&&e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId)}const bI=(t,n)=>{const{instance:r}=$x(),i=e.useRef(!1),o=ke(()=>{i.current=!0,r.setLastUpdateSource("pointer"),r.setTooltipItem(t),r.setHighlight("sankey"===t.type?t:{seriesId:t.seriesId,dataIndex:t.dataIndex})}),a=ke(()=>{i.current=!1,r.removeTooltipItem(t),r.clearHighlight()});return e.useEffect(()=>()=>{i.current&&a()},[a]),e.useMemo(()=>n?{}:{onPointerEnter:o,onPointerLeave:a,onPointerDown:vI},[n,o,a])};function xI(){return!1}function II(e,t){return e&&t?function(n){return!!n&&("series"===e.highlight||"item"===e.highlight&&n.dataIndex===t.dataIndex)&&n.seriesId===t.seriesId}:xI}function wI(){return!1}function kI(e,t){return e&&t?function(n){return!!n&&("series"===e.fade?n.seriesId===t.seriesId&&n.dataIndex!==t.dataIndex:"global"===e.fade&&(n.seriesId!==t.seriesId||n.dataIndex!==t.dataIndex))}:wI}function SI(e,t,n){return"series"===e?.highlight&&t?.seriesId===n}function MI(e,t,n){return"item"===e?.highlight&&t?.seriesId===n?t.dataIndex:null}const CI=ae(ft,e=>{const t=new Map;return Object.keys(e).forEach(n=>{const r=e[n];r?.seriesOrder?.forEach(e=>{const n=r?.series[e];t.set(e,n?.highlightScope)})}),t}),PI=le(e=>e.highlight,cI,function(e,t){return e.isControlled||"pointer"===e.lastUpdate?e.item:t}),EI=ae(CI,PI,function(e,t){if(!t)return null;const n=e.get(t.seriesId);return void 0===n?null:n}),TI=le(EI,PI,II),AI=le(EI,PI,kI),OI=ae(EI,PI,function(e,t,n){return II(e,t)(n)}),jI=ae(EI,PI,SI),LI=ae(EI,PI,function(e,t,n){return!SI(e,t,n)&&("global"===e?.fade&&null!=t||"series"===e?.fade&&t?.seriesId===n)}),RI=ae(EI,PI,function(e,t,n){return SI(e,t,n)||MI(e,t,n)===t?.dataIndex||"series"!==e?.fade&&"global"!==e?.fade||t?.seriesId!==n?null:t.dataIndex}),DI=ae(EI,PI,MI),$I=ae(EI,PI,function(e,t,n){return kI(e,t)(n)});function zI(e){const t=zx(),n=t.use(OI,e),r=t.use($I,e);return{isHighlighted:n,isFaded:!n&&r}}var NI=a(9853);const _I=300,FI="cubic-bezier(0.66, 0, 0.34, 1)",HI=NI(.66,0,.34,1);var BI,VI,UI=0,YI=0,WI=0,GI=0,KI=0,qI=0,XI="object"==typeof performance&&performance.now?performance:Date,ZI="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function JI(){return KI||(ZI(QI),KI=XI.now()+qI)}function QI(){KI=0}function ew(){this._call=this._time=this._next=null}function tw(e,t,n){var r=new ew;return r.restart(e,t,n),r}function nw(){KI=(GI=XI.now())+qI,UI=YI=0;try{!function(){JI(),++UI;for(var e,t=BI;t;)(e=KI-t._time)>=0&&t._call.call(void 0,e),t=t._next;--UI}()}finally{UI=0,function(){for(var e,t,n=BI,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:BI=t);VI=e,iw(r)}(),KI=0}}function rw(){var e=XI.now(),t=e-GI;t>1e3&&(qI-=t,GI=e)}function iw(e){UI||(YI&&(YI=clearTimeout(YI)),e-KI>24?(e<1/0&&(YI=setTimeout(nw,e-XI.now()-qI)),WI&&(WI=clearInterval(WI))):(WI||(GI=XI.now(),WI=setInterval(rw,1e3)),UI=1,ZI(nw)))}ew.prototype=tw.prototype={constructor:ew,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?JI():+n)+(null==t?0:+t),this._next||VI===this||(VI?VI._next=this:BI=this,VI=this),this._call=e,this._time=n,iw()},stop:function(){this._call&&(this._call=null,this._time=1/0,iw())}};class ow{elapsed=0;timer=null;constructor(e,t,n){this.duration=e,this.easingFn=t,this.onTickCallback=n,this.resume()}get running(){return null!==this.timer}timerCallback(e){this.elapsed=Math.min(e,this.duration);const t=0===this.duration?1:this.elapsed/this.duration,n=this.easingFn(t);this.onTickCallback(n),this.elapsed>=this.duration&&this.stop()}resume(){if(this.running||this.elapsed>=this.duration)return this;const e=JI()-this.elapsed;return this.timer=tw(e=>this.timerCallback(e),0,e),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),e=()=>this.timerCallback(this.duration),n=new ew,t=null==t?0:+t,n.restart(t=>{n.stop(),e()},t,void 0),this;var e,t,n}}function aw(t,{createInterpolator:n,transformProps:r,applyProps:i,skip:o,initialProps:a=t,ref:s}){const c=r??(e=>e),[u,d]=function(t,{createInterpolator:n,applyProps:r,skip:i,initialProps:o=t}){const a=e.useRef(o),s=e.useRef(null),l=e.useRef(null),c=e.useRef(t);V(()=>{c.current=t},[t]),V(()=>{i&&(s.current?.finish(),s.current=null,l.current=null,a.current=t)},[t,i]);const u=e.useCallback(e=>{const i=a.current,o=n(i,t);s.current=new ow(_I,HI,t=>{const n=o(t);a.current=n,r(e,n)})},[r,n,t]),d=e.useCallback(e=>{if(null===e)return void s.current?.stop();const n=l.current;if(n===e){if(function(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;ri(e,c(t)),skip:o});return l({},r(o?t:d),{ref:Dx(u,s)})}function sw(e){return e.replace(" ","_")}const lw=Zb("MuiAppearingMask",["animate"]),cw=bm("rect",{slot:"internal",shouldForwardProp:void 0})({animationName:"animate-width",animationTimingFunction:FI,animationDuration:"0s",[`&.${lw.animate}`]:{animationDuration:`${_I}ms`},"@keyframes animate-width":{from:{width:0}}});function uw(t){const n=Nx(),r=sw(`${Xx()}-${t.id}`);return(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)("clipPath",{id:r,children:(0,O.jsx)(cw,{className:t.skipAnimation?"":lw.animate,x:0,y:0,width:n.left+n.width+n.right,height:n.top+n.height+n.bottom})}),(0,O.jsx)("g",{clipPath:`url(#${r})`,children:t.children})]})}const dw=["skipAnimation","ownerState"];function pw(e){const{skipAnimation:t,ownerState:n}=e,r=tt(e,dw),i=function(e){return aw({d:e.d},{createInterpolator:(e,t)=>{const n=Ln(e.d,t.d);return e=>({d:n(e)})},applyProps:(e,{d:t})=>e.setAttribute("d",t),transformProps:e=>e,skip:e.skipAnimation,ref:e.ref})}(e);return(0,O.jsx)(uw,{skipAnimation:t,id:`${n.id}-area-clip`,children:(0,O.jsx)("path",l({fill:n.gradientId?`url(#${n.gradientId})`:n.color,filter:n.isHighlighted?"brightness(140%)":n.gradientId?void 0:"brightness(120%)",opacity:n.isFaded?.3:1,stroke:"none","data-series":n.id,"data-highlighted":n.isHighlighted||void 0,"data-faded":n.isFaded||void 0},r,i))})}const hw=["id","classes","color","gradientId","slots","slotProps","onClick"];function mw(e){return Xb("MuiAreaElement",e)}const fw=Zb("MuiAreaElement",["root","highlighted","faded","series"]),gw=e=>{const{classes:t,id:n,isFaded:r,isHighlighted:i}=e;return uI({root:["root",`series-${n}`,i&&"highlighted",r&&"faded"]},mw,t)};function yw(e){const{id:t,classes:n,color:r,gradientId:i,slots:o,slotProps:a,onClick:s}=e,c=tt(e,hw),u=bI({type:"line",seriesId:t}),{isFaded:d,isHighlighted:p}=zI({seriesId:t}),h={id:t,classes:n,color:r,gradientId:i,isFaded:d,isHighlighted:p},m=gw(h),f=o?.area??pw,g=yI({elementType:f,externalSlotProps:a?.area,additionalProps:l({},u,{onClick:s,cursor:s?"pointer":"unset"}),className:m.root,ownerState:h});return(0,O.jsx)(f,l({},c,g))}const vw=ae(e=>e.animation,e=>e.skip||e.skipAnimationRequests>0);function bw(e){const t=zx().use(vw);return e||t}function xw(){return zx().use(Wa)}function Iw(e){this._context=e}function ww(e){return new Iw(e)}Iw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};const kw=Math.PI,Sw=2*kw,Mw=1e-6,Cw=Sw-Mw;function Pw(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Pw;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;tMw)if(Math.abs(u*s-l*c)>Mw&&i){let p=n-o,h=r-a,m=s*s+l*l,f=p*p+h*h,g=Math.sqrt(m),y=Math.sqrt(d),v=i*Math.tan((kw-Math.acos((m+d-f)/(2*g*y)))/2),b=v/y,x=v/g;Math.abs(b-1)>Mw&&this._append`L${e+b*c},${t+b*u}`,this._append`A${i},${i},0,0,${+(u*p>c*h)},${this._x1=e+x*s},${this._y1=t+x*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,i,o){if(e=+e,t=+t,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Mw||Math.abs(this._y1-c)>Mw)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%Sw+Sw),d>Cw?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>Mw&&this._append`A${n},${n},0,${+(d>=kw)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Tw(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Ew(t)}function Aw(e){return e[0]}function Ow(e){return e[1]}function jw(e,t){var n=rl(!0),r=null,i=ww,o=null,a=Tw(s);function s(s){var l,c,u,d=(s=nl(s)).length,p=!1;for(null==r&&(o=i(u=a())),l=0;l<=d;++l)!(l=d;--p)s.point(y[p],v[p]);s.lineEnd(),s.areaEnd()}g&&(y[u]=+e(h,u,c),v[u]=+t(h,u,c),s.point(r?+r(h,u,c):y[u],n?+n(h,u,c):v[u]))}if(m)return s=null,m+""||null}function u(){return jw().defined(i).curve(a).context(o)}return e="function"==typeof e?e:void 0===e?Aw:rl(+e),t="function"==typeof t?t:rl(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?Ow:rl(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:rl(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:rl(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:rl(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:rl(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:rl(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:rl(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(i="function"==typeof e?e:rl(!!e),c):i},c.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),c):a},c.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),c):o},c}function Rw(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Dw(e,t){this._context=e,this._k=(1-t)/6}function $w(e,t){this._context=e,this._alpha=t}Ew.prototype,Dw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Rw(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Rw(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},function e(t){function n(e){return new Dw(e,t)}return n.tension=function(t){return e(+t)},n}(0),$w.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>Kl){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Kl){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const zw=function e(t){function n(e){return t?new $w(e,t):new Dw(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Nw(e){return e<0?-1:1}function _w(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Nw(o)+Nw(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Fw(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Hw(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Bw(e){this._context=e}function Vw(e){this._context=new Uw(e)}function Uw(e){this._context=e}function Yw(e){return new Bw(e)}function Ww(e){return new Vw(e)}function Gw(e){this._context=e}function Kw(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};class ek{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function tk(e){return new ek(e,!0)}function nk(e){return new ek(e,!1)}function rk(e){switch(e){case"catmullRom":return zw.alpha(.5);case"linear":return ww;case"monotoneX":default:return Yw;case"monotoneY":return Ww;case"natural":return qw;case"step":return Zw;case"stepBefore":return Jw;case"stepAfter":return Qw;case"bumpY":return nk;case"bumpX":return tk}}const ik=ae(ft,(e,t)=>e[t]),ok=le(ft,(e,t,n)=>{if(void 0===n||Array.isArray(n)&&0===n.length)return e[t]?.seriesOrder?.map(n=>e[t]?.series[n])??[];if(!Array.isArray(n))return e[t]?.series?.[n];const r=[],i=[];for(const o of n){const n=e[t]?.series?.[o];n?r.push(n):i.push(o)}return r}),ak=e=>zx().use(ik,e),sk=(e,t)=>zx().use(ok,e,t);function lk(){return ak("line")}function ck(e){if(fa(e))return t=>(e(t)??0)+e.bandwidth()/2;const t=e.domain();return t[0]===t[1]?n=>n===t[0]?e(n):NaN:t=>e(t)}function uk(e){return Hx(e).scale}function dk(e){return Bx(e).scale}function pk(t,n){const r=lk(),i=_x().xAxisIds[0],o=Fx().yAxisIds[0],a=Zx(),s=e.useMemo(()=>{if(void 0===r)return[];const{series:e,stackingGroups:s}=r,l=[];for(const r of s){const s=r.ids;for(let r=s.length-1;r>=0;r-=1){const c=s[r],{xAxisId:u=i,yAxisId:d=o,stackedData:p,data:h,connectNulls:m,baseline:f,curve:g,strictStepCurve:y,area:v}=e[c];if(!v||!(u in t)||!(d in n))continue;const b=t[u].scale,x=ck(b),I=n[d].scale,w=t[u].data,k=n[d].colorScale&&a(d)||t[u].colorScale&&a(u)||void 0,S=g?.includes("step")&&!y&&fa(b),M=w?.flatMap((e,t)=>{const n=null==h[t];if(S){const r=[{x:e,y:p[t],nullData:n,isExtension:!1}];return n||0!==t&&null!=h[t-1]||r.unshift({x:(b(e)??0)-(b.step()-b.bandwidth())/2,y:p[t],nullData:n,isExtension:!0}),n||t!==h.length-1&&null!=h[t+1]||r.push({x:(b(e)??0)+(b.step()+b.bandwidth())/2,y:p[t],nullData:n,isExtension:!0}),r}return{x:e,y:p[t],nullData:n}})??[],C=m?M.filter(e=>!e.nullData):M,P=Lw().x(e=>e.isExtension?e.x:x(e.x)).defined(e=>m||!e.nullData||!!e.isExtension).y0(e=>{if("number"==typeof f)return I(f);if("max"===f)return I.range()[1];if("min"===f)return I.range()[0];const t=e.y&&I(e.y[0]);return Number.isNaN(t)?I.range()[0]:t}).y1(e=>e.y&&I(e.y[1])),E=P.curve(rk(g))(C)||"";l.push({area:e[c].area,color:e[c].color,gradientId:k,d:E,seriesId:c})}}return l},[r,i,o,t,n,a]);return s}const hk=["slots","slotProps","onItemClick","skipAnimation"],mk=bm("g",{name:"MuiAreaPlot",slot:"Root"})({[`& .${fw.root}`]:{transitionProperty:"opacity, fill",transitionDuration:`${_I}ms`,transitionTimingFunction:FI}}),fk=()=>{const{xAxis:e}=_x(),{yAxis:t}=Fx();return pk(e,t)};function gk(e){const{slots:t,slotProps:n,onItemClick:r,skipAnimation:i}=e,o=tt(e,hk),a=bw(xw()||i),s=fk();return(0,O.jsx)(mk,l({},o,{children:s.map(({d:e,seriesId:i,color:o,area:s,gradientId:l})=>!!s&&(0,O.jsx)(yw,{id:i,d:e,color:o,gradientId:l,slots:t,slotProps:n,onClick:r&&(e=>r(e,{type:"line",seriesId:i})),skipAnimation:a},i))}))}const yk=["skipAnimation","ownerState"],vk=e.forwardRef(function(e,t){const{skipAnimation:n,ownerState:r}=e,i=tt(e,yk),o=function(e){return aw({d:e.d},{createInterpolator:(e,t)=>{const n=Ln(e.d,t.d);return e=>({d:n(e)})},applyProps:(e,{d:t})=>e.setAttribute("d",t),skip:e.skipAnimation,transformProps:e=>e,ref:e.ref})}({d:e.d,skipAnimation:n,ref:t}),a=r.isFaded?.3:1;return(0,O.jsx)(uw,{skipAnimation:n,id:`${r.id}-line-clip`,children:(0,O.jsx)("path",l({stroke:r.gradientId?`url(#${r.gradientId})`:r.color,strokeWidth:2,strokeLinejoin:"round",fill:"none",filter:r.isHighlighted?"brightness(120%)":void 0,opacity:r.hidden?0:a,"data-series":r.id,"data-highlighted":r.isHighlighted||void 0,"data-faded":r.isFaded||void 0},i,o))})}),bk=["id","classes","color","gradientId","slots","slotProps","onClick","hidden"];function xk(e){return Xb("MuiLineElement",e)}const Ik=Zb("MuiLineElement",["root","highlighted","faded","series"]),wk=e=>{const{classes:t,id:n,isFaded:r,isHighlighted:i}=e;return uI({root:["root",`series-${n}`,i&&"highlighted",r&&"faded"]},xk,t)};function kk(e){const{id:t,classes:n,color:r,gradientId:i,slots:o,slotProps:a,onClick:s,hidden:c}=e,u=tt(e,bk),d=bI({type:"line",seriesId:t}),{isFaded:p,isHighlighted:h}=zI({seriesId:t}),m={id:t,classes:n,color:r,gradientId:i,isFaded:p,isHighlighted:h,hidden:c},f=wk(m),g=o?.line??vk,y=yI({elementType:g,externalSlotProps:a?.line,additionalProps:l({},d,{onClick:s,cursor:s?"pointer":"unset"}),className:f.root,ownerState:m});return(0,O.jsx)(g,l({},u,y))}function Sk(t,n){const r=lk(),i=_x().xAxisIds[0],o=Fx().yAxisIds[0],a=Zx();return e.useMemo(()=>{if(void 0===r)return[];const{series:e,stackingGroups:s}=r,l=[];for(const r of s){const s=r.ids;for(const r of s){const{xAxisId:s=i,yAxisId:c=o,stackedData:u,data:d,connectNulls:p,curve:h,strictStepCurve:m}=e[r];if(!(s in t)||!(c in n))continue;const f=t[s].scale,g=ck(f),y=n[c].scale,v=t[s].data,b=n[c].colorScale&&a(c)||t[s].colorScale&&a(s)||void 0,x=h?.includes("step")&&!m&&fa(f),I=v?.flatMap((e,t)=>{const n=null==d[t];if(x){const r=[{x:e,y:u[t],nullData:n,isExtension:!1}];return n||0!==t&&null!=d[t-1]||r.unshift({x:(f(e)??0)-(f.step()-f.bandwidth())/2,y:u[t],nullData:n,isExtension:!0}),n||t!==d.length-1&&null!=d[t+1]||r.push({x:(f(e)??0)+(f.step()+f.bandwidth())/2,y:u[t],nullData:n,isExtension:!0}),r}return{x:e,y:u[t],nullData:n}})??[],w=p?I.filter(e=>!e.nullData):I,k=jw().x(e=>e.isExtension?e.x:g(e.x)).defined(e=>p||!e.nullData||!!e.isExtension).y(e=>y(e.y[1])),S=k.curve(rk(h))(w)||"";l.push({color:e[r].color,gradientId:b,d:S,seriesId:r})}}return l},[r,i,o,t,n,a])}const Mk=["slots","slotProps","skipAnimation","onItemClick"],Ck=bm("g",{name:"MuiAreaPlot",slot:"Root"})({[`& .${Ik.root}`]:{transitionProperty:"opacity, fill",transitionDuration:`${_I}ms`,transitionTimingFunction:FI}}),Pk=()=>{const{xAxis:e}=_x(),{yAxis:t}=Fx();return Sk(e,t)};function Ek(e){const{slots:t,slotProps:n,skipAnimation:r,onItemClick:i}=e,o=tt(e,Mk),a=bw(xw()||r),s=Pk();return(0,O.jsx)(Ck,l({},o,{children:s.map(({d:e,seriesId:r,color:o,gradientId:s})=>(0,O.jsx)(kk,{id:r,d:e,color:o,gradientId:s,skipAnimation:a,slots:t,slotProps:n,onClick:i&&(e=>i(e,{type:"line",seriesId:r}))},r))}))}function Tk(e){return Xb("MuiMarkElement",e)}const Ak=Zb("MuiMarkElement",["root","highlighted","faded","animate","series"]),Ok=e=>{const{classes:t,id:n,isFaded:r,isHighlighted:i,skipAnimation:o}=e;return uI({root:["root",`series-${n}`,i&&"highlighted",r&&"faded",o?void 0:"animate"]},Tk,t)},jk=["x","y","id","classes","color","dataIndex","onClick","skipAnimation","isFaded","isHighlighted","shape","hidden"],Lk=bm("circle",{slot:"internal",shouldForwardProp:void 0})({[`&.${Ak.animate}`]:{transitionDuration:`${_I}ms`,transitionProperty:"cx, cy, opacity",transitionTimingFunction:FI}});function Rk(e){const{x:t,y:n,id:r,classes:i,color:o,dataIndex:a,onClick:s,skipAnimation:c,isFaded:u=!1,isHighlighted:d=!1,hidden:p}=e,h=tt(e,jk),m=xm(),f=bI({type:"line",seriesId:r,dataIndex:a}),g=Ok({id:r,classes:i,isHighlighted:d,isFaded:u,skipAnimation:c});return(0,O.jsx)(Lk,l({},h,{cx:t,cy:n,r:5,fill:(m.vars||m).palette.background.paper,stroke:o,strokeWidth:2,className:g.root,onClick:s,cursor:s?"pointer":"unset",pointerEvents:p?"none":void 0},f,{"data-highlighted":d||void 0,"data-faded":u||void 0,opacity:p?0:1}))}Gl(3);const Dk={draw(e,t){const n=Gl(t/ql);e.moveTo(n,0),e.arc(0,0,n,0,Zl)}},$k={draw(e,t){const n=Gl(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},zk=Gl(1/3),Nk=2*zk,_k={draw(e,t){const n=Gl(t/Nk),r=n*zk;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Fk={draw(e,t){const n=Gl(t),r=-n/2;e.rect(r,r,n,n)}},Hk=Wl(ql/10)/Wl(7*ql/10),Bk=Wl(Zl/10)*Hk,Vk=-Vl(Zl/10)*Hk,Uk={draw(e,t){const n=Gl(.8908130915292852*t),r=Bk*n,i=Vk*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){const o=Zl*t/5,a=Vl(o),s=Wl(o);e.lineTo(s*n,-a*n),e.lineTo(a*r-s*i,s*r+a*i)}e.closePath()}},Yk=Gl(3),Wk={draw(e,t){const n=-Gl(t/(3*Yk));e.moveTo(0,2*n),e.lineTo(-Yk*n,-n),e.lineTo(Yk*n,-n),e.closePath()}},Gk=(Gl(3),-.5),Kk=Gl(3)/2,qk=1/Gl(12),Xk=3*(qk/2+1),Zk={draw(e,t){const n=Gl(t/Xk),r=n/2,i=n*qk,o=r,a=n*qk+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Gk*r-Kk*i,Kk*r+Gk*i),e.lineTo(Gk*o-Kk*a,Kk*o+Gk*a),e.lineTo(Gk*s-Kk*l,Kk*s+Gk*l),e.lineTo(Gk*r+Kk*i,Gk*i-Kk*r),e.lineTo(Gk*o+Kk*a,Gk*a-Kk*o),e.lineTo(Gk*s+Kk*l,Gk*l-Kk*s),e.closePath()}},Jk=[Dk,$k,_k,Fk,Uk,Wk,Zk];function Qk(e,t){let n=null,r=Tw(i);function i(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return e="function"==typeof e?e:rl(e||Dk),t="function"==typeof t?t:rl(void 0===t?64:+t),i.type=function(t){return arguments.length?(e="function"==typeof t?t:rl(t),i):e},i.size=function(e){return arguments.length?(t="function"==typeof e?e:rl(+e),i):t},i.context=function(e){return arguments.length?(n=null==e?null:e,i):n},i}function eS(e){switch(e){case"circle":default:return 0;case"cross":return 1;case"diamond":return 2;case"square":return 3;case"star":return 4;case"triangle":return 5;case"wye":return 6}}const tS=["x","y","id","classes","color","shape","dataIndex","onClick","skipAnimation","isFaded","isHighlighted","hidden","style"],nS=bm("path",{name:"MuiMarkElement",slot:"Root"})(({theme:e})=>({fill:(e.vars||e).palette.background.paper,[`&.${Ak.animate}`]:{transitionDuration:`${_I}ms`,transitionProperty:"transform, transform-origin, opacity",transitionTimingFunction:FI}}));function rS(e){const{x:t,y:n,id:r,classes:i,color:o,shape:a,dataIndex:s,onClick:c,skipAnimation:u,isFaded:d=!1,isHighlighted:p=!1,hidden:h,style:m}=e,f=tt(e,tS),g=bI({type:"line",seriesId:r,dataIndex:s}),y={id:r,classes:i,isHighlighted:p,isFaded:d,skipAnimation:u},v=Ok(y);return(0,O.jsx)(nS,l({},f,{style:l({},m,{transform:`translate(${t}px, ${n}px)`,transformOrigin:`${t}px ${n}px`}),ownerState:y,className:v.root,d:Qk(Jk[eS(a)])(),onClick:c,cursor:c?"pointer":"unset",pointerEvents:h?"none":void 0},g,{"data-highlighted":p||void 0,"data-faded":d||void 0,opacity:h?0:1,strokeWidth:2,stroke:o}))}function iS(){const e=zx();return{isHighlighted:e.use(TI),isFaded:e.use(AI)}}const oS=e=>e.controlledCartesianAxisHighlight,aS=(e,t,n,r)=>r?[]:void 0!==n?n.filter(e=>void 0!==t.axis[e.axisId]).map(e=>e):null===e?[]:[{axisId:t.axisIds[0],dataIndex:e}],sS=le(As,ls,oS,kb,aS),lS=(le(Os,cs,oS,kb,aS),(e,t,n,r,i,o,a)=>{if(a)return[];if(void 0!==r)return r.map(e=>l({},e,{value:n.axis[e.axisId]?.data?.[e.dataIndex]})).filter(({value:e})=>void 0!==e);const s=null!==t&&{axisId:n.axisIds[0],dataIndex:e,value:t},c=i&&n.axis[i.axisId]?.data?.[i.dataIndex],u=i&&null!=c&&l({},i,{value:c});if("pointer"===o){if(s)return[s];if(u)return[u]}if("keyboard"===o){if(u)return[u];if(s)return[s]}return[]}),cS=le(As,Rs,ls,oS,sI,Cs,kb,lS),uS=le(Os,Ds,cs,oS,lI,Cs,kb,lS),dS=(e,t)=>void 0===e?[t.axis[t.axisIds[0]]]:e.map(e=>t.axis[e.axisId]??null).filter(e=>null!==e);ae(oS,ls,dS),ae(oS,cs,dS);const pS=["slots","slotProps","skipAnimation","onItemClick"];function hS(t){const{slots:n,slotProps:r,skipAnimation:i,onItemClick:o}=t,a=tt(t,pS),s=bw(xw()||i),{xAxis:c}=_x(),{yAxis:u}=Fx(),{store:d}=$x(),{isFaded:p,isHighlighted:h}=iS(),m=d.use(sS),f=e.useMemo(()=>{const e={};for(const{dataIndex:t,axisId:n}of m)void 0===e[n]?e[n]=new Set([t]):e[n].add(t);return e},[m]),g=function(t,n){const r=lk(),i=_x().xAxisIds[0],o=Fx().yAxisIds[0],a=Xx(),{instance:s}=$x(),l=e.useMemo(()=>{if(void 0===r)return[];const{series:e,stackingGroups:l}=r,c=[];for(const r of l){const l=r.ids;for(const r of l){const{xAxisId:l=i,yAxisId:u=o,stackedData:d,data:p,showMark:h=!0,shape:m="circle"}=e[r];if(!1===h)continue;if(!(l in t)||!(u in n))continue;const f=ck(t[l].scale),g=n[u].scale,y=t[l].data,v=sw(`${a}-${r}-line-clip`),b=$l(e[r],t[l],n[u]),x=[];if(y)for(let e=0;e{const u=n?.mark??("circle"===i?Rk:rS),d=h({seriesId:e}),m=!d&&p({seriesId:e});return(0,O.jsx)("g",{clipPath:`url(#${t})`,"data-series":e,children:c.map(({x:t,y:n,index:c,color:p})=>(0,O.jsx)(u,l({id:e,dataIndex:c,shape:i,color:p,x:t,y:n,skipAnimation:s,onClick:o&&(t=>o(t,{type:"line",seriesId:e,dataIndex:c})),isHighlighted:f[a]?.has(c)||d,isFaded:m},r?.mark),`${e}-${c}`))},e)})}))}new Set;const mS=e.createContext(),fS=()=>e.useContext(mS)??!1;function gS(){const[t,n]=e.useState(!1);return e.useEffect(()=>{n(!0)},[]),t}function yS(e){return"number"==typeof e&&!Number.isFinite(e)}function vS(e,t){return Math.abs(12*t.getFullYear()+t.getMonth()-12*e.getFullYear()-e.getMonth())}function bS(e,t){return Math.abs(t.getTime()-e.getTime())/864e5}const xS={years:{getTickNumber:function(e,t){return Math.abs(t.getFullYear()-e.getFullYear())},isTick:(e,t)=>t.getFullYear()!==e.getFullYear(),format:e=>e.getFullYear().toString()},quarterly:{getTickNumber:(e,t)=>Math.floor(vS(e,t)/3),isTick:(e,t)=>t.getMonth()!==e.getMonth()&&t.getMonth()%3==0,format:new Intl.DateTimeFormat("default",{month:"short"}).format},months:{getTickNumber:vS,isTick:(e,t)=>t.getMonth()!==e.getMonth(),format:new Intl.DateTimeFormat("default",{month:"short"}).format},biweekly:{getTickNumber:(e,t)=>bS(e,t)/14,isTick:(e,t)=>(t.getDay()7)&&Math.floor(t.getDate()/7)%2==1,format:new Intl.DateTimeFormat("default",{day:"numeric"}).format},weeks:{getTickNumber:(e,t)=>bS(e,t)/7,isTick:(e,t)=>t.getDay()=7,format:new Intl.DateTimeFormat("default",{day:"numeric"}).format},days:{getTickNumber:bS,isTick:(e,t)=>t.getDate()!==e.getDate(),format:new Intl.DateTimeFormat("default",{day:"numeric"}).format},hours:{getTickNumber:function(e,t){return Math.abs(t.getTime()-e.getTime())/36e5},isTick:(e,t)=>t.getHours()!==e.getHours(),format:new Intl.DateTimeFormat("default",{hour:"2-digit",minute:"2-digit"}).format}},IS={start:0,extremities:0,end:1,middle:.5};function wS(e,t,n){return e(t)-(e.step()-e.bandwidth())/2+IS[n]*e.step()}function kS(t){const{scale:n,tickNumber:r,valueFormatter:i,tickInterval:o,tickPlacement:a="extremities",tickLabelPlacement:s,tickSpacing:l,direction:c,ordinalTimeTicks:u}=t,{instance:d}=$x(),p="x"===c?d.isXInside:d.isYInside;return e.useMemo(()=>function(e){const{scale:t,tickNumber:n,valueFormatter:r,tickInterval:i,tickPlacement:o,tickLabelPlacement:a,tickSpacing:s,isInside:l,ordinalTimeTicks:c}=e;if(void 0!==c&&sa(t.domain())&&fa(t)){const e=t.domain();if(0===e.length||1===e.length)return[];const r="middle",i=function(e,t,n,r,i){if(0===n.length)return[];const o=r.range()[0]>r.range()[1],a=e.findIndex(e=>i(wS(r,e,o?"start":"end"))),s=e.findLastIndex(e=>i(wS(r,e,o?"end":"start"))),l=e[0],c=e[e.length-1];if(!(l instanceof Date&&c instanceof Date))return[];let u=0;for(let e=0;et||t/r"string"==typeof e?xS[e]:e),t,l);return i.map(({index:n,formatter:i})=>{const o=e[n];return{value:o,formattedValue:i(o),offset:wS(t,o,r),labelOffset:0}})}const u=o??"extremities";if(fa(t)){const e=t.domain(),o=a??"middle";let c=e;if("object"==typeof i&&null!=i?c=i:("function"==typeof i&&(c=c.filter(i)),void 0!==s&&s>0&&(c=function(e,t,n){const r=Math.abs(t[1]-t[0]),i=Math.ceil(e.length/(r/n));return Number.isNaN(i)||i<=1?e:e.filter((e,t)=>t%i===0)}(c,t.range(),s))),0===c.length)return[];if(t.bandwidth()>0){const i=t.range()[0]>t.range()[1],a=c.findIndex(e=>l(wS(t,e,i?"start":"end"))),s=c.findLastIndex(e=>l(wS(t,e,i?"end":"start")));return[...c.slice(a,s+1).map(e=>{const i=`${e}`;return{value:e,formattedValue:r?.(e,{location:"tick",scale:t,tickNumber:n,defaultTickLabel:i})??i,offset:wS(t,e,u),labelOffset:"tick"===o?0:t.step()*(IS[o]-IS[u])}}),..."extremities"===u&&s===e.length-1&&l(t.range()[1])?[{formattedValue:void 0,offset:t.range()[1],labelOffset:0}]:[]]}return c.map(e=>{const i=`${e}`;return{value:e,formattedValue:r?.(e,{location:"tick",scale:t,tickNumber:n,defaultTickLabel:i})??i,offset:t(e),labelOffset:0}})}if(t.domain().some(yS))return[];const d=a,p="object"==typeof i?i:function(e,t){const n=e.domain();return n[0]===n[1]?[n[0]]:e.ticks(t)}(t,n),h=[];for(let e=0;e=t)break;return r}:function(e,t){return e.slice(0,t)},ES="…";function TS(e,t){const{width:n,height:r,measureText:i}=t,o=t.angle*(Math.PI/180),a=i(e),s=Math.abs(a.width*Math.cos(o))+Math.abs(a.height*Math.sin(o)),l=Math.abs(a.width*Math.sin(o))+Math.abs(a.height*Math.cos(o));return s<=n&&l<=r}function AS(e,t){if(t(e))return e;let n=e,r=1,i=.5;const o=MS(e);let a=o,s=o,l=null;do{if(s=a,a=Math.floor(o*i),0===a)break;n=PS(e,a).trim(),r+=1,t(n+ES)?(l=n,i+=1/2**r):i-=1/2**r}while(1!==Math.abs(a-s));return l?l+ES:""}function OS(){return"undefined"==typeof window}const jS=new Map,LS=2e3,RS=new Set(["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"]);function DS(e,t){return RS.has(e)&&t===+t?`${t}px`:t}const $S=/([A-Z])/g;function zS(e){return String(e).replace($S,e=>`-${e.toLowerCase()}`)}function NS(e){let t="";for(const n in e)if(Object.hasOwn(e,n)){const r=n,i=e[r];if(void 0===i)continue;t+=`${zS(r)}:${DS(r,i)};`}return t}const _S=(e,t={})=>{if(null==e||OS())return{width:0,height:0};const n=String(e),r=`${n}-${NS(t)}`,i=jS.get(r);if(i)return i;try{const e=BS(),i=document.createElementNS("http://www.w3.org/2000/svg","text");Object.keys(t).map(e=>(i.style[zS(e)]=DS(e,t[e]),e)),i.textContent=n,e.replaceChildren(i);const o=FS(i);return jS.set(r,o),jS.size+1>LS&&jS.clear(),o}catch{return{width:0,height:0}}};function FS(e){try{const t=e.getBBox();return{width:t.width,height:t.height}}catch{const t=e.getBoundingClientRect();return{width:t.width,height:t.height}}}let HS=null;function BS(){return null===HS&&(HS=document.createElementNS("http://www.w3.org/2000/svg","svg"),HS.setAttribute("aria-hidden","true"),HS.style.position="absolute",HS.style.top="-20000px",HS.style.left="0",HS.style.padding="0",HS.style.margin="0",HS.style.border="none",HS.style.pointerEvents="none",HS.style.visibility="hidden",HS.style.contain="strict",document.body.appendChild(HS)),HS}const VS=5;function US(e){return Xb("MuiChartsAxis",e)}const YS=Zb("MuiChartsAxis",["root","line","tickContainer","tick","tickLabel","label","directionX","directionY","top","bottom","left","right","id"]),WS=e=>{const{classes:t,position:n,id:r}=e;return uI({root:["root","directionX",n,`id-${r}`],line:["line"],tickContainer:["tickContainer"],tick:["tick"],tickLabel:["tickLabel"],label:["label"]},US,t)},GS=3,KS=4,qS={disableLine:!1,disableTicks:!1,tickSize:6,tickLabelMinGap:4},XS=["x","y","style","text","ownerState"],ZS=["angle","textAnchor","dominantBaseline"];function JS(t){const{x:n,y:r,style:i,text:o}=t,a=tt(t,XS),s=i??{},{angle:c,textAnchor:u,dominantBaseline:d}=s,p=tt(s,ZS),h=gS(),m=e.useMemo(()=>function({style:e,needsComputation:t,text:n}){return n.split("\n").map(n=>l({text:n},t?_S(n,e):{width:0,height:0}))}({style:p,needsComputation:h&&o.includes("\n"),text:o}),[p,o,h]);let f;switch(d){case"hanging":case"text-before-edge":f=0;break;case"central":f=(m.length-1)/2*-m[0].height;break;default:f=(m.length-1)*-m[0].height}return(0,O.jsx)("text",l({},a,{transform:c?`rotate(${c}, ${n}, ${r})`:void 0,x:n,y:r,textAnchor:u,dominantBaseline:d,style:p,children:m.map((e,t)=>(0,O.jsx)("tspan",{x:n,dy:`${0===t?f:m[0].height}px`,dominantBaseline:d,children:e.text},t))}))}function QS(e){const t=$b(e);return t<=30||t>=330||t<=210&&t>=150?"middle":t<=180?"end":"start"}function eM(e){const t=$b(e);return t<=30||t>=330?"hanging":t<=210&&t>=150?"auto":"central"}function tM(e){switch(e){case"start":return"end";case"end":return"start";default:return e}}const nM=["scale","tickNumber","reverse"];function rM(e){const{xAxis:t,xAxisIds:n}=_x(),r=t[e.axisId??n[0]],{scale:i,tickNumber:o,reverse:a}=r,s=Lh({props:l({},tt(r,nM),e),name:"MuiChartsXAxis"}),c=l({},qS,s),{position:u,tickLabelStyle:d,slots:p,slotProps:h}=c,m=xm(),f=fS(),g=WS(c),y="bottom"===u?1:-1,v=p?.axisTick??"line",b=p?.axisTickLabel??JS,x=QS(("bottom"===u?0:180)-(d?.angle??0)),I=eM(("bottom"===u?0:180)-(d?.angle??0));return{xScale:i,defaultizedProps:c,tickNumber:o,positionSign:y,classes:g,Tick:v,TickLabel:b,axisTickLabelProps:yI({elementType:b,externalSlotProps:h?.axisTickLabel,additionalProps:{style:l({},m.typography.caption,{fontSize:12,lineHeight:1.25,textAnchor:f?tM(x):x,dominantBaseline:I},d)},className:g.tickLabel,ownerState:{}}),reverse:a}}function iM(t){const{axisLabelHeight:n,ordinalTimeTicks:r}=t,{xScale:i,defaultizedProps:o,tickNumber:a,positionSign:s,classes:c,Tick:u,TickLabel:d,axisTickLabelProps:p,reverse:h}=rM(t),m=fS(),f=function(t=!1){const[n,r]=e.useState(!1);return V(()=>{t||r(!0)},[t]),e.useEffect(()=>{t&&r(!0)},[t]),n}(),{disableTicks:g,tickSize:y,valueFormatter:v,slotProps:b,tickInterval:x,tickLabelInterval:I,tickPlacement:w,tickLabelPlacement:k,tickLabelMinGap:S,tickSpacing:M,height:C}=o,P=Nx(),{instance:E}=$x(),T=gS(),A=g?4:y,j=kS({scale:i,tickNumber:a,valueFormatter:v,tickInterval:x,tickPlacement:w,tickLabelPlacement:k,tickSpacing:M,direction:"x",ordinalTimeTicks:r}),L=function(e,{tickLabelStyle:t,tickLabelInterval:n,tickLabelMinGap:r,reverse:i,isMounted:o,isXInside:a}){if("function"==typeof n)return new Set(e.filter((e,t)=>n(e.value,t)));let s=0;const c=i?-1:1,u=e.filter(e=>{const{offset:t,labelOffset:n,formattedValue:r}=e;return""!==r&&a(t+n)}),d=function(e,t){const n=new Set;for(const t of e)t.formattedValue&&t.formattedValue.split("\n").forEach(e=>n.add(e));return function(e,t={}){if(OS())return new Map(Array.from(e).map(e=>[e,{width:0,height:0}]));const n=new Map,r=[],i=NS(t);for(const t of e){const e=`${t}-${i}`,o=jS.get(e);o?n.set(t,o):r.push(t)}const o=BS(),a=l({},t);Object.keys(a).map(e=>(o.style[zS(e)]=DS(e,a[e]),e));const s=[];for(const e of r){const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.textContent=`${e}`,s.push(t)}o.replaceChildren(...s);for(let e=0;eLS&&jS.clear(),n}(n,t)}(u,t);return new Set(u.filter((e,n)=>{const{offset:i,labelOffset:a}=e,l=i+a;if(n>0&&c*l90-VS)return t;const i=Ql(r);return i0&&c*(l-c*h/2)0?n+KS:0)-A-GS),D=T?function(e,t,n,r,i){const o=new Map,a=$b(i?.angle??0);let s=1,l=1;"start"===i?.textAnchor?(s=1/0,l=1):"end"===i?.textAnchor?(s=1,l=1/0):(s=2,l=2),a>90&&a<270&&([s,l]=[l,s]),r&&([s,l]=[l,s]);for(const r of e)if(r.formattedValue){const e=Math.min((r.offset+r.labelOffset)*s,(t.left+t.width+t.right-r.offset-r.labelOffset)*l),c=t=>TS(t,{width:e,height:n,angle:a,measureText:e=>_S(e,i)});o.set(r,AS(r.formattedValue.toString(),c))}return o}(L,P,R,m,p.style):new Map(Array.from(L).map(e=>[e,e.formattedValue]));return(0,O.jsx)(e.Fragment,{children:j.map((e,t)=>{const{offset:n,labelOffset:r}=e,i=r??0,o=s*(A+GS),a=E.isXInside(n),h=D.get(e),m=L.has(e);return(0,O.jsxs)("g",{transform:`translate(${n}, 0)`,className:c.tickContainer,children:[!g&&a&&(0,O.jsx)(u,l({y2:s*A,className:c.tick},b?.axisTick)),void 0!==h&&m&&(0,O.jsx)(d,l({x:i,y:o},p,{text:h}))]},t)})})}const oM={start:0,extremities:0,end:1,middle:.5,tick:0};function aM(t){const{scale:n,tickInterval:r,tickLabelPlacement:i="middle",tickPlacement:o="extremities",groups:a}=t;return e.useMemo(()=>{const e=n.domain(),t="function"==typeof r&&e.filter(r)||"object"==typeof r&&r||e;if(n.bandwidth()>0){const e=sM(t,a,o,i,n);return e[0]&&(e[0].ignoreTick=!0),[{formattedValue:void 0,offset:n.range()[0],labelOffset:0,groupIndex:a.length-1},...e,{formattedValue:void 0,offset:n.range()[1],labelOffset:0,groupIndex:a.length-1}]}return sM(t,a,o,i,n)},[n,r,a,o,i])}function sM(e,t,n,r,i){const o=[],a=new Map;let s=0;for(let l=0;l{const r=e[t]??{},i=n??lM.tickSize,o=i*t*2+i;return l({},lM,r,{tickSize:r.tickSize??o})};function uM(t){const{xScale:n,defaultizedProps:r,tickNumber:i,positionSign:o,classes:a,Tick:s,TickLabel:c,axisTickLabelProps:u}=rM(t);if(!fa(n))throw new Error("MUI X Charts: ChartsGroupedXAxis only supports the `band` and `point` scale types.");const{disableTicks:d,tickSize:p,valueFormatter:h,slotProps:m,tickInterval:f,tickPlacement:g,tickLabelPlacement:y}=r,v=r.groups,{instance:b}=$x(),x=aM({scale:n,tickNumber:i,valueFormatter:h,tickInterval:f,tickPlacement:g,tickLabelPlacement:y,direction:"x",groups:v});return(0,O.jsx)(e.Fragment,{children:x.map((e,t)=>{const{offset:n,labelOffset:r}=e,i=r??0,h=b.isXInside(n),f=e.formattedValue,g=e.ignoreTick??!1,y=e.groupIndex??0,x=cM(v,y,p),I=o*x.tickSize,w=o*(x.tickSize+GS);return(0,O.jsxs)("g",{transform:`translate(${n}, 0)`,className:a.tickContainer,"data-group-index":y,children:[!d&&!g&&h&&(0,O.jsx)(s,l({y2:I,className:a.tick},m?.axisTick)),void 0!==f&&(0,O.jsx)(c,l({x:i,y:w},u,{style:l({},u.style,x.tickLabelStyle),text:f}))]},t)})})}const dM=bm("g",{name:"MuiChartsAxis",slot:"Root"})(({theme:e})=>({[`& .${YS.tickLabel}`]:l({},e.typography.caption,{fill:(e.vars||e).palette.text.primary}),[`& .${YS.label}`]:{fill:(e.vars||e).palette.text.primary},[`& .${YS.line}`]:{stroke:(e.vars||e).palette.text.primary,shapeRendering:"crispEdges",strokeWidth:1},[`& .${YS.tick}`]:{stroke:(e.vars||e).palette.text.primary,shapeRendering:"crispEdges"}})),pM=["axis"],hM=["scale","tickNumber","reverse","ordinalTimeTicks"],mM=bm(dM,{name:"MuiChartsXAxis",slot:"Root"})({});function fM(e){let{axis:t}=e,n=tt(e,pM);const{scale:r,ordinalTimeTicks:i}=t,o=Lh({props:l({},tt(t,hM),n),name:"MuiChartsXAxis"}),a=l({},qS,o),{position:s,labelStyle:c,offset:u,slots:d,slotProps:p,sx:h,disableLine:m,label:f,height:g}=a,y=xm(),v=WS(a),{left:b,top:x,width:I,height:w}=Nx(),k="bottom"===s?1:-1,S=d?.axisLine??"line",M=d?.axisLabel??JS,C=yI({elementType:M,externalSlotProps:p?.axisLabel,additionalProps:{style:l({},y.typography.body1,{lineHeight:1,fontSize:14,textAnchor:"middle",dominantBaseline:"bottom"===s?"text-after-edge":"text-before-edge"},c)},ownerState:{}});if("none"===s)return null;const P=f?_S(f,C.style).height:0,E=r.domain();let T=null;(fa(r)?0===E.length:E.some(yS))||(T="groups"in t&&Array.isArray(t.groups)?(0,O.jsx)(uM,l({},n)):(0,O.jsx)(iM,l({},n,{axisLabelHeight:P,ordinalTimeTicks:i})));const A={x:b+I/2,y:k*g};return(0,O.jsxs)(mM,{transform:`translate(0, ${"bottom"===s?x+w+u:x-u})`,className:v.root,sx:h,children:[!m&&(0,O.jsx)(S,l({x1:b,x2:b+I,className:v.line},p?.axisLine)),T,f&&(0,O.jsx)("g",{className:v.label,children:(0,O.jsx)(M,l({},A,C,{text:f}))})]})}function gM(e){const{xAxis:t,xAxisIds:n}=_x(),r=t[e.axisId??n[0]];return r?(0,O.jsx)(fM,l({},e,{axis:r})):(e.axisId,null)}const yM=e=>{const{classes:t,position:n,id:r}=e;return uI({root:["root","directionY",n,`id-${r}`],line:["line"],tickContainer:["tickContainer"],tick:["tick"],tickLabel:["tickLabel"],label:["label"]},US,t)},vM=2,bM=2,xM={disableLine:!1,disableTicks:!1,tickSize:6},IM=["scale","tickNumber","reverse"];function wM(e){const{yAxis:t,yAxisIds:n}=Fx(),r=t[e.axisId??n[0]],{scale:i,tickNumber:o}=r,a=Lh({props:l({},tt(r,IM),e),name:"MuiChartsYAxis"}),s=l({},xM,a),{position:c,tickLabelStyle:u,slots:d,slotProps:p}=s,h=xm(),m=fS(),f=yM(s),g="right"===c?1:-1,y="number"==typeof u?.fontSize?u.fontSize:12,v=d?.axisTick??"line",b=d?.axisTickLabel??JS,x=QS(("right"===c?-90:90)-(u?.angle??0)),I=eM(("right"===c?-90:90)-(u?.angle??0));return{yScale:i,defaultizedProps:s,tickNumber:o,positionSign:g,classes:f,Tick:v,TickLabel:b,axisTickLabelProps:yI({elementType:b,externalSlotProps:p?.axisTickLabel,additionalProps:{style:l({},h.typography.caption,{fontSize:y,textAnchor:m?tM(x):x,dominantBaseline:I},u)},className:f.tickLabel,ownerState:{}})}}function kM(t){const{axisLabelHeight:n,ordinalTimeTicks:r}=t,{yScale:i,defaultizedProps:o,tickNumber:a,positionSign:s,classes:c,Tick:u,TickLabel:d,axisTickLabelProps:p}=wM(t),h=fS(),{disableTicks:m,tickSize:f,valueFormatter:g,slotProps:y,tickPlacement:v,tickLabelPlacement:b,tickInterval:x,tickLabelInterval:I,tickSpacing:w,width:k}=o,S=Nx(),{instance:M}=$x(),C=gS(),P=m?4:f,E=kS({scale:i,tickNumber:a,valueFormatter:g,tickPlacement:v,tickLabelPlacement:b,tickInterval:x,tickSpacing:w,direction:"y",ordinalTimeTicks:r}),T=Math.max(0,k-(n>0?n+bM:0)-P-vM),A=C?function(e,t,n,r,i){const o=new Map,a=$b(i?.angle??0);let s=1,l=1;"start"===i?.textAnchor?(s=1/0,l=1):"end"===i?.textAnchor?(s=1,l=1/0):(s=2,l=2),a>180&&([s,l]=[l,s]),r&&([s,l]=[l,s]);for(const r of e)if(r.formattedValue){const e=Math.min((r.offset+r.labelOffset)*s,(t.top+t.height+t.bottom-r.offset-r.labelOffset)*l),c=t=>TS(t,{width:n,height:e,angle:a,measureText:e=>_S(e,i)});o.set(r,AS(r.formattedValue.toString(),c))}return o}(E,S,T,h,p.style):new Map(Array.from(E).map(e=>[e,e.formattedValue]));return(0,O.jsx)(e.Fragment,{children:E.map((e,t)=>{const{offset:n,labelOffset:r,value:i}=e,o=s*(P+vM),a=r,h="function"==typeof I&&!I?.(i,t),f=M.isYInside(n),g=A.get(e);return f?(0,O.jsxs)("g",{transform:`translate(0, ${n})`,className:c.tickContainer,children:[!m&&(0,O.jsx)(u,l({x2:s*P,className:c.tick},y?.axisTick)),void 0!==g&&!h&&(0,O.jsx)(d,l({x:o,y:a,text:g},p))]},t):null})})}const SM={tickSize:6},MM=(e,t,n)=>{const r=e[t]??{},i=n??SM.tickSize,o=i*t*2+i;return l({},SM,r,{tickSize:r.tickSize??o})};function CM(t){const{yScale:n,defaultizedProps:r,tickNumber:i,positionSign:o,classes:a,Tick:s,TickLabel:c,axisTickLabelProps:u}=wM(t);if(!fa(n))throw new Error("MUI X Charts: ChartsGroupedYAxis only supports the `band` and `point` scale types.");const{disableTicks:d,tickSize:p,valueFormatter:h,slotProps:m,tickInterval:f,tickPlacement:g,tickLabelPlacement:y}=r,v=r.groups,{instance:b}=$x(),x=aM({scale:n,tickNumber:i,valueFormatter:h,tickInterval:f,tickPlacement:g,tickLabelPlacement:y,direction:"y",groups:v});return(0,O.jsx)(e.Fragment,{children:x.map((e,t)=>{const{offset:n,labelOffset:r}=e,i=r??0,h=b.isYInside(n),f=e.formattedValue,g=e.ignoreTick??!1,y=e.groupIndex??0,x=MM(v,y,p),I=o*x.tickSize,w=o*(x.tickSize+vM);return(0,O.jsxs)("g",{transform:`translate(0, ${n})`,className:a.tickContainer,"data-group-index":y,children:[!d&&!g&&h&&(0,O.jsx)(s,l({x2:I,className:a.tick},m?.axisTick)),void 0!==f&&(0,O.jsx)(c,l({x:w,y:i},u,{style:l({},u.style,x.tickLabelStyle),text:f}))]},t)})})}const PM=["axis"],EM=["scale","tickNumber","reverse","ordinalTimeTicks"],TM=bm(dM,{name:"MuiChartsYAxis",slot:"Root"})({});function AM(e){let{axis:t}=e,n=tt(e,PM);const{scale:r,ordinalTimeTicks:i}=t,o=tt(t,EM),a=gS(),s=Lh({props:l({},o,n),name:"MuiChartsYAxis"}),c=l({},xM,s),{position:u,disableLine:d,label:p,labelStyle:h,offset:m,width:f,sx:g,slots:y,slotProps:v}=c,b=xm(),x=yM(c),{left:I,top:w,width:k,height:S}=Nx(),M="right"===u?1:-1,C=y?.axisLine??"line",P=y?.axisLabel??JS,E=yI({elementType:C,externalSlotProps:v?.axisLine,additionalProps:{strokeLinecap:"square"},ownerState:{}}),T=yI({elementType:P,externalSlotProps:v?.axisLabel,additionalProps:{style:l({},b.typography.body1,{lineHeight:1,fontSize:14,angle:90*M,textAnchor:"middle",dominantBaseline:"text-before-edge"},h)},ownerState:{}});if("none"===u)return null;const A={x:M*f,y:w+S/2},j=null==p?0:_S(p,T.style).height,L=r.domain();let R=null;return(fa(r)?0===L.length:L.some(yS))||(R="groups"in t&&Array.isArray(t.groups)?(0,O.jsx)(CM,l({},n)):(0,O.jsx)(kM,l({},n,{axisLabelHeight:j,ordinalTimeTicks:i}))),(0,O.jsxs)(TM,{transform:`translate(${"right"===u?I+k+m:I-m}, 0)`,className:x.root,sx:g,children:[!d&&(0,O.jsx)(C,l({y1:w,y2:w+S,className:x.line},E)),R,p&&a&&(0,O.jsx)("g",{className:x.label,children:(0,O.jsx)(P,l({},A,T,{text:p}))})]})}function OM(e){const{yAxis:t,yAxisIds:n}=Fx(),r=t[e.axisId??n[0]];return r?(0,O.jsx)(AM,l({},e,{axis:r})):(e.axisId,null)}function jM(e){return Xb("MuiChartsGrid",e)}const LM=Zb("MuiChartsGrid",["root","line","horizontalLine","verticalLine"]),RM=bm("g",{name:"MuiChartsGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${LM.verticalLine}`]:t.verticalLine},{[`&.${LM.horizontalLine}`]:t.horizontalLine},t.root]})({}),DM=bm("line",{name:"MuiChartsGrid",slot:"Line"})(({theme:e})=>({stroke:(e.vars||e).palette.divider,shapeRendering:"crispEdges",strokeWidth:1}));function $M(t){const{instance:n}=$x(),{axis:r,start:i,end:o,classes:a}=t,{scale:s,tickNumber:l,tickInterval:c,tickSpacing:u}=r,d=kS({scale:s,tickNumber:l,tickInterval:c,tickSpacing:u,direction:"x",ordinalTimeTicks:"ordinalTimeTicks"in r?r.ordinalTimeTicks:void 0});return(0,O.jsx)(e.Fragment,{children:d.map(({value:e,offset:t})=>n.isXInside(t)?(0,O.jsx)(DM,{y1:i,y2:o,x1:t,x2:t,className:a.verticalLine},`vertical-${e?.getTime?.()??e}`):null)})}function zM(t){const{instance:n}=$x(),{axis:r,start:i,end:o,classes:a}=t,{scale:s,tickNumber:l,tickInterval:c,tickSpacing:u}=r,d=kS({scale:s,tickNumber:l,tickInterval:c,tickSpacing:u,direction:"y",ordinalTimeTicks:"ordinalTimeTicks"in r?r.ordinalTimeTicks:void 0});return(0,O.jsx)(e.Fragment,{children:d.map(({value:e,offset:t})=>n.isYInside(t)?(0,O.jsx)(DM,{y1:t,y2:t,x1:i,x2:o,className:a.horizontalLine},`horizontal-${e?.getTime?.()??e}`):null)})}const NM=["vertical","horizontal"],_M=({classes:e})=>uI({root:["root"],verticalLine:["line","verticalLine"],horizontalLine:["line","horizontalLine"]},jM,e);function FM(e){const t=Lh({props:e,name:"MuiChartsGrid"}),n=Nx(),{vertical:r,horizontal:i}=t,o=tt(t,NM),{xAxis:a,xAxisIds:s}=_x(),{yAxis:c,yAxisIds:u}=Fx(),d=_M(t),p=c[u[0]],h=a[s[0]];return(0,O.jsxs)(RM,l({},o,{className:d.root,children:[r&&(0,O.jsx)($M,{axis:h,start:n.top,end:n.height+n.top,classes:d}),i&&(0,O.jsx)(zM,{axis:p,start:n.left,end:n.width+n.left,classes:d})]}))}function HM(e){return Xb("MuiChartsTooltip",e)}const BM=Zb("MuiChartsTooltip",["root","paper","table","row","cell","mark","markContainer","labelCell","valueCell","axisValueCell"]),VM=e=>uI({root:["root"],paper:["paper"],table:["table"],row:["row"],cell:["cell"],mark:["mark"],markContainer:["markContainer"],labelCell:["labelCell"],valueCell:["valueCell"],axisValueCell:["axisValueCell"]},HM,e);function UM(){return zx().use(ft)}const YM=ae(e=>e.tooltip,e=>e?.item??null),WM=ae(YM,e=>null!==e),GM=ae(Cs,YM,cI,(e,t,n)=>"keyboard"===e?n:t??null),KM=ae(Cs,WM,rI,(e,t,n)=>"keyboard"===e?n:t),qM=le(GM,ls,cs,jb,Lb,ft,function(e,{axis:t,axisIds:n},{axis:r,axisIds:i},o,a,s){if(!e)return{};const l=s[e.type]?.series[e.seriesId];if(!l)return{};const c={rotationAxes:o,radiusAxes:a},u=ma(l)?l.xAxisId??n[0]:void 0,d=ma(l)?l.yAxisId??i[0]:void 0;return void 0!==u&&(c.x=t[u]),void 0!==d&&(c.y=r[d]),c}),XM=le(GM,he,ht,ft,gt,qM,function(e,t,n,r,i,o,a="top"){if(!e)return null;const s=r[e.type]?.series[e.seriesId];return s?n[s.type].tooltipItemPositionGetter?.({series:r,seriesLayout:i,drawingArea:t,axesConfig:o,identifier:e,placement:a})??null:null});function ZM(){const e=zx(),t=e.use(GM),n=e.use(ht),r=UM(),{xAxis:i,xAxisIds:o}=_x(),{yAxis:a,yAxisIds:s}=Fx(),{zAxis:l,zAxisIds:c}=Kx(),{rotationAxis:u,rotationAxisIds:d}=Vx();if(!t)return null;const p=r[t.type]?.series[t.seriesId];if(!p)return null;const h=ma(p)?p.xAxisId??o[0]:void 0,m=ma(p)?p.yAxisId??s[0]:void 0,f="zAxisId"in p?p.zAxisId??c[0]:c[0],g=d[0],y=n[p.type].colorProcessor?.(p,void 0!==h?i[h]:void 0,void 0!==m?a[m]:void 0,void 0!==f?l[f]:void 0)??(()=>""),v={};return void 0!==h&&(v.x=i[h]),void 0!==m&&(v.y=a[m]),void 0!==g&&(v.rotation=u[g]),n[p.type].tooltipGetter({series:p,axesConfig:v,getColor:y,identifier:t})}const JM=bm("div",{name:"MuiChartsTooltip",slot:"Container",overridesResolver:(e,t)=>t.paper})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,borderRadius:(e.vars||e).shape?.borderRadius,border:`solid ${(e.vars||e).palette.divider} 1px`})),QM=bm("table",{name:"MuiChartsTooltip",slot:"Table"})(({theme:e})=>({borderSpacing:0,[`& .${BM.markContainer}`]:{display:"inline-block",width:`calc(20px + ${e.spacing(1.5)})`,verticalAlign:"middle"},"& caption":{borderBottom:`solid ${(e.vars||e).palette.divider} 1px`,padding:e.spacing(.5,1.5),textAlign:"start",whiteSpace:"nowrap","& span":{marginRight:e.spacing(1.5)}}})),eC=bm("tr",{name:"MuiChartsTooltip",slot:"Row"})(({theme:e})=>({"tr:first-of-type& td":{paddingTop:e.spacing(.5)},"tr:last-of-type& td":{paddingBottom:e.spacing(.5)}})),tC=bm(Nv,{name:"MuiChartsTooltip",slot:"Cell"})(({theme:e})=>({verticalAlign:"middle",color:(e.vars||e).palette.text.secondary,textAlign:"start",[`&.${BM.cell}`]:{paddingLeft:e.spacing(1),paddingRight:e.spacing(1)},[`&.${BM.labelCell}`]:{whiteSpace:"nowrap",fontWeight:e.typography.fontWeightRegular},[`&.${BM.valueCell}, &.${BM.axisValueCell}`]:{color:(e.vars||e).palette.text.primary,fontWeight:e.typography.fontWeightMedium},[`&.${BM.valueCell}`]:{paddingLeft:e.spacing(1.5),paddingRight:e.spacing(1.5)},"td:first-of-type&, th:first-of-type&":{paddingLeft:e.spacing(1.5)},"td:last-of-type&, th:last-of-type&":{paddingRight:e.spacing(1.5)}}));function nC(e){return Xb("MuiChartsLabelMark",e)}const rC=Zb("MuiChartsLabelMark",["root","line","square","circle","mask","fill"]);function iC(e,t,n=!1){const r={...t};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const o=i;if("components"===o||"slots"===o)r[o]={...e[o],...r[o]};else if("componentsProps"===o||"slotProps"===o){const i=e[o],a=t[o];if(a)if(i){r[o]={...a};for(const e in i)if(Object.prototype.hasOwnProperty.call(i,e)){const t=e;r[o][t]=iC(i[t],a[t],n)}}else r[o]=a;else r[o]=i||{}}else"className"===o&&n&&t.className?r.className=Hh(e?.className,t?.className):"style"===o&&n&&t.style?r.style={...e?.style,...t?.style}:void 0===r[o]&&(r[o]=e[o])}return r}const oC=(t,n,r)=>e.forwardRef(function(i,o){const a=Lh({props:i,name:t}),s=iC("function"==typeof n.defaultProps?n.defaultProps(a):n.defaultProps??{},a),c=xm(),u=n.classesResolver?.(s,c),d=e.forwardRef(r);return(0,O.jsx)(d,l({},s,{classes:u,ref:o}))}),aC=["type","color","className","classes"],sC=bm("div",{name:"MuiChartsLabelMark",slot:"Root"})(()=>({display:"flex",width:14,height:14,[`&.${rC.line}`]:{width:16,height:"unset",alignItems:"center",[`.${rC.mask}`]:{height:4,width:"100%",borderRadius:1,overflow:"hidden"}},[`&.${rC.square}`]:{height:13,width:13,borderRadius:2,overflow:"hidden"},[`&.${rC.circle}`]:{height:15,width:15},svg:{display:"block"},[`& .${rC.mask} > *`]:{height:"100%",width:"100%"},[`& .${rC.mask}`]:{height:"100%",width:"100%"}})),lC=oC("MuiChartsLabelMark",{defaultProps:{type:"square"},classesResolver:e=>{const{type:t}=e;return uI({root:"function"==typeof t?["root"]:["root",t],mask:["mask"],fill:["fill"]},nC,e.classes)}},function(e,t){const{type:n,color:r,className:i,classes:o}=e,a=tt(e,aC),s=n;return(0,O.jsx)(sC,l({className:Hh(o?.root,i),ownerState:e,"aria-hidden":"true",ref:t},a,{children:(0,O.jsx)("div",{className:o?.mask,children:"function"==typeof s?(0,O.jsx)(s,{className:o?.fill,color:r}):(0,O.jsx)("svg",{viewBox:"0 0 24 24",preserveAspectRatio:"line"===n?"none":void 0,children:"circle"===n?(0,O.jsx)("circle",{className:o?.fill,r:"12",cx:"12",cy:"12",fill:r}):(0,O.jsx)("rect",{className:o?.fill,width:"24",height:"24",fill:r})})})}))});function cC(e){const{classes:t,sx:n}=e,r=ZM(),i=VM(t);if(!r)return null;if("values"in r){const{label:e,color:t,markType:o}=r;return(0,O.jsx)(JM,{sx:n,className:i.paper,children:(0,O.jsxs)(QM,{className:i.table,children:[(0,O.jsxs)(Nv,{component:"caption",children:[(0,O.jsx)("div",{className:i.markContainer,children:(0,O.jsx)(lC,{type:o,color:t,className:i.mark})}),e]}),(0,O.jsx)("tbody",{children:r.values.map(({formattedValue:e,label:t})=>(0,O.jsxs)(eC,{className:i.row,children:[(0,O.jsx)(tC,{className:Hh(i.labelCell,i.cell),component:"th",children:t}),(0,O.jsx)(tC,{className:Hh(i.valueCell,i.cell),component:"td",children:e})]},t))})]})})}const{color:o,label:a,formattedValue:s,markType:l}=r;return(0,O.jsx)(JM,{sx:n,className:i.paper,children:(0,O.jsx)(QM,{className:i.table,children:(0,O.jsx)("tbody",{children:(0,O.jsxs)(eC,{className:i.row,children:[(0,O.jsxs)(tC,{className:Hh(i.labelCell,i.cell),component:"th",children:[(0,O.jsx)("div",{className:i.markContainer,children:(0,O.jsx)(lC,{type:l,color:o,className:i.mark})}),a]}),(0,O.jsx)(tC,{className:Hh(i.valueCell,i.cell),component:"td",children:s})]})})})})}function uC(t,n,r,i,o){const[a,s]=e.useState(()=>o&&r?r(t).matches:i?i(t).matches:n);return qm(()=>{if(!r)return;const e=r(t),n=()=>{s(e.matches)};return n(),e.addEventListener("change",n),()=>{e.removeEventListener("change",n)}},[t,r]),a}const dC={...e}.useSyncExternalStore;function pC(t,n,r,i,o){const a=e.useCallback(()=>n,[n]),s=e.useMemo(()=>{if(o&&r)return()=>r(t).matches;if(null!==i){const{matches:e}=i(t);return()=>e}return a},[a,t,i,o,r]),[l,c]=e.useMemo(()=>{if(null===r)return[a,()=>()=>{}];const e=r(t);return[()=>e.matches,t=>(e.addEventListener("change",t),()=>{e.removeEventListener("change",t)})]},[a,r,t]);return dC(c,l,s)}function hC(e={}){const{themeId:t}=e;return function(e,n={}){let r=qd();r&&t&&(r=r[t]||r);const i="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:o=!1,matchMedia:a=(i?window.matchMedia:null),ssrMatchMedia:s=null,noSsr:l=!1}=uc({name:"MuiUseMediaQuery",props:n,theme:r});let c="function"==typeof e?e(r):e;return c=c.replace(/^@media( ?)/m,""),c.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join("\n")),(void 0!==dC?pC:uC)(c,o,a,s,l)}}hC();const mC=hC({themeId:jh}),fC=()=>mC("@media (pointer: fine)",{defaultMatches:!0}),gC=(e,t)=>t,yC=(e,t)=>t;function vC(e,t,n){return Array.isArray(n)?n.map(n=>Nb(t.axis[n],e)):Nb(t.axis[n],e)}const bC=ae(Ss,Ms,Rb,(e,t,n)=>null===e||null===t?null:Db(n)(e,t)),xC=ae(bC,jb,gC,(e,t,n=t.axisIds[0])=>null===e?null:vC(e,t,n)),IC=ae(bC,jb,yC,(e,t,n=t.axisIds)=>null===e?null:vC(e,t,n)),wC=(ae(jb,xC,gC,(e,t,n=e.axisIds[0])=>{if(null===t||-1===t||0===e.axisIds.length)return null;const r=e.axis[n]?.data;return r?r[t]:null}),ae(jb,IC,yC,(e,t,n=e.axisIds)=>null===t?null:n.map((n,r)=>{const i=t[r];return-1===i?null:e.axis[n].data?.[i]})),se({memoizeOptions:{resultEqualityCheck:Ps}})(IC,jb,(e,t)=>null===e?[]:t.axisIds.map((t,n)=>({axisId:t,dataIndex:e[n]})).filter(({axisId:e,dataIndex:n})=>t.axis[e].triggerTooltip&&n>=0))),kC=ae(wC,e=>e.length>0);function SC(e,t,n){const r=e.data?.[t]??null,i=(e.valueFormatter??(t=>"utc"===e.scaleType?function(e){return e instanceof Date?e.toUTCString():e.toLocaleString()}(t):t.toLocaleString()))(r,{location:"tooltip",scale:e.scale});return{axisDirection:n,axisId:e.id,mainAxis:e,dataIndex:t,axisValue:r,axisFormattedValue:i,seriesItems:[]}}function MC(t){return function(t={}){const{multipleAxes:n,directions:r}=t,i=Hx(),o=Bx(),a=function(){const e=zx(),{axis:t,axisIds:n}=e.use(jb);return t[n[0]]}(),s=zx(),l=s.use(zs),c=s.use(Ns),u=s.use(wC),d=UM(),{xAxis:p}=_x(),{yAxis:h}=Fx(),{zAxis:m,zAxisIds:f}=Kx(),{rotationAxis:g}=Vx(),y=function(){const t=zx().use(ht);return e.useMemo(()=>{const e={};return Object.keys(t).forEach(n=>{e[n]=t[n].colorProcessor}),e},[t])}();if(0===l.length&&0===c.length&&0===u.length)return null;const v=[];return(void 0===r||r.includes("x"))&&l.forEach(({axisId:e,dataIndex:t})=>{!n&&v.length>1||v.push(SC(p[e],t,"x"))}),(void 0===r||r.includes("y"))&&c.forEach(({axisId:e,dataIndex:t})=>{!n&&v.length>1||v.push(SC(h[e],t,"y"))}),(void 0===r||r.includes("rotation"))&&u.forEach(({axisId:e,dataIndex:t})=>{!n&&v.length>1||v.push(SC(g[e],t,"rotation"))}),Object.keys(d).filter(ha).forEach(e=>{const t=d[e];return t?t.seriesOrder.forEach(n=>{const r=t.series[n],a=r.xAxisId??i.id,s=r.yAxisId??o.id,l=v.findIndex(({axisDirection:e,axisId:t})=>"x"===e&&t===a||"y"===e&&t===s);if(l>=0){const t="zAxisId"in r?r.zAxisId:f[0],{dataIndex:i}=v[l],o=y[e]?.(r,p[a],h[s],t?m[t]:void 0)(i)??"",c=r.data[i]??null,u=r.valueFormatter(c,{dataIndex:i}),d=yl(r.label,"tooltip")??null;v[l].seriesItems.push({seriesId:n,color:o,value:c,formattedValue:u,formattedLabel:d,markType:r.labelMarkType})}}):[]}),Object.keys(d).filter(Pb).forEach(e=>{const t=d[e];return t?t.seriesOrder.forEach(n=>{const r=t.series[n],i=r.rotationAxisId??a?.id,o=v.findIndex(({axisDirection:e,axisId:t})=>"rotation"===e&&t===i);if(o>=0){const{dataIndex:t}=v[o],i=y[e]?.(r)(t)??"",a=r.data[t]??null,s=r.valueFormatter(a,{dataIndex:t}),l=yl(r.label,"tooltip")??null;v[o].seriesItems.push({seriesId:n,color:i,value:a,formattedValue:s,formattedLabel:l,markType:r.labelMarkType})}}):[]}),n?v:0===v.length?v[0]:null}(l({},t,{multipleAxes:!0}))}function CC(e){const t=VM(e.classes),n=MC();return null===n?null:(0,O.jsx)(JM,{sx:e.sx,className:t.paper,children:n.map(({axisId:e,mainAxis:n,axisValue:r,axisFormattedValue:i,seriesItems:o})=>(0,O.jsxs)(QM,{className:t.table,children:[null!=r&&!n.hideTooltip&&(0,O.jsx)(Nv,{component:"caption",children:i}),(0,O.jsx)("tbody",{children:o.map(({seriesId:e,color:n,formattedValue:r,formattedLabel:i,markType:o})=>null==r?null:(0,O.jsxs)(eC,{className:t.row,children:[(0,O.jsxs)(tC,{className:Hh(t.labelCell,t.cell),component:"th",children:[(0,O.jsx)("div",{className:t.markContainer,children:(0,O.jsx)(lC,{type:o,color:n,className:t.mark})}),i||null]}),(0,O.jsx)(tC,{className:Hh(t.valueCell,t.cell),component:"td",children:r})]},e))})]},e))})}const PC=function(t){const{children:n,defer:r=!1,fallback:i=null}=t,[o,a]=e.useState(!1);return qm(()=>{r||a(!0)},[r]),e.useEffect(()=>{r&&a(!0)},[r]),o?n:i},EC=["trigger","position","anchor","classes","children"],TC=()=>!1,AC=()=>null,OC=bm(Tg,{name:"MuiChartsTooltip",slot:"Root"})(({theme:e})=>({pointerEvents:"none",zIndex:e.zIndex.modal}));function jC(t){const n=Lh({props:t,name:"MuiChartsTooltipContainer"}),{trigger:r="axis",position:i,anchor:o="pointer",classes:a,children:s}=n,c=tt(n,EC),u=eI(),d=e.useRef(null),p=VM(a),h=function(){const t=eI(),[n,r]=e.useState(null);return e.useEffect(()=>{const e=t.current;if(null===e)return()=>{};const n=e=>{"mouse"!==e.pointerType&&r(null)},i=e=>{r({pointerType:e.pointerType})};return e.addEventListener("pointerenter",i),e.addEventListener("pointerup",n),()=>{e.removeEventListener("pointerenter",i),e.removeEventListener("pointerup",n)}},[t]),n}(),m=fC(),f=e.useRef(null),g=st(()=>({x:0,y:0})),y=function(){const e=zx(),t=e.use(Ab),n=e.use(ce);return void 0!==t?"polar":void 0!==n?"cartesian":"none"}(),v=zx(),b=v.use(Sb),x=v.use(function(e,t,n){return n?TC:"item"===e?KM:"polar"===t?kC:"cartesian"===t?_s:TC}(r,y,b)),I="keyboard"===v.use(Cs)?"node":o,w=v.use("item"===r&&"node"===I?XM:AC,i);e.useEffect(()=>{const e=u.current;if(null===e)return()=>{};if(null!==w)return;const t=function(){let e,t;const n=()=>{t=null,((e,t)=>{g.current={x:e,y:t},f.current?.update()})(...e)};function r(...r){e=r,t||(t=requestAnimationFrame(n))}return r.clear=()=>{t&&(cancelAnimationFrame(t),t=null)},r}(),n=e=>{t(e.clientX,e.clientY)};return e.addEventListener("pointerdown",n),e.addEventListener("pointermove",n),e.addEventListener("pointerenter",n),()=>{e.removeEventListener("pointerdown",n),e.removeEventListener("pointermove",n),e.removeEventListener("pointerenter",n),t.clear()}},[u,g,w]);const k=e.useMemo(()=>({getBoundingClientRect:()=>({x:g.current.x,y:g.current.y,top:g.current.y,left:g.current.x,right:g.current.x,bottom:g.current.y,width:0,height:0,toJSON:()=>""})}),[g]),S="mouse"===h?.pointerType||m,M="touch"===h?.pointerType||!m,C=e.useMemo(()=>[{name:"offset",options:{offset:()=>M?[0,64]:[0,8]}},...S?[]:[{name:"flip",options:{fallbackPlacements:["top-end","top-start","bottom-end","bottom"]}}],{name:"preventOverflow",options:{altAxis:!0}}],[S,M]);return"none"===r?null:(null!==w&&d.current&&(d.current.setAttribute("x",String(w.x)),d.current.setAttribute("y",String(w.y))),(0,O.jsxs)(e.Fragment,{children:[u.current&&Tm.createPortal((0,O.jsx)("rect",{ref:d,display:"hidden"}),u.current),(0,O.jsx)(PC,{children:x&&(0,O.jsx)(OC,l({},c,{className:p?.root,open:x,placement:c.placement??i??(null!==h&&S?"right-start":"top"),popperRef:f,anchorEl:w?d.current:k,modifiers:C,children:s}))})]}))}function LC(e){const{classes:t,trigger:n="axis"}=e,r=VM(t);return(0,O.jsx)(jC,l({},e,{classes:t,children:"axis"===n?(0,O.jsx)(CC,{classes:r}):(0,O.jsx)(cC,{classes:r})}))}function RC(e){return Xb("MuiChartsAxisHighlight",e)}Zb("MuiChartsAxisHighlight",["root"]);const DC=bm("path",{name:"MuiChartsAxisHighlight",slot:"Root"})(({theme:e})=>({pointerEvents:"none",variants:[{props:{axisHighlight:"band"},style:l({fill:"white",fillOpacity:.1},e.applyStyles("light",{fill:"gray"}))},{props:{axisHighlight:"line"},style:l({strokeDasharray:"5 2",stroke:"#ffffff"},e.applyStyles("light",{stroke:"#000000"}))}]}));function $C(t){const{type:n,classes:r}=t,{left:i,width:o}=Nx(),a=zx(),s=a.use(uS),l=a.use(cs);return 0===s.length?null:s.map(({axisId:t,value:a})=>{const s=l.axis[t].scale,c=ck(s),u="band"===n&&null!==a&&fa(s);return(0,O.jsxs)(e.Fragment,{children:[u&&void 0!==s(a)&&(0,O.jsx)(DC,{d:`M ${i} ${s(a)-(s.step()-s.bandwidth())/2} l 0 ${s.step()} l ${o} 0 l 0 ${-s.step()} Z`,className:r.root,ownerState:{axisHighlight:"band"}}),"line"===n&&null!==a&&(0,O.jsx)(DC,{d:`M ${i} ${c(a)} L ${i+o} ${c(a)}`,className:r.root,ownerState:{axisHighlight:"line"}})]},`${t}-${a}`)})}function zC(t){const{type:n,classes:r}=t,{top:i,height:o}=Nx(),a=zx(),s=a.use(cS),l=a.use(ls);return 0===s.length?null:s.map(({axisId:t,value:a})=>{const s=l.axis[t].scale,c=ck(s),u="band"===n&&null!==a&&fa(s);return(0,O.jsxs)(e.Fragment,{children:[u&&void 0!==s(a)&&(0,O.jsx)(DC,{d:`M ${s(a)-(s.step()-s.bandwidth())/2} ${i} l ${s.step()} 0 l 0 ${o} l ${-s.step()} 0 Z`,className:r.root,ownerState:{axisHighlight:"band"}}),"line"===n&&null!==a&&(0,O.jsx)(DC,{d:`M ${c(a)} ${i} L ${c(a)} ${i+o}`,className:r.root,ownerState:{axisHighlight:"line"}})]},`${t}-${a}`)})}const NC=()=>uI({root:["root"]},RC);function _C(t){const{x:n,y:r}=t,i=NC();return(0,O.jsxs)(e.Fragment,{children:[n&&"none"!==n&&(0,O.jsx)(zC,{type:n,classes:i}),r&&"none"!==r&&(0,O.jsx)($C,{type:r,classes:i})]})}function FC(e,t){return Object.keys(e).flatMap(n=>{const r=t[n].legendGetter;return void 0===r?[]:r(e[n])})}function HC(e){return Xb("MuiChartsLegend",e)}const BC=Zb("MuiChartsLegend",["root","item","series","mark","label","vertical","horizontal"]),VC=["slots","slotProps"],UC=["ownerState"];function YC(e){return Xb("MuiChartsLabel",e)}Zb("MuiChartsLabel",["root"]);const WC=["children","className","classes"],GC=oC("MuiChartsLabel",{classesResolver:e=>uI({root:["root"]},YC,e.classes)},function(e,t){const{children:n,className:r,classes:i}=e,o=tt(e,WC);return(0,O.jsx)("span",l({className:Hh(i?.root,r),ref:t},o,{children:n}))}),KC=["direction","onItemClick","className","classes"],qC=bm("ul",{name:"MuiChartsLegend",slot:"Root"})(({ownerState:e,theme:t})=>l({},t.typography.caption,{color:(t.vars||t).palette.text.primary,lineHeight:"100%",display:"flex",flexDirection:"vertical"===e.direction?"column":"row",alignItems:"vertical"===e.direction?void 0:"center",flexShrink:0,gap:t.spacing(2),listStyleType:"none",paddingInlineStart:0,marginBlock:t.spacing(1),marginInline:t.spacing(1),flexWrap:"wrap",li:{display:"horizontal"===e.direction?"inline-flex":void 0},[`button.${BC.series}`]:{background:"none",border:"none",padding:0,fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",letterSpacing:"inherit",color:"inherit"},[`& .${BC.series}`]:{display:"vertical"===e.direction?"flex":"inline-flex",alignItems:"center",gap:t.spacing(1)},gridArea:"legend"})),XC=((t,n,r,i)=>{function o(e,t){const o=Lh({props:e,name:"MuiChartsLegend"}),a=iC("function"==typeof r.defaultProps?r.defaultProps(o):r.defaultProps??{},o),s=a,{slots:c,slotProps:u}=s,d=tt(s,VC),p=xm(),h=r.classesResolver?.(a,p),m=c?.[n]??i,f=r.propagateSlots&&!c?.[n],g=yI({elementType:m,externalSlotProps:u?.[n],additionalProps:l({},d,{classes:h},f&&{slots:c,slotProps:u}),ownerState:{}}),y=l({},tt(g,UC));for(const e of r.omitProps??[])delete y[e];return(0,O.jsx)(m,l({},y,{ref:t}))}return e.forwardRef(o)})(0,"legend",{defaultProps:{direction:"horizontal"},omitProps:["position"],classesResolver:e=>{const{classes:t,direction:n}=e;return uI({root:["root",n],item:["item"],mark:["mark"],label:["label"],series:["series"]},HC,t)}},e.forwardRef(function(e,t){const n={items:FC(UM(),zx().use(ht))},{onItemClick:r,className:i,classes:o}=e,a=tt(e,KC);if(0===n.items.length)return null;const s=r?"button":"div";return(0,O.jsx)(qC,l({className:Hh(o?.root,i),ref:t},a,{ownerState:e,children:n.items.map((e,t)=>(0,O.jsx)("li",{className:o?.item,"data-series":e.seriesId,children:(0,O.jsxs)(s,{className:o?.series,role:r?"button":void 0,type:r?"button":void 0,onClick:r?n=>{return r(n,{type:"series",color:(i=e).color,label:i.label,seriesId:i.seriesId,itemId:i.itemId,dataIndex:i.dataIndex},t);var i}:void 0,children:[(0,O.jsx)(lC,{className:o?.mark,color:e.color,type:e.markType}),(0,O.jsx)(GC,{className:o?.label,children:e.label})]})},`${e.seriesId}-${e.dataIndex}`))}))}));function ZC(e){const{id:t,offset:n}=e,{left:r,top:i,width:o,height:a}=Nx(),s=l({top:0,right:0,bottom:0,left:0},n);return(0,O.jsx)("clipPath",{id:t,children:(0,O.jsx)("rect",{x:r-s.left,y:i-s.top,width:o+s.left+s.right,height:a+s.top+s.bottom})})}function JC(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${n} for the full message.`}function QC(e,t=0,n=1){return function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}(e,t,n)}function eP(e){if(e.type)return e;if("#"===e.charAt(0))return eP(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(JC(9,e));let r,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),r=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(JC(10,r))}else i=i.split(",");return i=i.map(e=>parseFloat(e)),{type:n,values:i,colorSpace:r}}function tP(e,t){return e=eP(e),t=QC(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,function(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}(e)}let nP=0;const rP={...t}.useId;function iP(t){if(void 0!==rP){const e=rP();return t??e}return function(t){const[n,r]=e.useState(t),i=t||n;return e.useEffect(()=>{null==n&&(nP+=1,r(`mui-${nP}`))},[n]),i}(t)}function oP(e,t){return"x"===e?{left:0,top:0,width:t.width,height:vt,right:t.width,bottom:vt}:{left:0,top:0,width:vt,height:t.height,right:vt,bottom:t.height}}const aP=le(ce,he,qa,is,function(e,t,n,r,i){const o=e?.some(e=>e.id===i),a=oP(o?"x":"y",t),s=n[i],l={};return e?.forEach(e=>{const t=e,n=r[t.id].copy(),i=Ca(a,"x",t),o=Ea(i,[s.minStart,s.maxEnd]);n.range(o),l[t.id]=n}),l}),sP=le(ft,ht,qa,he,aP,Qa,(e,t,n,r,i,{axes:o,domains:a},s)=>{const l=o?.some(e=>e.id===s),c=oP(l?"x":"y",r),u=n[s],d=ya({scales:i,drawingArea:c,formattedSeries:e,axis:o,seriesConfig:t,axisDirection:"x",zoomMap:new Map([[s,{axisId:s,start:u.minStart,end:u.maxEnd}]]),domains:a});return d.axis[s]?{[s]:d.axis[s]}:d.axis}),lP=le(ue,he,qa,os,function(e,t,n,r,i){const o=e?.some(e=>e.id===i),a=oP(o?"y":"x",t),s=n[i],l={};return e?.forEach(e=>{const t=e,n=r[t.id].copy();let i=Ca(a,"y",t);fa(n)&&(i=i.reverse());const o=Ea(i,[s.minStart,s.maxEnd]);n.range(o),l[t.id]=n}),l}),cP=le(ft,ht,qa,he,lP,es,(e,t,n,r,i,{axes:o,domains:a},s)=>{const l=o?.some(e=>e.id===s),c=oP(l?"y":"x",r),u=n[s],d=ya({scales:i,drawingArea:c,formattedSeries:e,axis:o,seriesConfig:t,axisDirection:"y",zoomMap:new Map([[s,{axisId:s,start:u.minStart,end:u.maxEnd}]]),domains:a});return d.axis[s]?{[s]:d.axis[s]}:d.axis}),uP=(e,t)=>t===("x"===e?W:G)?`The first \`${e}Axis\``:`The ${e}-axis with id "${t}"`;function dP(){return ak("bar")}function pP(e,t,n){const r=dP()??{series:{},stackingGroups:[],seriesOrder:[]},i=_x().xAxisIds[0],o=Fx().yAxisIds[0],a=Xx(),{series:s,stackingGroups:c}=r,u={},d=c.flatMap(({ids:r},d)=>{const p=e.left,h=e.left+e.width,m=e.top,f=e.top+e.height,g=new Map,y=new Map;return r.map(e=>{const r=s[e].xAxisId??i,v=s[e].yAxisId??o,b=s[e].layout,x=t[r],I=n[v],w="vertical"===s[e].layout,k=(w?I.reverse:x.reverse)??!1;!function(e,t,n,r,i,o,a){const s=i[r],l=a[o],c=e?s:l,u=e?l:s,d=e?r:o,p=e?o:r,h=e?"x":"y",m=e?"y":"x";if("band"!==c.scaleType)throw new Error(`MUI X Charts: ${uP(h,d)} should be of type "band" to display the bar series of id "${t}".`);if(void 0===c.data)throw new Error(`MUI X Charts: ${uP(h,d)} should have data property.`);if("band"===u.scaleType||"point"===u.scaleType)throw new Error(`MUI X Charts: ${uP(m,p)} should be a continuous type to display the bar series of id "${t}".`)}(w,e,s[e].stackedData.length,r,t,v,n);const S=w?x:I,M=x.scale,C=I.scale,P=Math.round(M(0)??0),E=Math.round(C(0)??0),T=bl(s[e],t[r],n[v]),A=[];for(let t=0;th||i.x+i.widthf||i.y+i.height0?(v&&delete v.borderRadiusSide,i.borderRadiusSide=w?"top":"right",y.set(t,i)):S<0&&(o&&delete o.borderRadiusSide,i.borderRadiusSide=w?"bottom":"left",g.set(t,i)),u[i.maskId]||(u[i.maskId]={id:i.maskId,width:0,height:0,hasNegative:!1,hasPositive:!1,layout:b,xOrigin:P,yOrigin:E,x:0,y:0});const M=u[i.maskId];M.width="vertical"===b?i.width:M.width+i.width,M.height="vertical"===b?M.height+i.height:i.height,M.x=Math.min(0===M.x?1/0:M.x,i.x),M.y=Math.min(0===M.y?1/0:M.y,i.y);const C=i.value??0;M.hasNegative=M.hasNegative||(k?C>0:C<0),M.hasPositive=M.hasPositive||(k?C<0:C>0),A.push(i)}return{seriesId:e,barLabel:s[e].barLabel,barLabelPlacement:s[e].barLabelPlacement,data:A,layout:b,xOrigin:P,yOrigin:E}})});return{completedData:d,masksData:Object.values(u)}}function hP(e){return Xb("MuiBarElement",e)}const mP=Zb("MuiBarElement",["root","highlighted","faded","series"]);function fP(e,t){const n=Tn(e.x,t.x),r=Tn(e.y,t.y),i=Tn(e.width,t.width),o=Tn(e.height,t.height);return e=>({x:n(e),y:r(e),width:i(e),height:o(e)})}const gP=["ownerState","skipAnimation","id","dataIndex","xOrigin","yOrigin"];function yP(e){const{ownerState:t}=e,n=tt(e,gP),r=function(e){const t={x:"vertical"===e.layout?e.x:e.xOrigin,y:"vertical"===e.layout?e.yOrigin:e.y,width:"vertical"===e.layout?e.width:0,height:"vertical"===e.layout?0:e.height};return aw({x:e.x,y:e.y,width:e.width,height:e.height},{createInterpolator:fP,applyProps(e,t){e.setAttribute("x",t.x.toString()),e.setAttribute("y",t.y.toString()),e.setAttribute("width",t.width.toString()),e.setAttribute("height",t.height.toString())},transformProps:e=>e,initialProps:t,skip:e.skipAnimation,ref:e.ref})}(e);return(0,O.jsx)("rect",l({},n,{filter:t.isHighlighted?"brightness(120%)":void 0,opacity:t.isFaded?.3:1,"data-highlighted":t.isHighlighted||void 0,"data-faded":t.isFaded||void 0},r))}const vP=["id","dataIndex","classes","color","slots","slotProps","style","onClick","skipAnimation","layout","x","xOrigin","y","yOrigin","width","height"];function bP(t){const{id:n,dataIndex:r,classes:i,color:o,slots:a,slotProps:s,style:c,onClick:u,skipAnimation:d,layout:p,x:h,xOrigin:m,y:f,yOrigin:g,width:y,height:v}=t,b=tt(t,vP),x=e.useMemo(()=>({type:"bar",seriesId:n,dataIndex:r}),[n,r]),I=bI(x),{isFaded:w,isHighlighted:k}=zI(x),S=(M=e.useMemo(()=>({type:"bar",seriesId:n,dataIndex:r}),[n,r]),zx().use(nI,M));var M;const C={id:n,dataIndex:r,classes:i,color:o,isFaded:w,isHighlighted:k,isFocused:S},P=(e=>{const{classes:t,id:n,isHighlighted:r,isFaded:i}=e;return uI({root:["root",`series-${n}`,r&&"highlighted",i&&"faded"]},hP,t)})(C),E=a?.bar??yP,T=yI({elementType:E,externalSlotProps:s?.bar,externalForwardedProps:b,additionalProps:l({},I,{id:n,dataIndex:r,color:o,x:h,xOrigin:m,y:f,yOrigin:g,width:y,height:v,style:c,onClick:u,cursor:u?"pointer":"unset",stroke:"none",fill:o,skipAnimation:d,layout:p}),className:P.root,ownerState:C});return(0,O.jsx)(E,l({},T))}function xP(t,n,r,i){return e.useMemo(()=>{const e=ck(n),o=ck(r),a=[];for(let n=0;ne>=s&&e<=s+c&&t>=l&&t<=l+u,[u,c,s,l]),p=xP(n,r,i,d);return(0,O.jsx)("g",{"data-series":n.id,children:p.map((e,t)=>(0,O.jsx)(kP,{dataIndex:e.dataIndex,color:a?a(t):o,x:e.x,y:e.y,seriesId:n.id,size:n.preview.markerSize,isHighlighted:!1,isFaded:!1},e.id??e.dataIndex))})}const MP=["id","color","gradientId","onClick"],CP=bm("g",{name:"MuiAreaPlot",slot:"Root"})({});function PP({axisId:e}){const t=function(e){const t=zx();return pk(t.use(sP,e),t.use(cP,e))}(e);return(0,O.jsx)(CP,{children:t.map(({d:e,seriesId:t,color:n,area:r,gradientId:i})=>!!r&&(0,O.jsx)(EP,{id:t,d:e,color:n,gradientId:i},t))})}function EP(e){let{id:t,color:n,gradientId:r}=e,i=tt(e,MP);return(0,O.jsx)("path",l({fill:r?`url(#${r})`:n,stroke:"none","data-series":t},i))}const TP=["id","color","gradientId","onClick"];function AP({axisId:e}){const t=function(e){const t=zx();return Sk(t.use(sP,e),t.use(cP,e))}(e);return(0,O.jsx)("g",{children:t.map(({d:e,seriesId:t,color:n,gradientId:r})=>(0,O.jsx)(OP,{id:t,d:e,color:n,gradientId:r},t))})}function OP(e){let{id:t,color:n,gradientId:r}=e,i=tt(e,TP);return(0,O.jsx)("path",l({stroke:r?`url(#${r})`:n,strokeWidth:2,strokeLinejoin:"round",fill:"none","data-series":t},i))}const jP=new Map([["bar",function(e){const t={left:e.x,top:e.y,width:e.width,height:e.height,right:e.x+e.width,bottom:e.y+e.height},{completedData:n}=function(e,t){const n=zx();return pP(t,n.use(sP,e),n.use(cP,e))}(e.axisId,t);return(0,O.jsx)("g",{children:n.map(({seriesId:e,layout:t,xOrigin:n,yOrigin:r,data:i})=>(0,O.jsx)("g",{children:i.map(({dataIndex:i,color:o,x:a,y:s,width:l,height:c})=>(0,O.jsx)(bP,{id:e,dataIndex:i,color:o,skipAnimation:!0,layout:t??"vertical",x:a,xOrigin:n,y:s,yOrigin:r,width:l,height:c},i))},e))})}],["line",function({axisId:t}){return(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(PP,{axisId:t}),(0,O.jsx)(AP,{axisId:t})]})}],["scatter",function({axisId:t,x:n,y:r,height:i,width:o}){const a=zx(),s=IP(),l=a.use(sP,t),c=a.use(cP,t),u=_x().xAxisIds[0],d=Fx().yAxisIds[0],{zAxis:p,zAxisIds:h}=Kx(),m=h[0];if(void 0===s)return null;const{series:f,seriesOrder:g}=s;return(0,O.jsx)(e.Fragment,{children:g.map(e=>{const{id:t,xAxisId:a,yAxisId:s,zAxisId:h,color:g}=f[e],y=Dl.colorProcessor(f[e],l[a??u],c[s??d],p[h??m]),v=l[a??u].scale,b=c[s??d].scale;return(0,O.jsx)(SP,{xScale:v,yScale:b,color:g,colorGetter:y,series:f[e],x:n,y:r,height:i,width:o},t)})})}]]);function LP(t){const{axisId:n,x:r,y:i,width:o,height:a}=t,s=zx().use(ft),c=[],u=`zoom-preview-mask-${n}`;for(const[e,n]of jP)(s[e]?.seriesOrder?.length??0)>0&&c.push((0,O.jsx)(n,l({},t),e));return(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)("clipPath",{id:u,children:(0,O.jsx)("rect",{x:r,y:i,width:o,height:a})}),(0,O.jsx)("g",{clipPath:`url(#${u})`,children:c})]})}const RP=["axisId","axisDirection","reverse"],DP=bm("rect",{slot:"internal",shouldForwardProp:void 0})(({theme:e})=>({rx:4,ry:4,stroke:e.palette.grey[700],fill:tP(e.palette.grey[700],.4)}));function $P(e){let{axisId:t,axisDirection:n}=e,r=tt(e,RP);return(0,O.jsxs)("g",l({},r,{children:[(0,O.jsx)(zP,l({},r,{axisId:t,axisDirection:n})),(0,O.jsx)("rect",l({},r,{fill:"transparent",rx:4,ry:4})),(0,O.jsx)(LP,l({axisId:t},r))]}))}function zP(t){const{axisId:n,axisDirection:r}=t,i=zx(),o=i.use(px,n),a=i.use(Xa,n),s=iP();if(!o)return null;const l=`zoom-preview-mask-${n}-${s}`;let c,u,d,p;const h=a.maxEnd-a.minStart;return"x"===r?(c=t.x+(o.start-a.minStart)/h*t.width,u=t.y,d=(o.end-o.start)/h*t.width,p=t.height):(c=t.x,u=t.y+(1-o.end/h)*t.height,d=t.width,p=(o.end-o.start)/h*t.height),(0,O.jsxs)(e.Fragment,{children:[(0,O.jsxs)("mask",{id:l,children:[(0,O.jsx)("rect",{x:t.x,y:t.y,width:t.width,height:t.height,fill:"white"}),(0,O.jsx)("rect",{x:c,y:u,width:d,height:p,fill:"black",rx:4,ry:4})]}),(0,O.jsx)(DP,{x:t.x,y:t.y,width:t.width,height:t.height,mask:`url(#${l})`})]})}const NP=8,_P=10,FP=20,HP=10,BP=Math.max(NP,_P,FP,HP);const VP=[];function UP(e){return VP[0]=e,Nd(VP)}function YP(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function WP(t){if(e.isValidElement(t)||(0,dc.Hy)(t)||!YP(t))return t;const n={};return Object.keys(t).forEach(e=>{n[e]=WP(t[e])}),n}function GP(t,n,r={clone:!0}){const i=r.clone?{...t}:t;return YP(t)&&YP(n)&&Object.keys(n).forEach(o=>{e.isValidElement(n[o])||(0,dc.Hy)(n[o])?i[o]=n[o]:YP(n[o])&&Object.prototype.hasOwnProperty.call(t,o)&&YP(t[o])?i[o]=GP(t[o],n[o],r):r.clone?i[o]=YP(n[o])?WP(n[o]):n[o]:i[o]=n[o]}),i}function KP(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e},{...t}):t}const qP={borderRadius:4},XP={xs:0,sm:600,md:900,lg:1200,xl:1536},ZP={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${XP[e]}px)`},JP={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:XP[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function QP(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||ZP;return t.reduce((r,i,o)=>(r[e.up(e.keys[o])]=n(t[o]),r),{})}if("object"==typeof t){const e=r.breakpoints||ZP;return Object.keys(t).reduce((i,o)=>{if(function(e,t){return"@"===t||t.startsWith("@")&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}(e.keys,o)){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,i]=n,o=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(o)}(r.containerQueries?r:JP,o);e&&(i[e]=n(t[o],o))}else if(Object.keys(e.values||XP).includes(o))i[e.up(o)]=n(t[o],o);else{const e=o;i[e]=t[e]}return i},{})}return n(t)}function eE(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function tE(e){if("string"!=typeof e)throw new Error(JC(7));return e.charAt(0).toUpperCase()+e.slice(1)}function nE(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function rE(e,t,n,r=n){let i;return i="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:nE(e,n)||r,t&&(i=t(i,r,e)),i}const iE=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=e=>{if(null==e[t])return null;const o=e[t],a=nE(e.theme,r)||{};return QP(e,o,e=>{let r=rE(a,i,e);return e===r&&"string"==typeof e&&(r=rE(a,i,`${t}${"default"===e?"":tE(e)}`,e)),!1===n?r:{[n]:r}})};return o.propTypes={},o.filterProps=[t],o},oE=function(e,t){return t?GP(e,t,{clone:!1}):e},aE={m:"margin",p:"padding"},sE={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},lE={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},cE=function(){const e={};return t=>(void 0===e[t]&&(e[t]=(e=>{if(e.length>2){if(!lE[e])return[e];e=lE[e]}const[t,n]=e.split(""),r=aE[t],i=sE[n]||"";return Array.isArray(i)?i.map(e=>r+e):[r+i]})(t)),e[t])}(),uE=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],dE=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],pE=[...uE,...dE];function hE(e,t,n,r){const i=nE(e,t,!0)??n;return"number"==typeof i||"string"==typeof i?e=>"string"==typeof e?e:"string"==typeof i?i.startsWith("var(")&&0===e?0:i.startsWith("var(")&&1===e?i:`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if("string"==typeof e)return e;const t=Math.abs(e),n=i[t];return e>=0?n:"number"==typeof n?-n:"string"==typeof n&&n.startsWith("var(")?`calc(-1 * ${n})`:`-${n}`}:"function"==typeof i?i:()=>{}}function mE(e){return hE(e,"spacing",8)}function fE(e,t){return"string"==typeof t||null==t?t:e(t)}function gE(e,t){const n=mE(e.theme);return Object.keys(e).map(r=>function(e,t,n,r){if(!t.includes(n))return null;const i=function(e,t){return n=>e.reduce((e,r)=>(e[r]=fE(t,n),e),{})}(cE(n),r);return QP(e,e[n],i)}(e,t,r,n)).reduce(oE,{})}function yE(e){return gE(e,uE)}function vE(e){return gE(e,dE)}function bE(e){return gE(e,pE)}yE.propTypes={},yE.filterProps=uE,vE.propTypes={},vE.filterProps=dE,bE.propTypes={},bE.filterProps=pE;const xE=function(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?oE(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n};function IE(e){return"number"!=typeof e?e:`${e}px solid`}function wE(e,t){return iE({prop:e,themeKey:"borders",transform:t})}const kE=wE("border",IE),SE=wE("borderTop",IE),ME=wE("borderRight",IE),CE=wE("borderBottom",IE),PE=wE("borderLeft",IE),EE=wE("borderColor"),TE=wE("borderTopColor"),AE=wE("borderRightColor"),OE=wE("borderBottomColor"),jE=wE("borderLeftColor"),LE=wE("outline",IE),RE=wE("outlineColor"),DE=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=hE(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:fE(t,e)});return QP(e,e.borderRadius,n)}return null};DE.propTypes={},DE.filterProps=["borderRadius"],xE(kE,SE,ME,CE,PE,EE,TE,AE,OE,jE,DE,LE,RE);const $E=e=>{if(void 0!==e.gap&&null!==e.gap){const t=hE(e.theme,"spacing",8),n=e=>({gap:fE(t,e)});return QP(e,e.gap,n)}return null};$E.propTypes={},$E.filterProps=["gap"];const zE=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=hE(e.theme,"spacing",8),n=e=>({columnGap:fE(t,e)});return QP(e,e.columnGap,n)}return null};zE.propTypes={},zE.filterProps=["columnGap"];const NE=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=hE(e.theme,"spacing",8),n=e=>({rowGap:fE(t,e)});return QP(e,e.rowGap,n)}return null};function _E(e,t){return"grey"===t?t:e}function FE(e){return e<=1&&0!==e?100*e+"%":e}NE.propTypes={},NE.filterProps=["rowGap"],xE($E,zE,NE,iE({prop:"gridColumn"}),iE({prop:"gridRow"}),iE({prop:"gridAutoFlow"}),iE({prop:"gridAutoColumns"}),iE({prop:"gridAutoRows"}),iE({prop:"gridTemplateColumns"}),iE({prop:"gridTemplateRows"}),iE({prop:"gridTemplateAreas"}),iE({prop:"gridArea"})),xE(iE({prop:"color",themeKey:"palette",transform:_E}),iE({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:_E}),iE({prop:"backgroundColor",themeKey:"palette",transform:_E}));const HE=iE({prop:"width",transform:FE}),BE=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||XP[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:FE(t)}};return QP(e,e.maxWidth,t)}return null};BE.filterProps=["maxWidth"];const VE=iE({prop:"minWidth",transform:FE}),UE=iE({prop:"height",transform:FE}),YE=iE({prop:"maxHeight",transform:FE}),WE=iE({prop:"minHeight",transform:FE}),GE=(iE({prop:"size",cssProperty:"width",transform:FE}),iE({prop:"size",cssProperty:"height",transform:FE}),xE(HE,BE,VE,UE,YE,WE,iE({prop:"boxSizing"})),{border:{themeKey:"borders",transform:IE},borderTop:{themeKey:"borders",transform:IE},borderRight:{themeKey:"borders",transform:IE},borderBottom:{themeKey:"borders",transform:IE},borderLeft:{themeKey:"borders",transform:IE},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:IE},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:DE},color:{themeKey:"palette",transform:_E},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:_E},backgroundColor:{themeKey:"palette",transform:_E},p:{style:vE},pt:{style:vE},pr:{style:vE},pb:{style:vE},pl:{style:vE},px:{style:vE},py:{style:vE},padding:{style:vE},paddingTop:{style:vE},paddingRight:{style:vE},paddingBottom:{style:vE},paddingLeft:{style:vE},paddingX:{style:vE},paddingY:{style:vE},paddingInline:{style:vE},paddingInlineStart:{style:vE},paddingInlineEnd:{style:vE},paddingBlock:{style:vE},paddingBlockStart:{style:vE},paddingBlockEnd:{style:vE},m:{style:yE},mt:{style:yE},mr:{style:yE},mb:{style:yE},ml:{style:yE},mx:{style:yE},my:{style:yE},margin:{style:yE},marginTop:{style:yE},marginRight:{style:yE},marginBottom:{style:yE},marginLeft:{style:yE},marginX:{style:yE},marginY:{style:yE},marginInline:{style:yE},marginInlineStart:{style:yE},marginInlineEnd:{style:yE},marginBlock:{style:yE},marginBlockStart:{style:yE},marginBlockEnd:{style:yE},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:$E},rowGap:{style:NE},columnGap:{style:zE},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:FE},maxWidth:{style:BE},minWidth:{transform:FE},height:{transform:FE},maxHeight:{transform:FE},minHeight:{transform:FE},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}}),KE=GE,qE=function(){function e(e,t,n,r){const i={[e]:t,theme:n},o=r[e];if(!o)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:c}=o;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const u=nE(n,s)||{};return c?c(i):QP(i,t,t=>{let n=rE(u,l,t);return t===n&&"string"==typeof t&&(n=rE(u,l,`${e}${"default"===t?"":tE(t)}`,t)),!1===a?n:{[a]:n}})}return function t(n){const{sx:r,theme:i={},nested:o}=n||{};if(!r)return null;const a=i.unstable_sxConfig??KE;function s(n){let r=n;if("function"==typeof n)r=n(i);else if("object"!=typeof n)return n;if(!r)return null;const s=function(e={}){const t=e.keys?.reduce((t,n)=>(t[e.up(n)]={},t),{});return t||{}}(i.breakpoints),l=Object.keys(s);let c=s;return Object.keys(r).forEach(n=>{const o=function(e,t){return"function"==typeof e?e(t):e}(r[n],i);if(null!=o)if("object"==typeof o)if(a[n])c=oE(c,e(n,o,i,a));else{const e=QP({theme:i},o,e=>({[n]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}(e,o)?c=oE(c,e):c[n]=t({sx:o,theme:i,nested:!0})}else c=oE(c,e(n,o,i,a))}),!o&&i.modularCssLayers?{"@layer sx":KP(i,eE(l,c))}:KP(i,eE(l,c))}return Array.isArray(r)?r.map(s):s(r)}}();qE.filterProps=["sx"];const XE=qE;function ZE(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!=typeof n.getColorSchemeSelector)return{};let r=n.getColorSchemeSelector(e);return"&"===r?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}const JE=function(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={},...a}=e,s=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,o=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),a=Object.keys(o);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,i){const o=a.indexOf(i);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==o&&"number"==typeof t[a[o]]?t[a[o]]:i)-r/100}${n})`}return{keys:a,values:o,up:s,down:l,between:c,only:function(e){return a.indexOf(e)+1(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?`${n}px`:n}).join(" ");return n.mui=!0,n}(i);let c=GP({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...qP,...o}},a);return c=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const i=t(e.breakpoints.not(...n),r);return i.includes("not all and")?i.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):i}}const r={},i=e=>(n(r,e),r);return n(i),{...e,containerQueries:i}}(c),c.applyStyles=ZE,c=t.reduce((e,t)=>GP(e,t),c),c.unstable_sxConfig={...KE,...a?.unstable_sxConfig},c.unstable_sx=function(e){return XE({sx:e,theme:this})},c}();function QE(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function eT(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function tT(e){return e?(t,n)=>n[e]:null}function nT(e,t,n){const r="function"==typeof t?t(e):t;if(Array.isArray(r))return r.flatMap(t=>nT(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?eT(r.style,n):r.style;else{const{variants:e,...i}=r;t=n?eT(UP(i),n):i}return rT(e,r.variants,[t],n)}return r?.isProcessed?n?eT(UP(r.style),n):r.style:n?eT(UP(r),n):r}function rT(e,t,n=[],r=void 0){let i;e:for(let o=0;oe,uT=(()=>{let e=cT;return{configure(t){e=t},generate:t=>e(t),reset(){e=cT}}})();function dT(e){return`${uT.generate("MuiChartAxisZoomSliderTrack")}-${e}`}["horizontal","vertical","background","active"].reduce((e,t)=>(e[t]=dT(t),e),{});const pT=e=>{const{axisDirection:t}=e;return lT({background:["x"===t?"horizontal":"vertical","background"],active:["x"===t?"horizontal":"vertical","active"]},dT)},hT=["axisId","axisDirection","reverse","onSelectStart","onSelectEnd"],mT=bm("rect",{slot:"internal",shouldForwardProp:e=>QE(e)&&"axisDirection"!==e&&"isSelecting"!==e})(({theme:e})=>l({fill:(e.vars||e).palette.grey[300]},e.applyStyles("dark",{fill:(e.vars||e).palette.grey[800]}),{cursor:"pointer",variants:[{props:{axisDirection:"x",isSelecting:!0},style:{cursor:"ew-resize"}},{props:{axisDirection:"y",isSelecting:!0},style:{cursor:"ns-resize"}}]}));function fT(t){let{axisId:n,axisDirection:r,onSelectStart:i,onSelectEnd:o}=t,a=tt(t,hT);const s=e.useRef(null),{instance:c,svgRef:u}=$x(),d=zx(),[p,h]=e.useState(!1),m=pT({axisDirection:r});return(0,O.jsx)(mT,l({ref:s,onPointerDown:function(e){const t=s.current,r=u.current;if(!t||!r)return;const a=xs(r,e),p=oT(d.state,n,a);if(null===p)return;const m=rx(function(e){const t=xs(r,e),i=oT(d.state,n,t);if(null===i)return;const o=Xa(d.state,n);c.setAxisZoomData(n,e=>{if(i>p){const t=sT(i,l({},e,{start:p}),o),n=aT(p,l({},e,{start:p,end:t}),o);return l({},e,{start:n,end:t})}const t=aT(i,l({},e,{end:p}),o),n=sT(p,l({},e,{start:t,end:p}),o);return l({},e,{start:t,end:n})})});e.preventDefault(),e.stopPropagation(),t.setPointerCapture(e.pointerId),document.addEventListener("pointerup",function e(n){t.releasePointerCapture(n.pointerId),t.removeEventListener("pointermove",m),document.removeEventListener("pointerup",e),h(!1),o?.()}),t.addEventListener("pointermove",m),i?.(),h(!0)},axisDirection:r,isSelecting:p},a,{className:Hh(m.background,a.className)}))}function gT(e,t,n){return fa(e)?t[yT(e,n)]:e.invert(n)}function yT(e,t){return 0===e.bandwidth()?Math.floor((t-Math.min(...e.range())+e.step()/2)/e.step()):Math.floor((t-Math.min(...e.range()))/e.step())}function vT(...t){const n=e.useRef(void 0),r=e.useCallback(e=>{const n=t.map(t=>{if(null==t)return null;if("function"==typeof t){const n=t,r=n(e);return"function"==typeof r?r:()=>{n(null)}}return t.current=e,()=>{t.current=null}});return()=>{n.forEach(e=>e?.())}},t);return e.useMemo(()=>t.every(e=>null==e)?null:e=>{n.current&&(n.current(),n.current=void 0),null!=e&&(n.current=r(e))},t)}const bT="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,xT={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function IT(e,t,n="Mui"){const r=xT[t];return r?`${n}-${r}`:`${uT.generate(e)}-${t}`}function wT(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=IT(e,t,n)}),r}const kT=wT("MuiChartAxisZoomSliderThumb",["root","horizontal","vertical","start","end"]);function ST(e){return IT("MuiChartAxisZoomSliderThumb",e)}const MT=["className","onMove","orientation","placement","rx","ry"],CT=bm("rect",{slot:"internal",shouldForwardProp:void 0})(({theme:e})=>({[`&.${kT.root}`]:l({fill:(e.vars||e).palette.common.white,stroke:(e.vars||e).palette.grey[500]},e.applyStyles("dark",{fill:(e.vars||e).palette.grey[300],stroke:(e.vars||e).palette.grey[600]})),[`&.${kT.horizontal}`]:{cursor:"ew-resize"},[`&.${kT.vertical}`]:{cursor:"ns-resize"}}));function PT(e){e.preventDefault()}const ET=e.forwardRef(function(t,n){let{className:r,onMove:i,orientation:o,placement:a,rx:s=4,ry:c=4}=t,u=tt(t,MT);const d=(e=>{const{orientation:t,placement:n}=e;return lT({root:["root","horizontal"===t?"horizontal":"vertical","start"===n?"start":"end"]},ST)})({onMove:i,orientation:o,placement:a}),p=e.useRef(null),h=vT(p,n),m=function(t){const n=e.useRef(t);return bT(()=>{n.current=t}),e.useRef((...e)=>(0,n.current)(...e)).current}(i);return e.useEffect(()=>{const e=p.current;if(!e)return()=>{};e.addEventListener("touchmove",PT,{passive:!1});const t=rx(e=>{m(e)}),n=r=>{e.removeEventListener("pointermove",t),e.removeEventListener("pointerup",n),e.removeEventListener("pointercancel",n),e.releasePointerCapture(r.pointerId)},r=r=>{r.preventDefault(),r.stopPropagation(),e.setPointerCapture(r.pointerId),e.addEventListener("pointermove",t),e.addEventListener("pointercancel",n),e.addEventListener("pointerup",n)};return e.addEventListener("pointerdown",r),()=>{e.removeEventListener("pointerdown",r),e.removeEventListener("pointermove",t),e.removeEventListener("pointercancel",n),e.removeEventListener("pointerup",n),e.removeEventListener("touchmove",PT),t.clear()}},[m,o]),(0,O.jsx)(CT,l({className:Hh(d.root,r),ref:h,rx:s,ry:c},u))}),TT=bm(Tg,{name:"MuiChartsZoomSliderTooltip",slot:"Root"})(({theme:e})=>({pointerEvents:"none",zIndex:e.zIndex.modal})),AT=[{name:"offset",options:{offset:[0,4]}}];function OT({anchorEl:e,open:t,placement:n,modifiers:r=AT,children:i}){return(0,O.jsx)(PC,{children:t?(0,O.jsx)(TT,{open:t,anchorEl:e,placement:n,modifiers:r,children:(0,O.jsx)(JM,{sx:{paddingX:.5},children:(0,O.jsx)(Nv,{variant:"caption",children:i})})}):null})}const jT=bm("rect",{slot:"internal",shouldForwardProp:e=>QE(e)&&"preview"!==e})(({theme:e})=>l({fill:(e.vars||e).palette.grey[600]},e.applyStyles("dark",{fill:(e.vars||e).palette.grey[500]}),{cursor:"grab",variants:[{props:{preview:!0},style:l({fill:"transparent"},e.applyStyles("dark",{fill:"transparent"}),{rx:4,ry:4,stroke:e.palette.grey[500]})}]}));function LT({axisId:t,axisDirection:n,axisPosition:r,size:i,preview:o,zoomData:a,reverse:s,showTooltip:c,onPointerEnter:u,onPointerLeave:d}){const{instance:p,svgRef:h}=$x(),m=zx(),f=m.use(us,t),g=Nx(),y=e.useRef(null),[v,b]=e.useState(null),[x,I]=e.useState(null),{tooltipStart:w,tooltipEnd:k}=function(e,t){const n=t=>e.valueFormatter?e.valueFormatter(t,{location:"zoom-slider-tooltip",scale:e.scale}):`${t}`,r="top"===e.position||"bottom"===e.position?"x":"y";let i="x"===r?t.left:t.top;let o=i+("x"===r?t.width:t.height);"y"===r&&([i,o]=[o,i]),e.reverse&&([i,o]=[o,i]);const a=gT(e.scale,e.data??[],i)??e.data?.at(0),s=gT(e.scale,e.data??[],o)??e.data?.at(-1);return{tooltipStart:n(a),tooltipEnd:n(s)}}(f,g),S=pT({axisDirection:n}),M="x"===n?HP:FP,C="x"===n?FP:HP;let P,E,T,A,j,L,R,D;e.useEffect(()=>{const e=y.current;if(!e)return;let n=0;const r=rx(e=>{const r=h.current;if(!r)return;const i=xs(r,e),o=oT(m.state,t,i);if(null===o)return;const a=o-n;n=o,p.moveZoomRange(t,a)}),i=()=>{e.removeEventListener("pointermove",r),document.removeEventListener("pointerup",i)},o=o=>{o.preventDefault(),e.setPointerCapture(o.pointerId);const a=px(m.state,t),s=h.current;if(!a||!s)return;const l=xs(s,o),c=oT(m.state,t,l);null!==c&&(n=c,document.addEventListener("pointerup",i),e.addEventListener("pointermove",r))};return e.addEventListener("pointerdown",o),()=>{e.removeEventListener("pointerdown",o),r.clear()}},[n,t,p,s,m,h]);const{minStart:$,maxEnd:z}=Xa(m.state,t),N=z-$,_=Math.max($,a.start),F=Math.min(a.end,z);"x"===n?(P=(_-$)/N*g.width,E=0,T=g.width*(F-_)/N,A=i,j=(_-$)/N*g.width,L=FPi?(FP-i)/2:0;return(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(jT,{ref:y,x:P+("x"===n?0:H),y:E+("x"===n?H:0),preview:o,width:T,height:A,onPointerEnter:u,onPointerLeave:d,className:S.active}),(0,O.jsx)(ET,{ref:b,x:j,y:L,width:M,height:C,orientation:"x"===n?"horizontal":"vertical",onMove:e=>{const n=h.current;if(!n)return;const r=xs(n,e);p.setZoomData(e=>{const n=Xa(m.state,t);return e.map(e=>{if(e.axisId===t){const i=oT(m.state,t,r);return null===i?e:l({},e,{start:aT(i,e,n)})}return e})})},onPointerEnter:u,onPointerLeave:d,placement:"start"}),(0,O.jsx)(ET,{ref:I,x:R,y:D,width:M,height:C,orientation:"x"===n?"horizontal":"vertical",onMove:e=>{const n=h.current;if(!n)return;const r=xs(n,e);p.setZoomData(e=>{const n=Xa(m.state,t);return e.map(e=>{if(e.axisId===t){const i=oT(m.state,t,r);return null===i?e:l({},e,{end:sT(i,e,n)})}return e})})},onPointerEnter:u,onPointerLeave:d,placement:"end"}),(0,O.jsx)(OT,{anchorEl:v,open:c&&""!==w,placement:r,children:w}),(0,O.jsx)(OT,{anchorEl:x,open:c&&""!==k,placement:r,children:k})]})}function RT({axisDirection:t,axisId:n}){const r=zx(),i=Nx(),o=r.use(px,n),a=r.use(Xa,n),[s,l]=e.useState(!1),{xAxis:c}=_x(),{yAxis:u}=Fx(),d=a.slider.preview;if(!o)return null;let p,h,m,f,g;const y=d?vt:BP;if("x"===t){const e=c[n];if(!e||"none"===e.position)return null;const t=e.height;p=i.left,h="bottom"===e.position?i.top+i.height+e.offset+t+yt:i.top-e.offset-t-y-yt,m=e.reverse??!1,f=e.position??"bottom",g=e.zoom?.slider?.showTooltip??It}else{const e=u[n];if(!e||"none"===e.position)return null;const t=e.width;p="right"===e.position?i.left+i.width+e.offset+t+yt:i.left-e.offset-t-y-yt,h=i.top,m=e.reverse??!1,f=e.position??"left",g=e.zoom?.slider?.showTooltip??It}const v=(y-NP)/2,b=d?(0,O.jsx)($P,{axisId:n,axisDirection:t,reverse:m,x:0,y:0,height:"x"===t?vt:i.height,width:"x"===t?i.width:vt}):(0,O.jsx)(fT,{x:"x"===t?0:v,y:"x"===t?v:0,height:"x"===t?NP:i.height,width:"x"===t?i.width:NP,rx:NP/2,ry:NP/2,axisId:n,axisDirection:t,reverse:m,onSelectStart:"hover"===g?()=>l(!0):void 0,onSelectEnd:"hover"===g?()=>l(!1):void 0});return(0,O.jsxs)("g",{"data-charts-zoom-slider":!0,transform:`translate(${p} ${h})`,style:{touchAction:"none"},children:[b,(0,O.jsx)(LT,{zoomData:o,axisId:n,axisPosition:f,axisDirection:t,reverse:m,showTooltip:s&&"never"!==g||"always"===g,size:d?vt:_P,preview:d,onPointerEnter:"hover"===g?()=>l(!0):void 0,onPointerLeave:"hover"===g?()=>l(!1):void 0})]})}function DT(){const{xAxisIds:t,xAxis:n}=_x(),{yAxisIds:r,yAxis:i}=Fx();return(0,O.jsxs)(e.Fragment,{children:[t.map(e=>{const t=n[e],r=t.zoom?.slider;return r?.enabled?(0,O.jsx)(RT,{axisId:e,axisDirection:"x"},e):null}),r.map(e=>{const t=i[e],n=t.zoom?.slider;return n?.enabled?(0,O.jsx)(RT,{axisId:e,axisDirection:"y"},e):null})]})}function $T(e){return Xb("MuiChartsReferenceLine",e)}const zT=Zb("MuiChartsReferenceLine",["root","vertical","horizontal","line","label"]),NT=bm("g",{slot:"internal",shouldForwardProp:void 0})(({theme:e})=>({[`& .${zT.line}`]:{fill:"none",stroke:(e.vars||e).palette.text.primary,shapeRendering:"crispEdges",strokeWidth:1,pointerEvents:"none"},[`& .${zT.label}`]:l({fill:(e.vars||e).palette.text.primary,stroke:"none",pointerEvents:"none",fontSize:12},e.typography.body1)})),_T=({top:e,height:t,spacing:n,position:r,labelAlign:i="middle"})=>{const o="middle"===i?0:5,a=("object"==typeof n?n.x:n)??5,s=("object"==typeof n?n.y:o)??o;switch(i){case"start":return{x:r+a,y:e+s,style:{dominantBaseline:"hanging",textAnchor:"start"}};case"end":return{x:r+a,y:e+t-s,style:{dominantBaseline:"auto",textAnchor:"start"}};default:return{x:r+a,y:e+t/2+s,style:{dominantBaseline:"central",textAnchor:"start"}}}};function FT(e){const{x:t,label:n="",spacing:r,classes:i,labelAlign:o="middle",lineStyle:a,labelStyle:s,axisId:c}=e,{top:u,height:d}=Nx(),p=uk(c)(t);if(void 0===p)return null;const h=`M ${p} ${u} l 0 ${d}`,m=function(e){return uI({root:["root","vertical"],line:["line"],label:["label"]},$T,e)}(i),f=l({text:n,fontSize:12},_T({top:u,height:d,spacing:r,position:p,labelAlign:o}),{className:m.label});return(0,O.jsxs)(NT,{className:m.root,children:[(0,O.jsx)("path",{d:h,className:m.line,style:a}),(0,O.jsx)(JS,l({},f,{style:l({},f.style,s)}))]})}const HT=({left:e,width:t,spacing:n,position:r,labelAlign:i="middle"})=>{const o="middle"===i?0:5,a=("object"==typeof n?n.x:o)??o,s=("object"==typeof n?n.y:n)??5;switch(i){case"start":return{y:r-s,x:e+a,style:{dominantBaseline:"auto",textAnchor:"start"}};case"end":return{y:r-s,x:e+t-a,style:{dominantBaseline:"auto",textAnchor:"end"}};default:return{y:r-s,x:e+t/2+a,style:{dominantBaseline:"auto",textAnchor:"middle"}}}};function BT(e){const{y:t,label:n="",spacing:r,classes:i,labelAlign:o="middle",lineStyle:a,labelStyle:s,axisId:c}=e,{left:u,width:d}=Nx(),p=dk(c)(t);if(void 0===p)return null;const h=`M ${u} ${p} l ${d} 0`,m=function(e){return uI({root:["root","horizontal"],line:["line"],label:["label"]},$T,e)}(i),f=l({text:n,fontSize:12},HT({left:u,width:d,spacing:r,position:p,labelAlign:o}),{className:m.label});return(0,O.jsxs)(NT,{className:m.root,children:[(0,O.jsx)("path",{d:h,className:m.line,style:a}),(0,O.jsx)(JS,l({},f,{style:l({},f.style,s)}))]})}function VT(e){const{x:t,y:n}=e;if(void 0!==t&&void 0!==n)throw new Error("MUI X Charts: The ChartsReferenceLine cannot have both `x` and `y` props set.");if(void 0===t&&void 0===n)throw new Error("MUI X Charts: The ChartsReferenceLine should have a value in `x` or `y` prop.");return void 0!==t?(0,O.jsx)(FT,l({},e)):(0,O.jsx)(BT,l({},e))}const UT=Zb("MuiChartsBrushOverlay",["root","rect","x","y"]);function YT(e){return(0,O.jsx)("rect",l({className:UT.rect,strokeWidth:1,fillOpacity:.2,pointerEvents:"none"},e))}function WT(e){const t=zx(),n=t.use(he),r=xm(),i=t.use(hb),o=t.use(mb),a=t.use(fb),s=t.use(gb),c=t.use(xb);if(null===i||null===o||null===a||null===s)return null;const{left:u,top:d,width:p,height:h}=n,m=e=>Math.max(u,Math.min(u+p,e)),f=e=>Math.max(d,Math.min(d+h,e)),g=m(i),y=f(o),v=m(a),b=f(s),x="light"===r.palette.mode?r.palette.common.black:r.palette.common.white;if("xy"===c){const t=v-g,n=b-y;return(0,O.jsx)("g",{className:Hh(UT.root,UT.x,UT.y),children:(0,O.jsx)(YT,l({fill:x,x:t>=0?g:v,y:n>=0?y:b,width:Math.abs(t),height:Math.abs(n)},e))})}if("y"===c){const t=Math.min(y,b),n=Math.max(y,b)-t;return(0,O.jsx)("g",{className:Hh(UT.root,UT.y),children:(0,O.jsx)(YT,l({fill:x,x:u,y:t,width:p,height:n},e))})}const I=Math.min(g,v),w=Math.max(g,v)-I;return(0,O.jsx)("g",{className:Hh(UT.root,UT.x),children:(0,O.jsx)(YT,l({fill:x,x:I,y:d,width:w,height:h},e))})}function GT(t,n,r,i={}){return"function"==typeof n?n(r,i):n?(n.props.className&&(r.className=(o=n.props.className,a=r.className,o&&a?`${o} ${a}`:o||a)),(n.props.style||r.style)&&(r.style=l({},r.style,n.props.style)),e.cloneElement(n,r)):e.createElement(t,r);var o,a}const KT=e.createContext(void 0);function qT({children:t}){const[n,r]=e.useState(null),i=e.useRef(n),[o,a]=e.useState([]),s=e.useCallback(()=>o.sort(XT),[o]),l=e.useCallback((e,t,n=!0)=>{let r=e;const i=s(),o=i.length;for(let e=0;e=o){if(!n)return-1;r=0}else if(r<0){if(!n)return-1;r=o-1}if(!i[r].ref.current?.disabled&&"true"!==i[r].ref.current?.ariaDisabled)return r}return-1},[s]),c=e.useCallback((e,t)=>{a(n=>[...n,{id:e,ref:t}])},[]),u=e.useCallback(e=>{a(t=>t.filter(t=>t.id!==e))},[]),d=e.useCallback(e=>{if(!n)return;const t=s(),i=t.findIndex(e=>e.id===n);let o=-1;if("ArrowRight"===e.key?(e.preventDefault(),o=l(i,1)):"ArrowLeft"===e.key?(e.preventDefault(),o=l(i,-1)):"Home"===e.key?(e.preventDefault(),o=l(-1,1,!1)):"End"===e.key&&(e.preventDefault(),o=l(t.length,-1,!1)),o>=0&&o{n!==e&&r(e)},[n,r]),h=e.useCallback(e=>{const t=s(),n=t.findIndex(t=>t.id===e),i=l(n,1);if(i>=0&&i{i.current=n},[n]),e.useEffect(()=>{const e=s();if(e.length>0){if(!i.current)return void r(e[0].id);const t=e.findIndex(e=>e.id===i.current);if(e[t]){if(-1===t){const n=e[t];n&&(r(n.id),n.ref.current?.focus())}}else{const t=e[e.length-1];t&&(r(t.id),t.ref.current?.focus())}}},[s,l]);const m=e.useMemo(()=>({focusableItemId:n,registerItem:c,unregisterItem:u,onItemKeyDown:d,onItemFocus:p,onItemDisabled:h}),[n,c,u,d,p,h]);return(0,O.jsx)(KT.Provider,{value:m,children:t})}function XT(e,t){if(!e.ref.current||!t.ref.current)return 0;const n=e.ref.current.compareDocumentPosition(t.ref.current);return n?n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0:0}const ZT=["render","onKeyDown","onFocus","disabled","aria-disabled"],JT=["tabIndex"],QT=e.forwardRef(function(t,n){const{render:r}=t,i=tt(t,ZT),{slots:o,slotProps:a}=sc(),s=e.useRef(null),c=Dx(s,n),u=function(t,n){const{onKeyDown:r,onFocus:i,disabled:o,"aria-disabled":a}=t,s=z(),{focusableItemId:l,registerItem:c,unregisterItem:u,onItemKeyDown:d,onItemFocus:p,onItemDisabled:h}=function(){const t=e.useContext(KT);if(void 0===t)throw new Error("MUI X: Missing context. Toolbar subcomponents must be placed within a component.");return t}();e.useEffect(()=>(c(s,n),()=>u(s)),[s,n,c,u]);const m=e.useRef(o);e.useEffect(()=>{m.current!==o&&!0===o&&h(s,o),m.current=o},[o,s,h]);const f=e.useRef(a);return e.useEffect(()=>{f.current!==a&&!0===a&&h(s,!0),f.current=a},[a,s,h]),{tabIndex:l===s?0:-1,disabled:o,"aria-disabled":a,onKeyDown:e=>{d(e),r?.(e)},onFocus:e=>{p(s),i?.(e)}}}(t,s),{tabIndex:d}=u,p=tt(u,JT),h=GT(o.baseIconButton,r,l({},a?.baseIconButton,{tabIndex:d},i,p,{ref:c}));return(0,O.jsx)(e.Fragment,{children:h})}),eA=["className","render"],tA=bm("div",{name:"MuiChartsToolbar",slot:"Root"})(({theme:e})=>({flex:0,display:"flex",alignItems:"center",justifyContent:"end",gap:e.spacing(.25),padding:e.spacing(.5),marginBottom:e.spacing(1.5),minHeight:44,boxSizing:"border-box",border:`1px solid ${(e.vars||e).palette.divider}`,borderRadius:4})),nA=e.forwardRef(function(e,t){let{className:n,render:r}=e,i=tt(e,eA);const o=GT(tA,r,l({role:"toolbar","aria-orientation":"horizontal",className:Hh(Jb.root,n)},i,{ref:t}));return(0,O.jsx)(qT,{children:o})}),rA=()=>{const t=e.useContext(Nh);if(null===t)throw new Error(["MUI X Charts: Can not find the charts localization context.","It looks like you forgot to wrap your component in ChartsLocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-charts` package"].join("\n"));return t},iA=function(e={}){const{themeId:t,defaultTheme:n=JE,rootShouldForwardProp:r=QE,slotShouldForwardProp:i=QE}=e;function o(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return(e,t={})=>{!function(e){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=(e=>e.filter(e=>e!==XE))(e.__emotion_styles))}(e);const{name:n,slot:a,skipVariantsResolver:s,skipSx:l,overridesResolver:c=tT(iT(a)),...u}=t,d=n&&n.startsWith("Mui")||a?"components":"custom",p=void 0!==s?s:a&&"Root"!==a&&"root"!==a||!1,h=l||!1;let m=QE;"Root"===a||"root"===a?m=r:a?m=i:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(m=void 0);const f=function(e,t){return om(e,t)}(e,{shouldForwardProp:m,label:void 0,...u}),g=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return nT(t,e,t.theme.modularCssLayers?d:void 0)};if(YP(e)){const t=function(e){const{variants:t,...n}=e,r={variants:t,style:UP(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{"function"!=typeof e.style&&(e.style=UP(e.style))}),r}(e);return function(e){return t.variants?nT(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?eT(t.style,d):t.style}}return e},y=(...t)=>{const r=[],i=t.map(g),a=[];if(r.push(o),n&&c&&a.push(function(e){const t=e.theme,r=t.components?.[n]?.styleOverrides;if(!r)return null;const i={};for(const t in r)i[t]=nT(e,r[t],e.theme.modularCssLayers?"theme":void 0);return c(e,i)}),n&&!p&&a.push(function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?rT(e,r,[],e.theme.modularCssLayers?"theme":void 0):null}),h||a.push(XE),Array.isArray(i[0])){const e=i.shift(),t=new Array(r.length).fill(""),n=new Array(a.length).fill("");let o;o=[...t,...e,...n],o.raw=[...t,...e.raw,...n],r.unshift(o)}const s=[...r,...i,...a],l=f(...s);return e.muiName&&(l.muiName=e.muiName),l};return f.withConfig&&(y.withConfig=f.withConfig),y}}(),oA=iA(function(e){throw new Error("Failed assertion: should not be rendered")},{name:"MuiChartsToolbar",slot:"Divider"})(({theme:e})=>({margin:e.spacing(0,.5),height:"50%"})),aA=e.forwardRef(function(e,t){const{slots:n,slotProps:r}=sc();return(0,O.jsx)(oA,l({as:n.baseDivider,orientation:"vertical"},r.baseDivider,e,{ref:t}))}),sA=["open","target","onClose","children","position","className","onExited"];function lA(t){const{open:n,target:r,onClose:i,children:o,position:a,onExited:s}=t,c=tt(t,sA),{slots:u,slotProps:d}=sc(),p=u.basePopper,h=e.useRef(null);return bT(()=>{n?h.current=document.activeElement instanceof HTMLElement?document.activeElement:null:(h.current?.focus?.(),h.current=null)},[n]),(0,O.jsx)(p,l({open:n,target:r,transition:!0,placement:a,onClickAway:e=>{e.target&&(r===e.target||r?.contains(e.target))||i(e)},onExited:s,clickAwayMouseEvent:"onMouseDown"},c,d?.basePopper,{children:o}))}function cA(t,n,r,i={}){return"function"==typeof n?n(r,i):n?(n.props.className&&(r.className=(o=n.props.className,a=r.className,o&&a?`${o} ${a}`:o||a)),(n.props.style||r.style)&&(r.style=l({},r.style,n.props.style)),e.cloneElement(n,r)):e.createElement(t,r);var o,a}const uA=["render"],dA=e.forwardRef(function(t,n){let{render:r}=t,i=tt(t,uA);const{slots:o,slotProps:a}=sc(),{instance:s,store:c}=$x(),u=c.use(mx),d=cA(o.baseButton,r,l({},a.baseButton,{onClick:()=>s.zoomIn(),disabled:u},i,{ref:n}));return(0,O.jsx)(e.Fragment,{children:d})}),pA=["render"],hA=e.forwardRef(function(t,n){let{render:r}=t,i=tt(t,pA);const{slots:o,slotProps:a}=sc(),{instance:s,store:c}=$x(),u=c.use(hx),d=cA(o.baseButton,r,l({},a.baseButton,{onClick:()=>s.zoomOut(),disabled:u},i,{ref:n}));return(0,O.jsx)(e.Fragment,{children:d})}),mA=parseInt(e.version,10),fA=t=>{if(mA>=19){const e=e=>t(e,e.ref??null);return e.displayName=t.displayName??t.name,e}return e.forwardRef(t)};function gA(){return function(){const{publicAPI:t}=$x(),n=e.useRef(t);return e.useEffect(()=>{n.current=t},[t]),n}()}const yA=["render","options","onClick"],vA=fA(function(t,n){const{render:r,options:i,onClick:o}=t,a=tt(t,yA),{slots:s,slotProps:c}=sc(),u=gA(),d=cA(s.baseButton,r,l({},c?.baseButton,{onClick:e=>{u.current.exportAsPrint(i),o?.(e)}},a,{ref:n}));return(0,O.jsx)(e.Fragment,{children:d})}),bA=["render","options","onClick"],xA=fA(function(t,n){const{render:r,options:i,onClick:o}=t,a=tt(t,bA),{slots:s,slotProps:c}=sc(),u=gA(),d=cA(s.baseButton,r,l({},c?.baseButton,{onClick:e=>{u.current.exportAsImage(i),o?.(e)}},a,{ref:n}));return(0,O.jsx)(e.Fragment,{children:d})}),IA=["printOptions","imageExportOptions"],wA=[{type:"image/png"}];function kA(t){let{printOptions:n,imageExportOptions:r}=t,i=tt(t,IA);const{slots:o,slotProps:a}=sc(),{store:s}=$x(),{localeText:c}=rA(),[u,d]=e.useState(!1),p=e.useRef(null),h=iP(),m=iP(),f=s.use(dx),g=r??wA,y=!n?.disableToolbarButton||g.length>0,v=[];if(f){const e=o.baseTooltip,t=o.zoomOutIcon,n=o.zoomInIcon;v.push((0,O.jsx)(e,l({},a.baseTooltip,{title:c.zoomIn,children:(0,O.jsx)(dA,{render:(0,O.jsx)(QT,{size:"small"}),children:(0,O.jsx)(n,l({fontSize:"small"},a.zoomInIcon))})}),"zoom-in")),v.push((0,O.jsx)(e,l({},a.baseTooltip,{title:c.zoomOut,children:(0,O.jsx)(hA,{render:(0,O.jsx)(QT,{size:"small"}),children:(0,O.jsx)(t,l({fontSize:"small"},a.zoomOutIcon))})}),"zoom-out"))}if(y){const t=o.baseTooltip,r=o.baseMenuList,i=o.baseMenuItem,s=o.exportIcon,f=()=>d(!1),y=e=>{var t;"Tab"===e.key&&e.preventDefault(),("Tab"===(t=e.key)||"Escape"===t)&&f()};v.length>0&&v.push((0,O.jsx)(aA,{},"divider")),v.push((0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(t,{title:c.toolbarExport,disableInteractive:u,children:(0,O.jsx)(QT,{ref:p,id:m,"aria-controls":h,"aria-haspopup":"true","aria-expanded":u?"true":void 0,onClick:()=>d(!u),size:"small",children:(0,O.jsx)(s,{fontSize:"small"})})}),(0,O.jsx)(lA,{target:p.current,open:u,onClose:f,position:"bottom-end",children:(0,O.jsxs)(r,l({id:h,"aria-labelledby":m,onKeyDown:y,autoFocusItem:!0},a?.baseMenuList,{children:[!n?.disableToolbarButton&&(0,O.jsx)(vA,{render:(0,O.jsx)(i,l({dense:!0},a?.baseMenuItem)),options:n,onClick:f,children:c.toolbarExportPrint}),g.map(e=>(0,O.jsx)(xA,{render:(0,O.jsx)(i,l({dense:!0},a?.baseMenuItem)),options:e,onClick:f,children:c.toolbarExportImage(e.type)},e.type))]}))})]},"export-menu"))}return 0===v.length?null:(0,O.jsx)(nA,l({},i,{children:v}))}function SA(){return SA=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0?a:l;return n().createElement("g",null,n().createElement("line",{x1:v,y1:m,x2:v,y2:m+g,stroke:i,strokeWidth:2,strokeDasharray:"5,5",pointerEvents:"none"}),n().createElement("line",{x1:b,y1:m,x2:b,y2:m+g,stroke:i,strokeWidth:2,strokeDasharray:"5,5",pointerEvents:"none"}),n().createElement("rect",{x,y:m,width:w,height:g,fill:i,fillOpacity:.1,pointerEvents:"none"}),n().createElement("g",{transform:"translate(".concat(v,", ").concat(m+15,")")},n().createElement("rect",{x:-30,y:0,width:60,height:40,fill:i,rx:4}),n().createElement("text",{x:0,y:16,textAnchor:"middle",fill:"white",fontSize:10},String(A)),n().createElement("text",{x:0,y:32,textAnchor:"middle",fill:"white",fontSize:11,fontWeight:"bold"},"number"==typeof C?C.toFixed(2):C)),n().createElement("g",{transform:"translate(".concat(b,", ").concat(m+15,")")},n().createElement("rect",{x:-30,y:0,width:60,height:40,fill:i,rx:4}),n().createElement("text",{x:0,y:16,textAnchor:"middle",fill:"white",fontSize:10},String(O)),n().createElement("text",{x:0,y:32,textAnchor:"middle",fill:"white",fontSize:11,fontWeight:"bold"},"number"==typeof P?P.toFixed(2):P)),n().createElement("g",{transform:"translate(".concat((x+I)/2,", ").concat(m+g-30,")")},n().createElement("rect",{x:-50,y:0,width:100,height:26,fill:j,rx:4}),n().createElement("text",{x:0,y:17,textAnchor:"middle",fill:"white",fontSize:12,fontWeight:"bold"},E>=0?"+":"",E.toFixed(2)," (",T,"%)")))}function $A(t){var r,i=t.id,o=t.licenseKey,a=t.series,l=void 0===a?[]:a,c=t.xAxis,u=t.yAxis,d=t.height,p=void 0===d?400:d,h=t.width,m=t.margin,f=t.grid,g=t.colors,y=t.hideLegend,v=void 0!==y&&y,b=t.tooltip,x=t.skipAnimation,I=void 0!==x&&x,w=t.loading,k=void 0!==w&&w,S=t.zoom,M=t.initialZoom,C=t.showSlider,P=void 0!==C&&C,E=t.zoomInteractionConfig,T=t.referenceLines,A=void 0===T?[]:T,O=t.brushConfig,j=t.brushOverlay,L=void 0===j?"none":j,R=t.brushSeriesId,D=t.axisHighlight,$=void 0===D?{x:"line",y:"none"}:D,z=t.highlightedAxis,N=t.highlightedItem,_=t.tooltipItem,F=t.showToolbar,H=void 0!==F&&F,B=(t.brushData,t.zoomData,t.clickData,t.n_clicks),V=void 0===B?0:B,U=t.setProps,Y=(0,e.useId)();o&&!jA&&(s.setLicenseKey(o),jA=!0);var W=EA((0,e.useState)(function(){return S&&Array.isArray(S)&&S.length>0?S:M&&Array.isArray(M)&&M.length>0?M:[]}),2),G=W[0],K=W[1],q=(0,e.useRef)(JSON.stringify(S||M||[])),X=EA((0,e.useState)(0),2),Z=X[0],J=X[1];(0,e.useEffect)(function(){var e=JSON.stringify(S);S&&Array.isArray(S)&&e!==q.current&&(q.current=e,K(S),J(function(e){return e+1}))},[S]);var Q=(0,e.useRef)(JSON.stringify(null!=z?z:[])),ee=EA((0,e.useState)(function(){return z&&Array.isArray(z)?z:[]}),2),te=ee[0],ne=ee[1];(0,e.useEffect)(function(){var e=JSON.stringify(null!=z?z:[]);e!==Q.current&&(Q.current=e,ne(null!=z?z:[]))},[z]);var re=(0,e.useRef)(JSON.stringify(null!=N?N:null)),ie=EA((0,e.useState)(function(){return null!=N?N:null}),2),oe=ie[0],ae=ie[1];(0,e.useEffect)(function(){var e=JSON.stringify(null!=N?N:null);e!==re.current&&(re.current=e,ae(null!=N?N:null))},[N]);var se=(0,e.useRef)(JSON.stringify(null!=_?_:null)),le=EA((0,e.useState)(function(){return null!=_?_:null}),2),ce=le[0],ue=le[1];(0,e.useEffect)(function(){var e=JSON.stringify(null!=_?_:null);e!==se.current&&(se.current=e,ue(null!=_?_:null))},[_]);var de=(0,e.useMemo)(function(){return l.some(function(e){return e.area})},[l]),pe=(0,e.useMemo)(function(){return l.some(function(e){return!1!==e.showMark})},[l]),he=(0,e.useMemo)(function(){return l.map(function(e){return CA({type:"line"},e)})},[l]),me=(0,e.useMemo)(function(){var e=function(e){return!!e&&e.some(function(e){var t=e.zoom;return t&&"object"===OA(t)&&t.slider&&t.slider.enabled})};return e(c)||e(u)},[c,u]),fe=(0,e.useMemo)(function(){if(c)return c.map(function(e){var t=CA({},e);if(e.dateFormat)t.valueFormatter=function(e,t){var n=t||e;return function(t,r){return function(e,t){var n=e instanceof Date?e:new Date(e);return t.replace(/YYYY|YY|MMM|MM|dd|HH|mm|M|d/g,function(e){switch(e){case"YYYY":return n.getFullYear();case"YY":return String(n.getFullYear()).slice(-2);case"MMM":return LA[n.getMonth()];case"MM":return RA(n.getMonth()+1);case"M":return n.getMonth()+1;case"dd":return RA(n.getDate());case"d":return n.getDate();case"HH":return RA(n.getHours());case"mm":return RA(n.getMinutes());default:return e}})}(t,r&&"tick"===r.location?n:e)}}(e.dateFormat,e.dateTickFormat),delete t.dateFormat,delete t.dateTickFormat;else if(e.valueFormatter&&"function"!=typeof e.valueFormatter){var n=function(e){if("function"==typeof e)return e;if(e&&"object"===OA(e)&&"string"==typeof e.function){var t=window.dashMuiChartsFunctions;if(t&&"function"==typeof t[e.function]){var n=t[e.function],r=e.options||{};return function(){for(var e=arguments.length,t=new Array(e),i=0;i0&&(ge.initialZoom=G),ge.highlightedAxis=te,ge.onHighlightedAxisChange=function(e){var t=null!=e?e:[];ne(t),Q.current=JSON.stringify(t),U&&U({highlightedAxis:t})},ge.highlightedItem=oe,ge.onHighlightChange=function(e){var t=null!=e?e:null;ae(t),re.current=JSON.stringify(t),U&&U({highlightedItem:t})},ge.tooltipItem=ce,ge.onTooltipItemChange=function(e){var t=null!=e?e:null;ue(t),se.current=JSON.stringify(t),U&&U({tooltipItem:t})};var ye=["tickSize","disableLine","disableTicks","tickLabelStyle","labelStyle","tickLabelPlacement","tickPlacement","tickLabelMinGap","tickSpacing","tickInterval","tickLabelInterval"],ve=function(e){if(!e)return{};for(var t={},n=0,r=ye;n({x:n(e),y:r(e),width:i(e),height:o(e)})}const FA=4,HA=["seriesId","dataIndex","color","isFaded","isHighlighted","classes","skipAnimation","layout","xOrigin","yOrigin","placement","hidden"],BA=bm("text",{name:"MuiBarLabel",slot:"Root",overridesResolver:(e,t)=>[{[`&.${NA.faded}`]:t.faded},{[`&.${NA.highlighted}`]:t.highlighted},t.root]})(({theme:e})=>l({},e?.typography?.body2,{stroke:"none",fill:(e.vars||e)?.palette?.text?.primary,transitionProperty:"opacity, fill",transitionDuration:`${_I}ms`,transitionTimingFunction:FI,pointerEvents:"none"}));function VA(e){const t=Lh({props:e,name:"MuiBarLabel"}),{isFaded:n,hidden:r}=t,i=tt(t,HA),o=function(e){const{initialX:t,currentX:n,initialY:r,currentY:i}="outside"===e.placement?function(e){let t=0,n=0,r=0,i=0;return"vertical"===e.layout?(e.ye,applyProps(e,t){e.setAttribute("x",t.x.toString()),e.setAttribute("y",t.y.toString()),e.setAttribute("width",t.width.toString()),e.setAttribute("height",t.height.toString())},initialProps:o,skip:e.skipAnimation,ref:e.ref})}(t),a=function({placement:e,layout:t,xOrigin:n,x:r}){return"outside"===e&&"horizontal"===t?r{const{classes:t,seriesId:n,isFaded:r,isHighlighted:i,skipAnimation:o}=e;return uI({root:["root",`series-${n}`,i&&"highlighted",r&&"faded",!o&&"animate"]},zA,t)})(k),M=a?.barLabel??VA,C=yI({elementType:M,externalSlotProps:s?.barLabel,additionalProps:l({},x,{xOrigin:c,yOrigin:u,x:d,y:p,width:h,height:m,placement:v,className:S.root}),ownerState:k}),{ownerState:P}=C,E=tt(C,YA);if(!o)return null;const T=function(e){const{barLabel:t,value:n,dataIndex:r,seriesId:i,height:o,width:a}=e;return"value"===t?n?n?.toString():null:t({seriesId:i,dataIndex:r,value:n},{bar:{height:o,width:a}})}({barLabel:o,value:f,dataIndex:i,seriesId:t,height:m,width:h});return T?(0,O.jsx)(M,l({},E,P,{hidden:b,children:T})):null}const GA=["processedSeries","className","skipAnimation"];function KA(e){const{processedSeries:t,className:n,skipAnimation:r}=e,i=tt(e,GA),{seriesId:o,data:a,layout:s,xOrigin:c,yOrigin:u}=t,d=t.barLabel??e.barLabel;return d?(0,O.jsx)("g",{className:n,"data-series":o,children:a.map(({x:e,y:n,dataIndex:a,color:p,value:h,width:m,height:f})=>(0,O.jsx)(WA,l({seriesId:o,dataIndex:a,value:h,color:p,xOrigin:c,yOrigin:u,x:e,y:n,width:m,height:f,skipAnimation:r??!1,layout:s??"vertical"},i,{barLabel:d,barLabelPlacement:t.barLabelPlacement||"center"}),a))},o):null}function qA(e){return Xb("MuiBar",e)}Zb("MuiBar",["root","series","seriesLabels"]);const XA=e=>uI({root:["root"],series:["series"],seriesLabels:["seriesLabels"]},qA,e);function ZA(e,t){const n=Tn(e.x,t.x),r=Tn(e.y,t.y),i=Tn(e.width,t.width),o=Tn(e.height,t.height),a=Tn(e.borderRadius,t.borderRadius);return e=>({x:n(e),y:r(e),width:i(e),height:o(e),borderRadius:a(e)})}function JA(e){const{maskId:t,x:n,y:r,width:i,height:o,skipAnimation:a}=e,{ref:s,d:l}=function(e){const t={x:"vertical"===e.layout?e.x:e.xOrigin,y:"vertical"===e.layout?e.yOrigin:e.y,width:"vertical"===e.layout?e.width:0,height:"vertical"===e.layout?0:e.height,borderRadius:e.borderRadius};return aw({x:e.x,y:e.y,width:e.width,height:e.height,borderRadius:e.borderRadius},{createInterpolator:ZA,transformProps:t=>({d:QA(e.hasNegative,e.hasPositive,e.layout,t.x,t.y,t.width,t.height,e.xOrigin,e.yOrigin,t.borderRadius)}),applyProps(e,{d:t}){t&&e.setAttribute("d",t)},initialProps:t,skip:e.skipAnimation,ref:e.ref})}({layout:e.layout??"vertical",hasNegative:e.hasNegative,hasPositive:e.hasPositive,xOrigin:e.xOrigin,yOrigin:e.yOrigin,x:n,y:r,width:i,height:o,borderRadius:e.borderRadius??0,skipAnimation:a});return!e.borderRadius||e.borderRadius<=0?null:(0,O.jsx)("clipPath",{id:t,children:(0,O.jsx)("path",{ref:s,d:l})})}function QA(e,t,n,r,i,o,a,s,l,c){if("vertical"===n){if(t&&e){const e=Math.min(c,o/2,a/2);return`M${r},${i+a/2} v${-(a/2-e)} a${e},${e} 0 0 1 ${e},${-e} h${o-2*e} a${e},${e} 0 0 1 ${e},${e} v${a-2*e} a${e},${e} 0 0 1 ${-e},${e} h${-(o-2*e)} a${e},${e} 0 0 1 ${-e},${-e} v${-(a/2-e)}`}const n=Math.min(c,o/2);if(t)return`M${r},${Math.max(l,i+n)} v${Math.min(0,-(l-i-n))} a${n},${n} 0 0 1 ${n},${-n} h${o-2*n} a${n},${n} 0 0 1 ${n},${n} v${Math.max(0,l-i-n)} Z`;if(e)return`M${r},${Math.min(l,i+a-n)} v${Math.max(0,a-n)} a${n},${n} 0 0 0 ${n},${n} h${o-2*n} a${n},${n} 0 0 0 ${n},${-n} v${-Math.max(0,a-n)} Z`}if("horizontal"===n){if(t&&e){const e=Math.min(c,o/2,a/2);return`M${r+o/2},${i} h${o/2-e} a${e},${e} 0 0 1 ${e},${e} v${a-2*e} a${e},${e} 0 0 1 ${-e},${e} h${-(o-2*e)} a${e},${e} 0 0 1 ${-e},${-e} v${-(a-2*e)} a${e},${e} 0 0 1 ${e},${-e} h${o/2-e}`}const n=Math.min(c,a/2);if(t)return`M${Math.min(s,r-n)},${i} h${o} a${n},${n} 0 0 1 ${n},${n} v${a-2*n} a${n},${n} 0 0 1 ${-n},${n} h${-o} Z`;if(e)return`M${Math.max(s,r+o+n)},${i} h${-o} a${n},${n} 0 0 0 ${-n},${n} v${a-2*n} a${n},${n} 0 0 0 ${n},${n} h${o} Z`}}const eO=["completedData","masksData","borderRadius","onItemClick","skipAnimation"];function tO(t){let{completedData:n,masksData:r,borderRadius:i,onItemClick:o,skipAnimation:a}=t,s=tt(t,eO);const c=XA(),u=!i||i<=0;return(0,O.jsxs)(e.Fragment,{children:[!u&&r.map(({id:e,x:t,y:n,xOrigin:r,yOrigin:o,width:s,height:l,hasPositive:c,hasNegative:u,layout:d})=>(0,O.jsx)(JA,{maskId:e,borderRadius:i,hasNegative:u,hasPositive:c,layout:d,x:t,y:n,xOrigin:r,yOrigin:o,width:s,height:l,skipAnimation:a??!1},e)),n.map(({seriesId:e,layout:t,xOrigin:n,yOrigin:r,data:i})=>(0,O.jsx)("g",{"data-series":e,className:c.series,children:i.map(({dataIndex:i,color:c,maskId:d,x:p,y:h,width:m,height:f})=>{const g=(0,O.jsx)(bP,l({id:e,dataIndex:i,color:c,skipAnimation:a??!1,layout:t??"vertical",x:p,xOrigin:n,y:h,yOrigin:r,width:m,height:f},s,{onClick:o&&(t=>{o(t,{type:"bar",seriesId:e,dataIndex:i})})}),i);return u?g:(0,O.jsx)("g",{clipPath:`url(#${d})`,children:g},i)})},e))]})}const nO=ae(ls,cs,ft,function({axis:e,axisIds:t},{axis:n,axisIds:r},i,o){const{series:a,stackingGroups:s=[]}=i?.bar??{},l=t[0],c=r[0];let u;for(let t=0;t=P&&v<=E){const e="horizontal"===r.layout?o.x:o.y,t=r.stackedData[b],n=g.scale(t[0]),a=g.scale(t[1]);if(null==n||null==a)continue;const s=Math.min(n,a),l=Math.max(n,a);e>=s&&e<=l&&(u={seriesId:i,dataIndex:b})}}}if(u)return{type:"bar",seriesId:u.seriesId,dataIndex:u.dataIndex}});function rO(e,t,n){let r=e.get(t);return r?r.push(n):(r=[n],e.set(t,r)),r}function iO(e,t){return function(e,t,n,r,i,o,a,s){const l=Math.min(i,n/2,r/2),c=Math.min(o,n/2,r/2),u=Math.min(a,n/2,r/2),d=Math.min(s,n/2,r/2);return`M${e+l},${t}\n h${n-l-c}\n a${c},${c} 0 0 1 ${c},${c}\n v${r-c-u}\n a${u},${u} 0 0 1 -${u},${u}\n h-${n-u-d}\n a${d},${d} 0 0 1 -${d},-${d}\n v-${r-d-l}\n a${l},${l} 0 0 1 ${l},-${l}\n Z`}(e.x,e.y,e.width,e.height,"left"===e.borderRadiusSide||"top"===e.borderRadiusSide?t:0,"right"===e.borderRadiusSide||"top"===e.borderRadiusSide?t:0,"right"===e.borderRadiusSide||"bottom"===e.borderRadiusSide?t:0,"left"===e.borderRadiusSide||"bottom"===e.borderRadiusSide?t:0)}const oO=["skipAnimation","layout","xOrigin","yOrigin"],aO=["children","layout","xOrigin","yOrigin"],sO=bm("g")({'&[data-faded="true"]':{opacity:.3},"& path":{pointerEvents:"none"}});function lO(e){let{skipAnimation:t,layout:n,xOrigin:r,yOrigin:i}=e,o=tt(e,oO);return t?(0,O.jsx)(sO,l({},o)):(0,O.jsx)(uO,l({},o,{layout:n,xOrigin:r,yOrigin:i}))}const cO=bm("rect")({"@keyframes scaleInX":{from:{transform:"scaleX(0)"},to:{transform:"scaleX(1)"}},"@keyframes scaleInY":{from:{transform:"scaleY(0)"},to:{transform:"scaleY(1)"}},animationDuration:`${_I}ms`,animationFillMode:"forwards",'&[data-orientation="horizontal"]':{animationName:"scaleInX"},'&[data-orientation="vertical"]':{animationName:"scaleInY"}});function uO(t){let{children:n,layout:r,xOrigin:i,yOrigin:o}=t,a=tt(t,aO);const s=zx().use(he),c=z(),u=[];return"horizontal"===r?(u.push((0,O.jsx)(cO,{"data-orientation":"horizontal",x:s.left,width:i-s.left,y:s.top,height:s.height,style:{transformOrigin:`${i}px ${s.top+s.height/2}px`}},"left")),u.push((0,O.jsx)(cO,{"data-orientation":"horizontal",x:i,width:s.left+s.width-i,y:s.top,height:s.height,style:{transformOrigin:`${i}px ${s.top+s.height/2}px`}},"right"))):(u.push((0,O.jsx)(cO,{"data-orientation":"vertical",x:s.left,width:s.width,y:s.top,height:o-s.top,style:{transformOrigin:`${s.left+s.width/2}px ${o}px`}},"top")),u.push((0,O.jsx)(cO,{"data-orientation":"vertical",x:s.left,width:s.width,y:o,height:s.top+s.height-o,style:{transformOrigin:`${s.left+s.width/2}px ${o}px`}},"bottom"))),(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)("clipPath",{id:c,children:u}),(0,O.jsx)(sO,l({clipPath:`url(#${c})`},a,{children:n}))]})}function dO({completedData:t,borderRadius:n=0,onItemClick:r,skipAnimation:i=!1}){const o=e.useRef(null),a=eI();return function(t,n,r){const{instance:i}=$x(),o=eI(),a=zx(),s=e.useRef(!1),l=e.useRef(void 0),c=ke(()=>n?.()),u=ke(()=>r?.());e.useEffect(()=>{const e=o.current;if(!e)return;function n(){s.current=!0}function r(){const e=l.current;e&&(l.current=void 0,i.removeTooltipItem(e),i.clearHighlight(),u())}function d(){s.current=!1,r()}const p=function(n){const o=xs(e,n);if(!i.isPointInside(o.x,o.y))return void r();const s=t(a.state,o);s?(i.setLastUpdateSource("pointer"),i.setTooltipItem(s),i.setHighlight(s),c(),l.current=s):r()};return e.addEventListener("pointerleave",d),e.addEventListener("pointermove",p),e.addEventListener("pointerenter",n),()=>{e.removeEventListener("pointerenter",n),e.removeEventListener("pointermove",p),e.removeEventListener("pointerleave",d),s.current&&d()}},[t,i,c,u,a,o])}(nO,r?()=>{const e=a.current;e&&null==o.current&&(o.current=e.style.cursor,e.style.cursor="pointer")}:void 0,r?()=>{const e=a.current;e&&null!=o.current&&(e.style.cursor=o.current,o.current=null)}:void 0),function(t){const{instance:n}=$x(),r=eI(),i=zx();e.useEffect(()=>{const e=r.current;if(!e||!t)return;let o=null;const a=function(r){let a=r;o&&Math.abs(r.clientX-o.clientX)<=1&&Math.abs(r.clientY-o.clientY)<=1&&(a={clientX:o.clientX,clientY:o.clientY}),o=null;const s=xs(e,a);if(!n.isPointInside(s.x,s.y))return;const l=nO(i.state,s);l&&t(r,{type:"bar",seriesId:l.seriesId,dataIndex:l.dataIndex})},s=function(e){o=e};return e.addEventListener("click",a),e.addEventListener("pointerup",s),()=>{e.removeEventListener("click",a),e.removeEventListener("pointerup",s)}},[n,t,i,r])}(r),(0,O.jsx)(e.Fragment,{children:t.map(e=>(0,O.jsx)(hO,{series:e,borderRadius:n,skipAnimation:i},e.seriesId))})}const pO=e.memo(fO);function hO({series:t,borderRadius:n,skipAnimation:r}){const i=XA(),{store:o}=$x(),a=o.use(jI,t.seriesId),s=o.use(LI,t.seriesId);return(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(lO,{className:i.series,"data-series":t.seriesId,layout:t.layout,xOrigin:t.xOrigin,yOrigin:t.yOrigin,skipAnimation:r,"data-faded":s||void 0,"data-highlighted":a||void 0,children:(0,O.jsx)(mO,{processedSeries:t,borderRadius:n})}),(0,O.jsx)(pO,{processedSeries:t,borderRadius:n})]})}function mO({processedSeries:t,borderRadius:n}){const r=function(e,t){const n=new Map,r=new Map;for(let i=0;i=1e3&&(rO(n,o.color,s.join("")),r.delete(o.color))}for(const[e,t]of r.entries())t.length>0&&rO(n,e,t.join(""));return n}(t,n),i=[];let o=0;for(const[e,t]of r.entries())for(const n of t)i.push((0,O.jsx)("path",{fill:e,d:n},o)),o+=1;return(0,O.jsx)(e.Fragment,{children:i})}function fO({processedSeries:t,borderRadius:n}){const{store:r}=$x(),i=r.use(DI,t.seriesId),o=r.use(RI,t.seriesId),a=null!=i&&t.data.find(e=>e.dataIndex===i)||null,s=null!=o&&t.data.find(e=>e.dataIndex===o)||null,l=[];return null!=a&&l.push((0,O.jsx)("path",{fill:a.color,filter:"brightness(120%)","data-highlighted":!0,d:iO(a,n)},`highlighted-${t.seriesId}`)),null!=s&&l.push((0,O.jsx)("path",{fill:s.color,d:iO(s,n)},`unfaded-${s.seriesId}`)),(0,O.jsx)(e.Fragment,{children:l})}const gO=["skipAnimation","onItemClick","borderRadius","barLabel","renderer"],yO=bm("g",{name:"MuiBarPlot",slot:"Root"})({[`& .${mP.root}`]:{transitionProperty:"opacity, fill",transitionDuration:`${_I}ms`,transitionTimingFunction:FI}});function vO(e){const{skipAnimation:t,onItemClick:n,borderRadius:r,barLabel:i,renderer:o}=e,a=tt(e,gO),s=bw(xw()||t),c=bw(t),{xAxis:u}=_x(),{yAxis:d}=Fx(),{completedData:p,masksData:h}=pP(Nx(),u,d),m=XA(),f="svg-batch"===o?dO:tO;return(0,O.jsxs)(yO,{className:m.root,children:[(0,O.jsx)(f,l({completedData:p,masksData:h,skipAnimation:"svg-batch"===o?c:s,onItemClick:n,borderRadius:r},a)),p.map(e=>(0,O.jsx)(KA,l({className:m.seriesLabels,processedSeries:e,skipAnimation:s,barLabel:i},a),e.seriesId))]})}const bO=["x","y","id","classes","color","shape"];function xO(e){return Xb("MuiHighlightElement",e)}function IO(e){const{x:t,y:n,color:r,shape:i}=e,o=tt(e,bO),a=(e=>{const{classes:t,id:n}=e;return uI({root:["root",`series-${n}`]},xO,t)})(e),s="circle"===i?"circle":"path",c="circle"===i?{cx:0,cy:0,r:void 0===o.r?5:o.r}:{d:Qk(Jk[eS(i)])()},u=F>18?{transformOrigin:`${t} ${n}`}:{"transform-origin":`${t} ${n}`};return(0,O.jsx)(s,l({pointerEvents:"none",className:a.root,transform:`translate(${t} ${n})`,fill:r},u,c,o))}Zb("MuiHighlightElement",["root"]);const wO=["slots","slotProps"];function kO(e){const{slots:t,slotProps:n}=e,r=tt(e,wO),i=lk(),{xAxis:o,xAxisIds:a}=_x(),{yAxis:s,yAxisIds:c}=Fx(),{instance:u}=$x(),d=zx().use(sS);if(0===d.length)return null;if(void 0===i)return null;const{series:p,stackingGroups:h}=i,m=a[0],f=c[0],g=t?.lineHighlight??IO;return(0,O.jsx)("g",l({},r,{children:d.flatMap(({dataIndex:e,axisId:t})=>h.flatMap(({ids:r})=>r.flatMap(r=>{const{xAxisId:i=m,yAxisId:a=f,stackedData:c,data:d,disableHighlight:h,shape:y="circle"}=p[r];if(h||null==d[e])return null;if(t!==i)return null;const v=ck(o[i].scale),b=s[a].scale,x=o[i].data;if(void 0===x)throw new Error(`MUI X Charts: ${i===W?"The first `xAxis`":`The x-axis with id "${i}"`} should have data property to be able to display a line plot.`);const I=v(x[e]),w=b(c[e][1]);if(!u.isPointInside(I,w))return null;const k=$l(p[r],o[i],s[a]);return(0,O.jsx)(g,l({id:r,color:k(e),x:I,y:w,shape:y},n?.lineHighlight),`${r}`)})))}))}function SO(e){const{children:t,localeText:n,chartProviderProps:r,slots:i,slotProps:o}=Tx(e);return(0,O.jsx)(oc,l({},r,{children:(0,O.jsx)(_h,{localeText:n,children:(0,O.jsx)(lc,{slots:i,slotProps:o,defaultSlots:bv,children:t})})}))}function MO(){return zx().use(iI)}function CO(){const e=xm(),t=MO(),n=lk(),{xAxis:r,xAxisIds:i}=_x(),{yAxis:o,yAxisIds:a}=Fx();if(null===t||"line"!==t.type||!n)return null;const s=n.series[t.seriesId];if(null==s.data[t.dataIndex])return null;const l=s.xAxisId??i[0],c=s.yAxisId??a[0];return(0,O.jsx)("rect",{fill:"none",stroke:(e.vars??e).palette.text.primary,strokeWidth:2,x:r[l].scale(r[l].data[t.dataIndex])-6,y:o[c].scale(s.stackedData[t.dataIndex][1])-6,width:12,height:12,rx:3,ry:3})}const PO=["xAxis","yAxis","width","height","margin","color","baseline","sx","showTooltip","showHighlight","axisHighlight","children","slots","slotProps","data","plotType","valueFormatter","area","curve","className","disableClipping","clipAreaOffset","onHighlightChange","onHighlightedAxisChange","highlightedAxis","highlightedItem"],EO=5,TO=e.forwardRef(function(t,n){const{xAxis:r,yAxis:i,width:o,height:a,margin:s=EO,color:c,baseline:u,sx:d,showTooltip:p,showHighlight:h,axisHighlight:m,children:f,slots:g,slotProps:y,data:v,plotType:b="line",valueFormatter:x=e=>null===e?"":e.toString(),area:I,curve:w="linear",className:k,disableClipping:S,clipAreaOffset:M,onHighlightChange:C,onHighlightedAxisChange:P,highlightedAxis:E,highlightedItem:T}=t,A=tt(t,PO),j=`${z()}-clip-path`,L=e.useMemo(()=>({top:M?.top??1,right:M?.right??1,bottom:M?.bottom??1,left:M?.left??1}),[M?.bottom,M?.left,M?.right,M?.top]),R=e.useMemo(()=>h&&"bar"===b?{x:"band"}:{x:"none"},[b,h]),D=e.useMemo(()=>l({},R,m),[R,m]),$=t.slots?.tooltip??LC,N=e.useMemo(()=>{if(null!=c)return"function"==typeof c?e=>[c(e)]:[c]},[c]),_=e.useMemo(()=>[l({type:b,data:v,valueFormatter:x},"bar"===b?{}:{area:I,curve:w,baseline:u,disableHighlight:!h})],[I,u,w,v,b,h,x]),F=e.useMemo(()=>[l({id:W,scaleType:"bar"===b?"band":"point",hideTooltip:void 0===r},r,{data:r?.data??Array.from({length:v.length},(e,t)=>t),position:"none"})],[v.length,b,r]),H=e.useMemo(()=>[l({id:G},i,{position:"none"})],[i]);return(0,O.jsxs)(SO,{series:_,width:o,height:a,margin:s,xAxis:F,yAxis:H,colors:N,disableAxisListener:void 0===P&&(!p||"axis"!==y?.tooltip?.trigger)&&"none"===D?.x&&"none"===D?.y,onHighlightChange:C,onHighlightedAxisChange:P,highlightedAxis:E,highlightedItem:T,children:[(0,O.jsxs)(mI,l({className:k,ref:n,sx:d},A,{children:[(0,O.jsxs)("g",{clipPath:`url(#${j})`,children:["bar"===b&&(0,O.jsx)(vO,{skipAnimation:!0,slots:g,slotProps:y}),"line"===b&&(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(gk,{skipAnimation:!0,slots:g,slotProps:y}),(0,O.jsx)(Ek,{skipAnimation:!0,slots:g,slotProps:y})]})]}),"line"===b&&(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(kO,{slots:g,slotProps:y}),(0,O.jsx)(CO,{})]}),S?null:(0,O.jsx)(ZC,{id:j,offset:L}),(0,O.jsx)(_C,l({},D)),f]})),p&&(0,O.jsx)($,l({},t.slotProps?.tooltip))]})});function AO(e){return AO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},AO(e)}function OO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jO(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);no[e].position&&"none"!==o[e].position?(0,O.jsx)(gM,{slots:n,slotProps:r,axisId:e},e):null),a.map(e=>s[e].position&&"none"!==s[e].position?(0,O.jsx)(OM,{slots:n,slotProps:r,axisId:e},e):null)]})}DO.propTypes={id:i().string,data:i().arrayOf(i().number).isRequired,plotType:i().oneOf(["line","bar"]),width:i().number,height:i().number,color:i().string,colors:i().arrayOf(i().string),area:i().bool,curve:i().oneOf(["linear","monotoneX","monotoneY","natural","step","stepBefore","stepAfter","catmullRom","bumpX","bumpY"]),showTooltip:i().bool,showHighlight:i().bool,margin:i().shape({top:i().number,right:i().number,bottom:i().number,left:i().number}),xAxis:i().shape({id:i().string,data:i().array,scaleType:i().oneOf(["band","point","linear","log","time"])}),yAxis:i().shape({min:i().number,max:i().number}),axisHighlight:i().shape({x:i().oneOf(["line","band","none"]),y:i().oneOf(["line","band","none"])}),slotProps:i().object,clipAreaOffset:i().shape({top:i().number,right:i().number,bottom:i().number,left:i().number}),baseline:i().oneOfType([i().oneOf(["min","max"]),i().number]),strokeWidth:i().number,disableClipping:i().bool,highlightedIndex:i().number,highlightedItem:i().object,hoverIndex:i().number,hoverValue:i().number,n_hovers:i().number,setProps:i().func};const zO=e=>"start"===e?.horizontal?"start":"end"===e?.horizontal?"end":"center",NO=e=>"top"===e?.vertical?"flex-start":"bottom"===e?.vertical?"flex-end":"center",_O=bm("div",{name:"MuiChartsWrapper",slot:"Root",shouldForwardProp:e=>QE(e)&&"extendVertically"!==e&&"width"!==e})(({ownerState:e,width:t})=>{const n=((e=!1,t="horizontal",n="end",r)=>{const i=r?"auto":"1fr";return"horizontal"===t||e?i:"start"===n?`auto ${i}`:`${i} auto`})(e.hideLegend,e.legendDirection,e.legendPosition?.horizontal,t),r=((e=!1,t="horizontal",n="top")=>{const r="1fr";return"vertical"===t||e?r:"bottom"===n?`${r} auto`:`auto ${r}`})(e.hideLegend,e.legendDirection,e.legendPosition?.vertical),i=((e,t,n)=>e?'"chart"':"vertical"===t?"start"===n?.horizontal?'"legend chart"':'"chart legend"':"bottom"===n?.vertical?'"chart"\n "legend"':'"legend"\n "chart"')(e.hideLegend,e.legendDirection,e.legendPosition);return{variants:[{props:{extendVertically:!0},style:{height:"100%",minHeight:0}}],flex:1,display:"grid",gridTemplateColumns:n,gridTemplateRows:r,gridTemplateAreas:i,[`&:has(.${Jb.root})`]:{gridTemplateRows:`auto ${r}`,gridTemplateAreas:`"${n.split(" ").map(()=>"toolbar").join(" ")}"\n ${i}`},[`& .${Jb.root}`]:{gridArea:"toolbar",justifySelf:"center"},justifyContent:"safe center",justifyItems:zO(e.legendPosition),alignItems:NO(e.legendPosition)}});function FO(e){const{children:t,sx:n,extendVertically:r}=e,i=$x().chartRootRef,o=zx(),a=o.use(ge),s=o.use(ye);return(0,O.jsx)(_O,{ref:i,ownerState:e,sx:n,extendVertically:r??void 0===s,width:a,children:t})}const HO=["message"],BO=bm("text",{slot:"internal",shouldForwardProp:void 0})(({theme:e})=>l({},e.typography.body2,{stroke:"none",fill:(e.vars||e).palette.text.primary,shapeRendering:"crispEdges",textAnchor:"middle",dominantBaseline:"middle"}));function VO(e){const{message:t}=e,n=tt(e,HO),{top:r,left:i,height:o,width:a}=Nx(),{localeText:s}=rA();return(0,O.jsx)(BO,l({x:i+a/2,y:r+o/2},n,{children:t??s.loading}))}const UO=["message"],YO=bm("text",{slot:"internal",shouldForwardProp:void 0})(({theme:e})=>l({},e.typography.body2,{stroke:"none",fill:(e.vars||e).palette.text.primary,shapeRendering:"crispEdges",textAnchor:"middle",dominantBaseline:"middle"}));function WO(e){const{message:t}=e,n=tt(e,UO),{top:r,left:i,height:o,width:a}=Nx(),{localeText:s}=rA();return(0,O.jsx)(YO,l({x:i+a/2,y:r+o/2},n,{children:t??s.noData}))}function GO(e){const t=function(){const e=UM();return Object.values(e).every(e=>{if(!e)return!0;const{series:t,seriesOrder:n}=e;return n.every(e=>{const n=t[e];return"sankey"===n.type?0===n.data.links.length:0===n.data.length})})}();if(e.loading){const t=e.slots?.loadingOverlay??VO;return(0,O.jsx)(t,l({},e.slotProps?.loadingOverlay))}if(t){const t=e.slots?.noDataOverlay??WO;return(0,O.jsx)(t,l({},e.slotProps?.noDataOverlay))}return null}function KO(e){return Xb("MuiChartsLabelGradient",e)}const qO=Zb("MuiChartsLabelGradient",["root","vertical","horizontal","mask","fill"]),XO=["gradientId","direction","classes","className","rotate","reverse","thickness"],ZO=bm("div",{name:"MuiChartsLabelGradient",slot:"Root"})(({ownerState:e})=>{const t=((e,t,n,r)=>{const i=("vertical"===e?-90:0)+(n?90:0)+(t?180:0);return r&&"vertical"!==e?i+180:i})(e.direction,e.reverse,e.rotate,e.isRtl);return{display:"flex",alignItems:"center",justifyContent:"center",[`.${qO.mask}`]:{borderRadius:2,overflow:"hidden"},[`&.${qO.horizontal}`]:{width:"100%",[`.${qO.mask}`]:{height:e.thickness,width:"100%"}},[`&.${qO.vertical}`]:{height:"100%",[`.${qO.mask}`]:{width:e.thickness,height:"100%","> svg":{height:"100%"}}},svg:{transform:`rotate(${t}deg)`,display:"block"}}}),JO=oC("MuiChartsLabelGradient",{defaultProps:{direction:"horizontal",thickness:12},classesResolver:e=>{const{direction:t}=e;return uI({root:["root",t],mask:["mask"],fill:["fill"]},KO,e.classes)}},function(e,t){const{gradientId:n,classes:r,className:i}=e,o=tt(e,XO),a=fS();return(0,O.jsx)(ZO,l({className:Hh(r?.root,i),ownerState:l({},e,{isRtl:a}),"aria-hidden":"true",ref:t},o,{children:(0,O.jsx)("div",{className:r?.mask,children:(0,O.jsx)("svg",{viewBox:"0 0 24 24",children:(0,O.jsx)("rect",{className:r?.fill,width:"24",height:"24",fill:`url(#${n})`})})})}))});function QO(e){return Xb("MuiContinuousColorLegend",e)}const ej=Zb("MuiContinuousColorLegend",["root","minLabel","maxLabel","gradient","vertical","horizontal","start","end","extremes","label"]),tj=["minLabel","maxLabel","direction","axisDirection","axisId","rotateGradient","reverse","classes","className","gradientId","labelPosition","thickness"],nj=e=>{const t=e?"max-label":"min-label",n=e?"min-label":"max-label";return{row:{start:`\n '${t} . ${n}'\n 'gradient gradient gradient'\n `,end:`\n 'gradient gradient gradient'\n '${t} . ${n}'\n `,extremes:`\n '${t} gradient ${n}'\n `},column:{start:`\n '${n} gradient'\n '. gradient'\n '${t} gradient'\n `,end:`\n 'gradient ${n}'\n 'gradient .'\n 'gradient ${t}'\n `,extremes:`\n '${n}'\n 'gradient'\n '${t}'\n `}}},rj=bm("ul",{name:"MuiContinuousColorLegend",slot:"Root"})(({theme:e,ownerState:t})=>l({},e.typography.caption,{color:(e.vars||e).palette.text.primary,lineHeight:"100%",display:"grid",flexShrink:0,gap:e.spacing(.5),listStyleType:"none",paddingInlineStart:0,marginBlock:e.spacing(1),marginInline:e.spacing(1),gridArea:"legend",[`&.${ej.horizontal}`]:{gridTemplateRows:"min-content min-content",gridTemplateColumns:"min-content auto min-content",[`&.${ej.start}`]:{gridTemplateAreas:nj(t.reverse).row.start},[`&.${ej.end}`]:{gridTemplateAreas:nj(t.reverse).row.end},[`&.${ej.extremes}`]:{gridTemplateAreas:nj(t.reverse).row.extremes,gridTemplateRows:"min-content",alignItems:"center"}},[`&.${ej.vertical}`]:{gridTemplateRows:"min-content auto min-content",gridTemplateColumns:"min-content min-content",[`&.${ej.start}`]:{gridTemplateAreas:nj(t.reverse).column.start,[`.${ej.maxLabel}, .${ej.minLabel}`]:{justifySelf:"end"}},[`&.${ej.end}`]:{gridTemplateAreas:nj(t.reverse).column.end,[`.${ej.maxLabel}, .${ej.minLabel}`]:{justifySelf:"start"}},[`&.${ej.extremes}`]:{gridTemplateAreas:nj(t.reverse).column.extremes,gridTemplateColumns:"min-content",[`.${ej.maxLabel}, .${ej.minLabel}`]:{justifySelf:"center"}}},[`.${ej.gradient}`]:{gridArea:"gradient"},[`.${ej.maxLabel}`]:{gridArea:"max-label"},[`.${ej.minLabel}`]:{gridArea:"min-label"}})),ij=(e,t,n)=>"string"==typeof e?e:e?.({value:t,formattedValue:n})??n,oj=oC("MuiContinuousColorLegend",{defaultProps:{direction:"horizontal",labelPosition:"end",axisDirection:"z"},classesResolver:e=>{const{classes:t,direction:n,labelPosition:r}=e;return uI({root:["root",n,r],minLabel:["minLabel"],maxLabel:["maxLabel"],gradient:["gradient"],mark:["mark"],label:["label"]},QO,t)}},function(e,t){const{minLabel:n,maxLabel:r,direction:i,axisDirection:o,axisId:a,rotateGradient:s,reverse:c,classes:u,className:d,gradientId:p,thickness:h}=e,m=tt(e,tj),f=Jx(),g=function({axisDirection:e,axisId:t}){const{xAxis:n,xAxisIds:r}=_x(),{yAxis:i,yAxisIds:o}=Fx(),{zAxis:a,zAxisIds:s}=Kx();switch(e){case"x":return n["string"==typeof t?t:r[t??0]];case"y":return i["string"==typeof t?t:o[t??0]];default:return a["string"==typeof t?t:s[t??0]]}}({axisDirection:o,axisId:a}),y=g?.colorMap;if(!y||!y.type||"continuous"!==y.type)return null;const v=y.min??0,b=y.max??100,x=void 0===g.scale?void 0:g.valueFormatter,I=x?x(v,{location:"legend"}):v.toLocaleString(),w=x?x(b,{location:"legend"}):b.toLocaleString(),k=ij(n,v,I),S=ij(r,b,w),M=(0,O.jsx)("li",{className:u?.minLabel,children:(0,O.jsx)(GC,{className:u?.label,children:k})}),C=(0,O.jsx)("li",{className:u?.maxLabel,children:(0,O.jsx)(GC,{className:u?.label,children:S})});return(0,O.jsxs)(rj,l({className:Hh(u?.root,d),ref:t},m,{ownerState:e,children:[c?C:M,(0,O.jsx)("li",{className:u?.gradient,children:(0,O.jsx)(JO,{direction:i,rotate:s,reverse:c,thickness:h,gradientId:p??f(g.id)})}),c?M:C]}))});function aj(){return ak("heatmap")}const sj=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t},lj=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=Hh(n?.className,o,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},a={...n,...i,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}({...i,...r}),s=sj(r),l=sj(i),c=t(a),u=Hh(c?.className,n?.className,o,i?.className,r?.className),d={...c?.style,...n?.style,...i?.style,...r?.style},p={...c,...n,...l,...s};return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}};function cj(e){return["highlighted","faded"].includes(e)?IT("Charts",e):IT("MuiHeatmap",e)}l({},wT("MuiHeatmap",["cell","series"]),{highlighted:"Charts-highlighted",faded:"Charts-faded"});const uj=["seriesId","dataIndex","color","value","isHighlighted","isFaded","slotProps","slots"],dj=bm("rect",{name:"MuiHeatmap",slot:"Cell",overridesResolver:(e,t)=>t.arc})(({ownerState:e})=>({filter:(e.isHighlighted?"saturate(120%)":e.isFaded&&"saturate(80%)")||void 0,fill:e.color,shapeRendering:"crispEdges"}));function pj(e){const{seriesId:t,dataIndex:n,color:r,value:i,isHighlighted:o=!1,isFaded:a=!1,slotProps:s={},slots:c={}}=e,u=tt(e,uj),d=bI({type:"heatmap",seriesId:t,dataIndex:n}),p={seriesId:t,dataIndex:n,color:r,value:i,isFaded:a,isHighlighted:o},h=(e=>{const{classes:t,seriesId:n,isFaded:r,isHighlighted:i}=e;return lT({cell:["cell",`series-${n}`,r&&"faded",i&&"highlighted"]},cj,t)})(p),m=c?.cell??dj,f=function(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,a=i?{}:function(e,t){return"function"==typeof e?e(t,void 0):e}(n,r),{props:s,internalRef:l}=lj({...o,externalSlotProps:a});return function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(t,{...s,ref:vT(l,a?.ref,e.additionalProps?.ref)},r)}({elementType:m,additionalProps:d,externalForwardedProps:l({},u),externalSlotProps:s.cell,ownerState:p,className:h.cell});return(0,O.jsx)(m,l({},f))}function hj(e){const t=zx(),n=uk(),r=dk(),i=function(e){const t=function(e){const{zAxis:t,zAxisIds:n}=Kx();return t["string"==typeof e?e:n[e??0]]}(e);return t.colorScale}(),o=aj(),a=t.use(TI),s=t.use(AI),l=n.domain(),c=r.domain();if(!o||0===o.seriesOrder.length)return null;const u=o.series[o.seriesOrder[0]];return(0,O.jsx)("g",{children:u.data.map(([t,d,p],h)=>{const m=n(l[t]),f=r(c[d]),g=i?.(p);if(void 0===m||void 0===f||!g)return null;const y={seriesId:u.id,dataIndex:h};return(0,O.jsx)(pj,{width:n.bandwidth(),height:r.bandwidth(),x:m,y:f,color:g,dataIndex:h,seriesId:o.seriesOrder[0],value:p,slots:e.slots,slotProps:e.slotProps,isHighlighted:a(y),isFaded:s(y)},`${t}_${d}`)})})}const mj=e=>{const{axis:t}=e;return[Math.min(...t.data??[]),Math.max(...t.data??[])]},fj={seriesProcessor:e=>{const{series:t,seriesOrder:n}=e,r={};return Object.keys(t).forEach(e=>{r[e]=l({valueFormatter:e=>e[2].toString(),data:[],labelMarkType:"square"},t[e])}),{series:r,seriesOrder:n}},colorProcessor:(e,t,n,r)=>{const i=r?.colorScale;return i?t=>{const n=e.data[t],r=i(n[2]);return null===r?"":r}:()=>""},legendGetter:()=>[],tooltipGetter:e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||void 0===r.dataIndex)return null;const i=yl(t.label,"tooltip"),o=t.data[r.dataIndex],a=t.valueFormatter(o,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:i,value:o,formattedValue:a,markType:t.labelMarkType}},tooltipItemPositionGetter:e=>{const{series:t,identifier:n,axesConfig:r,placement:i}=e;if(!n||void 0===n.dataIndex)return null;const o=t.heatmap?.series[n.seriesId];if(null==o)return null;if(void 0===r.x||void 0===r.y||!Et(r.x)||!Et(r.y))return null;const[a,s]=o.data[n.dataIndex],l=r.x.scale(r.x.scale.domain()[a]),c=r.y.scale(r.y.scale.domain()[s]);if(void 0===l||void 0===c)return null;const u=r.x.scale.bandwidth(),d=r.y.scale.bandwidth();switch(i){case"bottom":return{x:l+u/2,y:c+d};case"left":return{x:l,y:c+d/2};case"right":return{x:l+u,y:c+d/2};default:return{x:l+u/2,y:c}}},xExtremumGetter:mj,yExtremumGetter:mj,getSeriesWithDefaultValues:(e,t,n)=>l({color:n[t%n.length]},e,{id:e.id??`auto-generated-id-${t}`}),identifierSerializer:jl},gj=bm("caption",{name:"MuiChartsHeatmapTooltip",slot:"AxesValue"})(({theme:e})=>({textAlign:"start",whiteSpace:"nowrap",padding:e.spacing(.5,1.5),color:(e.vars||e).palette.text.secondary,borderBottom:`solid ${(e.vars||e).palette.divider} 1px`,"& span":{marginRight:e.spacing(1.5)}})),yj=e=>{const{classes:t}=e;return lT({root:["root"],paper:["paper"],table:["table"],row:["row"],cell:["cell"],mark:["mark"],markContainer:["markContainer"],labelCell:["labelCell"],valueCell:["valueCell"]},HM,t)};function vj(e){const t=yj(e),n=Hx(),r=Bx(),i=aj(),o=ZM();if(!o||!i||0===i.seriesOrder.length)return null;const{series:a,seriesOrder:s}=i,l=s[0],{color:c,value:u,identifier:d,markType:p}=o,[h,m]=u,f=n.valueFormatter?.(n.data[h],{location:"tooltip",scale:n.scale})??n.data[h].toLocaleString(),g=r.valueFormatter?.(r.data[m],{location:"tooltip",scale:r.scale})??r.data[m].toLocaleString(),y=a[l].valueFormatter(u,{dataIndex:d.dataIndex}),v=yl(a[l].label,"tooltip");return(0,O.jsx)(JM,{className:t.paper,children:(0,O.jsxs)(QM,{className:t.table,children:[(0,O.jsxs)(gj,{children:[(0,O.jsx)("span",{children:f}),(0,O.jsx)("span",{children:g})]}),(0,O.jsx)("tbody",{children:(0,O.jsxs)(eC,{className:t.row,children:[(0,O.jsxs)(tC,{className:Hh(t.labelCell,t.cell),component:"th",children:[(0,O.jsx)("div",{className:t.markContainer,children:(0,O.jsx)(lC,{type:p,color:c,className:t.mark})}),v]}),(0,O.jsx)(tC,{className:Hh(t.valueCell,t.cell),component:"td",children:y})]})})]})})}function bj(e){const t=yj({classes:e.classes});return(0,O.jsx)(jC,l({trigger:"item"},e,{classes:t,children:(0,O.jsx)(vj,{classes:t})}))}const xj=[Xs,Ys,Ws,Bs,Zs,tx,Mb,Ix],Ij=Cn(["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]),wj={heatmap:fj};function kj(e,t){return void 0===e?.[0]?.data||0===e[0].data.length?[]:Array.from({length:Math.max(...e[0].data.map(e=>e[t]))+1},(e,t)=>t)}const Sj=e=>kj(e,0),Mj=e=>kj(e,1),Cj=e.forwardRef(function(t,n){const r=Lh({props:t,name:"MuiHeatmap"}),{apiRef:i,xAxis:o,yAxis:a,zAxis:s,series:c,width:u,height:d,margin:p,colors:h,dataset:m,sx:f,onAxisClick:g,children:y,slots:v,slotProps:b,loading:x,highlightedItem:I,onHighlightChange:w,hideLegend:k=!0,showToolbar:S=!1}=r,M=`${iP()}-clip-path`,C=e.useMemo(()=>(o&&o.length>0?o:[{id:W}]).map(e=>l({scaleType:"band",categoryGapRatio:0},e,{data:e.data??Sj(c)})),[c,o]),P=e.useMemo(()=>(a&&a.length>0?a:[{id:G}]).map(e=>l({scaleType:"band",categoryGapRatio:0},e,{data:e.data??Mj(c)})),[c,a]),E=e.useMemo(()=>s??[{colorMap:{type:"continuous",min:0,max:100,color:Ij}}],[s]),T={sx:f,legendPosition:r.slotProps?.legend?.position,legendDirection:r.slotProps?.legend?.direction,hideLegend:k},A=v?.tooltip??bj,j=v?.toolbar??kA;return(0,O.jsx)(Rx,{apiRef:i,seriesConfig:wj,series:c.map(e=>l({type:"heatmap"},e)),width:u,height:d,margin:p,xAxis:C,yAxis:P,zAxis:E,colors:h,dataset:m,disableAxisListener:!0,highlightedItem:I,onHighlightChange:w,onAxisClick:g,plugins:xj,children:(0,O.jsxs)(FO,l({},T,{children:[S?(0,O.jsx)(j,l({},r.slotProps?.toolbar)):null,!k&&(0,O.jsx)(XC,{slots:l({},v,{legend:v?.legend??oj}),slotProps:{legend:l({labelPosition:"extremes"},b?.legend)},sx:"vertical"===b?.legend?.direction?{height:150}:{width:"50%"}}),(0,O.jsxs)(mI,{ref:n,sx:f,children:[(0,O.jsxs)("g",{clipPath:`url(#${M})`,children:[(0,O.jsx)(hj,{slots:v,slotProps:b}),(0,O.jsx)(GO,{loading:x,slots:v,slotProps:b})]}),(0,O.jsx)($O,{slots:v,slotProps:b}),(0,O.jsx)(ZC,{id:M}),(0,O.jsx)(WT,{}),y]}),!x&&(0,O.jsx)(A,l({},b?.tooltip))]}))})});var Pj=["x","y","width","height","ownerState","onCellClick"],Ej=["x","y","width","height","ownerState","cellConfig","onCellClick"];function Tj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Aj(e){for(var t=1;tA*A+O*O&&(S=C,M=P),{cx:S,cy:M,x01:-u,y01:-d,x11:S*(i/I-1),y11:M*(i/I-1)}}function Yj(){var e=_j,t=Fj,n=rl(0),r=null,i=Hj,o=Bj,a=Vj,s=null,l=Tw(c);function c(){var c,u,d,p=+e.apply(this,arguments),h=+t.apply(this,arguments),m=i.apply(this,arguments)-Xl,f=o.apply(this,arguments)-Xl,g=Hl(f-m),y=f>m;if(s||(s=c=l()),hKl)if(g>Zl-Kl)s.moveTo(h*Vl(m),h*Wl(m)),s.arc(0,0,h,m,f,!y),p>Kl&&(s.moveTo(p*Vl(f),p*Wl(f)),s.arc(0,0,p,f,m,y));else{var v,b,x=m,I=f,w=m,k=f,S=g,M=g,C=a.apply(this,arguments)/2,P=C>Kl&&(r?+r.apply(this,arguments):Gl(p*p+h*h)),E=Yl(Hl(h-p)/2,+n.apply(this,arguments)),T=E,A=E;if(P>Kl){var O=Jl(P/p*Wl(C)),j=Jl(P/h*Wl(C));(S-=2*O)>Kl?(w+=O*=y?1:-1,k-=O):(S=0,w=k=(m+f)/2),(M-=2*j)>Kl?(x+=j*=y?1:-1,I-=j):(M=0,x=I=(m+f)/2)}var L=h*Vl(x),R=h*Wl(x),D=p*Vl(k),$=p*Wl(k);if(E>Kl){var z,N=h*Vl(I),_=h*Wl(I),F=p*Vl(w),H=p*Wl(w);if(g1?0:d<-1?ql:Math.acos(d))/2),G=Gl(z[0]*z[0]+z[1]*z[1]);T=Yl(E,(p-G)/(W-1)),A=Yl(E,(h-G)/(W+1))}else T=A=0}M>Kl?A>Kl?(v=Uj(F,H,L,R,h,A,y),b=Uj(N,_,D,$,h,A,y),s.moveTo(v.cx+v.x01,v.cy+v.y01),AKl&&S>Kl?T>Kl?(v=Uj(D,$,N,_,p,-T,y),b=Uj(L,R,F,H,p,-T,y),s.lineTo(v.cx+v.x01,v.cy+v.y01),T({startAngle:n(e),endAngle:r(e),innerRadius:i(e),outerRadius:o(e),paddingAngle:a(e),cornerRadius:s(e)})}Nj.propTypes={id:i().string,licenseKey:i().string,data:i().arrayOf(i().arrayOf(i().number)),xAxis:i().shape({data:i().array,label:i().string,scaleType:i().oneOf(["band","point"]),zoom:i().oneOfType([i().bool,i().object])}),yAxis:i().shape({data:i().array,label:i().string,scaleType:i().oneOf(["band","point"]),zoom:i().oneOfType([i().bool,i().object])}),colorScale:i().shape({type:i().oneOf(["continuous","piecewise"]),min:i().number,max:i().number,colors:i().arrayOf(i().string),thresholds:i().arrayOf(i().number)}),width:i().number,height:i().number,margin:i().shape({top:i().number,right:i().number,bottom:i().number,left:i().number}),hideLegend:i().bool,tooltip:i().shape({trigger:i().oneOf(["item","none"])}),highlightScope:i().shape({highlight:i().oneOf(["item","none"]),fade:i().oneOf(["global","none"])}),cellStyle:i().oneOfType([i().oneOf(["rounded"]),i().shape({gap:i().number,borderRadius:i().number,showValue:i().bool,fontSize:i().number,fontWeight:i().number,textColor:i().string})]),slotProps:i().object,highlightedItem:i().object,clickData:i().object,n_clicks:i().number,setProps:i().func};const Gj=["className","classes","color","dataIndex","id","isFaded","isHighlighted","isFocused","onClick","cornerRadius","startAngle","endAngle","innerRadius","outerRadius","paddingAngle","skipAnimation","stroke","skipInteraction"];function Kj(e){return Xb("MuiPieArc",e)}const qj=Zb("MuiPieArc",["root","highlighted","faded","series","focusIndicator"]),Xj=bm("path",{name:"MuiPieArc",slot:"Root",overridesResolver:(e,t)=>t.arc})({transitionProperty:"opacity, fill, filter",transitionDuration:`${_I}ms`,transitionTimingFunction:FI}),Zj=e.forwardRef(function(e,t){const{className:n,classes:r,color:i,dataIndex:o,id:a,isFaded:s,isHighlighted:c,isFocused:u,onClick:d,cornerRadius:p,startAngle:h,endAngle:m,innerRadius:f,outerRadius:g,paddingAngle:y,skipAnimation:v,stroke:b,skipInteraction:x}=e,I=tt(e,Gj),w=xm(),k=b??(w.vars||w).palette.background.paper,S={id:a,dataIndex:o,classes:r,color:i,isFaded:s,isHighlighted:c,isFocused:u},M=(e=>{const{classes:t,id:n,isFaded:r,isHighlighted:i,dataIndex:o}=e;return uI({root:["root",`series-${n}`,`data-index-${o}`,i&&"highlighted",r&&"faded"]},Kj,t)})(S),C=bI({type:"pie",seriesId:a,dataIndex:o},x),P=function(e){const t={startAngle:(e.startAngle+e.endAngle)/2,endAngle:(e.startAngle+e.endAngle)/2,innerRadius:e.innerRadius,outerRadius:e.outerRadius,paddingAngle:e.paddingAngle,cornerRadius:e.cornerRadius};return aw({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,paddingAngle:e.paddingAngle,cornerRadius:e.cornerRadius},{createInterpolator:Wj,transformProps:e=>({d:Yj().cornerRadius(e.cornerRadius)({padAngle:e.paddingAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle}),visibility:e.startAngle===e.endAngle?"hidden":"visible"}),applyProps(e,t){e.setAttribute("d",t.d),e.setAttribute("visibility",t.visibility)},initialProps:t,skip:e.skipAnimation,ref:e.ref})}({cornerRadius:p,startAngle:h,endAngle:m,innerRadius:f,outerRadius:g,paddingAngle:y,skipAnimation:v,ref:t});return(0,O.jsx)(Xj,l({onClick:d,cursor:d?"pointer":"unset",ownerState:S,className:Hh(M.root,n),fill:S.color,opacity:S.isFaded?.3:1,filter:S.isHighlighted?"brightness(120%)":"none",stroke:k,strokeWidth:1,strokeLinejoin:"round","data-highlighted":S.isHighlighted||void 0,"data-faded":S.isFaded||void 0},I,C,P))});function Jj(e,t,n,r){const{faded:i,highlighted:o,paddingAngle:a=0,cornerRadius:s=0}=e,{radius:{inner:c=0,label:u,outer:d}}=t,p=l({additionalRadius:0},r&&i||n&&o||{}),h=Math.max(0,Ql(p.paddingAngle??a)),m=Math.max(0,p.innerRadius??c),f=Math.max(0,p.outerRadius??d+p.additionalRadius);return{paddingAngle:h,innerRadius:m,outerRadius:f,cornerRadius:p.cornerRadius??s,arcLabelRadius:p.arcLabelRadius??u??(m+f)/2}}function Qj(t){const{id:n,data:r,faded:i,highlighted:o}=t,{isFaded:a,isHighlighted:s}=iS(),c=function(){const e=MO();return t=>null!==e&&Us(e,t)}();return e.useMemo(()=>r.map((e,r)=>{const u={seriesId:n,dataIndex:r},d=s(u),p=!d&&a(u),h=c({type:"pie",seriesId:n,dataIndex:r}),m=Jj(t,{radius:{inner:t.innerRadius??0,outer:t.outerRadius,label:t.arcLabelRadius??0,available:0}},d,p),f=l({additionalRadius:0},p&&i||d&&o||{});return l({},e,f,{dataIndex:r,isFaded:p,isHighlighted:d,isFocused:h},m)}),[r,n,s,a,c,t,i,o])}const eL=["slots","slotProps","innerRadius","outerRadius","cornerRadius","paddingAngle","id","highlighted","faded","data","onItemClick","skipAnimation"];function tL(e){const{slots:t,slotProps:n,innerRadius:r=0,outerRadius:i,cornerRadius:o=0,paddingAngle:a=0,id:s,highlighted:c,faded:u={additionalRadius:-5},data:d,onItemClick:p,skipAnimation:h}=e,m=tt(e,eL),f=Qj({innerRadius:r,outerRadius:i,cornerRadius:o,paddingAngle:a,id:s,highlighted:c,faded:u,data:d});if(0===d.length)return null;const g=t?.pieArc??Zj;return(0,O.jsx)("g",l({},m,{children:f.map((e,t)=>(0,O.jsx)(g,l({startAngle:e.startAngle,endAngle:e.endAngle,paddingAngle:e.paddingAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius,skipAnimation:h??!1,id:s,color:e.color,dataIndex:t,isFaded:e.isFaded,isHighlighted:e.isHighlighted,isFocused:e.isFocused,onClick:p&&(n=>{p(n,{type:"pie",seriesId:s,dataIndex:t},e)})},n?.pieArc),e.dataIndex))}))}function nL(e,t){const n=Tn(e.startAngle,t.startAngle),r=Tn(e.endAngle,t.endAngle),i=Tn(e.innerRadius,t.innerRadius),o=Tn(e.outerRadius,t.outerRadius),a=Tn(e.paddingAngle,t.paddingAngle),s=Tn(e.cornerRadius,t.cornerRadius);return e=>({startAngle:n(e),endAngle:r(e),innerRadius:i(e),outerRadius:o(e),paddingAngle:a(e),cornerRadius:s(e)})}const rL=["id","classes","color","startAngle","endAngle","paddingAngle","arcLabelRadius","innerRadius","outerRadius","cornerRadius","formattedArcLabel","isHighlighted","isFaded","skipAnimation","hidden"];function iL(e){return Xb("MuiPieArcLabel",e)}const oL=Zb("MuiPieArcLabel",["root","highlighted","faded","animate","series"]),aL=bm("text",{name:"MuiPieArcLabel",slot:"Root"})(({theme:e})=>({fill:(e.vars||e).palette.text.primary,textAnchor:"middle",dominantBaseline:"middle",pointerEvents:"none",animationName:"animate-opacity",animationDuration:"0s",animationTimingFunction:FI,transitionDuration:`${_I}ms`,transitionProperty:"opacity",transitionTimingFunction:FI,[`&.${oL.animate}`]:{animationDuration:`${_I}ms`},"@keyframes animate-opacity":{from:{opacity:0}}})),sL=e.forwardRef(function(e,t){const{id:n,classes:r,color:i,startAngle:o,endAngle:a,paddingAngle:s,arcLabelRadius:c,cornerRadius:u,formattedArcLabel:d,isHighlighted:p,isFaded:h,skipAnimation:m,hidden:f}=e,g=tt(e,rL),y=(e=>{const{classes:t,id:n,isFaded:r,isHighlighted:i,skipAnimation:o}=e;return uI({root:["root",`series-${n}`,i&&"highlighted",r&&"faded",!o&&"animate"]},iL,t)})({id:n,classes:r,color:i,isFaded:h,isHighlighted:p,skipAnimation:m}),v=function(e){const t={startAngle:(e.startAngle+e.endAngle)/2,endAngle:(e.startAngle+e.endAngle)/2,innerRadius:e.arcLabelRadius??e.innerRadius,outerRadius:e.arcLabelRadius??e.outerRadius,paddingAngle:e.paddingAngle,cornerRadius:e.cornerRadius};return aw({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.arcLabelRadius??e.innerRadius,outerRadius:e.arcLabelRadius??e.outerRadius,paddingAngle:e.paddingAngle,cornerRadius:e.cornerRadius},{createInterpolator:nL,transformProps:e=>{const[t,n]=Yj().cornerRadius(e.cornerRadius).centroid({padAngle:e.paddingAngle,startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius});return{x:t,y:n}},applyProps(e,{x:t,y:n}){e.setAttribute("x",t.toString()),e.setAttribute("y",n.toString())},initialProps:t,skip:e.skipAnimation,ref:e.ref})}({cornerRadius:u,startAngle:o,endAngle:a,innerRadius:c,outerRadius:c,paddingAngle:s,skipAnimation:m,ref:t});return(0,O.jsx)(aL,l({className:y.root},g,v,{opacity:f?0:1,children:d}))}),lL=["arcLabel","arcLabelMinAngle","arcLabelRadius","cornerRadius","data","faded","highlighted","id","innerRadius","outerRadius","paddingAngle","skipAnimation","slotProps","slots"],cL=180/Math.PI;function uL(e,t,n){if(!e)return null;if((n.endAngle-n.startAngle)*cL(0,O.jsx)(v,l({startAngle:e.startAngle,endAngle:e.endAngle,paddingAngle:e.paddingAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,arcLabelRadius:e.arcLabelRadius,cornerRadius:e.cornerRadius,id:c,color:e.color,isFaded:e.isFaded,isHighlighted:e.isHighlighted,formattedArcLabel:uL(t,n,e),skipAnimation:h??!1},m?.pieArcLabel),e.id??e.dataIndex))}))}function pL(){return ak("pie")}function hL(){return zx().use(gt).pie??{}}function mL(e){return Xb("MuiPieChart",e)}function fL(e){const{skipAnimation:t,slots:n,slotProps:r,onItemClick:i}=e,o=pL(),a=hL(),s=bw(t),l=uI({root:["root"],series:["series"],seriesLabels:["seriesLabels"]},mL,void 0);if(void 0===o)return null;const{series:c,seriesOrder:u}=o;return(0,O.jsxs)("g",{children:[u.map(e=>{const{cornerRadius:t,paddingAngle:o,data:u,highlighted:d,faded:p}=c[e];return(0,O.jsx)("g",{className:l.series,transform:`translate(${a[e].center.x}, ${a[e].center.y})`,"data-series":e,children:(0,O.jsx)(tL,{innerRadius:a[e].radius.inner,outerRadius:a[e].radius.outer,cornerRadius:t,paddingAngle:o,id:e,data:u,skipAnimation:s,highlighted:d,faded:p,onItemClick:i,slots:n,slotProps:r})},e)}),u.map(e=>{const{cornerRadius:t,paddingAngle:i,arcLabel:o,arcLabelMinAngle:u,data:d}=c[e];return(0,O.jsx)("g",{className:l.seriesLabels,transform:`translate(${a[e].center.x}, ${a[e].center.y})`,"data-series":e,children:(0,O.jsx)(dL,{innerRadius:a[e].radius.inner,outerRadius:a[e].radius.outer,arcLabelRadius:a[e].radius.label,cornerRadius:t,paddingAngle:i,id:e,data:d,skipAnimation:s,arcLabel:o,arcLabelMinAngle:u,slots:n,slotProps:r})},e)})]})}Zb("MuiPieChart",["root","series","seriesLabels"]);const gL=["width","height","margin","children","series","colors","dataset","desc","onAxisClick","highlightedAxis","onHighlightedAxisChange","disableVoronoi","voronoiMaxRadius","onItemClick","disableAxisListener","highlightedItem","onHighlightChange","sx","title","xAxis","yAxis","zAxis","rotationAxis","radiusAxis","skipAnimation","seriesConfig","plugins","localeText","slots","slotProps","experimentalFeatures","enableKeyboardNavigation","brushConfig","onHiddenItemsChange","hiddenItems"],yL=(e,t)=>{const n=e,{width:r,height:i,margin:o,children:a,series:s,colors:c,dataset:u,desc:d,onAxisClick:p,highlightedAxis:h,onHighlightedAxisChange:m,disableVoronoi:f,voronoiMaxRadius:g,onItemClick:y,disableAxisListener:v,highlightedItem:b,onHighlightChange:x,sx:I,title:w,xAxis:k,yAxis:S,zAxis:M,rotationAxis:C,radiusAxis:P,skipAnimation:E,seriesConfig:T,plugins:A,localeText:O,slots:j,slotProps:L,experimentalFeatures:R,enableKeyboardNavigation:D,brushConfig:$,onHiddenItemsChange:z,hiddenItems:N}=n,_=l({title:w,desc:d,sx:I,ref:t},tt(n,gL));return{chartDataProviderProps:{margin:o,series:s,colors:c,dataset:u,disableAxisListener:v,highlightedItem:b,onHighlightChange:x,onAxisClick:p,highlightedAxis:h,onHighlightedAxisChange:m,disableVoronoi:f,voronoiMaxRadius:g,onItemClick:y,xAxis:k,yAxis:S,zAxis:M,rotationAxis:C,radiusAxis:P,skipAnimation:E,width:r,height:i,localeText:O,seriesConfig:T,experimentalFeatures:R,enableKeyboardNavigation:D,brushConfig:$,onHiddenItemsChange:z,hiddenItems:N,plugins:A??Px,slots:j,slotProps:L},chartsSurfaceProps:_,children:a}},vL=[Ys,Ws,Zs,Bb,kx],bL=["arcLabelRadius"];function xL(e){const t=xm(),n=MO(),r=hL(),{isHighlighted:i,isFaded:o}=zI(n),a=pL();if(null===n||"pie"!==n.type||!a)return null;const s=a?.series[n.seriesId],{center:c,radius:u}=r[n.seriesId];if(!s||!c||!u)return null;const d=s.data[n.dataIndex],p=tt(Jj(s,r[n.seriesId],i,o),bL);return(0,O.jsx)(Zj,l({transform:`translate(${r[s.id].center.x}, ${r[s.id].center.y})`,startAngle:d.startAngle,endAngle:d.endAngle,color:"transparent",pointerEvents:"none",skipInteraction:!0,skipAnimation:!0,stroke:(t.vars??t).palette.text.primary,id:s.id,className:qj.focusIndicator,dataIndex:n.dataIndex,isFaded:!1,isHighlighted:!1,isFocused:!1,strokeWidth:3},p,e))}const IL=["series","width","height","margin","colors","sx","skipAnimation","hideLegend","children","slots","slotProps","onItemClick","loading","highlightedItem","onHighlightChange","className","showToolbar"],wL=e.forwardRef(function(e,t){const n=Lh({props:e,name:"MuiPieChart"}),{series:r,width:i,height:o,margin:a,colors:s,sx:c,skipAnimation:u,hideLegend:d,children:p,slots:h,slotProps:m,onItemClick:f,loading:g,highlightedItem:y,onHighlightChange:v,className:b,showToolbar:x}=n,I=tt(n,IL),w=ve(a,wt),{chartDataProviderProps:k,chartsSurfaceProps:S}=yL(l({},I,{series:r.map(e=>l({type:"pie"},e)),width:i,height:o,margin:w,colors:s,highlightedItem:y,onHighlightChange:v,className:b,skipAnimation:u,plugins:vL}),t),M=h?.tooltip??LC,C=h?.toolbar;return(0,O.jsx)(SO,l({},k,{children:(0,O.jsxs)(FO,{legendPosition:m?.legend?.position,legendDirection:m?.legend?.direction??"vertical",sx:c,hideLegend:d??!1,children:[x&&C?(0,O.jsx)(C,l({},m?.toolbar)):null,!d&&(0,O.jsx)(XC,{direction:m?.legend?.direction??"vertical",slots:h,slotProps:m}),(0,O.jsxs)(mI,l({},S,{children:[(0,O.jsx)(fL,{slots:h,slotProps:m,onItemClick:f}),(0,O.jsx)(xL,{}),(0,O.jsx)(GO,{loading:g,slots:h,slotProps:m}),p]})),!g&&(0,O.jsx)(M,l({trigger:"item"},m?.tooltip))]})}))});function kL(e){return kL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kL(e)}function SL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ML(e){for(var t=1;t0)t=a.map(function(e,t){return ML(ML({},e),{},{id:e.id||"series-".concat(t)})});else{var $={data:o};void 0!==u&&($.innerRadius=u),void 0!==d&&($.outerRadius=d),h&&($.paddingAngle=h),f&&($.cornerRadius=f),0!==y&&($.startAngle=y),360!==b&&($.endAngle=b),void 0!==x&&($.cx=x),void 0!==I&&($.cy=I),w&&($.arcLabel=w),k&&($.arcLabelMinAngle=k),E&&($.highlightScope=E),t=[$]}var z={series:t,height:c,skipAnimation:O,onItemClick:function(e,t){if(D){var n,r,i,s,l,c=0;a&&a.length>0?(c=a.findIndex(function(e,n){return(e.id||"series-".concat(n))===t.seriesId}),-1===c&&(c=0),s=((null===(l=a[c])||void 0===l?void 0:l.data)||[])[t.dataIndex]):s=o[t.dataIndex],D({clickData:{id:null===(n=s)||void 0===n?void 0:n.id,seriesId:t.seriesId,seriesIndex:c,dataIndex:t.dataIndex,value:null===(r=s)||void 0===r?void 0:r.value,label:null===(i=s)||void 0===i?void 0:i.label,timestamp:(new Date).toISOString()},n_clicks:(L||0)+1})}},onHighlightChange:function(e){D&&D({highlightedItem:e})}};return s&&(z.width=s),S&&(z.colors=S),C&&(z.hideLegend=C),P&&(z.margin=P),T&&(z.slotProps=ML(ML({},z.slotProps),{},{tooltip:{trigger:T.trigger||"item"}})),void 0!==R&&(z.highlightedItem=R),n().createElement("div",{id:r},n().createElement(wL,z))}PL.propTypes={id:i().string,data:i().arrayOf(i().shape({id:i().oneOfType([i().number,i().string]),value:i().number.isRequired,label:i().string,color:i().string})),series:i().arrayOf(i().shape({id:i().string,data:i().arrayOf(i().shape({id:i().oneOfType([i().number,i().string]),value:i().number.isRequired,label:i().string,color:i().string})).isRequired,innerRadius:i().oneOfType([i().number,i().string]),outerRadius:i().oneOfType([i().number,i().string]),paddingAngle:i().number,cornerRadius:i().number,startAngle:i().number,endAngle:i().number,arcLabel:i().oneOf(["value","label","formattedValue"]),arcLabelMinAngle:i().number,arcLabelRadius:i().number,highlightScope:i().shape({highlight:i().oneOf(["item","none"]),fade:i().oneOf(["global","none"])})})),width:i().number,height:i().number,innerRadius:i().oneOfType([i().number,i().string]),outerRadius:i().oneOfType([i().number,i().string]),paddingAngle:i().number,cornerRadius:i().number,startAngle:i().number,endAngle:i().number,cx:i().oneOfType([i().number,i().string]),cy:i().oneOfType([i().number,i().string]),arcLabel:i().oneOf(["value","label","formattedValue"]),arcLabelMinAngle:i().number,colors:i().arrayOf(i().string),hideLegend:i().bool,margin:i().shape({top:i().number,right:i().number,bottom:i().number,left:i().number}),highlightScope:i().shape({highlight:i().oneOf(["item","none"]),fade:i().oneOf(["global","none"])}),tooltip:i().shape({trigger:i().oneOf(["item","none"])}),skipAnimation:i().bool,clickData:i().object,n_clicks:i().number,highlightedItem:i().shape({seriesId:i().string,dataIndex:i().number}),setProps:i().func};const EL=ae(e=>e.voronoi,e=>e?.isVoronoiEnabled);function TL(e){return Xb("MuiScatter",e)}Zb("MuiScatter",["root"]);const AL=e=>uI({root:["root"]},TL,e),OL=["ownerState"];function jL(e){const{series:t,xScale:n,yScale:r,colorGetter:i,onItemClick:o,classes:a,slots:s,slotProps:c}=e,{instance:u}=$x(),d=zx().use(EL)||t.disableHover,{isFaded:p,isHighlighted:h}=iS(),m=xP(t,n,r,u.isPointInside),f=s?.marker??kP,g=tt(yI({elementType:f,externalSlotProps:c?.marker,additionalProps:{seriesId:t.id,size:t.markerSize},ownerState:{}}),OL),y=AL(a);return(0,O.jsx)("g",{"data-series":t.id,className:y.root,children:m.map(e=>{const n=h(e),r=!n&&p(e);return(0,O.jsx)(f,l({dataIndex:e.dataIndex,color:i(e.dataIndex),isHighlighted:n,isFaded:r,x:e.x,y:e.y,onClick:o&&(n=>o(n,{type:"scatter",seriesId:t.id,dataIndex:e.dataIndex})),"data-highlighted":n||void 0,"data-faded":r||void 0},d?void 0:function(e,t){return{onPointerEnter:function(){t&&(e.setLastUpdateSource("pointer"),e.setTooltipItem(t),e.setHighlight("sankey"===t.type?t:{seriesId:t.seriesId,dataIndex:t.dataIndex}))},onPointerLeave:function(){t&&(e.removeTooltipItem(t),e.clearHighlight())},onPointerDown:vI}}(u,e),g),e.id??e.dataIndex)})})}const LL=.01;function RL(e,t,n){return`M${e-n} ${t} a${n} ${n} 0 1 1 0 ${LL}`}function DL(t){const{series:n,xScale:r,yScale:i,color:o,colorGetter:a,markerSize:s}=t,l=function(e,t,n,r,i,o){const{instance:a}=$x(),s=ck(n),l=ck(r),c=new Map,u=new Map;for(let n=0;n=1e3&&(rO(c,m,f.join("")),u.delete(m))}for(const[e,t]of u.entries())t.length>0&&rO(c,e,t.join(""));return c}(n.data,s,r,i,o,a),c=[];let u=0;for(const[e,t]of l.entries())for(const n of t)c.push((0,O.jsx)("path",{fill:e,d:n},u)),u+=1;return(0,O.jsx)(e.Fragment,{children:c})}const $L=e.memo(DL),zL=bm("g",{slot:"internal",shouldForwardProp:void 0})({'&[data-faded="true"]':{opacity:.3},"& path":{pointerEvents:"none"}});function NL(t){const{series:n,xScale:r,yScale:i,color:o,colorGetter:a,classes:s}=t,{store:l}=$x(),c=l.use(jI,n.id),u=l.use(LI,n.id),d=l.use(DI,n.id),p=l.use(RI,n.id),h=n.markerSize*(c?1.2:1),m=AL(s),f=[];if(null!=d){const e=n.data[d],t=ck(r),s=ck(i);f.push((0,O.jsx)("path",{fill:a?a(d):o,"data-highlighted":!0,d:RL(t(e.x),s(e.y),1.2*h)},`highlighted-${n.id}`))}if(null!=p){const e=n.data[p],t=ck(r),s=ck(i);f.push((0,O.jsx)("path",{fill:a?a(p):o,d:RL(t(e.x),s(e.y),h)},`unfaded-${n.id}`))}return(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(zL,{className:m.root,"data-series":n.id,"data-faded":u||void 0,"data-highlighted":c||void 0,children:(0,O.jsx)($L,{series:n,xScale:r,yScale:i,color:o,colorGetter:a,markerSize:h})}),f]})}function _L(t){const{slots:n,slotProps:r,onItemClick:i,renderer:o}=t,a=IP(),{xAxis:s,xAxisIds:c}=_x(),{yAxis:u,yAxisIds:d}=Fx(),{zAxis:p,zAxisIds:h}=Kx();if(void 0===a)return null;const{series:m,seriesOrder:f}=a,g=c[0],y=d[0],v=h[0],b="svg-batch"===o?NL:jL,x=n?.scatter??b;return(0,O.jsx)(e.Fragment,{children:f.map(e=>{const{id:t,xAxisId:o,yAxisId:a,zAxisId:c,color:d}=m[e],h=Dl.colorProcessor(m[e],s[o??g],u[a??y],p[c??v]),f=s[o??g].scale,b=u[a??y].scale;return(0,O.jsx)(x,l({xScale:f,yScale:b,color:d,colorGetter:h,series:m[e],onItemClick:i,slots:n,slotProps:r},r?.scatter),t)})})}const FL=[Xs,Mb,Ys,Ws,Bs,Zs,Bb,Cx,kx],HL=["xAxis","yAxis","zAxis","series","axisHighlight","voronoiMaxRadius","disableVoronoi","hideLegend","width","height","margin","colors","sx","grid","onItemClick","children","slots","slotProps","loading","highlightedItem","onHighlightChange","className","showToolbar","renderer","brushConfig"];function BL(e){const t=xm(),n=MO(),r=IP(),{xAxis:i,xAxisIds:o}=_x(),{yAxis:a,yAxisIds:s}=Fx();if(null===n||"scatter"!==n.type||!r)return null;const c=r?.series[n.seriesId],u=c.xAxisId??o[0],d=c.yAxisId??s[0],p=ck(i[u].scale),h=ck(a[d].scale),m=c.data[n.dataIndex],f=p(m.x),g=h(m.y),y=c.markerSize+3;return(0,O.jsx)("rect",l({fill:"none",stroke:(t.vars??t).palette.text.primary,strokeWidth:2,x:f-y,y:g-y,width:2*y,height:2*y,rx:3,ry:3},e))}const VL=e.forwardRef(function(t,n){const r=Lh({props:t,name:"MuiScatterChart"}),{chartsWrapperProps:i,chartContainerProps:o,chartsAxisProps:a,gridProps:s,scatterPlotProps:c,overlayProps:u,legendProps:d,axisHighlightProps:p,children:h}=(t=>{const{xAxis:n,yAxis:r,zAxis:i,series:o,axisHighlight:a,voronoiMaxRadius:s,disableVoronoi:c,width:u,height:d,margin:p,colors:h,sx:m,grid:f,onItemClick:g,children:y,slots:v,slotProps:b,loading:x,highlightedItem:I,onHighlightChange:w,className:k,renderer:S,brushConfig:M}=t,C=tt(t,HL),P=e.useMemo(()=>o.map(e=>l({type:"scatter"},e)),[o]),E=!0!==c||"svg-batch"===S,T=l({},C,{series:P,width:u,height:d,margin:p,colors:h,xAxis:n,yAxis:r,zAxis:i,highlightedItem:I,onHighlightChange:w,disableVoronoi:c,voronoiMaxRadius:s,onItemClick:E?g:void 0,className:k,plugins:FL,slots:v,slotProps:b,brushConfig:M}),A={slots:v,slotProps:b},O={vertical:f?.vertical,horizontal:f?.horizontal},j={onItemClick:E?void 0:g,slots:v,slotProps:b,renderer:S},L={loading:x,slots:v,slotProps:b},R={slots:v,slotProps:b},D=l({y:"none",x:"none"},a);return{chartsWrapperProps:{sx:m,legendPosition:t.slotProps?.legend?.position,legendDirection:t.slotProps?.legend?.direction,hideLegend:t.hideLegend??!1},chartContainerProps:T,chartsAxisProps:A,gridProps:O,scatterPlotProps:j,overlayProps:L,legendProps:R,axisHighlightProps:D,children:y}})(r),{chartDataProviderProps:m,chartsSurfaceProps:f}=yL(o,n),g=r.slots?.tooltip??LC,y=r.slots?.toolbar;return(0,O.jsx)(SO,l({},m,{children:(0,O.jsxs)(FO,l({},i,{children:[r.showToolbar&&y?(0,O.jsx)(y,l({},r.slotProps?.toolbar)):null,!r.hideLegend&&(0,O.jsx)(XC,l({},d)),(0,O.jsxs)(mI,l({},f,{children:[(0,O.jsx)($O,l({},a)),(0,O.jsx)(FM,l({},s)),(0,O.jsx)("g",{"data-drawing-container":!0,children:(0,O.jsx)(_L,l({},c))}),(0,O.jsx)(GO,l({},u)),(0,O.jsx)(_C,l({},p)),(0,O.jsx)(BL,{}),h]})),!r.loading&&(0,O.jsx)(g,l({trigger:"item"},r.slotProps?.tooltip))]}))}))});function UL(e){return UL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},UL(e)}function YL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WL(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function tR(e,t){if(e){if("string"==typeof e)return nR(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nR(e,t):void 0}}function nR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ns+c||a.yl+u)){var p,h;try{var m=i.invert(a.x);p=m instanceof Date?m.getTime():m,h=o.invert(a.y)}catch(e){return}if(null!=p&&null!=h){var f={x:"number"==typeof p?Math.round(100*p)/100:p,y:"number"==typeof h?Math.round(100*h)/100:h},g="".concat(f.x,"|").concat(f.y);g!==d.current&&(d.current=g,r({crosshairPosition:f}))}}}}},onMouseLeave:function(){null!==d.current&&(d.current=null,null==r||r({crosshairPosition:null}))},onContextMenu:function(e){if(r&&null!=i&&i.invert&&null!=o&&o.invert){var t=e.currentTarget.ownerSVGElement||e.currentTarget.closest("svg");if(t){var n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;var a=n.matrixTransform(t.getScreenCTM().inverse());if(!(a.xs+c||a.yl+u)){var d,p;try{var h=i.invert(a.x);d=h instanceof Date?h.getTime():h,p=o.invert(a.y)}catch(e){return}e.preventDefault(),r({crosshairClick:{x:"number"==typeof d?Math.round(100*d)/100:d,y:"number"==typeof p?Math.round(100*p)/100:p,button:"right",timestamp:(new Date).toISOString()}})}}}}})}var aR=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],sR=function(e){return e<10?"0"+e:""+e};function lR(e){var t=e.scatterSeries,r=e.proximity,i=MC();if(!i||0===i.length)return null;var o=i[0],a=o.axisValue,s=o.axisFormattedValue,l=o.seriesItems,c=s;a instanceof Date?c=a.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):"number"==typeof a&&a>1e12&&(c=new Date(a).toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}));var u=new Set((t||[]).map(function(e){return e.id})),d=(l||[]).filter(function(e){return!u.has(e.seriesId)}),p=[];if(t&&null!=a){var h,m=a instanceof Date?a.getTime():Number(a),f=eR(t);try{for(f.s();!(h=f.n()).done;){var g=h.value;if(g.data){var y,v=eR(g.data);try{for(v.s();!(y=v.n()).done;){var b=y.value;if(Math.abs(b.x-m)<=r){var x=b.y;p.push({seriesId:g.id,color:g.color||"#666",formattedLabel:g.label||g.id,formattedValue:"number"==typeof x?x.toLocaleString(void 0,{maximumFractionDigits:2}):String(x)})}}}catch(e){v.e(e)}finally{v.f()}}}}catch(e){f.e(e)}finally{f.f()}}var I=[].concat(function(e){return function(e){if(Array.isArray(e))return nR(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||tR(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(d),p);if(0===I.length)return null;var w={display:"flex",alignItems:"center",gap:6,padding:"2px 0"},k=function(e){return{display:"inline-block",width:10,height:10,borderRadius:"50%",backgroundColor:e,flexShrink:0}};return n().createElement("div",{style:{backgroundColor:"var(--mantine-color-body, white)",border:"1px solid var(--mantine-color-default-border, #e0e0e0)",borderRadius:4,padding:"8px 12px",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",fontSize:13,color:"var(--mantine-color-text, inherit)"}},n().createElement("div",{style:{marginBottom:4,fontWeight:500}},c),I.map(function(e,t){return n().createElement("div",{key:"".concat(e.seriesId,"-").concat(t),style:w},n().createElement("span",{style:k(e.color)}),n().createElement("span",null,e.formattedLabel||e.seriesId,":"),n().createElement("span",{style:{fontWeight:500}},e.formattedValue))}))}function cR(e){var t=e.dataIndex,r=(e.seriesConfig,e.scatterSeries),i=e.proximity,o=uk(),a=Nx(),s=Hx(),l=UM();if(null==t||!a)return null;var c=null==s?void 0:s.data;if(!c||t<0||t>=c.length)return null;var u,d,p=c[t];try{u=o(p)}catch(e){return null}if(null==u||isNaN(u))return null;if(p instanceof Date)d=p.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"});else if("number"==typeof p&&p>1e12)d=new Date(p).toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"});else if(null!=s&&s.valueFormatter)try{d=s.valueFormatter(p,{location:"tooltip"})}catch(e){d=String(p)}else d=String(p);var h=[],m=l.line;if(m&&m.seriesOrder.forEach(function(e){var n,r=m.series[e];if(r){var i=null===(n=r.data)||void 0===n?void 0:n[t];null!=i&&h.push({seriesId:e,color:r.color||"#666",formattedLabel:r.label||e,formattedValue:"number"==typeof i?i.toLocaleString(void 0,{maximumFractionDigits:2}):String(i)})}}),new Set((r||[]).map(function(e){return e.id})),r&&null!=p){var f,g=p instanceof Date?p.getTime():Number(p),y=eR(r);try{for(y.s();!(f=y.n()).done;){var v=f.value;if(v.data){var b,x=eR(v.data);try{for(x.s();!(b=x.n()).done;){var I=b.value;Math.abs(I.x-g)<=i&&h.push({seriesId:v.id,color:v.color||"#666",formattedLabel:v.label||v.id,formattedValue:"number"==typeof I.y?I.y.toLocaleString(void 0,{maximumFractionDigits:2}):String(I.y)})}}catch(e){x.e(e)}finally{x.f()}}}}catch(e){y.e(e)}finally{y.f()}}if(0===h.length)return null;var w=a.left+u,k=a.left+a.width/2,S=a.left+u>k,M={display:"flex",alignItems:"center",gap:6,padding:"2px 0"},C=function(e){return{display:"inline-block",width:10,height:10,borderRadius:"50%",backgroundColor:e,flexShrink:0}};return n().createElement("div",{style:{position:"absolute",top:a.top+8,left:S?void 0:w+12,right:S?"calc(100% - ".concat(w-12,"px)"):void 0,backgroundColor:"var(--mantine-color-body, white)",border:"1px solid var(--mantine-color-default-border, #e0e0e0)",borderRadius:4,padding:"8px 12px",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",fontSize:13,zIndex:1e3,pointerEvents:"none",whiteSpace:"nowrap",color:"var(--mantine-color-text, inherit)"}},n().createElement("div",{style:{marginBottom:4,fontWeight:500}},d),h.map(function(e,t){return n().createElement("div",{key:"".concat(e.seriesId,"-").concat(t),style:M},n().createElement("span",{style:C(e.color)}),n().createElement("span",null,e.formattedLabel,":"),n().createElement("span",{style:{fontWeight:500}},e.formattedValue))}))}function uR(e){var t=e.forecast,r=e.color,i=void 0===r?"#ff9800":r,o=e.opacity,a=void 0===o?.15:o,s=e.yAxisId,l=uk(),c=dk(s);if(!t||0===t.length)return null;for(var u=[],d=0;d1e10?new Date(p.x):p.x),m=c(p.y),f=c(null!=p.upper?p.upper:p.y),g=c(null!=p.lower?p.lower:p.y);null==h||null==m||isNaN(h)||isNaN(m)||u.push({x:h,y:m,yUp:isNaN(f)?m:f,yLo:isNaN(g)?m:g})}if(u.length<2)return null;for(var y="M ".concat(u[0].x," ").concat(u[0].y),v=1;v=0;I--)b+=" L ".concat(u[I].x," ").concat(u[I].yLo);return b+=" Z",n().createElement("g",null,n().createElement("path",{d:b,fill:i,fillOpacity:a}),n().createElement("path",{d:y,stroke:i,strokeWidth:2,strokeDasharray:"6 4",fill:"none"}))}function dR(t){var r,i,o=t.id,a=t.licenseKey,l=t.series,c=void 0===l?[]:l,u=t.xAxis,d=t.yAxis,p=t.zAxis,h=t.dataset,m=t.height,f=void 0===m?400:m,g=t.width,y=t.margin,v=t.grid,b=t.colors,x=t.voronoiMaxRadius,I=t.disableVoronoi,w=void 0!==I&&I,k=t.axisHighlight,S=t.tooltip,M=t.hideLegend,C=void 0!==M&&M,P=t.skipAnimation,E=void 0!==P&&P,T=(t.loading,t.slotProps,t.referenceLines),A=t.initialZoom,O=t.showToolbar,j=void 0!==O&&O,L=t.showSlider,R=void 0!==L&&L,D=t.zoomInteractionConfig,$=t.highlightedAxis,z=t.highlightedItem,N=t.tooltipItem,_=t.syncedTooltipIndex,F=t.forecast,H=t.forecastColor,B=void 0===H?"#ff9800":H,V=t.forecastOpacity,U=void 0===V?.15:V,Y=t.enableCrosshair,W=void 0!==Y&&Y,G=(t.crosshairPosition,t.crosshairClick,t.clickData,t.n_clicks),K=void 0===G?0:G,q=(t.zoomData,t.setProps);a&&!iR&&(s.setLicenseKey(a),iR=!0);var X=(0,e.useId)(),Z="".concat(X,"-clip"),J=QL((0,e.useState)(0),2),Q=J[0],ee=J[1],te=(0,e.useRef)(JSON.stringify(A));(0,e.useEffect)(function(){var e=JSON.stringify(A);e!==te.current&&(te.current=e,ee(function(e){return e+1}))},[A]);var ne=(0,e.useRef)(JSON.stringify(null!=$?$:[])),re=QL((0,e.useState)(function(){return $&&Array.isArray($)?$:[]}),2),ie=re[0],oe=re[1];(0,e.useEffect)(function(){var e=JSON.stringify(null!=$?$:[]);e!==ne.current&&(ne.current=e,oe(null!=$?$:[]))},[$]);var ae=QL((0,e.useState)(z||null),2),se=ae[0],le=ae[1],ce=(0,e.useRef)(JSON.stringify(z));(0,e.useEffect)(function(){var e=JSON.stringify(z);e!==ce.current&&(ce.current=e,le(z||null))},[z]);var ue=(0,e.useRef)(JSON.stringify(null!=N?N:null)),de=QL((0,e.useState)(function(){return null!=N?N:null}),2),pe=de[0],he=de[1];(0,e.useEffect)(function(){var e=JSON.stringify(null!=N?N:null);e!==ue.current&&(ue.current=e,he(null!=N?N:null))},[N]);var me=(0,e.useMemo)(function(){return c&&0!==c.length?c.map(function(e,t){return ZL(ZL({},e),{},{id:e.id||"series-".concat(t)})}):[]},[c]),fe=(0,e.useMemo)(function(){return me.some(function(e){return"scatter"===e.type})},[me]),ge=(0,e.useMemo)(function(){return me.some(function(e){return"line"===e.type})},[me]),ye=(0,e.useMemo)(function(){return me.some(function(e){return"line"===e.type&&e.area})},[me]),ve=(0,e.useMemo)(function(){return me.some(function(e){return"line"===e.type&&!1!==e.showMark})},[me]),be=(0,e.useMemo)(function(){return me.filter(function(e){return"scatter"===e.type})},[me]),xe=function(e,t){q&&t&&q({clickData:{type:"line",seriesId:t.seriesId,dataIndex:t.dataIndex,timestamp:(new Date).toISOString()},n_clicks:(K||0)+1})},Ie=(0,e.useMemo)(function(){var e=function(e){return!!e&&e.some(function(e){var t=e.zoom;return t&&"object"===rR(t)&&t.slider&&t.slider.enabled})};return e(u)||e(d)},[u,d]),we=(0,e.useMemo)(function(){if(u)return u.map(function(e){var t=ZL({},e);if(e.dateFormat)t.valueFormatter=function(e,t){var n=t||e;return function(t,r){return function(e,t){var n=e instanceof Date?e:new Date(e);return t.replace(/YYYY|YY|MMM|MM|dd|HH|mm|M|d/g,function(e){switch(e){case"YYYY":return n.getFullYear();case"YY":return String(n.getFullYear()).slice(-2);case"MMM":return aR[n.getMonth()];case"MM":return sR(n.getMonth()+1);case"M":return n.getMonth()+1;case"dd":return sR(n.getDate());case"d":return n.getDate();case"HH":return sR(n.getHours());case"mm":return sR(n.getMinutes());default:return e}})}(t,r&&"tick"===r.location?n:e)}}(e.dateFormat,e.dateTickFormat),delete t.dateFormat,delete t.dateTickFormat;else if(e.valueFormatter&&"function"!=typeof e.valueFormatter){var n=function(e){if("function"==typeof e)return e;if(e&&"object"===rR(e)&&"string"==typeof e.function){var t=window.dashMuiChartsFunctions;if(t&&"function"==typeof t[e.function]){var n=t[e.function],r=e.options||{};return function(){for(var e=arguments.length,t=new Array(e),i=0;i0&&s0&&(Ae.initialZoom=A),Ae.highlightedAxis=ie,Ae.onHighlightedAxisChange=function(e){var t=null!=e?e:[];oe(t),ne.current=JSON.stringify(t),q&&q({highlightedAxis:t})},Ae.highlightedItem=se,Ae.onHighlightChange=function(e){le(e),ce.current=JSON.stringify(e),q&&q({highlightedItem:e})},Ae.tooltipItem=pe,Ae.onTooltipItemChange=function(e){var t=null!=e?e:null;he(t),ue.current=JSON.stringify(t),q&&q({tooltipItem:t})},n().createElement("div",{id:o,style:{position:"relative"}},n().createElement(Rx,qL({key:Q},Ae),j&&n().createElement(kA,null),!C&&n().createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:8}},n().createElement(XC,null)),n().createElement(mI,null,v&&n().createElement(FM,{horizontal:v.horizontal,vertical:v.vertical}),n().createElement(ZC,{id:Z}),n().createElement("g",{clipPath:"url(#".concat(Z,")")},ye&&n().createElement(gk,{skipAnimation:E}),ge&&n().createElement(Ek,{onItemClick:xe,skipAnimation:E}),fe&&n().createElement(_L,{onItemClick:function(e,t){if(q&&t){var n,r=me.find(function(e){return e.id===t.seriesId}),i=null==r||null===(n=r.data)||void 0===n?void 0:n[t.dataIndex];q({clickData:{type:"scatter",seriesId:t.seriesId,dataIndex:t.dataIndex,x:null==i?void 0:i.x,y:null==i?void 0:i.y,timestamp:(new Date).toISOString()},n_clicks:(K||0)+1})}}})),ve&&n().createElement(hS,{onItemClick:xe,skipAnimation:E}),Ee.map(function(e,t){return n().createElement(gM,qL({key:e.axisId||"x-".concat(t),axisId:e.axisId},e.renderProps))}),Te.map(function(e,t){return n().createElement(OM,qL({key:e.axisId||"y-".concat(t),axisId:e.axisId},e.renderProps))}),n().createElement(_C,{x:null!==(r=null==k?void 0:k.x)&&void 0!==r?r:ge?"line":"none",y:null!==(i=null==k?void 0:k.y)&&void 0!==i?i:"none"}),F&&F.length>0&&n().createElement(uR,{forecast:F,color:B,opacity:U}),T&&T.map(function(e,t){return n().createElement(VT,qL({key:"ref-".concat(t)},e))}),W&&n().createElement(oR,{setProps:q}),(R||Ie)&&n().createElement(DT,null)),"none"!==Se&&(Me?n().createElement(jC,{trigger:"axis"},n().createElement(lR,{scatterSeries:be,proximity:ke})):n().createElement(LC,{trigger:Se})),null!=_&&_>=0&&n().createElement(cR,{dataIndex:_,seriesConfig:me,scatterSeries:be,proximity:ke})))}function pR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hR(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n>>15,1|t);return(((e=e+Math.imul(e^e>>>7,61|e)^e)^e>>>14)>>>0)/4294967296},nextGaussian:function(){var e=this.next()||1e-4,t=this.next();return Math.sqrt(-2*Math.log(e))*Math.cos(2*Math.PI*t)}}}function wR(e){var t=e.candles,r=e.upColor,i=e.downColor,o=e.totalSlots,a=Nx().width,s=uk(),l=dk();if(!t||0===t.length)return null;var c=a/Math.max(o,1),u=Math.max(1,.6*c),d=Math.max(.5,.06*c);return n().createElement("g",null,t.map(function(e,t){var o=s(t);if(void 0===o)return null;var a=e.close>=e.open?r:i,c=l(e.high),p=l(e.low),h=l(e.open),m=l(e.close);if([c,p,h,m].some(function(e){return void 0===e}))return null;var f=Math.min(h,m),g=Math.max(1,Math.abs(h-m));return n().createElement("g",{key:"candle-".concat(t)},n().createElement("line",{x1:o,y1:c,x2:o,y2:p,stroke:a,strokeWidth:d}),n().createElement("rect",{x:o-u/2,y:f,width:u,height:g,fill:a,stroke:a,strokeWidth:.5}))}))}function kR(e){var t=e.candles,r=e.upColor,i=e.downColor,o=e.totalSlots,a=e.volumeHeightPct,s=Nx(),l=s.top,c=s.height,u=s.width,d=uk();if(!t||0===t.length)return null;var p=Math.max.apply(Math,fR(t.map(function(e){return e.volume})).concat([1])),h=c*(a/100),m=l+c-h,f=u/Math.max(o,1),g=Math.max(1,.55*f);return n().createElement("g",{opacity:.35},t.map(function(e,t){var o=d(t);if(void 0===o)return null;var a=e.close>=e.open,s=e.volume/p*h;return n().createElement("rect",{key:"vol-".concat(t),x:o-g/2,y:m+h-s,width:g,height:s,fill:a?r:i})}))}function SR(e){var t=e.candles,r=e.labelInterval,i=uk(),o=dk();if(!t||0===t.length)return null;var a=r||Math.max(1,Math.floor(t.length/8));return n().createElement("g",null,t.map(function(e,r){if(r%a!==0&&r!==t.length-1)return null;var s=i(r),l=o(e.close);if(void 0===s||void 0===l)return null;var c=e.close>=e.open?"#4caf50":"#f44336";return n().createElement("g",{key:"label-".concat(r)},n().createElement("circle",{cx:s,cy:l,r:3,fill:c}),n().createElement("text",{x:s,y:l-10,textAnchor:"middle",fill:c,fontSize:10,fontWeight:"bold"},e.close.toFixed(1)))}))}function MR(e){var t=e.forecastData,r=e.upperBound,i=e.lowerBound,o=e.startIndex,a=e.color,s=e.opacity,l=uk(),c=dk();if(!t||0===t.length)return null;for(var u=[],d=0;d=0;x--)v+=" L ".concat(u[x].x," ").concat(u[x].yLo);return v+=" Z",n().createElement("g",null,n().createElement("path",{d:v,fill:a,fillOpacity:s}),n().createElement("path",{d:g,stroke:a,strokeWidth:2,strokeDasharray:"6 4",fill:"none"}))}function CR(e){var t=e.alerts,r=e.alertUpColor,i=e.alertDownColor,o=e.formatterFn,a=uk(),s=dk();return t&&0!==t.length?n().createElement("g",null,t.map(function(e,t){var l=a(e.displayIndex),c=s(e.price);if(void 0===l||void 0===c)return null;var u="up"===e.type,d=u?r:i,p=o?o(e,{index:t}):"".concat(u?"+":"").concat(e.pctChange.toFixed(1),"%"),h=7*p.length+10;return n().createElement("g",{key:"alert-".concat(t)},n().createElement("rect",{x:l-h/2,y:u?c-32:c+10,width:h,height:18,rx:4,fill:d}),n().createElement("text",{x:l,y:u?c-19:c+23,textAnchor:"middle",fill:"white",fontSize:10,fontWeight:"bold"},p),n().createElement("circle",{cx:l,cy:c,r:4,fill:d,stroke:"white",strokeWidth:1.5}))})):null}function PR(e){var t=e.startIndex,r=e.endIndex,i=Nx(),o=i.top,a=i.bottom,s=i.height,l=uk(),c=l(t),u=l(r);return void 0===c||void 0===u?null:n().createElement("rect",{x:c,y:0,width:u-c,height:o+s+a,fill:"#9e9e9e",opacity:.08})}function ER(t){var r,i,o=t.id,a=t.licenseKey,l=t.height,c=void 0===l?500:l,u=t.width,d=t.margin,p=t.windowSize,h=void 0===p?60:p,m=t.forecastSize,f=void 0===m?15:m,g=t.running,y=void 0!==g&&g,v=t.intervalMs,b=void 0===v?300:v,x=t.seed,I=void 0===x?42:x,w=t.resetTrigger,k=void 0===w?0:w,S=t.initialPrice,M=void 0===S?100:S,C=t.volatility,P=void 0===C?.02:C,E=t.drift,T=void 0===E?.001:E,A=t.forecastVolatility,O=void 0===A?1.5:A,j=t.alertProbability,L=void 0===j?.08:j,R=t.alertThresholdPct,D=void 0===R?2:R,$=t.alertLookback,z=void 0===$?5:$,N=t.alertMinDistance,_=void 0===N?10:N,F=t.maxVisibleAlerts,H=void 0===F?6:F,B=t.alertFilter,V=t.alertFormatter,U=t.candleUpColor,Y=void 0===U?"#4caf50":U,W=t.candleDownColor,G=void 0===W?"#f44336":W,K=t.forecastColor,q=void 0===K?"#ff9800":K,X=t.alertUpColor,Z=void 0===X?"#4caf50":X,J=t.alertDownColor,Q=void 0===J?"#f44336":J,ee=t.uncertaintyOpacity,te=void 0===ee?.15:ee,ne=t.showVolume,re=void 0===ne||ne,ie=t.showLabels,oe=void 0!==ie&&ie,ae=t.volumeHeightPct,se=void 0===ae?20:ae,le=t.showGrid,ce=void 0===le||le,ue=t.showSlider,de=void 0!==ue&&ue,pe=(t.hideLegend,t.grid),he=t.xAxisLabel,me=void 0===he?"Tick":he,fe=t.yAxisLabel,ge=void 0===fe?"Price":fe,ye=(t.currentPrice,t.tickCount,t.alertHistory),ve=(t.zoomData,t.setProps);a&&!bR&&(s.setLicenseKey(a),bR=!0);var be=(0,e.useId)(),xe="".concat(be,"-clip"),Ie=(0,e.useRef)(IR(I)),we=(0,e.useRef)([]),ke=(0,e.useRef)([]),Se=(0,e.useRef)(null),Me=(0,e.useRef)(k);(0,e.useEffect)(function(){0===we.current.length&&(we.current=[{open:M,high:1.005*M,low:.995*M,close:M,volume:500}])},[M]);var Ce=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||gR(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,e.useState)({candles:[],forecast:[],upperBound:[],lowerBound:[],alerts:[],forecastStartIndex:0}),2),Pe=Ce[0],Ee=Ce[1],Te=(0,e.useCallback)(function(e,t,n){for(var r=[],i=[],o=[],a=e,s=0,l=0;l0?c[c.length-1].close:M,t=Ie.current,n=P,r=T,i=e,o=t.nextGaussian()*n,a=t.nextGaussian()*n,s=t.nextGaussian()*n,l=Math.max(.01,i*Math.exp(r+o)),{open:i,high:Math.max(i,l)*(1+.4*Math.abs(a)),low:Math.min(i,l)*(1-.4*Math.abs(s)),close:l,volume:Math.max(50,Math.round(800+400*t.nextGaussian()+3e3*Math.abs(o)))});c.push(u);var d=c.length-1-z;if(d>=z){var p=c[d],m=xR(B),g=null;if(m){var y=m(c,d,{lookback:z});!0===y?g=p.close>=p.open?"up":"down":"up"!==y&&"down"!==y||(g=y)}else{for(var v=Math.max(0,d-z),b=Math.min(c.length-1,d+z),x=!0,w=!0,k=v;k<=b&&(k===d||(c[k].high>p.high&&(x=!1),c[k].low=p.open?"up":"down":x?g="up":w&&(g="down")}var S=ke.current.length>0?ke.current[ke.current.length-1].tick:-1/0;if(g&&d-S>=_){var C=(p.close-p.open)/p.open*100;ke.current.push({tick:d,price:"up"===g?p.high:p.low,type:g,pctChange:C,message:"".concat("up"===g?"+":"").concat(C.toFixed(2),"%")})}}var E=Math.max(0,c.length-h),A=c.slice(E),O=Te(u.close,IR(I+c.length),f),j=O.forecast,L=O.upper,R=O.lower,D=ke.current.filter(function(e){return e.tick>=E&&e.tickH&&(D.sort(function(e,t){return Math.abs(t.pctChange)-Math.abs(e.pctChange)}),(D=D.slice(0,H)).sort(function(e,t){return e.displayIndex-t.displayIndex})),Ee({candles:A,forecast:j,upperBound:L,lowerBound:R,alerts:D,forecastStartIndex:A.length-1}),ve){var $={currentPrice:Math.round(100*u.close)/100,tickCount:c.length};ke.current.length!==(ye||[]).length&&($.alertHistory=ke.current.slice(-50)),ve($)}},b),function(){Se.current&&(clearInterval(Se.current),Se.current=null)};Se.current&&(clearInterval(Se.current),Se.current=null)},[y,b,P,T,Te,h,f,L,D,z,_,H,B,I,M,ve]);var Ae=(0,e.useMemo)(function(){var e=Pe.candles,t=e.length+Pe.forecast.length,n=Array.from({length:t},function(e,t){return t}),r=[].concat(fR(e.map(function(e){return e.close})),fR(Array(Pe.forecast.length).fill(null))),i=[].concat(fR(e.flatMap(function(e){return[e.high,e.low]})),fR(Pe.forecast),fR(Pe.upperBound),fR(Pe.lowerBound)).filter(function(e){return null!=e&&isFinite(e)}),o=0,a=200;if(i.length>0){o=Math.min.apply(Math,fR(i));var s=.12*((a=Math.max.apply(Math,fR(i)))-o)||5;o-=s,a+=s}return{series:[{type:"line",id:"close",label:"Close",data:r,color:"#9e9e9e",showMark:!1,connectNulls:!1}],xAxisData:n,yDomain:{min:o,max:a},forecastStartIdx:e.length-1}},[Pe]),Oe=Ae.series,je=Ae.xAxisData,Le=Ae.yDomain,Re=Ae.forecastStartIdx,De={id:"x-axis",data:je,scaleType:"linear",tickLabelStyle:{fontSize:11}};de&&(De.zoom={minSpan:10,panning:!0,filterMode:"discard",slider:{enabled:!0,preview:!0}});var $e={height:c,series:Oe,skipAnimation:!0,xAxis:[De],yAxis:[{id:"y-axis",label:ge,width:65,min:Le.min,max:Le.max,tickLabelStyle:{fontSize:11}}],onZoomChange:function(e){ve&&ve({zoomData:e})}};u&&($e.width=u),d&&($e.margin=d);var ze=je.length,Ne=Pe.candles,_e=Ne.length>0?Ne[Ne.length-1].close:M;return n().createElement("div",{id:o},n().createElement(Rx,$e,n().createElement(mI,null,(ce||pe)&&n().createElement(FM,{horizontal:null===(r=null==pe?void 0:pe.horizontal)||void 0===r||r,vertical:null!==(i=null==pe?void 0:pe.vertical)&&void 0!==i&&i}),n().createElement(ZC,{id:xe}),n().createElement("g",{clipPath:"url(#".concat(xe,")")},Pe.forecast.length>0&&n().createElement(PR,{startIndex:Re,endIndex:je.length-1}),re&&n().createElement(kR,{candles:Ne,upColor:Y,downColor:G,totalSlots:ze,volumeHeightPct:se}),n().createElement(wR,{candles:Ne,upColor:Y,downColor:G,totalSlots:ze}),Pe.forecast.length>0&&n().createElement(MR,{forecastData:[_e].concat(fR(Pe.forecast)),upperBound:[_e].concat(fR(Pe.upperBound)),lowerBound:[_e].concat(fR(Pe.lowerBound)),startIndex:Re,color:q,opacity:te})),oe&&n().createElement(SR,{candles:Ne}),n().createElement(CR,{alerts:Pe.alerts,alertUpColor:Z,alertDownColor:Q,formatterFn:xR(V)}),n().createElement(gM,{axisId:"x-axis",label:me}),n().createElement(OM,{axisId:"y-axis"}),n().createElement(_C,{x:"line",y:"none"}),n().createElement(VT,{y:M,label:"Open",lineStyle:{stroke:"#9e9e9e",strokeDasharray:"4 4",strokeWidth:1},labelStyle:{fill:"#9e9e9e",fontSize:11},labelAlign:"start"}),de&&n().createElement(DT,null)),n().createElement(LC,{trigger:"axis"})))}ER.propTypes={id:i().string,licenseKey:i().string,height:i().number,width:i().number,margin:i().shape({top:i().number,right:i().number,bottom:i().number,left:i().number}),windowSize:i().number,forecastSize:i().number,running:i().bool,intervalMs:i().number,seed:i().number,resetTrigger:i().number,initialPrice:i().number,volatility:i().number,drift:i().number,forecastVolatility:i().number,alertProbability:i().number,alertThresholdPct:i().number,alertLookback:i().number,alertMinDistance:i().number,maxVisibleAlerts:i().number,alertFilter:i().shape({function:i().string.isRequired,options:i().object}),alertFormatter:i().shape({function:i().string.isRequired,options:i().object}),candleUpColor:i().string,candleDownColor:i().string,forecastColor:i().string,alertUpColor:i().string,alertDownColor:i().string,uncertaintyOpacity:i().number,showVolume:i().bool,showLabels:i().bool,volumeHeightPct:i().number,showGrid:i().bool,showSlider:i().bool,hideLegend:i().bool,grid:i().shape({horizontal:i().bool,vertical:i().bool}),xAxisLabel:i().string,yAxisLabel:i().string,currentPrice:i().number,tickCount:i().number,alertHistory:i().array,zoomData:i().arrayOf(i().shape({axisId:i().oneOfType([i().string,i().number]),start:i().number,end:i().number})),setProps:i().func};const TR=[Xs,Mb,Ys,Ws,Bs,Zs,Bb,kx],AR=["xAxis","yAxis","series","width","height","margin","colors","dataset","sx","axisHighlight","grid","children","slots","slotProps","skipAnimation","loading","layout","onItemClick","highlightedItem","onHighlightChange","borderRadius","barLabel","className","hideLegend","showToolbar","brushConfig","renderer"],OR=t=>{const{xAxis:n,yAxis:r,series:i,width:o,height:a,margin:s,colors:c,dataset:u,sx:d,axisHighlight:p,grid:h,children:m,slots:f,slotProps:g,skipAnimation:y,loading:v,layout:b,onItemClick:x,highlightedItem:I,onHighlightChange:w,borderRadius:k,barLabel:S,className:M,brushConfig:C,renderer:P}=t,E=tt(t,AR),T=`${z()}-clip-path`,A="horizontal"===b||void 0===b&&i.some(e=>"horizontal"===e.layout),O=e.useMemo(()=>[{id:W,scaleType:"band",data:Array.from({length:Math.max(...i.map(e=>(e.data??u??[]).length))},(e,t)=>t)}],[u,i]),j=e.useMemo(()=>[{id:G,scaleType:"band",data:Array.from({length:Math.max(...i.map(e=>(e.data??u??[]).length))},(e,t)=>t)}],[u,i]),L=e.useMemo(()=>i.map(e=>l({type:"bar"},e,{layout:A?"horizontal":"vertical"})),[A,i]),R=A?void 0:O,D=e.useMemo(()=>n?A?n:n.map(e=>l({scaleType:"band"},e)):R,[R,A,n]),$=A?j:void 0,N=e.useMemo(()=>r?A?r.map(e=>l({scaleType:"band"},e)):r:$,[$,A,r]),_=l({},E,{series:L,width:o,height:a,margin:s,colors:c,dataset:u,xAxis:D,yAxis:N,highlightedItem:I,onHighlightChange:w,disableAxisListener:"axis"!==g?.tooltip?.trigger&&"none"===p?.x&&"none"===p?.y,className:M,skipAnimation:y,brushConfig:C,plugins:TR}),F={onItemClick:x,slots:f,slotProps:g,borderRadius:k,renderer:P,barLabel:S},H={vertical:h?.vertical,horizontal:h?.horizontal},B={clipPath:`url(#${T})`},V={id:T},U={slots:f,slotProps:g,loading:v},Y={slots:f,slotProps:g},K=l({},A?{y:"band"}:{x:"band"},p),q={slots:f,slotProps:g};return{chartsWrapperProps:{sx:d,legendPosition:t.slotProps?.legend?.position,legendDirection:t.slotProps?.legend?.direction,hideLegend:t.hideLegend??!1},chartContainerProps:_,barPlotProps:F,gridProps:H,clipPathProps:V,clipPathGroupProps:B,overlayProps:U,chartsAxisProps:Y,axisHighlightProps:K,legendProps:q,children:m}};function jR(e){const t=xm(),n=MO(),r=dP(),{xAxis:i,xAxisIds:o}=_x(),{yAxis:a,yAxisIds:s}=Fx();if(null===n||"bar"!==n.type||!r)return null;const c=r.series[n.seriesId];if(null==c.data[n.dataIndex])return null;const u=c.xAxisId??o[0],d=c.yAxisId??s[0],p=i[u],h=a[d],m="vertical"===r.series[n.seriesId].layout,f=r.stackingGroups.findIndex(e=>e.ids.includes(n.seriesId)),g=Ol({verticalLayout:m,xAxisConfig:p,yAxisConfig:h,series:c,dataIndex:n.dataIndex,numberOfGroups:r.stackingGroups.length,groupIndex:f});if(null===g)return null;const{x:y,y:v,height:b,width:x}=g;return(0,O.jsx)("rect",l({fill:"none",stroke:(t.vars??t).palette.text.primary,strokeWidth:2,x:y-3,y:v-3,width:x+6,height:b+6,rx:3,ry:3},e))}const LR=e.forwardRef(function(e,t){const n=Lh({props:e,name:"MuiBarChart"}),{chartsWrapperProps:r,chartContainerProps:i,barPlotProps:o,gridProps:a,clipPathProps:s,clipPathGroupProps:c,overlayProps:u,chartsAxisProps:d,axisHighlightProps:p,legendProps:h,children:m}=OR(n),{chartDataProviderProps:f,chartsSurfaceProps:g}=yL(i,t),y=n.slots?.tooltip??LC,v=n.slots?.toolbar;return(0,O.jsx)(SO,l({},f,{children:(0,O.jsxs)(FO,l({},r,{children:[n.showToolbar&&v?(0,O.jsx)(v,l({},n.slotProps?.toolbar)):null,!n.hideLegend&&(0,O.jsx)(XC,l({},h)),(0,O.jsxs)(mI,l({},g,{children:[(0,O.jsx)(FM,l({},a)),(0,O.jsxs)("g",l({},c,{children:[(0,O.jsx)(vO,l({},o)),(0,O.jsx)(GO,l({},u)),(0,O.jsx)(_C,l({},p)),(0,O.jsx)(jR,{})]})),(0,O.jsx)($O,l({},d)),(0,O.jsx)(ZC,l({},s)),m]})),!n.loading&&(0,O.jsx)(y,l({},n.slotProps?.tooltip))]}))}))}),RR=["initialZoom","zoomData","onZoomChange","zoomInteractionConfig","plugins","apiRef"],DR=[Xs,Mb,Ys,Ws,Bs,Zs,Bb,kx,Ix,tx],$R=["initialZoom","zoomData","onZoomChange","apiRef","showToolbar"],zR=e.forwardRef(function(e,t){const n=Lh({props:e,name:"MuiBarChartPro"}),{initialZoom:r,zoomData:i,onZoomChange:o,apiRef:a,showToolbar:s}=n,c=tt(n,$R),{chartsWrapperProps:u,chartContainerProps:d,barPlotProps:p,gridProps:h,clipPathProps:m,clipPathGroupProps:f,overlayProps:g,chartsAxisProps:y,axisHighlightProps:v,legendProps:b,children:x}=OR(c),{chartDataProviderProProps:I,chartsSurfaceProps:w}=((e,t)=>{const n=e,{initialZoom:r,zoomData:i,onZoomChange:o,zoomInteractionConfig:a,plugins:s,apiRef:c}=n,u=tt(n,RR),{chartDataProviderProps:d,chartsSurfaceProps:p,children:h}=yL(u,t);return{chartDataProviderProProps:l({},d,{initialZoom:r,zoomData:i,onZoomChange:o,zoomInteractionConfig:a,apiRef:c,plugins:s??wx}),chartsSurfaceProps:p,children:h}})(l({},d,{initialZoom:r,zoomData:i,onZoomChange:o,apiRef:a,plugins:DR}),t),k=n.slots?.tooltip??LC,S=n.slots?.toolbar??kA;return(0,O.jsx)(Rx,l({},I,{children:(0,O.jsxs)(FO,l({},u,{children:[s?(0,O.jsx)(S,l({},n.slotProps?.toolbar)):null,!n.hideLegend&&(0,O.jsx)(XC,l({},b)),(0,O.jsxs)(mI,l({},w,{children:[(0,O.jsx)(FM,l({},h)),(0,O.jsxs)("g",l({},f,{children:[(0,O.jsx)(vO,l({},p)),(0,O.jsx)(GO,l({},g)),(0,O.jsx)(_C,l({},v))]})),(0,O.jsx)($O,l({},y)),(0,O.jsx)(DT,{}),(0,O.jsx)(WT,{}),(0,O.jsx)(ZC,l({},m)),x]})),!n.loading&&(0,O.jsx)(k,l({},n.slotProps?.tooltip))]}))}))});function NR(e){return NR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},NR(e)}function _R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FR(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&(ne.initialZoom=X),ne.onZoomChange=J,$&&(ne.showToolbar=!0),z&&(ne.brushConfig=z),N&&(ne.zoomInteractionConfig=N));var re=A&&A.length>0?A.map(function(e,t){return n().createElement(VT,{key:"ref-line-".concat(t),x:e.x,y:e.y,axisId:e.axisId,label:e.label||void 0,labelAlign:e.labelAlign||"middle",lineStyle:e.lineStyle||void 0,labelStyle:e.labelStyle||void 0,spacing:e.spacing||void 0})}):null,ie=B?zR:LR;return n().createElement("div",{id:r},n().createElement(ie,ne,re))}function WR(e){return WR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},WR(e)}function GR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KR(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.open?i||"#4caf50":o||"#f44336",g=u(Math.max(e.open,e.close)),y=u(Math.min(e.open,e.close)),v=u(e.high),b=u(e.low),x=Math.max(1,y-g);return n().createElement("g",{key:t,style:{cursor:l?"pointer":"default"},onClick:l?function(n){return l(n,t,e)}:void 0},n().createElement("line",{x1:p,y1:v,x2:p,y2:g,stroke:f,strokeWidth:s||2}),n().createElement("line",{x1:p,y1:y,x2:p,y2:b,stroke:f,strokeWidth:s||2}),n().createElement("rect",{x:p-m/2,y:g,width:m,height:x,fill:f,stroke:f,strokeWidth:1,rx:1}))}))}function nD(e){var t=e.volumeData,r=e.labels,i=e.ohlcData,o=e.upColor,a=e.downColor,s=e.maxHeightRatio,l=uk(),c=Nx(),u=(c.left,c.top),d=c.width,p=c.height;if(!l||!t||0===t.length)return null;var h=l.bandwidth?l.bandwidth():d/t.length,m=.5*h,f=Math.max.apply(Math,ZR(t));if(0===f)return null;var g=p*(s||.2),y=u+p;return n().createElement("g",{opacity:.3},t.map(function(e,t){var s=r[t],c=l(s);if(void 0===c||0===e)return null;var u=c+h/2,d=e/f*g,p=i[t]&&i[t].close>=i[t].open?o||"#4caf50":a||"#f44336";return n().createElement("rect",{key:t,x:u-m/2,y:y-d,width:m,height:d,fill:p,rx:1})}))}function rD(t){var r=t.ohlcData,i=t.labels,o=t.tooltipEnabled,a=uk(),s=(dk(),Nx()),l=s.left,c=s.top,u=s.width,d=s.height,p=XR((0,e.useState)(null),2),h=p[0],m=p[1],f=(0,e.useRef)(null);if(!o||!a||!r||0===r.length)return null;var g=a.bandwidth?a.bandwidth():u/r.length,y=null!==h?r[h]:null;return n().createElement(n().Fragment,null,n().createElement("rect",{x:l,y:c,width:u,height:d,fill:"transparent",onMouseMove:function(e){var t=e.currentTarget.ownerSVGElement||e.currentTarget.closest("svg");if(t){var n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;var r=n.matrixTransform(t.getScreenCTM().inverse());if(r.xl+u||r.yc+d)m(null);else{for(var o=0;o=s&&r.x=y.open?"#4caf50":"#f44336"}},y.close))))))}function iD(t){var r=t.id,i=t.series,o=void 0===i?[]:i,a=t.dataset,l=t.xAxis,c=t.yAxis,u=t.height,d=void 0===u?400:u,p=t.width,h=t.margin,m=t.grid,f=t.skipAnimation,g=void 0!==f&&f,y=t.hideLegend,v=void 0===y||y,b=t.tooltip,x=t.referenceLines,I=void 0===x?[]:x,w=t.bodyWidthRatio,k=t.wickWidth,S=t.showVolume,M=void 0!==S&&S,C=t.volumeHeightRatio,P=t.licenseKey,E=t.initialZoom,T=t.showSlider,A=void 0!==T&&T,O=t.showToolbar,j=void 0!==O&&O,L=t.zoomInteractionConfig,R=(t.clickData,t.hoverData,t.zoomData,t.setProps),D=(0,e.useId)();P&&!eD&&(s.setLicenseKey(P),eD=!0);var $=(0,e.useMemo)(function(){var e=o[0]||{},t=[],n=[],r=[],i=e.upColor||"#4caf50",s=e.downColor||"#f44336";if(e.data&&Array.isArray(e.data))t=e.data.map(function(e){return Array.isArray(e)?{open:e[0],high:e[1],low:e[2],close:e[3]}:e});else if(a&&e.datasetKeys){var c=e.datasetKeys;t=a.map(function(e){return{open:e[c.open||"open"],high:e[c.high||"high"],low:e[c.low||"low"],close:e[c.close||"close"]}})}return l&&l[0]&&(l[0].data?n=l[0].data:l[0].dataKey&&a&&(n=a.map(function(e){return e[l[0].dataKey]}))),0===n.length&&(n=t.map(function(e,t){return String(t)})),e.volumeKey&&a?r=a.map(function(t){return t[e.volumeKey]||0}):e.volume&&Array.isArray(e.volume)&&(r=e.volume),{ohlcData:t,labels:n,volumeData:r,upColor:i,downColor:s}},[o,a,l]),z=$.ohlcData,N=$.labels,_=$.volumeData,F=$.upColor,H=$.downColor,B=(0,e.useMemo)(function(){if(0===z.length)return{min:0,max:100};var e=z.map(function(e){return e.low}),t=z.map(function(e){return e.high}),n=Math.min.apply(Math,ZR(e)),r=Math.max.apply(Math,ZR(t)),i=.05*(r-n);return{min:n-i,max:r+i}},[z]),V=XR((0,e.useState)(function(){return E&&Array.isArray(E)?E:[]}),2),U=V[0],Y=V[1],W=(0,e.useRef)(JSON.stringify(E||[])),G=(0,e.useCallback)(function(e){var t="function"==typeof e?e(U):e;Y(t),W.current=JSON.stringify(t),R&&R({zoomData:t})},[R,U]),K=(0,e.useCallback)(function(e,t,n){R&&R({clickData:{dataIndex:t,label:N[t],open:n.open,high:n.high,low:n.low,close:n.close,timestamp:(new Date).toISOString()}})},[R,N]),q={height:d,series:(0,e.useMemo)(function(){return[{type:"bar",id:"__candle_placeholder",data:z.map(function(e){return e.close}),color:"transparent",highlightScope:{highlight:"none",fade:"none"}}]},[z]),xAxis:(0,e.useMemo)(function(){var e=l&&l[0]?KR({},l[0]):{},t=KR({id:e.id||"x-axis-candle",scaleType:"band",data:N},e);if(A){var n=t.zoom||{},r=!0===n?{}:"object"===WR(n)?n:{};t.zoom=KR(KR({},r),{},{slider:KR(KR({},r.slider),{},{enabled:!0})})}return[t]},[l,N,A]),yAxis:(0,e.useMemo)(function(){var e=c&&c[0]?KR({},c[0]):{};return[KR(KR(KR({id:e.id||"y-axis-candle",min:B.min,max:B.max},e),void 0!==e.min?{min:e.min}:{min:B.min}),void 0!==e.max?{max:e.max}:{max:B.max})]},[c,B]),onZoomChange:G};p&&(q.width=p),h&&(q.margin=h),g&&(q.skipAnimation=g),L&&(q.zoomInteractionConfig=L),U&&U.length>0&&(q.initialZoom=U);var X=!b||"none"!==b.trigger;return n().createElement("div",{id:r},n().createElement(Rx,q,j&&n().createElement(kA,null),!v&&n().createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:8}},n().createElement(XC,null)),n().createElement(mI,null,n().createElement(ZC,{id:D}),m&&n().createElement(FM,{horizontal:m.horizontal,vertical:m.vertical}),n().createElement("g",{clipPath:"url(#".concat(D,")")},M&&_.length>0&&n().createElement(nD,{volumeData:_,labels:N,ohlcData:z,upColor:F,downColor:H,maxHeightRatio:C}),n().createElement(tD,{ohlcData:z,labels:N,upColor:F,downColor:H,bodyWidthRatio:w,wickWidth:k,onCandleClick:K})),n().createElement(gM,null),n().createElement(OM,null),I&&I.map(function(e,t){return n().createElement(VT,{key:"ref-line-".concat(t),x:e.x,y:e.y,axisId:e.axisId,label:e.label||void 0,labelAlign:e.labelAlign||"middle",lineStyle:e.lineStyle||void 0,labelStyle:e.labelStyle||void 0,spacing:e.spacing||void 0})}),n().createElement(rD,{ohlcData:z,labels:N,tooltipEnabled:X}),A&&n().createElement(DT,null))))}iD.propTypes={id:i().string,series:i().arrayOf(i().object),dataset:i().arrayOf(i().object),xAxis:i().arrayOf(i().object),yAxis:i().arrayOf(i().object),height:i().number,width:i().number,margin:i().exact({top:i().number,bottom:i().number,left:i().number,right:i().number}),grid:i().exact({horizontal:i().bool,vertical:i().bool}),skipAnimation:i().bool,hideLegend:i().bool,tooltip:i().exact({trigger:i().oneOf(["item","none"])}),bodyWidthRatio:i().number,wickWidth:i().number,showVolume:i().bool,volumeHeightRatio:i().number,referenceLines:i().arrayOf(i().object),licenseKey:i().string,initialZoom:i().arrayOf(i().object),showSlider:i().bool,showToolbar:i().bool,zoomInteractionConfig:i().object,clickData:i().object,hoverData:i().object,zoomData:i().arrayOf(i().object),setProps:i().func};const oD={};function aD(t,n){const r=e.useRef(oD);return r.current===oD&&(r.current=t(n)),r}function sD(e,t,n,r){const i=aD(lD).current;return function(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}(i,e,t,n,r)&&function(e,t){e.refs=t,t.every(e=>null==e)?e.callback=null:e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){const r=Array(t.length).fill(null);for(let e=0;e{for(let e=0;e=19?function(t,n,r,i,o){const a=e.useCallback(()=>n(t.getSnapshot(),r,i,o),[t,n,r,i,o]);return(0,N.useSyncExternalStore)(t.subscribe,a,a)}:function(e,t,n,r,i){return(0,_.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))};function uD(e,t,n,r,i){return cD(e,t,n,r,i)}function dD(e){return Ig("MuiAlert",e)}const pD=wg("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),hD=ob((0,O.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),mD=ob((0,O.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),fD=ob((0,O.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),gD=ob((0,O.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),yD=ob((0,O.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),vD=bm(Zv,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Cm(n.color||n.severity)}`]]}})(wm(({theme:e})=>{const t="light"===e.palette.mode?sp:cp,n="light"===e.palette.mode?cp:sp;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(vy(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${pD.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(vy(["light"])).map(([n])=>({props:{colorSeverity:n,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),border:`1px solid ${(e.vars||e).palette[n].light}`,[`& .${pD.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}})),...Object.entries(e.palette).filter(vy(["dark"])).map(([t])=>({props:{colorSeverity:t,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${t}FilledColor`],backgroundColor:e.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:"dark"===e.palette.mode?e.palette[t].dark:e.palette[t].main,color:e.palette.getContrastText(e.palette[t].main)}}}))]}})),bD=bm("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),xD=bm("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),ID=bm("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),wD={success:(0,O.jsx)(hD,{fontSize:"inherit"}),warning:(0,O.jsx)(mD,{fontSize:"inherit"}),error:(0,O.jsx)(fD,{fontSize:"inherit"}),info:(0,O.jsx)(gD,{fontSize:"inherit"})},kD=e.forwardRef(function(e,t){const n=Mm({props:e,name:"MuiAlert"}),{action:r,children:i,className:o,closeText:a="Close",color:s,components:l={},componentsProps:c={},icon:u,iconMapping:d=wD,onClose:p,role:h="alert",severity:m="success",slotProps:f={},slots:g={},variant:y="standard",...v}=n,b={...n,color:s,severity:m,variant:y,colorSeverity:s||m},x=(e=>{const{variant:t,color:n,severity:r,classes:i}=e;return Gh({root:["root",`color${Cm(n||r)}`,`${t}${Cm(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]},dD,i)})(b),I={slots:{closeButton:l.CloseButton,closeIcon:l.CloseIcon,...g},slotProps:{...c,...f}},[w,k]=Ng("root",{ref:t,shouldForwardComponentProp:!0,className:Hh(x.root,o),elementType:vD,externalForwardedProps:{...I,...v},ownerState:b,additionalProps:{role:h,elevation:0}}),[S,M]=Ng("icon",{className:x.icon,elementType:bD,externalForwardedProps:I,ownerState:b}),[C,P]=Ng("message",{className:x.message,elementType:xD,externalForwardedProps:I,ownerState:b}),[E,T]=Ng("action",{className:x.action,elementType:ID,externalForwardedProps:I,ownerState:b}),[A,j]=Ng("closeButton",{elementType:sv,externalForwardedProps:I,ownerState:b}),[L,R]=Ng("closeIcon",{elementType:yD,externalForwardedProps:I,ownerState:b});return(0,O.jsxs)(w,{...k,children:[!1!==u?(0,O.jsx)(S,{...M,children:u||d[m]||wD[m]}):null,(0,O.jsx)(C,{...P,children:i}),null!=r?(0,O.jsx)(E,{...T,children:r}):null,null==r&&p?(0,O.jsx)(E,{...T,children:(0,O.jsx)(A,{size:"small","aria-label":a,title:a,color:"inherit",onClick:p,...j,children:(0,O.jsx)(L,{fontSize:"small",...R})})}):null]})}),SD=kD;function MD(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let e=0;en.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n},PD=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t},ED=function(e,t,n){return"function"==typeof e?e(t,n):e},TD=function(t){const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1,...a}=t,s=o?{}:ED(r,i),{props:l,internalRef:c}=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=Hh(n?.className,o,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},a={...n,...i,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=CD({...i,...r}),s=PD(r),l=PD(i),c=t(a),u=Hh(c?.className,n?.className,o,i?.className,r?.className),d={...c?.style,...n?.style,...i?.style,...r?.style},p={...c,...n,...l,...s};return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}}({...a,externalSlotProps:s}),u=function(...t){const n=e.useRef(void 0),r=e.useCallback(e=>{const n=t.map(t=>{if(null==t)return null;if("function"==typeof t){const n=t,r=n(e);return"function"==typeof r?r:()=>{n(null)}}return t.current=e,()=>{t.current=null}});return()=>{n.forEach(e=>e?.())}},t);return e.useMemo(()=>t.every(e=>null==e)?null:e=>{n.current&&(n.current(),n.current=void 0),null!=e&&(n.current=r(e))},t)}(c,s?.ref,t.additionalProps?.ref);return function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(n,{...l,ref:u},i)},AD=e=>e,OD=(()=>{let e=AD;return{configure(t){e=t},generate:t=>e(t),reset(){e=AD}}})(),jD={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function LD(e,t,n="Mui"){const r=jD[t];return r?`${n}-${r}`:`${OD.generate(e)}-${t}`}function RD(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=LD(e,t,n)}),r}function DD(e){return LD("MuiRichTreeView",e)}function $D(e){return Lh}RD("MuiRichTreeView",["root","item","itemContent","itemGroupTransition","itemIconContainer","itemLabel","itemCheckbox","itemLabelInput"]);const zD=Object.freeze([]),ND=Object.freeze({}),_D=e.createContext(null),FD=()=>{const t=e.useContext(_D);if(null==t)throw new Error(["MUI X: Could not find the Tree View context.","It looks like you rendered your component outside of a SimpleTreeView or RichTreeView parent component.","This can also happen if you are bundling multiple versions of the Tree View."].join("\n"));return t},HD=e.createContext({classes:{},slots:{},slotProps:{}}),BD=()=>e.useContext(HD);function VD(t){const{store:n,apiRef:r,rootRef:i,classes:o=ND,slots:a=ND,slotProps:s=ND,children:l}=t,c=(t=>{const{store:n,apiRef:r,rootRef:i}=t,o=aD(()=>n.buildPublicAPI()).current;!function(e,t){null!=t&&null==t.current&&(t.current=e)}(o,r);const a=e.useCallback(e=>{let t=null,r=null;const i=[],o={};n.itemPluginManager.listPlugins().forEach(n=>{const a=n({props:e,rootRef:t,contentRef:r});a?.rootRef&&(t=a.rootRef),a?.contentRef&&(r=a.contentRef),a?.propsEnhancers&&(i.push(a.propsEnhancers),Object.keys(a.propsEnhancers).forEach(e=>{o[e]=!0}))});const a=Object.fromEntries(Object.keys(o).map(e=>{return[e,(t=e,e=>{const n={};return i.forEach(r=>{const i=r[t];null!=i&&Object.assign(n,i(e))}),n})];var t}));return{contentRef:r,rootRef:t,propsEnhancers:a}},[n]),s=e.useCallback(({itemId:e,children:t,idAttribute:r})=>{let i=t;const o=n.itemPluginManager.listWrappers();for(let t=o.length-1;t>=0;t-=1)i=(0,o[t])({store:n,itemId:e,children:i,idAttribute:r});return i},[n]);return e.useMemo(()=>({runItemPlugins:a,wrapItem:s,publicAPI:o,store:n,rootRef:i}),[a,s,o,n,i])})({store:n,apiRef:r,rootRef:i}),u=e.useMemo(()=>({classes:o,slots:{collapseIcon:a.collapseIcon,expandIcon:a.expandIcon,endIcon:a.endIcon},slotProps:{collapseIcon:s.collapseIcon,expandIcon:s.expandIcon,endIcon:s.endIcon}}),[o,a.collapseIcon,a.expandIcon,a.endIcon,s.collapseIcon,s.expandIcon,s.endIcon]);return(0,O.jsx)(_D.Provider,{value:c,children:(0,O.jsx)(HD.Provider,{value:u,children:l})})}const UD=Object.is;function YD(e,t){if(e===t)return!0;if(!(e instanceof Object&&t instanceof Object))return!1;let n=0,r=0;for(const r in e){if(n+=1,!UD(e[r],t[r]))return!1;if(!(r in t))return!1}for(const e in t)r+=1;return n===r}function WD(e){return Ig("MuiCollapse",e)}wg("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const GD=bm("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})(wm(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:e})=>"exited"===e.state&&!e.in&&"0px"===e.collapsedSize,style:{visibility:"hidden"}}]}))),KD=bm("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),qD=bm("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),XD=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:a,collapsedSize:s="0px",component:l,easing:c,in:u,onEnter:d,onEntered:p,onEntering:h,onExit:m,onExited:f,onExiting:g,orientation:y="vertical",style:v,timeout:b=ch.standard,TransitionComponent:x=_m,...I}=r,w={...r,orientation:y,collapsedSize:s},k=(e=>{const{orientation:t,classes:n}=e;return Gh({root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]},WD,n)})(w),S=xm(),M=Wh(),C=e.useRef(null),P=e.useRef(),E="number"==typeof s?`${s}px`:s,T="horizontal"===y,A=T?"width":"height",j=e.useRef(null),L=Vm(n,j),R=e=>t=>{if(e){const n=j.current;void 0===t?e(n):e(n,t)}},D=()=>C.current?C.current[T?"clientWidth":"clientHeight"]:0,$=R((e,t)=>{C.current&&T&&(C.current.style.position="absolute"),e.style[A]=E,d&&d(e,t)}),z=R((e,t)=>{const n=D();C.current&&T&&(C.current.style.position="");const{duration:r,easing:i}=Hm({style:v,timeout:b,easing:c},{mode:"enter"});if("auto"===b){const t=S.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,P.current=t}else e.style.transitionDuration="string"==typeof r?r:`${r}ms`;e.style[A]=`${n}px`,e.style.transitionTimingFunction=i,h&&h(e,t)}),N=R((e,t)=>{e.style[A]="auto",p&&p(e,t)}),_=R(e=>{e.style[A]=`${D()}px`,m&&m(e)}),F=R(f),H=R(e=>{const t=D(),{duration:n,easing:r}=Hm({style:v,timeout:b,easing:c},{mode:"exit"});if("auto"===b){const n=S.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,P.current=n}else e.style.transitionDuration="string"==typeof n?n:`${n}ms`;e.style[A]=E,e.style.transitionTimingFunction=r,g&&g(e)});return(0,O.jsx)(x,{in:u,onEnter:$,onEntered:N,onEntering:z,onExit:_,onExited:F,onExiting:H,addEndListener:e=>{"auto"===b&&M.start(P.current||0,e),i&&i(j.current,e)},nodeRef:j,timeout:"auto"===b?null:b,...I,children:(e,{ownerState:t,...n})=>(0,O.jsx)(GD,{as:l,className:Hh(k.root,a,{entered:k.entered,exited:!u&&"0px"===E&&k.hidden}[e]),style:{[T?"minWidth":"minHeight"]:E,...v},ref:L,ownerState:{...w,state:e},...n,children:(0,O.jsx)(KD,{ownerState:{...w,state:e},className:k.wrapper,ref:C,children:(0,O.jsx)(qD,{ownerState:{...w,state:e},className:k.wrapperInner,children:o})})})})});XD&&(XD.muiSupportAuto=!0);const ZD=XD,JD=e.createContext(void 0);function QD(e){return Ig("PrivateSwitchBase",e)}wg("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const e$=bm(Yy,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),t$=bm("input",{name:"MuiSwitchBase",shouldForwardProp:ym})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),n$=e.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:d,inputProps:p,inputRef:h,name:m,onBlur:f,onChange:g,onFocus:y,readOnly:v,required:b=!1,tabIndex:x,type:I,value:w,slots:k={},slotProps:S={},...M}=t,[C,P]=zg({controlled:i,default:Boolean(a),name:"SwitchBase",state:"checked"}),E=e.useContext(JD);let T=s;E&&void 0===T&&(T=E.disabled);const A="checkbox"===I||"radio"===I,j={...t,checked:C,disabled:T,disableFocusRipple:l,edge:c},L=(e=>{const{classes:t,checked:n,disabled:r,edge:i}=e;return Gh({root:["root",n&&"checked",r&&"disabled",i&&`edge${Cm(i)}`],input:["input"]},QD,t)})(j),R={slots:k,slotProps:{input:p,...S}},[D,$]=Ng("root",{ref:n,elementType:e$,className:L.root,shouldForwardComponentProp:!0,externalForwardedProps:{...R,component:"span",...M},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{y&&y(e),E&&E.onFocus&&E.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{f&&f(e),E&&E.onBlur&&E.onBlur(e)})(t)}}),ownerState:j,additionalProps:{centerRipple:!0,focusRipple:!l,disabled:T,role:void 0,tabIndex:null}}),[z,N]=Ng("input",{ref:h,elementType:t$,className:L.input,externalForwardedProps:R,getSlotProps:e=>({onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;P(t),g&&g(e,t)})(t)}}),ownerState:j,additionalProps:{autoFocus:r,checked:i,defaultChecked:a,disabled:T,id:A?d:void 0,name:m,readOnly:v,required:b,tabIndex:x,type:I,..."checkbox"===I&&void 0===w?{}:{value:w}}});return(0,O.jsxs)(D,{...$,children:[(0,O.jsx)(z,{...N}),C?o:u]})}),r$=n$,i$=ob((0,O.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),o$=ob((0,O.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),a$=ob((0,O.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function s$(e){return Ig("MuiCheckbox",e)}const l$=wg("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);function c$(e,t){if(!e)return t;if("function"==typeof e||"function"==typeof t)return n=>{const r="function"==typeof t?t(n):t,i="function"==typeof e?e({...n,...r}):e,o=Hh(n?.className,r?.className,i?.className);return{...r,...i,...!!o&&{className:o},...r?.style&&i?.style&&{style:{...r.style,...i.style}},...r?.sx&&i?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(i.sx)?i.sx:[i.sx]]}}};const n=t,r=Hh(n?.className,e?.className);return{...t,...e,...!!r&&{className:r},...n?.style&&e?.style&&{style:{...n.style,...e.style}},...n?.sx&&e?.sx&&{sx:[...Array.isArray(n.sx)?n.sx:[n.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const u$=bm(r$,{shouldForwardProp:e=>ym(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Cm(n.size)}`],"default"!==n.color&&t[`color${Cm(n.color)}`]]}})(wm(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:op(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:op(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t},style:{[`&.${l$.checked}, &.${l$.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${l$.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),d$=(0,O.jsx)(o$,{}),p$=(0,O.jsx)(i$,{}),h$=(0,O.jsx)(a$,{}),m$=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiCheckbox"}),{checkedIcon:i=d$,color:o="primary",icon:a=p$,indeterminate:s=!1,indeterminateIcon:l=h$,inputProps:c,size:u="medium",disableRipple:d=!1,className:p,slots:h={},slotProps:m={},...f}=r,g=s?l:a,y=s?l:i,v={...r,disableRipple:d,color:o,indeterminate:s,size:u},b=(e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o=Gh({root:["root",n&&"indeterminate",`color${Cm(r)}`,`size${Cm(i)}`]},s$,t);return{...t,...o}})(v),x=m.input??c,[I,w]=Ng("root",{ref:n,elementType:u$,className:Hh(b.root,p),shouldForwardComponentProp:!0,externalForwardedProps:{slots:h,slotProps:m,...f},ownerState:v,additionalProps:{type:"checkbox",icon:e.cloneElement(g,{fontSize:g.props.fontSize??u}),checkedIcon:e.cloneElement(y,{fontSize:y.props.fontSize??u}),disableRipple:d,slots:h,slotProps:{input:c$("function"==typeof x?x(v):x,{"data-indeterminate":s})}}});return(0,O.jsx)(I,{...w,classes:b})}),f$=m$,g$=ne({memoize:J,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),y$=(e,t,n,r,i,o,a,s,...l)=>{if(l.length>0)throw new Error("Unsupported number of selectors");let c;if(e&&t&&n&&r&&i&&o&&a&&s)c=(l,c,u,d)=>{const p=e(l,c,u,d),h=t(l,c,u,d),m=n(l,c,u,d),f=r(l,c,u,d),g=i(l,c,u,d),y=o(l,c,u,d),v=a(l,c,u,d);return s(p,h,m,f,g,y,v,c,u,d)};else if(e&&t&&n&&r&&i&&o&&a)c=(s,l,c,u)=>{const d=e(s,l,c,u),p=t(s,l,c,u),h=n(s,l,c,u),m=r(s,l,c,u),f=i(s,l,c,u),g=o(s,l,c,u);return a(d,p,h,m,f,g,l,c,u)};else if(e&&t&&n&&r&&i&&o)c=(a,s,l,c)=>{const u=e(a,s,l,c),d=t(a,s,l,c),p=n(a,s,l,c),h=r(a,s,l,c),m=i(a,s,l,c);return o(u,d,p,h,m,s,l,c)};else if(e&&t&&n&&r&&i)c=(o,a,s,l)=>{const c=e(o,a,s,l),u=t(o,a,s,l),d=n(o,a,s,l),p=r(o,a,s,l);return i(c,u,d,p,a,s,l)};else if(e&&t&&n&&r)c=(i,o,a,s)=>{const l=e(i,o,a,s),c=t(i,o,a,s),u=n(i,o,a,s);return r(l,c,u,o,a,s)};else if(e&&t&&n)c=(r,i,o,a)=>{const s=e(r,i,o,a),l=t(r,i,o,a);return n(s,l,i,o,a)};else if(e&&t)c=(n,r,i,o)=>{const a=e(n,r,i,o);return t(a,r,i,o)};else{if(!e)throw new Error("Missing arguments");c=e}return c},v$=(...e)=>{const t=new WeakMap;let n=1;const r=e[e.length-1],i=e.length-1||1,o=Math.max(r.length-i,0);if(o>3)throw new Error("Unsupported number of arguments");return(i,a,s,l)=>{let c=i.__cacheKey__;c||(c={id:n},i.__cacheKey__=c,n+=1);let u=t.get(c);if(!u){const n=1===e.length?[e=>e,r]:e;let i=e;const a=[void 0,void 0,void 0];switch(o){case 0:break;case 1:i=[...n.slice(0,-1),()=>a[0],r];break;case 2:i=[...n.slice(0,-1),()=>a[0],()=>a[1],r];break;case 3:i=[...n.slice(0,-1),()=>a[0],()=>a[1],()=>a[2],r];break;default:throw new Error("Unsupported number of arguments")}u=g$(...i),u.selectorArgs=a,t.set(c,u)}switch(o){case 3:u.selectorArgs[2]=l;case 2:u.selectorArgs[1]=s;case 1:u.selectorArgs[0]=a}switch(o){case 0:return u(i);case 1:return u(i,a);case 2:return u(i,a,s);case 3:return u(i,a,s,l);default:throw new Error("unreachable")}}},b$="__TREE_VIEW_ROOT_PARENT_ID__",x$=e=>{const t={};return e.forEach((e,n)=>{t[e]=n}),t},I$=(e,t)=>{if(null==t)return!1;let n=e[t];if(!n)return!1;if(n.disabled)return!0;for(;null!=n.parentId;){if(n=e[n.parentId],!n)return!1;if(n.disabled)return!0}return!1};function w$(e){const{storeParameters:t,items:n,parentId:r,depth:i,isItemExpandable:o,otherItemsMetaLookup:a}=e,s={},l={},c=[],u=[],d=e=>{const n=t.getItemId?t.getItemId(e):e.id;!function({id:e,parentId:t,item:n,itemMetaLookup:r,siblingsMetaLookup:i}){if(null==e)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.","An item was provided without id in the `items` prop:",JSON.stringify(n)].join("\n"));if(null!=i[e]||null!=r[e]&&r[e].parentId!==t)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.",`Two items were provided with the same id in the \`items\` prop: "${e}"`].join("\n"))}({id:n,parentId:r,item:e,itemMetaLookup:a,siblingsMetaLookup:s});const d=t.getItemLabel?t.getItemLabel(e):e.label;if(null==d)throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.","Alternatively, you can use the `getItemLabel` prop to specify a custom label for each item.","An item was provided without label in the `items` prop:",JSON.stringify(e)].join("\n"));const p=(t.getItemChildren?t.getItemChildren(e):e.children)||[];u.push({id:n,children:p}),l[n]=e,s[n]={id:n,label:d,parentId:r,idAttribute:void 0,expandable:o(e,p),disabled:!!t.isItemDisabled&&t.isItemDisabled(e),selectable:!t.isItemSelectionDisabled||!t.isItemSelectionDisabled(e),depth:i},c.push(n)};for(const e of n)d(e);return{metaLookup:s,modelLookup:l,orderedChildrenIds:c,childrenIndexes:x$(c),itemsChildren:u}}const k$=[],S$={domStructure:y$(e=>e.domStructure),disabledItemFocusable:y$(e=>e.disabledItemsFocusable),itemMetaLookup:y$(e=>e.itemMetaLookup),itemOrderedChildrenIdsLookup:y$(e=>e.itemOrderedChildrenIdsLookup),itemMeta:y$((e,t)=>e.itemMetaLookup[t??b$]??null),itemOrderedChildrenIds:y$((e,t)=>e.itemOrderedChildrenIdsLookup[t??b$]??k$),itemModel:y$((e,t)=>e.itemModelLookup[t]),isItemDisabled:y$((e,t)=>I$(e.itemMetaLookup,t)),itemIndex:y$((e,t)=>{const n=e.itemMetaLookup[t];return null==n?-1:e.itemChildrenIndexesLookup[n.parentId??b$][n.id]}),itemParentId:y$((e,t)=>e.itemMetaLookup[t]?.parentId??null),itemDepth:y$((e,t)=>e.itemMetaLookup[t]?.depth??0),canItemBeFocused:y$((e,t)=>e.disabledItemsFocusable||null!=e.itemModelLookup[t]&&!I$(e.itemMetaLookup,t)),itemChildrenIndentation:y$(e=>e.itemChildrenIndentation)},M$=v$(e=>e.expandedItems,e=>{const t=new Map;return e.forEach(e=>{t.set(e,!0)}),t}),C$={expandedItemsRaw:y$(e=>e.expandedItems),expandedItemsMap:M$,flatList:v$(S$.itemOrderedChildrenIdsLookup,M$,(e,t)=>(e[b$]??[]).flatMap(function n(r){if(!t.has(r))return[r];const i=[r],o=e[r]||[];for(const e of o)i.push(...n(e));return i})),triggerSlot:y$(e=>e.expansionTrigger),isItemExpanded:y$(M$,(e,t)=>e.has(t)),isItemExpandable:y$(S$.itemMeta,(e,t)=>e?.expandable??!1)},P$=v$(e=>e.selectedItems,e=>Array.isArray(e)?e:null!=e?[e]:[]),E$=v$(P$,e=>{const t=new Map;return e.forEach(e=>{t.set(e,!0)}),t}),T$=y$((e,t)=>e.itemMetaLookup[t]?.selectable??!0),A$={selectedItemsRaw:y$(e=>e.selectedItems),selectedItems:P$,selectedItemsMap:E$,enabled:y$(e=>!e.disableSelection),isMultiSelectEnabled:y$(e=>e.multiSelect),isCheckboxSelectionEnabled:y$(e=>e.checkboxSelection),propagationRules:y$(e=>e.selectionPropagation),isItemSelected:y$(E$,(e,t)=>e.has(t)),isFeatureEnabledForItem:y$(T$,e=>!e.disableSelection,(e,t,n)=>t&&e),canItemBeSelected:y$(S$.isItemDisabled,T$,e=>!e.disableSelection,(e,t,n,r)=>n&&!e&&t),isItemSelectable:T$},O$=v$(A$.selectedItems,C$.expandedItemsMap,S$.itemMetaLookup,S$.disabledItemFocusable,e=>S$.itemOrderedChildrenIds(e,null),(e,t,n,r,i)=>{const o=e.find(e=>{if(!r&&I$(n,e))return!1;const i=n[e];return i&&(null==i.parentId||t.has(i.parentId))});if(null!=o)return o;const a=i.find(e=>r||!I$(n,e));return null!=a?a:null}),j$={defaultFocusableItemId:O$,isItemTheDefaultFocusableItem:y$(O$,(e,t)=>e===t),focusedItemId:y$(e=>e.focusedItemId),isItemFocused:y$((e,t)=>e.focusedItemId===t)},L$={isEmpty:y$(e=>null==e.lazyLoadedItems||0===Object.keys(e.lazyLoadedItems.loading).length&&0===Object.keys(e.lazyLoadedItems.errors).length),isItemLoading:y$((e,t)=>e.lazyLoadedItems?.loading[t??b$]??!1),itemHasError:y$((e,t)=>!!e.lazyLoadedItems?.errors[t??b$]),itemError:y$((e,t)=>e.lazyLoadedItems?.errors[t??b$])},R$={isItemEditable:y$(e=>e.isItemEditable,S$.itemModel,(e,t,n)=>!(!t||null==e)&&("boolean"==typeof e?e:e(t))),isItemBeingEdited:y$((e,t)=>null!=t&&e.editedItemId===t),isAnyItemBeingEdited:y$(e=>!!e.editedItemId)},D$=e=>Array.isArray(e)?e.length>0&&e.some(D$):Boolean(e),$$=e.createContext(()=>-1),z$=(e,t)=>{let n=t.length-1;for(;n>=0&&!S$.canItemBeFocused(e,t[n]);)n-=1;if(-1!==n)return t[n]},N$=(e,t)=>{const n=S$.itemMeta(e,t);if(!n)return null;const r=S$.itemOrderedChildrenIds(e,n.parentId),i=S$.itemIndex(e,t);if(0===i)return n.parentId;let o=i-1;for(;!S$.canItemBeFocused(e,r[o])&&o>=0;)o-=1;if(-1===o)return null==n.parentId?null:N$(e,n.parentId);let a=r[o],s=z$(e,S$.itemOrderedChildrenIds(e,a));for(;C$.isItemExpanded(e,a)&&null!=s;)a=s,s=z$(e,S$.itemOrderedChildrenIds(e,a));return a},_$=(e,t)=>{if(C$.isItemExpanded(e,t)){const n=S$.itemOrderedChildrenIds(e,t).find(t=>S$.canItemBeFocused(e,t));if(null!=n)return n}let n=S$.itemMeta(e,t);for(;null!=n;){const t=S$.itemOrderedChildrenIds(e,n.parentId),r=S$.itemIndex(e,n.id);if(r{let t=null;for(;null==t||C$.isItemExpanded(e,t);){const n=S$.itemOrderedChildrenIds(e,t),r=z$(e,n);if(null==r)return t;t=r}return t},H$=e=>S$.itemOrderedChildrenIds(e,null).find(t=>S$.canItemBeFocused(e,t)),B$=(e,t,n)=>{if(t===n)return[t,n];const r=S$.itemMeta(e,t),i=S$.itemMeta(e,n);if(!r||!i)return[t,n];if(r.parentId===i.id||i.parentId===r.id)return i.parentId===r.id?[r.id,i.id]:[i.id,r.id];const o=[r.id],a=[i.id];let s=r.parentId,l=i.parentId,c=-1!==a.indexOf(s),u=-1!==o.indexOf(l),d=!0,p=!0;for(;!u&&!c;)d&&(o.push(s),c=-1!==a.indexOf(s),d=null!==s,!c&&d&&(s=S$.itemParentId(e,s))),p&&!c&&(a.push(l),u=-1!==o.indexOf(l),p=null!==l,!u&&p&&(l=S$.itemParentId(e,l)));const h=c?s:l,m=S$.itemOrderedChildrenIds(e,h),f=o[o.indexOf(h)-1],g=a[a.indexOf(h)-1];return m.indexOf(f)t!==e.closest('*[role="treeitem"]'),U$=y$(e=>e.providedTreeId??e.treeId),Y$={treeId:U$,treeItemIdAttribute:y$(U$,(e,t,n)=>null!=n?n:`${e??""}-${t}`)},W$=(e,t,n)=>"function"==typeof n?n(e,t):n;function G$(e){return LD("MuiTreeItem",e)}RD("MuiTreeItem",["root","content","groupTransition","iconContainer","label","checkbox","labelInput","dragAndDropOverlay","errorIcon","loadingIcon","expanded","selected","focused","disabled","editable","editing"]);const K$=ob((0,O.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"TreeViewExpandIcon"),q$=ob((0,O.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"TreeViewCollapseIcon"),X$=["ownerState"];function Z$(e,t,n){return void 0!==e?e:void 0!==t?t:n}function J$(e){const{slots:t,slotProps:n,status:r}=e,{slots:i,slotProps:o}=BD(),a={collapseIcon:Z$(t?.collapseIcon,i.collapseIcon,q$),expandIcon:Z$(t?.expandIcon,i.expandIcon,K$),endIcon:Z$(t?.endIcon,i.endIcon),icon:t?.icon};let s;s=a?.icon?"icon":r.expandable?r.expanded?"collapseIcon":"expandIcon":"endIcon";const c=a[s],u=tt(TD({elementType:c,externalSlotProps:e=>l({},ED(o[s],e),ED(n?.[s],e)),ownerState:{}}),X$);return c?(0,O.jsx)(c,l({},u)):null}const Q$=bm("div",{name:"MuiTreeItemDragAndDropOverlay",slot:"Root",shouldForwardProp:e=>QE(e)&&"action"!==e})(({theme:e})=>({position:"absolute",left:0,display:"flex",top:0,bottom:0,right:0,pointerEvents:"none",variants:[{props:{action:"make-child"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderRadius:e.shape.borderRadius,backgroundColor:e.vars?`rgba(${e.vars.palette.primary.darkChannel} / ${e.vars.palette.action.focusOpacity})`:op(e.palette.primary.dark,e.palette.action.focusOpacity)}},{props:{action:"reorder-above"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderTop:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"reorder-below"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"move-to-parent"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * calc(var(--TreeView-itemDepth) - 1))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}}]}));function ez(e){return null==e.action?null:(0,O.jsx)(Q$,l({},e))}function tz(t){const{children:n,itemId:r,id:i}=t,{wrapItem:o,store:a}=FD(),s=uD(a,Y$.treeItemIdAttribute,r,i);return(0,O.jsx)(e.Fragment,{children:o({children:n,itemId:r,store:a,idAttribute:s})})}const nz=bm("input",{name:"MuiTreeItem",slot:"LabelInput"})(({theme:e})=>l({},e.typography.body1,{width:"100%",backgroundColor:(e.vars||e).palette.background.paper,borderRadius:e.shape.borderRadius,border:"none",padding:"0 2px",boxSizing:"border-box","&:focus":{outline:`1px solid ${(e.vars||e).palette.primary.main}`}})),rz=["visible"],iz=["id","itemId","label","disabled","disableSelection","children","slots","slotProps","classes"],oz=$D(),az=bm("li",{name:"MuiTreeItem",slot:"Root"})({listStyle:"none",margin:0,padding:0,outline:0}),sz=bm("div",{name:"MuiTreeItem",slot:"Content",shouldForwardProp:e=>QE(e)&&"status"!==e})(({theme:e})=>({padding:e.spacing(.5,1),paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`,borderRadius:e.shape.borderRadius,width:"100%",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",gap:e.spacing(1),cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},"&[data-disabled]":{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent",cursor:"auto"},"&[data-focused]":{backgroundColor:(e.vars||e).palette.action.focus},"&[data-selected]":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:op(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:op(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:op(e.palette.primary.main,e.palette.action.selectedOpacity)}}},"&[data-selected][data-focused]":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:op(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}})),lz=bm("div",{name:"MuiTreeItem",slot:"Label",shouldForwardProp:e=>QE(e)&&"editable"!==e})(({theme:e})=>l({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative",overflow:"hidden"},e.typography.body1,{variants:[{props:({editable:e})=>e,style:{paddingLeft:"2px"}}]})),cz=bm("div",{name:"MuiTreeItem",slot:"IconContainer"})({width:16,display:"flex",flexShrink:0,justifyContent:"center",position:"relative",cursor:"inherit","& svg":{fontSize:18}}),uz=bm(ZD,{name:"MuiTreeItem",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition})({margin:0,padding:0}),dz=bm("div",{name:"MuiTreeItem",slot:"ErrorIcon"})({position:"absolute",right:-3,width:7,height:7,borderRadius:"50%",backgroundColor:"red"}),pz=bm(tv,{name:"MuiTreeItem",slot:"LoadingIcon"})({color:"text.primary"}),hz=bm(e.forwardRef((e,t)=>{const{visible:n}=e,r=tt(e,rz);return n?(0,O.jsx)(f$,l({},r,{ref:t})):null}),{name:"MuiTreeItem",slot:"Checkbox"})({padding:0}),mz=e.forwardRef(function(t,n){const r=oz({props:t,name:"MuiTreeItem"}),{id:i,itemId:o,label:a,disabled:s,disableSelection:c,children:u,slots:d={},slotProps:p={},classes:h}=r,m=tt(r,iz),{getContextProviderProps:f,getRootProps:g,getContentProps:y,getIconContainerProps:v,getCheckboxProps:b,getLabelProps:x,getGroupTransitionProps:I,getLabelInputProps:w,getDragAndDropOverlayProps:k,getErrorContainerProps:S,getLoadingContainerProps:M,status:C}=(t=>{const{runItemPlugins:n,publicAPI:r,store:i}=FD(),o=e.useContext($$),a=uD(i,W$,t.itemId,o),{id:s,itemId:c,label:u,children:d,rootRef:p}=t,{rootRef:h,contentRef:m,propsEnhancers:f}=n(t),{interactions:g,status:y}=(({itemId:e,children:t})=>{const{store:n,publicAPI:r}=FD(),i=uD(n,C$.isItemExpandable,e),o=uD(n,L$.isItemLoading,e),a=uD(n,L$.itemHasError,e),s=D$(t)||i,l=uD(n,C$.isItemExpanded,e),c=uD(n,j$.isItemFocused,e),u=uD(n,A$.isItemSelected,e),d=uD(n,S$.isItemDisabled,e),p=uD(n,R$.isItemBeingEdited,e),h=uD(n,R$.isItemEditable,e),m={expandable:s,expanded:l,focused:c,selected:u,disabled:d,editing:p,editable:h,loading:o,error:a},f=()=>{n.labelEditing&&(p?n.labelEditing.setEditedItem(null):n.labelEditing.setEditedItem(e))};return{interactions:{handleExpansion:t=>{if(m.disabled)return;m.focused||n.focus.focusItem(t,e);const r=A$.isMultiSelectEnabled(n.state)&&(t.shiftKey||t.ctrlKey||t.metaKey);!m.expandable||r&&C$.isItemExpanded(n.state,e)||n.expansion.setItemExpansion({event:t,itemId:e})},handleSelection:t=>{A$.canItemBeSelected(n.state,e)&&(m.focused||m.editing||n.focus.focusItem(t,e),A$.isMultiSelectEnabled(n.state)&&(t.shiftKey||t.ctrlKey||t.metaKey)?t.shiftKey?n.selection.expandSelectionRange(t,e):n.selection.setItemSelection({event:t,itemId:e,keepExistingSelection:!0}):n.selection.setItemSelection({event:t,itemId:e,shouldBeSelected:!0}))},handleCheckboxSelection:t=>{const r=t.nativeEvent.shiftKey,i=A$.isMultiSelectEnabled(n.state);i&&r?n.selection.expandSelectionRange(t,e):n.selection.setItemSelection({event:t,itemId:e,keepExistingSelection:i,shouldBeSelected:t.target.checked})},toggleItemEditing:f,handleSaveItemLabel:(t,r)=>{n.labelEditing&&R$.isItemBeingEdited(n.state,e)&&(n.labelEditing.updateItemLabel(e,r),f(),n.focus.focusItem(t,e))},handleCancelItemLabelEditing:t=>{n.labelEditing&&R$.isItemBeingEdited(n.state,e)&&(f(),n.focus.focusItem(t,e))}},status:m,publicAPI:r}})({itemId:c,children:d}),v=e.useRef(null),b=e.useRef(null),x=sD(p,h,v),I=sD(m,b),w=e.useRef(null),k=uD(i,A$.isCheckboxSelectionEnabled),S=uD(i,Y$.treeItemIdAttribute,c,s),M=uD(i,j$.isItemTheDefaultFocusableItem,c),C={rootRefObject:v,contentRefObject:b,interactions:g},P=e=>t=>{if(e.onBlur?.(t),t.defaultMuiPrevented)return;const n=i.items.getItemDOMElement(c);y.editing||t.relatedTarget&&V$(t.relatedTarget,n)&&(t.target&&"labelInput"===t.target?.dataset?.element&&V$(t.target,n)||"labelInput"===t.relatedTarget?.dataset?.element)||i.focus.removeFocusedItem()},E=e=>t=>{e.onKeyDown?.(t),t.defaultMuiPrevented||"labelInput"===t.target?.dataset?.element||i.keyboardNavigation.handleItemKeyDown(t,c)},T=e=>t=>{e.onMouseDown?.(t),t.defaultMuiPrevented||(t.shiftKey||t.ctrlKey||t.metaKey||y.disabled)&&t.preventDefault()};return{getContextProviderProps:()=>({itemId:c,id:s}),getRootProps:(e={})=>{const n=l({},CD(t),CD(e)),r=l({},n,{ref:x,role:"treeitem",tabIndex:M?0:-1,id:S,"aria-expanded":y.expandable?y.expanded:void 0,"aria-disabled":y.disabled||void 0},e,{style:l({},e.style??{},{"--TreeView-itemDepth":a}),onFocus:(o=n,e=>{o.onFocus?.(e),e.defaultMuiPrevented||!y.focused&&S$.canItemBeFocused(i.state,c)&&e.currentTarget===e.target&&i.focus.focusItem(e,c)}),onBlur:P(n),onKeyDown:E(n)});var o;const s=f.root?.(l({},C,{externalEventHandlers:n}))??{};return l({},r,s)},getContentProps:(e={})=>{const t=CD(e),n=l({},t,e,{ref:I,onClick:(r=t,e=>{r.onClick?.(e),i.items.handleItemClick(e,c),e.defaultMuiPrevented||w.current?.contains(e.target)||("content"===C$.triggerSlot(i.state)&&g.handleExpansion(e),k||g.handleSelection(e))}),onMouseDown:T(t),status:y});var r;["expanded","selected","focused","disabled","editing","editable"].forEach(e=>{y[e]&&(n[`data-${e}`]="")});const o=f.content?.(l({},C,{externalEventHandlers:t}))??{};return l({},n,o)},getGroupTransitionProps:(e={})=>l({},CD(e),{unmountOnExit:!0,component:"ul",role:"group",in:y.expanded,children:d},e),getIconContainerProps:(e={})=>{const t=CD(e);return l({},t,e,{onClick:(n=t,e=>{n.onClick?.(e),e.defaultMuiPrevented||"iconContainer"===C$.triggerSlot(i.state)&&g.handleExpansion(e)})});var n},getCheckboxProps:(e={})=>{const t=CD(e),n=l({},t,{ref:w,"aria-hidden":!0},e),r=f.checkbox?.(l({},C,{externalEventHandlers:t}))??{};return l({},n,r)},getLabelProps:(e={})=>{const t=l({},CD(e)),n=l({},t,{children:u},e,{onDoubleClick:(r=t,e=>{r.onDoubleClick?.(e),e.defaultMuiPrevented||g.toggleItemEditing()})});var r;const i=f.label?.(l({},C,{externalEventHandlers:t}))??{};return l({},i,n)},getLabelInputProps:(e={})=>{const t=CD(e),n=f.labelInput?.(l({},C,{externalEventHandlers:t}))??{};return l({},e,n)},getDragAndDropOverlayProps:(e={})=>{const t=CD(e),n=f.dragAndDropOverlay?.(l({},C,{externalEventHandlers:t}))??{};return l({},e,n)},getErrorContainerProps:(e={})=>l({},CD(e),e),getLoadingContainerProps:(e={})=>l({size:"12px",thickness:6},CD(e),e),rootRef:x,status:y,publicAPI:r}})({id:i,itemId:o,children:u,label:a,disabled:s,disableSelection:c}),P=(e=>{const{classes:t}=BD();return MD({root:["root"],content:["content"],iconContainer:["iconContainer"],checkbox:["checkbox"],label:["label"],groupTransition:["groupTransition"],labelInput:["labelInput"],dragAndDropOverlay:["dragAndDropOverlay"],errorIcon:["errorIcon"],loadingIcon:["loadingIcon"],expanded:["expanded"],editing:["editing"],editable:["editable"],selected:["selected"],focused:["focused"],disabled:["disabled"]},G$,l({},e,{root:Hh(e?.root,t.root),content:Hh(e?.content,t.itemContent),iconContainer:Hh(e?.iconContainer,t.itemIconContainer),checkbox:Hh(e?.checkbox,t.itemCheckbox),label:Hh(e?.label,t.itemLabel),groupTransition:Hh(e?.groupTransition,t.itemGroupTransition),labelInput:Hh(e?.labelInput,t.itemLabelInput),dragAndDropOverlay:Hh(e?.dragAndDropOverlay,t.itemDragAndDropOverlay),errorIcon:Hh(e?.errorIcon,t.itemErrorIcon),loadingIcon:Hh(e?.loadingIcon,t.itemLoadingIcon)}))})(h),E=d.root??az,T=TD({elementType:E,getSlotProps:g,externalForwardedProps:m,externalSlotProps:p.root,additionalProps:{ref:n},ownerState:{},className:P.root}),A=d.content??sz,j=TD({elementType:A,getSlotProps:y,externalSlotProps:p.content,ownerState:{},className:Hh(P.content,C.expanded&&P.expanded,C.selected&&P.selected,C.focused&&P.focused,C.disabled&&P.disabled,C.editing&&P.editing,C.editable&&P.editable)}),L=d.iconContainer??cz,R=TD({elementType:L,getSlotProps:v,externalSlotProps:p.iconContainer,ownerState:{},className:P.iconContainer}),D=d.label??lz,$=TD({elementType:D,getSlotProps:x,externalSlotProps:p.label,ownerState:{},className:P.label}),z=d.checkbox??hz,N=TD({elementType:z,getSlotProps:b,externalSlotProps:p.checkbox,ownerState:{},className:P.checkbox}),_=d.groupTransition??void 0,F=TD({elementType:_,getSlotProps:I,externalSlotProps:p.groupTransition,ownerState:{},className:P.groupTransition}),H=d.labelInput??nz,B=TD({elementType:H,getSlotProps:w,externalSlotProps:p.labelInput,ownerState:{},className:P.labelInput}),V=d.dragAndDropOverlay??ez,U=TD({elementType:V,getSlotProps:k,externalSlotProps:p.dragAndDropOverlay,ownerState:{},className:P.dragAndDropOverlay}),Y=d.errorIcon??dz,W=TD({elementType:Y,getSlotProps:S,externalSlotProps:p.errorIcon,ownerState:{},className:P.errorIcon}),G=d.loadingIcon??pz,K=TD({elementType:G,getSlotProps:M,externalSlotProps:p.loadingIcon,ownerState:{},className:P.loadingIcon});return(0,O.jsx)(tz,l({},f(),{children:(0,O.jsxs)(E,l({},T,{children:[(0,O.jsxs)(A,l({},j,{children:[(0,O.jsxs)(L,l({},R,{children:[C.error&&(0,O.jsx)(Y,l({},W)),C.loading?(0,O.jsx)(G,l({},K)):(0,O.jsx)(J$,{status:C,slots:d,slotProps:p})]})),(0,O.jsx)(z,l({},N)),C.editing?(0,O.jsx)(H,l({},B)):(0,O.jsx)(D,l({},$)),(0,O.jsx)(V,l({},U))]})),u&&(0,O.jsx)(uz,l({as:_},F))]}))}))}),fz=["ownerState"],gz=e.createContext(null),yz=()=>zD,vz=e=>S$.itemOrderedChildrenIds(e,null),bz=e.memo(function({itemSlot:t,itemSlotProps:n,itemId:r,skipChildren:i}){const o=e.useContext(gz),{store:a}=FD(),s=uD(a,S$.itemMeta,r),c=uD(a,i?yz:S$.itemOrderedChildrenIds,r),u=t??mz,d=tt(TD({elementType:u,externalSlotProps:n,additionalProps:{label:s?.label,id:s?.idAttribute,itemId:r},ownerState:{itemId:r,label:s?.label}}),fz);return(0,O.jsx)(u,l({},d,{children:c?.map(o)}))},YD);function xz(t){const{slots:n,slotProps:r}=t,{store:i}=FD(),o=n?.item,a=r?.item,s=uD(i,S$.domStructure),l=uD(i,"flat"===s?C$.flatList:vz),c="flat"===s,u=e.useCallback(e=>(0,O.jsx)(bz,{itemSlot:o,itemSlotProps:a,itemId:e,skipChildren:c},e),[o,a,c]);return(0,O.jsx)(gz.Provider,{value:u,children:l.map(u)})}function Iz(e,t,n){const r=uD(e,Y$.treeId),i=uD(e,S$.itemChildrenIndentation),o=uD(e,A$.isMultiSelectEnabled);return a=>l({ref:n,role:"tree",id:r,"aria-multiselectable":o},t,a,{style:l({},t.style,{"--TreeView-itemChildrenIndentation":"number"==typeof i?`${i}px`:i}),onFocus:t=>{a.onFocus?.(t),e.focus.handleRootFocus(t)},onBlur:t=>{a.onBlur?.(t),e.focus.handleRootBlur(t)}})}const wz=["apiRef","slots","slotProps","disabledItemsFocusable","items","isItemDisabled","isItemSelectionDisabled","getItemLabel","getItemChildren","getItemId","onItemClick","itemChildrenIndentation","id","expandedItems","defaultExpandedItems","onExpandedItemsChange","onItemExpansionToggle","expansionTrigger","disableSelection","selectedItems","defaultSelectedItems","multiSelect","checkboxSelection","selectionPropagation","onSelectedItemsChange","onItemSelectionToggle","onItemFocus","onItemLabelChange","isItemEditable"],kz="undefined"!=typeof document?e.useLayoutEffect:()=>{},Sz=[];function Mz(t,n){const r=fS(),i=aD(()=>new t(l({},n,{isRtl:r}))).current;var o;return kz(()=>i.updateStateFromParameters(l({},n,{isRtl:r})),[i,r,n]),o=i.disposeEffect,e.useEffect(o,Sz),i}const Cz=({props:t})=>{const{store:n}=FD(),{label:r,itemId:i}=t,[o,a]=e.useState(r),s=uD(n,R$.isItemEditable,i),l=uD(n,R$.isItemBeingEdited,i);return e.useEffect(()=>{l||a(r)},[l,r]),{propsEnhancers:{label:()=>({editable:s}),labelInput:({externalEventHandlers:e,interactions:t})=>s?{value:o??"","data-element":"labelInput",onChange:t=>{e.onChange?.(t),a(t.target.value)},onKeyDown:n=>{if(e.onKeyDown?.(n),n.defaultMuiPrevented)return;const r=n.target;"Enter"===n.key&&r.value?t.handleSaveItemLabel(n,r.value):"Escape"===n.key&&t.handleCancelItemLabelEditing(n)},onBlur:n=>{e.onBlur?.(n),n.defaultMuiPrevented||n.target.value&&t.handleSaveItemLabel(n,n.target.value)},autoFocus:!0,type:"text"}:{}}}};class Pz{constructor(e){this.store=e,e.itemPluginManager.register(Cz,null)}buildPublicAPI=()=>({setEditedItem:this.setEditedItem,updateItemLabel:this.updateItemLabel});setEditedItem=e=>{(null===e||R$.isItemEditable(this.store.state,e))&&this.store.set("editedItemId",e)};updateItemLabel=(e,t)=>{if(!t)throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.","The label of an item cannot be empty.",e].join("\n"));const n=this.store.state.itemMetaLookup[e];n.label!==t&&(this.store.set("itemMetaLookup",l({},this.store.state.itemMetaLookup,{[e]:l({},n,{label:t})})),this.store.parameters.onItemLabelChange&&this.store.parameters.onItemLabelChange(e,t))}}class Ez{static create(e){return new Ez(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){this.state=e,this.updateTick+=1;const t=this.updateTick,n=this.listeners.values();let r;for(;r=n.next(),!r.done;){if(t!==this.updateTick)return;(0,r.value)(e)}}update(e){for(const t in e)if(!Object.is(this.state[t],e[t]))return void this.setState(l({},this.state,e))}set(e,t){Object.is(this.state[e],t)||this.setState(l({},this.state,{[e]:t}))}use=(()=>(e,t,n,r)=>uD(this,e,t,n,r))()}class Tz{maxListeners=20;warnOnce=!1;events={};on(e,t,n={}){let r=this.events[e];r||(r={highPriority:new Map,regular:new Map},this.events[e]=r),n.isFirst?r.highPriority.set(t,!0):r.regular.set(t,!0)}removeListener(e,t){this.events[e]&&(this.events[e].regular.delete(t),this.events[e].highPriority.delete(t))}removeAllListeners(){this.events={}}emit(e,...t){const n=this.events[e];if(!n)return;const r=Array.from(n.highPriority.keys()),i=Array.from(n.regular.keys());for(let e=r.length-1;e>=0;e-=1){const i=r[e];n.highPriority.has(i)&&i.apply(this,t)}for(let e=0;et||(e?"iconContainer":"content");class Oz{constructor(e){this.store=e}static shouldRebuildItemsState=(e,t)=>["items","isItemDisabled","isItemSelectionDisabled","getItemId","getItemLabel","getItemChildren"].some(n=>{const r=n;return e[r]!==t[r]});static buildItemsStateIfNeeded=e=>{const t={},n={},r={},i={};return function o(a,s,l){const c=s??b$,{metaLookup:u,modelLookup:d,orderedChildrenIds:p,childrenIndexes:h,itemsChildren:m}=w$({storeParameters:e,items:a,parentId:s,depth:l,isItemExpandable:(e,t)=>!!t&&t.length>0,otherItemsMetaLookup:t});Object.assign(t,u),Object.assign(n,d),r[c]=p,i[c]=h;for(const e of m)o(e.children||[],e.id,l+1)}(e.items,null,0),{itemMetaLookup:t,itemModelLookup:n,itemOrderedChildrenIdsLookup:r,itemChildrenIndexesLookup:i}};getItem=e=>S$.itemModel(this.store.state,e);getItemTree=()=>{const e=t=>{const n=l({},S$.itemModel(this.store.state,t)),r=S$.itemOrderedChildrenIds(this.store.state,t);return r.length>0?n.children=r.map(e):delete n.children,n};return S$.itemOrderedChildrenIds(this.store.state,null).map(e)};getItemOrderedChildrenIds=e=>S$.itemOrderedChildrenIds(this.store.state,e);getParentId=e=>{const t=S$.itemMeta(this.store.state,e);return t?.parentId||null};setIsItemDisabled=({itemId:e,shouldBeDisabled:t})=>{if(!this.store.state.itemMetaLookup[e])return;const n=l({},this.store.state.itemMetaLookup);n[e]=l({},n[e],{disabled:t??!n[e].disabled}),this.store.set("itemMetaLookup",n)};buildPublicAPI=()=>({getItem:this.getItem,getItemDOMElement:this.getItemDOMElement,getItemOrderedChildrenIds:this.getItemOrderedChildrenIds,getItemTree:this.getItemTree,getParentId:this.getParentId,setIsItemDisabled:this.setIsItemDisabled});getItemDOMElement=e=>{const t=S$.itemMeta(this.store.state,e);if(null==t)return null;const n=Y$.treeItemIdAttribute(this.store.state,e,t.idAttribute);return document.getElementById(n)};setItemChildren=({items:e,parentId:t,getChildrenCount:n})=>{const r=t??b$,i=null==t?-1:S$.itemDepth(this.store.state,t),{metaLookup:o,modelLookup:a,orderedChildrenIds:s,childrenIndexes:c}=w$({storeParameters:this.store.parameters,items:e,parentId:t,depth:i+1,isItemExpandable:n?e=>0!==n(e):()=>!1,otherItemsMetaLookup:S$.itemMetaLookup(this.store.state)});this.store.update({itemModelLookup:l({},this.store.state.itemModelLookup,a),itemMetaLookup:l({},this.store.state.itemMetaLookup,o),itemOrderedChildrenIdsLookup:l({},this.store.state.itemOrderedChildrenIdsLookup,{[r]:s}),itemChildrenIndexesLookup:l({},this.store.state.itemChildrenIndexesLookup,{[r]:c})})};removeChildren=e=>{const t=this.store.state.itemMetaLookup,n=Object.keys(t).reduce((n,r)=>{const i=t[r];return i.parentId===e?n:l({},n,{[i.id]:i})},{}),r=l({},this.store.state.itemOrderedChildrenIdsLookup),i=l({},this.store.state.itemChildrenIndexesLookup),o=e??b$;delete i[o],delete r[o],this.store.update({itemMetaLookup:n,itemOrderedChildrenIdsLookup:r,itemChildrenIndexesLookup:i})};handleItemClick=(e,t)=>{this.store.parameters.onItemClick?.(e,t)}}function jz(e){return{disabledItemsFocusable:e.disabledItemsFocusable??!1,domStructure:"nested",itemChildrenIndentation:e.itemChildrenIndentation??"12px",providedTreeId:e.id,expansionTrigger:Az({isItemEditable:e.isItemEditable,expansionTrigger:e.expansionTrigger}),disableSelection:e.disableSelection??!1,multiSelect:e.multiSelect??!1,checkboxSelection:e.checkboxSelection??!1,selectionPropagation:e.selectionPropagation??ND}}function Lz(e,t,n){return void 0!==e?e:void 0!==t?t:n}let Rz=0;class Dz{timeoutIds=(()=>new Map)();intervalIds=(()=>new Map)();startTimeout=(e,t,n)=>{this.clearTimeout(e);const r=setTimeout(()=>{this.timeoutIds.delete(e),n()},t);this.timeoutIds.set(e,r)};startInterval=(e,t,n)=>{this.clearTimeout(e);const r=setInterval(n,t);this.intervalIds.set(e,r)};clearTimeout=e=>{const t=this.timeoutIds.get(e);null!=t&&(clearTimeout(t),this.timeoutIds.delete(e))};clearInterval=e=>{const t=this.intervalIds.get(e);null!=t&&(clearInterval(t),this.intervalIds.delete(e))};clearAll=()=>{this.timeoutIds.forEach(clearTimeout),this.timeoutIds.clear(),this.intervalIds.forEach(clearInterval),this.intervalIds.clear()}}class $z{typeaheadQuery="";constructor(e){this.store=e,this.labelMap=zz(S$.itemMetaLookup(this.store.state)),this.store.registerStoreEffect(S$.itemMetaLookup,(e,t)=>{this.store.shouldIgnoreItemsStateUpdate()||(this.labelMap=zz(t))})}canToggleItemSelection=e=>A$.canItemBeSelected(this.store.state,e);canToggleItemExpansion=e=>!S$.isItemDisabled(this.store.state,e)&&C$.isItemExpandable(this.store.state,e);getFirstItemMatchingTypeaheadQuery=(e,t)=>{const n=e=>{const t=_$(this.store.state,e);return null===t?H$(this.store.state):t},r=t=>{let r=null;const i={};let o=t.length>1?e:n(e);for(;null==r&&!i[o];){const e=this.labelMap[o];e?.startsWith(t)?r=o:(i[o]=!0,o=n(o))}return r},i=t.toLowerCase(),o=`${this.typeaheadQuery}${i}`,a=r(o);if(null!=a)return this.typeaheadQuery=o,a;const s=r(i);return null!=s?(this.typeaheadQuery=i,s):(this.typeaheadQuery="",null)};updateLabelMap=e=>{this.labelMap=e(this.labelMap)};handleItemKeyDown=async(e,t)=>{if(e.defaultMuiPrevented)return;if(e.altKey||V$(e.target,e.currentTarget))return;const n=e.ctrlKey||e.metaKey,r=e.key,i=A$.isMultiSelectEnabled(this.store.state);switch(!0){case" "===r&&this.canToggleItemSelection(t):e.preventDefault(),i&&e.shiftKey?this.store.selection.expandSelectionRange(e,t):this.store.selection.setItemSelection({event:e,itemId:t,keepExistingSelection:i,shouldBeSelected:void 0});break;case"Enter"===r:this.store.labelEditing?.setEditedItem&&R$.isItemEditable(this.store.state,t)&&!R$.isItemBeingEdited(this.store.state,t)?this.store.labelEditing.setEditedItem(t):this.canToggleItemExpansion(t)?(this.store.expansion.setItemExpansion({event:e,itemId:t}),e.preventDefault()):this.canToggleItemSelection(t)&&(i?(e.preventDefault(),this.store.selection.setItemSelection({event:e,itemId:t,keepExistingSelection:!0})):A$.isItemSelected(this.store.state,t)||(this.store.selection.setItemSelection({event:e,itemId:t}),e.preventDefault()));break;case"ArrowDown"===r:{const n=_$(this.store.state,t);n&&(e.preventDefault(),this.store.focus.focusItem(e,n),i&&e.shiftKey&&this.canToggleItemSelection(n)&&this.store.selection.selectItemFromArrowNavigation(e,t,n));break}case"ArrowUp"===r:{const n=N$(this.store.state,t);n&&(e.preventDefault(),this.store.focus.focusItem(e,n),i&&e.shiftKey&&this.canToggleItemSelection(n)&&this.store.selection.selectItemFromArrowNavigation(e,t,n));break}case"ArrowRight"===r&&!this.store.parameters.isRtl||"ArrowLeft"===r&&this.store.parameters.isRtl:if(n)return;if(C$.isItemExpanded(this.store.state,t)){const n=_$(this.store.state,t);n&&(this.store.focus.focusItem(e,n),e.preventDefault())}else this.canToggleItemExpansion(t)&&(this.store.expansion.setItemExpansion({event:e,itemId:t}),e.preventDefault());break;case"ArrowLeft"===r&&!this.store.parameters.isRtl||"ArrowRight"===r&&this.store.parameters.isRtl:if(n)return;if(this.canToggleItemExpansion(t)&&C$.isItemExpanded(this.store.state,t))this.store.expansion.setItemExpansion({event:e,itemId:t}),e.preventDefault();else{const n=S$.itemParentId(this.store.state,t);n&&(this.store.focus.focusItem(e,n),e.preventDefault())}break;case"Home"===r:this.canToggleItemSelection(t)&&i&&n&&e.shiftKey?this.store.selection.selectRangeFromStartToItem(e,t):this.store.focus.focusItem(e,H$(this.store.state)),e.preventDefault();break;case"End"===r:this.canToggleItemSelection(t)&&i&&n&&e.shiftKey?this.store.selection.selectRangeFromItemToEnd(e,t):this.store.focus.focusItem(e,F$(this.store.state)),e.preventDefault();break;case"*"===r:this.store.expansion.expandAllSiblings(e,t),e.preventDefault();break;case"A"===String.fromCharCode(e.keyCode)&&n&&i&&A$.enabled(this.store.state):this.store.selection.selectAllNavigableItems(e),e.preventDefault();break;case!n&&!e.shiftKey&&function(e){return!!e&&1===e.length&&!!e.match(/\S/)}(r):{this.store.timeoutManager.clearTimeout("typeahead");const n=this.getFirstItemMatchingTypeaheadQuery(t,r);null!=n?(this.store.focus.focusItem(e,n),e.preventDefault()):this.typeaheadQuery="",this.store.timeoutManager.startTimeout("typeahead",500,()=>{this.typeaheadQuery=""});break}}}}function zz(e){const t={};return Object.values(e).forEach(e=>{t[e.id]=e.label.toLowerCase()}),t}class Nz{constructor(e){this.store=e;let t=e.state;this.store.subscribe(e=>{if(e.itemMetaLookup===t.itemMetaLookup)return void(t=e);const n=j$.focusedItemId(e);if(null==n||S$.itemMeta(e,n))return void(t=e);const r=t=>null!=t&&S$.itemMeta(e,t)?t:null,i=r(_$(t,n))??r(N$(t,n))??H$(e);null==i?this.setFocusedItemId(null):this.applyItemFocus(null,i),t=e})}setFocusedItemId=e=>{j$.focusedItemId(this.store.state)!==e&&this.store.set("focusedItemId",e)};applyItemFocus=(e,t)=>{this.store.items.getItemDOMElement(t)?.focus(),this.setFocusedItemId(t),this.store.parameters.onItemFocus?.(e,t)};buildPublicAPI=()=>({focusItem:this.focusItem});focusItem=(e,t)=>{const n=S$.itemMeta(this.store.state,t);n&&(null==n.parentId||C$.isItemExpanded(this.store.state,n.parentId))&&this.applyItemFocus(e,t)};removeFocusedItem=()=>{const e=j$.focusedItemId(this.store.state);if(null!=e){if(S$.itemMeta(this.store.state,e)){const t=this.store.items.getItemDOMElement(e);t&&t.blur()}this.setFocusedItemId(null)}};handleRootFocus=e=>{if(e.defaultMuiPrevented)return;const t=j$.defaultFocusableItemId(this.store.state);e.target===e.currentTarget&&null!=t&&this.applyItemFocus(e,t)};handleRootBlur=e=>{e.defaultMuiPrevented||this.setFocusedItemId(null)}}const _z=y$((e,t)=>{if(A$.isItemSelected(e,t))return"checked";let n=!1,r=!1;const i=o=>{o!==t&&(A$.isItemSelected(e,o)?n=!0:r=!0),S$.itemOrderedChildrenIds(e,o).forEach(i)};return i(t),A$.propagationRules(e).parents?n&&r?"indeterminate":n&&!r?"checked":"empty":n?"indeterminate":"empty"}),Fz=({props:e})=>{const{itemId:t}=e,{store:n}=FD(),r=uD(n,A$.isCheckboxSelectionEnabled),i=uD(n,A$.isFeatureEnabledForItem,t),o=uD(n,A$.canItemBeSelected,t),a=uD(n,_z,t);return{propsEnhancers:{root:()=>{let e;return e="checked"===a||("indeterminate"===a?"mixed":!o&&void 0),{"aria-checked":e}},checkbox:({externalEventHandlers:e,interactions:s})=>({tabIndex:-1,onChange:r=>{e.onChange?.(r),r.defaultMuiPrevented||A$.canItemBeSelected(n.state,t)&&s.handleCheckboxSelection(r)},visible:r&&i,disabled:!o,checked:"checked"===a,indeterminate:"indeterminate"===a})}}};class Hz{lastSelectedItem=null;lastSelectedRange={};constructor(e){this.store=e,e.itemPluginManager.register(Fz,null)}setSelectedItems=(e,t,n)=>{const{selectionPropagation:r=ND,selectedItems:i,onItemSelectionToggle:o,onSelectedItemsChange:a}=this.store.parameters,s=A$.selectedItemsRaw(this.store.state);let l;const c=A$.isMultiSelectEnabled(this.store.state);if(l=c&&(r.descendants||r.parents)?function({store:e,selectionPropagation:t,newModel:n,oldModel:r,additionalItemsToPropagate:i}){if(!t.descendants&&!t.parents)return n;let o=!1;const a=Vz(n),s=Bz({store:e,newModel:n,oldModel:r});return i?.forEach(e=>{a[e]?s.added.includes(e)||s.added.push(e):s.removed.includes(e)||s.removed.push(e)}),s.added.forEach(n=>{if(t.descendants){const t=r=>{r!==n&&(o=!0,a[r]=!0),S$.itemOrderedChildrenIds(e.state,r).forEach(t)};t(n)}if(t.parents){const t=n=>!!a[n]&&S$.itemOrderedChildrenIds(e.state,n).every(t),r=n=>{const i=S$.itemParentId(e.state,n);null!=i&&S$.itemOrderedChildrenIds(e.state,i).every(t)&&(o=!0,a[i]=!0,r(i))};r(n)}}),s.removed.forEach(n=>{if(t.parents){let t=S$.itemParentId(e.state,n);for(;null!=t;)a[t]&&(o=!0,delete a[t]),t=S$.itemParentId(e.state,t)}if(t.descendants){const t=r=>{r!==n&&(o=!0,delete a[r]),S$.itemOrderedChildrenIds(e.state,r).forEach(t)};t(n)}}),o?Object.keys(a):n}({store:this.store,selectionPropagation:r,newModel:t,oldModel:s,additionalItemsToPropagate:n}):t,o)if(c){const t=Bz({store:this.store,newModel:l,oldModel:s});o&&(t.added.forEach(t=>{o(e,t,!0)}),t.removed.forEach(t=>{o(e,t,!1)}))}else l!==s&&(null!=s&&o(e,s,!1),null!=l&&o(e,l,!0));void 0===i&&this.store.set("selectedItems",l),a?.(e,l)};selectRange=(e,[t,n])=>{if(!A$.isMultiSelectEnabled(this.store.state))return;let r=A$.selectedItems(this.store.state).slice();Object.keys(this.lastSelectedRange).length>0&&(r=r.filter(e=>!this.lastSelectedRange[e]));const i=Vz(r),o=((e,t,n)=>{const r=t=>{if(C$.isItemExpandable(e,t)&&C$.isItemExpanded(e,t))return S$.itemOrderedChildrenIds(e,t)[0];let n=S$.itemMeta(e,t);for(;null!=n;){const t=S$.itemOrderedChildrenIds(e,n.parentId),r=S$.itemIndex(e,n.id);if(rA$.isItemSelectable(this.store.state,e)),a=o.filter(e=>!i[e]);r=r.concat(a),this.setSelectedItems(e,r),this.lastSelectedRange=Vz(o)};buildPublicAPI=()=>({setItemSelection:this.setItemSelection});setItemSelection=({itemId:e,event:t=null,keepExistingSelection:n=!1,shouldBeSelected:r})=>{if(!A$.enabled(this.store.state))return;let i;const o=A$.isMultiSelectEnabled(this.store.state);if(n){const t=A$.selectedItems(this.store.state),n=A$.isItemSelected(this.store.state,e);i=!n||!1!==r&&null!=r?n||!0!==r&&null!=r?t:[e].concat(t):t.filter(t=>t!==e)}else i=!1===r||null==r&&A$.isItemSelected(this.store.state,e)?o?[]:null:o?[e]:e;this.setSelectedItems(t,i,[e]),this.lastSelectedItem=e,this.lastSelectedRange={}};selectAllNavigableItems=e=>{if(!A$.isMultiSelectEnabled(this.store.state))return;const t=(e=>{let t=H$(e);const n=[];for(;null!=t;)n.push(t),t=_$(e,t);return n})(this.store.state);this.setSelectedItems(e,t),this.lastSelectedRange=Vz(t)};expandSelectionRange=(e,t)=>{if(null!=this.lastSelectedItem){const[n,r]=B$(this.store.state,t,this.lastSelectedItem);this.selectRange(e,[n,r])}};selectRangeFromStartToItem=(e,t)=>{this.selectRange(e,[H$(this.store.state),t])};selectRangeFromItemToEnd=(e,t)=>{this.selectRange(e,[t,F$(this.store.state)])};selectItemFromArrowNavigation=(e,t,n)=>{if(!A$.isMultiSelectEnabled(this.store.state))return;let r=A$.selectedItems(this.store.state).slice();0===Object.keys(this.lastSelectedRange).length?(r.push(n),this.lastSelectedRange={[t]:!0,[n]:!0}):(this.lastSelectedRange[t]||(this.lastSelectedRange={}),this.lastSelectedRange[n]?(r=r.filter(e=>e!==t),delete this.lastSelectedRange[t]):(r.push(n),this.lastSelectedRange[n]=!0)),this.setSelectedItems(e,r)}}function Bz({store:e,oldModel:t,newModel:n}){const r=new Map;return n.forEach(e=>{r.set(e,!0)}),{added:n.filter(t=>!A$.isItemSelected(e.state,t)),removed:t.filter(e=>!r.has(e))}}function Vz(e){const t={};return e.forEach(e=>{t[e]=!0}),t}class Uz{constructor(e){this.store=e}setExpandedItems=(e,t)=>{void 0===this.store.parameters.expandedItems&&this.store.set("expandedItems",t),this.store.parameters.onExpandedItemsChange?.(e,t)};isItemExpanded=e=>C$.isItemExpanded(this.store.state,e);buildPublicAPI=()=>({isItemExpanded:this.isItemExpanded,setItemExpansion:this.setItemExpansion});setItemExpansion=({itemId:e,event:t=null,shouldBeExpanded:n})=>{const r=C$.isItemExpanded(this.store.state,e),i=n??!r;if(r===i)return;const o={isExpansionPrevented:!1,shouldBeExpanded:i,itemId:e};this.store.publishEvent("beforeItemToggleExpansion",o,t),o.isExpansionPrevented||this.applyItemExpansion({itemId:e,event:t,shouldBeExpanded:i})};applyItemExpansion=({itemId:e,event:t,shouldBeExpanded:n})=>{const r=C$.expandedItemsRaw(this.store.state);let i;i=n?[e].concat(r):r.filter(t=>t!==e),this.store.parameters.onItemExpansionToggle?.(t,e,n),this.setExpandedItems(t,i)};expandAllSiblings=(e,t)=>{const n=S$.itemMeta(this.store.state,t);if(null==n)return;const r=S$.itemOrderedChildrenIds(this.store.state,n.parentId).filter(e=>C$.isItemExpandable(this.store.state,e)&&!C$.isItemExpanded(this.store.state,e)),i=C$.expandedItemsRaw(this.store.state).concat(r);r.length>0&&(this.store.parameters.onItemExpansionToggle&&r.forEach(t=>{this.store.parameters.onItemExpansionToggle(e,t,!0)}),this.setExpandedItems(e,i))};addExpandableItems=e=>{const t=l({},this.store.state.itemMetaLookup);for(const n of e)t[n]=l({},t[n],{expandable:!0});this.store.set("itemMetaLookup",t)}}class Yz{itemPlugins=[];itemWrappers=[];register=(e,t)=>{this.itemPlugins.push(e),t&&this.itemWrappers.push(t)};listPlugins=()=>this.itemPlugins;listWrappers=()=>this.itemWrappers}class Wz extends Ez{initialParameters=null;eventManager=(()=>new Tz)();timeoutManager=(()=>new Dz)();itemPluginManager=(()=>new Yz)();constructor(e,t,n){const r=function(e){return l({treeId:void 0,focusedItemId:null},jz(e),Oz.buildItemsStateIfNeeded(e),{expandedItems:Lz(e.expandedItems,e.defaultExpandedItems,[]),selectedItems:Lz(e.selectedItems,e.defaultSelectedItems,e.multiSelect?zD:null)})}(e);super(n.getInitialState(r,e)),this.parameters=e,this.instanceName=t,this.mapper=n,this.items=new Oz(this),this.focus=new Nz(this),this.expansion=new Uz(this),this.selection=new Hz(this),this.keyboardNavigation=new $z(this)}buildPublicAPI(){return l({},this.items.buildPublicAPI(),this.focus.buildPublicAPI(),this.expansion.buildPublicAPI(),this.selection.buildPublicAPI())}updateStateFromParameters(e){const t=(t,n,r)=>{void 0!==e[n]&&(t[n]=e[n])},n=jz(e);t(n,"expandedItems"),t(n,"selectedItems"),this.state.providedTreeId===e.id&&void 0!==this.state.treeId||(n.treeId=(Rz+=1,`mui-tree-view-${Rz}`)),!this.mapper.shouldIgnoreItemsStateUpdate(e)&&Oz.shouldRebuildItemsState(e,this.parameters)&&Object.assign(n,Oz.buildItemsStateIfNeeded(e));const r=this.mapper.updateStateFromParameters(n,e,t);this.update(r),this.parameters=e}disposeEffect=()=>this.timeoutManager.clearAll;shouldIgnoreItemsStateUpdate=()=>this.mapper.shouldIgnoreItemsStateUpdate(this.parameters);registerStoreEffect=(e,t)=>{let n=e(this.state);this.subscribe(r=>{const i=e(r);i!==n&&(t(n,i),n=i)})};publishEvent=(e,t,n)=>{(function(e){return void 0!==e?.isPropagationStopped})(n)&&n.isPropagationStopped()||this.eventManager.emit(e,t,n)};subscribeEvent=(e,t)=>{this.eventManager.on(e,t)}}const Gz=e=>({isItemEditable:e.isItemEditable??!1}),Kz={getInitialState:(e,t)=>l({},e,Gz(t),{editedItemId:null,lazyLoadedItems:null}),updateStateFromParameters:(e,t)=>l({},e,Gz(t)),shouldIgnoreItemsStateUpdate:()=>!1};class qz extends Wz{labelEditing=(()=>new Pz(this))();static rawMapper=(()=>Kz)();buildPublicAPI(){return l({},super.buildPublicAPI(),this.labelEditing.buildPublicAPI())}}class Xz extends qz{constructor(e){super(e,"RichTreeView",Kz)}}const Zz=$D(),Jz=bm("ul",{name:"MuiRichTreeView",slot:"Root"})({padding:0,margin:0,listStyle:"none",outline:0,position:"relative"}),Qz=e.forwardRef(function(t,n){const r=Zz({props:t,name:"MuiRichTreeView"}),{slots:i,slotProps:o,apiRef:a,parameters:s,forwardedProps:c}=function(t){const{apiRef:n,slots:r,slotProps:i,disabledItemsFocusable:o,items:a,isItemDisabled:s,isItemSelectionDisabled:l,getItemLabel:c,getItemChildren:u,getItemId:d,onItemClick:p,itemChildrenIndentation:h,id:m,expandedItems:f,defaultExpandedItems:g,onExpandedItemsChange:y,onItemExpansionToggle:v,expansionTrigger:b,disableSelection:x,selectedItems:I,defaultSelectedItems:w,multiSelect:k,checkboxSelection:S,selectionPropagation:M,onSelectedItemsChange:C,onItemSelectionToggle:P,onItemFocus:E,onItemLabelChange:T,isItemEditable:A}=t,O=tt(t,wz);return{apiRef:n,slots:r,slotProps:i,parameters:e.useMemo(()=>({disabledItemsFocusable:o,items:a,isItemDisabled:s,isItemSelectionDisabled:l,getItemLabel:c,getItemChildren:u,getItemId:d,onItemClick:p,itemChildrenIndentation:h,id:m,expandedItems:f,defaultExpandedItems:g,onExpandedItemsChange:y,onItemExpansionToggle:v,expansionTrigger:b,disableSelection:x,selectedItems:I,defaultSelectedItems:w,multiSelect:k,checkboxSelection:S,selectionPropagation:M,onSelectedItemsChange:C,onItemSelectionToggle:P,onItemFocus:E,onItemLabelChange:T,isItemEditable:A}),[o,a,s,l,c,u,d,p,h,m,f,g,y,v,b,x,I,w,k,S,M,C,P,E,T,A]),forwardedProps:O}}(r),u=Mz(Xz,s),d=e.useRef(null),p=Iz(u,c,sD(n,d)),h=(t=>{const{classes:n}=t;return e.useMemo(()=>MD({root:["root"],item:["item"],itemContent:["itemContent"],itemGroupTransition:["itemGroupTransition"],itemIconContainer:["itemIconContainer"],itemLabel:["itemLabel"],itemLabelInput:["itemLabelInput"],itemCheckbox:["itemCheckbox"]},DD,n),[n])})(r),m=uD(u,L$.isItemLoading,null),f=uD(u,L$.itemError,null),g=i?.root??Jz,y=TD({elementType:g,externalSlotProps:o?.root,className:h.root,getSlotProps:p,ownerState:r});return m?(0,O.jsx)(Nv,{children:"Loading..."}):f?(0,O.jsx)(SD,{severity:"error",children:f.message}):(0,O.jsx)(VD,{store:u,classes:h,slots:i,slotProps:o,apiRef:a,rootRef:d,children:(0,O.jsx)($$.Provider,{value:S$.itemDepth,children:(0,O.jsx)(g,l({},y,{children:(0,O.jsx)(xz,{slots:i,slotProps:o})}))})})}),eN=e.createContext(null);function tN(){return e.useContext(eN)}const nN="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",rN=function(t){const{children:n,theme:r}=t,i=tN(),o=e.useMemo(()=>{const e=null===i?{...r}:function(e,t){return"function"==typeof t?t(e):{...e,...t}}(i,r);return null!=e&&(e[nN]=null!==i),e},[r,i]);return(0,O.jsx)(eN.Provider,{value:o,children:n})};function iN(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return(0,O.jsx)(Ty,{styles:r})}function oN(e){const t=sm(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}const aN=function({styles:e,themeId:t,defaultTheme:n={}}){const r=Zd(n),i=t&&r[t]||r;let o="function"==typeof e?e(i):e;return i.modularCssLayers&&(o=Array.isArray(o)?o.map(e=>oN("function"==typeof e?e(i):e)):oN(o)),(0,O.jsx)(iN,{styles:o})},sN={};function lN(t,n,r,i=!1){return e.useMemo(()=>{const e=t&&n[t]||n;if("function"==typeof r){const o=r(e),a=t?{...n,[t]:o}:o;return i?()=>a:a}return t?{...n,[t]:r}:{...n,...r}},[t,n,r,i])}const cN=function(e){const{children:t,theme:n,themeId:r}=e,i=qd(sN),o=tN()||sN,a=lN(r,i,n),s=lN(r,o,n,!0),l="rtl"===(r?a[r]:a).direction,c=function(e){const t=qd(),n=Rg()||"",{modularCssLayers:r}=e;let i="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return i=r&&null===t?"string"==typeof r?r.replace(/mui(?!\.)/g,i):`@layer ${i};`:"",qm(()=>{const e=document.querySelector("head");if(!e)return;const t=e.firstChild;if(i){if(t&&t.hasAttribute?.("data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===n)return;const r=document.createElement("style");r.setAttribute("data-mui-layer-order",n),r.textContent=i,e.prepend(r)}else e.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[i,n]),i?(0,O.jsx)(aN,{styles:i}):null}(a);return(0,O.jsx)(rN,{theme:s,children:(0,O.jsx)(Ud.Provider,{value:a,children:(0,O.jsx)(Xh,{value:l,children:(0,O.jsxs)(Sm,{value:r?a[r].components:a.components,children:[c,t]})})})})};function uN({theme:e,...t}){const n=jh in e?e[jh]:void 0;return(0,O.jsx)(cN,{...t,themeId:n?jh:void 0,theme:n||e})}const dN="mode",pN="color-scheme",hN="data-color-scheme";function mN(){}const fN=({key:e,storageWindow:t})=>(t||"undefined"==typeof window||(t=window),{get(n){if("undefined"==typeof window)return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return mN;const r=t=>{const r=t.newValue;t.key===e&&n(r)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function gN(){}function yN(e){if("undefined"!=typeof window&&"function"==typeof window.matchMedia&&"system"===e)return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function vN(e,t){return"light"===e.mode||"system"===e.mode&&"light"===e.systemMode?t("light"):"dark"===e.mode||"system"===e.mode&&"dark"===e.systemMode?t("dark"):void 0}const bN="mui-color-scheme",xN="light",IN="dark",wN="mui-mode",{CssVarsProvider:kN,useColorScheme:SN,getInitColorSchemeScript:MN}=function(t){const{themeId:n,theme:r={},modeStorageKey:i=dN,colorSchemeStorageKey:o=pN,disableTransitionOnChange:a=!1,defaultColorScheme:s,resolveTheme:l}=t,c={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},u=e.createContext(void 0),d={},p={},h="string"==typeof s?s:s.light,m="string"==typeof s?s:s.dark;return{CssVarsProvider:function(t){const{children:c,theme:h,modeStorageKey:m=i,colorSchemeStorageKey:f=o,disableTransitionOnChange:g=a,storageManager:y,storageWindow:v=("undefined"==typeof window?void 0:window),documentNode:b=("undefined"==typeof document?void 0:document),colorSchemeNode:x=("undefined"==typeof document?void 0:document.documentElement),disableNestedContext:I=!1,disableStyleSheetGeneration:w=!1,defaultMode:k="system",noSsr:S}=t,M=e.useRef(!1),C=tN(),P=e.useContext(u),E=!!P&&!I,T=e.useMemo(()=>h||("function"==typeof r?r():r),[h]),A=T[n],j=A||T,{colorSchemes:L=d,components:R=p,cssVarPrefix:D}=j,$=Object.keys(L).filter(e=>!!L[e]).join(","),z=e.useMemo(()=>$.split(","),[$]),N="string"==typeof s?s:s.light,_="string"==typeof s?s:s.dark,F=L[N]&&L[_]?k:L[j.defaultColorScheme]?.palette?.mode||j.palette?.mode,{mode:H,setMode:B,systemMode:V,lightColorScheme:U,darkColorScheme:Y,colorScheme:W,setColorScheme:G}=function(t){const{defaultMode:n="light",defaultLightColorScheme:r,defaultDarkColorScheme:i,supportedColorSchemes:o=[],modeStorageKey:a=dN,colorSchemeStorageKey:s=pN,storageWindow:l=("undefined"==typeof window?void 0:window),storageManager:c=fN,noSsr:u=!1}=t,d=o.join(","),p=o.length>1,h=e.useMemo(()=>c?.({key:a,storageWindow:l}),[c,a,l]),m=e.useMemo(()=>c?.({key:`${s}-light`,storageWindow:l}),[c,s,l]),f=e.useMemo(()=>c?.({key:`${s}-dark`,storageWindow:l}),[c,s,l]),[g,y]=e.useState(()=>{const e=h?.get(n)||n,t=m?.get(r)||r,o=f?.get(i)||i;return{mode:e,systemMode:yN(e),lightColorScheme:t,darkColorScheme:o}}),[v,b]=e.useState(u||!p);e.useEffect(()=>{b(!0)},[]);const x=function(e){return vN(e,t=>"light"===t?e.lightColorScheme:"dark"===t?e.darkColorScheme:void 0)}(g),I=e.useCallback(e=>{y(t=>{if(e===t.mode)return t;const r=e??n;return h?.set(r),{...t,mode:r,systemMode:yN(r)}})},[h,n]),w=e.useCallback(e=>{e?"string"==typeof e?e&&!d.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):y(t=>{const n={...t};return vN(t,t=>{"light"===t&&(m?.set(e),n.lightColorScheme=e),"dark"===t&&(f?.set(e),n.darkColorScheme=e)}),n}):y(t=>{const n={...t},o=null===e.light?r:e.light,a=null===e.dark?i:e.dark;return o&&(d.includes(o)?(n.lightColorScheme=o,m?.set(o)):console.error(`\`${o}\` does not exist in \`theme.colorSchemes\`.`)),a&&(d.includes(a)?(n.darkColorScheme=a,f?.set(a)):console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)),n}):y(e=>(m?.set(r),f?.set(i),{...e,lightColorScheme:r,darkColorScheme:i}))},[d,m,f,r,i]),k=e.useCallback(e=>{"system"===g.mode&&y(t=>{const n=e?.matches?"dark":"light";return t.systemMode===n?t:{...t,systemMode:n}})},[g.mode]),S=e.useRef(k);return S.current=k,e.useEffect(()=>{if("function"!=typeof window.matchMedia||!p)return;const e=(...e)=>S.current(...e),t=window.matchMedia("(prefers-color-scheme: dark)");return t.addListener(e),e(t),()=>{t.removeListener(e)}},[p]),e.useEffect(()=>{if(p){const e=h?.subscribe(e=>{e&&!["light","dark","system"].includes(e)||I(e||n)})||gN,t=m?.subscribe(e=>{e&&!d.match(e)||w({light:e})})||gN,r=f?.subscribe(e=>{e&&!d.match(e)||w({dark:e})})||gN;return()=>{e(),t(),r()}}},[w,I,d,n,l,p,h,m,f]),{...g,mode:v?g.mode:void 0,systemMode:v?g.systemMode:void 0,colorScheme:v?x:void 0,setMode:I,setColorScheme:w}}({supportedColorSchemes:z,defaultLightColorScheme:N,defaultDarkColorScheme:_,modeStorageKey:m,colorSchemeStorageKey:f,defaultMode:F,storageManager:y,storageWindow:v,noSsr:S});let K=H,q=W;E&&(K=P.mode,q=P.colorScheme);const X=e.useMemo(()=>{const e=q||j.defaultColorScheme,t=j.generateThemeVars?.()||j.vars,n={...j,components:R,colorSchemes:L,cssVarPrefix:D,vars:t};if("function"==typeof n.generateSpacing&&(n.spacing=n.generateSpacing()),e){const t=L[e];t&&"object"==typeof t&&Object.keys(t).forEach(e=>{t[e]&&"object"==typeof t[e]?n[e]={...n[e],...t[e]}:n[e]=t[e]})}return l?l(n):n},[j,q,R,L,D]),Z=j.colorSchemeSelector;qm(()=>{if(q&&x&&Z&&"media"!==Z){const e=Z;let t=Z;if("class"===e&&(t=".%s"),"data"===e&&(t="[data-%s]"),e?.startsWith("data-")&&!e.includes("%s")&&(t=`[${e}="%s"]`),t.startsWith("."))x.classList.remove(...z.map(e=>t.substring(1).replace("%s",e))),x.classList.add(t.substring(1).replace("%s",q));else{const e=t.replace("%s",q).match(/\[([^\]]+)\]/);if(e){const[t,n]=e[1].split("=");n||z.forEach(e=>{x.removeAttribute(t.replace(q,e))}),x.setAttribute(t,n?n.replace(/"|'/g,""):"")}else x.setAttribute(t,q)}}},[q,Z,x,z]),e.useEffect(()=>{let e;if(g&&M.current&&b){const t=b.createElement("style");t.appendChild(b.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),b.head.appendChild(t),window.getComputedStyle(b.body),e=setTimeout(()=>{b.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[q,g,b]),e.useEffect(()=>(M.current=!0,()=>{M.current=!1}),[]);const J=e.useMemo(()=>({allColorSchemes:z,colorScheme:q,darkColorScheme:Y,lightColorScheme:U,mode:K,setColorScheme:G,setMode:B,systemMode:V}),[z,q,Y,U,K,G,B,V,X.colorSchemeSelector]);let Q=!0;(w||!1===j.cssVariables||E&&C?.cssVarPrefix===D)&&(Q=!1);const ee=(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(cN,{themeId:A?n:void 0,theme:X,children:c}),Q&&(0,O.jsx)(iN,{styles:X.generateStyleSheets?.()||[]})]});return E?ee:(0,O.jsx)(u.Provider,{value:J,children:ee})},useColorScheme:()=>e.useContext(u)||c,getInitColorSchemeScript:e=>function(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:i=dN,colorSchemeStorageKey:o=pN,attribute:a=hN,colorSchemeNode:s="document.documentElement",nonce:l}=e||{};let c="",u=a;if("class"===a&&(u=".%s"),"data"===a&&(u="[data-%s]"),u.startsWith(".")){const e=u.substring(1);c+=`${s}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));\n ${s}.classList.add('${e}'.replace('%s', colorScheme));`}const d=u.match(/\[([^\]]+)\]/);if(d){const[e,t]=d[1].split("=");t||(c+=`${s}.removeAttribute('${e}'.replace('%s', light));\n ${s}.removeAttribute('${e}'.replace('%s', dark));`),c+=`\n ${s}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:'""'});`}else c+=`${s}.setAttribute('${u}', colorScheme);`;return(0,O.jsx)("script",{suppressHydrationWarning:!0,nonce:"undefined"==typeof window?l:"",dangerouslySetInnerHTML:{__html:`(function() {\ntry {\n let colorScheme = '';\n const mode = localStorage.getItem('${i}') || '${t}';\n const dark = localStorage.getItem('${o}-dark') || '${r}';\n const light = localStorage.getItem('${o}-light') || '${n}';\n if (mode === 'system') {\n // handle system mode\n const mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n colorScheme = dark\n } else {\n colorScheme = light\n }\n }\n if (mode === 'light') {\n colorScheme = light;\n }\n if (mode === 'dark') {\n colorScheme = dark;\n }\n if (colorScheme) {\n ${c}\n }\n} catch(e){}})();`}},"mui-color-scheme-init")}({colorSchemeStorageKey:o,defaultLightColorScheme:h,defaultDarkColorScheme:m,modeStorageKey:i,...e})}}({themeId:jh,theme:()=>Ah({cssVariables:!0}),colorSchemeStorageKey:bN,modeStorageKey:wN,defaultColorScheme:{light:xN,dark:IN},resolveTheme:e=>{const t={...e,typography:oh(e.palette,e.typography)};return t.unstable_sx=function(e){return xu({sx:e,theme:this})},t}}),CN=kN;function PN({theme:t,...n}){const r=e.useMemo(()=>{if("function"==typeof t)return t;const e=jh in t?t[jh]:t;return"colorSchemes"in e?null:"vars"in e?t:{...t,vars:null}},[t]);return r?(0,O.jsx)(uN,{theme:r,...n}):(0,O.jsx)(CN,{theme:t,...n})}const EN=ob((0,O.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),TN=ob((0,O.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),AN=ob((0,O.jsx)("path",{d:"M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"Folder"),ON=ob((0,O.jsx)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 12H4V8h16z"}),"FolderOpen"),jN=ob((0,O.jsx)("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z"}),"InsertDriveFile"),LN=ob((0,O.jsx)("path",{d:"M19 13H5v-2h14z"}),"Remove"),RN=ob((0,O.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),DN=ob((0,O.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),$N=ob((0,O.jsx)("path",{d:"m10 17 5-5-5-5z"}),"ArrowRight"),zN=ob((0,O.jsx)("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3z"}),"AccountTree"),NN=ob((0,O.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),_N=ob((0,O.jsx)("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"}),"Code"),FN=ob((0,O.jsx)("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),HN=ob((0,O.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),BN=ob((0,O.jsx)("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home"),VN=ob((0,O.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star"),UN=ob((0,O.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),YN=ob((0,O.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),WN=ob((0,O.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),GN=ob((0,O.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"}),"Lock"),KN=ob((0,O.jsx)("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"}),"ShowChart"),qN=ob((0,O.jsx)("path",{d:"M4 9h4v11H4zm12 4h4v7h-4zm-6-9h4v16h-4z"}),"BarChart"),XN=ob((0,O.jsx)("path",{d:"M11 2v20c-5.07-.5-9-4.79-9-10s3.93-9.5 9-10m2.03 0v8.99H22c-.47-4.74-4.24-8.52-8.97-8.99m0 11.01V22c4.74-.47 8.5-4.25 8.97-8.99z"}),"PieChart"),ZN=ob([(0,O.jsx)("circle",{cx:"7",cy:"14",r:"3"},"0"),(0,O.jsx)("circle",{cx:"11",cy:"6",r:"3"},"1"),(0,O.jsx)("circle",{cx:"16.6",cy:"17.6",r:"3"},"2")],"ScatterPlot"),JN=ob((0,O.jsx)("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M8 20H4v-4h4zm0-6H4v-4h4zm0-6H4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4z"}),"GridOn"),QN=ob((0,O.jsx)("path",{d:"M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2"}),"Timeline"),e_=ob((0,O.jsx)("path",{d:"M9 4H7v2H5v12h2v2h2v-2h2V6H9zm10 4h-2V4h-2v4h-2v7h2v5h2v-5h2z"}),"CandlestickChart"),t_=ob((0,O.jsx)("path",{d:"m20.38 8.57-1.23 1.85a8 8 0 0 1-.22 7.58H5.07A8 8 0 0 1 15.58 6.85l1.85-1.23A10 10 0 0 0 3.35 19a2 2 0 0 0 1.72 1h13.85a2 2 0 0 0 1.74-1 10 10 0 0 0-.27-10.44zm-9.79 6.84a2 2 0 0 0 2.83 0l5.66-8.49-8.49 5.66a2 2 0 0 0 0 2.83"}),"Speed"),n_=ob((0,O.jsx)("path",{d:"m11.99 18.54-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27z"}),"Layers"),r_=ob((0,O.jsx)("path",{d:"m16 6 2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"}),"TrendingUp"),i_=ob((0,O.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z"}),"History"),o_=ob((0,O.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),a_=ob((0,O.jsx)("path",{d:"M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"}),"Tune"),s_=ob((0,O.jsx)("path",{d:"M7 14c-1.66 0-3 1.34-3 3 0 1.31-1.16 2-2 2 .92 1.22 2.49 2 4 2 2.21 0 4-1.79 4-4 0-1.66-1.34-3-3-3m13.71-9.37-1.34-1.34a.996.996 0 0 0-1.41 0L9 12.25 11.75 15l8.96-8.96c.39-.39.39-1.02 0-1.41"}),"Brush"),l_=ob((0,O.jsx)("path",{d:"m6 14 3 3v5h6v-5l3-3V9H6zm5-12h2v3h-2zM3.5 5.88l1.41-1.41 2.12 2.12L5.62 8zm13.46.71 2.12-2.12 1.41 1.41L18.38 8z"}),"Highlight"),c_=ob((0,O.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z"}),"Sync"),u_=ob([(0,O.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"},"0"),(0,O.jsx)("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2z"},"1")],"ZoomIn"),d_=ob((0,O.jsx)("path",{d:"M9 11.24V7.5C9 6.12 10.12 5 11.5 5S14 6.12 14 7.5v3.74c1.21-.81 2-2.18 2-3.74C16 5.01 13.99 3 11.5 3S7 5.01 7 7.5c0 1.56.79 2.93 2 3.74m9.84 4.63-4.54-2.26c-.17-.07-.35-.11-.54-.11H13v-6c0-.83-.67-1.5-1.5-1.5S10 6.67 10 7.5v10.74c-3.6-.76-3.54-.75-3.67-.75-.31 0-.59.13-.79.33l-.79.8 4.94 4.94c.27.27.65.44 1.06.44h6.79c.75 0 1.33-.55 1.44-1.28l.75-5.27c.01-.07.02-.14.02-.2 0-.62-.38-1.16-.91-1.38"}),"TouchApp"),p_=ob((0,O.jsx)("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2M3 19c0 1.1.9 2 2 2h3V10H3z"}),"TableChart"),h_=ob((0,O.jsx)("path",{d:"M4 9h4v11H4zm0-5h4v4H4zm6 3h4v4h-4zm6 3h4v4h-4zm0 5h4v5h-4zm-6-3h4v8h-4z"}),"StackedBarChart"),m_=ob((0,O.jsx)("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10c1.38 0 2.5-1.12 2.5-2.5 0-.61-.23-1.2-.64-1.67-.08-.1-.13-.21-.13-.33 0-.28.22-.5.5-.5H16c3.31 0 6-2.69 6-6 0-4.96-4.49-9-10-9m5.5 11c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m-3-4c-.83 0-1.5-.67-1.5-1.5S13.67 6 14.5 6s1.5.67 1.5 1.5S15.33 9 14.5 9M5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S7.33 13 6.5 13 5 12.33 5 11.5m6-4c0 .83-.67 1.5-1.5 1.5S8 8.33 8 7.5 8.67 6 9.5 6s1.5.67 1.5 1.5"}),"Palette"),f_=ob((0,O.jsx)("path",{d:"M16.54 11 13 7.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41zM11 7H2v2h9zm10 6.41L19.59 12 17 14.59 14.41 12 13 13.41 15.59 16 13 18.59 14.41 20 17 17.41 19.59 20 21 18.59 18.41 16zM11 15H2v2h9z"}),"Rule"),g_=ob((0,O.jsx)("path",{d:"M13 1.07V9h7c0-4.08-3.05-7.44-7-7.93M4 15c0 4.42 3.58 8 8 8s8-3.58 8-8v-4H4zm7-13.93C7.05 1.56 4 4.92 4 9h7z"}),"Mouse"),y_=ob((0,O.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2m-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckBox"),v_=ob((0,O.jsx)("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"}),"UnfoldMore"),b_=ob((0,O.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block"),x_=ob((0,O.jsx)("path",{d:"M12.16 3h-.32L9.21 8.25h5.58zm4.3 5.25h5.16L19 3h-5.16zm4.92 1.5h-8.63V20.1zM11.25 20.1V9.75H2.62zM7.54 8.25 10.16 3H5L2.38 8.25z"}),"Diamond"),I_=ob((0,O.jsx)("path",{d:"M14.06 9.94 12 9l2.06-.94L15 6l.94 2.06L18 9l-2.06.94L15 12zM4 14l.94-2.06L7 11l-2.06-.94L4 8l-.94 2.06L1 11l2.06.94zm4.5-5 1.09-2.41L12 5.5 9.59 4.41 8.5 2 7.41 4.41 5 5.5l2.41 1.09zm-4 11.5 6-6.01 4 4L23 8.93l-1.41-1.41-7.09 7.97-4-4L3 19z"}),"AutoGraph"),w_=ob((0,O.jsx)("path",{d:"M3 14h4v-4H3zm0 5h4v-4H3zM3 9h4V5H3zm5 5h13v-4H8zm0 5h13v-4H8zM8 5v4h13V5z"}),"ViewList"),k_=ob((0,O.jsx)("path",{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7"}),"GpsFixed"),S_=ob((0,O.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),M_=ob((0,O.jsx)("path",{d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m-9-2V7H4v3H1v2h3v3h2v-3h3v-2zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"PersonAdd"),C_=ob((0,O.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),P_=ob((0,O.jsx)("path",{d:"m20.54 5.23-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27M12 17.5 6.5 12H10v-2h4v2h3.5zM5.12 5l.81-1h12l.94 1z"}),"Archive"),E_=ob((0,O.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert");var T_={ExpandMore:EN,ChevronRight:TN,Folder:AN,FolderOpen:ON,InsertDriveFile:jN,Remove:LN,Add:RN,ArrowDropDown:DN,ArrowRight:$N,AccountTree:zN,Description:NN,Code:_N,Image:FN,Settings:HN,Home:BN,Star:VN,Delete:UN,Edit:YN,Visibility:WN,Lock:GN,ShowChart:KN,BarChart:qN,PieChart:XN,ScatterPlot:ZN,GridOn:JN,Timeline:QN,CandlestickChart:e_,Speed:t_,Layers:n_,TrendingUp:r_,History:i_,PlayArrow:o_,Tune:a_,Brush:s_,Highlight:l_,Sync:c_,ZoomIn:u_,TouchApp:d_,TableChart:p_,StackedBarChart:h_,Palette:m_,Rule:f_,Mouse:g_,CheckBox:y_,UnfoldMore:v_,Block:b_,Diamond:x_,AutoGraph:I_,ViewList:w_,GpsFixed:k_,ContentCopy:S_,PersonAdd:M_,CheckCircle:C_,Archive:P_,MoreVert:E_},A_=function(e){if(e)return T_[e]||void 0},O_=["id","items","getItemId","getItemLabel","getItemChildren","selectedItems","defaultSelectedItems","multiSelect","checkboxSelection","disableSelection","selectionPropagation","expandedItems","defaultExpandedItems","expansionTrigger","isItemEditable","editableItems","disabledItems","disabledItemsFocusable","itemChildrenIndentation","height","sx","collapseIcon","expandIcon","endIcon","ariaLabel","ariaLabelledBy","setProps"];function j_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0){var e=new Set(v);return function(t){return e.has(A(t))}}return!1},[y,v,A]),D=(0,e.useMemo)(function(){var e={};return S&&(e.collapseIcon=A_(S)),M&&(e.expandIcon=A_(M)),C&&(e.endIcon=A_(C)),Object.keys(e).length>0?e:void 0},[S,M,C]),$=(0,e.useCallback)(function(e,t){T&&T({selectedItems:t})},[T]),z=(0,e.useCallback)(function(e,t){T&&T({expandedItems:t})},[T]),N=(0,e.useCallback)(function(e,t){T&&T({clickedItem:{itemId:t,event_timestamp:Date.now()}})},[T]),_=(0,e.useCallback)(function(e,t){T&&T({focusedItem:{itemId:t,event_timestamp:Date.now()}})},[T]),F=(0,e.useCallback)(function(e,t){T&&T({editedItemLabel:{itemId:e,newLabel:t,event_timestamp:Date.now()}})},[T]),H=(0,e.useMemo)(function(){var e={};return w&&(e.height="number"==typeof w?"".concat(w,"px"):w,e.overflow="auto"),e},[w]),B=function(){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return j_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,e.useState)(L_),2),n=t[0],r=t[1];return(0,e.useEffect)(function(){if("undefined"!=typeof document){var e=document.documentElement,t=function(){return r(L_())},n=new MutationObserver(t);return n.observe(e,{attributes:!0,attributeFilter:["data-mantine-color-scheme"]}),t(),function(){return n.disconnect()}}},[]),n}();return n().createElement("div",{id:r,style:H},n().createElement(PN,{theme:"dark"===B?D_:R_},n().createElement(Qz,{items:i||[],getItemId:A,getItemLabel:O,getItemChildren:j,selectedItems:l,defaultSelectedItems:c,multiSelect:u,checkboxSelection:d,disableSelection:p,selectionPropagation:h,expandedItems:m,defaultExpandedItems:f,expansionTrigger:g,isItemEditable:R,isItemDisabled:L,disabledItemsFocusable:x,itemChildrenIndentation:I,sx:k,slots:D,onSelectedItemsChange:$,onExpandedItemsChange:z,onItemClick:N,onItemFocus:_,onItemLabelChange:F,"aria-label":P,"aria-labelledby":E})))};$_.defaultProps={items:[],getItemId:"id",getItemLabel:"label",getItemChildren:"children",multiSelect:!1,checkboxSelection:!1,disableSelection:!1,disabledItemsFocusable:!1,isItemEditable:!1,expansionTrigger:"content",itemChildrenIndentation:"12px"},$_.propTypes={id:i().string,items:i().arrayOf(i().object),getItemId:i().string,getItemLabel:i().string,getItemChildren:i().string,selectedItems:i().oneOfType([i().string,i().arrayOf(i().string)]),defaultSelectedItems:i().oneOfType([i().string,i().arrayOf(i().string)]),multiSelect:i().bool,checkboxSelection:i().bool,disableSelection:i().bool,selectionPropagation:i().exact({parents:i().bool,descendants:i().bool}),expandedItems:i().arrayOf(i().string),defaultExpandedItems:i().arrayOf(i().string),expansionTrigger:i().oneOf(["content","iconContainer"]),isItemEditable:i().bool,editableItems:i().arrayOf(i().string),disabledItems:i().arrayOf(i().string),disabledItemsFocusable:i().bool,itemChildrenIndentation:i().oneOfType([i().number,i().string]),height:i().oneOfType([i().number,i().string]),sx:i().object,collapseIcon:i().string,expandIcon:i().string,endIcon:i().string,ariaLabel:i().string,ariaLabelledBy:i().string,clickedItem:i().exact({itemId:i().string,event_timestamp:i().number}),focusedItem:i().exact({itemId:i().string,event_timestamp:i().number}),editedItemLabel:i().exact({itemId:i().string,newLabel:i().string,event_timestamp:i().number}),setProps:i().func};const z_=$_;function N_(e){return LD("MuiSimpleTreeView",e)}RD("MuiSimpleTreeView",["root","item","itemContent","itemGroupTransition","itemIconContainer","itemLabel","itemCheckbox"]);const __=["apiRef","slots","slotProps","disabledItemsFocusable","onItemClick","itemChildrenIndentation","id","expandedItems","defaultExpandedItems","onExpandedItemsChange","onItemExpansionToggle","expansionTrigger","disableSelection","selectedItems","defaultSelectedItems","multiSelect","checkboxSelection","selectionPropagation","onSelectedItemsChange","onItemSelectionToggle","onItemFocus"],F_=e.createContext(null);function H_(t){const{children:n,itemId:r=null,idAttribute:i}=t,{store:o,rootRef:a}=FD(),s=e.useRef(new Map);e.useEffect(()=>{if(!a.current)return;const e=S$.itemOrderedChildrenIds(o.state,r??null)??[],t=(i??a.current.id).replace(/["\\]/g,"\\$&");if(null!=r){const e=a.current.querySelector(`*[id="${t}"][role="treeitem"]`);if(e&&"false"===e.getAttribute("aria-expanded"))return}const n=a.current.querySelectorAll(`${null==r?"":`*[id="${t}"] `}[role="treeitem"]:not(*[id="${t}"] [role="treeitem"] [role="treeitem"])`),l=Array.from(n).map(e=>s.current.get(e.id));(l.length!==e.length||l.some((t,n)=>t!==e[n]))&&o.jsxItems.setJSXItemsOrderedChildrenIds(r??null,l)});const l=e.useMemo(()=>({registerChild:(e,t)=>s.current.set(e,t),unregisterChild:e=>s.current.delete(e),parentId:r}),[r]);return(0,O.jsx)(F_.Provider,{value:l,children:n})}const B_=({props:t,rootRef:n,contentRef:r})=>{const{store:i}=FD(),{children:o,disabled:a=!1,disableSelection:s=!1,label:l,itemId:c,id:u}=t,d=e.useContext(F_);if(null==d)throw new Error(["MUI X: Could not find the Tree View Children Item context.","It looks like you rendered your component outside of a SimpleTreeView parent component.","This can also happen if you are bundling multiple versions of the Tree View."].join("\n"));const{registerChild:p,unregisterChild:h,parentId:m}=d,f=D$(o),g=e.useRef(null),y=sD(g,r),v=uD(i,Y$.treeItemIdAttribute,c,u),b=e.useRef(!0),x=aD(Symbol);return kz(()=>(p(v,c),()=>{h(v),h(v)}),[i,p,h,v,c]),kz(()=>(b.current=!0,()=>{b.current=!1}),[]),kz(()=>{const e=i.jsxItems.upsertJSXItem({id:c,idAttribute:u,parentId:m,expandable:f,disabled:a,selectable:!s},x.current);return()=>{b.current||e()}},[i,m,c,f,a,s,u,x]),e.useEffect(()=>{if(l)return i.jsxItems.mapLabelFromJSX(c,(g.current?.textContent??"").toLowerCase())},[i,c,l]),{contentRef:y,rootRef:n}},V_=({children:t,itemId:n,idAttribute:r})=>{const i=e.useContext($$);return(0,O.jsx)(H_,{itemId:n,idAttribute:r,children:(0,O.jsx)($$.Provider,{value:i+1,children:t})})};class U_{itemOwners=(()=>new Map)();constructor(e){this.store=e,e.itemPluginManager.register(B_,V_)}upsertJSXItem=(e,t)=>{const n=this.itemOwners.get(e.id);if(null!=n&&n!==t)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.",`Two items were provided with the same id in the \`items\` prop: "${e.id}"`].join("\n"));this.itemOwners.set(e.id,t);const r=S$.itemMeta(this.store.state,e.id);if(null!=r){let t=!1;for(const n of Object.keys(e))if(r[n]!==e[n]){t=!0;break}t&&this.store.update({itemMetaLookup:l({},this.store.state.itemMetaLookup,{[e.id]:l({},r,e)})})}else this.store.update({itemMetaLookup:l({},this.store.state.itemMetaLookup,{[e.id]:e}),itemModelLookup:l({},this.store.state.itemModelLookup,{[e.id]:{id:e.id,label:e.label??""}})});return()=>{this.itemOwners.delete(e.id);const t=l({},this.store.state.itemMetaLookup),n=l({},this.store.state.itemModelLookup);delete t[e.id],delete n[e.id],this.store.update({itemMetaLookup:t,itemModelLookup:n})}};mapLabelFromJSX=(e,t)=>(this.store.keyboardNavigation.updateLabelMap(n=>(n[e]=t,n)),()=>{this.store.keyboardNavigation.updateLabelMap(t=>{const n=l({},t);return delete n[e],n})});setJSXItemsOrderedChildrenIds=(e,t)=>{const n=e??b$;this.store.update({itemOrderedChildrenIdsLookup:l({},this.store.state.itemOrderedChildrenIdsLookup,{[n]:t}),itemChildrenIndexesLookup:l({},this.store.state.itemChildrenIndexesLookup,{[n]:x$(t)})})}}const Y_={getInitialState:e=>e,updateStateFromParameters:e=>e,shouldIgnoreItemsStateUpdate:()=>!0};class W_ extends Wz{jsxItems=(()=>new U_(this))();constructor(e){super(l({},e,{items:zD}),"SimpleTreeView",Y_)}updateStateFromParameters(e){super.updateStateFromParameters(l({},e,{items:zD}))}}const G_=$D(),K_=bm("ul",{name:"MuiSimpleTreeView",slot:"Root"})({padding:0,margin:0,listStyle:"none",outline:0,position:"relative"}),q_=e.forwardRef(function(t,n){const r=G_({props:t,name:"MuiSimpleTreeView"}),{slots:i,slotProps:o,apiRef:a,parameters:s,forwardedProps:c}=function(t){const{apiRef:n,slots:r,slotProps:i,disabledItemsFocusable:o,onItemClick:a,itemChildrenIndentation:s,id:l,expandedItems:c,defaultExpandedItems:u,onExpandedItemsChange:d,onItemExpansionToggle:p,expansionTrigger:h,disableSelection:m,selectedItems:f,defaultSelectedItems:g,multiSelect:y,checkboxSelection:v,selectionPropagation:b,onSelectedItemsChange:x,onItemSelectionToggle:I,onItemFocus:w}=t,k=tt(t,__);return{apiRef:n,slots:r,slotProps:i,parameters:e.useMemo(()=>({disabledItemsFocusable:o,onItemClick:a,itemChildrenIndentation:s,id:l,expandedItems:c,defaultExpandedItems:u,onExpandedItemsChange:d,onItemExpansionToggle:p,expansionTrigger:h,disableSelection:m,selectedItems:f,defaultSelectedItems:g,multiSelect:y,checkboxSelection:v,selectionPropagation:b,onSelectedItemsChange:x,onItemSelectionToggle:I,onItemFocus:w}),[o,a,s,l,c,u,d,p,h,m,f,g,y,v,b,x,I,w]),forwardedProps:k}}(r),u=Mz(W_,s),d=e.useRef(null),p=Iz(u,c,sD(n,d)),h=(t=>{const{classes:n}=t;return e.useMemo(()=>MD({root:["root"],item:["item"],itemContent:["itemContent"],itemGroupTransition:["itemGroupTransition"],itemIconContainer:["itemIconContainer"],itemLabel:["itemLabel"],itemCheckbox:["itemCheckbox"]},N_,n),[n])})(r),m=i?.root??K_,f=TD({elementType:m,externalSlotProps:o?.root,className:h.root,getSlotProps:p,ownerState:r});return(0,O.jsx)(VD,{store:u,classes:h,slots:i,slotProps:o,apiRef:a,rootRef:d,children:(0,O.jsx)(H_,{itemId:null,idAttribute:null,children:(0,O.jsx)($$.Provider,{value:0,children:(0,O.jsx)(m,l({},f))})})})});function X_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0?e:void 0},[S,M,C]),O=(0,e.useCallback)(function(e,t){T&&T({selectedItems:t})},[T]),j=(0,e.useCallback)(function(e,t){T&&T({expandedItems:t})},[T]),L=(0,e.useCallback)(function(e,t){T&&T({clickedItem:{itemId:t,event_timestamp:Date.now()}})},[T]),R=(0,e.useMemo)(function(){var e={};return w&&(e.height="number"==typeof w?"".concat(w,"px"):w,e.overflow="auto"),e},[w]),D=function(){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return X_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?X_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,e.useState)(Z_),2),n=t[0],r=t[1];return(0,e.useEffect)(function(){if("undefined"!=typeof document){var e=document.documentElement,t=function(){return r(Z_())},n=new MutationObserver(t);return n.observe(e,{attributes:!0,attributeFilter:["data-mantine-color-scheme"]}),t(),function(){return n.disconnect()}}},[]),n}();return n().createElement("div",{id:r,style:R},n().createElement(PN,{theme:"dark"===D?Q_:J_},n().createElement(q_,{selectedItems:a,defaultSelectedItems:s,multiSelect:c,checkboxSelection:d,disableSelection:h,expandedItems:m,defaultExpandedItems:f,expansionTrigger:y,disabledItemsFocusable:b,itemChildrenIndentation:I,sx:k,slots:A,onSelectedItemsChange:O,onExpandedItemsChange:j,onItemClick:L,"aria-label":P,"aria-labelledby":E},eF(o))))};tF.propTypes={id:i().string,items:i().arrayOf(i().shape({itemId:i().string.isRequired,label:i().string.isRequired,children:i().array,disabled:i().bool,disableSelection:i().bool})),selectedItems:i().oneOfType([i().string,i().arrayOf(i().string)]),defaultSelectedItems:i().oneOfType([i().string,i().arrayOf(i().string)]),multiSelect:i().bool,checkboxSelection:i().bool,disableSelection:i().bool,expandedItems:i().arrayOf(i().string),defaultExpandedItems:i().arrayOf(i().string),expansionTrigger:i().oneOf(["content","iconContainer"]),disabledItemsFocusable:i().bool,itemChildrenIndentation:i().oneOfType([i().number,i().string]),height:i().oneOfType([i().number,i().string]),sx:i().object,collapseIcon:i().string,expandIcon:i().string,endIcon:i().string,ariaLabel:i().string,ariaLabelledBy:i().string,clickedItem:i().exact({itemId:i().string,event_timestamp:i().number}),setProps:i().func};const nF=tF,rF="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",iF=e=>{let t,n,r,i,o,a,s,l="",c=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");c>4,n=(15&o)<<4|a>>2,r=(3&a)<<6|s,l+=String.fromCharCode(t),64!=a&&(l+=String.fromCharCode(n)),64!=s&&(l+=String.fromCharCode(r));return l},oF=[];let aF=0;for(;aF<64;)oF[aF]=0|4294967296*Math.sin(++aF%Math.PI);let sF=function(e){return e.NotFound="NotFound",e.Invalid="Invalid",e.ExpiredAnnual="ExpiredAnnual",e.ExpiredAnnualGrace="ExpiredAnnualGrace",e.ExpiredVersion="ExpiredVersion",e.Valid="Valid",e.OutOfScope="OutOfScope",e.NotAvailableInInitialProPlan="NotAvailableInInitialProPlan",e}({});const lF=["pro","premium"],cF=["perpetual","annual","subscription"],uF=/^.*EXPIRY=([0-9]+),.*$/,dF=/^.*ORDER:([0-9]+),.*$/,pF=["x-data-grid-pro","x-date-pickers-pro"];function hF({releaseInfo:e,licenseKey:t,packageName:n}){if(!e)throw new Error("MUI X: The release information is missing. Not able to validate license.");if(!t)return{status:sF.NotFound};const r=t.substr(0,32),i=t.substr(32);if(r!==function(e){const t=[];let n,r,i,o=unescape(encodeURI(e))+"€",a=o.length;const s=[n=1732584193,r=4023233417,~n,~r];for(e=--a/4+2|15,t[--e]=8*a;~a;)t[a>>2]|=o.charCodeAt(a)<<8*a--;for(aF=o=0;aF>4]+oF[o]+~~t[aF|15&[o,5*o+1,3*o+5,7*o][a]])<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+o++%4])|i>>>-a),n,r])n=0|a[1],r=a[2];for(o=4;o;)s[--o]+=a[o]}for(e="";o<32;)e+=(s[o>>3]>>4*(1^o++)&15).toString(16);return e}(i))return{status:sF.Invalid};const o=function(e){const t=iF(e);return t.includes("KEYVERSION=1")?function(e){let t,n;try{t=parseInt(e.match(uF)[1],10),t&&!Number.isNaN(t)||(t=null),n=parseInt(e.match(dF)[1],10),n&&!Number.isNaN(n)||(n=null)}catch(e){t=null,n=null}return{version:1,licenseModel:"perpetual",planScope:"pro",planVersion:"initial",expiryTimestamp:t,expiryDate:t?new Date(t):null,orderId:n}}(t):t.includes("KV=2")?function(e){const t={version:2,licenseModel:null,planScope:null,planVersion:"initial",expiryTimestamp:null,expiryDate:null,orderId:null};return e.split(",").map(e=>e.split("=")).filter(e=>2===e.length).forEach(([e,n])=>{if("S"===e&&(t.planScope=n),"LM"===e&&(t.licenseModel=n),"E"===e){const e=parseInt(n,10);e&&!Number.isNaN(e)&&(t.expiryTimestamp=e,t.expiryDate=new Date(e))}if("PV"===e&&(t.planVersion=n),"O"===e){const e=parseInt(n,10);e&&!Number.isNaN(e)&&(t.orderId=e)}}),t}(t):null}(i);if(null==o)return console.error("MUI X: Error checking license. Key version not found!"),{status:sF.Invalid};if(null==o.licenseModel||!cF.includes(o.licenseModel))return console.error("MUI X: Error checking license. License model not found or invalid!"),{status:sF.Invalid};if(null==o.expiryTimestamp)return console.error("MUI X: Error checking license. Expiry timestamp not found or invalid!"),{status:sF.Invalid};o.licenseModel;{const t=parseInt(iF(e),10);if(Number.isNaN(t))throw new Error("MUI X: The release information is invalid. Not able to validate license.");if(o.expiryTimestamp{const e=r??mF.getLicenseKey();if(vF[t]&&vF[t].key===e)return vF[t].licenseVerifier;const i=t.includes("premium")?"Premium":"Pro",o=hF({releaseInfo:n,licenseKey:e,packageName:t}),a=`@mui/${t}`;return p(h.licenseVerification({licenseKey:e},{packageName:t,packageReleaseInfo:n,licenseStatus:o?.status})),o.status===sF.Valid||(o.status===sF.Invalid?gF(["MUI X: Invalid license key.","","Your MUI X license key format isn't valid. It could be because the license key is missing a character or has a typo.","","To solve the issue, you need to double check that `setLicenseKey()` is called with the right argument","Please check the license key installation https://mui.com/r/x-license-key-installation."]):o.status===sF.NotAvailableInInitialProPlan?gF(["MUI X: Component not included in your license.","","The component you are trying to use is not included in the Pro Plan you purchased.","","Your license is from an old version of the Pro Plan that is only compatible with the `@mui/x-data-grid-pro` and `@mui/x-date-pickers-pro` commercial packages.","","To start using another Pro package, please consider reaching to our sales team to upgrade your license or visit https://mui.com/r/x-get-license to get a new license key."]):o.status===sF.OutOfScope?function({packageName:e}){const t=e.replace(/-(premium|pro)$/,"");gF(["MUI X: License key plan mismatch.","","Your use of MUI X is not compatible with the plan of your license key. The feature you are trying to use is not included in the plan of your license key. This happens if you try to use Data Grid Premium with a license key for the Pro plan.","","To solve the issue, you can upgrade your plan from Pro to Premium at https://mui.com/r/x-get-license?scope=premium.",`Or if you didn't intend to use Premium features, you can replace the import of \`${t}-premium\` with \`${t}-pro\`.`])}({packageName:a}):o.status===sF.NotFound?function({plan:e,packageName:t}){gF(["MUI X: Missing license key.","",`The license key is missing. You might not be allowed to use \`${t}\` which is part of MUI X ${e}.`,"","To solve the issue, you can check the free trial conditions: https://mui.com/r/x-license-trial.","If you are eligible no actions are required. If you are not eligible to the free trial, you need to purchase a license https://mui.com/r/x-get-license or stop using the software immediately."])}({plan:i,packageName:a}):o.status===sF.ExpiredAnnualGrace?function({plan:e,licenseKey:t,expiryTimestamp:n}){gF(["MUI X: Expired license key.","",`Your annual license key to use MUI X ${e} in non-production environments has expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${e} component (more details in https://mui.com/r/x-license-annual).`,"","To solve the problem you can either:","","- Renew your license https://mui.com/r/x-get-license and use the new key",`- Stop making changes to code depending directly or indirectly on MUI X ${e}'s APIs`,"","Note that your license is perpetual in production environments with any version released before your license term ends.","",`- License key expiry timestamp: ${new Date(n)}`,`- Installed license key: ${t}`,""])}(l({plan:i},o.meta)):o.status===sF.ExpiredAnnual?function({plan:e,licenseKey:t,expiryTimestamp:n}){throw new Error(["MUI X: Expired license key.","",`Your annual license key to use MUI X ${e} in non-production environments has expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${e} component (more details in https://mui.com/r/x-license-annual).`,"","To solve the problem you can either:","","- Renew your license https://mui.com/r/x-get-license and use the new key",`- Stop making changes to code depending directly or indirectly on MUI X ${e}'s APIs`,"","Note that your license is perpetual in production environments with any version released before your license term ends.","",`- License key expiry timestamp: ${new Date(n)}`,`- Installed license key: ${t}`,""].join("\n"))}(l({plan:i},o.meta)):o.status===sF.ExpiredVersion&&function({packageName:e}){gF(["MUI X: Expired package version.","",`You have installed a version of \`${e}\` that is outside of the maintenance plan of your license key. By default, commercial licenses provide access to new versions released during the first year after the purchase.`,"","To solve the issue, you can renew your license https://mui.com/r/x-get-license or install an older version of the npm package that is compatible with your license key."])}({packageName:a})),vF[t]={key:e,licenseVerifier:o},o},[t,n,r])}const xF=Object.is;function IF(e,t){if(e===t)return!0;if(!(e instanceof Object&&t instanceof Object))return!1;let n=0,r=0;for(const r in e){if(n+=1,!xF(e[r],t[r]))return!1;if(!(r in t))return!1}for(const e in t)r+=1;return n===r}function wF(e){switch(e){case sF.ExpiredAnnualGrace:case sF.ExpiredAnnual:return"MUI X Expired license key";case sF.ExpiredVersion:return"MUI X Expired package version";case sF.Invalid:return"MUI X Invalid license key";case sF.OutOfScope:return"MUI X License key plan mismatch";case sF.NotAvailableInInitialProPlan:return"MUI X Product not covered by plan";case sF.NotFound:return"MUI X Missing license key";default:throw new Error("Unhandled MUI X license status.")}}const kF=function(t){return e.memo(t,IF)}(function(e){const{packageName:t,releaseInfo:n}=e,r=bF(t,n);return r.status===sF.Valid?null:(0,O.jsx)("div",{style:{position:"absolute",pointerEvents:"none",color:"#8282829e",zIndex:1e5,width:"100%",textAlign:"center",bottom:"50%",right:0,letterSpacing:5,fontSize:24},children:wF(r.status)})}),SF=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t},MF=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=Hh(n?.className,o,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},a={...n,...i,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}({...i,...r}),s=SF(r),l=SF(i),c=t(a),u=Hh(c?.className,n?.className,o,i?.className,r?.className),d={...c?.style,...n?.style,...i?.style,...r?.style},p={...c,...n,...l,...s};return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}},CF=e=>e,PF=(()=>{let e=CF;return{configure(t){e=t},generate:t=>e(t),reset(){e=CF}}})(),EF={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function TF(e,t,n="Mui"){const r=EF[t];return r?`${n}-${r}`:`${PF.generate(e)}-${t}`}function AF(e){return TF("MuiRichTreeViewPro",e)}!function(e,t,n="Mui"){const r={};["root","item","itemContent","itemGroupTransition","itemIconContainer","itemLabel","itemCheckbox","itemLabelInput","itemDragAndDropOverlay","itemErrorIcon","itemLoadingIcon"].forEach(t=>{r[t]=TF(e,t,n)})}("MuiRichTreeViewPro");const OF=["apiRef","slots","slotProps","disabledItemsFocusable","items","isItemDisabled","isItemSelectionDisabled","getItemLabel","getItemChildren","getItemId","onItemClick","itemChildrenIndentation","id","expandedItems","defaultExpandedItems","onExpandedItemsChange","onItemExpansionToggle","expansionTrigger","disableSelection","selectedItems","defaultSelectedItems","multiSelect","checkboxSelection","selectionPropagation","onSelectedItemsChange","onItemSelectionToggle","onItemFocus","onItemLabelChange","isItemEditable","dataSource","dataSourceCache","itemsReordering","isItemReorderable","canMoveItemToNewPosition","onItemPositionChange"];class jF{constructor({ttl:e=3e5}){this.cache={},this.ttl=e}set(e,t){const n=Date.now()+this.ttl;this.cache[e]={value:t,expiry:n}}get(e){const t=this.cache[e];if(t)return Date.now()>t.expiry?(delete this.cache[e],-1):t.value}clear(){this.cache={}}}let LF=function(e){return e[e.QUEUED=0]="QUEUED",e[e.PENDING=1]="PENDING",e[e.SETTLED=2]="SETTLED",e[e.UNKNOWN=3]="UNKNOWN",e}({});class RF{pendingRequests=(()=>new Set)();queuedRequests=(()=>new Set)();settledRequests=(()=>new Set)();constructor(e,t=1/0){this.lazyLoadingPlugin=e,this.maxConcurrentRequests=t}processQueue=async()=>{if(0===this.queuedRequests.size||this.pendingRequests.size>=this.maxConcurrentRequests)return;const e=Math.min(this.maxConcurrentRequests-this.pendingRequests.size,this.queuedRequests.size);if(0===e)return;const t=Array.from(this.queuedRequests),n=[];for(let r=0;r{const t={};e.forEach(e=>{this.queuedRequests.add(e),t[e]=!0}),await this.processQueue()};setRequestSettled=async e=>{this.pendingRequests.delete(e),this.settledRequests.add(e),await this.processQueue()};clear=()=>{this.queuedRequests.clear(),Array.from(this.pendingRequests).forEach(e=>this.clearPendingRequest(e))};clearPendingRequest=async e=>{this.pendingRequests.delete(e),await this.processQueue()};getRequestStatus=e=>this.pendingRequests.has(e)?LF.PENDING:this.queuedRequests.has(e)?LF.QUEUED:this.settledRequests.has(e)?LF.SETTLED:LF.UNKNOWN;getActiveRequestsCount=()=>this.pendingRequests.size+this.queuedRequests.size}const DF={loading:{},errors:{}};class $F{nestedDataManager=(()=>new RF(this))();constructor(e){this.store=e,this.cache=e.parameters.dataSourceCache??new jF({}),null!=e.parameters.dataSource&&(this.init(),e.subscribeEvent("beforeItemToggleExpansion",this.handleBeforeItemToggleExpansion))}init=()=>{const e=this.store,t=this;(async()=>{if(e.parameters.items.length){const t=function(e,t){return Object.values(e.state.itemMetaLookup).filter(n=>!n.expandable&&0!==t.getChildrenCount(e.state.itemModelLookup[n.id])).map(e=>e.id)}(e,e.parameters.dataSource);t.length>0&&e.expansion.addExpandableItems(t)}else await t.fetchItemChildren({itemId:null});await async function n(r){const i=r.filter(t=>C$.isItemExpanded(e.state,t));if(i.length>0){const r=i.filter(t=>0===S$.itemOrderedChildrenIds(e.state,t).length);r.length>0&&await t.fetchItems(r);const o=i.flatMap(t=>S$.itemOrderedChildrenIds(e.state,t));await n(o)}}(S$.itemOrderedChildrenIds(e.state,null))})()};handleBeforeItemToggleExpansion=async(e,t)=>{this.store.parameters.dataSource&&e.shouldBeExpanded&&(e.isExpansionPrevented=!0,await this.fetchItems([e.itemId]),L$.itemHasError(this.store.state,e.itemId)||(this.store.expansion.applyItemExpansion({itemId:e.itemId,shouldBeExpanded:!0,event:t}),A$.isItemSelected(this.store.state,e.itemId)&&this.store.selection.setItemSelection({event:t,itemId:e.itemId,keepExistingSelection:!0,shouldBeSelected:!0})))};setItemLoading=(e,t)=>{if(!this.store.parameters.dataSource||!this.store.state.lazyLoadedItems)return;if(L$.isItemLoading(this.store.state,e)===t)return;const n=e??b$,r=l({},this.store.state.lazyLoadedItems.loading);!1===t?delete r[n]:r[n]=t,this.store.set("lazyLoadedItems",l({},this.store.state.lazyLoadedItems,{loading:r}))};setItemError=(e,t)=>{if(!this.store.parameters.dataSource||!this.store.state.lazyLoadedItems)return;if(L$.itemError(this.store.state,e)===t)return;const n=e??b$,r=l({},this.store.state.lazyLoadedItems.errors);null===t&&void 0!==r[n]?delete r[n]:r[n]=t,this.store.set("lazyLoadedItems",l({},this.store.state.lazyLoadedItems,{errors:r}))};buildPublicAPI=()=>({updateItemChildren:this.updateItemChildren});fetchItems=e=>this.nestedDataManager.queue(e);updateItemChildren=e=>this.fetchItemChildren({itemId:e,forceRefresh:!0});fetchItemChildren=async({itemId:e,forceRefresh:t})=>{if(!this.store.parameters.dataSource)return;const{getChildrenCount:n,getTreeItems:r}=this.store.parameters.dataSource;if(null!=e&&!S$.itemMeta(this.store.state,e))return void this.nestedDataManager.clearPendingRequest(e);null!=e||L$.isEmpty(this.store.state)||this.store.set("lazyLoadedItems",DF);const i=e??b$;if(!t){const t=this.cache.get(i);if(void 0!==t&&-1!==t)return null!=e&&this.nestedDataManager.setRequestSettled(e),this.store.items.setItemChildren({items:t,parentId:e,getChildrenCount:n}),void this.setItemLoading(e,!1);this.setItemLoading(e,!0),-1===t&&this.store.items.removeChildren(e)}L$.itemError(this.store.state,e)&&this.setItemError(e,null);try{let t;null==e?t=await r():(t=await r(e),this.nestedDataManager.setRequestSettled(e)),this.cache.set(i,t),this.store.items.setItemChildren({items:t,parentId:e,getChildrenCount:n})}catch(n){const r=n;this.setItemError(e,r),t&&this.store.items.removeChildren(e)}finally{this.setItemLoading(e,!1),null!=e&&this.nestedDataManager.setRequestSettled(e)}}}const zF=ne({memoize:J,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),NF=(e,t,n,r,i,o,a,s,...l)=>{if(l.length>0)throw new Error("Unsupported number of selectors");let c;if(e&&t&&n&&r&&i&&o&&a&&s)c=(l,c,u,d)=>{const p=e(l,c,u,d),h=t(l,c,u,d),m=n(l,c,u,d),f=r(l,c,u,d),g=i(l,c,u,d),y=o(l,c,u,d),v=a(l,c,u,d);return s(p,h,m,f,g,y,v,c,u,d)};else if(e&&t&&n&&r&&i&&o&&a)c=(s,l,c,u)=>{const d=e(s,l,c,u),p=t(s,l,c,u),h=n(s,l,c,u),m=r(s,l,c,u),f=i(s,l,c,u),g=o(s,l,c,u);return a(d,p,h,m,f,g,l,c,u)};else if(e&&t&&n&&r&&i&&o)c=(a,s,l,c)=>{const u=e(a,s,l,c),d=t(a,s,l,c),p=n(a,s,l,c),h=r(a,s,l,c),m=i(a,s,l,c);return o(u,d,p,h,m,s,l,c)};else if(e&&t&&n&&r&&i)c=(o,a,s,l)=>{const c=e(o,a,s,l),u=t(o,a,s,l),d=n(o,a,s,l),p=r(o,a,s,l);return i(c,u,d,p,a,s,l)};else if(e&&t&&n&&r)c=(i,o,a,s)=>{const l=e(i,o,a,s),c=t(i,o,a,s),u=n(i,o,a,s);return r(l,c,u,o,a,s)};else if(e&&t&&n)c=(r,i,o,a)=>{const s=e(r,i,o,a),l=t(r,i,o,a);return n(s,l,i,o,a)};else if(e&&t)c=(n,r,i,o)=>{const a=e(n,r,i,o);return t(a,r,i,o)};else{if(!e)throw new Error("Missing arguments");c=e}return c},_F=(...e)=>{const t=new WeakMap;let n=1;const r=e[e.length-1],i=e.length-1||1,o=Math.max(r.length-i,0);if(o>3)throw new Error("Unsupported number of arguments");return(i,a,s,l)=>{let c=i.__cacheKey__;c||(c={id:n},i.__cacheKey__=c,n+=1);let u=t.get(c);if(!u){const n=1===e.length?[e=>e,r]:e;let i=e;const a=[void 0,void 0,void 0];switch(o){case 0:break;case 1:i=[...n.slice(0,-1),()=>a[0],r];break;case 2:i=[...n.slice(0,-1),()=>a[0],()=>a[1],r];break;case 3:i=[...n.slice(0,-1),()=>a[0],()=>a[1],()=>a[2],r];break;default:throw new Error("Unsupported number of arguments")}u=zF(...i),u.selectorArgs=a,t.set(c,u)}switch(o){case 3:u.selectorArgs[2]=l;case 2:u.selectorArgs[1]=s;case 1:u.selectorArgs[0]=a}switch(o){case 0:return u(i);case 1:return u(i,a);case 2:return u(i,a,s);case 3:return u(i,a,s,l);default:throw new Error("unreachable")}}},FF={currentReorder:NF(e=>e.currentReorder),draggedItemProperties:_F(e=>e.currentReorder,S$.itemMetaLookup,(e,t,n)=>{if(!e||e.targetItemId!==n||null==e.action)return null;const r=null==e.newPosition?.parentId?0:t[n].depth+1;return{newPosition:e.newPosition,action:e.action,targetDepth:r}}),isDragging:NF(e=>!!e.currentReorder?.draggedItemId),canItemBeReordered:NF(e=>e.isItemReorderable,R$.isAnyItemBeingEdited,(e,t,n)=>!t&&e(n))},HF=(e,t,n)=>{const r=S$.itemMeta(e.state,t);return r.parentId===n||null!=r.parentId&&HF(e,r.parentId,n)},BF=parseInt(e.version,10)>=19?function(t,n,r,i,o){const a=e.useCallback(()=>n(t.getSnapshot(),r,i,o),[t,n,r,i,o]);return(0,N.useSyncExternalStore)(t.subscribe,a,a)}:function(e,t,n,r,i){return(0,_.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))};function VF(e,t,n,r,i){return BF(e,t,n,r,i)}const UF=({props:t})=>{const{store:n}=FD(),{itemId:r}=t,i=e.useRef(null),o=VF(n,FF.draggedItemProperties,r),a=VF(n,FF.canItemBeReordered,r),s=VF(n,FF.isDragging,r);return{propsEnhancers:{root:({rootRefObject:e,contentRefObject:t,externalEventHandlers:i})=>({draggable:!!a||void 0,onDragStart:o=>{if(i.onDragStart?.(o),!a||o.defaultMuiPrevented||o.defaultPrevented)return;if(V$(o.target,e.current))return;o.dataTransfer.effectAllowed="move",o.dataTransfer.setDragImage(t.current,0,0);const{types:s}=o.dataTransfer;!navigator.userAgent.toLowerCase().includes("android")||s.includes("text/plain")||s.includes("text/uri-list")||o.dataTransfer.setData("text/plain","android-fallback"),o.dataTransfer.setData("application/mui-x",""),n.itemsReordering.startDraggingItem(r)},onDragOver:e=>{i.onDragOver?.(e),e.defaultMuiPrevented||e.preventDefault()},onDragEnd:e=>{i.onDragEnd?.(e),e.defaultMuiPrevented||("none"!==e.dataTransfer.dropEffect?n.itemsReordering.completeDraggingItem(r):n.itemsReordering.cancelDraggingItem())}}),content:({externalEventHandlers:e,contentRefObject:t})=>s?{onDragEnter:t=>{e.onDragEnter?.(t),t.defaultMuiPrevented||(i.current=n.itemsReordering.getDroppingTargetValidActions(r))},onDragOver:o=>{if(e.onDragOver?.(o),o.defaultMuiPrevented||null==i.current||!t.current)return;const a=t.current.getBoundingClientRect(),s=o.clientY-a.top,l=o.clientX-a.left;n.itemsReordering.setDragTargetItem({itemId:r,validActions:i.current,targetHeight:a.height,cursorY:s,cursorX:l,contentElement:t.current})}}:{},dragAndDropOverlay:()=>o?{action:o.action,style:{"--TreeView-targetDepth":o.targetDepth}}:{}}}};class YF{constructor(e){this.store=e,e.itemPluginManager.register(UF,null)}getDroppingTargetValidActions=e=>{const t=FF.currentReorder(this.store.state);if(!t)throw new Error("There is no ongoing reordering.");if(e===t.draggedItemId)return{};const n=this.store.parameters.canMoveItemToNewPosition,r=S$.itemMeta(this.store.state,e),i=S$.itemIndex(this.store.state,r.id),o=S$.itemMeta(this.store.state,t.draggedItemId),a=S$.itemIndex(this.store.state,o.id),s=i===S$.itemOrderedChildrenIds(this.store.state,r.parentId).length-1,l={parentId:o.parentId,index:a},c={"make-child":{parentId:r.id,index:0},"reorder-above":{parentId:r.parentId,index:r.parentId===o.parentId&&i>a?i-1:i},"reorder-below":!r.expandable||s?{parentId:r.parentId,index:r.parentId===o.parentId&&i>a?i:i+1}:null,"move-to-parent":null==r.parentId?null:{parentId:r.parentId,index:S$.itemOrderedChildrenIds(this.store.state,r.parentId).length}},u={};return Object.keys(c).forEach(e=>{const r=c[e];null!=r&&(e=>{let r;return r=(e.parentId!==l.parentId||e.index!==l.index)&&(!n||n({itemId:t.draggedItemId,oldPosition:l,newPosition:e})),r})(r)&&(u[e]=r)}),u};startDraggingItem=e=>{R$.isItemBeingEdited(this.store.state,e)||this.store.set("currentReorder",{targetItemId:e,draggedItemId:e,action:null,newPosition:null})};cancelDraggingItem=()=>{this.store.set("currentReorder",null)};completeDraggingItem=e=>{const t=FF.currentReorder(this.store.state);if(null==t||t.draggedItemId!==e)return;if(t.draggedItemId===t.targetItemId||null==t.action||null==t.newPosition)return void this.cancelDraggingItem();const n=S$.itemMeta(this.store.state,t.draggedItemId),r={parentId:n.parentId,index:S$.itemIndex(this.store.state,n.id)},i=t.newPosition;this.store.update(l({currentReorder:null},(({itemToMoveId:e,oldPosition:t,newPosition:n,prevState:r})=>{const i=r.itemMetaLookup[e],o=t.parentId??b$,a=n.parentId??b$,s=l({},r.itemOrderedChildrenIdsLookup);if(o===a){const r=[...s[o]];r.splice(t.index,1),r.splice(n.index,0,e),s[i.parentId??b$]=r}else{const r=[...s[o]];r.splice(t.index,1),s[o]=r;const i=[...s[a]??[]];i.splice(n.index,0,e),s[a]=i}const c=l({},r.itemChildrenIndexesLookup);c[o]=x$(s[o]),a!==o&&(c[a]=x$(s[a]));const u=l({},r.itemMetaLookup);function d(e){const t=s[e].length>0;u[e].expandable!==t&&(u[e]=l({},u[e],{expandable:t}))}o!==b$&&o!==a&&d(o),a!==b$&&a!==o&&d(a);const p=null==n.parentId?0:u[a].depth+1;u[e]=l({},i,{parentId:n.parentId,depth:p});const h=(e,t)=>{u[e]=l({},u[e],{depth:t}),s[e]?.forEach(e=>h(e,t+1))};return s[e]?.forEach(e=>h(e,p+1)),{itemOrderedChildrenIdsLookup:s,itemChildrenIndexesLookup:c,itemMetaLookup:u}})({itemToMoveId:e,newPosition:i,oldPosition:r,prevState:this.store.state})));const o=this.store.parameters.onItemPositionChange;o?.({itemId:e,newPosition:i,oldPosition:r})};setDragTargetItem=({itemId:e,validActions:t,targetHeight:n,cursorY:r,cursorX:i,contentElement:o})=>{const a=this.store.state.currentReorder;if(null==a||HF(this.store,e,a.draggedItemId))return;const s=(({itemChildrenIndentation:e,validActions:t,targetHeight:n,targetDepth:r,cursorX:i,cursorY:o,contentElement:a})=>{let s;const l=((e,t)=>{if("number"==typeof e)return e;const n=/^(\d.+)(px)$/.exec(e);if(n)return parseFloat(n[1]);const r=document.createElement("div");r.style.width=e,r.style.position="absolute",t.appendChild(r);const i=r.offsetWidth;return t.removeChild(r),i})(e,a);return s=t["move-to-parent"]&&i3/4*n?"reorder-below":"make-child":t["reorder-above"]&&o<.5*n?"reorder-above":t["reorder-below"]&&o>=.5*n?"reorder-below":null,s})({itemChildrenIndentation:this.store.state.itemChildrenIndentation,validActions:t,targetHeight:n,targetDepth:this.store.state.itemMetaLookup[e].depth,cursorY:r,cursorX:i,contentElement:o}),c=null==s?null:t[s];a.targetItemId===e&&a.action===s&&a.newPosition?.parentId===c?.parentId&&a.newPosition?.index===c?.index||this.store.set("currentReorder",l({},a,{targetItemId:e,newPosition:c,action:s}))}}const WF=()=>!0,GF=()=>!1,KF=e=>({lazyLoadedItems:e.dataSource?DF:null,currentReorder:null,isItemReorderable:e.itemsReordering?e.isItemReorderable??WF:GF}),qF={getInitialState:(e,t)=>l({},qz.rawMapper.getInitialState(e,t),KF(t)),updateStateFromParameters:(e,t,n)=>l({},qz.rawMapper.updateStateFromParameters(e,t,n),KF(t)),shouldIgnoreItemsStateUpdate:e=>!!e.dataSource};class XF extends qz{itemsReordering=(()=>new YF(this))();constructor(e){super(e,"RichTreeViewPro",qF),this.lazyLoading=new $F(this)}buildPublicAPI(){return l({},super.buildPublicAPI(),this.lazyLoading.buildPublicAPI())}}const ZF=Lh,JF=bm("ul",{name:"MuiRichTreeViewPro",slot:"Root"})({padding:0,margin:0,listStyle:"none",outline:0,position:"relative"}),QF="MTc3MTU0NTYwMDAwMA==",eH=e.forwardRef(function(t,n){const r=ZF({props:t,name:"MuiRichTreeViewPro"});bF("x-tree-view-pro",QF);const{slots:i,slotProps:o,apiRef:a,parameters:s,forwardedProps:c}=function(t){const{apiRef:n,slots:r,slotProps:i,disabledItemsFocusable:o,items:a,isItemDisabled:s,isItemSelectionDisabled:l,getItemLabel:c,getItemChildren:u,getItemId:d,onItemClick:p,itemChildrenIndentation:h,id:m,expandedItems:f,defaultExpandedItems:g,onExpandedItemsChange:y,onItemExpansionToggle:v,expansionTrigger:b,disableSelection:x,selectedItems:I,defaultSelectedItems:w,multiSelect:k,checkboxSelection:S,selectionPropagation:M,onSelectedItemsChange:C,onItemSelectionToggle:P,onItemFocus:E,onItemLabelChange:T,isItemEditable:A,dataSource:O,dataSourceCache:j,itemsReordering:L,isItemReorderable:R,canMoveItemToNewPosition:D,onItemPositionChange:$}=t,z=tt(t,OF);return{apiRef:n,slots:r,slotProps:i,parameters:e.useMemo(()=>({disabledItemsFocusable:o,items:a,isItemDisabled:s,isItemSelectionDisabled:l,getItemLabel:c,getItemChildren:u,getItemId:d,onItemClick:p,itemChildrenIndentation:h,id:m,expandedItems:f,defaultExpandedItems:g,onExpandedItemsChange:y,onItemExpansionToggle:v,expansionTrigger:b,disableSelection:x,selectedItems:I,defaultSelectedItems:w,multiSelect:k,checkboxSelection:S,selectionPropagation:M,onSelectedItemsChange:C,onItemSelectionToggle:P,onItemFocus:E,onItemLabelChange:T,isItemEditable:A,dataSource:O,dataSourceCache:j,itemsReordering:L,isItemReorderable:R,canMoveItemToNewPosition:D,onItemPositionChange:$}),[o,a,s,l,c,u,d,p,h,m,f,g,y,v,b,x,I,w,k,S,M,C,P,E,T,A,O,j,L,R,D,$]),forwardedProps:z}}(r),u=Mz(XF,s),d=e.useRef(null),p=Iz(u,c,sD(n,d)),h=(t=>{const{classes:n}=t;return e.useMemo(()=>function(e,t,n){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let e=0;e{const n=t.map(t=>{if(null==t)return null;if("function"==typeof t){const n=t,r=n(e);return"function"==typeof r?r:()=>{n(null)}}return t.current=e,()=>{t.current=null}});return()=>{n.forEach(e=>e?.())}},t);return e.useMemo(()=>t.every(e=>null==e)?null:e=>{n.current&&(n.current(),n.current=void 0),null!=e&&(n.current=r(e))},t)}(c,s?.ref,t.additionalProps?.ref);return function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(n,{...l,ref:u},i)}({elementType:m,externalSlotProps:o?.root,className:h.root,getSlotProps:p,ownerState:r});return(0,O.jsx)(VD,{store:u,classes:h,slots:i,slotProps:o,apiRef:a,rootRef:d,children:(0,O.jsx)($$.Provider,{value:S$.itemDepth,children:(0,O.jsxs)(m,l({},f,{children:[(0,O.jsx)(xz,{slots:i,slotProps:o}),(0,O.jsx)(kF,{packageName:"x-tree-view-pro",releaseInfo:QF})]}))})})}),tH={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function nH(e,t,n,r,i){return 1===n?Math.min(e+t,i):Math.max(e-t,r)}function rH(e,t){return e-t}function iH(e,t){const{index:n}=e.reduce((e,n,r)=>{const i=Math.abs(t-n);return null===e||ie===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}(e,t)}const uH={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},dH=e=>e;let pH;function hH(){return void 0===pH&&(pH="undefined"==typeof CSS||"function"!=typeof CSS.supports||CSS.supports("touch-action","none")),pH}function mH(t){const{"aria-labelledby":n,defaultValue:r,disabled:i=!1,disableSwap:o=!1,isRtl:a=!1,marks:s=!1,max:l=100,min:c=0,name:u,onChange:d,onChangeCommitted:p,orientation:h="horizontal",rootRef:m,scale:f=dH,step:g=1,shiftStep:y=10,tabIndex:v,value:b}=t,x=e.useRef(void 0),[I,w]=e.useState(-1),[k,S]=e.useState(-1),[M,C]=e.useState(!1),P=e.useRef(0),E=e.useRef(null),[T,A]=$g({controlled:b,default:r??c,name:"Slider"}),O=d&&((e,t,n)=>{const r=e.nativeEvent||e,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:t,name:u}}),E.current=t,d(i,t,n)}),j=Array.isArray(T);let L=j?T.slice().sort(rH):[T];L=L.map(e=>null==e?c:Jd(e,c,l));const R=!0===s&&null!==g?[...Array(Math.floor((l-c)/g)+1)].map((e,t)=>({value:c+g*t})):s||[],D=R.map(e=>e.value),[$,z]=e.useState(-1),N=e.useRef(null),_=Bm(m,N),F=e=>t=>{const n=Number(t.currentTarget.getAttribute("data-index"));Zh(t.target)&&z(n),S(n),e?.onFocus?.(t)},H=e=>t=>{Zh(t.target)||z(-1),S(-1),e?.onBlur?.(t)},B=(e,t)=>{const n=Number(e.currentTarget.getAttribute("data-index")),r=L[n],i=D.indexOf(r);let a=t;if(R&&null==g){const e=D[D.length-1];a=a>=e?e:a<=D[0]?D[0]:at=>{if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(t.key)){t.preventDefault();const e=Number(t.currentTarget.getAttribute("data-index")),n=L[e];let r=null;if(null!=g){const e=t.shiftKey?y:g;switch(t.key){case"ArrowUp":r=nH(n,e,1,c,l);break;case"ArrowRight":r=nH(n,e,a?-1:1,c,l);break;case"ArrowDown":r=nH(n,e,-1,c,l);break;case"ArrowLeft":r=nH(n,e,a?1:-1,c,l);break;case"PageUp":r=nH(n,y,1,c,l);break;case"PageDown":r=nH(n,y,-1,c,l);break;case"Home":r=c;break;case"End":r=l}}else if(R){const e=D[D.length-1],i=D.indexOf(n),o=[a?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];[a?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"].includes(t.key)?r=0===i?D[0]:D[i-1]:o.includes(t.key)&&(r=i===D.length-1?e:D[i+1])}null!=r&&B(t,r)}e?.onKeyDown?.(t)};qm(()=>{i&&N.current.contains(document.activeElement)&&document.activeElement?.blur()},[i]),i&&-1!==I&&w(-1),i&&-1!==$&&z(-1);const U=e.useRef(void 0);let Y=h;a&&"horizontal"===h&&(Y+="-reverse");const W=({finger:e,move:t=!1})=>{const{current:n}=N,{width:r,height:i,bottom:a,left:s}=n.getBoundingClientRect();let u,d;if(u=Y.startsWith("vertical")?(a-e.y)/i:(e.x-s)/r,Y.includes("-reverse")&&(u=1-u),d=function(e,t,n){return(n-t)*e+t}(u,c,l),g)d=function(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(function(e){if(Math.abs(e)<1){const t=e.toExponential().split("e-"),n=t[0].split(".")[1];return(n?n.length:0)+parseInt(t[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}(t)))}(d,g,c);else{const e=iH(D,d);d=D[e]}d=Jd(d,c,l);let p=0;if(j){p=t?U.current:iH(L,d),o&&(d=Jd(d,L[p-1]||-1/0,L[p+1]||1/0));const e=d;d=sH({values:L,newValue:d,index:p}),o&&t||(p=d.indexOf(e),U.current=p)}return{newValue:d,activeIndex:p}},G=Ag(e=>{const t=oH(e,x);if(!t)return;if(P.current+=1,"mousemove"===e.type&&0===e.buttons)return void K(e);const{newValue:n,activeIndex:r}=W({finger:t,move:!0});lH({sliderRef:N,activeIndex:r,setActive:w}),A(n),!M&&P.current>2&&C(!0),O&&!cH(n,T)&&O(e,n,r)}),K=Ag(e=>{const t=oH(e,x);if(C(!1),!t)return;const{newValue:n}=W({finger:t,move:!0});w(-1),"touchend"===e.type&&S(-1),p&&p(e,E.current??n),x.current=void 0,X()}),q=Ag(e=>{if(i)return;hH()||e.preventDefault();const t=e.changedTouches[0];null!=t&&(x.current=t.identifier);const n=oH(e,x);if(!1!==n){const{newValue:t,activeIndex:r}=W({finger:n});lH({sliderRef:N,activeIndex:r,setActive:w}),A(t),O&&!cH(t,T)&&O(e,t,r)}P.current=0;const r=Xm(N.current);r.addEventListener("touchmove",G,{passive:!0}),r.addEventListener("touchend",K,{passive:!0})}),X=e.useCallback(()=>{const e=Xm(N.current);e.removeEventListener("mousemove",G),e.removeEventListener("mouseup",K),e.removeEventListener("touchmove",G),e.removeEventListener("touchend",K)},[K,G]);e.useEffect(()=>{const{current:e}=N;return e.addEventListener("touchstart",q,{passive:hH()}),()=>{e.removeEventListener("touchstart",q),X()}},[X,q]),e.useEffect(()=>{i&&X()},[i,X]);const Z=aH(j?L[0]:c,c,l),J=aH(L[L.length-1],c,l)-Z,Q=e=>t=>{e.onMouseLeave?.(t),S(-1)};let ee;return"vertical"===h&&(ee=a?"vertical-rl":"vertical-lr"),{active:I,axis:Y,axisProps:uH,dragging:M,focusedThumbIndex:$,getHiddenInputProps:(e={})=>{const r=dg(e),o={onChange:(s=r||{},e=>{s.onChange?.(e),B(e,e.target.valueAsNumber)}),onFocus:F(r||{}),onBlur:H(r||{}),onKeyDown:V(r||{})};var s;const d={...r,...o};return{tabIndex:v,"aria-labelledby":n,"aria-orientation":h,"aria-valuemax":f(l),"aria-valuemin":f(c),name:u,type:"range",min:t.min,max:t.max,step:null===t.step&&t.marks?"any":t.step??void 0,disabled:i,...e,...d,style:{...tH,direction:a?"rtl":"ltr",width:"100%",height:"100%",writingMode:ee}}},getRootProps:(e={})=>{const t=dg(e),n={onMouseDown:(r=t||{},e=>{if(r.onMouseDown?.(e),i)return;if(e.defaultPrevented)return;if(0!==e.button)return;e.preventDefault();const t=oH(e,x);if(!1!==t){const{newValue:n,activeIndex:r}=W({finger:t});lH({sliderRef:N,activeIndex:r,setActive:w}),A(n),O&&!cH(n,T)&&O(e,n,r)}P.current=0;const n=Xm(N.current);n.addEventListener("mousemove",G,{passive:!0}),n.addEventListener("mouseup",K)})};var r;const o={...t,...n};return{...e,ref:_,...o}},getThumbProps:(e={})=>{const t=dg(e),n={onMouseOver:(r=t||{},e=>{r.onMouseOver?.(e);const t=Number(e.currentTarget.getAttribute("data-index"));S(t)}),onMouseLeave:Q(t||{})};var r;return{...e,...t,...n}},marks:R,open:k,range:j,rootRef:_,trackLeap:J,trackOffset:Z,values:L,getThumbStyle:e=>({pointerEvents:-1!==I&&I!==e?"none":void 0})}}const fH=function(e){return"string"==typeof e};function gH(e){return Ig("MuiSlider",e)}const yH=wg("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]);function vH(e){return e}const bH=bm("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Cm(n.color)}`],"medium"!==n.size&&t[`size${Cm(n.size)}`],n.marked&&t.marked,"vertical"===n.orientation&&t.vertical,"inverted"===n.track&&t.trackInverted,!1===n.track&&t.trackFalse]}})(wm(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${yH.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${yH.dragging}`]:{[`& .${yH.thumb}, & .${yH.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),xH=bm("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),IH=bm("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(wm(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:cp(e.palette[t].main,.62),borderColor:cp(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:sp(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:sp(e.palette[t].main,.5)})}}}))]}))),wH=bm("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${Cm(n.color)}`],"medium"!==n.size&&t[`thumbSize${Cm(n.size)}`]]}})(wm(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${yH.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(vy()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${yH.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${op(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${yH.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${op(e.palette[t].main,.16)}`}}}}))]}))),kH=bm(function(t){const{children:n,className:r,value:i}=t,o=(e=>{const{open:t}=e;return{offset:Hh(t&&yH.valueLabelOpen),circle:yH.valueLabelCircle,label:yH.valueLabelLabel}})(t);return n?e.cloneElement(n,{className:Hh(n.props.className)},(0,O.jsxs)(e.Fragment,{children:[n.props.children,(0,O.jsx)("span",{className:Hh(o.offset,r),"aria-hidden":!0,children:(0,O.jsx)("span",{className:o.circle,children:(0,O.jsx)("span",{className:o.label,children:i})})})]})):null},{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(wm(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${yH.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${yH.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]}))),SH=bm("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>gm(e)&&"markActive"!==e,overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(wm(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),MH=bm("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>gm(e)&&"markLabelActive"!==e,overridesResolver:(e,t)=>t.markLabel})(wm(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),CH=({children:e})=>e,PH=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiSlider"}),i=qh(),{"aria-label":o,"aria-valuetext":a,"aria-labelledby":s,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:p,className:h,disableSwap:m=!1,disabled:f=!1,getAriaLabel:g,getAriaValueText:y,marks:v=!1,max:b=100,min:x=0,name:I,onChange:w,onChangeCommitted:k,orientation:S="horizontal",shiftStep:M=10,size:C="medium",step:P=1,scale:E=vH,slotProps:T,slots:A,tabIndex:j,track:L="normal",value:R,valueLabelDisplay:D="off",valueLabelFormat:$=vH,...z}=r,N={...r,isRtl:i,max:b,min:x,classes:p,disabled:f,disableSwap:m,orientation:S,marks:v,color:d,size:C,step:P,shiftStep:M,scale:E,track:L,valueLabelDisplay:D,valueLabelFormat:$},{axisProps:_,getRootProps:F,getHiddenInputProps:H,getThumbProps:B,open:V,active:U,axis:Y,focusedThumbIndex:W,range:G,dragging:K,marks:q,values:X,trackOffset:Z,trackLeap:J,getThumbStyle:Q}=mH({...N,rootRef:n});N.marked=q.length>0&&q.some(e=>e.label),N.dragging=K,N.focusedThumbIndex=W;const ee=(e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:o,classes:a,color:s,size:l}=e;return Gh({root:["root",t&&"disabled",n&&"dragging",r&&"marked","vertical"===i&&"vertical","inverted"===o&&"trackInverted",!1===o&&"trackFalse",s&&`color${Cm(s)}`,l&&`size${Cm(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${Cm(l)}`,s&&`thumbColor${Cm(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]},gH,a)})(N),te=A?.root??c.Root??bH,ne=A?.rail??c.Rail??xH,re=A?.track??c.Track??IH,ie=A?.thumb??c.Thumb??wH,oe=A?.valueLabel??c.ValueLabel??kH,ae=A?.mark??c.Mark??SH,se=A?.markLabel??c.MarkLabel??MH,le=A?.input??c.Input??"input",ce=T?.root??u.root,ue=T?.rail??u.rail,de=T?.track??u.track,pe=T?.thumb??u.thumb,he=T?.valueLabel??u.valueLabel,me=T?.mark??u.mark,fe=T?.markLabel??u.markLabel,ge=T?.input??u.input,ye=fg({elementType:te,getSlotProps:F,externalSlotProps:ce,externalForwardedProps:z,additionalProps:{...(Me=te,(!Me||!fH(Me))&&{as:l})},ownerState:{...N,...ce?.ownerState},className:[ee.root,h]}),ve=fg({elementType:ne,externalSlotProps:ue,ownerState:N,className:ee.rail}),be=fg({elementType:re,externalSlotProps:de,additionalProps:{style:{..._[Y].offset(Z),..._[Y].leap(J)}},ownerState:{...N,...de?.ownerState},className:ee.track}),xe=fg({elementType:ie,getSlotProps:B,externalSlotProps:pe,ownerState:{...N,...pe?.ownerState},className:ee.thumb}),Ie=fg({elementType:oe,externalSlotProps:he,ownerState:{...N,...he?.ownerState},className:ee.valueLabel}),we=fg({elementType:ae,externalSlotProps:me,ownerState:N,className:ee.mark}),ke=fg({elementType:se,externalSlotProps:fe,ownerState:N,className:ee.markLabel}),Se=fg({elementType:le,getSlotProps:H,externalSlotProps:ge,ownerState:N});var Me;return(0,O.jsxs)(te,{...ye,children:[(0,O.jsx)(ne,{...ve}),(0,O.jsx)(re,{...be}),q.filter(e=>e.value>=x&&e.value<=b).map((t,n)=>{const r=aH(t.value,x,b),i=_[Y].offset(r);let o;return o=!1===L?X.includes(t.value):"normal"===L&&(G?t.value>=X[0]&&t.value<=X[X.length-1]:t.value<=X[0])||"inverted"===L&&(G?t.value<=X[0]||t.value>=X[X.length-1]:t.value>=X[0]),(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(ae,{"data-index":n,...we,...!fH(ae)&&{markActive:o},style:{...i,...we.style},className:Hh(we.className,o&&ee.markActive)}),null!=t.label?(0,O.jsx)(se,{"aria-hidden":!0,"data-index":n,...ke,...!fH(se)&&{markLabelActive:o},style:{...i,...ke.style},className:Hh(ee.markLabel,ke.className,o&&ee.markLabelActive),children:t.label}):null]},n)}),X.map((e,t)=>{const n=aH(e,x,b),r=_[Y].offset(n),i="off"===D?CH:oe;return(0,O.jsx)(i,{...!fH(i)&&{valueLabelFormat:$,valueLabelDisplay:D,value:"function"==typeof $?$(E(e),t):$,index:t,open:V===t||U===t||"on"===D,disabled:f},...Ie,children:(0,O.jsx)(ie,{"data-index":t,...xe,className:Hh(ee.thumb,xe.className,U===t&&ee.active,W===t&&ee.focusVisible),style:{...r,...Q(t),...xe.style},children:(0,O.jsx)(le,{"data-index":t,"aria-label":g?g(t):o,"aria-valuenow":E(e),"aria-labelledby":s,"aria-valuetext":y?y(E(e),t):a,value:X[t],...Se})})},t)})]})}),EH=PH,TH={entering:{opacity:1},entered:{opacity:1}},AH=e.forwardRef(function(t,n){const r=xm(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:p,onExit:h,onExited:m,onExiting:f,style:g,timeout:y=i,TransitionComponent:v=_m,...b}=t,x=e.useRef(null),I=Vm(x,Jh(s),n),w=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},k=w(p),S=w((e,t)=>{Fm(e);const n=Hm({style:g,timeout:y,easing:l},{mode:"enter"});e.style.webkitTransition=r.transitions.create("opacity",n),e.style.transition=r.transitions.create("opacity",n),u&&u(e,t)}),M=w(d),C=w(f),P=w(e=>{const t=Hm({style:g,timeout:y,easing:l},{mode:"exit"});e.style.webkitTransition=r.transitions.create("opacity",t),e.style.transition=r.transitions.create("opacity",t),h&&h(e)}),E=w(m);return(0,O.jsx)(v,{appear:a,in:c,nodeRef:x,onEnter:S,onEntered:M,onEntering:k,onExit:P,onExited:E,onExiting:C,addEndListener:e=>{o&&o(x.current,e)},timeout:y,...b,children:(t,{ownerState:n,...r})=>e.cloneElement(s,{style:{opacity:0,visibility:"exited"!==t||c?void 0:"hidden",...TH[t],...g,...s.props.style},ref:I,...r})})}),OH=AH;function jH(e){return Ig("MuiBackdrop",e)}wg("MuiBackdrop",["root","invisible"]);const LH=bm("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),RH=e.forwardRef(function(e,t){const n=Mm({props:e,name:"MuiBackdrop"}),{children:r,className:i,component:o="div",invisible:a=!1,open:s,components:l={},componentsProps:c={},slotProps:u={},slots:d={},TransitionComponent:p,transitionDuration:h,...m}=n,f={...n,component:o,invisible:a},g=(e=>{const{classes:t,invisible:n}=e;return Gh({root:["root",n&&"invisible"]},jH,t)})(f),y={slots:{transition:p,root:l.Root,...d},slotProps:{...c,...u}},[v,b]=Ng("root",{elementType:LH,externalForwardedProps:y,className:Hh(g.root,i),ownerState:f}),[x,I]=Ng("transition",{elementType:OH,externalForwardedProps:y,ownerState:f});return(0,O.jsx)(x,{in:s,timeout:h,...m,...I,children:(0,O.jsx)(v,{"aria-hidden":!0,...b,classes:g,ref:t,children:r})})}),DH=RH;function $H(...e){return e.reduce((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}function zH(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function NH(e){return parseInt(oy(e).getComputedStyle(e).paddingRight,10)||0}function _H(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,e=>{const t=!o.includes(e),n=!function(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&zH(e,i)})}function FH(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}const HH=()=>{},BH=new class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&zH(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);_H(t,e.mount,e.modalRef,r,!0);const i=FH(this.containers,e=>e.container===t);return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=FH(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||(r.restore=function(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Xm(e);return t.body===e?oy(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=ny(oy(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${NH(r)+e}px`;const t=Xm(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${NH(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=Xm(r).body;else{const t=r.parentElement,n=oy(r);e="HTML"===t?.nodeName&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=FH(this.containers,t=>t.modals.includes(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&zH(e.modalRef,t),_H(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=i.modals[i.modals.length-1];e.modalRef&&zH(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function VH(e){return Ig("MuiModal",e)}wg("MuiModal",["root","hidden","backdrop"]);const UH=bm("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(wm(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]}))),YH=bm(DH,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),WH=e.forwardRef(function(t,n){const r=Mm({name:"MuiModal",props:t}),{BackdropComponent:i=YH,BackdropProps:o,classes:a,className:s,closeAfterTransition:l=!1,children:c,container:u,component:d,components:p={},componentsProps:h={},disableAutoFocus:m=!1,disableEnforceFocus:f=!1,disableEscapeKeyDown:g=!1,disablePortal:y=!1,disableRestoreFocus:v=!1,disableScrollLock:b=!1,hideBackdrop:x=!1,keepMounted:I=!1,onBackdropClick:w,onClose:k,onTransitionEnter:S,onTransitionExited:M,open:C,slotProps:P={},slots:E={},theme:T,...A}=r,j={...r,closeAfterTransition:l,disableAutoFocus:m,disableEnforceFocus:f,disableEscapeKeyDown:g,disablePortal:y,disableRestoreFocus:v,disableScrollLock:b,hideBackdrop:x,keepMounted:I},{getRootProps:L,getBackdropProps:R,getTransitionProps:D,portalRef:$,isTopModal:z,exited:N,hasTransition:_}=function(t){const{container:n,disableEscapeKeyDown:r=!1,disableScrollLock:i=!1,closeAfterTransition:o=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:c,open:u,rootRef:d}=t,p=e.useRef({}),h=e.useRef(null),m=e.useRef(null),f=Bm(m,d),[g,y]=e.useState(!u),v=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let b=!0;"false"!==t["aria-hidden"]&&!1!==t["aria-hidden"]||(b=!1);const x=()=>(p.current.modalRef=m.current,p.current.mount=h.current,p.current),I=()=>{BH.mount(x(),{disableScrollLock:i}),m.current&&(m.current.scrollTop=0)},w=Ag(()=>{const e=function(e){return"function"==typeof e?e():e}(n)||Xm(h.current).body;BH.add(x(),e),m.current&&I()}),k=()=>BH.isTopModal(x()),S=Ag(e=>{h.current=e,e&&(u&&k()?I():m.current&&zH(m.current,b))}),M=e.useCallback(()=>{BH.remove(x(),b)},[b]);e.useEffect(()=>()=>{M()},[M]),e.useEffect(()=>{u?w():v&&o||M()},[u,M,v,o,w]);const C=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&k()&&(r||(t.stopPropagation(),c&&c(t,"escapeKeyDown")))},P=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&c&&c(t,"backdropClick")};return{getRootProps:(e={})=>{const n=dg(t);delete n.onTransitionEnter,delete n.onTransitionExited;const r={...n,...e};return{role:"presentation",...r,onKeyDown:C(r),ref:f}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:P(t),open:u}},getTransitionProps:()=>({onEnter:$H(()=>{y(!1),a&&a()},l?.props.onEnter??HH),onExited:$H(()=>{y(!0),s&&s(),o&&M()},l?.props.onExited??HH)}),rootRef:f,portalRef:S,isTopModal:k,exited:g,hasTransition:v}}({...j,rootRef:n}),F={...j,exited:N},H=(e=>{const{open:t,exited:n,classes:r}=e;return Gh({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},VH,r)})(F),B={};if(void 0===c.props.tabIndex&&(B.tabIndex="-1"),_){const{onEnter:e,onExited:t}=D();B.onEnter=e,B.onExited=t}const V={slots:{root:p.Root,backdrop:p.Backdrop,...E},slotProps:{...h,...P}},[U,Y]=Ng("root",{ref:n,elementType:UH,externalForwardedProps:{...V,...A,component:d},getSlotProps:L,ownerState:F,className:Hh(s,H?.root,!F.open&&F.exited&&H?.hidden)}),[W,G]=Ng("backdrop",{ref:o?.ref,elementType:i,externalForwardedProps:V,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:e=>R({...e,onClick:t=>{w&&w(t),e?.onClick&&e.onClick(t)}}),className:Hh(o?.className,H?.backdrop),ownerState:F});return I||C||_&&!N?(0,O.jsx)(yg,{ref:$,container:u,disablePortal:y,children:(0,O.jsxs)(U,{...Y,children:[!x&&i?(0,O.jsx)(W,{...G}):null,(0,O.jsx)(Yv,{disableEnforceFocus:f,disableAutoFocus:m,disableRestoreFocus:v,isEnabled:z,open:C,children:e.cloneElement(c,B)})]})}):null}),GH=WH;function KH(e){return Ig("MuiPopover",e)}function qH(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function XH(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function ZH(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function JH(e){return"function"==typeof e?e():e}wg("MuiPopover",["root","paper"]);const QH=bm(GH,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),eB=bm(Zv,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),tB=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiPopover"}),{action:i,anchorEl:o,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:c,className:u,container:d,elevation:p=8,marginThreshold:h=16,open:m,PaperProps:f={},slots:g={},slotProps:y={},transformOrigin:v={vertical:"top",horizontal:"left"},TransitionComponent:b,transitionDuration:x="auto",TransitionProps:I={},disableScrollLock:w=!1,...k}=r,S=e.useRef(),M={...r,anchorOrigin:a,anchorReference:l,elevation:p,marginThreshold:h,transformOrigin:v,TransitionComponent:b,transitionDuration:x,TransitionProps:I},C=(e=>{const{classes:t}=e;return Gh({root:["root"],paper:["paper"]},KH,t)})(M),P=e.useCallback(()=>{if("anchorPosition"===l)return s;const e=JH(o),t=(e&&1===e.nodeType?e:Xg(S.current).body).getBoundingClientRect();return{top:t.top+qH(t,a.vertical),left:t.left+XH(t,a.horizontal)}},[o,a.horizontal,a.vertical,s,l]),E=e.useCallback(e=>({vertical:qH(e,v.vertical),horizontal:XH(e,v.horizontal)}),[v.horizontal,v.vertical]),T=e.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=E(t);if("none"===l)return{top:null,left:null,transformOrigin:ZH(n)};const r=P();let i=r.top-n.vertical,a=r.left-n.horizontal;const s=i+t.height,c=a+t.width,u=ay(JH(o)),d=u.innerHeight-h,p=u.innerWidth-h;if(null!==h&&id){const e=s-d;i-=e,n.vertical+=e}if(null!==h&&ap){const e=c-p;a-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(a)}px`,transformOrigin:ZH(n)}},[o,l,P,E,h]),[A,j]=e.useState(m),L=e.useCallback(()=>{const e=S.current;if(!e)return;const t=T(e);null!==t.top&&e.style.setProperty("top",t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,j(!0)},[T]);e.useEffect(()=>(w&&window.addEventListener("scroll",L),()=>window.removeEventListener("scroll",L)),[o,w,L]),e.useEffect(()=>{m&&L()}),e.useImperativeHandle(i,()=>m?{updatePosition:()=>{L()}}:null,[m,L]),e.useEffect(()=>{if(!m)return;const e=function(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}(()=>{L()}),t=ay(JH(o));return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[o,m,L]);let R=x;const D={slots:{transition:b,...g},slotProps:{transition:I,paper:f,...y}},[$,z]=Ng("transition",{elementType:Km,externalForwardedProps:D,ownerState:M,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),L()},onExited:t=>{e.onExited?.(t),j(!1)}}),additionalProps:{appear:!0,in:m}});"auto"!==x||$.muiSupportAuto||(R=void 0);const N=d||(o?Xg(JH(o)).body:void 0),[_,{slots:F,slotProps:H,...B}]=Ng("root",{ref:n,elementType:QH,externalForwardedProps:{...D,...k},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:g.backdrop},slotProps:{backdrop:c$("function"==typeof y.backdrop?y.backdrop(M):y.backdrop,{invisible:!0})},container:N,open:m},ownerState:M,className:Hh(C.root,u)}),[V,U]=Ng("paper",{ref:S,className:C.paper,elementType:eB,externalForwardedProps:D,shouldForwardComponentProp:!0,additionalProps:{elevation:p,style:A?void 0:{opacity:0}},ownerState:M});return(0,O.jsx)(_,{...B,...!fH(_)&&{slots:F,slotProps:H,disableScrollLock:w},children:(0,O.jsx)($,{...z,timeout:R,children:(0,O.jsx)(V,{...U,children:c})})})}),nB=tB;function rB(e){return Ig("MuiMenu",e)}wg("MuiMenu",["root","paper","list"]);const iB={vertical:"top",horizontal:"right"},oB={vertical:"top",horizontal:"left"},aB=bm(nB,{shouldForwardProp:e=>ym(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),sB=bm(eB,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),lB=bm(dy,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),cB=e.forwardRef(function(t,n){const r=Mm({props:t,name:"MuiMenu"}),{autoFocus:i=!0,children:o,className:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:c,open:u,PaperProps:d={},PopoverClasses:p,transitionDuration:h="auto",TransitionProps:{onEntering:m,...f}={},variant:g="selectedMenu",slots:y={},slotProps:v={},...b}=r,x=qh(),I={...r,autoFocus:i,disableAutoFocusItem:s,MenuListProps:l,onEntering:m,PaperProps:d,transitionDuration:h,TransitionProps:f,variant:g},w=(e=>{const{classes:t}=e;return Gh({root:["root"],paper:["paper"],list:["list"]},rB,t)})(I),k=i&&!s&&u,S=e.useRef(null);let M=-1;e.Children.map(o,(t,n)=>{e.isValidElement(t)&&(t.props.disabled||("selectedMenu"===g&&t.props.selected||-1===M)&&(M=n))});const C={slots:y,slotProps:{list:l,transition:f,paper:d,...v}},P=fg({elementType:y.root,externalSlotProps:v.root,ownerState:I,className:[w.root,a]}),[E,T]=Ng("paper",{className:w.paper,elementType:sB,externalForwardedProps:C,shouldForwardComponentProp:!0,ownerState:I}),[A,j]=Ng("list",{className:Hh(w.list,l.className),elementType:lB,shouldForwardComponentProp:!0,externalForwardedProps:C,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{"Tab"===e.key&&(e.preventDefault(),c&&c(e,"tabKeyDown"))})(t),e.onKeyDown?.(t)}}),ownerState:I}),L="function"==typeof C.slotProps.transition?C.slotProps.transition(I):C.slotProps.transition;return(0,O.jsx)(aB,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?iB:oB,slots:{root:y.root,paper:E,backdrop:y.backdrop,...y.transition&&{transition:y.transition}},slotProps:{root:P,paper:T,backdrop:"function"==typeof v.backdrop?v.backdrop(I):v.backdrop,transition:{...L,onEntering:(...e)=>{((e,t)=>{S.current&&S.current.adjustStyleForScrollbar(e,{direction:x?"rtl":"ltr"}),m&&m(e,t)})(...e),L?.onEntering?.(...e)}}},open:u,ref:n,transitionDuration:h,ownerState:I,...b,classes:p,children:(0,O.jsx)(A,{actions:S,autoFocus:i&&(-1===M||s),autoFocusItem:k,variant:g,...j,children:o})})});function uB(e){return uB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uB(e)}var dB=["itemId","children","className","editable","ownerState"];function pB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hB(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function yB(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||vB(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vB(e,t){if(e){if("string"==typeof e)return bB(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bB(e,t):void 0}}function bB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0){var e=new Set(L);return function(t){return e.has(me(t))}}return!1},[j,L,me]),be=(0,e.useMemo)(function(){if(K&&0!==K.length){var e=new Set(K);return function(t){return e.has(t)}}},[K]),xe=(0,e.useRef)(te||{});xe.current=te||xe.current||{};var Ie=(0,e.useCallback)(function(e,t,n){var r=hB(hB({},xe.current),{},mB({},e,t));xe.current=r,de&&(de({sliderValues:r}),n&&de({sliderChange:{itemId:e,value:t,event_timestamp:Date.now()}}))},[de]),we=(0,e.useCallback)(function(e,t){de&&de({kebabAction:{itemId:e,action:t,event_timestamp:Date.now()}})},[de]),ke=(0,e.useMemo)(function(){return ee&&0!==ee.length?new Set(ee):null},[ee]),Se=(0,e.useMemo)(function(){return function(e){if(e&&"string"==typeof e){var t=e.match(SB);if(t){var n=t[1],r=null!=t[3]?t[3]:"6";return"var(--mantine-color-".concat(n,"-").concat(r,")")}return e}}(le)},[le]),Me=(0,e.useMemo)(function(){return{controlsItemSet:ke,sliderValues:te||{},sliderMin:re,sliderMax:oe,sliderStep:se,sliderColor:Se,onSliderChange:Ie,kebabMenuItems:ce||[],kebabMenuItemsById:ue||null,onKebabAction:we}},[ke,te,re,oe,se,Se,ce,ue,Ie,we]),Ce=(0,e.useMemo)(function(){var e={};return H&&(e.collapseIcon=A_(H)),B&&(e.expandIcon=A_(B)),V&&(e.endIcon=A_(V)),Q&&(e.item=AB),Object.keys(e).length>0?e:void 0},[H,B,V,Q]),Pe=(0,e.useCallback)(function(e,t){de&&de({selectedItems:t})},[de]),Ee=(0,e.useCallback)(function(e,t){if(de&&de({expandedItems:t}),X&&de&&t){var n,r=h||"id",i=y||"children",o=function(e,t){if(!e)return null;var n,a=gB(e);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(s[r]===t)return s;var l=o(s[i],t);if(l)return l}}catch(e){a.e(e)}finally{a.f()}return null},a=gB(t);try{for(a.s();!(n=a.n()).done;){var s=n.value,l=o(he,s);if(l&&!l[i]){de({lazyLoadRequest:{itemId:s,event_timestamp:Date.now()}});break}}}catch(e){a.e(e)}finally{a.f()}}},[de,X,he,h,y]),Te=(0,e.useCallback)(function(e,t){de&&de({clickedItem:{itemId:t,event_timestamp:Date.now()}})},[de]),Ae=(0,e.useCallback)(function(e,t){de&&de({focusedItem:{itemId:t,event_timestamp:Date.now()}})},[de]),Oe=(0,e.useCallback)(function(e,t){de&&de({editedItemLabel:{itemId:e,newLabel:t,event_timestamp:Date.now()}})},[de]),je=(0,e.useRef)(c||[]);(0,e.useEffect)(function(){je.current=c||[]},[c]);var Le=(0,e.useCallback)(function(e){var t=function(e,t,n,r){if(!e||!t||!t.itemId)return e;var i=n||"id",o=r||"children",a=JSON.parse(JSON.stringify(e)),s=null,l=function(e,n){if(null==n){var r=e.findIndex(function(e){return e[i]===t.itemId});return r>=0&&(s=e.splice(r,1)[0]),null!=s}var a,c=gB(e);try{for(c.s();!(a=c.n()).done;){var u=a.value;if(u[i]===n){var d=u[o]||[],p=d.findIndex(function(e){return e[i]===t.itemId});return p>=0&&(s=d.splice(p,1)[0]),null!=s}if(u[o]&&l(u[o],n))return!0}}catch(e){c.e(e)}finally{c.f()}return!1},c=function(e,t,n){if(null==t)return e.splice(n,0,s),!0;var r,a=gB(e);try{for(a.s();!(r=a.n()).done;){var l=r.value;if(l[i]===t)return l[o]||(l[o]=[]),l[o].splice(n,0,s),!0;if(l[o]&&c(l[o],t,n))return!0}}catch(e){a.e(e)}finally{a.f()}return!1};return l(a,t.oldPosition?t.oldPosition.parentId:null),s&&c(a,t.newPosition?t.newPosition.parentId:null,t.newPosition?t.newPosition.index:0),a}(je.current,e,h,y);je.current=t,de&&de({itemPositionChanged:{itemId:e.itemId,oldPosition:e.oldPosition,newPosition:e.newPosition,event_timestamp:Date.now()},orderedItems:t})},[de,h,y]),Re=(0,e.useMemo)(function(){var e={};return _&&(e.height="number"==typeof _?"".concat(_,"px"):_),e},[_]);return n().createElement(PN,{theme:pe},n().createElement("div",{id:a,style:Re},n().createElement(MB.Provider,{value:Me},n().createElement(eH,{items:he||[],getItemId:me,getItemLabel:fe,getItemChildren:ge,selectedItems:v,defaultSelectedItems:b,multiSelect:I,checkboxSelection:k,disableSelection:M,selectionPropagation:C,expandedItems:P,defaultExpandedItems:E,expansionTrigger:A,isItemEditable:ve,isItemDisabled:ye,disabledItemsFocusable:$,itemChildrenIndentation:N,sx:F,slots:Ce,itemsReordering:G,isItemReorderable:be,onItemPositionChange:Le,onSelectedItemsChange:Pe,onExpandedItemsChange:Ee,onItemClick:Te,onItemFocus:Ae,onItemLabelChange:Oe,"aria-label":U,"aria-labelledby":Y}))))};OB.propTypes={id:i().string,licenseKey:i().string,items:i().arrayOf(i().object),getItemId:i().string,getItemLabel:i().string,getItemChildren:i().string,selectedItems:i().oneOfType([i().string,i().arrayOf(i().string)]),defaultSelectedItems:i().oneOfType([i().string,i().arrayOf(i().string)]),multiSelect:i().bool,checkboxSelection:i().bool,disableSelection:i().bool,selectionPropagation:i().exact({parents:i().bool,descendants:i().bool}),expandedItems:i().arrayOf(i().string),defaultExpandedItems:i().arrayOf(i().string),expansionTrigger:i().oneOf(["content","iconContainer"]),isItemEditable:i().bool,editableItems:i().arrayOf(i().string),disabledItems:i().arrayOf(i().string),disabledItemsFocusable:i().bool,itemChildrenIndentation:i().oneOfType([i().number,i().string]),height:i().oneOfType([i().number,i().string]),sx:i().object,collapseIcon:i().string,expandIcon:i().string,endIcon:i().string,ariaLabel:i().string,ariaLabelledBy:i().string,itemsReordering:i().bool,reorderableItems:i().arrayOf(i().string),itemPositionChanged:i().object,orderedItems:i().arrayOf(i().object),lazyLoading:i().bool,lazyLoadedChildren:i().object,lazyLoadRequest:i().exact({itemId:i().string,event_timestamp:i().number}),showItemControls:i().bool,controlsItems:i().arrayOf(i().string),sliderValues:i().object,sliderMin:i().number,sliderMax:i().number,sliderStep:i().number,sliderColor:i().string,kebabMenuItems:i().arrayOf(i().shape({label:i().string,value:i().string,icon:i().string,divider:i().bool,children:i().array})),kebabMenuItemsById:i().objectOf(i().array),sliderChange:i().exact({itemId:i().string,value:i().number,event_timestamp:i().number}),kebabAction:i().exact({itemId:i().string,action:i().string,event_timestamp:i().number}),clickedItem:i().exact({itemId:i().string,event_timestamp:i().number}),focusedItem:i().exact({itemId:i().string,event_timestamp:i().number}),editedItemLabel:i().exact({itemId:i().string,newLabel:i().string,event_timestamp:i().number}),setProps:i().func};const jB=OB;var LB=a(4353),RB=a.n(LB);const DB=["localeText"],$B=e.createContext(null),zB=function(t){const{localeText:n}=t,r=tt(t,DB),{adapter:i,localeText:o}=e.useContext($B)??{utils:void 0,adapter:void 0,localeText:void 0},a=Lh({props:r,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:c,dateFormats:u,dateLibInstance:d,adapterLocale:p,localeText:h}=a,m=e.useMemo(()=>l({},h,o,n),[h,o,n]),f=e.useMemo(()=>{if(!c)return i||null;const e=new c({locale:p,formats:u,instance:d});if(!e.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/quickstart/#installation"].join("\n"));return e},[c,p,u,d,i]),g=e.useMemo(()=>f?{minDate:f.date("1900-01-01T00:00:00.000"),maxDate:f.date("2099-12-31T00:00:00.000")}:null,[f]),y=e.useMemo(()=>({utils:f,adapter:f,defaultDates:g,localeText:m}),[g,f,m]);return(0,O.jsx)($B.Provider,{value:y,children:s})};var NB=a(8134),_B=a(445),FB=a(5750),HB=a(7872),BB=a(7375);LB.extend(FB),LB.extend(NB),LB.extend(HB),LB.extend(BB);const VB={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},UB={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",dayOfMonthFull:"Do",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},YB=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join("\n"),WB=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join("\n");class GB{isMUIAdapter=!0;isTimezoneCompatible=!0;lib="dayjs";escapedCharacters={start:"[",end:"]"};formatTokenMap=(()=>VB)();constructor({locale:e,formats:t}={}){this.locale=e,this.formats=l({},UB,t),LB.extend(_B)}setLocaleToValue=e=>{const t=this.getCurrentLocaleCode();return t===e.locale()?e:e.locale(t)};hasUTCPlugin=()=>void 0!==LB.utc;hasTimezonePlugin=()=>void 0!==LB.tz;isSame=(e,t,n)=>{const r=this.setTimezone(t,this.getTimezone(e));return e.format(n)===r.format(n)};cleanTimezone=e=>{switch(e){case"default":return;case"system":return LB.tz.guess();default:return e}};createSystemDate=e=>{let t;if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const n=LB.tz.guess();t="UTC"===n?LB(e):LB.tz(e,n)}else t=LB(e);return this.setLocaleToValue(t)};createUTCDate=e=>{if(!this.hasUTCPlugin())throw new Error(YB);return this.setLocaleToValue(LB.utc(e))};createTZDate=(e,t)=>{if(!this.hasUTCPlugin())throw new Error(YB);if(!this.hasTimezonePlugin())throw new Error(WB);const n=void 0!==e&&!e.endsWith("Z");return this.setLocaleToValue(LB(e).tz(this.cleanTimezone(t),n))};getLocaleFormats=()=>{const e=LB.Ls;let t=e[this.locale||"en"];return void 0===t&&(t=e.en),t.formats};adjustOffset=e=>{if(!this.hasTimezonePlugin())return e;const t=this.getTimezone(e);if("UTC"!==t){const n=e.tz(this.cleanTimezone(t),!0);if(n.$offset===(e.$offset??0))return e;e.$offset=n.$offset}return e};date=(e,t="default")=>null===e?null:"UTC"===t?this.createUTCDate(e):"system"===t||"default"===t&&!this.hasTimezonePlugin()?this.createSystemDate(e):this.createTZDate(e,t);getInvalidDate=()=>LB(new Date("Invalid date"));getTimezone=e=>{if(this.hasTimezonePlugin()){const t=e.$x?.$timezone;if(t)return t}return this.hasUTCPlugin()&&e.isUTC()?"UTC":"system"};setTimezone=(e,t)=>{if(this.getTimezone(e)===t)return e;if("UTC"===t){if(!this.hasUTCPlugin())throw new Error(YB);return e.utc()}if("system"===t)return e.local();if(!this.hasTimezonePlugin()){if("default"===t)return e;throw new Error(WB)}return this.setLocaleToValue(LB.tz(e,this.cleanTimezone(t)))};toJsDate=e=>e.toDate();parse=(e,t)=>""===e?null:LB(e,t,this.locale,!0);getCurrentLocaleCode=()=>this.locale||"en";is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||"");expandFormat=e=>{const t=this.getLocaleFormats();return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(e,n,r)=>{const i=r&&r.toUpperCase();return n||t[r]||t[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(e,t,n)=>t||n.slice(1))})};isValid=e=>null!=e&&e.isValid();format=(e,t)=>this.formatByString(e,this.formats[t]);formatByString=(e,t)=>this.setLocaleToValue(e).format(t);formatNumber=e=>e;isEqual=(e,t)=>null===e&&null===t||null!==e&&null!==t&&e.toDate().getTime()===t.toDate().getTime();isSameYear=(e,t)=>this.isSame(e,t,"YYYY");isSameMonth=(e,t)=>this.isSame(e,t,"YYYY-MM");isSameDay=(e,t)=>this.isSame(e,t,"YYYY-MM-DD");isSameHour=(e,t)=>e.isSame(t,"hour");isAfter=(e,t)=>e>t;isAfterYear=(e,t)=>this.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()>t.utc():e.isAfter(t,"year");isAfterDay=(e,t)=>this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()>t.utc():e.isAfter(t,"day");isBefore=(e,t)=>ethis.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()e>=t&&e<=n;startOfYear=e=>this.adjustOffset(e.startOf("year"));startOfMonth=e=>this.adjustOffset(e.startOf("month"));startOfWeek=e=>this.adjustOffset(this.setLocaleToValue(e).startOf("week"));startOfDay=e=>this.adjustOffset(e.startOf("day"));endOfYear=e=>this.adjustOffset(e.endOf("year"));endOfMonth=e=>this.adjustOffset(e.endOf("month"));endOfWeek=e=>this.adjustOffset(this.setLocaleToValue(e).endOf("week"));endOfDay=e=>this.adjustOffset(e.endOf("day"));addYears=(e,t)=>this.adjustOffset(e.add(t,"year"));addMonths=(e,t)=>this.adjustOffset(e.add(t,"month"));addWeeks=(e,t)=>this.adjustOffset(e.add(t,"week"));addDays=(e,t)=>this.adjustOffset(e.add(t,"day"));addHours=(e,t)=>this.adjustOffset(e.add(t,"hour"));addMinutes=(e,t)=>this.adjustOffset(e.add(t,"minute"));addSeconds=(e,t)=>this.adjustOffset(e.add(t,"second"));getYear=e=>e.year();getMonth=e=>e.month();getDate=e=>e.date();getHours=e=>e.hour();getMinutes=e=>e.minute();getSeconds=e=>e.second();getMilliseconds=e=>e.millisecond();setYear=(e,t)=>this.adjustOffset(e.set("year",t));setMonth=(e,t)=>this.adjustOffset(e.set("month",t));setDate=(e,t)=>this.adjustOffset(e.set("date",t));setHours=(e,t)=>this.adjustOffset(e.set("hour",t));setMinutes=(e,t)=>this.adjustOffset(e.set("minute",t));setSeconds=(e,t)=>this.adjustOffset(e.set("second",t));setMilliseconds=(e,t)=>this.adjustOffset(e.set("millisecond",t));getDaysInMonth=e=>e.daysInMonth();getWeekArray=e=>{const t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e));let r=0,i=t;const o=[];for(;ie.week();getDayOfWeek(e){return e.day()+1}getYearRange=([e,t])=>{const n=this.startOfYear(e),r=this.endOfYear(t),i=[];let o=n;for(;this.isBefore(o,r);)i.push(o),o=this.addYears(o,1);return i}}function KB(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let e=0;e"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",nextStepButtonLabel:"Next",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",timeRangePickerToolbarTitle:"Select time range",clockLabelText:(e,t)=>`Select ${e}. ${t?`Selected time is ${t}`:"No time selected"}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:e=>e?`Choose date, selected date is ${e}`:"Choose date",openTimePickerDialogue:e=>e?`Choose time, selected time is ${e}`:"Choose time",openRangePickerDialogue:e=>e?`Choose range, selected range is ${e}`:"Choose range",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},JB=ZB;l({},ZB);const QB=()=>{const t=e.useContext($B);if(null===t)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join("\n"));if(null===t.adapter)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join("\n"));const n=e.useMemo(()=>l({},JB,t.localeText),[t.localeText]);return e.useMemo(()=>l({},t,{localeText:n}),[t,n])},eV=()=>QB().adapter,tV=()=>QB().localeText,nV=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t},rV=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=Hh(n?.className,o,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},a={...n,...i,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}({...i,...r}),s=nV(r),l=nV(i),c=t(a),u=Hh(c?.className,n?.className,o,i?.className,r?.className),d={...c?.style,...n?.style,...i?.style,...r?.style},p={...c,...n,...l,...s};return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}},iV=function(t){const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1,...a}=t,s=o?{}:function(e,t,n){return"function"==typeof e?e(t,n):e}(r,i),{props:l,internalRef:c}=rV({...a,externalSlotProps:s}),u=function(...t){const n=e.useRef(void 0),r=e.useCallback(e=>{const n=t.map(t=>{if(null==t)return null;if("function"==typeof t){const n=t,r=n(e);return"function"==typeof r?r:()=>{n(null)}}return t.current=e,()=>{t.current=null}});return()=>{n.forEach(e=>e?.())}},t);return e.useMemo(()=>t.every(e=>null==e)?null:e=>{n.current&&(n.current(),n.current=void 0),null!=e&&(n.current=r(e))},t)}(c,s?.ref,t.additionalProps?.ref);return function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(n,{...l,ref:u},i)},oV=(ob((0,O.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),ob((0,O.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft")),aV=ob((0,O.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),sV=(ob((0,O.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),ob((0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,O.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),ob((0,O.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),ob((0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,O.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),ob((0,O.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),e=>e),lV=(()=>{let e=sV;return{configure(t){e=t},generate:t=>e(t),reset(){e=sV}}})(),cV={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function uV(e,t,n="Mui"){const r=cV[t];return r?`${n}-${r}`:`${lV.generate(e)}-${t}`}function dV(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=uV(e,t,n)}),r}function pV(e){return uV("MuiPickersArrowSwitcher",e)}dV("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const hV=e.createContext({ownerState:{isPickerDisabled:!1,isPickerReadOnly:!1,isPickerValueEmpty:!1,isPickerOpen:!1,pickerVariant:"desktop",pickerOrientation:"portrait"},rootRefObject:{current:null},labelId:void 0,dismissViews:()=>{},hasUIView:!0,getCurrentViewMode:()=>"UI",triggerElement:null,viewContainerRole:null,defaultActionBarActions:[],onPopperExited:void 0}),mV=()=>e.useContext(hV),fV=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId","classes"],gV=["ownerState"],yV=["ownerState"],vV=bm("div",{name:"MuiPickersArrowSwitcher",slot:"Root"})({display:"flex"}),bV=bm("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer"})(({theme:e})=>({width:e.spacing(3)})),xV=bm(sv,{name:"MuiPickersArrowSwitcher",slot:"Button"})({variants:[{props:{isButtonHidden:!0},style:{visibility:"hidden"}}]}),IV=e.forwardRef(function(e,t){const n=fS(),r=Lh({props:e,name:"MuiPickersArrowSwitcher"}),{children:i,className:o,slots:a,slotProps:s,isNextDisabled:c,isNextHidden:u,onGoToNext:d,nextLabel:p,isPreviousDisabled:h,isPreviousHidden:m,onGoToPrevious:f,previousLabel:g,labelId:y,classes:v}=r,b=tt(r,fV),{ownerState:x}=mV(),I=(e=>KB({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},pV,e))(v),w={isDisabled:c,isHidden:u,goTo:d,label:p},k={isDisabled:h,isHidden:m,goTo:f,label:g},S=a?.previousIconButton??xV,M=iV({elementType:S,externalSlotProps:s?.previousIconButton,additionalProps:{size:"medium",title:k.label,"aria-label":k.label,disabled:k.isDisabled,edge:"end",onClick:k.goTo},ownerState:l({},x,{isButtonHidden:k.isHidden??!1}),className:Hh(I.button,I.previousIconButton)}),C=a?.nextIconButton??xV,P=iV({elementType:C,externalSlotProps:s?.nextIconButton,additionalProps:{size:"medium",title:w.label,"aria-label":w.label,disabled:w.isDisabled,edge:"start",onClick:w.goTo},ownerState:l({},x,{isButtonHidden:w.isHidden??!1}),className:Hh(I.button,I.nextIconButton)}),E=a?.leftArrowIcon??oV,T=tt(iV({elementType:E,externalSlotProps:s?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:x,className:I.leftArrowIcon}),gV),A=a?.rightArrowIcon??aV,j=tt(iV({elementType:A,externalSlotProps:s?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:x,className:I.rightArrowIcon}),yV);return(0,O.jsxs)(vV,l({ref:t,className:Hh(I.root,o),ownerState:x},b,{children:[(0,O.jsx)(S,l({},M,{children:n?(0,O.jsx)(A,l({},j)):(0,O.jsx)(E,l({},T))})),i?(0,O.jsx)(Nv,{variant:"subtitle1",component:"span",id:y,children:i}):(0,O.jsx)(bV,{className:I.spacer,ownerState:x}),(0,O.jsx)(C,l({},P,{children:n?(0,O.jsx)(E,l({},T)):(0,O.jsx)(A,l({},j))}))]}))}),wV=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?"am"===t?e-12:e+12:e,kV=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),SV=(e,t)=>(n,r)=>e?t.isAfter(n,r):kV(n,t)>kV(r,t),MV="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,CV=function(t){const n=e.useRef(t);return MV(()=>{n.current=t}),e.useRef((...e)=>(0,n.current)(...e)).current};function PV(t){const{controlled:n,default:r,name:i,state:o="value"}=t,{current:a}=e.useRef(void 0!==n),[s,l]=e.useState(r);return[a?n:s,e.useCallback(e=>{a||l(e)},[])]}const EV={hasNextStep:!1,hasSeveralSteps:!1,goToNextStep:()=>{},areViewsInSameStep:()=>!0};const TV=bm("div",{slot:"internal",shouldForwardProp:void 0})({overflow:"hidden",width:320,maxHeight:336,display:"flex",flexDirection:"column",margin:"0 auto"});function AV(e){return uV("MuiTimeClock",e)}dV("MuiTimeClock",["root","arrowSwitcher"]);const OV=110,jV=110,LV=OV-OV,RV=0-jV,DV=(e,t,n)=>{const r=t-OV,i=n-jV;let o=(Math.atan2(LV,RV)-Math.atan2(r,i))*(180/Math.PI);o=Math.round(o/e)*e,o%=360;const a=r**2+i**2;return{value:Math.floor(o/e)||0,distance:Math.sqrt(a)}};function $V(e){return uV("MuiClockPointer",e)}dV("MuiClockPointer",["root","thumb"]);const zV=["className","classes","isBetweenTwoClockValues","isInner","type","viewValue"],NV=bm("div",{name:"MuiClockPointer",slot:"Root"})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{isClockPointerAnimated:!0},style:{transition:e.transitions.create(["transform","height"])}}]})),_V=bm("div",{name:"MuiClockPointer",slot:"Thumb"})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - 18px)",border:`16px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{isClockPointerBetweenTwoValues:!1},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function FV(t){const n=Lh({props:t,name:"MuiClockPointer"}),{className:r,classes:i,isBetweenTwoClockValues:o,isInner:a,type:s,viewValue:c}=n,u=tt(n,zV),d=e.useRef(s);e.useEffect(()=>{d.current=s},[s]);const{ownerState:p}=mV(),h=l({},p,{isClockPointerAnimated:d.current!==s,isClockPointerBetweenTwoValues:o}),m=(e=>KB({root:["root"],thumb:["thumb"]},$V,e))(i);return(0,O.jsx)(NV,l({style:(()=>{let e=360/("hours"===s?12:60)*c;return"hours"===s&&c>12&&(e-=360),{height:Math.round(220*(a?.26:.4)),transform:`rotateZ(${e}deg)`}})(),className:Hh(m.root,r),ownerState:h},u,{children:(0,O.jsx)(_V,{ownerState:h,className:m.thumb})}))}function HV(e){return uV("MuiClock",e)}dV("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const BV=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},VV=(e,t,n)=>"date"===n?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),UV=(e,t)=>{const n=e.setHours(e.date(),"am"===t?2:14);return e.format(n,"meridiem")},YV=bm("div",{name:"MuiClock",slot:"Root"})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),WV=bm("div",{name:"MuiClock",slot:"Clock"})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),GV=bm("div",{name:"MuiClock",slot:"Wrapper"})({"&:focus":{outline:"none"}}),KV=bm("div",{name:"MuiClock",slot:"SquareMask"})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{isClockDisabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),qV=bm("div",{name:"MuiClock",slot:"Pin"})(({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),XV=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:36,variants:[{props:{clockMeridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),ZV=bm(sv,{name:"MuiClock",slot:"AmButton"})(({theme:e})=>l({},XV(e,"am"),{position:"absolute",left:8})),JV=bm(sv,{name:"MuiClock",slot:"PmButton"})(({theme:e})=>l({},XV(e,"pm"),{position:"absolute",right:8})),QV=bm(Nv,{name:"MuiClock",slot:"MeridiemText"})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function eU(t){const n=Lh({props:t,name:"MuiClock"}),{ampm:r,ampmInClock:i,autoFocus:o,children:a,value:s,handleMeridiemChange:c,isTimeDisabled:u,meridiemMode:d,minutesStep:p=1,onChange:h,selectedId:m,type:f,viewValue:g,viewRange:[y,v],disabled:b=!1,readOnly:x,className:I,classes:w}=n,k=eV(),S=tV(),{ownerState:M}=mV(),C=l({},M,{isClockDisabled:b,clockMeridiemMode:d}),P=e.useRef(!1),E=((e,t)=>KB({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton","am"===t.clockMeridiemMode&&"selected"],pmButton:["pmButton","pm"===t.clockMeridiemMode&&"selected"],meridiemText:["meridiemText"]},HV,e))(w,C),T=u(g,f),A=!r&&"hours"===f&&(g<1||g>12),j=(e,t)=>{b||x||u(e,f)||h(e,t)},L=(e,t)=>{let{offsetX:n,offsetY:i}=e;if(void 0===n){const t=e.target.getBoundingClientRect();n=e.changedTouches[0].clientX-t.left,i=e.changedTouches[0].clientY-t.top}const o="seconds"===f||"minutes"===f?((e,t,n=1)=>{const r=6*n;let{value:i}=DV(r,e,t);return i=i*n%60,i})(n,i,p):((e,t,n)=>{const{value:r,distance:i}=DV(30,e,t);let o=r||12;return n?o%=12:i<74&&(o+=12,o%=24),o})(n,i,Boolean(r));j(o,t)},R=e=>{P.current=!0,L(e,"shallow")},D="hours"!==f&&g%5!=0,$="minutes"===f?p:1,z=e.useRef(null);MV(()=>{o&&z.current.focus()},[o]);const N=e=>Math.max(y,Math.min(v,e)),_=e=>(e+(v+1))%(v+1);return(0,O.jsxs)(YV,{className:Hh(E.root,I),children:[(0,O.jsxs)(WV,{className:E.clock,children:[(0,O.jsx)(KV,{onTouchMove:R,onTouchStart:R,onTouchEnd:e=>{P.current&&(L(e,"finish"),P.current=!1),e.preventDefault()},onMouseUp:e=>{P.current&&(P.current=!1),L(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&L(e.nativeEvent,"shallow")},ownerState:C,className:E.squareMask}),!T&&(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(qV,{className:E.pin}),null!=s&&(0,O.jsx)(FV,{type:f,viewValue:g,isInner:A,isBetweenTwoClockValues:D})]}),(0,O.jsx)(GV,{"aria-activedescendant":m,"aria-label":S.clockLabelText(f,null==s?null:k.format(s,r?"fullTime12h":"fullTime24h")),ref:z,role:"listbox",onKeyDown:e=>{if(!P.current)switch(e.key){case"Home":j(y,"partial"),e.preventDefault();break;case"End":j(v,"partial"),e.preventDefault();break;case"ArrowUp":j(_(g+$),"partial"),e.preventDefault();break;case"ArrowDown":j(_(g-$),"partial"),e.preventDefault();break;case"PageUp":j(N(g+5),"partial"),e.preventDefault();break;case"PageDown":j(N(g-5),"partial"),e.preventDefault();break;case"Enter":case" ":j(g,"finish"),e.preventDefault()}},tabIndex:0,className:E.wrapper,children:a})]}),r&&i&&(0,O.jsxs)(e.Fragment,{children:[(0,O.jsx)(ZV,{onClick:x?void 0:()=>c("am"),disabled:b||null===d,ownerState:C,className:E.amButton,title:UV(k,"am"),children:(0,O.jsx)(QV,{variant:"caption",className:E.meridiemText,children:UV(k,"am")})}),(0,O.jsx)(JV,{disabled:b||null===d,onClick:x?void 0:()=>c("pm"),ownerState:C,className:E.pmButton,title:UV(k,"pm"),children:(0,O.jsx)(QV,{variant:"caption",className:E.meridiemText,children:UV(k,"pm")})})]})]})}function tU(e){return uV("MuiClockNumber",e)}const nU=dV("MuiClockNumber",["root","selected","disabled"]),rU=["className","classes","disabled","index","inner","label","selected"],iU=bm("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${nU.disabled}`]:t.disabled},{[`&.${nU.selected}`]:t.selected}]})(({theme:e})=>({height:36,width:36,position:"absolute",left:"calc((100% - 36px) / 2)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${nU.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${nU.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{isClockNumberInInnerRing:!0},style:l({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function oU(e){const t=Lh({props:e,name:"MuiClockNumber"}),{className:n,classes:r,disabled:i,index:o,inner:a,label:s,selected:c}=t,u=tt(t,rU),{ownerState:d}=mV(),p=l({},d,{isClockNumberInInnerRing:a,isClockNumberSelected:c,isClockNumberDisabled:i}),h=((e,t)=>KB({root:["root",t.isClockNumberSelected&&"selected",t.isClockNumberDisabled&&"disabled"]},tU,e))(r,p),m=o%12/12*Math.PI*2-Math.PI/2,f=91*(a?.65:1),g=Math.round(Math.cos(m)*f),y=Math.round(Math.sin(m)*f);return(0,O.jsx)(iU,l({className:Hh(h.root,n),"aria-disabled":!!i||void 0,"aria-selected":!!c||void 0,role:"option",style:{transform:`translate(${g}px, ${y+92}px`},ownerState:p},u,{children:s}))}const aU=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:i,adapter:o})=>{const a=t?o.getHours(t):null,s=[],l=e?12:23,c=t=>null!==a&&(e?12===t?12===a||0===a:a===t||a-12===t:a===t);for(let t=e?1:0;t<=l;t+=1){let a=t.toString();0===t&&(a="00");const l=!e&&(0===t||t>12);a=o.formatNumber(a);const u=c(t);s.push((0,O.jsx)(oU,{id:u?i:void 0,index:t,inner:l,selected:u,disabled:r(t),label:a,"aria-label":n(a)},t))}return s},sU=({adapter:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:i})=>{const o=e.formatNumber;return[[5,o("05")],[10,o("10")],[15,o("15")],[20,o("20")],[25,o("25")],[30,o("30")],[35,o("35")],[40,o("40")],[45,o("45")],[50,o("50")],[55,o("55")],[0,o("00")]].map(([e,o],a)=>{const s=e===t;return(0,O.jsx)(oU,{label:o,id:s?i:void 0,index:a+1,inner:!1,disabled:n(e),selected:s,"aria-label":r(o)},e)})},lU=1,cU=2,uU=3,dU=5,pU=6,hU=7,mU=(e,t,n)=>{if(t===lU)return e.startOfYear(n);if(t===cU)return e.startOfMonth(n);if(t===uU)return e.startOfDay(n);let r=n;return t{let{value:t,referenceDate:n}=e,r=tt(e,fU);return r.adapter.isValid(t)?t:null!=n?n:(({props:e,adapter:t,granularity:n,timezone:r,getTodayDate:i})=>{let o=i?i():mU(t,n,VV(t,r));null!=e.minDate&&t.isAfterDay(e.minDate,o)&&(o=mU(t,n,e.minDate)),null!=e.maxDate&&t.isBeforeDay(e.maxDate,o)&&(o=mU(t,n,e.maxDate));const a=SV(e.disableIgnoringDatePartForTimeValidation??!1,t);return null!=e.minTime&&a(e.minTime,o)&&(o=mU(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:BV(t,o,e.minTime))),null!=e.maxTime&&a(o,e.maxTime)&&(o=mU(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:BV(t,o,e.maxTime))),o})(r)},cleanValue:(e,t)=>e.isValid(t)?t:null,areValuesEqual:(e,t,n)=>!e.isValid(t)&&null!=t&&!e.isValid(n)&&null!=n||e.isEqual(t,n),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>null==n?null:e.setTimezone(n,t)},yU=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","classes","disabled","readOnly","timezone"],vU=bm(TV,{name:"MuiTimeClock",slot:"Root"})({display:"flex",flexDirection:"column",position:"relative"}),bU=bm(IV,{name:"MuiTimeClock",slot:"ArrowSwitcher"})({position:"absolute",right:12,top:15}),xU=["hours","minutes"],IU=e.forwardRef(function(t,n){const r=eV(),i=Lh({props:t,name:"MuiTimeClock"}),{ampm:o=r.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:s,slots:c,slotProps:u,value:d,defaultValue:p,referenceDate:h,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:f,minTime:g,disableFuture:y,disablePast:v,minutesStep:b=1,shouldDisableTime:x,showViewSwitcher:I,onChange:w,view:k,views:S=xU,openTo:M,onViewChange:C,focusedView:P,onFocusedViewChange:E,className:T,classes:A,disabled:j,readOnly:L,timezone:R}=i,D=tt(i,yU),{value:$,handleValueChange:z,timezone:N}=(({name:t,timezone:n,value:r,defaultValue:i,referenceDate:o,onChange:a,valueManager:s})=>{const l=eV(),[c,u]=PV({name:t,state:"value",controlled:r,default:i??s.emptyValue}),d=e.useMemo(()=>s.getTimezone(l,c),[l,s,c]),p=CV(e=>null==d?e:s.setTimezone(l,d,e)),h=e.useMemo(()=>n||d||(o?l.getTimezone(Array.isArray(o)?o[0]:o):"default"),[n,d,o,l]);return{value:e.useMemo(()=>s.setTimezone(l,h,c),[s,l,h,c]),handleValueChange:CV((e,...t)=>{const n=p(e);u(n),a?.(n,...t)}),timezone:h}})({name:"TimeClock",timezone:R,value:d,defaultValue:p,referenceDate:h,onChange:w,valueManager:gU}),_=(({value:t,referenceDate:n,adapter:r,props:i,timezone:o})=>{const a=e.useMemo(()=>gU.getInitialReferenceValue({value:t,adapter:r,props:i,referenceDate:n,granularity:uU,timezone:o,getTodayDate:()=>VV(r,o,"date")}),[n,o]);return t??a})({value:$,referenceDate:h,adapter:r,props:i,timezone:N}),F=tV(),H=(t=>{const n=eV(),r=e.useRef(void 0);return void 0===r.current&&(r.current=n.date(void 0,t)),r.current})(N),B=function(t){if(void 0!==XB){const e=XB();return t??e}return function(t){const[n,r]=e.useState(t),i=t||n;return e.useEffect(()=>{null==n&&(qB+=1,r(`mui-${qB}`))},[n]),i}(t)}(),{ownerState:V}=mV(),{view:U,setView:Y,previousView:W,nextView:G,setValueAndGoToNextView:K}=function({onChange:t,onViewChange:n,openTo:r,view:i,views:o,autoFocus:a,focusedView:s,onFocusedViewChange:c,getStepNavigation:u}){const d=e.useRef(r),p=e.useRef(o),h=e.useRef(o.includes(r)?r:o[0]),[m,f]=PV({name:"useViews",state:"view",controlled:i,default:h.current}),g=e.useRef(a?m:null),[y,v]=PV({name:"useViews",state:"focusedView",controlled:s,default:g.current}),b=u?u({setView:f,view:m,defaultView:h.current,views:o}):EV;e.useEffect(()=>{(d.current&&d.current!==r||p.current&&p.current.some(e=>!o.includes(e)))&&(f(o.includes(r)?r:o[0]),p.current=o,d.current=r)},[r,f,m,o]);const x=o.indexOf(m),I=o[x-1]??null,w=o[x+1]??null,k=CV((e,t)=>{v(t?e:t=>e===t?null:t),c?.(e,t)}),S=CV(e=>{k(e,!0),e!==m&&(f(e),n&&n(e))}),M=CV(()=>{w&&S(w)}),C=CV((e,n,r)=>{const i="finish"===n,a=r?o.indexOf(r)o.isValid(t)?t:null,[o,t]),s=((e,t)=>e?t.getHours(e)>=12?"pm":"am":null)(a,o),l=e.useCallback(e=>{const t=null==a?null:((e,t,n,r)=>{const i=wV(r.getHours(e),t,n);return r.setHours(e,i)})(a,e,Boolean(n),o);r(t,i??"partial")},[n,a,r,i,o]);return{meridiemMode:s,handleMeridiemChange:l}}(_,o,K),Z=e.useCallback((e,t)=>{const n=SV(m,r),i="hours"===t||"minutes"===t&&S.includes("seconds"),a=({start:e,end:t})=>!(g&&n(g,t)||f&&n(e,f)||y&&n(e,H)||v&&n(H,i?t:e)),s=(e,n=1)=>{if(e%n!==0)return!1;if(x)switch(t){case"hours":return!x(r.setHours(_,e),"hours");case"minutes":return!x(r.setMinutes(_,e),"minutes");case"seconds":return!x(r.setSeconds(_,e),"seconds");default:return!1}return!0};switch(t){case"hours":{const t=wV(e,q,o),n=r.setHours(_,t);return r.getHours(n)!==t||(!a({start:r.setSeconds(r.setMinutes(n,0),0),end:r.setSeconds(r.setMinutes(n,59),59)})||!s(t))}case"minutes":{const t=r.setMinutes(_,e);return!a({start:r.setSeconds(t,0),end:r.setSeconds(t,59)})||!s(e,b)}case"seconds":{const t=r.setSeconds(_,e);return!a({start:t,end:t})||!s(e)}default:throw new Error("not supported")}},[o,_,m,f,q,g,b,x,r,y,v,H,S]),J=e.useMemo(()=>{switch(U){case"hours":{const e=(e,t)=>{const n=wV(e,q,o);K(r.setHours(_,n),t,"hours")},t=r.getHours(_);let n;return n=o?t>12?[12,23]:[0,11]:[0,23],{onChange:e,viewValue:t,children:aU({value:$,adapter:r,ampm:o,onChange:e,getClockNumberText:F.hoursClockNumberText,isDisabled:e=>j||Z(e,"hours"),selectedId:B}),viewRange:n}}case"minutes":{const e=r.getMinutes(_),t=(e,t)=>{K(r.setMinutes(_,e),t,"minutes")};return{viewValue:e,onChange:t,children:sU({adapter:r,value:e,onChange:t,getClockNumberText:F.minutesClockNumberText,isDisabled:e=>j||Z(e,"minutes"),selectedId:B}),viewRange:[0,59]}}case"seconds":{const e=r.getSeconds(_),t=(e,t)=>{K(r.setSeconds(_,e),t,"seconds")};return{viewValue:e,onChange:t,children:sU({adapter:r,value:e,onChange:t,getClockNumberText:F.secondsClockNumberText,isDisabled:e=>j||Z(e,"seconds"),selectedId:B}),viewRange:[0,59]}}default:throw new Error("You must provide the type for ClockView")}},[U,r,$,o,F.hoursClockNumberText,F.minutesClockNumberText,F.secondsClockNumberText,q,K,_,Z,B,j]),Q=(e=>KB({root:["root"],arrowSwitcher:["arrowSwitcher"]},AV,e))(A);return(0,O.jsxs)(vU,l({ref:n,className:Hh(Q.root,T),ownerState:V},D,{children:[(0,O.jsx)(eU,l({autoFocus:s??!!P,ampmInClock:a&&S.includes("hours"),value:$,type:U,ampm:o,minutesStep:b,isTimeDisabled:Z,meridiemMode:q,handleMeridiemChange:X,selectedId:B,disabled:j,readOnly:L},J)),I&&(0,O.jsx)(bU,{className:Q.arrowSwitcher,slots:c,slotProps:u,onGoToPrevious:()=>Y(W),isPreviousDisabled:!W,previousLabel:F.openPreviousView,onGoToNext:()=>Y(G),isNextDisabled:!G,nextLabel:F.openNextView,ownerState:V})]}))});function wU(){return wU=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"dash_mui_charts:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},t=/(\\[[^[]*\\])|([-_:/.,()\\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\\d/,r=/\\d\\d/,i=/\\d\\d?/,o=/\\d*[^-_:/,()\\s\\d]+/,s={},a=function(e){return(e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t}},h=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if(\"Z\"===e)return 0;var t=e.match(/([+-]|\\d\\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:\"+\"===t[0]?-n:n}(e)}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?\"pm\":\"PM\");return n},c={A:[o,function(e){this.afternoon=d(e,!1)}],a:[o,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\\d{3}/,function(e){this.milliseconds=+e}],s:[i,f(\"seconds\")],ss:[i,f(\"seconds\")],m:[i,f(\"minutes\")],mm:[i,f(\"minutes\")],H:[i,f(\"hours\")],h:[i,f(\"hours\")],HH:[i,f(\"hours\")],hh:[i,f(\"hours\")],D:[i,f(\"day\")],DD:[r,f(\"day\")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\\[|\\]/g,\"\")===e&&(this.day=r)}],w:[i,f(\"week\")],ww:[r,f(\"week\")],M:[i,f(\"month\")],MM:[r,f(\"month\")],MMM:[o,function(e){var t=u(\"months\"),n=(u(\"monthsShort\")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=u(\"months\").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\\d+/,f(\"year\")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\\d{4}/,f(\"year\")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f-1)return new Date((\"X\"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date(\"\")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date(\"\")),s={}}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(\"\"))}else i.call(this,e)}}}));","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","module.exports = window[\"React\"];","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\nexports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n};\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)25){var f=r(this).startOf(t).add(1,t).date(n),s=r(this).endOf(e);if(f.isBefore(s))return 1}var a=r(this).startOf(t).date(n).startOf(e).subtract(1,\"millisecond\"),o=this.diff(a,e,!0);return o<0?r(this).startOf(\"week\").week():Math.ceil(o)},f.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}));","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n","/**\n * https://github.com/gre/bezier-easing\n * BezierEasing - use bezier curve for transition easing function\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\n */\n\n// These values are established by empiricism with tests (tradeoff: performance VS precision)\nvar NEWTON_ITERATIONS = 4;\nvar NEWTON_MIN_SLOPE = 0.001;\nvar SUBDIVISION_PRECISION = 0.0000001;\nvar SUBDIVISION_MAX_ITERATIONS = 10;\n\nvar kSplineTableSize = 11;\nvar kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\nvar float32ArraySupported = typeof Float32Array === 'function';\n\nfunction A (aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }\nfunction B (aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }\nfunction C (aA1) { return 3.0 * aA1; }\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nfunction calcBezier (aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; }\n\n// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\nfunction getSlope (aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); }\n\nfunction binarySubdivide (aX, aA, aB, mX1, mX2) {\n var currentX, currentT, i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if (currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n return currentT;\n}\n\nfunction newtonRaphsonIterate (aX, aGuessT, mX1, mX2) {\n for (var i = 0; i < NEWTON_ITERATIONS; ++i) {\n var currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) {\n return aGuessT;\n }\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\n\nfunction LinearEasing (x) {\n return x;\n}\n\nmodule.exports = function bezier (mX1, mY1, mX2, mY2) {\n if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) {\n throw new Error('bezier x values must be in [0, 1] range');\n }\n\n if (mX1 === mY1 && mX2 === mY2) {\n return LinearEasing;\n }\n\n // Precompute samples table\n var sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n for (var i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n\n function getTForX (aX) {\n var intervalStart = 0.0;\n var currentSample = 1;\n var lastSample = kSplineTableSize - 1;\n\n for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n\n // Interpolate to provide an initial guess for t\n var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n var guessForT = intervalStart + dist * kSampleStepSize;\n\n var initialSlope = getSlope(guessForT, mX1, mX2);\n if (initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if (initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n\n return function BezierEasing (x) {\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n if (x === 0) {\n return 0;\n }\n if (x === 1) {\n return 1;\n }\n return calcBezier(getTForX(x), mY1, mY2);\n };\n};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".dash_mui_charts.min.js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","var getCurrentScript = function() {\n var script = document.currentScript;\n if (!script) {\n /* Shim for IE11 and below */\n /* Do not take into account async scripts and inline scripts */\n\n var doc_scripts = document.getElementsByTagName('script');\n var scripts = [];\n\n for (var i = 0; i < doc_scripts.length; i++) {\n scripts.push(doc_scripts[i]);\n }\n\n scripts = scripts.filter(function(s) { return !s.async && !s.text && !s.textContent; });\n script = scripts.slice(-1)[0];\n }\n\n return script;\n};\n\nvar isLocalScript = function(script) {\n return /\\/_dash-component-suites\\//.test(script.src);\n};\n\nObject.defineProperty(__webpack_require__, 'p', {\n get: (function () {\n var script = getCurrentScript();\n\n var url = script.src.split('/').slice(0, -1).join('/') + '/';\n\n return function() {\n return url;\n };\n })()\n});\n\nif (typeof jsonpScriptSrc !== 'undefined') {\n var __jsonpScriptSrc__ = jsonpScriptSrc;\n jsonpScriptSrc = function(chunkId) {\n var script = getCurrentScript();\n var isLocal = isLocalScript(script);\n\n var src = __jsonpScriptSrc__(chunkId);\n\n if(!isLocal) {\n return src;\n }\n\n var srcFragments = src.split('/');\n var fileFragments = srcFragments.slice(-1)[0].split('.');\n\n fileFragments.splice(1, 0, \"v1_3_0m1780687251\");\n srcFragments.splice(-1, 1, fileFragments.join('.'))\n\n return srcFragments.join('/');\n };\n}\n","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t57: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkdash_mui_charts\"] = self[\"webpackChunkdash_mui_charts\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"PropTypes\"];","/* eslint-disable */\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nexport default typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();","import { ponyfillGlobal } from '@mui/utils';\n\n/**\n * @ignore - do not document.\n */\n\n// Store the license information in a global, so it can be shared\n// when module duplication occurs. The duplication of the modules can happen\n// if using multiple version of MUI X at the same time of the bundler\n// decide to duplicate to improve the size of the chunks.\n// eslint-disable-next-line no-underscore-dangle\nponyfillGlobal.__MUI_LICENSE_INFO__ = ponyfillGlobal.__MUI_LICENSE_INFO__ || {\n key: undefined\n};\nexport class LicenseInfo {\n static getLicenseInfo() {\n // eslint-disable-next-line no-underscore-dangle\n return ponyfillGlobal.__MUI_LICENSE_INFO__;\n }\n static getLicenseKey() {\n return LicenseInfo.getLicenseInfo().key;\n }\n static setLicenseKey(key) {\n const licenseInfo = LicenseInfo.getLicenseInfo();\n licenseInfo.key = key;\n }\n}","function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","const is = Object.is;\n\n/**\n * Fast shallow compare for objects.\n * @returns true if objects are equal.\n */\nexport function fastObjectShallowCompare(a, b) {\n if (a === b) {\n return true;\n }\n if (!(a instanceof Object) || !(b instanceof Object)) {\n return false;\n }\n let aLength = 0;\n let bLength = 0;\n\n /* eslint-disable guard-for-in */\n for (const key in a) {\n aLength += 1;\n if (!is(a[key], b[key])) {\n return false;\n }\n if (!(key in b)) {\n return false;\n }\n }\n\n /* eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unused-vars */\n for (const _ in b) {\n bLength += 1;\n }\n return aLength === bLength;\n}","/**\n * @mui/x-telemetry v8.20.0\n *\n * @license SEE LICENSE IN LICENSE\n * This source code is licensed under the SEE LICENSE IN LICENSE license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport muiXTelemetryEvents from \"./runtime/events.js\";\nimport sendMuiXTelemetryEventOriginal from \"./runtime/sender.js\";\nimport muiXTelemetrySettingsOriginal from \"./runtime/settings.js\";\nconst noop = () => {};\n\n// To cut unused imports in production as early as possible\nconst sendMuiXTelemetryEvent = process.env.NODE_ENV === 'production' ? noop : sendMuiXTelemetryEventOriginal;\n\n// To cut unused imports in production as early as possible\nconst muiXTelemetrySettings = process.env.NODE_ENV === 'production' ? {\n enableDebug: noop,\n enableTelemetry: noop,\n disableTelemetry: noop\n} : muiXTelemetrySettingsOriginal;\nexport { muiXTelemetryEvents, sendMuiXTelemetryEvent, muiXTelemetrySettings };","const noop = () => null;\nconst muiXTelemetryEvents = {\n licenseVerification: process.env.NODE_ENV === 'production' ? noop : (context, payload) => ({\n eventName: 'licenseVerification',\n payload,\n context\n })\n};\nexport default muiXTelemetryEvents;","/* eslint-disable */\nconst _keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nfunction utf8Encode(str) {\n for (let n = 0; n < str.length; n++) {\n const c = str.charCodeAt(n);\n if (c >= 128) {\n throw new Error('ASCII only support');\n }\n }\n return str;\n}\nexport const base64Decode = input => {\n let output = '';\n let chr1, chr2, chr3;\n let enc1, enc2, enc3, enc4;\n let i = 0;\n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, '');\n while (i < input.length) {\n enc1 = _keyStr.indexOf(input.charAt(i++));\n enc2 = _keyStr.indexOf(input.charAt(i++));\n enc3 = _keyStr.indexOf(input.charAt(i++));\n enc4 = _keyStr.indexOf(input.charAt(i++));\n chr1 = enc1 << 2 | enc2 >> 4;\n chr2 = (enc2 & 15) << 4 | enc3 >> 2;\n chr3 = (enc3 & 3) << 6 | enc4;\n output = output + String.fromCharCode(chr1);\n if (enc3 != 64) {\n output = output + String.fromCharCode(chr2);\n }\n if (enc4 != 64) {\n output = output + String.fromCharCode(chr3);\n }\n }\n return output;\n};\nexport const base64Encode = input => {\n let output = '';\n let chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n let i = 0;\n input = utf8Encode(input);\n while (i < input.length) {\n chr1 = input.charCodeAt(i++);\n chr2 = input.charCodeAt(i++);\n chr3 = input.charCodeAt(i++);\n enc1 = chr1 >> 2;\n enc2 = (chr1 & 3) << 4 | chr2 >> 4;\n enc3 = (chr2 & 15) << 2 | chr3 >> 6;\n enc4 = chr3 & 63;\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n output = output + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4);\n }\n return output;\n};","/* eslint-disable */\n// See \"precomputation\" in notes\nconst k = [];\nlet i = 0;\nfor (; i < 64;) {\n k[i] = 0 | Math.sin(++i % Math.PI) * 4294967296;\n // k[i] = 0 | (Math.abs(Math.sin(++i)) * 4294967296);\n}\nexport function md5(s) {\n const words = [];\n let b,\n c,\n d,\n j = unescape(encodeURI(s)) + '\\x80',\n a = j.length;\n const h = [b = 0x67452301, c = 0xefcdab89, ~b, ~c];\n s = --a / 4 + 2 | 15;\n\n // See \"Length bits\" in notes\n words[--s] = a * 8;\n for (; ~a;) {\n // a !== -1\n words[a >> 2] |= j.charCodeAt(a) << 8 * a--;\n }\n for (i = j = 0; i < s; i += 16) {\n a = h;\n for (; j < 64; a = [d = a[3], b + ((d = a[0] + [b & c | ~b & d, d & b | ~d & c, b ^ c ^ d, c ^ (b | ~d)][a = j >> 4] + k[j] + ~~words[i | [j, 5 * j + 1, 3 * j + 5, 7 * j][a] & 15]) << (a = [7, 12, 17, 22, 5, 9, 14, 20, 4, 11, 16, 23, 6, 10, 15, 21][4 * a + j++ % 4]) | d >>> -a), b, c]) {\n b = a[1] | 0;\n c = a[2];\n }\n\n // See \"Integer safety\" in notes\n for (j = 4; j;) h[--j] += a[j];\n\n // j === 0\n }\n for (s = ''; j < 32;) {\n s += (h[j >> 3] >> (1 ^ j++) * 4 & 15).toString(16);\n // s += ((h[j >> 3] >> (4 ^ 4 * j++)) & 15).toString(16);\n }\n return s;\n}","// eslint-disable-next-line @typescript-eslint/naming-convention\nexport let LICENSE_STATUS = /*#__PURE__*/function (LICENSE_STATUS) {\n LICENSE_STATUS[\"NotFound\"] = \"NotFound\";\n LICENSE_STATUS[\"Invalid\"] = \"Invalid\";\n LICENSE_STATUS[\"ExpiredAnnual\"] = \"ExpiredAnnual\";\n LICENSE_STATUS[\"ExpiredAnnualGrace\"] = \"ExpiredAnnualGrace\";\n LICENSE_STATUS[\"ExpiredVersion\"] = \"ExpiredVersion\";\n LICENSE_STATUS[\"Valid\"] = \"Valid\";\n LICENSE_STATUS[\"OutOfScope\"] = \"OutOfScope\";\n LICENSE_STATUS[\"NotAvailableInInitialProPlan\"] = \"NotAvailableInInitialProPlan\";\n return LICENSE_STATUS;\n}({});","export const PLAN_SCOPES = ['pro', 'premium'];\nexport const PLAN_VERSIONS = ['initial', 'Q3-2024'];","export const LICENSE_MODELS = [\n/**\n * A license is outdated if the current version of the software was released after the expiry date of the license.\n * But the license can be used indefinitely with an older version of the software.\n */\n'perpetual',\n/**\n * On development, a license is outdated if the expiry date has been reached\n * On production, a license is outdated if the current version of the software was released after the expiry date of the license (see \"perpetual\")\n */\n'annual',\n/**\n * Legacy. The previous name for 'annual'.\n * Can be removed once old license keys generated with 'subscription' are no longer supported.\n * To support for a while. We need more years of backward support and we sell multi year licenses.\n */\n'subscription'];","import { base64Decode, base64Encode } from \"../encoding/base64.js\";\nimport { md5 } from \"../encoding/md5.js\";\nimport { LICENSE_STATUS } from \"../utils/licenseStatus.js\";\nimport { PLAN_SCOPES } from \"../utils/plan.js\";\nimport { LICENSE_MODELS } from \"../utils/licenseModel.js\";\nconst getDefaultReleaseDate = () => {\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n return today;\n};\nexport function generateReleaseInfo(releaseDate = getDefaultReleaseDate()) {\n return base64Encode(releaseDate.getTime().toString());\n}\nfunction isPlanScopeSufficient(packageName, planScope) {\n let acceptedScopes;\n if (packageName.includes('-pro')) {\n acceptedScopes = ['pro', 'premium'];\n } else if (packageName.includes('-premium')) {\n acceptedScopes = ['premium'];\n } else {\n acceptedScopes = [];\n }\n return acceptedScopes.includes(planScope);\n}\nconst expiryReg = /^.*EXPIRY=([0-9]+),.*$/;\nconst orderReg = /^.*ORDER:([0-9]+),.*$/;\nconst PRO_PACKAGES_AVAILABLE_IN_INITIAL_PRO_PLAN = ['x-data-grid-pro', 'x-date-pickers-pro'];\n\n/**\n * Format: ORDER:${orderNumber},EXPIRY=${expiryTimestamp},KEYVERSION=1\n */\nfunction decodeLicenseVersion1(license) {\n let expiryTimestamp;\n let orderId;\n try {\n expiryTimestamp = parseInt(license.match(expiryReg)[1], 10);\n if (!expiryTimestamp || Number.isNaN(expiryTimestamp)) {\n expiryTimestamp = null;\n }\n orderId = parseInt(license.match(orderReg)[1], 10);\n if (!orderId || Number.isNaN(orderId)) {\n orderId = null;\n }\n } catch (err) {\n expiryTimestamp = null;\n orderId = null;\n }\n return {\n version: 1,\n licenseModel: 'perpetual',\n planScope: 'pro',\n planVersion: 'initial',\n expiryTimestamp,\n expiryDate: expiryTimestamp ? new Date(expiryTimestamp) : null,\n orderId\n };\n}\n\n/**\n * Format: O=${orderNumber},E=${expiryTimestamp},S=${planScope},LM=${licenseModel},PV=${planVersion},KV=2`;\n */\nfunction decodeLicenseVersion2(license) {\n const licenseInfo = {\n version: 2,\n licenseModel: null,\n planScope: null,\n planVersion: 'initial',\n expiryTimestamp: null,\n expiryDate: null,\n orderId: null\n };\n license.split(',').map(token => token.split('=')).filter(el => el.length === 2).forEach(([key, value]) => {\n if (key === 'S') {\n licenseInfo.planScope = value;\n }\n if (key === 'LM') {\n licenseInfo.licenseModel = value;\n }\n if (key === 'E') {\n const expiryTimestamp = parseInt(value, 10);\n if (expiryTimestamp && !Number.isNaN(expiryTimestamp)) {\n licenseInfo.expiryTimestamp = expiryTimestamp;\n licenseInfo.expiryDate = new Date(expiryTimestamp);\n }\n }\n if (key === 'PV') {\n licenseInfo.planVersion = value;\n }\n if (key === 'O') {\n const orderNum = parseInt(value, 10);\n if (orderNum && !Number.isNaN(orderNum)) {\n licenseInfo.orderId = orderNum;\n }\n }\n });\n return licenseInfo;\n}\n\n/**\n * Decode the license based on its key version and return a version-agnostic `MuiLicense` object.\n */\nfunction decodeLicense(encodedLicense) {\n const license = base64Decode(encodedLicense);\n if (license.includes('KEYVERSION=1')) {\n return decodeLicenseVersion1(license);\n }\n if (license.includes('KV=2')) {\n return decodeLicenseVersion2(license);\n }\n return null;\n}\nexport function verifyLicense({\n releaseInfo,\n licenseKey,\n packageName\n}) {\n // Gets replaced at build time\n // @ts-ignore\n if (false) {\n return {\n status: LICENSE_STATUS.Valid\n };\n }\n if (!releaseInfo) {\n throw new Error('MUI X: The release information is missing. Not able to validate license.');\n }\n if (!licenseKey) {\n return {\n status: LICENSE_STATUS.NotFound\n };\n }\n const hash = licenseKey.substr(0, 32);\n const encoded = licenseKey.substr(32);\n if (hash !== md5(encoded)) {\n return {\n status: LICENSE_STATUS.Invalid\n };\n }\n const license = decodeLicense(encoded);\n if (license == null) {\n console.error('MUI X: Error checking license. Key version not found!');\n return {\n status: LICENSE_STATUS.Invalid\n };\n }\n if (license.licenseModel == null || !LICENSE_MODELS.includes(license.licenseModel)) {\n console.error('MUI X: Error checking license. License model not found or invalid!');\n return {\n status: LICENSE_STATUS.Invalid\n };\n }\n if (license.expiryTimestamp == null) {\n console.error('MUI X: Error checking license. Expiry timestamp not found or invalid!');\n return {\n status: LICENSE_STATUS.Invalid\n };\n }\n if (license.licenseModel === 'perpetual' || process.env.NODE_ENV === 'production') {\n const pkgTimestamp = parseInt(base64Decode(releaseInfo), 10);\n if (Number.isNaN(pkgTimestamp)) {\n throw new Error('MUI X: The release information is invalid. Not able to validate license.');\n }\n if (license.expiryTimestamp < pkgTimestamp) {\n return {\n status: LICENSE_STATUS.ExpiredVersion\n };\n }\n } else if (license.licenseModel === 'subscription' || license.licenseModel === 'annual') {\n if (new Date().getTime() > license.expiryTimestamp) {\n if (\n // 30 days grace\n new Date().getTime() < license.expiryTimestamp + 1000 * 3600 * 24 * 30 || process.env.NODE_ENV !== 'development') {\n return {\n status: LICENSE_STATUS.ExpiredAnnualGrace,\n meta: {\n expiryTimestamp: license.expiryTimestamp,\n licenseKey\n }\n };\n }\n return {\n status: LICENSE_STATUS.ExpiredAnnual,\n meta: {\n expiryTimestamp: license.expiryTimestamp,\n licenseKey\n }\n };\n }\n }\n if (license.planScope == null || !PLAN_SCOPES.includes(license.planScope)) {\n console.error('MUI X: Error checking license. planScope not found or invalid!');\n return {\n status: LICENSE_STATUS.Invalid\n };\n }\n if (!isPlanScopeSufficient(packageName, license.planScope)) {\n return {\n status: LICENSE_STATUS.OutOfScope\n };\n }\n\n // 'charts-pro' or 'tree-view-pro' can only be used with a newer Pro license\n if (license.planVersion === 'initial' && license.planScope === 'pro' && !PRO_PACKAGES_AVAILABLE_IN_INITIAL_PRO_PLAN.includes(packageName)) {\n return {\n status: LICENSE_STATUS.NotAvailableInInitialProPlan\n };\n }\n return {\n status: LICENSE_STATUS.Valid\n };\n}","/**\n * @ignore - do not document.\n */\n\n// Store the license information in a global, so it can be shared\n// when module duplication occurs. The duplication of the modules can happen\n// if using multiple version of MUI X at the same time of the bundler\n// decide to duplicate to improve the size of the chunks.\n// eslint-disable-next-line no-underscore-dangle\nglobalThis.__MUI_LICENSE_INFO__ = globalThis.__MUI_LICENSE_INFO__ || {\n key: undefined\n};\nexport class LicenseInfo {\n static getLicenseInfo() {\n // eslint-disable-next-line no-underscore-dangle\n return globalThis.__MUI_LICENSE_INFO__;\n }\n static getLicenseKey() {\n return LicenseInfo.getLicenseInfo().key;\n }\n static setLicenseKey(key) {\n const licenseInfo = LicenseInfo.getLicenseInfo();\n licenseInfo.key = key;\n }\n}","/**\n * Workaround for the codesadbox preview error.\n *\n * Once these issues are resolved\n * https://github.com/mui/mui-x/issues/15765\n * https://github.com/codesandbox/codesandbox-client/issues/8673\n *\n * `showError` can simply use `console.error` again.\n */\nconst isCodeSandbox = typeof window !== 'undefined' && window.location.hostname.endsWith('.csb.app');\nfunction showError(message) {\n // eslint-disable-next-line no-console\n const logger = isCodeSandbox ? console.log : console.error;\n logger(['*************************************************************', '', ...message, '', '*************************************************************'].join('\\n'));\n}\nexport function showInvalidLicenseKeyError() {\n showError(['MUI X: Invalid license key.', '', \"Your MUI X license key format isn't valid. It could be because the license key is missing a character or has a typo.\", '', 'To solve the issue, you need to double check that `setLicenseKey()` is called with the right argument', 'Please check the license key installation https://mui.com/r/x-license-key-installation.']);\n}\nexport function showLicenseKeyPlanMismatchError({\n packageName\n}) {\n const rootPackageName = packageName.replace(/-(premium|pro)$/, '');\n showError(['MUI X: License key plan mismatch.', '', 'Your use of MUI X is not compatible with the plan of your license key. The feature you are trying to use is not included in the plan of your license key. This happens if you try to use Data Grid Premium with a license key for the Pro plan.', '', 'To solve the issue, you can upgrade your plan from Pro to Premium at https://mui.com/r/x-get-license?scope=premium.', `Or if you didn't intend to use Premium features, you can replace the import of \\`${rootPackageName}-premium\\` with \\`${rootPackageName}-pro\\`.`]);\n}\nexport function showNotAvailableInInitialProPlanError() {\n showError(['MUI X: Component not included in your license.', '', 'The component you are trying to use is not included in the Pro Plan you purchased.', '', 'Your license is from an old version of the Pro Plan that is only compatible with the `@mui/x-data-grid-pro` and `@mui/x-date-pickers-pro` commercial packages.', '', 'To start using another Pro package, please consider reaching to our sales team to upgrade your license or visit https://mui.com/r/x-get-license to get a new license key.']);\n}\nexport function showMissingLicenseKeyError({\n plan,\n packageName\n}) {\n showError(['MUI X: Missing license key.', '', `The license key is missing. You might not be allowed to use \\`${packageName}\\` which is part of MUI X ${plan}.`, '', 'To solve the issue, you can check the free trial conditions: https://mui.com/r/x-license-trial.', 'If you are eligible no actions are required. If you are not eligible to the free trial, you need to purchase a license https://mui.com/r/x-get-license or stop using the software immediately.']);\n}\nexport function showExpiredPackageVersionError({\n packageName\n}) {\n showError(['MUI X: Expired package version.', '', `You have installed a version of \\`${packageName}\\` that is outside of the maintenance plan of your license key. By default, commercial licenses provide access to new versions released during the first year after the purchase.`, '', 'To solve the issue, you can renew your license https://mui.com/r/x-get-license or install an older version of the npm package that is compatible with your license key.']);\n}\nexport function showExpiredAnnualGraceLicenseKeyError({\n plan,\n licenseKey,\n expiryTimestamp\n}) {\n showError(['MUI X: Expired license key.', '', `Your annual license key to use MUI X ${plan} in non-production environments has expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${plan} component (more details in https://mui.com/r/x-license-annual).`, '', 'To solve the problem you can either:', '', '- Renew your license https://mui.com/r/x-get-license and use the new key', `- Stop making changes to code depending directly or indirectly on MUI X ${plan}'s APIs`, '', 'Note that your license is perpetual in production environments with any version released before your license term ends.', '', `- License key expiry timestamp: ${new Date(expiryTimestamp)}`, `- Installed license key: ${licenseKey}`, '']);\n}\nexport function showExpiredAnnualLicenseKeyError({\n plan,\n licenseKey,\n expiryTimestamp\n}) {\n throw new Error(['MUI X: Expired license key.', '', `Your annual license key to use MUI X ${plan} in non-production environments has expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${plan} component (more details in https://mui.com/r/x-license-annual).`, '', 'To solve the problem you can either:', '', '- Renew your license https://mui.com/r/x-get-license and use the new key', `- Stop making changes to code depending directly or indirectly on MUI X ${plan}'s APIs`, '', 'Note that your license is perpetual in production environments with any version released before your license term ends.', '', `- License key expiry timestamp: ${new Date(expiryTimestamp)}`, `- Installed license key: ${licenseKey}`, ''].join('\\n'));\n}","'use client';\n\nimport * as React from 'react';\nconst MuiLicenseInfoContext = /*#__PURE__*/React.createContext({\n key: undefined\n});\nif (process.env.NODE_ENV !== \"production\") MuiLicenseInfoContext.displayName = \"MuiLicenseInfoContext\";\nexport default MuiLicenseInfoContext;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { sendMuiXTelemetryEvent, muiXTelemetryEvents } from '@mui/x-telemetry';\nimport { verifyLicense } from \"../verifyLicense/verifyLicense.js\";\nimport { LicenseInfo } from \"../utils/licenseInfo.js\";\nimport { showExpiredAnnualGraceLicenseKeyError, showExpiredAnnualLicenseKeyError, showInvalidLicenseKeyError, showMissingLicenseKeyError, showLicenseKeyPlanMismatchError, showExpiredPackageVersionError, showNotAvailableInInitialProPlanError } from \"../utils/licenseErrorMessageUtils.js\";\nimport { LICENSE_STATUS } from \"../utils/licenseStatus.js\";\nimport MuiLicenseInfoContext from \"../Unstable_LicenseInfoProvider/MuiLicenseInfoContext.js\";\nexport const sharedLicenseStatuses = {};\n\n/**\n * Clears the license status cache for all packages.\n * This should not be used in production code, but can be useful for testing purposes.\n */\nexport function clearLicenseStatusCache() {\n for (const packageName in sharedLicenseStatuses) {\n if (Object.prototype.hasOwnProperty.call(sharedLicenseStatuses, packageName)) {\n delete sharedLicenseStatuses[packageName];\n }\n }\n}\nexport function useLicenseVerifier(packageName, releaseInfo) {\n const {\n key: contextKey\n } = React.useContext(MuiLicenseInfoContext);\n return React.useMemo(() => {\n const licenseKey = contextKey ?? LicenseInfo.getLicenseKey();\n\n // Cache the response to not trigger the error twice.\n if (sharedLicenseStatuses[packageName] && sharedLicenseStatuses[packageName].key === licenseKey) {\n return sharedLicenseStatuses[packageName].licenseVerifier;\n }\n const plan = packageName.includes('premium') ? 'Premium' : 'Pro';\n const licenseStatus = verifyLicense({\n releaseInfo,\n licenseKey,\n packageName\n });\n const fullPackageName = `@mui/${packageName}`;\n sendMuiXTelemetryEvent(muiXTelemetryEvents.licenseVerification({\n licenseKey\n }, {\n packageName,\n packageReleaseInfo: releaseInfo,\n licenseStatus: licenseStatus?.status\n }));\n if (licenseStatus.status === LICENSE_STATUS.Valid) {\n // Skip\n } else if (licenseStatus.status === LICENSE_STATUS.Invalid) {\n showInvalidLicenseKeyError();\n } else if (licenseStatus.status === LICENSE_STATUS.NotAvailableInInitialProPlan) {\n showNotAvailableInInitialProPlanError();\n } else if (licenseStatus.status === LICENSE_STATUS.OutOfScope) {\n showLicenseKeyPlanMismatchError({\n packageName: fullPackageName\n });\n } else if (licenseStatus.status === LICENSE_STATUS.NotFound) {\n showMissingLicenseKeyError({\n plan,\n packageName: fullPackageName\n });\n } else if (licenseStatus.status === LICENSE_STATUS.ExpiredAnnualGrace) {\n showExpiredAnnualGraceLicenseKeyError(_extends({\n plan\n }, licenseStatus.meta));\n } else if (licenseStatus.status === LICENSE_STATUS.ExpiredAnnual) {\n showExpiredAnnualLicenseKeyError(_extends({\n plan\n }, licenseStatus.meta));\n } else if (licenseStatus.status === LICENSE_STATUS.ExpiredVersion) {\n showExpiredPackageVersionError({\n packageName: fullPackageName\n });\n } else if (process.env.NODE_ENV !== 'production') {\n throw new Error('missing status handler');\n }\n sharedLicenseStatuses[packageName] = {\n key: licenseKey,\n licenseVerifier: licenseStatus\n };\n return licenseStatus;\n }, [packageName, releaseInfo, contextKey]);\n}","import { fastMemo } from '@mui/x-internals/fastMemo';\nimport { useLicenseVerifier } from \"../useLicenseVerifier/index.js\";\nimport { LICENSE_STATUS } from \"../utils/licenseStatus.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getLicenseErrorMessage(licenseStatus) {\n switch (licenseStatus) {\n case LICENSE_STATUS.ExpiredAnnualGrace:\n case LICENSE_STATUS.ExpiredAnnual:\n return 'MUI X Expired license key';\n case LICENSE_STATUS.ExpiredVersion:\n return 'MUI X Expired package version';\n case LICENSE_STATUS.Invalid:\n return 'MUI X Invalid license key';\n case LICENSE_STATUS.OutOfScope:\n return 'MUI X License key plan mismatch';\n case LICENSE_STATUS.NotAvailableInInitialProPlan:\n return 'MUI X Product not covered by plan';\n case LICENSE_STATUS.NotFound:\n return 'MUI X Missing license key';\n default:\n throw new Error('Unhandled MUI X license status.');\n }\n}\nfunction Watermark(props) {\n const {\n packageName,\n releaseInfo\n } = props;\n const licenseStatus = useLicenseVerifier(packageName, releaseInfo);\n if (licenseStatus.status === LICENSE_STATUS.Valid) {\n return null;\n }\n return /*#__PURE__*/_jsx(\"div\", {\n style: {\n position: 'absolute',\n pointerEvents: 'none',\n color: '#8282829e',\n zIndex: 100000,\n width: '100%',\n textAlign: 'center',\n bottom: '50%',\n right: 0,\n letterSpacing: 5,\n fontSize: 24\n },\n children: getLicenseErrorMessage(licenseStatus.status)\n });\n}\nconst MemoizedWatermark = fastMemo(Watermark);\nexport { MemoizedWatermark as Watermark };","import * as React from 'react';\nimport { fastObjectShallowCompare } from \"../fastObjectShallowCompare/index.js\";\nexport function fastMemo(component) {\n return /*#__PURE__*/React.memo(component, fastObjectShallowCompare);\n}","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why\nconst safeReact = {\n ...React\n};\nconst maybeReactUseId = safeReact.useId;\n\n/**\n *\n * @example
\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n // React.useId() is only available from React 17.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? reactId;\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","import * as React from 'react';\nexport default parseInt(React.version, 10);","import * as React from 'react';\n/* We need to import the shim because React 17 does not support the `useSyncExternalStore` API.\n * More info: https://github.com/mui/mui-x/issues/18303#issuecomment-2958392341 */\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\nimport { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector';\nimport reactMajor from \"../reactMajor/index.js\";\n/* Some tests fail in R18 with the raw useSyncExternalStore. It may be possible to make it work\n * but for now we only enable it for R19+. */\nconst canUseRawUseSyncExternalStore = reactMajor >= 19;\nconst useStoreImplementation = canUseRawUseSyncExternalStore ? useStoreR19 : useStoreLegacy;\nexport function useStore(store, selector, a1, a2, a3) {\n return useStoreImplementation(store, selector, a1, a2, a3);\n}\nfunction useStoreR19(store, selector, a1, a2, a3) {\n const getSelection = React.useCallback(() => selector(store.getSnapshot(), a1, a2, a3), [store, selector, a1, a2, a3]);\n return useSyncExternalStore(store.subscribe, getSelection, getSelection);\n}\nfunction useStoreLegacy(store, selector, a1, a2, a3) {\n return useSyncExternalStoreWithSelector(store.subscribe, store.getSnapshot, store.getSnapshot, state => selector(state, a1, a2, a3));\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { useStore } from \"./useStore.js\";\n/* eslint-disable no-cond-assign */\n\nexport class Store {\n // HACK: `any` fixes adding listeners that accept partial state.\n\n // Internal state to handle recursive `setState()` calls\n\n static create(state) {\n return new Store(state);\n }\n constructor(state) {\n this.state = state;\n this.listeners = new Set();\n this.updateTick = 0;\n }\n subscribe = fn => {\n this.listeners.add(fn);\n return () => {\n this.listeners.delete(fn);\n };\n };\n\n /**\n * Returns the current state snapshot. Meant for usage with `useSyncExternalStore`.\n * If you want to access the state, use the `state` property instead.\n */\n getSnapshot = () => {\n return this.state;\n };\n setState(newState) {\n this.state = newState;\n this.updateTick += 1;\n const currentTick = this.updateTick;\n const it = this.listeners.values();\n let result;\n while (result = it.next(), !result.done) {\n if (currentTick !== this.updateTick) {\n // If the tick has changed, a recursive `setState` call has been made,\n // and it has already notified all listeners.\n return;\n }\n const listener = result.value;\n listener(newState);\n }\n }\n update(changes) {\n for (const key in changes) {\n if (!Object.is(this.state[key], changes[key])) {\n this.setState(_extends({}, this.state, changes));\n return;\n }\n }\n }\n set(key, value) {\n if (!Object.is(this.state[key], value)) {\n this.setState(_extends({}, this.state, {\n [key]: value\n }));\n }\n }\n use = (() => (selector, a1, a2, a3) => {\n return useStore(this, selector, a1, a2, a3);\n })();\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nexport const useChartAnimation = ({\n params,\n store\n}) => {\n React.useEffect(() => {\n store.set('animation', _extends({}, store.state.animation, {\n skip: params.skipAnimation\n }));\n }, [store, params.skipAnimation]);\n const disableAnimation = React.useCallback(() => {\n let disableCalled = false;\n store.set('animation', _extends({}, store.state.animation, {\n skipAnimationRequests: store.state.animation.skipAnimationRequests + 1\n }));\n return () => {\n if (disableCalled) {\n return;\n }\n disableCalled = true;\n store.set('animation', _extends({}, store.state.animation, {\n skipAnimationRequests: store.state.animation.skipAnimationRequests - 1\n }));\n };\n }, [store]);\n useEnhancedEffect(() => {\n // Skip animation test/jsdom\n const isAnimationDisabledEnvironment = typeof window === 'undefined' || !window?.matchMedia;\n if (isAnimationDisabledEnvironment) {\n return undefined;\n }\n let disableAnimationCleanup;\n const handleMediaChange = event => {\n if (event.matches) {\n disableAnimationCleanup = disableAnimation();\n } else {\n disableAnimationCleanup?.();\n }\n };\n const mql = window.matchMedia('(prefers-reduced-motion)');\n handleMediaChange(mql);\n mql.addEventListener('change', handleMediaChange);\n return () => {\n mql.removeEventListener('change', handleMediaChange);\n };\n }, [disableAnimation, store]);\n return {\n instance: {\n disableAnimation\n }\n };\n};\nuseChartAnimation.params = {\n skipAnimation: true\n};\nuseChartAnimation.getDefaultizedParams = ({\n params\n}) => _extends({}, params, {\n skipAnimation: params.skipAnimation ?? false\n});\nuseChartAnimation.getInitialState = ({\n skipAnimation\n}) => {\n const isAnimationDisabledEnvironment = typeof window === 'undefined' || !window?.matchMedia;\n\n // We use the value of `isAnimationDisabledEnvironment` as the initial value of `skipAnimation` to avoid\n // re-rendering the component on environments where matchMedia is not supported, hence skipAnimation will always be true.\n const disableAnimations = process.env.NODE_ENV === 'test' ? isAnimationDisabledEnvironment : false;\n return {\n animation: {\n skip: skipAnimation,\n // By initializing the skipAnimationRequests to 1, we ensure that the animation is always skipped\n skipAnimationRequests: disableAnimations ? 1 : 0\n }\n };\n};","'use client';\n\nimport * as React from 'react';\n\n/**\n * Run an effect only after the first render.\n *\n * @param effect The effect to run after the first render\n * @param deps The dependencies for the effect\n */\nexport function useEffectAfterFirstRender(effect, deps) {\n const isFirstRender = React.useRef(true);\n React.useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return undefined;\n }\n return effect();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n}","export const DEFAULT_X_AXIS_KEY = 'DEFAULT_X_AXIS_KEY';\nexport const DEFAULT_Y_AXIS_KEY = 'DEFAULT_Y_AXIS_KEY';\nexport const DEFAULT_ROTATION_AXIS_KEY = 'DEFAULT_ROTATION_AXIS_KEY';\nexport const DEFAULT_RADIUS_AXIS_KEY = 'DEFAULT_RADIUS_AXIS_KEY';\nexport const DEFAULT_MARGINS = {\n top: 20,\n bottom: 20,\n left: 20,\n right: 20\n};\nexport const DEFAULT_AXIS_SIZE_WIDTH = 45;\nexport const DEFAULT_AXIS_SIZE_HEIGHT = 25;\n\n// How many pixels to add to the default axis size if that axis has a label\nexport const AXIS_LABEL_DEFAULT_HEIGHT = 20;","// src/devModeChecks/identityFunctionCheck.ts\nvar runIdentityFunctionCheck = (resultFunc, inputSelectorsResults, outputSelectorResult) => {\n if (inputSelectorsResults.length === 1 && inputSelectorsResults[0] === outputSelectorResult) {\n let isInputSameAsOutput = false;\n try {\n const emptyObject = {};\n if (resultFunc(emptyObject) === emptyObject)\n isInputSameAsOutput = true;\n } catch {\n }\n if (isInputSameAsOutput) {\n let stack = void 0;\n try {\n throw new Error();\n } catch (e) {\n ;\n ({ stack } = e);\n }\n console.warn(\n \"The result function returned its own inputs without modification. e.g\\n`createSelector([state => state.todos], todos => todos)`\\nThis could lead to inefficient memoization and unnecessary re-renders.\\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.\",\n { stack }\n );\n }\n }\n};\n\n// src/devModeChecks/inputStabilityCheck.ts\nvar runInputStabilityCheck = (inputSelectorResultsObject, options, inputSelectorArgs) => {\n const { memoize, memoizeOptions } = options;\n const { inputSelectorResults, inputSelectorResultsCopy } = inputSelectorResultsObject;\n const createAnEmptyObject = memoize(() => ({}), ...memoizeOptions);\n const areInputSelectorResultsEqual = createAnEmptyObject.apply(null, inputSelectorResults) === createAnEmptyObject.apply(null, inputSelectorResultsCopy);\n if (!areInputSelectorResultsEqual) {\n let stack = void 0;\n try {\n throw new Error();\n } catch (e) {\n ;\n ({ stack } = e);\n }\n console.warn(\n \"An input selector returned a different result when passed same arguments.\\nThis means your output selector will likely run more frequently than intended.\\nAvoid returning a new reference inside your input selector, e.g.\\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`\",\n {\n arguments: inputSelectorArgs,\n firstInputs: inputSelectorResults,\n secondInputs: inputSelectorResultsCopy,\n stack\n }\n );\n }\n};\n\n// src/devModeChecks/setGlobalDevModeChecks.ts\nvar globalDevModeChecks = {\n inputStabilityCheck: \"once\",\n identityFunctionCheck: \"once\"\n};\nvar setGlobalDevModeChecks = (devModeChecks) => {\n Object.assign(globalDevModeChecks, devModeChecks);\n};\n\n// src/utils.ts\nvar NOT_FOUND = /* @__PURE__ */ Symbol(\"NOT_FOUND\");\nfunction assertIsFunction(func, errorMessage = `expected a function, instead received ${typeof func}`) {\n if (typeof func !== \"function\") {\n throw new TypeError(errorMessage);\n }\n}\nfunction assertIsObject(object, errorMessage = `expected an object, instead received ${typeof object}`) {\n if (typeof object !== \"object\") {\n throw new TypeError(errorMessage);\n }\n}\nfunction assertIsArrayOfFunctions(array, errorMessage = `expected all items to be functions, instead received the following types: `) {\n if (!array.every((item) => typeof item === \"function\")) {\n const itemTypes = array.map(\n (item) => typeof item === \"function\" ? `function ${item.name || \"unnamed\"}()` : typeof item\n ).join(\", \");\n throw new TypeError(`${errorMessage}[${itemTypes}]`);\n }\n}\nvar ensureIsArray = (item) => {\n return Array.isArray(item) ? item : [item];\n};\nfunction getDependencies(createSelectorArgs) {\n const dependencies = Array.isArray(createSelectorArgs[0]) ? createSelectorArgs[0] : createSelectorArgs;\n assertIsArrayOfFunctions(\n dependencies,\n `createSelector expects all input-selectors to be functions, but received the following types: `\n );\n return dependencies;\n}\nfunction collectInputSelectorResults(dependencies, inputSelectorArgs) {\n const inputSelectorResults = [];\n const { length } = dependencies;\n for (let i = 0; i < length; i++) {\n inputSelectorResults.push(dependencies[i].apply(null, inputSelectorArgs));\n }\n return inputSelectorResults;\n}\nvar getDevModeChecksExecutionInfo = (firstRun, devModeChecks) => {\n const { identityFunctionCheck, inputStabilityCheck } = {\n ...globalDevModeChecks,\n ...devModeChecks\n };\n return {\n identityFunctionCheck: {\n shouldRun: identityFunctionCheck === \"always\" || identityFunctionCheck === \"once\" && firstRun,\n run: runIdentityFunctionCheck\n },\n inputStabilityCheck: {\n shouldRun: inputStabilityCheck === \"always\" || inputStabilityCheck === \"once\" && firstRun,\n run: runInputStabilityCheck\n }\n };\n};\n\n// src/autotrackMemoize/autotracking.ts\nvar $REVISION = 0;\nvar CURRENT_TRACKER = null;\nvar Cell = class {\n revision = $REVISION;\n _value;\n _lastValue;\n _isEqual = tripleEq;\n constructor(initialValue, isEqual = tripleEq) {\n this._value = this._lastValue = initialValue;\n this._isEqual = isEqual;\n }\n // Whenever a storage value is read, it'll add itself to the current tracker if\n // one exists, entangling its state with that cache.\n get value() {\n CURRENT_TRACKER?.add(this);\n return this._value;\n }\n // Whenever a storage value is updated, we bump the global revision clock,\n // assign the revision for this storage to the new value, _and_ we schedule a\n // rerender. This is important, and it's what makes autotracking _pull_\n // based. We don't actively tell the caches which depend on the storage that\n // anything has happened. Instead, we recompute the caches when needed.\n set value(newValue) {\n if (this.value === newValue)\n return;\n this._value = newValue;\n this.revision = ++$REVISION;\n }\n};\nfunction tripleEq(a, b) {\n return a === b;\n}\nvar TrackingCache = class {\n _cachedValue;\n _cachedRevision = -1;\n _deps = [];\n hits = 0;\n fn;\n constructor(fn) {\n this.fn = fn;\n }\n clear() {\n this._cachedValue = void 0;\n this._cachedRevision = -1;\n this._deps = [];\n this.hits = 0;\n }\n get value() {\n if (this.revision > this._cachedRevision) {\n const { fn } = this;\n const currentTracker = /* @__PURE__ */ new Set();\n const prevTracker = CURRENT_TRACKER;\n CURRENT_TRACKER = currentTracker;\n this._cachedValue = fn();\n CURRENT_TRACKER = prevTracker;\n this.hits++;\n this._deps = Array.from(currentTracker);\n this._cachedRevision = this.revision;\n }\n CURRENT_TRACKER?.add(this);\n return this._cachedValue;\n }\n get revision() {\n return Math.max(...this._deps.map((d) => d.revision), 0);\n }\n};\nfunction getValue(cell) {\n if (!(cell instanceof Cell)) {\n console.warn(\"Not a valid cell! \", cell);\n }\n return cell.value;\n}\nfunction setValue(storage, value) {\n if (!(storage instanceof Cell)) {\n throw new TypeError(\n \"setValue must be passed a tracked store created with `createStorage`.\"\n );\n }\n storage.value = storage._lastValue = value;\n}\nfunction createCell(initialValue, isEqual = tripleEq) {\n return new Cell(initialValue, isEqual);\n}\nfunction createCache(fn) {\n assertIsFunction(\n fn,\n \"the first parameter to `createCache` must be a function\"\n );\n return new TrackingCache(fn);\n}\n\n// src/autotrackMemoize/tracking.ts\nvar neverEq = (a, b) => false;\nfunction createTag() {\n return createCell(null, neverEq);\n}\nfunction dirtyTag(tag, value) {\n setValue(tag, value);\n}\nvar consumeCollection = (node) => {\n let tag = node.collectionTag;\n if (tag === null) {\n tag = node.collectionTag = createTag();\n }\n getValue(tag);\n};\nvar dirtyCollection = (node) => {\n const tag = node.collectionTag;\n if (tag !== null) {\n dirtyTag(tag, null);\n }\n};\n\n// src/autotrackMemoize/proxy.ts\nvar REDUX_PROXY_LABEL = Symbol();\nvar nextId = 0;\nvar proto = Object.getPrototypeOf({});\nvar ObjectTreeNode = class {\n constructor(value) {\n this.value = value;\n this.value = value;\n this.tag.value = value;\n }\n proxy = new Proxy(this, objectProxyHandler);\n tag = createTag();\n tags = {};\n children = {};\n collectionTag = null;\n id = nextId++;\n};\nvar objectProxyHandler = {\n get(node, key) {\n function calculateResult() {\n const { value } = node;\n const childValue = Reflect.get(value, key);\n if (typeof key === \"symbol\") {\n return childValue;\n }\n if (key in proto) {\n return childValue;\n }\n if (typeof childValue === \"object\" && childValue !== null) {\n let childNode = node.children[key];\n if (childNode === void 0) {\n childNode = node.children[key] = createNode(childValue);\n }\n if (childNode.tag) {\n getValue(childNode.tag);\n }\n return childNode.proxy;\n } else {\n let tag = node.tags[key];\n if (tag === void 0) {\n tag = node.tags[key] = createTag();\n tag.value = childValue;\n }\n getValue(tag);\n return childValue;\n }\n }\n const res = calculateResult();\n return res;\n },\n ownKeys(node) {\n consumeCollection(node);\n return Reflect.ownKeys(node.value);\n },\n getOwnPropertyDescriptor(node, prop) {\n return Reflect.getOwnPropertyDescriptor(node.value, prop);\n },\n has(node, prop) {\n return Reflect.has(node.value, prop);\n }\n};\nvar ArrayTreeNode = class {\n constructor(value) {\n this.value = value;\n this.value = value;\n this.tag.value = value;\n }\n proxy = new Proxy([this], arrayProxyHandler);\n tag = createTag();\n tags = {};\n children = {};\n collectionTag = null;\n id = nextId++;\n};\nvar arrayProxyHandler = {\n get([node], key) {\n if (key === \"length\") {\n consumeCollection(node);\n }\n return objectProxyHandler.get(node, key);\n },\n ownKeys([node]) {\n return objectProxyHandler.ownKeys(node);\n },\n getOwnPropertyDescriptor([node], prop) {\n return objectProxyHandler.getOwnPropertyDescriptor(node, prop);\n },\n has([node], prop) {\n return objectProxyHandler.has(node, prop);\n }\n};\nfunction createNode(value) {\n if (Array.isArray(value)) {\n return new ArrayTreeNode(value);\n }\n return new ObjectTreeNode(value);\n}\nfunction updateNode(node, newValue) {\n const { value, tags, children } = node;\n node.value = newValue;\n if (Array.isArray(value) && Array.isArray(newValue) && value.length !== newValue.length) {\n dirtyCollection(node);\n } else {\n if (value !== newValue) {\n let oldKeysSize = 0;\n let newKeysSize = 0;\n let anyKeysAdded = false;\n for (const _key in value) {\n oldKeysSize++;\n }\n for (const key in newValue) {\n newKeysSize++;\n if (!(key in value)) {\n anyKeysAdded = true;\n break;\n }\n }\n const isDifferent = anyKeysAdded || oldKeysSize !== newKeysSize;\n if (isDifferent) {\n dirtyCollection(node);\n }\n }\n }\n for (const key in tags) {\n const childValue = value[key];\n const newChildValue = newValue[key];\n if (childValue !== newChildValue) {\n dirtyCollection(node);\n dirtyTag(tags[key], newChildValue);\n }\n if (typeof newChildValue === \"object\" && newChildValue !== null) {\n delete tags[key];\n }\n }\n for (const key in children) {\n const childNode = children[key];\n const newChildValue = newValue[key];\n const childValue = childNode.value;\n if (childValue === newChildValue) {\n continue;\n } else if (typeof newChildValue === \"object\" && newChildValue !== null) {\n updateNode(childNode, newChildValue);\n } else {\n deleteNode(childNode);\n delete children[key];\n }\n }\n}\nfunction deleteNode(node) {\n if (node.tag) {\n dirtyTag(node.tag, null);\n }\n dirtyCollection(node);\n for (const key in node.tags) {\n dirtyTag(node.tags[key], null);\n }\n for (const key in node.children) {\n deleteNode(node.children[key]);\n }\n}\n\n// src/lruMemoize.ts\nfunction createSingletonCache(equals) {\n let entry;\n return {\n get(key) {\n if (entry && equals(entry.key, key)) {\n return entry.value;\n }\n return NOT_FOUND;\n },\n put(key, value) {\n entry = { key, value };\n },\n getEntries() {\n return entry ? [entry] : [];\n },\n clear() {\n entry = void 0;\n }\n };\n}\nfunction createLruCache(maxSize, equals) {\n let entries = [];\n function get(key) {\n const cacheIndex = entries.findIndex((entry) => equals(key, entry.key));\n if (cacheIndex > -1) {\n const entry = entries[cacheIndex];\n if (cacheIndex > 0) {\n entries.splice(cacheIndex, 1);\n entries.unshift(entry);\n }\n return entry.value;\n }\n return NOT_FOUND;\n }\n function put(key, value) {\n if (get(key) === NOT_FOUND) {\n entries.unshift({ key, value });\n if (entries.length > maxSize) {\n entries.pop();\n }\n }\n }\n function getEntries() {\n return entries;\n }\n function clear() {\n entries = [];\n }\n return { get, put, getEntries, clear };\n}\nvar referenceEqualityCheck = (a, b) => a === b;\nfunction createCacheKeyComparator(equalityCheck) {\n return function areArgumentsShallowlyEqual(prev, next) {\n if (prev === null || next === null || prev.length !== next.length) {\n return false;\n }\n const { length } = prev;\n for (let i = 0; i < length; i++) {\n if (!equalityCheck(prev[i], next[i])) {\n return false;\n }\n }\n return true;\n };\n}\nfunction lruMemoize(func, equalityCheckOrOptions) {\n const providedOptions = typeof equalityCheckOrOptions === \"object\" ? equalityCheckOrOptions : { equalityCheck: equalityCheckOrOptions };\n const {\n equalityCheck = referenceEqualityCheck,\n maxSize = 1,\n resultEqualityCheck\n } = providedOptions;\n const comparator = createCacheKeyComparator(equalityCheck);\n let resultsCount = 0;\n const cache = maxSize <= 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator);\n function memoized() {\n let value = cache.get(arguments);\n if (value === NOT_FOUND) {\n value = func.apply(null, arguments);\n resultsCount++;\n if (resultEqualityCheck) {\n const entries = cache.getEntries();\n const matchingEntry = entries.find(\n (entry) => resultEqualityCheck(entry.value, value)\n );\n if (matchingEntry) {\n value = matchingEntry.value;\n resultsCount !== 0 && resultsCount--;\n }\n }\n cache.put(arguments, value);\n }\n return value;\n }\n memoized.clearCache = () => {\n cache.clear();\n memoized.resetResultsCount();\n };\n memoized.resultsCount = () => resultsCount;\n memoized.resetResultsCount = () => {\n resultsCount = 0;\n };\n return memoized;\n}\n\n// src/autotrackMemoize/autotrackMemoize.ts\nfunction autotrackMemoize(func) {\n const node = createNode(\n []\n );\n let lastArgs = null;\n const shallowEqual = createCacheKeyComparator(referenceEqualityCheck);\n const cache = createCache(() => {\n const res = func.apply(null, node.proxy);\n return res;\n });\n function memoized() {\n if (!shallowEqual(lastArgs, arguments)) {\n updateNode(node, arguments);\n lastArgs = arguments;\n }\n return cache.value;\n }\n memoized.clearCache = () => {\n return cache.clear();\n };\n return memoized;\n}\n\n// src/weakMapMemoize.ts\nvar StrongRef = class {\n constructor(value) {\n this.value = value;\n }\n deref() {\n return this.value;\n }\n};\nvar Ref = typeof WeakRef !== \"undefined\" ? WeakRef : StrongRef;\nvar UNTERMINATED = 0;\nvar TERMINATED = 1;\nfunction createCacheNode() {\n return {\n s: UNTERMINATED,\n v: void 0,\n o: null,\n p: null\n };\n}\nfunction weakMapMemoize(func, options = {}) {\n let fnNode = createCacheNode();\n const { resultEqualityCheck } = options;\n let lastResult;\n let resultsCount = 0;\n function memoized() {\n let cacheNode = fnNode;\n const { length } = arguments;\n for (let i = 0, l = length; i < l; i++) {\n const arg = arguments[i];\n if (typeof arg === \"function\" || typeof arg === \"object\" && arg !== null) {\n let objectCache = cacheNode.o;\n if (objectCache === null) {\n cacheNode.o = objectCache = /* @__PURE__ */ new WeakMap();\n }\n const objectNode = objectCache.get(arg);\n if (objectNode === void 0) {\n cacheNode = createCacheNode();\n objectCache.set(arg, cacheNode);\n } else {\n cacheNode = objectNode;\n }\n } else {\n let primitiveCache = cacheNode.p;\n if (primitiveCache === null) {\n cacheNode.p = primitiveCache = /* @__PURE__ */ new Map();\n }\n const primitiveNode = primitiveCache.get(arg);\n if (primitiveNode === void 0) {\n cacheNode = createCacheNode();\n primitiveCache.set(arg, cacheNode);\n } else {\n cacheNode = primitiveNode;\n }\n }\n }\n const terminatedNode = cacheNode;\n let result;\n if (cacheNode.s === TERMINATED) {\n result = cacheNode.v;\n } else {\n result = func.apply(null, arguments);\n resultsCount++;\n if (resultEqualityCheck) {\n const lastResultValue = lastResult?.deref?.() ?? lastResult;\n if (lastResultValue != null && resultEqualityCheck(lastResultValue, result)) {\n result = lastResultValue;\n resultsCount !== 0 && resultsCount--;\n }\n const needsWeakRef = typeof result === \"object\" && result !== null || typeof result === \"function\";\n lastResult = needsWeakRef ? new Ref(result) : result;\n }\n }\n terminatedNode.s = TERMINATED;\n terminatedNode.v = result;\n return result;\n }\n memoized.clearCache = () => {\n fnNode = createCacheNode();\n memoized.resetResultsCount();\n };\n memoized.resultsCount = () => resultsCount;\n memoized.resetResultsCount = () => {\n resultsCount = 0;\n };\n return memoized;\n}\n\n// src/createSelectorCreator.ts\nfunction createSelectorCreator(memoizeOrOptions, ...memoizeOptionsFromArgs) {\n const createSelectorCreatorOptions = typeof memoizeOrOptions === \"function\" ? {\n memoize: memoizeOrOptions,\n memoizeOptions: memoizeOptionsFromArgs\n } : memoizeOrOptions;\n const createSelector2 = (...createSelectorArgs) => {\n let recomputations = 0;\n let dependencyRecomputations = 0;\n let lastResult;\n let directlyPassedOptions = {};\n let resultFunc = createSelectorArgs.pop();\n if (typeof resultFunc === \"object\") {\n directlyPassedOptions = resultFunc;\n resultFunc = createSelectorArgs.pop();\n }\n assertIsFunction(\n resultFunc,\n `createSelector expects an output function after the inputs, but received: [${typeof resultFunc}]`\n );\n const combinedOptions = {\n ...createSelectorCreatorOptions,\n ...directlyPassedOptions\n };\n const {\n memoize,\n memoizeOptions = [],\n argsMemoize = weakMapMemoize,\n argsMemoizeOptions = [],\n devModeChecks = {}\n } = combinedOptions;\n const finalMemoizeOptions = ensureIsArray(memoizeOptions);\n const finalArgsMemoizeOptions = ensureIsArray(argsMemoizeOptions);\n const dependencies = getDependencies(createSelectorArgs);\n const memoizedResultFunc = memoize(function recomputationWrapper() {\n recomputations++;\n return resultFunc.apply(\n null,\n arguments\n );\n }, ...finalMemoizeOptions);\n let firstRun = true;\n const selector = argsMemoize(function dependenciesChecker() {\n dependencyRecomputations++;\n const inputSelectorResults = collectInputSelectorResults(\n dependencies,\n arguments\n );\n lastResult = memoizedResultFunc.apply(null, inputSelectorResults);\n if (process.env.NODE_ENV !== \"production\") {\n const { identityFunctionCheck, inputStabilityCheck } = getDevModeChecksExecutionInfo(firstRun, devModeChecks);\n if (identityFunctionCheck.shouldRun) {\n identityFunctionCheck.run(\n resultFunc,\n inputSelectorResults,\n lastResult\n );\n }\n if (inputStabilityCheck.shouldRun) {\n const inputSelectorResultsCopy = collectInputSelectorResults(\n dependencies,\n arguments\n );\n inputStabilityCheck.run(\n { inputSelectorResults, inputSelectorResultsCopy },\n { memoize, memoizeOptions: finalMemoizeOptions },\n arguments\n );\n }\n if (firstRun)\n firstRun = false;\n }\n return lastResult;\n }, ...finalArgsMemoizeOptions);\n return Object.assign(selector, {\n resultFunc,\n memoizedResultFunc,\n dependencies,\n dependencyRecomputations: () => dependencyRecomputations,\n resetDependencyRecomputations: () => {\n dependencyRecomputations = 0;\n },\n lastResult: () => lastResult,\n recomputations: () => recomputations,\n resetRecomputations: () => {\n recomputations = 0;\n },\n memoize,\n argsMemoize\n });\n };\n Object.assign(createSelector2, {\n withTypes: () => createSelector2\n });\n return createSelector2;\n}\nvar createSelector = /* @__PURE__ */ createSelectorCreator(weakMapMemoize);\n\n// src/createStructuredSelector.ts\nvar createStructuredSelector = Object.assign(\n (inputSelectorsObject, selectorCreator = createSelector) => {\n assertIsObject(\n inputSelectorsObject,\n `createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof inputSelectorsObject}`\n );\n const inputSelectorKeys = Object.keys(inputSelectorsObject);\n const dependencies = inputSelectorKeys.map(\n (key) => inputSelectorsObject[key]\n );\n const structuredSelector = selectorCreator(\n dependencies,\n (...inputSelectorResults) => {\n return inputSelectorResults.reduce((composition, value, index) => {\n composition[inputSelectorKeys[index]] = value;\n return composition;\n }, {});\n }\n );\n return structuredSelector;\n },\n { withTypes: () => createStructuredSelector }\n);\nexport {\n createSelector,\n createSelectorCreator,\n createStructuredSelector,\n lruMemoize,\n referenceEqualityCheck,\n setGlobalDevModeChecks,\n autotrackMemoize as unstable_autotrackMemoize,\n weakMapMemoize\n};\n//# sourceMappingURL=reselect.mjs.map","import { lruMemoize, createSelectorCreator } from 'reselect';\n/* eslint-disable no-underscore-dangle */ // __cacheKey__\n\nconst reselectCreateSelector = createSelectorCreator({\n memoize: lruMemoize,\n memoizeOptions: {\n maxSize: 1,\n equalityCheck: Object.is\n }\n});\n/* eslint-disable id-denylist */\nexport const createSelector = (a, b, c, d, e, f, g, h, ...other) => {\n if (other.length > 0) {\n throw new Error('Unsupported number of selectors');\n }\n let selector;\n if (a && b && c && d && e && f && g && h) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n const vc = c(state, a1, a2, a3);\n const vd = d(state, a1, a2, a3);\n const ve = e(state, a1, a2, a3);\n const vf = f(state, a1, a2, a3);\n const vg = g(state, a1, a2, a3);\n return h(va, vb, vc, vd, ve, vf, vg, a1, a2, a3);\n };\n } else if (a && b && c && d && e && f && g) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n const vc = c(state, a1, a2, a3);\n const vd = d(state, a1, a2, a3);\n const ve = e(state, a1, a2, a3);\n const vf = f(state, a1, a2, a3);\n return g(va, vb, vc, vd, ve, vf, a1, a2, a3);\n };\n } else if (a && b && c && d && e && f) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n const vc = c(state, a1, a2, a3);\n const vd = d(state, a1, a2, a3);\n const ve = e(state, a1, a2, a3);\n return f(va, vb, vc, vd, ve, a1, a2, a3);\n };\n } else if (a && b && c && d && e) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n const vc = c(state, a1, a2, a3);\n const vd = d(state, a1, a2, a3);\n return e(va, vb, vc, vd, a1, a2, a3);\n };\n } else if (a && b && c && d) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n const vc = c(state, a1, a2, a3);\n return d(va, vb, vc, a1, a2, a3);\n };\n } else if (a && b && c) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n return c(va, vb, a1, a2, a3);\n };\n } else if (a && b) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n return b(va, a1, a2, a3);\n };\n } else if (a) {\n selector = a;\n } else {\n throw new Error('Missing arguments');\n }\n return selector;\n};\n/* eslint-enable id-denylist */\n\nexport const createSelectorMemoizedWithOptions = options => (...inputs) => {\n const cache = new WeakMap();\n let nextCacheId = 1;\n const combiner = inputs[inputs.length - 1];\n const nSelectors = inputs.length - 1 || 1;\n // (s1, s2, ..., sN, a1, a2, a3) => { ... }\n const argsLength = Math.max(combiner.length - nSelectors, 0);\n if (argsLength > 3) {\n throw new Error('Unsupported number of arguments');\n }\n\n // prettier-ignore\n const selector = (state, a1, a2, a3) => {\n let cacheKey = state.__cacheKey__;\n if (!cacheKey) {\n cacheKey = {\n id: nextCacheId\n };\n state.__cacheKey__ = cacheKey;\n nextCacheId += 1;\n }\n let fn = cache.get(cacheKey);\n if (!fn) {\n const selectors = inputs.length === 1 ? [x => x, combiner] : inputs;\n let reselectArgs = inputs;\n const selectorArgs = [undefined, undefined, undefined];\n switch (argsLength) {\n case 0:\n break;\n case 1:\n {\n reselectArgs = [...selectors.slice(0, -1), () => selectorArgs[0], combiner];\n break;\n }\n case 2:\n {\n reselectArgs = [...selectors.slice(0, -1), () => selectorArgs[0], () => selectorArgs[1], combiner];\n break;\n }\n case 3:\n {\n reselectArgs = [...selectors.slice(0, -1), () => selectorArgs[0], () => selectorArgs[1], () => selectorArgs[2], combiner];\n break;\n }\n default:\n throw new Error('Unsupported number of arguments');\n }\n if (options) {\n reselectArgs = [...reselectArgs, options];\n }\n fn = reselectCreateSelector(...reselectArgs);\n fn.selectorArgs = selectorArgs;\n cache.set(cacheKey, fn);\n }\n\n /* eslint-disable no-fallthrough */\n\n switch (argsLength) {\n case 3:\n fn.selectorArgs[2] = a3;\n case 2:\n fn.selectorArgs[1] = a2;\n case 1:\n fn.selectorArgs[0] = a1;\n case 0:\n default:\n }\n switch (argsLength) {\n case 0:\n return fn(state);\n case 1:\n return fn(state, a1);\n case 2:\n return fn(state, a1, a2);\n case 3:\n return fn(state, a1, a2, a3);\n default:\n throw new Error('unreachable');\n }\n };\n return selector;\n};\nexport const createSelectorMemoized = createSelectorMemoizedWithOptions();","export const selectorChartCartesianAxisState = state => state.cartesianAxis;\nexport const selectorChartRawXAxis = state => state.cartesianAxis?.x;\nexport const selectorChartRawYAxis = state => state.cartesianAxis?.y;","import { createSelector, createSelectorMemoized } from '@mui/x-internals/store';\nimport { selectorChartRawXAxis, selectorChartRawYAxis } from \"./useChartCartesianAxisLayout.selectors.js\";\nexport const selectorChartLeftAxisSize = createSelector(selectorChartRawYAxis, function selectorChartLeftAxisSize(yAxis) {\n return (yAxis ?? []).reduce((acc, axis) => axis.position === 'left' ? acc + (axis.width || 0) + (axis.zoom?.slider.enabled ? axis.zoom.slider.size : 0) : acc, 0);\n});\nexport const selectorChartRightAxisSize = createSelector(selectorChartRawYAxis, function selectorChartRightAxisSize(yAxis) {\n return (yAxis ?? []).reduce((acc, axis) => axis.position === 'right' ? acc + (axis.width || 0) + (axis.zoom?.slider.enabled ? axis.zoom.slider.size : 0) : acc, 0);\n});\nexport const selectorChartTopAxisSize = createSelector(selectorChartRawXAxis, function selectorChartTopAxisSize(xAxis) {\n return (xAxis ?? []).reduce((acc, axis) => axis.position === 'top' ? acc + (axis.height || 0) + (axis.zoom?.slider.enabled ? axis.zoom.slider.size : 0) : acc, 0);\n});\nexport const selectorChartBottomAxisSize = createSelector(selectorChartRawXAxis, function selectorChartBottomAxisSize(xAxis) {\n return (xAxis ?? []).reduce((acc, axis) => axis.position === 'bottom' ? acc + (axis.height || 0) + (axis.zoom?.slider.enabled ? axis.zoom.slider.size : 0) : acc, 0);\n});\nexport const selectorChartAxisSizes = createSelectorMemoized(selectorChartLeftAxisSize, selectorChartRightAxisSize, selectorChartTopAxisSize, selectorChartBottomAxisSize, function selectorChartAxisSizes(left, right, top, bottom) {\n return {\n left,\n right,\n top,\n bottom\n };\n});","import { createSelector, createSelectorMemoized } from '@mui/x-internals/store';\nimport { selectorChartAxisSizes } from \"../../featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js\";\nexport const selectorChartDimensionsState = state => state.dimensions;\nexport const selectorChartMargin = state => state.dimensions.margin;\nexport const selectorChartDrawingArea = createSelectorMemoized(selectorChartDimensionsState, selectorChartMargin, selectorChartAxisSizes, function selectorChartDrawingArea({\n width,\n height\n}, {\n top: marginTop,\n right: marginRight,\n bottom: marginBottom,\n left: marginLeft\n}, {\n left: axisSizeLeft,\n right: axisSizeRight,\n top: axisSizeTop,\n bottom: axisSizeBottom\n}) {\n return {\n width: width - marginLeft - marginRight - axisSizeLeft - axisSizeRight,\n left: marginLeft + axisSizeLeft,\n right: marginRight + axisSizeRight,\n height: height - marginTop - marginBottom - axisSizeTop - axisSizeBottom,\n top: marginTop + axisSizeTop,\n bottom: marginBottom + axisSizeBottom\n };\n});\nexport const selectorChartSvgWidth = createSelector(selectorChartDimensionsState, dimensionsState => dimensionsState.width);\nexport const selectorChartSvgHeight = createSelector(selectorChartDimensionsState, dimensionsState => dimensionsState.height);\nexport const selectorChartPropsWidth = createSelector(selectorChartDimensionsState, dimensionsState => dimensionsState.propsWidth);\nexport const selectorChartPropsHeight = createSelector(selectorChartDimensionsState, dimensionsState => dimensionsState.propsHeight);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport function defaultizeMargin(input, defaultMargin) {\n if (typeof input === 'number') {\n return {\n top: input,\n bottom: input,\n left: input,\n right: input\n };\n }\n if (defaultMargin) {\n return _extends({}, defaultMargin, input);\n }\n return input;\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useEffectAfterFirstRender } from '@mui/x-internals/useEffectAfterFirstRender';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport ownerWindow from '@mui/utils/ownerWindow';\nimport { DEFAULT_MARGINS } from \"../../../../constants/index.js\";\nimport { selectorChartDrawingArea } from \"./useChartDimensions.selectors.js\";\nimport { defaultizeMargin } from \"../../../defaultizeMargin.js\";\nconst MAX_COMPUTE_RUN = 10;\nexport const useChartDimensions = ({\n params,\n store,\n svgRef\n}) => {\n const hasInSize = params.width !== undefined && params.height !== undefined;\n const stateRef = React.useRef({\n displayError: false,\n initialCompute: true,\n computeRun: 0\n });\n // States only used for the initialization of the size.\n const [innerWidth, setInnerWidth] = React.useState(0);\n const [innerHeight, setInnerHeight] = React.useState(0);\n const computeSize = React.useCallback(() => {\n const mainEl = svgRef?.current;\n if (!mainEl) {\n return {};\n }\n const win = ownerWindow(mainEl);\n const computedStyle = win.getComputedStyle(mainEl);\n const newHeight = Math.floor(parseFloat(computedStyle.height)) || 0;\n const newWidth = Math.floor(parseFloat(computedStyle.width)) || 0;\n if (store.state.dimensions.width !== newWidth || store.state.dimensions.height !== newHeight) {\n store.set('dimensions', {\n margin: {\n top: params.margin.top,\n right: params.margin.right,\n bottom: params.margin.bottom,\n left: params.margin.left\n },\n width: params.width ?? newWidth,\n height: params.height ?? newHeight,\n propsWidth: params.width,\n propsHeight: params.height\n });\n }\n return {\n height: newHeight,\n width: newWidth\n };\n }, [store, svgRef, params.height, params.width,\n // Margin is an object, so we need to include all the properties to prevent infinite loops.\n params.margin.left, params.margin.right, params.margin.top, params.margin.bottom]);\n useEffectAfterFirstRender(() => {\n const width = params.width ?? store.state.dimensions.width;\n const height = params.height ?? store.state.dimensions.height;\n store.set('dimensions', {\n margin: {\n top: params.margin.top,\n right: params.margin.right,\n bottom: params.margin.bottom,\n left: params.margin.left\n },\n width,\n height,\n propsHeight: params.height,\n propsWidth: params.width\n });\n }, [store, params.height, params.width,\n // Margin is an object, so we need to include all the properties to prevent infinite loops.\n params.margin.left, params.margin.right, params.margin.top, params.margin.bottom]);\n React.useEffect(() => {\n // Ensure the error detection occurs after the first rendering.\n stateRef.current.displayError = true;\n }, []);\n\n // This effect is used to compute the size of the container on the initial render.\n // It is not bound to the raf loop to avoid an unwanted \"resize\" event.\n // https://github.com/mui/mui-x/issues/13477#issuecomment-2336634785\n useEnhancedEffect(() => {\n // computeRun is used to avoid infinite loops.\n if (hasInSize || !stateRef.current.initialCompute || stateRef.current.computeRun > MAX_COMPUTE_RUN) {\n return;\n }\n const computedSize = computeSize();\n if (computedSize.width !== innerWidth || computedSize.height !== innerHeight) {\n stateRef.current.computeRun += 1;\n if (computedSize.width !== undefined) {\n setInnerWidth(computedSize.width);\n }\n if (computedSize.height !== undefined) {\n setInnerHeight(computedSize.height);\n }\n } else if (stateRef.current.initialCompute) {\n stateRef.current.initialCompute = false;\n }\n }, [innerHeight, innerWidth, computeSize, hasInSize]);\n useEnhancedEffect(() => {\n if (hasInSize) {\n return () => {};\n }\n computeSize();\n const elementToObserve = svgRef.current;\n if (typeof ResizeObserver === 'undefined') {\n return () => {};\n }\n let animationFrame;\n const observer = new ResizeObserver(() => {\n // See https://github.com/mui/mui-x/issues/8733\n animationFrame = requestAnimationFrame(() => {\n computeSize();\n });\n });\n if (elementToObserve) {\n observer.observe(elementToObserve);\n }\n return () => {\n if (animationFrame) {\n cancelAnimationFrame(animationFrame);\n }\n if (elementToObserve) {\n observer.unobserve(elementToObserve);\n }\n };\n }, [computeSize, hasInSize, svgRef]);\n if (process.env.NODE_ENV !== 'production') {\n if (stateRef.current.displayError && params.width === undefined && innerWidth === 0) {\n console.error(`MUI X Charts: ChartContainer does not have \\`width\\` prop, and its container has no \\`width\\` defined.`);\n stateRef.current.displayError = false;\n }\n if (stateRef.current.displayError && params.height === undefined && innerHeight === 0) {\n console.error(`MUI X Charts: ChartContainer does not have \\`height\\` prop, and its container has no \\`height\\` defined.`);\n stateRef.current.displayError = false;\n }\n }\n const drawingArea = store.use(selectorChartDrawingArea);\n const isXInside = React.useCallback(x => x >= drawingArea.left - 1 && x <= drawingArea.left + drawingArea.width, [drawingArea.left, drawingArea.width]);\n const isYInside = React.useCallback(y => y >= drawingArea.top - 1 && y <= drawingArea.top + drawingArea.height, [drawingArea.height, drawingArea.top]);\n const isPointInside = React.useCallback((x, y, targetElement) => {\n // For element allowed to overflow, wrapping them in make them fully part of the drawing area.\n if (targetElement && 'closest' in targetElement && targetElement.closest('[data-drawing-container]')) {\n return true;\n }\n return isXInside(x) && isYInside(y);\n }, [isXInside, isYInside]);\n return {\n instance: {\n isPointInside,\n isXInside,\n isYInside\n }\n };\n};\nuseChartDimensions.params = {\n width: true,\n height: true,\n margin: true\n};\nuseChartDimensions.getDefaultizedParams = ({\n params\n}) => _extends({}, params, {\n margin: defaultizeMargin(params.margin, DEFAULT_MARGINS)\n});\nuseChartDimensions.getInitialState = ({\n width,\n height,\n margin\n}) => {\n return {\n dimensions: {\n margin,\n width: width ?? 0,\n height: height ?? 0,\n propsWidth: width,\n propsHeight: height\n }\n };\n};","import ownerDocument from \"../ownerDocument/index.js\";\nexport default function ownerWindow(node) {\n const doc = ownerDocument(node);\n return doc.defaultView || window;\n}","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","'use client';\n\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nexport const useChartExperimentalFeatures = ({\n params,\n store\n}) => {\n useEnhancedEffect(() => {\n store.set('experimentalFeatures', params.experimentalFeatures);\n }, [store, params.experimentalFeatures]);\n return {};\n};\nuseChartExperimentalFeatures.params = {\n experimentalFeatures: true\n};\nuseChartExperimentalFeatures.getInitialState = ({\n experimentalFeatures\n}) => {\n return {\n experimentalFeatures\n };\n};","let globalChartDefaultId = 0;\nexport const createChartDefaultId = () => {\n globalChartDefaultId += 1;\n return `mui-chart-${globalChartDefaultId}`;\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { createChartDefaultId } from \"./useChartId.utils.js\";\nexport const useChartId = ({\n params,\n store\n}) => {\n React.useEffect(() => {\n if (params.id === undefined || params.id === store.state.id.providedChartId && store.state.id.chartId !== undefined) {\n return;\n }\n store.set('id', _extends({}, store.state.id, {\n chartId: params.id ?? createChartDefaultId()\n }));\n }, [store, params.id]);\n return {};\n};\nuseChartId.params = {\n id: true\n};\nuseChartId.getInitialState = ({\n id\n}) => ({\n id: {\n chartId: id,\n providedChartId: id\n }\n});","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from \"../useEnhancedEffect/index.js\";\n\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nexport default useEventCallback;","export const rainbowSurgePaletteLight = ['#4254FB', '#FFB422', '#FA4F58', '#0DBEFF', '#22BF75', '#FA83B4', '#FF7511'];\nexport const rainbowSurgePaletteDark = ['#495AFB', '#FFC758', '#F35865', '#30C8FF', '#44CE8D', '#F286B3', '#FF8C39'];\nexport const rainbowSurgePalette = mode => mode === 'dark' ? rainbowSurgePaletteDark : rainbowSurgePaletteLight;","/**\n * This method groups series by type and adds defaultized values such as the ids and colors.\n * It does NOT apply the series processors - that happens in a selector.\n * @param series The array of series provided by the developer\n * @param colors The color palette used to defaultize series colors\n * @returns An object structuring all the series by type with default values.\n */\nexport const defaultizeSeries = ({\n series,\n colors,\n seriesConfig\n}) => {\n // Group series by type\n const seriesGroups = {};\n series.forEach((seriesData, seriesIndex) => {\n const seriesWithDefaultValues = seriesConfig[seriesData.type].getSeriesWithDefaultValues(seriesData, seriesIndex, colors);\n const id = seriesWithDefaultValues.id;\n if (seriesGroups[seriesData.type] === undefined) {\n seriesGroups[seriesData.type] = {\n series: {},\n seriesOrder: []\n };\n }\n if (seriesGroups[seriesData.type]?.series[id] !== undefined) {\n throw new Error(`MUI X Charts: series' id \"${id}\" is not unique.`);\n }\n seriesGroups[seriesData.type].series[id] = seriesWithDefaultValues;\n seriesGroups[seriesData.type].seriesOrder.push(id);\n });\n return seriesGroups;\n};\n\n/**\n * Applies series processors to the defaultized series groups.\n * This should be called in a selector to compute processed series on-demand.\n * @param defaultizedSeries The defaultized series groups\n * @param seriesConfig The series configuration\n * @param dataset The optional dataset\n * @returns Processed series with all transformations applied\n */\nexport const applySeriesProcessors = (defaultizedSeries, seriesConfig, dataset) => {\n const processedSeries = {};\n\n // Apply formatter on a type group\n Object.keys(seriesConfig).forEach(type => {\n const group = defaultizedSeries[type];\n if (group !== undefined) {\n processedSeries[type] = seriesConfig[type]?.seriesProcessor?.(group, dataset) ?? group;\n }\n });\n return processedSeries;\n};\n\n/**\n * Applies series processors with drawing area to series if defined.\n * @param processedSeries The processed series groups\n * @param seriesConfig The series configuration\n * @param drawingArea The drawing area\n * @returns Processed series with all transformations applied\n */\nexport const applySeriesLayout = (processedSeries, seriesConfig, drawingArea) => {\n let processingDetected = false;\n const seriesLayout = {};\n\n // Apply processors on series type per group\n Object.keys(processedSeries).forEach(type => {\n const processor = seriesConfig[type]?.seriesLayout;\n const thisSeries = processedSeries[type];\n if (processor !== undefined && thisSeries !== undefined) {\n const newValue = processor(thisSeries, drawingArea);\n if (newValue && newValue !== processedSeries[type]) {\n processingDetected = true;\n seriesLayout[type] = newValue;\n }\n }\n });\n if (!processingDetected) {\n return {};\n }\n return seriesLayout;\n};","/**\n * Serializes a series item identifier into a unique string using the appropriate serializer\n * from the provided series configuration.\n *\n * @param {ChartSeriesConfig} seriesConfig - The configuration object for chart series.\n * @param {SeriesItemIdentifier} identifier - The series item identifier to serialize.\n * @returns {string} A unique string representation of the identifier.\n * @throws Will throw an error if no serializer is found for the given series type.\n */\nexport const serializeIdentifier = (seriesConfig, identifier) => {\n const serializer = seriesConfig[identifier.type]?.identifierSerializer;\n if (!serializer) {\n throw new Error(`MUI X Charts: No identifier serializer found for series type \"${identifier.type}\".`);\n }\n // @ts-expect-error identifierSerializer expects the full object,\n // but this function accepts a partial one in order be able to serialize all identifiers.\n return serializer(identifier);\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { useEffectAfterFirstRender } from '@mui/x-internals/useEffectAfterFirstRender';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { rainbowSurgePalette } from \"../../../../colorPalettes/index.js\";\nimport { defaultizeSeries } from \"./processSeries.js\";\nimport { serializeIdentifier as serializeIdentifierFn } from \"./serializeIdentifier.js\";\nexport const useChartSeries = ({\n params,\n store,\n seriesConfig\n}) => {\n const {\n series,\n dataset,\n theme,\n colors\n } = params;\n\n // The effect do not track any value defined synchronously during the 1st render by hooks called after `useChartSeries`\n // As a consequence, the state generated by the 1st run of this useEffect will always be equal to the initialization one\n useEffectAfterFirstRender(() => {\n store.set('series', _extends({}, store.state.series, {\n defaultizedSeries: defaultizeSeries({\n series,\n colors: typeof colors === 'function' ? colors(theme) : colors,\n seriesConfig\n }),\n dataset\n }));\n }, [colors, dataset, series, theme, seriesConfig, store]);\n const serializeIdentifier = useEventCallback(identifier => serializeIdentifierFn(seriesConfig, identifier));\n return {\n instance: {\n serializeIdentifier\n }\n };\n};\nuseChartSeries.params = {\n dataset: true,\n series: true,\n colors: true,\n theme: true\n};\nconst EMPTY_ARRAY = [];\nuseChartSeries.getDefaultizedParams = ({\n params\n}) => _extends({}, params, {\n series: params.series?.length ? params.series : EMPTY_ARRAY,\n colors: params.colors ?? rainbowSurgePalette,\n theme: params.theme ?? 'light'\n});\nuseChartSeries.getInitialState = ({\n series = [],\n colors,\n theme,\n dataset\n}, _, seriesConfig) => {\n return {\n series: {\n seriesConfig,\n defaultizedSeries: defaultizeSeries({\n series,\n colors: typeof colors === 'function' ? colors(theme) : colors,\n seriesConfig\n }),\n dataset\n }\n };\n};","/**\n * ActiveGesturesRegistry - Centralized registry for tracking which gestures are active on elements\n *\n * This singleton class keeps track of all gesture instances that are currently in their active state,\n * allowing both the system and applications to query which gestures are active on specific elements.\n */\n\n/**\n * Type for entries in the active gestures registry\n */\n\n/**\n * Registry that maintains a record of all currently active gestures across elements\n */\nexport class ActiveGesturesRegistry {\n /** Map of elements to their active gestures */\n activeGestures = (() => new Map())();\n\n /**\n * Register a gesture as active on an element\n *\n * @param element - The DOM element on which the gesture is active\n * @param gesture - The gesture instance that is active\n */\n registerActiveGesture(element, gesture) {\n if (!this.activeGestures.has(element)) {\n this.activeGestures.set(element, new Set());\n }\n const elementGestures = this.activeGestures.get(element);\n const entry = {\n gesture,\n element\n };\n elementGestures.add(entry);\n }\n\n /**\n * Remove a gesture from the active registry\n *\n * @param element - The DOM element on which the gesture was active\n * @param gesture - The gesture instance to deactivate\n */\n unregisterActiveGesture(element, gesture) {\n const elementGestures = this.activeGestures.get(element);\n if (!elementGestures) {\n return;\n }\n\n // Find and remove the specific gesture entry\n elementGestures.forEach(entry => {\n if (entry.gesture === gesture) {\n elementGestures.delete(entry);\n }\n });\n\n // Remove the element from the map if it no longer has any active gestures\n if (elementGestures.size === 0) {\n this.activeGestures.delete(element);\n }\n }\n\n /**\n * Get all active gestures for a specific element\n *\n * @param element - The DOM element to query\n * @returns Array of active gesture names\n */\n getActiveGestures(element) {\n const elementGestures = this.activeGestures.get(element);\n if (!elementGestures) {\n return {};\n }\n return Array.from(elementGestures).reduce((acc, entry) => {\n acc[entry.gesture.name] = true;\n return acc;\n }, {});\n }\n\n /**\n * Check if a specific gesture is active on an element\n *\n * @param element - The DOM element to check\n * @param gesture - The gesture instance to check\n * @returns True if the gesture is active on the element, false otherwise\n */\n isGestureActive(element, gesture) {\n const elementGestures = this.activeGestures.get(element);\n if (!elementGestures) {\n return false;\n }\n return Array.from(elementGestures).some(entry => entry.gesture === gesture);\n }\n\n /**\n * Clear all active gestures from the registry\n */\n destroy() {\n this.activeGestures.clear();\n }\n\n /**\n * Clear all active gestures for a specific element\n *\n * @param element - The DOM element to clear\n */\n unregisterElement(element) {\n this.activeGestures.delete(element);\n }\n}","/**\n * KeyboardManager - Manager for keyboard events in the gesture recognition system\n *\n * This class tracks keyboard state:\n * 1. Capturing and tracking all pressed keys\n * 2. Providing methods to check if specific keys are pressed\n */\n\n/**\n * Type definition for keyboard keys\n */\n\n/**\n * Class responsible for tracking keyboard state\n */\nexport class KeyboardManager {\n pressedKeys = (() => new Set())();\n\n /**\n * Create a new KeyboardManager instance\n */\n constructor() {\n this.initialize();\n }\n\n /**\n * Initialize the keyboard event listeners\n */\n initialize() {\n if (typeof window === 'undefined') {\n return;\n }\n\n // Add keyboard event listeners\n window.addEventListener('keydown', this.handleKeyDown);\n window.addEventListener('keyup', this.handleKeyUp);\n // Reset keys when window loses focus\n window.addEventListener('blur', this.clearKeys);\n }\n\n /**\n * Handle keydown events\n */\n handleKeyDown = event => {\n this.pressedKeys.add(event.key);\n };\n\n /**\n * Handle keyup events\n */\n handleKeyUp = event => {\n this.pressedKeys.delete(event.key);\n };\n\n /**\n * Clear all pressed keys\n */\n clearKeys = () => {\n this.pressedKeys.clear();\n };\n\n /**\n * Check if a set of keys are all currently pressed\n * @param keys The keys to check\n * @returns True if all specified keys are pressed, false otherwise\n */\n areKeysPressed(keys) {\n if (!keys || keys.length === 0) {\n return true; // No keys required means the condition is satisfied\n }\n return keys.every(key => {\n if (key === 'ControlOrMeta') {\n // May be \"deprecated\" on types, but it is still the best option for cross-platform detection\n // https://stackoverflow.com/a/71785253/24269134\n return navigator.platform.includes('Mac') ? this.pressedKeys.has('Meta') : this.pressedKeys.has('Control');\n }\n return this.pressedKeys.has(key);\n });\n }\n\n /**\n * Cleanup method to remove event listeners\n */\n destroy() {\n if (typeof window !== 'undefined') {\n window.removeEventListener('keydown', this.handleKeyDown);\n window.removeEventListener('keyup', this.handleKeyUp);\n window.removeEventListener('blur', this.clearKeys);\n }\n this.clearKeys();\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * PointerManager - Centralized manager for pointer events in the gesture recognition system\n *\n * This singleton class abstracts the complexity of working with pointer events by:\n * 1. Capturing and tracking all active pointers (touch, mouse, pen)\n * 2. Normalizing pointer data into a consistent format\n * 3. Managing pointer capture for proper tracking across elements\n * 4. Distributing events to registered gesture recognizers\n */\n\n/**\n * Normalized representation of a pointer, containing all relevant information\n * from the original PointerEvent plus additional tracking data.\n *\n * This data structure encapsulates everything gesture recognizers need to know\n * about a pointer's current state.\n */\n\n/**\n * Configuration options for initializing the PointerManager.\n */\n\n/**\n * Manager for handling pointer events across the application.\n *\n * PointerManager serves as the foundational layer for gesture recognition,\n * providing a centralized system for tracking active pointers and distributing\n * pointer events to gesture recognizers.\n *\n * It normalizes browser pointer events into a consistent format and simplifies\n * multi-touch handling by managing pointer capture and tracking multiple\n * simultaneous pointers.\n */\nexport class PointerManager {\n /** Root element where pointer events are captured */\n\n /** CSS touch-action property value applied to the root element */\n\n /** Whether to use passive event listeners */\n\n /** Whether to prevent interrupt events like blur or contextmenu */\n preventEventInterruption = true;\n\n /** Map of all currently active pointers by their pointerId */\n pointers = (() => new Map())();\n\n /** Set of registered gesture handlers that receive pointer events */\n gestureHandlers = (() => new Set())();\n constructor(options) {\n this.root =\n // User provided root element\n options.root ??\n // Fallback to document root or body, this fixes shadow DOM scenarios\n document.getRootNode({\n composed: true\n }) ??\n // Fallback to document body, for some testing environments\n document.body;\n this.touchAction = options.touchAction || 'auto';\n this.passive = options.passive ?? false;\n this.preventEventInterruption = options.preventEventInterruption ?? true;\n this.setupEventListeners();\n }\n\n /**\n * Register a handler function to receive pointer events.\n *\n * The handler will be called whenever pointer events occur within the root element.\n * It receives the current map of all active pointers and the original event.\n *\n * @param {Function} handler - Function to receive pointer events and current pointer state\n * @returns {Function} An unregister function that removes this handler when called\n */\n registerGestureHandler(handler) {\n this.gestureHandlers.add(handler);\n\n // Return unregister function\n return () => {\n this.gestureHandlers.delete(handler);\n };\n }\n\n /**\n * Get a copy of the current active pointers map.\n *\n * Returns a new Map containing all currently active pointers.\n * Modifying the returned map will not affect the internal pointers state.\n *\n * @returns A new Map containing all active pointers\n */\n getPointers() {\n return new Map(this.pointers);\n }\n\n /**\n * Set up event listeners for pointer events on the root element.\n *\n * This method attaches all necessary event listeners and configures\n * the CSS touch-action property on the root element.\n */\n setupEventListeners() {\n // Set touch-action CSS property\n if (this.touchAction !== 'auto') {\n this.root.style.touchAction = this.touchAction;\n }\n\n // Add event listeners\n this.root.addEventListener('pointerdown', this.handlePointerEvent, {\n passive: this.passive\n });\n this.root.addEventListener('pointermove', this.handlePointerEvent, {\n passive: this.passive\n });\n this.root.addEventListener('pointerup', this.handlePointerEvent, {\n passive: this.passive\n });\n this.root.addEventListener('pointercancel', this.handlePointerEvent, {\n passive: this.passive\n });\n // @ts-expect-error, forceCancel is not a standard event, but used for custom handling\n this.root.addEventListener('forceCancel', this.handlePointerEvent, {\n passive: this.passive\n });\n\n // Add blur and contextmenu event listeners to interrupt all gestures\n this.root.addEventListener('blur', this.handleInterruptEvents);\n this.root.addEventListener('contextmenu', this.handleInterruptEvents);\n }\n\n /**\n * Handle events that should interrupt all gestures.\n * This clears all active pointers and notifies handlers with a pointercancel-like event.\n *\n * @param event - The event that triggered the interruption (blur or contextmenu)\n */\n handleInterruptEvents = event => {\n if (this.preventEventInterruption && 'pointerType' in event && event.pointerType === 'touch') {\n event.preventDefault();\n return;\n }\n\n // Create a synthetic pointer cancel event\n const cancelEvent = new PointerEvent('forceCancel', {\n bubbles: false,\n cancelable: false\n });\n const firstPointer = this.pointers.values().next().value;\n if (this.pointers.size > 0 && firstPointer) {\n // If there are active pointers, use the first one as a template for coordinates\n\n // Update the synthetic event with the pointer's coordinates\n Object.defineProperties(cancelEvent, {\n clientX: {\n value: firstPointer.clientX\n },\n clientY: {\n value: firstPointer.clientY\n },\n pointerId: {\n value: firstPointer.pointerId\n },\n pointerType: {\n value: firstPointer.pointerType\n }\n });\n\n // Force update of all pointers to have type 'forceCancel'\n for (const [pointerId, pointer] of this.pointers.entries()) {\n const updatedPointer = _extends({}, pointer, {\n type: 'forceCancel'\n });\n this.pointers.set(pointerId, updatedPointer);\n }\n }\n\n // Notify all handlers about the interruption\n this.notifyHandlers(cancelEvent);\n\n // Clear all pointers\n this.pointers.clear();\n };\n\n /**\n * Event handler for all pointer events.\n *\n * This method:\n * 1. Updates the internal pointers map based on the event type\n * 2. Manages pointer capture for tracking pointers outside the root element\n * 3. Notifies all registered handlers with the current state\n *\n * @param event - The original pointer event from the browser\n */\n handlePointerEvent = event => {\n const {\n type,\n pointerId\n } = event;\n\n // Create or update pointer data\n if (type === 'pointerdown' || type === 'pointermove') {\n this.pointers.set(pointerId, this.createPointerData(event));\n }\n // Remove pointer data on up or cancel\n else if (type === 'pointerup' || type === 'pointercancel' || type === 'forceCancel') {\n // Update one last time before removing\n this.pointers.set(pointerId, this.createPointerData(event));\n\n // Notify handlers with current state\n this.notifyHandlers(event);\n\n // Then remove the pointer\n this.pointers.delete(pointerId);\n return;\n }\n this.notifyHandlers(event);\n };\n\n /**\n * Notify all registered gesture handlers about a pointer event.\n *\n * Each handler receives the current map of active pointers and the original event.\n *\n * @param event - The original pointer event that triggered this notification\n */\n notifyHandlers(event) {\n this.gestureHandlers.forEach(handler => handler(this.pointers, event));\n }\n\n /**\n * Create a normalized PointerData object from a browser PointerEvent.\n *\n * This method extracts all relevant information from the original event\n * and formats it in a consistent way for gesture recognizers to use.\n *\n * @param event - The original browser pointer event\n * @returns A new PointerData object representing this pointer\n */\n createPointerData(event) {\n return {\n pointerId: event.pointerId,\n clientX: event.clientX,\n clientY: event.clientY,\n pageX: event.pageX,\n pageY: event.pageY,\n target: event.target,\n timeStamp: event.timeStamp,\n type: event.type,\n isPrimary: event.isPrimary,\n pressure: event.pressure,\n width: event.width,\n height: event.height,\n pointerType: event.pointerType,\n srcEvent: event\n };\n }\n\n /**\n * Clean up all event listeners and reset the PointerManager state.\n *\n * This method should be called when the PointerManager is no longer needed\n * to prevent memory leaks. It removes all event listeners, clears the\n * internal state, and resets the singleton instance.\n */\n destroy() {\n this.root.removeEventListener('pointerdown', this.handlePointerEvent);\n this.root.removeEventListener('pointermove', this.handlePointerEvent);\n this.root.removeEventListener('pointerup', this.handlePointerEvent);\n this.root.removeEventListener('pointercancel', this.handlePointerEvent);\n // @ts-expect-error, forceCancel is not a standard event, but used for custom handling\n this.root.removeEventListener('forceCancel', this.handlePointerEvent);\n this.root.removeEventListener('blur', this.handleInterruptEvents);\n this.root.removeEventListener('contextmenu', this.handleInterruptEvents);\n this.pointers.clear();\n this.gestureHandlers.clear();\n }\n}","import { ActiveGesturesRegistry } from \"./ActiveGesturesRegistry.js\";\nimport { KeyboardManager } from \"./KeyboardManager.js\";\nimport { PointerManager } from \"./PointerManager.js\";\n\n/**\n * Configuration options for initializing the GestureManager\n */\n\n/**\n * The primary class responsible for setting up and managing gestures across multiple elements.\n *\n * GestureManager maintains a collection of gesture templates that can be instantiated for\n * specific DOM elements. It handles lifecycle management, event dispatching, and cleanup.\n *\n * @example\n * ```typescript\n * // Basic setup with default gestures\n * const manager = new GestureManager({\n * root: document.body,\n * touchAction: 'none',\n * gestures: [\n * new PanGesture({ name: 'pan' }),\n * ],\n * });\n *\n * // Register pan gestures on an element\n * const element = manager.registerElement('pan', document.querySelector('.draggable'));\n *\n * // Add event listeners with proper typing\n * element.addEventListener('panStart', (event) => {\n * console.log('Pan started');\n * });\n *\n * element.addEventListener('pan', (event) => {\n * console.log(`Pan delta: ${event.deltaX}, ${event.deltaY}`);\n * });\n *\n * // Custom gesture types\n * interface MyGestureEvents {\n * custom: { x: number, y: number }\n * }\n * const customManager = new GestureManager({\n * root: document.body\n * gestures: [\n * new CustomGesture({ name: 'custom' }),\n * ],\n * });\n * ```\n */\nexport class GestureManager {\n /** Repository of gesture templates that can be cloned for specific elements */\n gestureTemplates = (() => new Map())();\n\n /** Maps DOM elements to their active gesture instances */\n elementGestureMap = (() => new Map())();\n activeGesturesRegistry = (() => new ActiveGesturesRegistry())();\n keyboardManager = (() => new KeyboardManager())();\n\n /**\n * Create a new GestureManager instance to coordinate gesture recognition\n *\n * @param options - Configuration options for the gesture manager\n */\n constructor(options) {\n // Initialize the PointerManager\n this.pointerManager = new PointerManager({\n root: options.root,\n touchAction: options.touchAction,\n passive: options.passive\n });\n\n // Add initial gestures as templates if provided\n if (options.gestures && options.gestures.length > 0) {\n options.gestures.forEach(gesture => {\n this.addGestureTemplate(gesture);\n });\n }\n }\n\n /**\n * Add a gesture template to the manager's template registry.\n * Templates serve as prototypes that can be cloned for individual elements.\n *\n * @param gesture - The gesture instance to use as a template\n */\n addGestureTemplate(gesture) {\n if (this.gestureTemplates.has(gesture.name)) {\n console.warn(`Gesture template with name \"${gesture.name}\" already exists. It will be overwritten.`);\n }\n this.gestureTemplates.set(gesture.name, gesture);\n }\n\n /**\n * Updates the options for a specific gesture on a given element and emits a change event.\n *\n * @param gestureName - Name of the gesture whose options should be updated\n * @param element - The DOM element where the gesture is attached\n * @param options - New options to apply to the gesture\n * @returns True if the options were successfully updated, false if the gesture wasn't found\n *\n * @example\n * ```typescript\n * // Update pan gesture sensitivity on the fly\n * manager.setGestureOptions('pan', element, { threshold: 5 });\n * ```\n */\n setGestureOptions(gestureName, element, options) {\n const elementGestures = this.elementGestureMap.get(element);\n if (!elementGestures || !elementGestures.has(gestureName)) {\n console.error(`Gesture \"${gestureName}\" not found on the provided element.`);\n return;\n }\n const event = new CustomEvent(`${gestureName}ChangeOptions`, {\n detail: options,\n bubbles: false,\n cancelable: false,\n composed: false\n });\n element.dispatchEvent(event);\n }\n\n /**\n * Updates the state for a specific gesture on a given element and emits a change event.\n *\n * @param gestureName - Name of the gesture whose state should be updated\n * @param element - The DOM element where the gesture is attached\n * @param state - New state to apply to the gesture\n * @returns True if the state was successfully updated, false if the gesture wasn't found\n *\n * @example\n * ```typescript\n * // Update total delta for a turnWheel gesture\n * manager.setGestureState('turnWheel', element, { totalDeltaX: 10 });\n * ```\n */\n setGestureState(gestureName, element, state) {\n const elementGestures = this.elementGestureMap.get(element);\n if (!elementGestures || !elementGestures.has(gestureName)) {\n console.error(`Gesture \"${gestureName}\" not found on the provided element.`);\n return;\n }\n const event = new CustomEvent(`${gestureName}ChangeState`, {\n detail: state,\n bubbles: false,\n cancelable: false,\n composed: false\n });\n element.dispatchEvent(event);\n }\n\n /**\n * Register an element to recognize one or more gestures.\n *\n * This method clones the specified gesture template(s) and creates\n * gesture recognizer instance(s) specifically for the provided element.\n * The element is returned with enhanced TypeScript typing for gesture events.\n *\n * @param gestureNames - Name(s) of the gesture(s) to register (must match template names)\n * @param element - The DOM element to attach the gesture(s) to\n * @param options - Optional map of gesture-specific options to override when registering\n * @returns The same element with properly typed event listeners\n *\n * @example\n * ```typescript\n * // Register multiple gestures\n * const element = manager.registerElement(['pan', 'pinch'], myDiv);\n *\n * // Register a single gesture\n * const draggable = manager.registerElement('pan', dragHandle);\n *\n * // Register with customized options for each gesture\n * const customElement = manager.registerElement(\n * ['pan', 'pinch', 'rotate'],\n * myElement,\n * {\n * pan: { threshold: 20, direction: ['left', 'right'] },\n * pinch: { threshold: 0.1 }\n * }\n * );\n * ```\n */\n registerElement(gestureNames, element, options) {\n // Handle array of gesture names\n if (!Array.isArray(gestureNames)) {\n gestureNames = [gestureNames];\n }\n gestureNames.forEach(name => {\n const gestureOptions = options?.[name];\n this.registerSingleGesture(name, element, gestureOptions);\n });\n return element;\n }\n\n /**\n * Internal method to register a single gesture on an element.\n *\n * @param gestureName - Name of the gesture to register\n * @param element - DOM element to attach the gesture to\n * @param options - Optional options to override the gesture template configuration\n * @returns True if the registration was successful, false otherwise\n */\n registerSingleGesture(gestureName, element, options) {\n // Find the gesture template\n const gestureTemplate = this.gestureTemplates.get(gestureName);\n if (!gestureTemplate) {\n console.error(`Gesture template \"${gestureName}\" not found.`);\n return false;\n }\n\n // Create element's gesture map if it doesn't exist\n if (!this.elementGestureMap.has(element)) {\n this.elementGestureMap.set(element, new Map());\n }\n\n // Check if this element already has this gesture registered\n const elementGestures = this.elementGestureMap.get(element);\n if (elementGestures.has(gestureName)) {\n console.warn(`Element already has gesture \"${gestureName}\" registered. It will be replaced.`);\n // Unregister the existing gesture first\n this.unregisterElement(gestureName, element);\n }\n\n // Clone the gesture template and create a new instance with optional overrides\n // This allows each element to have its own state, event listeners, and configuration\n const gestureInstance = gestureTemplate.clone(options);\n gestureInstance.init(element, this.pointerManager, this.activeGesturesRegistry, this.keyboardManager);\n\n // Store the gesture in the element's gesture map\n elementGestures.set(gestureName, gestureInstance);\n return true;\n }\n\n /**\n * Unregister a specific gesture from an element.\n * This removes the gesture recognizer and stops event emission for that gesture.\n *\n * @param gestureName - Name of the gesture to unregister\n * @param element - The DOM element to remove the gesture from\n * @returns True if the gesture was found and removed, false otherwise\n */\n unregisterElement(gestureName, element) {\n const elementGestures = this.elementGestureMap.get(element);\n if (!elementGestures || !elementGestures.has(gestureName)) {\n return false;\n }\n\n // Destroy the gesture instance\n const gesture = elementGestures.get(gestureName);\n gesture.destroy();\n\n // Remove from the map\n elementGestures.delete(gestureName);\n this.activeGesturesRegistry.unregisterElement(element);\n\n // Remove the element from the map if it no longer has any gestures\n if (elementGestures.size === 0) {\n this.elementGestureMap.delete(element);\n }\n return true;\n }\n\n /**\n * Unregister all gestures from an element.\n * Completely removes the element from the gesture system.\n *\n * @param element - The DOM element to remove all gestures from\n */\n unregisterAllGestures(element) {\n const elementGestures = this.elementGestureMap.get(element);\n if (elementGestures) {\n // Unregister all gestures for this element\n for (const [, gesture] of elementGestures) {\n gesture.destroy();\n this.activeGesturesRegistry.unregisterElement(element);\n }\n\n // Clear the map\n this.elementGestureMap.delete(element);\n }\n }\n\n /**\n * Clean up all gestures and event listeners.\n * Call this method when the GestureManager is no longer needed to prevent memory leaks.\n */\n destroy() {\n // Unregister all element gestures\n for (const [element] of this.elementGestureMap) {\n this.unregisterAllGestures(element);\n }\n\n // Clear all templates\n this.gestureTemplates.clear();\n this.elementGestureMap.clear();\n this.activeGesturesRegistry.destroy();\n this.keyboardManager.destroy();\n this.pointerManager.destroy();\n }\n}","export const eventList = {\n abort: true,\n animationcancel: true,\n animationend: true,\n animationiteration: true,\n animationstart: true,\n auxclick: true,\n beforeinput: true,\n beforetoggle: true,\n blur: true,\n cancel: true,\n canplay: true,\n canplaythrough: true,\n change: true,\n click: true,\n close: true,\n compositionend: true,\n compositionstart: true,\n compositionupdate: true,\n contextlost: true,\n contextmenu: true,\n contextrestored: true,\n copy: true,\n cuechange: true,\n cut: true,\n dblclick: true,\n drag: true,\n dragend: true,\n dragenter: true,\n dragleave: true,\n dragover: true,\n dragstart: true,\n drop: true,\n durationchange: true,\n emptied: true,\n ended: true,\n error: true,\n focus: true,\n focusin: true,\n focusout: true,\n formdata: true,\n gotpointercapture: true,\n input: true,\n invalid: true,\n keydown: true,\n keypress: true,\n keyup: true,\n load: true,\n loadeddata: true,\n loadedmetadata: true,\n loadstart: true,\n lostpointercapture: true,\n mousedown: true,\n mouseenter: true,\n mouseleave: true,\n mousemove: true,\n mouseout: true,\n mouseover: true,\n mouseup: true,\n paste: true,\n pause: true,\n play: true,\n playing: true,\n pointercancel: true,\n pointerdown: true,\n pointerenter: true,\n pointerleave: true,\n pointermove: true,\n pointerout: true,\n pointerover: true,\n pointerup: true,\n progress: true,\n ratechange: true,\n reset: true,\n resize: true,\n scroll: true,\n scrollend: true,\n securitypolicyviolation: true,\n seeked: true,\n seeking: true,\n select: true,\n selectionchange: true,\n selectstart: true,\n slotchange: true,\n stalled: true,\n submit: true,\n suspend: true,\n timeupdate: true,\n toggle: true,\n touchcancel: true,\n touchend: true,\n touchmove: true,\n touchstart: true,\n transitioncancel: true,\n transitionend: true,\n transitionrun: true,\n transitionstart: true,\n volumechange: true,\n waiting: true,\n webkitanimationend: true,\n webkitanimationiteration: true,\n webkitanimationstart: true,\n webkittransitionend: true,\n wheel: true,\n beforematch: true,\n pointerrawupdate: true\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * Base Gesture module that provides common functionality for all gesture implementations\n */\n\nimport { eventList } from \"./utils/eventList.js\";\n\n/**\n * The possible phases of a gesture during its lifecycle.\n *\n * - 'start': The gesture has been recognized and is beginning\n * - 'ongoing': The gesture is in progress (e.g., a finger is moving)\n * - 'end': The gesture has completed successfully\n * - 'cancel': The gesture was interrupted or terminated abnormally\n */\n\n/**\n * Core data structure passed to gesture event handlers.\n * Contains all relevant information about a gesture event.\n */\n\n/**\n * Defines the types of pointers that can trigger a gesture.\n */\n\n/**\n * Base configuration options that can be overridden per pointer mode.\n */\n\n/**\n * Configuration options for creating a gesture instance.\n */\n\n// eslint-disable-next-line no-underscore-dangle, @typescript-eslint/naming-convention\n\n/**\n * Type for the state of a gesture recognizer.\n */\n\n/**\n * Base abstract class for all gestures. This class provides the fundamental structure\n * and functionality for handling gestures, including registering and unregistering\n * gesture handlers, creating emitters, and managing gesture state.\n *\n * Gesture is designed as an extensible base for implementing specific gesture recognizers.\n * Concrete gesture implementations should extend this class or one of its subclasses.\n *\n * To implement:\n * - Non-pointer gestures (like wheel events): extend this Gesture class directly\n * - Pointer-based gestures: extend the PointerGesture class instead\n *\n * @example\n * ```ts\n * import { Gesture } from './Gesture';\n *\n * class CustomGesture extends Gesture {\n * constructor(options) {\n * super(options);\n * }\n *\n * clone(overrides) {\n * return new CustomGesture({\n * name: this.name,\n * // ... other options\n * ...overrides,\n * });\n * }\n * }\n * ```\n */\nexport class Gesture {\n /** Unique name identifying this gesture type */\n\n /** Whether to prevent default browser action for gesture events */\n\n /** Whether to stop propagation of gesture events */\n\n /**\n * List of gesture names that should prevent this gesture from activating when they are active.\n */\n\n /**\n * Array of keyboard keys that must be pressed for the gesture to be recognized.\n */\n\n /**\n * KeyboardManager instance for tracking key presses\n */\n\n /**\n * List of pointer types that can trigger this gesture.\n * If undefined, all pointer types are allowed.\n */\n\n /**\n * Pointer mode-specific configuration overrides.\n */\n\n /**\n * User-mutable data object for sharing state between gesture events\n * This object is included in all events emitted by this gesture\n */\n customData = {};\n\n /** Reference to the singleton PointerManager instance */\n\n /** Reference to the singleton ActiveGesturesRegistry instance */\n\n /** The DOM element this gesture is attached to */\n\n /** Stores the active gesture state */\n\n /** @internal For types. If false enables phases (xStart, x, xEnd) */\n\n /** @internal For types. The event type this gesture is associated with */\n\n /** @internal For types. The options type for this gesture */\n\n /** @internal For types. The options that can be changed at runtime */\n\n /** @internal For types. The state that can be changed at runtime */\n\n /**\n * Create a new gesture instance with the specified options\n *\n * @param options - Configuration options for this gesture\n */\n constructor(options) {\n if (!options || !options.name) {\n throw new Error('Gesture must be initialized with a valid name.');\n }\n if (options.name in eventList) {\n throw new Error(`Gesture can't be created with a native event name. Tried to use \"${options.name}\". Please use a custom name instead.`);\n }\n this.name = options.name;\n this.preventDefault = options.preventDefault ?? false;\n this.stopPropagation = options.stopPropagation ?? false;\n this.preventIf = options.preventIf ?? [];\n this.requiredKeys = options.requiredKeys ?? [];\n this.pointerMode = options.pointerMode ?? [];\n this.pointerOptions = options.pointerOptions ?? {};\n }\n\n /**\n * Initialize the gesture by acquiring the pointer manager and gestures registry\n * Must be called before the gesture can be used\n */\n init(element, pointerManager, gestureRegistry, keyboardManager) {\n this.element = element;\n this.pointerManager = pointerManager;\n this.gesturesRegistry = gestureRegistry;\n this.keyboardManager = keyboardManager;\n const changeOptionsEventName = `${this.name}ChangeOptions`;\n this.element.addEventListener(changeOptionsEventName, this.handleOptionsChange);\n const changeStateEventName = `${this.name}ChangeState`;\n this.element.addEventListener(changeStateEventName, this.handleStateChange);\n }\n\n /**\n * Handle option change events\n * @param event Custom event with new options in the detail property\n */\n handleOptionsChange = event => {\n if (event && event.detail) {\n this.updateOptions(event.detail);\n }\n };\n\n /**\n * Update the gesture options with new values\n * @param options Object containing properties to update\n */\n updateOptions(options) {\n // Update common options\n this.preventDefault = options.preventDefault ?? this.preventDefault;\n this.stopPropagation = options.stopPropagation ?? this.stopPropagation;\n this.preventIf = options.preventIf ?? this.preventIf;\n this.requiredKeys = options.requiredKeys ?? this.requiredKeys;\n this.pointerMode = options.pointerMode ?? this.pointerMode;\n this.pointerOptions = options.pointerOptions ?? this.pointerOptions;\n }\n\n /**\n * Get the default configuration for the pointer specific options.\n * Change this function in child classes to provide different defaults.\n */\n getBaseConfig() {\n return {\n requiredKeys: this.requiredKeys\n };\n }\n\n /**\n * Get the effective configuration for a specific pointer mode.\n * This merges the base configuration with pointer mode-specific overrides.\n *\n * @param pointerType - The pointer type to get configuration for\n * @returns The effective configuration object\n */\n getEffectiveConfig(pointerType, baseConfig) {\n if (pointerType !== 'mouse' && pointerType !== 'touch' && pointerType !== 'pen') {\n // Unknown pointer type, return base config\n return baseConfig;\n }\n\n // Apply pointer mode-specific overrides\n const pointerModeOverrides = this.pointerOptions[pointerType];\n if (pointerModeOverrides) {\n return _extends({}, baseConfig, pointerModeOverrides);\n }\n return baseConfig;\n }\n\n /**\n * Handle state change events\n * @param event Custom event with new state values in the detail property\n */\n handleStateChange = event => {\n if (event && event.detail) {\n this.updateState(event.detail);\n }\n };\n\n /**\n * Update the gesture state with new values\n * @param stateChanges Object containing state properties to update\n */\n updateState(stateChanges) {\n // This is a base implementation - concrete gesture classes should override\n // to handle specific state updates based on their state structure\n Object.assign(this.state, stateChanges);\n }\n\n /**\n * Create a deep clone of this gesture for a new element\n *\n * @param overrides - Optional configuration options that override the defaults\n * @returns A new instance of this gesture with the same configuration and any overrides applied\n */\n\n /**\n * Check if the event's target is or is contained within any of our registered elements\n *\n * @param event - The browser event to check\n * @returns The matching element or null if no match is found\n */\n getTargetElement(event) {\n if (this.isActive || this.element === event.target || 'contains' in this.element && this.element.contains(event.target) || 'getRootNode' in this.element && this.element.getRootNode() instanceof ShadowRoot && event.composedPath().includes(this.element)) {\n return this.element;\n }\n return null;\n }\n\n /** Whether the gesture is currently active */\n set isActive(isActive) {\n if (isActive) {\n this.gesturesRegistry.registerActiveGesture(this.element, this);\n } else {\n this.gesturesRegistry.unregisterActiveGesture(this.element, this);\n }\n }\n\n /** Whether the gesture is currently active */\n get isActive() {\n return this.gesturesRegistry.isGestureActive(this.element, this) ?? false;\n }\n\n /**\n * Checks if this gesture should be prevented from activating.\n *\n * @param element - The DOM element to check against\n * @param pointerType - The type of pointer triggering the gesture\n * @returns true if the gesture should be prevented, false otherwise\n */\n shouldPreventGesture(element, pointerType) {\n // Get effective configuration for this pointer type\n const effectiveConfig = this.getEffectiveConfig(pointerType, this.getBaseConfig());\n\n // First check if required keyboard keys are pressed\n if (!this.keyboardManager.areKeysPressed(effectiveConfig.requiredKeys)) {\n return true; // Prevent the gesture if required keys are not pressed\n }\n if (this.preventIf.length === 0) {\n return false; // No prevention rules, allow the gesture\n }\n const activeGestures = this.gesturesRegistry.getActiveGestures(element);\n\n // Check if any of the gestures that would prevent this one are active\n return this.preventIf.some(gestureName => activeGestures[gestureName]);\n }\n\n /**\n * Checks if the given pointer type is allowed for this gesture based on the pointerMode setting.\n *\n * @param pointerType - The type of pointer to check.\n * @returns true if the pointer type is allowed, false otherwise.\n */\n isPointerTypeAllowed(pointerType) {\n // If no pointer mode is specified, all pointer types are allowed\n if (!this.pointerMode || this.pointerMode.length === 0) {\n return true;\n }\n\n // Check if the pointer type is in the allowed types list\n return this.pointerMode.includes(pointerType);\n }\n\n /**\n * Clean up the gesture and unregister any listeners\n * Call this method when the gesture is no longer needed to prevent memory leaks\n */\n destroy() {\n const changeOptionsEventName = `${this.name}ChangeOptions`;\n this.element.removeEventListener(changeOptionsEventName, this.handleOptionsChange);\n const changeStateEventName = `${this.name}ChangeState`;\n this.element.removeEventListener(changeStateEventName, this.handleStateChange);\n }\n\n /**\n * Reset the gesture state to its initial values\n */\n}","import { Gesture } from \"./Gesture.js\";\n\n/**\n * Base configuration options that can be overridden per pointer mode.\n */\n\n/**\n * Configuration options for pointer-based gestures, extending the base GestureOptions.\n *\n * These options provide fine-grained control over how pointer events are interpreted\n * and when the gesture should be recognized.\n */\n\n/**\n * Base class for all pointer-based gestures.\n *\n * This class extends the base Gesture class with specialized functionality for\n * handling pointer events via the PointerManager. It provides common logic for\n * determining when a gesture should activate, tracking pointer movements, and\n * managing pointer thresholds.\n *\n * All pointer-based gesture implementations should extend this class rather than\n * the base Gesture class.\n *\n * @example\n * ```ts\n * import { PointerGesture } from './PointerGesture';\n *\n * class CustomGesture extends PointerGesture {\n * constructor(options) {\n * super(options);\n * }\n *\n * clone(overrides) {\n * return new CustomGesture({\n * name: this.name,\n * // ... other options\n * ...overrides,\n * });\n * }\n *\n * handlePointerEvent = (pointers, event) => {\n * // Handle pointer events here\n * }\n * }\n * ```\n */\nexport class PointerGesture extends Gesture {\n /** Function to unregister from the PointerManager when destroying this gesture */\n unregisterHandler = null;\n\n /** The original target element when the gesture began, used to prevent limbo state if target is removed */\n originalTarget = null;\n\n /**\n * Minimum number of simultaneous pointers required to activate the gesture.\n * The gesture will not start until at least this many pointers are active.\n */\n\n /**\n * Maximum number of simultaneous pointers allowed for this gesture.\n * If more than this many pointers are detected, the gesture may be canceled.\n */\n\n constructor(options) {\n super(options);\n this.minPointers = options.minPointers ?? 1;\n this.maxPointers = options.maxPointers ?? Infinity;\n }\n init(element, pointerManager, gestureRegistry, keyboardManager) {\n super.init(element, pointerManager, gestureRegistry, keyboardManager);\n this.unregisterHandler = this.pointerManager.registerGestureHandler(this.handlePointerEvent);\n }\n updateOptions(options) {\n super.updateOptions(options);\n this.minPointers = options.minPointers ?? this.minPointers;\n this.maxPointers = options.maxPointers ?? this.maxPointers;\n }\n getBaseConfig() {\n return {\n requiredKeys: this.requiredKeys,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers\n };\n }\n isWithinPointerCount(pointers, pointerMode) {\n const config = this.getEffectiveConfig(pointerMode, this.getBaseConfig());\n return pointers.length >= config.minPointers && pointers.length <= config.maxPointers;\n }\n\n /**\n * Handler for pointer events from the PointerManager.\n * Concrete gesture implementations must override this method to provide\n * gesture-specific logic for recognizing and tracking the gesture.\n *\n * @param pointers - Map of active pointers by pointer ID\n * @param event - The original pointer event from the browser\n */\n\n /**\n * Calculate the target element for the gesture based on the active pointers.\n *\n * It takes into account the original target element.\n *\n * @param pointers - Map of active pointers by pointer ID\n * @param calculatedTarget - The target element calculated from getTargetElement\n * @returns A list of relevant pointers for this gesture\n */\n getRelevantPointers(pointers, calculatedTarget) {\n return pointers.filter(pointer => this.isPointerTypeAllowed(pointer.pointerType) && (calculatedTarget === pointer.target || pointer.target === this.originalTarget || calculatedTarget === this.originalTarget || 'contains' in calculatedTarget && calculatedTarget.contains(pointer.target)) || 'getRootNode' in calculatedTarget && calculatedTarget.getRootNode() instanceof ShadowRoot && pointer.srcEvent.composedPath().includes(calculatedTarget));\n }\n destroy() {\n if (this.unregisterHandler) {\n this.unregisterHandler();\n this.unregisterHandler = null;\n }\n super.destroy();\n }\n}","/**\n * Calculate the centroid (average position) of multiple pointers\n */\nexport function calculateCentroid(pointers) {\n if (pointers.length === 0) {\n return {\n x: 0,\n y: 0\n };\n }\n const sum = pointers.reduce((acc, pointer) => {\n acc.x += pointer.clientX;\n acc.y += pointer.clientY;\n return acc;\n }, {\n x: 0,\n y: 0\n });\n return {\n x: sum.x / pointers.length,\n y: sum.y / pointers.length\n };\n}","const MAIN_THRESHOLD = 0.00001;\nconst ANGLE_THRESHOLD = 0.00001;\nconst SECONDARY_THRESHOLD = 0.15;\n\n/**\n * Get the direction of movement based on the current and previous positions\n */\nexport function getDirection(previous, current) {\n const deltaX = current.x - previous.x;\n const deltaY = current.y - previous.y;\n const direction = {\n vertical: null,\n horizontal: null,\n mainAxis: null\n };\n const isDiagonal = isDiagonalMovement(current, previous);\n const mainMovement = Math.abs(deltaX) > Math.abs(deltaY) ? 'horizontal' : 'vertical';\n\n // eslint-disable-next-line no-nested-ternary\n const horizontalThreshold = isDiagonal ? MAIN_THRESHOLD : mainMovement === 'horizontal' ? MAIN_THRESHOLD : SECONDARY_THRESHOLD;\n // eslint-disable-next-line no-nested-ternary\n const verticalThreshold = isDiagonal ? MAIN_THRESHOLD : mainMovement === 'horizontal' ? SECONDARY_THRESHOLD : MAIN_THRESHOLD;\n\n // Set horizontal direction if there's a significant movement horizontally\n if (Math.abs(deltaX) > horizontalThreshold) {\n // Small threshold to avoid noise\n direction.horizontal = deltaX > 0 ? 'right' : 'left';\n }\n\n // Set vertical direction if there's a significant movement vertically\n if (Math.abs(deltaY) > verticalThreshold) {\n // Small threshold to avoid noise\n direction.vertical = deltaY > 0 ? 'down' : 'up';\n }\n direction.mainAxis = isDiagonal ? 'diagonal' : mainMovement;\n return direction;\n}\nfunction isDiagonalMovement(previous, current) {\n const deltaX = current.x - previous.x;\n const deltaY = current.y - previous.y;\n\n // Calculate the angle of movement\n const angle = Math.atan2(deltaY, deltaX) * 180 / Math.PI;\n\n // Check if the angle is within the diagonal range\n return angle >= -45 + ANGLE_THRESHOLD && angle <= -22.5 + ANGLE_THRESHOLD || angle >= 22.5 + ANGLE_THRESHOLD && angle <= 45 + ANGLE_THRESHOLD || angle >= 135 + ANGLE_THRESHOLD && angle <= 157.5 + ANGLE_THRESHOLD || angle >= -157.5 + ANGLE_THRESHOLD && angle <= -135 + ANGLE_THRESHOLD;\n}","/**\n * Creates the event name for a specific gesture and phase\n */\nexport function createEventName(gesture, phase) {\n return `${gesture}${phase === 'ongoing' ? '' : phase.charAt(0).toUpperCase() + phase.slice(1)}`;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * PanGesture - Detects panning (dragging) movements\n *\n * This gesture tracks pointer dragging movements across elements, firing events when:\n * - The drag movement begins and passes the threshold distance (start)\n * - The drag movement continues (ongoing)\n * - The drag movement ends (end)\n *\n * The gesture can be configured to recognize movement only in specific directions.\n */\n\nimport { PointerGesture } from \"../PointerGesture.js\";\nimport { calculateCentroid, createEventName, getDirection, isDirectionAllowed } from \"../utils/index.js\";\n\n/**\n * Configuration options for PanGesture\n * Extends PointerGestureOptions with direction constraints\n */\n\n/**\n * Event data specific to pan gesture events\n * Contains information about movement distance, direction, and velocity\n */\n\n/**\n * Type definition for the CustomEvent created by PanGesture\n */\n\n/**\n * State tracking for the PanGesture\n */\n\n/**\n * PanGesture class for handling panning/dragging interactions\n *\n * This gesture detects when users drag across elements with one or more pointers,\n * and dispatches directional movement events with delta and velocity information.\n */\nexport class PanGesture extends PointerGesture {\n state = (() => ({\n startPointers: new Map(),\n startCentroid: null,\n lastCentroid: null,\n movementThresholdReached: false,\n totalDeltaX: 0,\n totalDeltaY: 0,\n activeDeltaX: 0,\n activeDeltaY: 0,\n lastDirection: {\n vertical: null,\n horizontal: null,\n mainAxis: null\n },\n lastDeltas: null\n }))();\n\n /**\n * Movement threshold in pixels that must be exceeded before the gesture activates.\n * Higher values reduce false positive gesture detection for small movements.\n */\n\n /**\n * Allowed directions for the pan gesture\n * Default allows all directions\n */\n\n constructor(options) {\n super(options);\n this.direction = options.direction || ['up', 'down', 'left', 'right'];\n this.threshold = options.threshold || 0;\n }\n clone(overrides) {\n return new PanGesture(_extends({\n name: this.name,\n preventDefault: this.preventDefault,\n stopPropagation: this.stopPropagation,\n threshold: this.threshold,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n direction: [...this.direction],\n requiredKeys: [...this.requiredKeys],\n pointerMode: [...this.pointerMode],\n preventIf: [...this.preventIf],\n pointerOptions: structuredClone(this.pointerOptions)\n }, overrides));\n }\n destroy() {\n this.resetState();\n super.destroy();\n }\n updateOptions(options) {\n super.updateOptions(options);\n this.direction = options.direction || this.direction;\n this.threshold = options.threshold ?? this.threshold;\n }\n resetState() {\n this.isActive = false;\n this.state = _extends({}, this.state, {\n startPointers: new Map(),\n startCentroid: null,\n lastCentroid: null,\n lastDeltas: null,\n activeDeltaX: 0,\n activeDeltaY: 0,\n movementThresholdReached: false,\n lastDirection: {\n vertical: null,\n horizontal: null,\n mainAxis: null\n }\n });\n }\n\n /**\n * Handle pointer events for the pan gesture\n */\n handlePointerEvent = (pointers, event) => {\n const pointersArray = Array.from(pointers.values());\n\n // Check for our forceCancel event to handle interrupted gestures (from contextmenu, blur)\n if (event.type === 'forceCancel') {\n // Reset all active pan gestures when we get a force reset event\n this.cancel(event.target, pointersArray, event);\n return;\n }\n\n // Find which element (if any) is being targeted\n const targetElement = this.getTargetElement(event);\n if (!targetElement) {\n return;\n }\n\n // Check if this gesture should be prevented by active gestures\n if (this.shouldPreventGesture(targetElement, event.pointerType)) {\n // If the gesture was active but now should be prevented, cancel it gracefully\n this.cancel(targetElement, pointersArray, event);\n return;\n }\n\n // Filter pointers to only include those targeting our element or its children\n const relevantPointers = this.getRelevantPointers(pointersArray, targetElement);\n if (!this.isWithinPointerCount(relevantPointers, event.pointerType)) {\n // Cancel or end the gesture if it was active\n this.cancel(targetElement, relevantPointers, event);\n return;\n }\n switch (event.type) {\n case 'pointerdown':\n if (!this.isActive && !this.state.startCentroid) {\n // Store initial pointers\n relevantPointers.forEach(pointer => {\n this.state.startPointers.set(pointer.pointerId, pointer);\n });\n\n // Store the original target element\n this.originalTarget = targetElement;\n\n // Calculate and store the starting centroid\n this.state.startCentroid = calculateCentroid(relevantPointers);\n this.state.lastCentroid = _extends({}, this.state.startCentroid);\n } else if (this.state.startCentroid && this.state.lastCentroid) {\n // A new pointer was added during an active gesture\n // Adjust the start centroid to prevent jumping\n const oldCentroid = this.state.lastCentroid;\n const newCentroid = calculateCentroid(relevantPointers);\n\n // Calculate the offset that the new pointer would cause\n const offsetX = newCentroid.x - oldCentroid.x;\n const offsetY = newCentroid.y - oldCentroid.y;\n\n // Adjust start centroid to compensate for the new pointer\n this.state.startCentroid = {\n x: this.state.startCentroid.x + offsetX,\n y: this.state.startCentroid.y + offsetY\n };\n this.state.lastCentroid = newCentroid;\n\n // Add the new pointer to tracked pointers\n relevantPointers.forEach(pointer => {\n if (!this.state.startPointers.has(pointer.pointerId)) {\n this.state.startPointers.set(pointer.pointerId, pointer);\n }\n });\n }\n break;\n case 'pointermove':\n if (this.state.startCentroid && this.isWithinPointerCount(pointersArray, event.pointerType)) {\n // Calculate current centroid\n const currentCentroid = calculateCentroid(relevantPointers);\n\n // Calculate delta from start\n const distanceDeltaX = currentCentroid.x - this.state.startCentroid.x;\n const distanceDeltaY = currentCentroid.y - this.state.startCentroid.y;\n\n // Calculate movement distance\n const distance = Math.sqrt(distanceDeltaX * distanceDeltaX + distanceDeltaY * distanceDeltaY);\n\n // Determine movement direction\n const moveDirection = getDirection(this.state.lastCentroid ?? this.state.startCentroid, currentCentroid);\n\n // Calculate change in position since last move\n const lastDeltaX = this.state.lastCentroid ? currentCentroid.x - this.state.lastCentroid.x : 0;\n const lastDeltaY = this.state.lastCentroid ? currentCentroid.y - this.state.lastCentroid.y : 0;\n\n // Check if movement passes the threshold and is in an allowed direction\n if (!this.state.movementThresholdReached && distance >= this.threshold && isDirectionAllowed(moveDirection, this.direction)) {\n this.state.movementThresholdReached = true;\n this.isActive = true;\n\n // Update total accumulated delta\n this.state.lastDeltas = {\n x: lastDeltaX,\n y: lastDeltaY\n };\n this.state.totalDeltaX += lastDeltaX;\n this.state.totalDeltaY += lastDeltaY;\n this.state.activeDeltaX += lastDeltaX;\n this.state.activeDeltaY += lastDeltaY;\n\n // Emit start event\n this.emitPanEvent(targetElement, 'start', relevantPointers, event, currentCentroid);\n this.emitPanEvent(targetElement, 'ongoing', relevantPointers, event, currentCentroid);\n }\n // If we've already crossed the threshold, continue tracking\n else if (this.state.movementThresholdReached && this.isActive) {\n // Update total accumulated delta\n this.state.lastDeltas = {\n x: lastDeltaX,\n y: lastDeltaY\n };\n this.state.totalDeltaX += lastDeltaX;\n this.state.totalDeltaY += lastDeltaY;\n this.state.activeDeltaX += lastDeltaX;\n this.state.activeDeltaY += lastDeltaY;\n\n // Emit ongoing event\n this.emitPanEvent(targetElement, 'ongoing', relevantPointers, event, currentCentroid);\n }\n\n // Update last centroid\n this.state.lastCentroid = currentCentroid;\n this.state.lastDirection = moveDirection;\n }\n break;\n case 'pointerup':\n case 'pointercancel':\n case 'forceCancel':\n // If the gesture was active (threshold was reached), emit end event\n if (this.isActive && this.state.movementThresholdReached) {\n const remainingPointers = relevantPointers.filter(p => p.type !== 'pointerup' && p.type !== 'pointercancel');\n\n // If we no longer meet the pointer count requirements, end the gesture\n if (!this.isWithinPointerCount(remainingPointers, event.pointerType)) {\n // End the gesture\n const currentCentroid = this.state.lastCentroid || this.state.startCentroid;\n if (event.type === 'pointercancel') {\n this.emitPanEvent(targetElement, 'cancel', relevantPointers, event, currentCentroid);\n }\n this.emitPanEvent(targetElement, 'end', relevantPointers, event, currentCentroid);\n this.resetState();\n } else if (remainingPointers.length >= 1 && this.state.lastCentroid) {\n // If we still have enough pointers, adjust the centroid\n // to prevent jumping when a finger is lifted\n const newCentroid = calculateCentroid(remainingPointers);\n\n // Calculate the offset that removing the pointer would cause\n const offsetX = newCentroid.x - this.state.lastCentroid.x;\n const offsetY = newCentroid.y - this.state.lastCentroid.y;\n\n // Adjust start centroid to compensate\n this.state.startCentroid = {\n x: this.state.startCentroid.x + offsetX,\n y: this.state.startCentroid.y + offsetY\n };\n this.state.lastCentroid = newCentroid;\n\n // Remove the pointer from tracked pointers\n const removedPointerId = relevantPointers.find(p => p.type === 'pointerup' || p.type === 'pointercancel')?.pointerId;\n if (removedPointerId !== undefined) {\n this.state.startPointers.delete(removedPointerId);\n }\n }\n } else {\n this.resetState();\n }\n break;\n default:\n break;\n }\n };\n\n /**\n * Emit pan-specific events with additional data\n */\n emitPanEvent(element, phase, pointers, event, currentCentroid) {\n if (!this.state.startCentroid) {\n return;\n }\n const deltaX = this.state.lastDeltas?.x ?? 0;\n const deltaY = this.state.lastDeltas?.y ?? 0;\n\n // Calculate velocity - time difference in seconds\n const firstPointer = this.state.startPointers.values().next().value;\n const timeElapsed = firstPointer ? (event.timeStamp - firstPointer.timeStamp) / 1000 : 0;\n const velocityX = timeElapsed > 0 ? deltaX / timeElapsed : 0;\n const velocityY = timeElapsed > 0 ? deltaY / timeElapsed : 0;\n const velocity = Math.sqrt(velocityX * velocityX + velocityY * velocityY);\n\n // Get list of active gestures\n const activeGestures = this.gesturesRegistry.getActiveGestures(element);\n\n // Create custom event data\n const customEventData = {\n gestureName: this.name,\n initialCentroid: this.state.startCentroid,\n centroid: currentCentroid,\n target: event.target,\n srcEvent: event,\n phase,\n pointers,\n timeStamp: event.timeStamp,\n deltaX,\n deltaY,\n direction: this.state.lastDirection,\n velocityX,\n velocityY,\n velocity,\n totalDeltaX: this.state.totalDeltaX,\n totalDeltaY: this.state.totalDeltaY,\n activeDeltaX: this.state.activeDeltaX,\n activeDeltaY: this.state.activeDeltaY,\n activeGestures,\n customData: this.customData\n };\n\n // Event names to trigger\n const eventName = createEventName(this.name, phase);\n\n // Dispatch custom events on the element\n const domEvent = new CustomEvent(eventName, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: customEventData\n });\n element.dispatchEvent(domEvent);\n\n // Apply preventDefault/stopPropagation if configured\n if (this.preventDefault) {\n event.preventDefault();\n }\n if (this.stopPropagation) {\n event.stopPropagation();\n }\n }\n\n /**\n * Cancel the current gesture\n */\n cancel(element, pointers, event) {\n if (this.isActive) {\n const el = element ?? this.element;\n this.emitPanEvent(el, 'cancel', pointers, event, this.state.lastCentroid);\n this.emitPanEvent(el, 'end', pointers, event, this.state.lastCentroid);\n }\n this.resetState();\n }\n}","/**\n * Check if a direction matches one of the allowed directions\n */\nexport function isDirectionAllowed(direction, allowedDirections) {\n if (!direction.vertical && !direction.horizontal) {\n return false;\n }\n if (allowedDirections.length === 0) {\n return true;\n }\n\n // Check if the vertical direction is allowed (if it exists)\n const verticalAllowed = direction.vertical === null || allowedDirections.includes(direction.vertical);\n\n // Check if the horizontal direction is allowed (if it exists)\n const horizontalAllowed = direction.horizontal === null || allowedDirections.includes(direction.horizontal);\n\n // Both directions must be allowed\n return verticalAllowed && horizontalAllowed;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * MoveGesture - Detects when a pointer enters, moves within, and leaves an element\n *\n * This gesture tracks pointer movements over an element, firing events when:\n * - A pointer enters the element (start)\n * - A pointer moves within the element (ongoing)\n * - A pointer leaves the element (end)\n *\n * Unlike other gestures which often require specific actions to trigger,\n * the move gesture fires automatically when pointers interact with the target element.\n *\n * This gesture only works with mouse pointers, not touch or pen.\n */\n\nimport { PointerGesture } from \"../PointerGesture.js\";\nimport { calculateCentroid, createEventName } from \"../utils/index.js\";\n\n/**\n * Configuration options for the MoveGesture\n * Extends the base PointerGestureOptions\n */\n\n/**\n * Event data specific to move gesture events\n * Includes the source pointer event and standard gesture data\n */\n\n/**\n * Type definition for the CustomEvent created by MoveGesture\n */\n\n/**\n * State tracking for the MoveGesture\n */\n\n/**\n * MoveGesture class for handling pointer movement over elements\n *\n * This gesture detects when pointers enter, move within, or leave target elements,\n * and dispatches corresponding custom events.\n *\n * This gesture only works with hovering mouse pointers, not touch.\n */\nexport class MoveGesture extends PointerGesture {\n state = {\n lastPosition: null\n };\n\n /**\n * Movement threshold in pixels that must be exceeded before the gesture activates.\n * Higher values reduce false positive gesture detection for small movements.\n */\n\n constructor(options) {\n super(options);\n this.threshold = options.threshold || 0;\n }\n clone(overrides) {\n return new MoveGesture(_extends({\n name: this.name,\n preventDefault: this.preventDefault,\n stopPropagation: this.stopPropagation,\n threshold: this.threshold,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n requiredKeys: [...this.requiredKeys],\n pointerMode: [...this.pointerMode],\n preventIf: [...this.preventIf],\n pointerOptions: structuredClone(this.pointerOptions)\n }, overrides));\n }\n init(element, pointerManager, gestureRegistry, keyboardManager) {\n super.init(element, pointerManager, gestureRegistry, keyboardManager);\n\n // Add event listeners for entering and leaving elements\n // These are different from pointer events handled by PointerManager\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener('pointerenter', this.handleElementEnter);\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener('pointerleave', this.handleElementLeave);\n }\n destroy() {\n // Remove event listeners using the same function references\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener('pointerenter', this.handleElementEnter);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener('pointerleave', this.handleElementLeave);\n this.resetState();\n super.destroy();\n }\n updateOptions(options) {\n // Call parent method to handle common options\n super.updateOptions(options);\n }\n resetState() {\n this.isActive = false;\n this.state = {\n lastPosition: null\n };\n }\n\n /**\n * Handle pointer enter events for a specific element\n * @param event The original pointer event\n */\n handleElementEnter = event => {\n if (event.pointerType !== 'mouse' && event.pointerType !== 'pen') {\n return;\n }\n\n // Get pointers from the PointerManager\n const pointers = this.pointerManager.getPointers() || new Map();\n const pointersArray = Array.from(pointers.values());\n\n // Only activate if we're within pointer count constraints\n if (this.isWithinPointerCount(pointersArray, event.pointerType)) {\n this.isActive = true;\n const currentPosition = {\n x: event.clientX,\n y: event.clientY\n };\n this.state.lastPosition = currentPosition;\n\n // Emit start event\n this.emitMoveEvent(this.element, 'start', pointersArray, event);\n this.emitMoveEvent(this.element, 'ongoing', pointersArray, event);\n }\n };\n\n /**\n * Handle pointer leave events for a specific element\n * @param event The original pointer event\n */\n handleElementLeave = event => {\n if (event.pointerType !== 'mouse' && event.pointerType !== 'pen') {\n return;\n }\n if (!this.isActive) {\n return;\n }\n\n // Get pointers from the PointerManager\n const pointers = this.pointerManager.getPointers() || new Map();\n const pointersArray = Array.from(pointers.values());\n\n // Emit end event and reset state\n this.emitMoveEvent(this.element, 'end', pointersArray, event);\n this.resetState();\n };\n\n /**\n * Handle pointer events for the move gesture (only handles move events now)\n * @param pointers Map of active pointers\n * @param event The original pointer event\n */\n handlePointerEvent = (pointers, event) => {\n if (event.type !== 'pointermove' || event.pointerType !== 'mouse' && event.pointerType !== 'pen') {\n return;\n }\n if (this.preventDefault) {\n event.preventDefault();\n }\n if (this.stopPropagation) {\n event.stopPropagation();\n }\n const pointersArray = Array.from(pointers.values());\n\n // Find which element (if any) is being targeted\n const targetElement = this.getTargetElement(event);\n if (!targetElement) {\n return;\n }\n if (!this.isWithinPointerCount(pointersArray, event.pointerType)) {\n return;\n }\n if (this.shouldPreventGesture(targetElement, event.pointerType)) {\n if (!this.isActive) {\n return;\n }\n this.resetState();\n this.emitMoveEvent(targetElement, 'end', pointersArray, event);\n return;\n }\n\n // Update position\n const currentPosition = {\n x: event.clientX,\n y: event.clientY\n };\n this.state.lastPosition = currentPosition;\n if (!this.isActive) {\n this.isActive = true;\n this.emitMoveEvent(targetElement, 'start', pointersArray, event);\n }\n // Emit ongoing event\n this.emitMoveEvent(targetElement, 'ongoing', pointersArray, event);\n };\n\n /**\n * Emit move-specific events\n * @param element The DOM element the event is related to\n * @param phase The current phase of the gesture (start, ongoing, end)\n * @param pointers Array of active pointers\n * @param event The original pointer event\n */\n emitMoveEvent(element, phase, pointers, event) {\n const currentPosition = this.state.lastPosition || calculateCentroid(pointers);\n\n // Get list of active gestures\n const activeGestures = this.gesturesRegistry.getActiveGestures(element);\n\n // Create custom event data\n const customEventData = {\n gestureName: this.name,\n centroid: currentPosition,\n target: event.target,\n srcEvent: event,\n phase,\n pointers,\n timeStamp: event.timeStamp,\n activeGestures,\n customData: this.customData\n };\n\n // Event names to trigger\n const eventName = createEventName(this.name, phase);\n\n // Dispatch custom events on the element\n const domEvent = new CustomEvent(eventName, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: customEventData\n });\n element.dispatchEvent(domEvent);\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * TapGesture - Detects tap (quick touch without movement) gestures\n *\n * This gesture tracks simple tap interactions on elements, firing a single event when:\n * - A complete tap is detected (pointerup after brief touch without excessive movement)\n * - The tap is canceled (event.g., moved too far or held too long)\n */\n\nimport { PointerGesture } from \"../PointerGesture.js\";\nimport { calculateCentroid, createEventName } from \"../utils/index.js\";\n\n/**\n * Configuration options for TapGesture\n * Extends PointerGestureOptions with tap-specific settings\n */\n\n/**\n * Event data specific to tap gesture events\n * Contains information about the tap location and counts\n */\n\n/**\n * Type definition for the CustomEvent created by TapGesture\n */\n\n/**\n * State tracking for the TapGesture\n */\n\n/**\n * TapGesture class for handling tap interactions\n *\n * This gesture detects when users tap on elements without significant movement,\n * and can recognize single taps, double taps, or other multi-tap sequences.\n */\nexport class TapGesture extends PointerGesture {\n state = {\n startCentroid: null,\n currentTapCount: 0,\n lastTapTime: 0,\n lastPosition: null\n };\n\n /**\n * Maximum distance a pointer can move for a gesture to still be considered a tap\n */\n\n /**\n * Number of consecutive taps to detect\n */\n\n constructor(options) {\n super(options);\n this.maxDistance = options.maxDistance ?? 10;\n this.taps = options.taps ?? 1;\n }\n clone(overrides) {\n return new TapGesture(_extends({\n name: this.name,\n preventDefault: this.preventDefault,\n stopPropagation: this.stopPropagation,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n maxDistance: this.maxDistance,\n taps: this.taps,\n requiredKeys: [...this.requiredKeys],\n pointerMode: [...this.pointerMode],\n preventIf: [...this.preventIf],\n pointerOptions: structuredClone(this.pointerOptions)\n }, overrides));\n }\n destroy() {\n this.resetState();\n super.destroy();\n }\n updateOptions(options) {\n super.updateOptions(options);\n this.maxDistance = options.maxDistance ?? this.maxDistance;\n this.taps = options.taps ?? this.taps;\n }\n resetState() {\n this.isActive = false;\n this.state = {\n startCentroid: null,\n currentTapCount: 0,\n lastTapTime: 0,\n lastPosition: null\n };\n }\n\n /**\n * Handle pointer events for the tap gesture\n */\n handlePointerEvent = (pointers, event) => {\n const pointersArray = Array.from(pointers.values());\n\n // Find which element (if any) is being targeted\n const targetElement = this.getTargetElement(event);\n if (!targetElement) {\n return;\n }\n\n // Filter pointers to only include those targeting our element or its children\n const relevantPointers = this.getRelevantPointers(pointersArray, targetElement);\n if (this.shouldPreventGesture(targetElement, event.pointerType) || !this.isWithinPointerCount(relevantPointers, event.pointerType)) {\n if (this.isActive) {\n // Cancel the gesture if it was active\n this.cancelTap(targetElement, relevantPointers, event);\n }\n return;\n }\n switch (event.type) {\n case 'pointerdown':\n if (!this.isActive) {\n // Calculate and store the starting centroid\n this.state.startCentroid = calculateCentroid(relevantPointers);\n this.state.lastPosition = _extends({}, this.state.startCentroid);\n this.isActive = true;\n\n // Store the original target element\n this.originalTarget = targetElement;\n }\n break;\n case 'pointermove':\n if (this.isActive && this.state.startCentroid) {\n // Calculate current position\n const currentPosition = calculateCentroid(relevantPointers);\n this.state.lastPosition = currentPosition;\n\n // Calculate distance from start position\n const deltaX = currentPosition.x - this.state.startCentroid.x;\n const deltaY = currentPosition.y - this.state.startCentroid.y;\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n\n // If moved too far, cancel the tap gesture\n if (distance > this.maxDistance) {\n this.cancelTap(targetElement, relevantPointers, event);\n }\n }\n break;\n case 'pointerup':\n if (this.isActive) {\n // For valid tap: increment tap count\n this.state.currentTapCount += 1;\n\n // Make sure we have a valid position before firing the tap event\n const position = this.state.lastPosition || this.state.startCentroid;\n if (!position) {\n this.cancelTap(targetElement, relevantPointers, event);\n return;\n }\n\n // Check if we've reached the desired number of taps\n if (this.state.currentTapCount >= this.taps) {\n // The complete tap sequence has been detected - fire the tap event\n this.fireTapEvent(targetElement, relevantPointers, event, position);\n\n // Reset state after successful tap\n this.resetState();\n } else {\n // Store the time of this tap for multi-tap detection\n this.state.lastTapTime = event.timeStamp;\n\n // Reset active state but keep the tap count for multi-tap detection\n this.isActive = false;\n\n // For multi-tap detection: keep track of the last tap position\n // but clear the start centroid to prepare for next tap\n this.state.startCentroid = null;\n\n // Start a timeout to reset the tap count if the next tap doesn't come soon enough\n setTimeout(() => {\n if (this.state && this.state.currentTapCount > 0 && this.state.currentTapCount < this.taps) {\n this.state.currentTapCount = 0;\n }\n }, 300); // 300ms is a typical double-tap detection window\n }\n }\n break;\n case 'pointercancel':\n case 'forceCancel':\n // Cancel the gesture\n this.cancelTap(targetElement, relevantPointers, event);\n break;\n default:\n break;\n }\n };\n\n /**\n * Fire the main tap event when a valid tap is detected\n */\n fireTapEvent(element, pointers, event, position) {\n // Get list of active gestures\n const activeGestures = this.gesturesRegistry.getActiveGestures(element);\n\n // Create custom event data for the tap event\n const customEventData = {\n gestureName: this.name,\n centroid: position,\n target: event.target,\n srcEvent: event,\n phase: 'end',\n // The tap is complete, so we use 'end' state for the event data\n pointers,\n timeStamp: event.timeStamp,\n x: position.x,\n y: position.y,\n tapCount: this.state.currentTapCount,\n activeGestures,\n customData: this.customData\n };\n\n // Dispatch a single 'tap' event (not 'tapStart', 'tapEnd', etc.)\n const domEvent = new CustomEvent(this.name, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: customEventData\n });\n element.dispatchEvent(domEvent);\n\n // Apply preventDefault/stopPropagation if configured\n if (this.preventDefault) {\n event.preventDefault();\n }\n if (this.stopPropagation) {\n event.stopPropagation();\n }\n }\n\n /**\n * Cancel the current tap gesture\n */\n cancelTap(element, pointers, event) {\n if (this.state.startCentroid || this.state.lastPosition) {\n const position = this.state.lastPosition || this.state.startCentroid;\n\n // Get list of active gestures\n const activeGestures = this.gesturesRegistry.getActiveGestures(element);\n\n // Create custom event data for the cancel event\n const customEventData = {\n gestureName: this.name,\n centroid: position,\n target: event.target,\n srcEvent: event,\n phase: 'cancel',\n pointers,\n timeStamp: event.timeStamp,\n x: position.x,\n y: position.y,\n tapCount: this.state.currentTapCount,\n activeGestures,\n customData: this.customData\n };\n\n // Dispatch a 'tapCancel' event\n const eventName = createEventName(this.name, 'cancel');\n const domEvent = new CustomEvent(eventName, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: customEventData\n });\n element.dispatchEvent(domEvent);\n }\n this.resetState();\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * PressGesture - Detects press and hold interactions\n *\n * This gesture tracks when users press and hold on an element for a specified duration, firing events when:\n * - The press begins and passes the holding threshold time (start, ongoing)\n * - The press ends (end)\n * - The press is canceled by movement beyond threshold (cancel)\n *\n * This gesture is commonly used for contextual menus, revealing additional options, or alternate actions.\n */\n\nimport { PointerGesture } from \"../PointerGesture.js\";\nimport { calculateCentroid, createEventName } from \"../utils/index.js\";\n\n/**\n * Configuration options for PressGesture\n * Extends PointerGestureOptions with press-specific options\n */\n\n/**\n * Event data specific to press gesture events\n * Contains information about the press location and duration\n */\n\n/**\n * Type definition for the CustomEvent created by PressGesture\n */\n\n/**\n * State tracking for the PressGesture\n */\n\n/**\n * PressGesture class for handling press/hold interactions\n *\n * This gesture detects when users press and hold on an element for a specified duration,\n * and dispatches press-related events when the user holds long enough.\n *\n * The `start` and `ongoing` events are dispatched at the same time once the press threshold is reached.\n * If the press is canceled (event.g., by moving too far), a `cancel` event is dispatched before the `end` event.\n */\nexport class PressGesture extends PointerGesture {\n state = {\n startCentroid: null,\n lastPosition: null,\n timerId: null,\n startTime: 0,\n pressThresholdReached: false\n };\n\n /**\n * Duration in milliseconds required to hold before the press gesture is recognized\n */\n\n /**\n * Maximum distance a pointer can move for a gesture to still be considered a press\n */\n\n constructor(options) {\n super(options);\n this.duration = options.duration ?? 500;\n this.maxDistance = options.maxDistance ?? 10;\n }\n clone(overrides) {\n return new PressGesture(_extends({\n name: this.name,\n preventDefault: this.preventDefault,\n stopPropagation: this.stopPropagation,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n duration: this.duration,\n maxDistance: this.maxDistance,\n requiredKeys: [...this.requiredKeys],\n pointerMode: [...this.pointerMode],\n preventIf: [...this.preventIf],\n pointerOptions: structuredClone(this.pointerOptions)\n }, overrides));\n }\n destroy() {\n this.clearPressTimer();\n this.resetState();\n super.destroy();\n }\n updateOptions(options) {\n super.updateOptions(options);\n this.duration = options.duration ?? this.duration;\n this.maxDistance = options.maxDistance ?? this.maxDistance;\n }\n resetState() {\n this.clearPressTimer();\n this.isActive = false;\n this.state = _extends({}, this.state, {\n startCentroid: null,\n lastPosition: null,\n timerId: null,\n startTime: 0,\n pressThresholdReached: false\n });\n }\n\n /**\n * Clear the press timer if it's active\n */\n clearPressTimer() {\n if (this.state.timerId !== null) {\n clearTimeout(this.state.timerId);\n this.state.timerId = null;\n }\n }\n\n /**\n * Handle pointer events for the press gesture\n */\n handlePointerEvent = (pointers, event) => {\n const pointersArray = Array.from(pointers.values());\n\n // Check for our forceCancel event to handle interrupted gestures (from contextmenu, blur)\n if (event.type === 'forceCancel') {\n // Reset all active press gestures when we get a force reset event\n this.cancelPress(event.target, pointersArray, event);\n return;\n }\n\n // Find which element (if any) is being targeted\n const targetElement = this.getTargetElement(event);\n if (!targetElement) {\n return;\n }\n\n // Check if this gesture should be prevented by active gestures\n if (this.shouldPreventGesture(targetElement, event.pointerType)) {\n if (this.isActive) {\n // If the gesture was active but now should be prevented, cancel it gracefully\n this.cancelPress(targetElement, pointersArray, event);\n }\n return;\n }\n\n // Filter pointers to only include those targeting our element or its children\n const relevantPointers = this.getRelevantPointers(pointersArray, targetElement);\n if (!this.isWithinPointerCount(relevantPointers, event.pointerType)) {\n if (this.isActive) {\n // Cancel or end the gesture if it was active\n this.cancelPress(targetElement, relevantPointers, event);\n }\n return;\n }\n switch (event.type) {\n case 'pointerdown':\n if (!this.isActive && !this.state.startCentroid) {\n // Calculate and store the starting centroid\n this.state.startCentroid = calculateCentroid(relevantPointers);\n this.state.lastPosition = _extends({}, this.state.startCentroid);\n this.state.startTime = event.timeStamp;\n this.isActive = true;\n\n // Store the original target element\n this.originalTarget = targetElement;\n\n // Start the timer for press recognition\n this.clearPressTimer(); // Clear any existing timer first\n this.state.timerId = setTimeout(() => {\n if (this.isActive && this.state.startCentroid) {\n this.state.pressThresholdReached = true;\n const lastPosition = this.state.lastPosition;\n\n // Emit press start event\n this.emitPressEvent(targetElement, 'start', relevantPointers, event, lastPosition);\n this.emitPressEvent(targetElement, 'ongoing', relevantPointers, event, lastPosition);\n }\n }, this.duration);\n }\n break;\n case 'pointermove':\n if (this.isActive && this.state.startCentroid) {\n // Calculate current position\n const currentPosition = calculateCentroid(relevantPointers);\n this.state.lastPosition = currentPosition;\n\n // Calculate distance from start position\n const deltaX = currentPosition.x - this.state.startCentroid.x;\n const deltaY = currentPosition.y - this.state.startCentroid.y;\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n\n // If moved too far, cancel the press gesture\n if (distance > this.maxDistance) {\n this.cancelPress(targetElement, relevantPointers, event);\n }\n }\n break;\n case 'pointerup':\n if (this.isActive) {\n if (this.state.pressThresholdReached) {\n // Complete the press gesture if we've held long enough\n const position = this.state.lastPosition || this.state.startCentroid;\n this.emitPressEvent(targetElement, 'end', relevantPointers, event, position);\n }\n\n // Reset state\n this.resetState();\n }\n break;\n case 'pointercancel':\n case 'forceCancel':\n // Cancel the gesture\n this.cancelPress(targetElement, relevantPointers, event);\n break;\n default:\n break;\n }\n };\n\n /**\n * Emit press-specific events with additional data\n */\n emitPressEvent(element, phase, pointers, event, position) {\n // Get list of active gestures\n const activeGestures = this.gesturesRegistry.getActiveGestures(element);\n\n // Calculate current duration of the press\n const currentDuration = event.timeStamp - this.state.startTime;\n\n // Create custom event data\n const customEventData = {\n gestureName: this.name,\n centroid: position,\n target: event.target,\n srcEvent: event,\n phase,\n pointers,\n timeStamp: event.timeStamp,\n x: position.x,\n y: position.y,\n duration: currentDuration,\n activeGestures,\n customData: this.customData\n };\n\n // Event names to trigger\n const eventName = createEventName(this.name, phase);\n\n // Dispatch custom events on the element\n const domEvent = new CustomEvent(eventName, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: customEventData\n });\n element.dispatchEvent(domEvent);\n\n // Apply preventDefault/stopPropagation if configured\n if (this.preventDefault) {\n event.preventDefault();\n }\n if (this.stopPropagation) {\n event.stopPropagation();\n }\n }\n\n /**\n * Cancel the current press gesture\n */\n cancelPress(element, pointers, event) {\n if (this.isActive && this.state.pressThresholdReached) {\n const position = this.state.lastPosition || this.state.startCentroid;\n this.emitPressEvent(element ?? this.element, 'cancel', pointers, event, position);\n this.emitPressEvent(element ?? this.element, 'end', pointers, event, position);\n }\n this.resetState();\n }\n}","/**\n * Calculate the distance between two points\n */\nexport function getDistance(pointA, pointB) {\n const deltaX = pointB.x - pointA.x;\n const deltaY = pointB.y - pointA.y;\n return Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n}","import { getDistance } from \"./getDistance.js\";\n\n/**\n * Calculate the average distance between all pairs of pointers\n */\nexport function calculateAverageDistance(pointers) {\n if (pointers.length < 2) {\n return 0;\n }\n let totalDistance = 0;\n let pairCount = 0;\n\n // Calculate distance between each pair of pointers\n for (let i = 0; i < pointers.length; i += 1) {\n for (let j = i + 1; j < pointers.length; j += 1) {\n totalDistance += getDistance({\n x: pointers[i].clientX,\n y: pointers[i].clientY\n }, {\n x: pointers[j].clientX,\n y: pointers[j].clientY\n });\n pairCount += 1;\n }\n }\n\n // Return average distance\n return pairCount > 0 ? totalDistance / pairCount : 0;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * PinchGesture - Detects pinch (zoom) movements with two or more pointers\n *\n * This gesture tracks when multiple pointers move toward or away from each other, firing events when:\n * - Two or more pointers begin moving (start)\n * - The pointers continue changing distance (ongoing)\n * - One or more pointers are released or lifted (end)\n *\n * This gesture is commonly used to implement zoom functionality in touch interfaces.\n */\n\nimport { PointerGesture } from \"../PointerGesture.js\";\nimport { calculateAverageDistance, calculateCentroid, createEventName, getPinchDirection } from \"../utils/index.js\";\n\n/**\n * Configuration options for the PinchGesture\n * Uses the same options as the base PointerGesture\n */\n\n/**\n * Event data specific to pinch gesture events\n * Contains information about scale, distance, and velocity\n */\n\n/**\n * Type definition for the CustomEvent created by PinchGesture\n */\n\n/**\n * State tracking for the PinchGesture\n */\n\n/**\n * PinchGesture class for handling pinch/zoom interactions\n *\n * This gesture detects when users move multiple pointers toward or away from each other,\n * and dispatches scale-related events with distance and velocity information.\n */\nexport class PinchGesture extends PointerGesture {\n state = {\n startDistance: 0,\n lastDistance: 0,\n lastScale: 1,\n lastTime: 0,\n velocity: 0,\n totalScale: 1,\n deltaScale: 0\n };\n\n /**\n * Movement threshold in pixels that must be exceeded before the gesture activates.\n * Higher values reduce false positive gesture detection for small movements.\n */\n\n constructor(options) {\n super(_extends({}, options, {\n minPointers: options.minPointers ?? 2\n }));\n this.threshold = options.threshold ?? 0;\n }\n clone(overrides) {\n return new PinchGesture(_extends({\n name: this.name,\n preventDefault: this.preventDefault,\n stopPropagation: this.stopPropagation,\n threshold: this.threshold,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n requiredKeys: [...this.requiredKeys],\n pointerMode: [...this.pointerMode],\n preventIf: [...this.preventIf],\n pointerOptions: structuredClone(this.pointerOptions)\n }, overrides));\n }\n destroy() {\n this.resetState();\n super.destroy();\n }\n updateOptions(options) {\n super.updateOptions(options);\n }\n resetState() {\n this.isActive = false;\n this.state = _extends({}, this.state, {\n startDistance: 0,\n lastDistance: 0,\n lastScale: 1,\n lastTime: 0,\n velocity: 0,\n deltaScale: 0\n });\n }\n\n /**\n * Handle pointer events for the pinch gesture\n */\n handlePointerEvent = (pointers, event) => {\n const pointersArray = Array.from(pointers.values());\n\n // Find which element (if any) is being targeted\n const targetElement = this.getTargetElement(event);\n if (!targetElement) {\n return;\n }\n\n // Check if this gesture should be prevented by active gestures\n if (this.shouldPreventGesture(targetElement, event.pointerType)) {\n if (this.isActive) {\n // If the gesture was active but now should be prevented, end it gracefully\n this.emitPinchEvent(targetElement, 'cancel', pointersArray, event);\n this.resetState();\n }\n return;\n }\n\n // Filter pointers to only include those targeting our element or its children\n const relevantPointers = this.getRelevantPointers(pointersArray, targetElement);\n switch (event.type) {\n case 'pointerdown':\n if (relevantPointers.length >= 2 && !this.isActive) {\n // Calculate and store the starting distance between pointers\n const initialDistance = calculateAverageDistance(relevantPointers);\n this.state.startDistance = initialDistance;\n this.state.lastDistance = initialDistance;\n this.state.lastTime = event.timeStamp;\n\n // Store the original target element\n this.originalTarget = targetElement;\n } else if (this.isActive && relevantPointers.length >= 2) {\n // A new pointer was added during an active gesture\n // Adjust the start distance to prevent jumping (similar to pointer removal logic)\n const newDistance = calculateAverageDistance(relevantPointers);\n // Adjust startDistance so that the current scale is preserved\n this.state.startDistance = newDistance / this.state.lastScale;\n this.state.lastDistance = newDistance;\n this.state.lastTime = event.timeStamp;\n }\n break;\n case 'pointermove':\n if (this.state.startDistance && this.isWithinPointerCount(relevantPointers, event.pointerType)) {\n // Calculate current distance between pointers\n const currentDistance = calculateAverageDistance(relevantPointers);\n\n // Calculate absolute distance change\n const distanceChange = Math.abs(currentDistance - this.state.lastDistance);\n\n // Only proceed if the distance between pointers has changed enough\n if (distanceChange !== 0 && distanceChange >= this.threshold) {\n // Calculate scale relative to starting distance\n const scale = this.state.startDistance ? currentDistance / this.state.startDistance : 1;\n\n // Calculate the relative scale change since last event\n const scaleChange = scale / this.state.lastScale;\n // Apply this change to the total accumulated scale\n this.state.totalScale *= scaleChange;\n // Calculate velocity (change in scale over time)\n const deltaTime = (event.timeStamp - this.state.lastTime) / 1000; // convert to seconds\n if (this.state.lastDistance) {\n const deltaDistance = currentDistance - this.state.lastDistance;\n const result = deltaDistance / deltaTime;\n this.state.velocity = Number.isNaN(result) ? 0 : result;\n }\n\n // Update state\n this.state.lastDistance = currentDistance;\n this.state.deltaScale = scale - this.state.lastScale;\n this.state.lastScale = scale;\n this.state.lastTime = event.timeStamp;\n if (!this.isActive) {\n // Mark gesture as active\n this.isActive = true;\n\n // Emit start event\n this.emitPinchEvent(targetElement, 'start', relevantPointers, event);\n this.emitPinchEvent(targetElement, 'ongoing', relevantPointers, event);\n } else {\n // Emit ongoing event\n this.emitPinchEvent(targetElement, 'ongoing', relevantPointers, event);\n }\n }\n }\n break;\n case 'pointerup':\n case 'pointercancel':\n case 'forceCancel':\n if (this.isActive) {\n const remainingPointers = relevantPointers.filter(p => p.type !== 'pointerup' && p.type !== 'pointercancel');\n\n // If we no longer meet the pointer count requirements, end the gesture\n if (!this.isWithinPointerCount(remainingPointers, event.pointerType)) {\n if (event.type === 'pointercancel') {\n this.emitPinchEvent(targetElement, 'cancel', relevantPointers, event);\n }\n this.emitPinchEvent(targetElement, 'end', relevantPointers, event);\n\n // Reset state\n this.resetState();\n } else if (remainingPointers.length >= 2) {\n // If we still have enough pointers, update the start distance\n // to prevent jumping when a finger is lifted\n const newDistance = calculateAverageDistance(remainingPointers);\n this.state.startDistance = newDistance / this.state.lastScale;\n this.state.lastDistance = newDistance;\n this.state.lastTime = event.timeStamp;\n }\n }\n break;\n default:\n break;\n }\n };\n\n /**\n * Emit pinch-specific events with additional data\n */\n emitPinchEvent(element, phase, pointers, event) {\n // Calculate current centroid\n const centroid = calculateCentroid(pointers);\n\n // Create custom event data\n const distance = this.state.lastDistance;\n const scale = this.state.lastScale;\n\n // Get list of active gestures\n const activeGestures = this.gesturesRegistry.getActiveGestures(element);\n const customEventData = {\n gestureName: this.name,\n centroid,\n target: event.target,\n srcEvent: event,\n phase,\n pointers,\n timeStamp: event.timeStamp,\n scale,\n deltaScale: this.state.deltaScale,\n totalScale: this.state.totalScale,\n distance,\n velocity: this.state.velocity,\n activeGestures,\n direction: getPinchDirection(this.state.velocity),\n customData: this.customData\n };\n\n // Handle default event behavior\n if (this.preventDefault) {\n event.preventDefault();\n }\n if (this.stopPropagation) {\n event.stopPropagation();\n }\n\n // Event names to trigger\n const eventName = createEventName(this.name, phase);\n\n // Dispatch custom events on the element\n const domEvent = new CustomEvent(eventName, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: customEventData\n });\n element.dispatchEvent(domEvent);\n }\n}","const DIRECTION_THRESHOLD = 0;\nexport const getPinchDirection = velocity => {\n if (velocity > DIRECTION_THRESHOLD) {\n return 1; // Zooming in\n }\n if (velocity < -DIRECTION_THRESHOLD) {\n return -1; // Zooming out\n }\n return 0; // No significant movement\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * TurnWheelGesture - Detects wheel events on an element\n *\n * This gesture tracks mouse wheel or touchpad scroll events on elements, firing events when:\n * - The user scrolls/wheels on the element (ongoing)\n *\n * Unlike other gestures which may have start/ongoing/end states,\n * wheel gestures are always considered \"ongoing\" since they are discrete events.\n */\n\nimport { Gesture } from \"../Gesture.js\";\nimport { calculateCentroid, createEventName } from \"../utils/index.js\";\n\n/**\n * Configuration options for the TurnWheelGesture\n * Uses the base gesture options with additional wheel-specific options\n */\n\n/**\n * Event data specific to wheel gesture events\n * Contains information about scroll delta amounts and mode\n */\n\n/**\n * Type definition for the CustomEvent created by TurnWheelGesture\n */\n\n/**\n * State tracking for the TurnWheelGesture\n */\n\n/**\n * TurnWheelGesture class for handling wheel/scroll interactions\n *\n * This gesture detects when users scroll or use the mouse wheel on elements,\n * and dispatches corresponding scroll events with delta information.\n * Unlike most gestures, it extends directly from Gesture rather than PointerGesture.\n */\nexport class TurnWheelGesture extends Gesture {\n state = {\n totalDeltaX: 0,\n totalDeltaY: 0,\n totalDeltaZ: 0\n };\n\n /**\n * Scaling factor for delta values\n * Values > 1 increase sensitivity, values < 1 decrease sensitivity\n */\n\n /**\n * Maximum value for totalDelta values\n * Limits how large the accumulated wheel deltas can be\n */\n\n /**\n * Minimum value for totalDelta values\n * Sets a lower bound for accumulated wheel deltas\n */\n\n /**\n * Initial value for totalDelta values\n * Sets the starting value for delta trackers\n */\n\n /**\n * Whether to invert the direction of delta changes\n * When true, reverses the sign of deltaX, deltaY, and deltaZ values\n */\n\n constructor(options) {\n super(options);\n this.sensitivity = options.sensitivity ?? 1;\n this.max = options.max ?? Number.MAX_SAFE_INTEGER;\n this.min = options.min ?? Number.MIN_SAFE_INTEGER;\n this.initialDelta = options.initialDelta ?? 0;\n this.invert = options.invert ?? false;\n this.state.totalDeltaX = this.initialDelta;\n this.state.totalDeltaY = this.initialDelta;\n this.state.totalDeltaZ = this.initialDelta;\n }\n clone(overrides) {\n return new TurnWheelGesture(_extends({\n name: this.name,\n preventDefault: this.preventDefault,\n stopPropagation: this.stopPropagation,\n sensitivity: this.sensitivity,\n max: this.max,\n min: this.min,\n initialDelta: this.initialDelta,\n invert: this.invert,\n requiredKeys: [...this.requiredKeys],\n preventIf: [...this.preventIf]\n }, overrides));\n }\n init(element, pointerManager, gestureRegistry, keyboardManager) {\n super.init(element, pointerManager, gestureRegistry, keyboardManager);\n\n // Add event listener directly to the element\n // @ts-expect-error, WheelEvent is correct.\n this.element.addEventListener('wheel', this.handleWheelEvent);\n }\n destroy() {\n // Remove the element-specific event listener\n // @ts-expect-error, WheelEvent is correct.\n this.element.removeEventListener('wheel', this.handleWheelEvent);\n this.resetState();\n super.destroy();\n }\n resetState() {\n this.isActive = false;\n this.state = {\n totalDeltaX: 0,\n totalDeltaY: 0,\n totalDeltaZ: 0\n };\n }\n updateOptions(options) {\n super.updateOptions(options);\n this.sensitivity = options.sensitivity ?? this.sensitivity;\n this.max = options.max ?? this.max;\n this.min = options.min ?? this.min;\n this.initialDelta = options.initialDelta ?? this.initialDelta;\n this.invert = options.invert ?? this.invert;\n }\n\n /**\n * Handle wheel events for a specific element\n * @param element The element that received the wheel event\n * @param event The original wheel event\n */\n handleWheelEvent = event => {\n // Check if this gesture should be prevented by active gestures\n if (this.shouldPreventGesture(this.element, 'mouse')) {\n return;\n }\n\n // Get pointers from the PointerManager to use for centroid calculation\n const pointers = this.pointerManager.getPointers() || new Map();\n const pointersArray = Array.from(pointers.values());\n\n // Update total deltas with scaled values\n this.state.totalDeltaX += event.deltaX * this.sensitivity * (this.invert ? -1 : 1);\n this.state.totalDeltaY += event.deltaY * this.sensitivity * (this.invert ? -1 : 1);\n this.state.totalDeltaZ += event.deltaZ * this.sensitivity * (this.invert ? -1 : 1);\n\n // Apply proper min/max clamping for each axis\n // Ensure values stay between min and max bounds\n ['totalDeltaX', 'totalDeltaY', 'totalDeltaZ'].forEach(axis => {\n // First clamp at the minimum bound\n if (this.state[axis] < this.min) {\n this.state[axis] = this.min;\n }\n\n // Then clamp at the maximum bound\n if (this.state[axis] > this.max) {\n this.state[axis] = this.max;\n }\n });\n\n // Emit the wheel event\n this.emitWheelEvent(pointersArray, event);\n };\n\n /**\n * Emit wheel-specific events\n * @param pointers The current pointers on the element\n * @param event The original wheel event\n */\n emitWheelEvent(pointers, event) {\n // Calculate centroid - either from existing pointers or from the wheel event position\n const centroid = pointers.length > 0 ? calculateCentroid(pointers) : {\n x: event.clientX,\n y: event.clientY\n };\n\n // Get list of active gestures\n const activeGestures = this.gesturesRegistry.getActiveGestures(this.element);\n\n // Create custom event data\n const customEventData = {\n gestureName: this.name,\n centroid,\n target: event.target,\n srcEvent: event,\n phase: 'ongoing',\n // Wheel events are always in \"ongoing\" state\n pointers,\n timeStamp: event.timeStamp,\n deltaX: event.deltaX * this.sensitivity * (this.invert ? -1 : 1),\n deltaY: event.deltaY * this.sensitivity * (this.invert ? -1 : 1),\n deltaZ: event.deltaZ * this.sensitivity * (this.invert ? -1 : 1),\n deltaMode: event.deltaMode,\n totalDeltaX: this.state.totalDeltaX,\n totalDeltaY: this.state.totalDeltaY,\n totalDeltaZ: this.state.totalDeltaZ,\n activeGestures,\n customData: this.customData\n };\n\n // Apply default event behavior if configured\n if (this.preventDefault) {\n event.preventDefault();\n }\n if (this.stopPropagation) {\n event.stopPropagation();\n }\n\n // Event names to trigger\n const eventName = createEventName(this.name, 'ongoing');\n\n // Dispatch custom events on the element\n const domEvent = new CustomEvent(eventName, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: customEventData\n });\n this.element.dispatchEvent(domEvent);\n }\n}","export const preventDefault = event => {\n if (event.cancelable) {\n event.preventDefault();\n }\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * TapAndDragGesture - Detects tap followed by drag gestures using composition\n *\n * This gesture uses internal TapGesture and PanGesture instances to:\n * 1. First, detect a tap (quick touch without movement)\n * 2. Then, track drag movements on the next pointer down\n *\n * The gesture fires events when:\n * - A tap is completed (tap phase)\n * - Drag movement begins and passes threshold (dragStart)\n * - Drag movement continues (drag)\n * - Drag movement ends (dragEnd)\n * - The gesture is canceled at any point\n */\n\nimport { PointerGesture } from \"../PointerGesture.js\";\nimport { createEventName, preventDefault } from \"../utils/index.js\";\nimport { PanGesture } from \"./PanGesture.js\";\nimport { TapGesture } from \"./TapGesture.js\";\n\n/**\n * Configuration options for TapAndDragGesture\n * Extends PointerGestureOptions with tap and drag specific settings\n */\n\n/**\n * Event data specific to tap and drag gesture events\n * Contains information about the gesture state, position, and movement\n */\n\n/**\n * Type definition for the CustomEvent created by TapAndDragGesture\n */\n\n/**\n * Represents the current phase of the TapAndDrag gesture\n */\n\n/**\n * State tracking for the TapAndDragGesture\n */\n\n/**\n * TapAndDragGesture class for handling tap followed by drag interactions\n *\n * This gesture composes tap and drag logic patterns from TapGesture and PanGesture\n * into a single coordinated gesture that handles tap-then-drag interactions.\n */\nexport class TapAndDragGesture extends PointerGesture {\n state = {\n phase: 'waitingForTap',\n dragTimeoutId: null\n };\n\n /**\n * Maximum distance a pointer can move during tap for it to still be considered a tap\n * (Following TapGesture pattern)\n */\n\n /**\n * Maximum time between tap completion and drag start\n */\n\n /**\n * Movement threshold for drag activation\n */\n\n /**\n * Allowed directions for the drag gesture\n */\n\n constructor(options) {\n super(options);\n this.tapMaxDistance = options.tapMaxDistance ?? 10;\n this.dragTimeout = options.dragTimeout ?? 1000;\n this.dragThreshold = options.dragThreshold ?? 0;\n this.dragDirection = options.dragDirection || ['up', 'down', 'left', 'right'];\n this.tapGesture = new TapGesture({\n name: `${this.name}-tap`,\n maxDistance: this.tapMaxDistance,\n maxPointers: this.maxPointers,\n pointerMode: this.pointerMode,\n requiredKeys: this.requiredKeys,\n preventIf: this.preventIf,\n pointerOptions: structuredClone(this.pointerOptions)\n });\n this.panGesture = new PanGesture({\n name: `${this.name}-pan`,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n threshold: this.dragThreshold,\n direction: this.dragDirection,\n pointerMode: this.pointerMode,\n requiredKeys: this.requiredKeys,\n preventIf: this.preventIf,\n pointerOptions: structuredClone(this.pointerOptions)\n });\n }\n clone(overrides) {\n return new TapAndDragGesture(_extends({\n name: this.name,\n preventDefault: this.preventDefault,\n stopPropagation: this.stopPropagation,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n tapMaxDistance: this.tapMaxDistance,\n dragTimeout: this.dragTimeout,\n dragThreshold: this.dragThreshold,\n dragDirection: [...this.dragDirection],\n requiredKeys: [...this.requiredKeys],\n pointerMode: [...this.pointerMode],\n preventIf: [...this.preventIf],\n pointerOptions: structuredClone(this.pointerOptions)\n }, overrides));\n }\n init(element, pointerManager, gestureRegistry, keyboardManager) {\n super.init(element, pointerManager, gestureRegistry, keyboardManager);\n this.tapGesture.init(element, pointerManager, gestureRegistry, keyboardManager);\n this.panGesture.init(element, pointerManager, gestureRegistry, keyboardManager);\n this.element.addEventListener(this.tapGesture.name, this.tapHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener(`${this.panGesture.name}Start`, this.dragStartHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener(this.panGesture.name, this.dragMoveHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener(`${this.panGesture.name}End`, this.dragEndHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener(`${this.panGesture.name}Cancel`, this.dragEndHandler);\n }\n destroy() {\n this.resetState();\n this.tapGesture.destroy();\n this.panGesture.destroy();\n this.element.removeEventListener(this.tapGesture.name, this.tapHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener(`${this.panGesture.name}Start`, this.dragStartHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener(this.panGesture.name, this.dragMoveHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener(`${this.panGesture.name}End`, this.dragEndHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener(`${this.panGesture.name}Cancel`, this.dragEndHandler);\n super.destroy();\n }\n updateOptions(options) {\n super.updateOptions(options);\n this.tapMaxDistance = options.tapMaxDistance ?? this.tapMaxDistance;\n this.dragTimeout = options.dragTimeout ?? this.dragTimeout;\n this.dragThreshold = options.dragThreshold ?? this.dragThreshold;\n this.dragDirection = options.dragDirection || this.dragDirection;\n this.element.dispatchEvent(new CustomEvent(`${this.panGesture.name}ChangeOptions`, {\n detail: {\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n threshold: this.dragThreshold,\n direction: this.dragDirection,\n pointerMode: this.pointerMode,\n requiredKeys: this.requiredKeys,\n preventIf: this.preventIf,\n pointerOptions: structuredClone(this.pointerOptions)\n }\n }));\n this.element.dispatchEvent(new CustomEvent(`${this.tapGesture.name}ChangeOptions`, {\n detail: {\n maxDistance: this.tapMaxDistance,\n maxPointers: this.maxPointers,\n pointerMode: this.pointerMode,\n requiredKeys: this.requiredKeys,\n preventIf: this.preventIf,\n pointerOptions: structuredClone(this.pointerOptions)\n }\n }));\n }\n resetState() {\n if (this.state.dragTimeoutId !== null) {\n clearTimeout(this.state.dragTimeoutId);\n }\n this.restoreTouchAction();\n this.isActive = false;\n this.state = {\n phase: 'waitingForTap',\n dragTimeoutId: null\n };\n }\n\n /**\n * This can be empty because the TapAndDragGesture relies on TapGesture and PanGesture to handle pointer events\n * The internal gestures will manage their own state and events, while this class coordinates between them\n */\n handlePointerEvent() {}\n tapHandler = () => {\n if (this.state.phase !== 'waitingForTap') {\n return;\n }\n this.state.phase = 'tapDetected';\n this.setTouchAction();\n\n // Start timeout to wait for drag start\n this.state.dragTimeoutId = setTimeout(() => {\n // Timeout expired, reset gesture\n this.resetState();\n }, this.dragTimeout);\n };\n dragStartHandler = event => {\n if (this.state.phase !== 'tapDetected') {\n return;\n }\n\n // Clear the drag timeout as drag has started\n if (this.state.dragTimeoutId !== null) {\n clearTimeout(this.state.dragTimeoutId);\n this.state.dragTimeoutId = null;\n }\n this.restoreTouchAction();\n this.state.phase = 'dragging';\n this.isActive = true;\n\n // Fire start event\n this.element.dispatchEvent(new CustomEvent(createEventName(this.name, event.detail.phase), event));\n };\n dragMoveHandler = event => {\n if (this.state.phase !== 'dragging') {\n return;\n }\n\n // Fire move event\n this.element.dispatchEvent(new CustomEvent(createEventName(this.name, event.detail.phase), event));\n };\n dragEndHandler = event => {\n if (this.state.phase !== 'dragging') {\n return;\n }\n this.resetState();\n\n // Fire end event\n this.element.dispatchEvent(new CustomEvent(createEventName(this.name, event.detail.phase), event));\n };\n setTouchAction() {\n this.element.addEventListener('touchstart', preventDefault, {\n passive: false\n });\n }\n restoreTouchAction() {\n this.element.removeEventListener('touchstart', preventDefault);\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * PressAndDragGesture - Detects press followed by drag gestures using composition\n *\n * This gesture uses internal PressGesture and PanGesture instances to:\n * 1. First, detect a press (hold for specified duration without movement)\n * 2. Then, track drag movements from the press position\n *\n * The gesture fires events when:\n * - A press is completed (press phase)\n * - Drag movement begins and passes threshold (dragStart)\n * - Drag movement continues (drag)\n * - Drag movement ends (dragEnd)\n * - The gesture is canceled at any point\n *\n * This is ideal for panning operations where you want to hold first, then drag.\n */\n\nimport { PointerGesture } from \"../PointerGesture.js\";\nimport { createEventName, preventDefault } from \"../utils/index.js\";\nimport { PanGesture } from \"./PanGesture.js\";\nimport { PressGesture } from \"./PressGesture.js\";\n\n/**\n * Configuration options for PressAndDragGesture\n * Extends PointerGestureOptions with press and drag specific settings\n */\n\n/**\n * Event data specific to press and drag gesture events\n * Contains information about the gesture state, position, and movement\n */\n\n/**\n * Type definition for the CustomEvent created by PressAndDragGesture\n */\n\n/**\n * Represents the current phase of the PressAndDrag gesture\n */\n\n/**\n * State tracking for the PressAndDragGesture\n */\n\n/**\n * PressAndDragGesture class for handling press followed by drag interactions\n *\n * This gesture composes press and drag logic patterns from PressGesture and PanGesture\n * into a single coordinated gesture that handles press-then-drag interactions.\n */\nexport class PressAndDragGesture extends PointerGesture {\n state = {\n phase: 'waitingForPress',\n dragTimeoutId: null\n };\n\n /**\n * Duration required for press recognition\n */\n\n /**\n * Maximum distance a pointer can move during press for it to still be considered a press\n */\n\n /**\n * Maximum time between press completion and drag start\n */\n\n /**\n * Movement threshold for drag activation\n */\n\n /**\n * Allowed directions for the drag gesture\n */\n\n constructor(options) {\n super(options);\n this.pressDuration = options.pressDuration ?? 500;\n this.pressMaxDistance = options.pressMaxDistance ?? 10;\n this.dragTimeout = options.dragTimeout ?? 1000;\n this.dragThreshold = options.dragThreshold ?? 0;\n this.dragDirection = options.dragDirection || ['up', 'down', 'left', 'right'];\n this.pressGesture = new PressGesture({\n name: `${this.name}-press`,\n duration: this.pressDuration,\n maxDistance: this.pressMaxDistance,\n maxPointers: this.maxPointers,\n pointerMode: this.pointerMode,\n requiredKeys: this.requiredKeys,\n preventIf: this.preventIf,\n pointerOptions: structuredClone(this.pointerOptions)\n });\n this.panGesture = new PanGesture({\n name: `${this.name}-pan`,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n threshold: this.dragThreshold,\n direction: this.dragDirection,\n pointerMode: this.pointerMode,\n requiredKeys: this.requiredKeys,\n preventIf: this.preventIf,\n pointerOptions: structuredClone(this.pointerOptions)\n });\n }\n clone(overrides) {\n return new PressAndDragGesture(_extends({\n name: this.name,\n preventDefault: this.preventDefault,\n stopPropagation: this.stopPropagation,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n pressDuration: this.pressDuration,\n pressMaxDistance: this.pressMaxDistance,\n dragTimeout: this.dragTimeout,\n dragThreshold: this.dragThreshold,\n dragDirection: [...this.dragDirection],\n requiredKeys: [...this.requiredKeys],\n pointerMode: [...this.pointerMode],\n preventIf: [...this.preventIf],\n pointerOptions: structuredClone(this.pointerOptions)\n }, overrides));\n }\n init(element, pointerManager, gestureRegistry, keyboardManager) {\n super.init(element, pointerManager, gestureRegistry, keyboardManager);\n this.pressGesture.init(element, pointerManager, gestureRegistry, keyboardManager);\n this.panGesture.init(element, pointerManager, gestureRegistry, keyboardManager);\n\n // Listen to press gesture events\n this.element.addEventListener(this.pressGesture.name, this.pressHandler);\n\n // Listen to pan gesture events for dragging\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener(`${this.panGesture.name}Start`, this.dragStartHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener(this.panGesture.name, this.dragMoveHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener(`${this.panGesture.name}End`, this.dragEndHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener(`${this.panGesture.name}Cancel`, this.dragEndHandler);\n }\n destroy() {\n this.resetState();\n this.pressGesture.destroy();\n this.panGesture.destroy();\n this.element.removeEventListener(this.pressGesture.name, this.pressHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener(`${this.panGesture.name}Start`, this.dragStartHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener(this.panGesture.name, this.dragMoveHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener(`${this.panGesture.name}End`, this.dragEndHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener(`${this.panGesture.name}Cancel`, this.dragEndHandler);\n super.destroy();\n }\n updateOptions(options) {\n super.updateOptions(options);\n this.pressDuration = options.pressDuration ?? this.pressDuration;\n this.pressMaxDistance = options.pressMaxDistance ?? this.pressMaxDistance;\n this.dragTimeout = options.dragTimeout ?? this.dragTimeout;\n this.dragThreshold = options.dragThreshold ?? this.dragThreshold;\n this.dragDirection = options.dragDirection || this.dragDirection;\n\n // Update internal gesture options\n this.element.dispatchEvent(new CustomEvent(`${this.panGesture.name}ChangeOptions`, {\n detail: {\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n threshold: this.dragThreshold,\n direction: this.dragDirection,\n pointerMode: this.pointerMode,\n requiredKeys: this.requiredKeys,\n preventIf: this.preventIf,\n pointerOptions: structuredClone(this.pointerOptions)\n }\n }));\n this.element.dispatchEvent(new CustomEvent(`${this.pressGesture.name}ChangeOptions`, {\n detail: {\n duration: this.pressDuration,\n maxDistance: this.pressMaxDistance,\n maxPointers: this.maxPointers,\n pointerMode: this.pointerMode,\n requiredKeys: this.requiredKeys,\n preventIf: this.preventIf,\n pointerOptions: structuredClone(this.pointerOptions)\n }\n }));\n }\n resetState() {\n if (this.state.dragTimeoutId !== null) {\n clearTimeout(this.state.dragTimeoutId);\n }\n this.restoreTouchAction();\n this.isActive = false;\n this.state = {\n phase: 'waitingForPress',\n dragTimeoutId: null\n };\n }\n\n /**\n * This can be empty because the PressAndDragGesture relies on PressGesture and PanGesture to handle pointer events\n * The internal gestures will manage their own state and events, while this class coordinates between them\n */\n handlePointerEvent() {}\n pressHandler = () => {\n if (this.state.phase !== 'waitingForPress') {\n return;\n }\n this.state.phase = 'pressDetected';\n this.setTouchAction();\n\n // Start timeout to wait for drag start\n this.state.dragTimeoutId = setTimeout(() => {\n // Timeout expired, reset gesture\n this.resetState();\n }, this.dragTimeout);\n };\n dragStartHandler = event => {\n if (this.state.phase !== 'pressDetected') {\n return;\n }\n\n // Clear the drag timeout as drag has started\n if (this.state.dragTimeoutId !== null) {\n clearTimeout(this.state.dragTimeoutId);\n this.state.dragTimeoutId = null;\n }\n\n // Restore touch action since we're now dragging\n this.restoreTouchAction();\n this.state.phase = 'dragging';\n this.isActive = true;\n\n // Fire start event\n this.element.dispatchEvent(new CustomEvent(createEventName(this.name, event.detail.phase), event));\n };\n dragMoveHandler = event => {\n if (this.state.phase !== 'dragging') {\n return;\n }\n\n // Fire move event\n this.element.dispatchEvent(new CustomEvent(createEventName(this.name, event.detail.phase), event));\n };\n dragEndHandler = event => {\n if (this.state.phase !== 'dragging') {\n return;\n }\n this.resetState();\n\n // Fire end event\n this.element.dispatchEvent(new CustomEvent(createEventName(this.name, event.detail.phase), event));\n };\n setTouchAction() {\n this.element.addEventListener('touchstart', preventDefault, {\n passive: false\n });\n this.element.addEventListener('touchmove', preventDefault, {\n passive: false\n });\n this.element.addEventListener('touchend', preventDefault, {\n passive: false\n });\n }\n restoreTouchAction() {\n this.element.removeEventListener('touchstart', preventDefault);\n this.element.removeEventListener('touchmove', preventDefault);\n this.element.removeEventListener('touchend', preventDefault);\n }\n}","'use client';\n\nimport * as React from 'react';\nimport { GestureManager, MoveGesture, PanGesture, PinchGesture, PressAndDragGesture, PressGesture, TapAndDragGesture, TapGesture, TurnWheelGesture } from '@mui/x-internal-gestures/core';\nconst preventDefault = event => event.preventDefault();\nexport const useChartInteractionListener = ({\n svgRef\n}) => {\n const gestureManagerRef = React.useRef(null);\n React.useEffect(() => {\n const svg = svgRef.current;\n if (!gestureManagerRef.current) {\n gestureManagerRef.current = new GestureManager({\n gestures: [\n // We separate the zoom gestures from the gestures that are not zoom related\n // This allows us to configure the zoom gestures based on the zoom configuration.\n new PanGesture({\n name: 'pan',\n threshold: 0,\n maxPointers: 1\n }), new MoveGesture({\n name: 'move',\n preventIf: ['pan', 'zoomPinch', 'zoomPan']\n }), new TapGesture({\n name: 'tap',\n preventIf: ['pan', 'zoomPinch', 'zoomPan']\n }), new PressGesture({\n name: 'quickPress',\n duration: 50\n }), new PanGesture({\n name: 'brush',\n threshold: 0,\n maxPointers: 1\n }),\n // Zoom gestures\n new PanGesture({\n name: 'zoomPan',\n threshold: 0,\n preventIf: ['zoomTapAndDrag', 'zoomPressAndDrag']\n }), new PinchGesture({\n name: 'zoomPinch',\n threshold: 5\n }), new TurnWheelGesture({\n name: 'zoomTurnWheel',\n sensitivity: 0.01,\n initialDelta: 1\n }), new TurnWheelGesture({\n name: 'panTurnWheel',\n sensitivity: 0.5\n }), new TapAndDragGesture({\n name: 'zoomTapAndDrag',\n dragThreshold: 10\n }), new PressAndDragGesture({\n name: 'zoomPressAndDrag',\n dragThreshold: 10,\n preventIf: ['zoomPinch']\n }), new TapGesture({\n name: 'zoomDoubleTapReset',\n taps: 2\n })]\n });\n }\n\n // Assign gesture manager after initialization\n const gestureManager = gestureManagerRef.current;\n if (!svg || !gestureManager) {\n return undefined;\n }\n gestureManager.registerElement(['pan', 'move', 'zoomPinch', 'zoomPan', 'zoomTurnWheel', 'panTurnWheel', 'tap', 'quickPress', 'zoomTapAndDrag', 'zoomPressAndDrag', 'zoomDoubleTapReset', 'brush'], svg);\n return () => {\n // Cleanup gesture manager\n gestureManager.unregisterAllGestures(svg);\n };\n }, [svgRef, gestureManagerRef]);\n const addInteractionListener = React.useCallback((interaction, callback, options) => {\n // Forcefully cast the svgRef to any, it is annoying to fix the types.\n const svg = svgRef.current;\n svg?.addEventListener(interaction, callback, options);\n return {\n cleanup: () => svg?.removeEventListener(interaction, callback)\n };\n }, [svgRef]);\n const updateZoomInteractionListeners = React.useCallback((interaction, options) => {\n const svg = svgRef.current;\n const gestureManager = gestureManagerRef.current;\n if (!gestureManager || !svg) {\n return;\n }\n gestureManager.setGestureOptions(interaction, svg, options ?? {});\n }, [svgRef, gestureManagerRef]);\n React.useEffect(() => {\n const svg = svgRef.current;\n\n // Disable gesture on safari\n // https://use-gesture.netlify.app/docs/gestures/#about-the-pinch-gesture\n svg?.addEventListener('gesturestart', preventDefault);\n svg?.addEventListener('gesturechange', preventDefault);\n svg?.addEventListener('gestureend', preventDefault);\n return () => {\n svg?.removeEventListener('gesturestart', preventDefault);\n svg?.removeEventListener('gesturechange', preventDefault);\n svg?.removeEventListener('gestureend', preventDefault);\n };\n }, [svgRef]);\n return {\n instance: {\n addInteractionListener,\n updateZoomInteractionListeners\n }\n };\n};\nuseChartInteractionListener.params = {};\nuseChartInteractionListener.getInitialState = () => {\n return {};\n};","import { useChartAnimation } from \"./useChartAnimation/index.js\";\nimport { useChartDimensions } from \"./useChartDimensions/index.js\";\nimport { useChartExperimentalFeatures } from \"./useChartExperimentalFeature/index.js\";\nimport { useChartId } from \"./useChartId/index.js\";\nimport { useChartSeries } from \"./useChartSeries/index.js\";\nimport { useChartInteractionListener } from \"./useChartInteractionListener/index.js\";\n\n/**\n * Internal plugins that create the tools used by the other plugins.\n * These plugins are used by the Charts components.\n */\nexport const CHART_CORE_PLUGINS = [useChartId, useChartExperimentalFeatures, useChartDimensions, useChartSeries, useChartInteractionListener, useChartAnimation];","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"apiRef\"];\nexport const extractPluginParamsFromProps = _ref => {\n let {\n plugins\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref.props, _excluded);\n const paramsLookup = {};\n plugins.forEach(plugin => {\n Object.assign(paramsLookup, plugin.params);\n });\n const pluginParams = {};\n Object.keys(props).forEach(propName => {\n const prop = props[propName];\n if (paramsLookup[propName]) {\n pluginParams[propName] = prop;\n }\n });\n const defaultizedPluginParams = plugins.reduce((acc, plugin) => {\n if (plugin.getDefaultizedParams) {\n return plugin.getDefaultizedParams({\n params: acc\n });\n }\n return acc;\n }, pluginParams);\n return defaultizedPluginParams;\n};","import * as React from 'react';\nimport useId from '@mui/utils/useId';\nimport { Store } from '@mui/x-internals/store';\nimport { CHART_CORE_PLUGINS } from \"../plugins/corePlugins/index.js\";\nimport { extractPluginParamsFromProps } from \"./extractPluginParamsFromProps.js\";\nlet globalId = 0;\n\n/**\n * This is the main hook that setups the plugin system for the chart.\n *\n * It manages the data used to create the charts.\n *\n * @param inPlugins All the plugins that will be used in the chart.\n * @param props The props passed to the chart.\n * @param seriesConfig The set of helpers used for series-specific computation.\n */\nexport function useCharts(inPlugins, props, seriesConfig) {\n const chartId = useId();\n const plugins = React.useMemo(() => [...CHART_CORE_PLUGINS, ...inPlugins], [inPlugins]);\n const pluginParams = extractPluginParamsFromProps({\n plugins,\n props\n });\n pluginParams.id = pluginParams.id ?? chartId;\n const instanceRef = React.useRef({});\n const instance = instanceRef.current;\n const publicAPI = useChartApiInitialization(props.apiRef);\n const innerChartRootRef = React.useRef(null);\n const innerSvgRef = React.useRef(null);\n const storeRef = React.useRef(null);\n if (storeRef.current == null) {\n // eslint-disable-next-line react-compiler/react-compiler\n globalId += 1;\n const initialState = {\n cacheKey: {\n id: globalId\n }\n };\n plugins.forEach(plugin => {\n if (plugin.getInitialState) {\n Object.assign(initialState, plugin.getInitialState(pluginParams, initialState, seriesConfig));\n }\n });\n storeRef.current = new Store(initialState);\n }\n const runPlugin = plugin => {\n const pluginResponse = plugin({\n instance,\n params: pluginParams,\n plugins: plugins,\n store: storeRef.current,\n svgRef: innerSvgRef,\n chartRootRef: innerChartRootRef,\n seriesConfig\n });\n if (pluginResponse.publicAPI) {\n Object.assign(publicAPI.current, pluginResponse.publicAPI);\n }\n if (pluginResponse.instance) {\n Object.assign(instance, pluginResponse.instance);\n }\n };\n plugins.forEach(runPlugin);\n const contextValue = React.useMemo(() => ({\n store: storeRef.current,\n publicAPI: publicAPI.current,\n instance,\n svgRef: innerSvgRef,\n chartRootRef: innerChartRootRef\n }), [instance, publicAPI]);\n return {\n contextValue\n };\n}\nfunction initializeInputApiRef(inputApiRef) {\n if (inputApiRef.current == null) {\n inputApiRef.current = {};\n }\n return inputApiRef;\n}\nexport function useChartApiInitialization(inputApiRef) {\n const fallbackPublicApiRef = React.useRef({});\n if (inputApiRef) {\n return initializeInputApiRef(inputApiRef);\n }\n return fallbackPublicApiRef;\n}","'use client';\n\nimport * as React from 'react';\n/**\n * @ignore - internal component.\n */\nexport const ChartContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") ChartContext.displayName = \"ChartContext\";","'use client';\n\nimport * as React from 'react';\nconst UNINITIALIZED = {};\n\n/**\n * A React.useRef() that is initialized lazily with a function. Note that it accepts an optional\n * initialization argument, so the initialization function doesn't need to be an inline closure.\n *\n * @usage\n * const ref = useLazyRef(sortColumns, columns)\n */\nexport default function useLazyRef(init, initArg) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = init(initArg);\n }\n return ref;\n}","'use client';\n\nimport * as React from 'react';\nconst EMPTY = [];\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport default function useOnMount(fn) {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- no need to put `fn` in the dependency array\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","import useLazyRef from '@mui/utils/useLazyRef';\nimport useOnMount from '@mui/utils/useOnMount';\nconst noop = () => {};\n\n/**\n * An Effect implementation for the Store. This should be used for side-effects only. To\n * compute and store derived state, use `createSelectorMemoized` instead.\n */\nexport function useStoreEffect(store, selector, effect) {\n const instance = useLazyRef(initialize, {\n store,\n selector\n }).current;\n instance.effect = effect;\n useOnMount(instance.onMount);\n}\n\n// `useLazyRef` typings are incorrect, `params` should not be optional\nfunction initialize(params) {\n const {\n store,\n selector\n } = params;\n let previousState = selector(store.state);\n const instance = {\n effect: noop,\n dispose: null,\n // We want a single subscription done right away and cleared on unmount only,\n // but React triggers `useOnMount` multiple times in dev, so we need to manage\n // the subscription anyway.\n subscribe: () => {\n instance.dispose ??= store.subscribe(state => {\n const nextState = selector(state);\n if (!Object.is(previousState, nextState)) {\n const prev = previousState;\n previousState = nextState;\n instance.effect(prev, nextState);\n }\n });\n },\n onMount: () => {\n instance.subscribe();\n return () => {\n instance.dispose?.();\n instance.dispose = null;\n };\n }\n };\n instance.subscribe();\n return instance;\n}","'use client';\n\nimport * as React from 'react';\nimport { warnOnce } from \"../warning/index.js\";\n\n/**\n * Make sure a controlled prop is used correctly.\n * Logs errors if the prop either:\n *\n * - switch between controlled and uncontrolled\n * - modify it's default value\n * @param parameters\n */\nfunction useAssertModelConsistencyOutsideOfProduction(parameters) {\n const {\n componentName,\n propName,\n controlled,\n defaultValue,\n warningPrefix = 'MUI X'\n } = parameters;\n const [{\n initialDefaultValue,\n isControlled\n }] = React.useState({\n initialDefaultValue: defaultValue,\n isControlled: controlled !== undefined\n });\n if (isControlled !== (controlled !== undefined)) {\n warnOnce([`${warningPrefix}: A component is changing the ${isControlled ? '' : 'un'}controlled ${propName} state of ${componentName} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${propName} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'], 'error');\n }\n if (JSON.stringify(initialDefaultValue) !== JSON.stringify(defaultValue)) {\n warnOnce([`${warningPrefix}: A component is changing the default ${propName} state of an uncontrolled ${componentName} after being initialized. ` + `To suppress this warning opt to use a controlled ${componentName}.`], 'error');\n }\n}\nexport const useAssertModelConsistency = process.env.NODE_ENV === 'production' ? () => {} : useAssertModelConsistencyOutsideOfProduction;","import { createSelectorMemoized, createSelector } from '@mui/x-internals/store';\nimport { applySeriesLayout, applySeriesProcessors } from \"./processSeries.js\";\nimport { selectorChartDrawingArea } from \"../useChartDimensions/useChartDimensions.selectors.js\";\nexport const selectorChartSeriesState = state => state.series;\nexport const selectorChartDefaultizedSeries = createSelector(selectorChartSeriesState, seriesState => seriesState.defaultizedSeries);\nexport const selectorChartSeriesConfig = createSelector(selectorChartSeriesState, seriesState => seriesState.seriesConfig);\n\n/**\n * Get the dataset from the series state.\n * @returns {DatasetType | undefined} The dataset.\n */\nexport const selectorChartDataset = createSelector(selectorChartSeriesState, seriesState => seriesState.dataset);\n\n/**\n * Get the processed series after applying series processors.\n * This selector computes the processed series on-demand from the defaultized series.\n * @returns {ProcessedSeries} The processed series.\n */\nexport const selectorChartSeriesProcessed = createSelectorMemoized(selectorChartDefaultizedSeries, selectorChartSeriesConfig, selectorChartDataset, function selectorChartSeriesProcessed(defaultizedSeries, seriesConfig, dataset) {\n return applySeriesProcessors(defaultizedSeries, seriesConfig, dataset);\n});\n\n/**\n * Get the processed series after applying series processors.\n * This selector computes the processed series on-demand from the defaultized series.\n * @returns {ProcessedSeries} The processed series.\n */\nexport const selectorChartSeriesLayout = createSelectorMemoized(selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartDrawingArea, function selectorChartSeriesLayout(processedSeries, seriesConfig, drawingArea) {\n return applySeriesLayout(processedSeries, seriesConfig, drawingArea);\n});","/** Margin in the opposite direction of the axis, i.e., horizontal if the axis is vertical and vice versa. */\nexport const ZOOM_SLIDER_MARGIN = 4;\n\n/** Size of the zoom slider preview. */\nexport const ZOOM_SLIDER_PREVIEW_SIZE = 40;\n\n/** Size reserved for the zoom slider. The actual size of the slider might be smaller. */\nexport const DEFAULT_ZOOM_SLIDER_SIZE = 20 + 2 * ZOOM_SLIDER_MARGIN;\nexport const DEFAULT_ZOOM_SLIDER_PREVIEW_SIZE = 40 + 2 * ZOOM_SLIDER_MARGIN;\nexport const DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP = 'hover';\n\n/** Default margin for pie charts. */\nexport const DEFAULT_PIE_CHART_MARGIN = {\n top: 5,\n bottom: 5,\n left: 5,\n right: 5\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { DEFAULT_ZOOM_SLIDER_PREVIEW_SIZE, DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP, DEFAULT_ZOOM_SLIDER_SIZE } from \"../../../constants.js\";\nexport const defaultZoomOptions = {\n minStart: 0,\n maxEnd: 100,\n step: 5,\n minSpan: 10,\n maxSpan: 100,\n panning: true,\n filterMode: 'keep',\n reverse: false,\n slider: {\n enabled: false,\n preview: false,\n size: DEFAULT_ZOOM_SLIDER_SIZE,\n showTooltip: DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP\n }\n};\nexport const defaultizeZoom = (zoom, axisId, axisDirection, reverse) => {\n if (!zoom) {\n return undefined;\n }\n if (zoom === true) {\n return _extends({\n axisId,\n axisDirection\n }, defaultZoomOptions, {\n reverse: reverse ?? false\n });\n }\n return _extends({\n axisId,\n axisDirection\n }, defaultZoomOptions, {\n reverse: reverse ?? false\n }, zoom, {\n slider: _extends({}, defaultZoomOptions.slider, {\n size: zoom.slider?.preview ?? defaultZoomOptions.slider.preview ? DEFAULT_ZOOM_SLIDER_PREVIEW_SIZE : DEFAULT_ZOOM_SLIDER_SIZE\n }, zoom.slider)\n });\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { defaultizeZoom } from \"./defaultizeZoom.js\";\nimport { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY, DEFAULT_AXIS_SIZE_HEIGHT, DEFAULT_AXIS_SIZE_WIDTH, AXIS_LABEL_DEFAULT_HEIGHT } from \"../../../../constants/index.js\";\nexport function defaultizeXAxis(inAxes, dataset) {\n const offsets = {\n top: 0,\n bottom: 0,\n none: 0\n };\n const inputAxes = inAxes && inAxes.length > 0 ? inAxes : [{\n id: DEFAULT_X_AXIS_KEY,\n scaleType: 'linear'\n }];\n const parsedAxes = inputAxes.map((axisConfig, index) => {\n const dataKey = axisConfig.dataKey;\n\n // The first x-axis is defaultized to the bottom\n const defaultPosition = index === 0 ? 'bottom' : 'none';\n const position = axisConfig.position ?? defaultPosition;\n const defaultHeight = DEFAULT_AXIS_SIZE_HEIGHT + (axisConfig.label ? AXIS_LABEL_DEFAULT_HEIGHT : 0);\n const id = axisConfig.id ?? `defaultized-x-axis-${index}`;\n const sharedConfig = _extends({\n offset: offsets[position]\n }, axisConfig, {\n id,\n position,\n height: axisConfig.height ?? defaultHeight,\n zoom: defaultizeZoom(axisConfig.zoom, id, 'x', axisConfig.reverse)\n });\n\n // Increment the offset for the next axis\n if (position !== 'none') {\n offsets[position] += sharedConfig.height;\n if (sharedConfig.zoom?.slider.enabled) {\n offsets[position] += sharedConfig.zoom.slider.size;\n }\n }\n\n // If `dataKey` is NOT provided\n if (dataKey === undefined || axisConfig.data !== undefined) {\n return sharedConfig;\n }\n if (dataset === undefined) {\n throw new Error(`MUI X Charts: x-axis uses \\`dataKey\\` but no \\`dataset\\` is provided.`);\n }\n\n // If `dataKey` is provided\n return _extends({}, sharedConfig, {\n data: dataset.map(d => d[dataKey])\n });\n });\n return parsedAxes;\n}\nexport function defaultizeYAxis(inAxes, dataset) {\n const offsets = {\n right: 0,\n left: 0,\n none: 0\n };\n const inputAxes = inAxes && inAxes.length > 0 ? inAxes : [{\n id: DEFAULT_Y_AXIS_KEY,\n scaleType: 'linear'\n }];\n const parsedAxes = inputAxes.map((axisConfig, index) => {\n const dataKey = axisConfig.dataKey;\n\n // The first y-axis is defaultized to the left\n const defaultPosition = index === 0 ? 'left' : 'none';\n const position = axisConfig.position ?? defaultPosition;\n const defaultWidth = DEFAULT_AXIS_SIZE_WIDTH + (axisConfig.label ? AXIS_LABEL_DEFAULT_HEIGHT : 0);\n const id = axisConfig.id ?? `defaultized-y-axis-${index}`;\n const sharedConfig = _extends({\n offset: offsets[position]\n }, axisConfig, {\n id,\n position,\n width: axisConfig.width ?? defaultWidth,\n zoom: defaultizeZoom(axisConfig.zoom, id, 'y', axisConfig.reverse)\n });\n\n // Increment the offset for the next axis\n if (position !== 'none') {\n offsets[position] += sharedConfig.width;\n if (sharedConfig.zoom?.slider.enabled) {\n offsets[position] += sharedConfig.zoom.slider.size;\n }\n }\n\n // If `dataKey` is NOT provided\n if (dataKey === undefined || axisConfig.data !== undefined) {\n return sharedConfig;\n }\n if (dataset === undefined) {\n throw new Error(`MUI X Charts: y-axis uses \\`dataKey\\` but no \\`dataset\\` is provided.`);\n }\n\n // If `dataKey` is provided\n return _extends({}, sharedConfig, {\n data: dataset.map(d => d[dataKey])\n });\n });\n return parsedAxes;\n}","/**\n * Creates a default formatter function for continuous scales (e.g., linear, sqrt, log).\n * @returns A formatter function for continuous values.\n */\nexport function createScalarFormatter(tickNumber, zoomScale) {\n return function defaultScalarValueFormatter(value, context) {\n if (context.location === 'tick') {\n const domain = context.scale.domain();\n const zeroSizeDomain = domain[0] === domain[1];\n if (zeroSizeDomain) {\n return context.scale.tickFormat(1)(value);\n }\n return context.scale.tickFormat(tickNumber)(value);\n }\n if (context.location === 'zoom-slider-tooltip') {\n return zoomScale.tickFormat(2)(value);\n }\n return `${value}`;\n };\n}","/**\n * Use this type instead of `AxisScaleConfig` when the values\n * shouldn't be provided by the user.\n */\n\n/**\n * Config that is shared between cartesian and polar axes.\n */\n\n/**\n * Use this type for advanced typing. For basic usage, use `XAxis`, `YAxis`, `RotationAxis` or `RadiusAxis`.\n */\n\nexport function isBandScaleConfig(scaleConfig) {\n return scaleConfig.scaleType === 'band';\n}\nexport function isPointScaleConfig(scaleConfig) {\n return scaleConfig.scaleType === 'point';\n}\nexport function isContinuousScaleConfig(scaleConfig) {\n return scaleConfig.scaleType !== 'point' && scaleConfig.scaleType !== 'band';\n}\nexport function isSymlogScaleConfig(scaleConfig) {\n return scaleConfig.scaleType === 'symlog';\n}\n\n/**\n * The data format returned by onAxisClick.\n */\n\n/**\n * Identifies a data point within an axis.\n */\n\n/**\n * The axis configuration with missing values filled with default values.\n */\n\n/**\n * The x-axis configuration with missing values filled with default values.\n */\n\n/**\n * The y-axis configuration with missing values filled with default values.\n */","export default function ascending(a, b) {\n return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","export default function descending(a, b) {\n return a == null || b == null ? NaN\n : b < a ? -1\n : b > a ? 1\n : b >= a ? 0\n : NaN;\n}\n","import ascending from \"./ascending.js\";\nimport descending from \"./descending.js\";\n\nexport default function bisector(f) {\n let compare1, compare2, delta;\n\n // If an accessor is specified, promote it to a comparator. In this case we\n // can test whether the search value is (self-) comparable. We can’t do this\n // for a comparator (except for specific, known comparators) because we can’t\n // tell if the comparator is symmetric, and an asymmetric comparator can’t be\n // used to test whether a single value is comparable.\n if (f.length !== 2) {\n compare1 = ascending;\n compare2 = (d, x) => ascending(f(d), x);\n delta = (d, x) => f(d) - x;\n } else {\n compare1 = f === ascending || f === descending ? f : zero;\n compare2 = f;\n delta = f;\n }\n\n function left(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = (lo + hi) >>> 1;\n if (compare2(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n\n function right(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = (lo + hi) >>> 1;\n if (compare2(a[mid], x) <= 0) lo = mid + 1;\n else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n\n function center(a, x, lo = 0, hi = a.length) {\n const i = left(a, x, lo, hi - 1);\n return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n }\n\n return {left, center, right};\n}\n\nfunction zero() {\n return 0;\n}\n","import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\n\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;\n","export default function number(x) {\n return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n yield value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n yield value;\n }\n }\n }\n}\n","export function initRange(domain, range) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.range(domain); break;\n default: this.range(range).domain(domain); break;\n }\n return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n switch (arguments.length) {\n case 0: break;\n case 1: {\n if (typeof domain === \"function\") this.interpolator(domain);\n else this.range(domain);\n break;\n }\n default: {\n this.domain(domain);\n if (typeof interpolator === \"function\") this.interpolator(interpolator);\n else this.range(interpolator);\n break;\n }\n }\n return this;\n}\n","import {bisect} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function threshold() {\n var domain = [0.5],\n range = [0, 1],\n unknown,\n n = 1;\n\n function scale(x) {\n return x != null && x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n }\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n };\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return [domain[i - 1], domain[i]];\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return threshold()\n .domain(domain)\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(scale, arguments);\n}\n","export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n","import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`),\n reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`),\n reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`),\n reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`),\n reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`),\n reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHex8: color_formatHex8,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHex8() {\n return this.rgb().formatHex8();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n },\n displayable() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatHex8: rgb_formatHex8,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\n\nfunction rgb_formatHex8() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\n\nfunction rgb_formatRgb() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\n\nfunction clampa(opacity) {\n return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\n\nfunction clampi(value) {\n return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\n\nfunction hex(value) {\n value = clampi(value);\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n clamp() {\n return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n }\n}));\n\nfunction clamph(value) {\n value = (value || 0) % 360;\n return value < 0 ? value + 360 : value;\n}\n\nfunction clampt(value) {\n return Math.max(0, Math.min(1, value || 0));\n}\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\nexport default function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","export default x => () => x;\n","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n","import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n","import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n","export default function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n","import value from \"./value.js\";\n\nexport default function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n","import {basis} from \"./basis.js\";\n\nexport default function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n","export default function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\n\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n","import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? number\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n : b instanceof color ? rgb\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : number)(a, b);\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\n };\n}\n","export default function number(x) {\n return +x;\n}\n","import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport constant from \"./constant.js\";\nimport number from \"./number.js\";\n\nvar unit = [0, 1];\n\nexport function identity(x) {\n return x;\n}\n\nfunction normalize(a, b) {\n return (b -= (a = +a))\n ? function(x) { return (x - a) / b; }\n : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n var t;\n if (a > b) t = a, a = b, b = t;\n return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n var j = Math.min(domain.length, range.length) - 1,\n d = new Array(j),\n r = new Array(j),\n i = -1;\n\n // Reverse descending domains.\n if (domain[j] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n\n while (++i < j) {\n d[i] = normalize(domain[i], domain[i + 1]);\n r[i] = interpolate(range[i], range[i + 1]);\n }\n\n return function(x) {\n var i = bisect(domain, x, 1, j) - 1;\n return r[i](d[i](x));\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .range(source.range())\n .interpolate(source.interpolate())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport function transformer() {\n var domain = unit,\n range = unit,\n interpolate = interpolateValue,\n transform,\n untransform,\n unknown,\n clamp = identity,\n piecewise,\n output,\n input;\n\n function rescale() {\n var n = Math.min(domain.length, range.length);\n if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n piecewise = n > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n }\n\n scale.invert = function(y) {\n return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = Array.from(_), interpolate = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t, u) {\n transform = t, untransform = u;\n return rescale();\n };\n}\n\nexport default function continuous() {\n return transformer()(identity, identity);\n}\n","export default function constants(x) {\n return function() {\n return x;\n };\n}\n","const e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\nfunction tickSpec(start, stop, count) {\n const step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log10(step)),\n error = step / Math.pow(10, power),\n factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;\n let i1, i2, inc;\n if (power < 0) {\n inc = Math.pow(10, -power) / factor;\n i1 = Math.round(start * inc);\n i2 = Math.round(stop * inc);\n if (i1 / inc < start) ++i1;\n if (i2 / inc > stop) --i2;\n inc = -inc;\n } else {\n inc = Math.pow(10, power) * factor;\n i1 = Math.round(start / inc);\n i2 = Math.round(stop / inc);\n if (i1 * inc < start) ++i1;\n if (i2 * inc > stop) --i2;\n }\n if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);\n return [i1, i2, inc];\n}\n\nexport default function ticks(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n if (!(count > 0)) return [];\n if (start === stop) return [start];\n const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);\n if (!(i2 >= i1)) return [];\n const n = i2 - i1 + 1, ticks = new Array(n);\n if (reverse) {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;\n else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;\n } else {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;\n else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;\n }\n return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n return tickSpec(start, stop, count)[2];\n}\n\nexport function tickStep(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n const reverse = stop < start, inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);\n return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);\n}\n","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + (this.trim ? \"~\" : \"\")\n + this.type;\n};\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n","export default function(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n","import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n \"%\": (x, p) => (x * 100).toFixed(p),\n \"b\": (x) => Math.round(x).toString(2),\n \"c\": (x) => x + \"\",\n \"d\": formatDecimal,\n \"e\": (x, p) => x.toExponential(p),\n \"f\": (x, p) => x.toFixed(p),\n \"g\": (x, p) => x.toPrecision(p),\n \"o\": (x) => Math.round(x).toString(8),\n \"p\": (x, p) => formatRounded(x * 100, p),\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n \"x\": (x) => Math.round(x).toString(16)\n};\n","export default function(x) {\n return x;\n}\n","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"−\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type;\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision === undefined ? 6\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i, n, c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n // Trim insignificant zeros.\n if (trim) value = formatTrim(value);\n\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n i = -1, n = value.length;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n default: value = padding + valuePrefix + value + valueSuffix; break;\n }\n\n return numerals(value);\n }\n\n format.toString = function() {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}\n","import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\n\nexport function linearish(scale) {\n var domain = scale.domain;\n\n scale.ticks = function(count) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n };\n\n scale.tickFormat = function(count, specifier) {\n var d = domain();\n return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n };\n\n scale.nice = function(count) {\n if (count == null) count = 10;\n\n var d = domain();\n var i0 = 0;\n var i1 = d.length - 1;\n var start = d[i0];\n var stop = d[i1];\n var prestep;\n var step;\n var maxIter = 10;\n\n if (stop < start) {\n step = start, start = stop, stop = step;\n step = i0, i0 = i1, i1 = step;\n }\n \n while (maxIter-- > 0) {\n step = tickIncrement(start, stop, count);\n if (step === prestep) {\n d[i0] = start\n d[i1] = stop\n return domain(d);\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n } else {\n break;\n }\n prestep = step;\n }\n\n return scale;\n };\n\n return scale;\n}\n\nexport default function linear() {\n var scale = continuous();\n\n scale.copy = function() {\n return copy(scale, linear());\n };\n\n initRange.apply(scale, arguments);\n\n return linearish(scale);\n}\n","import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function tickFormat(start, stop, count, specifier) {\n var step = tickStep(start, stop, count),\n precision;\n specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n switch (specifier.type) {\n case \"s\": {\n var value = Math.max(Math.abs(start), Math.abs(stop));\n if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n return formatPrefix(specifier, value);\n }\n case \"\":\n case \"e\":\n case \"g\":\n case \"p\":\n case \"r\": {\n if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n break;\n }\n case \"f\":\n case \"%\": {\n if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n break;\n }\n }\n return format(specifier);\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step, max) {\n step = Math.abs(step), max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}\n","import {interpolate, interpolateRound} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n var x0 = 0,\n x1 = 1,\n t0,\n t1,\n k10,\n transform,\n interpolator = identity,\n clamp = false,\n unknown;\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));\n }\n\n scale.domain = function(_) {\n return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, scale) : clamp;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n function range(interpolate) {\n return function(_) {\n var r0, r1;\n return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)];\n };\n }\n\n scale.range = range(interpolate);\n\n scale.rangeRound = range(interpolateRound);\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t) {\n transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);\n return scale;\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .interpolator(source.interpolator())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport default function sequential() {\n var scale = linearish(transformer()(identity));\n\n scale.copy = function() {\n return copy(scale, sequential());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialLog() {\n var scale = loggish(transformer()).domain([1, 10]);\n\n scale.copy = function() {\n return copy(scale, sequentialLog()).base(scale.base());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSymlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, sequentialSymlog()).constant(scale.constant());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialPow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, sequentialPow()).exponent(scale.exponent());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSqrt() {\n return sequentialPow.apply(null, arguments).exponent(0.5);\n}\n","export default function(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}\n","export default function(numerals) {\n return function(value) {\n return value.replace(/[0-9]/g, function(i) {\n return numerals[+i];\n });\n };\n}\n","// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n","export class InternMap extends Map {\n constructor(entries, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (entries != null) for (const [key, value] of entries) this.set(key, value);\n }\n get(key) {\n return super.get(intern_get(this, key));\n }\n has(key) {\n return super.has(intern_get(this, key));\n }\n set(key, value) {\n return super.set(intern_set(this, key), value);\n }\n delete(key) {\n return super.delete(intern_delete(this, key));\n }\n}\n\nexport class InternSet extends Set {\n constructor(values, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (values != null) for (const value of values) this.add(value);\n }\n has(value) {\n return super.has(intern_get(this, value));\n }\n add(value) {\n return super.add(intern_set(this, value));\n }\n delete(value) {\n return super.delete(intern_delete(this, value));\n }\n}\n\nfunction intern_get({_intern, _key}, value) {\n const key = _key(value);\n return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) return _intern.get(key);\n _intern.set(key, value);\n return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) {\n value = _intern.get(key);\n _intern.delete(key);\n }\n return value;\n}\n\nfunction keyof(value) {\n return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n","import {InternMap} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n var index = new InternMap(),\n domain = [],\n range = [],\n unknown = implicit;\n\n function scale(d) {\n let i = index.get(d);\n if (i === undefined) {\n if (unknown !== implicit) return unknown;\n index.set(d, i = domain.push(d) - 1);\n }\n return range[i % range.length];\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [], index = new InternMap();\n for (const value of _) {\n if (index.has(value)) continue;\n index.set(value, domain.push(value) - 1);\n }\n return scale;\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), scale) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return ordinal(domain, range).unknown(unknown);\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n","import { scaleOrdinal, scaleThreshold, scaleSequential } from '@mui/x-charts-vendor/d3-scale';\nexport function getSequentialColorScale(config) {\n if (config.type === 'piecewise') {\n return scaleThreshold(config.thresholds, config.colors);\n }\n return scaleSequential([config.min ?? 0, config.max ?? 100], config.color);\n}\nexport function getOrdinalColorScale(config) {\n if (config.values) {\n return scaleOrdinal(config.values, config.colors).unknown(config.unknownColor ?? null);\n }\n return scaleOrdinal(config.colors.map((_, index) => index), config.colors).unknown(config.unknownColor ?? null);\n}\nexport function getColorScale(config) {\n return config.type === 'ordinal' ? getOrdinalColorScale(config) : getSequentialColorScale(config);\n}","export function getTickNumber(params, domain, defaultTickNumber) {\n const {\n tickMaxStep,\n tickMinStep,\n tickNumber\n } = params;\n const maxTicks = tickMinStep === undefined ? 999 : Math.floor(Math.abs(domain[1] - domain[0]) / tickMinStep);\n const minTicks = tickMaxStep === undefined ? 2 : Math.ceil(Math.abs(domain[1] - domain[0]) / tickMaxStep);\n const defaultizedTickNumber = tickNumber ?? defaultTickNumber;\n return Math.min(maxTicks, Math.max(minTicks, defaultizedTickNumber));\n}\nexport function scaleTickNumberByRange(tickNumber, range) {\n const rangeGap = range[1] - range[0];\n\n /* If the range start and end are the same, `tickNumber` will become infinity, so we default to 1. */\n if (rangeGap === 0) {\n return 1;\n }\n return tickNumber / ((range[1] - range[0]) / 100);\n}\nexport function getDefaultTickNumber(dimension) {\n return Math.floor(Math.abs(dimension) / 50);\n}","export default function nice(domain, interval) {\n domain = domain.slice();\n\n var i0 = 0,\n i1 = domain.length - 1,\n x0 = domain[i0],\n x1 = domain[i1],\n t;\n\n if (x1 < x0) {\n t = i0, i0 = i1, i1 = t;\n t = x0, x0 = x1, x1 = t;\n }\n\n domain[i0] = interval.floor(x0);\n domain[i1] = interval.ceil(x1);\n return domain;\n}\n","import {ticks} from \"d3-array\";\nimport {format, formatSpecifier} from \"d3-format\";\nimport nice from \"./nice.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformLog(x) {\n return Math.log(x);\n}\n\nfunction transformExp(x) {\n return Math.exp(x);\n}\n\nfunction transformLogn(x) {\n return -Math.log(-x);\n}\n\nfunction transformExpn(x) {\n return -Math.exp(-x);\n}\n\nfunction pow10(x) {\n return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n return base === 10 ? pow10\n : base === Math.E ? Math.exp\n : x => Math.pow(base, x);\n}\n\nfunction logp(base) {\n return base === Math.E ? Math.log\n : base === 10 && Math.log10\n || base === 2 && Math.log2\n || (base = Math.log(base), x => Math.log(x) / base);\n}\n\nfunction reflect(f) {\n return (x, k) => -f(-x, k);\n}\n\nexport function loggish(transform) {\n const scale = transform(transformLog, transformExp);\n const domain = scale.domain;\n let base = 10;\n let logs;\n let pows;\n\n function rescale() {\n logs = logp(base), pows = powp(base);\n if (domain()[0] < 0) {\n logs = reflect(logs), pows = reflect(pows);\n transform(transformLogn, transformExpn);\n } else {\n transform(transformLog, transformExp);\n }\n return scale;\n }\n\n scale.base = function(_) {\n return arguments.length ? (base = +_, rescale()) : base;\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.ticks = count => {\n const d = domain();\n let u = d[0];\n let v = d[d.length - 1];\n const r = v < u;\n\n if (r) ([u, v] = [v, u]);\n\n let i = logs(u);\n let j = logs(v);\n let k;\n let t;\n const n = count == null ? 10 : +count;\n let z = [];\n\n if (!(base % 1) && j - i < n) {\n i = Math.floor(i), j = Math.ceil(j);\n if (u > 0) for (; i <= j; ++i) {\n for (k = 1; k < base; ++k) {\n t = i < 0 ? k / pows(-i) : k * pows(i);\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n } else for (; i <= j; ++i) {\n for (k = base - 1; k >= 1; --k) {\n t = i > 0 ? k / pows(-i) : k * pows(i);\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n }\n if (z.length * 2 < n) z = ticks(u, v, n);\n } else {\n z = ticks(i, j, Math.min(j - i, n)).map(pows);\n }\n return r ? z.reverse() : z;\n };\n\n scale.tickFormat = (count, specifier) => {\n if (count == null) count = 10;\n if (specifier == null) specifier = base === 10 ? \"s\" : \",\";\n if (typeof specifier !== \"function\") {\n if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null) specifier.trim = true;\n specifier = format(specifier);\n }\n if (count === Infinity) return specifier;\n const k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n return d => {\n let i = d / pows(Math.round(logs(d)));\n if (i * base < base - 0.5) i *= base;\n return i <= k ? specifier(d) : \"\";\n };\n };\n\n scale.nice = () => {\n return domain(nice(domain(), {\n floor: x => pows(Math.floor(logs(x))),\n ceil: x => pows(Math.ceil(logs(x)))\n }));\n };\n\n return scale;\n}\n\nexport default function log() {\n const scale = loggish(transformer()).domain([1, 10]);\n scale.copy = () => copy(scale, log()).base(scale.base());\n initRange.apply(scale, arguments);\n return scale;\n}\n","import {linearish} from \"./linear.js\";\nimport {copy, identity, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformPow(exponent) {\n return function(x) {\n return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n };\n}\n\nfunction transformSqrt(x) {\n return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);\n}\n\nfunction transformSquare(x) {\n return x < 0 ? -x * x : x * x;\n}\n\nexport function powish(transform) {\n var scale = transform(identity, identity),\n exponent = 1;\n\n function rescale() {\n return exponent === 1 ? transform(identity, identity)\n : exponent === 0.5 ? transform(transformSqrt, transformSquare)\n : transform(transformPow(exponent), transformPow(1 / exponent));\n }\n\n scale.exponent = function(_) {\n return arguments.length ? (exponent = +_, rescale()) : exponent;\n };\n\n return linearish(scale);\n}\n\nexport default function pow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, pow()).exponent(scale.exponent());\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n\nexport function sqrt() {\n return pow.apply(null, arguments).exponent(0.5);\n}\n","export const durationSecond = 1000;\nexport const durationMinute = durationSecond * 60;\nexport const durationHour = durationMinute * 60;\nexport const durationDay = durationHour * 24;\nexport const durationWeek = durationDay * 7;\nexport const durationMonth = durationDay * 30;\nexport const durationYear = durationDay * 365;\n","const t0 = new Date, t1 = new Date;\n\nexport function timeInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = (date) => {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = (date) => {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = (date) => {\n const d0 = interval(date), d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = (date, step) => {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = (start, stop, step) => {\n const range = [];\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n let previous;\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n while (previous < start && start < stop);\n return range;\n };\n\n interval.filter = (test) => {\n return timeInterval((date) => {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, (date, step) => {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n\n if (count) {\n interval.count = (start, end) => {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = (step) => {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? (d) => field(d) % step === 0\n : (d) => interval.count(0, d) % step === 0);\n };\n }\n\n return interval;\n}\n","import {timeInterval} from \"./interval.js\";\n\nexport const millisecond = timeInterval(() => {\n // noop\n}, (date, step) => {\n date.setTime(+date + step);\n}, (start, end) => {\n return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = (k) => {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return timeInterval((date) => {\n date.setTime(Math.floor(date / k) * k);\n }, (date, step) => {\n date.setTime(+date + step * k);\n }, (start, end) => {\n return (end - start) / k;\n });\n};\n\nexport const milliseconds = millisecond.range;\n","import {timeInterval} from \"./interval.js\";\nimport {durationSecond} from \"./duration.js\";\n\nexport const second = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds());\n}, (date, step) => {\n date.setTime(+date + step * durationSecond);\n}, (start, end) => {\n return (end - start) / durationSecond;\n}, (date) => {\n return date.getUTCSeconds();\n});\n\nexport const seconds = second.range;\n","import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeMinute = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, (date, step) => {\n date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n return (end - start) / durationMinute;\n}, (date) => {\n return date.getMinutes();\n});\n\nexport const timeMinutes = timeMinute.range;\n\nexport const utcMinute = timeInterval((date) => {\n date.setUTCSeconds(0, 0);\n}, (date, step) => {\n date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n return (end - start) / durationMinute;\n}, (date) => {\n return date.getUTCMinutes();\n});\n\nexport const utcMinutes = utcMinute.range;\n","import {timeInterval} from \"./interval.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeHour = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, (date, step) => {\n date.setTime(+date + step * durationHour);\n}, (start, end) => {\n return (end - start) / durationHour;\n}, (date) => {\n return date.getHours();\n});\n\nexport const timeHours = timeHour.range;\n\nexport const utcHour = timeInterval((date) => {\n date.setUTCMinutes(0, 0, 0);\n}, (date, step) => {\n date.setTime(+date + step * durationHour);\n}, (start, end) => {\n return (end - start) / durationHour;\n}, (date) => {\n return date.getUTCHours();\n});\n\nexport const utcHours = utcHour.range;\n","import {timeInterval} from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nexport const timeDay = timeInterval(\n date => date.setHours(0, 0, 0, 0),\n (date, step) => date.setDate(date.getDate() + step),\n (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n date => date.getDate() - 1\n);\n\nexport const timeDays = timeDay.range;\n\nexport const utcDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return date.getUTCDate() - 1;\n});\n\nexport const utcDays = utcDay.range;\n\nexport const unixDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return Math.floor(date / durationDay);\n});\n\nexport const unixDays = unixDay.range;\n","import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction timeWeekday(i) {\n return timeInterval((date) => {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setDate(date.getDate() + step * 7);\n }, (start, end) => {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport const timeSunday = timeWeekday(0);\nexport const timeMonday = timeWeekday(1);\nexport const timeTuesday = timeWeekday(2);\nexport const timeWednesday = timeWeekday(3);\nexport const timeThursday = timeWeekday(4);\nexport const timeFriday = timeWeekday(5);\nexport const timeSaturday = timeWeekday(6);\n\nexport const timeSundays = timeSunday.range;\nexport const timeMondays = timeMonday.range;\nexport const timeTuesdays = timeTuesday.range;\nexport const timeWednesdays = timeWednesday.range;\nexport const timeThursdays = timeThursday.range;\nexport const timeFridays = timeFriday.range;\nexport const timeSaturdays = timeSaturday.range;\n\nfunction utcWeekday(i) {\n return timeInterval((date) => {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, (start, end) => {\n return (end - start) / durationWeek;\n });\n}\n\nexport const utcSunday = utcWeekday(0);\nexport const utcMonday = utcWeekday(1);\nexport const utcTuesday = utcWeekday(2);\nexport const utcWednesday = utcWeekday(3);\nexport const utcThursday = utcWeekday(4);\nexport const utcFriday = utcWeekday(5);\nexport const utcSaturday = utcWeekday(6);\n\nexport const utcSundays = utcSunday.range;\nexport const utcMondays = utcMonday.range;\nexport const utcTuesdays = utcTuesday.range;\nexport const utcWednesdays = utcWednesday.range;\nexport const utcThursdays = utcThursday.range;\nexport const utcFridays = utcFriday.range;\nexport const utcSaturdays = utcSaturday.range;\n","import {timeInterval} from \"./interval.js\";\n\nexport const timeMonth = timeInterval((date) => {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setMonth(date.getMonth() + step);\n}, (start, end) => {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, (date) => {\n return date.getMonth();\n});\n\nexport const timeMonths = timeMonth.range;\n\nexport const utcMonth = timeInterval((date) => {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCMonth(date.getUTCMonth() + step);\n}, (start, end) => {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, (date) => {\n return date.getUTCMonth();\n});\n\nexport const utcMonths = utcMonth.range;\n","import {timeInterval} from \"./interval.js\";\n\nexport const timeYear = timeInterval((date) => {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setFullYear(date.getFullYear() + step);\n}, (start, end) => {\n return end.getFullYear() - start.getFullYear();\n}, (date) => {\n return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\ntimeYear.every = (k) => {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport const timeYears = timeYear.range;\n\nexport const utcYear = timeInterval((date) => {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, (start, end) => {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, (date) => {\n return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = (k) => {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport const utcYears = utcYear.range;\n","import {bisector, tickStep} from \"d3-array\";\nimport {durationDay, durationHour, durationMinute, durationMonth, durationSecond, durationWeek, durationYear} from \"./duration.js\";\nimport {millisecond} from \"./millisecond.js\";\nimport {second} from \"./second.js\";\nimport {timeMinute, utcMinute} from \"./minute.js\";\nimport {timeHour, utcHour} from \"./hour.js\";\nimport {timeDay, unixDay} from \"./day.js\";\nimport {timeSunday, utcSunday} from \"./week.js\";\nimport {timeMonth, utcMonth} from \"./month.js\";\nimport {timeYear, utcYear} from \"./year.js\";\n\nfunction ticker(year, month, week, day, hour, minute) {\n\n const tickIntervals = [\n [second, 1, durationSecond],\n [second, 5, 5 * durationSecond],\n [second, 15, 15 * durationSecond],\n [second, 30, 30 * durationSecond],\n [minute, 1, durationMinute],\n [minute, 5, 5 * durationMinute],\n [minute, 15, 15 * durationMinute],\n [minute, 30, 30 * durationMinute],\n [ hour, 1, durationHour ],\n [ hour, 3, 3 * durationHour ],\n [ hour, 6, 6 * durationHour ],\n [ hour, 12, 12 * durationHour ],\n [ day, 1, durationDay ],\n [ day, 2, 2 * durationDay ],\n [ week, 1, durationWeek ],\n [ month, 1, durationMonth ],\n [ month, 3, 3 * durationMonth ],\n [ year, 1, durationYear ]\n ];\n\n function ticks(start, stop, count) {\n const reverse = stop < start;\n if (reverse) [start, stop] = [stop, start];\n const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n return reverse ? ticks.reverse() : ticks;\n }\n\n function tickInterval(start, stop, count) {\n const target = Math.abs(stop - start) / count;\n const i = bisector(([,, step]) => step).right(tickIntervals, target);\n if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));\n if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));\n const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n return t.every(step);\n }\n\n return [ticks, tickInterval];\n}\n\nconst [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute);\nconst [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute);\n\nexport {utcTicks, utcTickInterval, timeTicks, timeTickInterval};\n","import {\n timeDay,\n timeSunday,\n timeMonday,\n timeThursday,\n timeYear,\n utcDay,\n utcSunday,\n utcMonday,\n utcThursday,\n utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function(string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week, day;\n if (i != string.length) return null;\n\n // If a UNIX timestamp is specified, return it.\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n // If this is utcParse, never use the local timezone.\n if (Z && !(\"Z\" in d)) d.Z = 0;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If the month was not specified, inherit from the quarter.\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n // Convert day-of-week and week-of-year to day-of-year.\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n }\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.toString = function() { return specifier; };\n return f;\n },\n parse: function(specifier) {\n var p = newParse(specifier += \"\", false);\n p.toString = function() { return specifier; };\n return p;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.toString = function() { return specifier; };\n return f;\n },\n utcParse: function(specifier) {\n var p = newParse(specifier += \"\", true);\n p.toString = function() { return specifier; };\n return p;\n }\n };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n numberRe = /^\\s*\\d+/, // note: ignores next directive\n percentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n return new Map(names.map((name, i) => [name.toLowerCase(), i]));\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n var day = d.getDay();\n return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n d = dISO(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n d = dISO(d);\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n var day = d.getDay();\n d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}\n","import {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeTicks, timeTickInterval} from \"d3-time\";\nimport {timeFormat} from \"d3-time-format\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport nice from \"./nice.js\";\n\nfunction date(t) {\n return new Date(t);\n}\n\nfunction number(t) {\n return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) {\n var scale = continuous(),\n invert = scale.invert,\n domain = scale.domain;\n\n var formatMillisecond = format(\".%L\"),\n formatSecond = format(\":%S\"),\n formatMinute = format(\"%I:%M\"),\n formatHour = format(\"%I %p\"),\n formatDay = format(\"%a %d\"),\n formatWeek = format(\"%b %d\"),\n formatMonth = format(\"%B\"),\n formatYear = format(\"%Y\");\n\n function tickFormat(date) {\n return (second(date) < date ? formatMillisecond\n : minute(date) < date ? formatSecond\n : hour(date) < date ? formatMinute\n : day(date) < date ? formatHour\n : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n : year(date) < date ? formatMonth\n : formatYear)(date);\n }\n\n scale.invert = function(y) {\n return new Date(invert(y));\n };\n\n scale.domain = function(_) {\n return arguments.length ? domain(Array.from(_, number)) : domain().map(date);\n };\n\n scale.ticks = function(interval) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);\n };\n\n scale.tickFormat = function(count, specifier) {\n return specifier == null ? tickFormat : format(specifier);\n };\n\n scale.nice = function(interval) {\n var d = domain();\n if (!interval || typeof interval.range !== \"function\") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);\n return interval ? domain(nice(d, interval)) : scale;\n };\n\n scale.copy = function() {\n return copy(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));\n };\n\n return scale;\n}\n\nexport default function time() {\n return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n","import {linearish} from \"./linear.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformSymlog(c) {\n return function(x) {\n return Math.sign(x) * Math.log1p(Math.abs(x / c));\n };\n}\n\nfunction transformSymexp(c) {\n return function(x) {\n return Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n };\n}\n\nexport function symlogish(transform) {\n var c = 1, scale = transform(transformSymlog(c), transformSymexp(c));\n\n scale.constant = function(_) {\n return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;\n };\n\n return linearish(scale);\n}\n\nexport default function symlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, symlog()).constant(scale.constant());\n };\n\n return initRange.apply(scale, arguments);\n}\n","import { scaleSymlog as originalScaleSymlog, scaleLog, scaleLinear } from '@mui/x-charts-vendor/d3-scale';\n\n/**\n * Constructs a new continuous scale with the specified range, the constant 1, the default interpolator and clamping disabled.\n * The domain defaults to [0, 1].\n * If range is not specified, it defaults to [0, 1].\n *\n * The first generic corresponds to the data type of the range elements.\n * The second generic corresponds to the data type of the output elements generated by the scale.\n * The third generic corresponds to the data type of the unknown value.\n *\n * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and\n * convert the interpolated range element to a corresponding output element.\n *\n * The range must be set in accordance with the range element type.\n *\n * The interpolator factory may be set using the interpolate(...) method of the scale.\n *\n * @param range Array of range values.\n */\n\n/**\n * Constructs a new continuous scale with the specified domain and range, the constant 1, the default interpolator and clamping disabled.\n *\n * The first generic corresponds to the data type of the range elements.\n * The second generic corresponds to the data type of the output elements generated by the scale.\n * The third generic corresponds to the data type of the unknown value.\n *\n * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and\n * convert the interpolated range element to a corresponding output element.\n *\n * The range must be set in accordance with the range element type.\n *\n * The interpolator factory may be set using the interpolate(...) method of the scale.\n *\n * @param domain Array of numeric domain values.\n * @param range Array of range values.\n */\n\nexport function scaleSymlog(...args) {\n const scale = originalScaleSymlog(...args);\n const originalTicks = scale.ticks;\n const {\n negativeScale,\n linearScale,\n positiveScale\n } = generateScales(scale);\n\n // Workaround for https://github.com/d3/d3-scale/issues/162\n scale.ticks = count => {\n const ticks = originalTicks(count);\n const constant = scale.constant();\n let negativeLogTickCount = 0;\n let linearTickCount = 0;\n let positiveLogTickCount = 0;\n ticks.forEach(tick => {\n if (tick > -constant && tick < constant) {\n linearTickCount += 1;\n }\n if (tick <= -constant) {\n negativeLogTickCount += 1;\n }\n if (tick >= constant) {\n positiveLogTickCount += 1;\n }\n });\n const finalTicks = [];\n if (negativeLogTickCount > 0) {\n finalTicks.push(...negativeScale.ticks(negativeLogTickCount));\n }\n if (linearTickCount > 0) {\n const linearTicks = linearScale.ticks(linearTickCount);\n if (finalTicks.at(-1) === linearTicks[0]) {\n finalTicks.push(...linearTicks.slice(1));\n } else {\n finalTicks.push(...linearTicks);\n }\n }\n if (positiveLogTickCount > 0) {\n const positiveTicks = positiveScale.ticks(positiveLogTickCount);\n if (finalTicks.at(-1) === positiveTicks[0]) {\n finalTicks.push(...positiveTicks.slice(1));\n } else {\n finalTicks.push(...positiveTicks);\n }\n }\n return finalTicks;\n };\n scale.tickFormat = (count = 10, specifier) => {\n // Calculates the proportion of the domain that each scale occupies, and use that ratio to determine the number of ticks for each scale.\n const constant = scale.constant();\n const [start, end] = scale.domain();\n const extent = end - start;\n const negativeScaleDomain = negativeScale.domain();\n const negativeScaleExtent = negativeScaleDomain[1] - negativeScaleDomain[0];\n const negativeScaleRatio = extent === 0 ? 0 : negativeScaleExtent / extent;\n const negativeScaleTickCount = negativeScaleRatio * count;\n const linearScaleDomain = linearScale.domain();\n const linearScaleExtent = linearScaleDomain[1] - linearScaleDomain[0];\n const linearScaleRatio = extent === 0 ? 0 : linearScaleExtent / extent;\n const linearScaleTickCount = linearScaleRatio * count;\n const positiveScaleDomain = positiveScale.domain();\n const positiveScaleExtent = positiveScaleDomain[1] - positiveScaleDomain[0];\n const positiveScaleRatio = extent === 0 ? 0 : positiveScaleExtent / extent;\n const positiveScaleTickCount = positiveScaleRatio * count;\n const negativeTickFormat = negativeScale.tickFormat(negativeScaleTickCount, specifier);\n const linearTickFormat = linearScale.tickFormat(linearScaleTickCount, specifier);\n const positiveTickFormat = positiveScale.tickFormat(positiveScaleTickCount, specifier);\n return tick => {\n const tickFormat =\n // eslint-disable-next-line no-nested-ternary\n tick.valueOf() <= -constant ? negativeTickFormat : tick.valueOf() >= constant ? positiveTickFormat : linearTickFormat;\n return tickFormat(tick);\n };\n };\n\n /* Adaptation of https://github.com/d3/d3-scale/blob/d6904a4bde09e16005e0ad8ca3e25b10ce54fa0d/src/symlog.js#L30 */\n scale.copy = () => {\n return scaleSymlog(scale.domain(), scale.range()).constant(scale.constant());\n };\n return scale;\n}\nfunction generateScales(scale) {\n const constant = scale.constant();\n const domain = scale.domain();\n const negativeDomain = [domain[0], Math.min(domain[1], -constant)];\n const negativeLogScale = scaleLog(negativeDomain, scale.range());\n const linearDomain = [Math.max(domain[0], -constant), Math.min(domain[1], constant)];\n const linearScale = scaleLinear(linearDomain, scale.range());\n const positiveDomain = [Math.max(domain[0], constant), domain[1]];\n const positiveLogScale = scaleLog(positiveDomain, scale.range());\n return {\n negativeScale: negativeLogScale,\n linearScale,\n positiveScale: positiveLogScale\n };\n}","import { scaleLog, scalePow, scaleSqrt, scaleTime, scaleUtc, scaleLinear } from '@mui/x-charts-vendor/d3-scale';\nimport { scaleSymlog } from \"./scales/index.js\";\nexport function getScale(scaleType, domain, range) {\n switch (scaleType) {\n case 'log':\n return scaleLog(domain, range);\n case 'pow':\n return scalePow(domain, range);\n case 'sqrt':\n return scaleSqrt(domain, range);\n case 'time':\n return scaleTime(domain, range);\n case 'utc':\n return scaleUtc(domain, range);\n case 'symlog':\n return scaleSymlog(domain, range);\n default:\n return scaleLinear(domain, range);\n }\n}","import {utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcTicks, utcTickInterval} from \"d3-time\";\nimport {utcFormat} from \"d3-time-format\";\nimport {calendar} from \"./time.js\";\nimport {initRange} from \"./init.js\";\n\nexport default function utcTime() {\n return initRange.apply(calendar(utcTicks, utcTickInterval, utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);\n}\n","import { scaleTime } from '@mui/x-charts-vendor/d3-scale';\n/**\n * Checks if the provided data array contains Date objects.\n * @param data The data array to check.\n * @returns A type predicate indicating if the data is an array of Date objects.\n */\nexport const isDateData = data => data?.[0] instanceof Date;\n\n/**\n * Creates a formatter function for date values.\n * @param data The data array containing Date or NumberValue objects.\n * @param range The range for the time scale.\n * @param tickNumber (Optional) The number of ticks for formatting.\n * @returns A formatter function for date values.\n */\nexport function createDateFormatter(data, range, tickNumber) {\n const timeScale = scaleTime(data, range);\n return (v, {\n location\n }) => location === 'tick' ? timeScale.tickFormat(tickNumber)(v) : `${v.toLocaleString()}`;\n}","let cartesianInstance;\nlet polarInstance;\nclass CartesianSeriesTypes {\n types = (() => new Set())();\n constructor() {\n if (cartesianInstance) {\n throw new Error('You can only create one instance!');\n }\n cartesianInstance = this.types;\n }\n addType(value) {\n this.types.add(value);\n }\n getTypes() {\n return this.types;\n }\n}\nclass PolarSeriesTypes {\n types = (() => new Set())();\n constructor() {\n if (polarInstance) {\n throw new Error('You can only create one instance!');\n }\n polarInstance = this.types;\n }\n addType(value) {\n this.types.add(value);\n }\n getTypes() {\n return this.types;\n }\n}\nexport const cartesianSeriesTypes = new CartesianSeriesTypes();\ncartesianSeriesTypes.addType('bar');\ncartesianSeriesTypes.addType('line');\ncartesianSeriesTypes.addType('scatter');\nexport const polarSeriesTypes = new PolarSeriesTypes();\npolarSeriesTypes.addType('radar');","import { cartesianSeriesTypes } from \"./configInit.js\";\nexport function isCartesianSeriesType(seriesType) {\n return cartesianSeriesTypes.getTypes().has(seriesType);\n}\nexport function isCartesianSeries(series) {\n return isCartesianSeriesType(series.type);\n}","export function isOrdinalScale(scale) {\n return scale.bandwidth !== undefined;\n}\nexport function isBandScale(scale) {\n return isOrdinalScale(scale) && scale.paddingOuter !== undefined;\n}\nexport function isPointScale(scale) {\n return isOrdinalScale(scale) && !('paddingOuter' in scale);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { createScalarFormatter } from \"../../../defaultValueFormatters.js\";\nimport { isBandScaleConfig, isPointScaleConfig } from \"../../../../models/axis.js\";\nimport { getColorScale, getOrdinalColorScale, getSequentialColorScale } from \"../../../colorScale.js\";\nimport { scaleTickNumberByRange } from \"../../../ticks.js\";\nimport { getScale } from \"../../../getScale.js\";\nimport { isDateData, createDateFormatter } from \"../../../dateHelpers.js\";\nimport { getAxisTriggerTooltip } from \"./getAxisTriggerTooltip.js\";\nimport { isBandScale, isOrdinalScale } from \"../../../scaleGuards.js\";\nfunction getRange(drawingArea, axisDirection,\n// | 'rotation' | 'radius',\nreverse) {\n const range = axisDirection === 'x' ? [drawingArea.left, drawingArea.left + drawingArea.width] : [drawingArea.top + drawingArea.height, drawingArea.top];\n return reverse ? [range[1], range[0]] : range;\n}\nfunction shouldIgnoreGapRatios(scale, categoryGapRatio) {\n const step = scale.step();\n const paddingPx = step * categoryGapRatio;\n\n /* If the padding is less than 0.1px, we consider it negligible and ignore it.\n * This prevents issues where very small gaps cause rendering artifacts or unexpected layouts.\n * A threshold of 0.1px is chosen as it's generally below the perceptible limit for most displays.\n */\n return paddingPx < 0.1;\n}\nconst DEFAULT_CATEGORY_GAP_RATIO = 0.2;\nconst DEFAULT_BAR_GAP_RATIO = 0.1;\nexport function computeAxisValue({\n scales,\n drawingArea,\n formattedSeries,\n axis: allAxis,\n seriesConfig,\n axisDirection,\n zoomMap,\n domains\n}) {\n if (allAxis === undefined) {\n return {\n axis: {},\n axisIds: []\n };\n }\n const axisIdsTriggeringTooltip = getAxisTriggerTooltip(axisDirection, seriesConfig, formattedSeries, allAxis[0].id);\n const completeAxis = {};\n allAxis.forEach(eachAxis => {\n const axis = eachAxis;\n const scale = scales[axis.id];\n const zoom = zoomMap?.get(axis.id);\n const zoomRange = zoom ? [zoom.start, zoom.end] : [0, 100];\n const range = getRange(drawingArea, axisDirection, axis.reverse ?? false);\n const rawTickNumber = domains[axis.id].tickNumber;\n const triggerTooltip = !axis.ignoreTooltip && axisIdsTriggeringTooltip.has(axis.id);\n const tickNumber = scaleTickNumberByRange(rawTickNumber, zoomRange);\n const data = axis.data ?? [];\n if (isOrdinalScale(scale)) {\n // Reverse range because ordinal scales are presented from top to bottom on y-axis\n const scaleRange = axisDirection === 'y' ? [range[1], range[0]] : range;\n if (isBandScale(scale) && isBandScaleConfig(axis)) {\n const desiredCategoryGapRatio = axis.categoryGapRatio ?? DEFAULT_CATEGORY_GAP_RATIO;\n const ignoreGapRatios = shouldIgnoreGapRatios(scale, desiredCategoryGapRatio);\n const categoryGapRatio = ignoreGapRatios ? 0 : desiredCategoryGapRatio;\n const barGapRatio = ignoreGapRatios ? 0 : axis.barGapRatio ?? DEFAULT_BAR_GAP_RATIO;\n completeAxis[axis.id] = _extends({\n offset: 0,\n height: 0,\n categoryGapRatio,\n barGapRatio,\n triggerTooltip\n }, axis, {\n data,\n /* Doing this here is technically wrong, but acceptable in practice.\n * In theory, this should be done in the normalized scale selector, but then we'd need that selector to depend\n * on the zoom range, which would void its goal (which is to be independent of zoom).\n * Since we only ignore gap ratios when they're practically invisible, the small errors caused by this\n * discrepancy will hopefully not be noticeable. */\n scale: ignoreGapRatios ? scale.copy().padding(0) : scale,\n tickNumber,\n colorScale: axis.colorMap && (axis.colorMap.type === 'ordinal' ? getOrdinalColorScale(_extends({\n values: axis.data\n }, axis.colorMap)) : getColorScale(axis.colorMap))\n });\n }\n if (isPointScaleConfig(axis)) {\n completeAxis[axis.id] = _extends({\n offset: 0,\n height: 0,\n triggerTooltip\n }, axis, {\n data,\n scale,\n tickNumber,\n colorScale: axis.colorMap && (axis.colorMap.type === 'ordinal' ? getOrdinalColorScale(_extends({\n values: axis.data\n }, axis.colorMap)) : getColorScale(axis.colorMap))\n });\n }\n if (isDateData(axis.data)) {\n const dateFormatter = createDateFormatter(axis.data, scaleRange, axis.tickNumber);\n completeAxis[axis.id].valueFormatter = axis.valueFormatter ?? dateFormatter;\n }\n return;\n }\n if (axis.scaleType === 'band' || axis.scaleType === 'point') {\n // Could be merged with the two previous \"if conditions\" but then TS does not get that `axis.scaleType` can't be `band` or `point`.\n return;\n }\n const continuousAxis = axis;\n const scaleType = continuousAxis.scaleType ?? 'linear';\n completeAxis[axis.id] = _extends({\n offset: 0,\n height: 0,\n triggerTooltip\n }, continuousAxis, {\n data,\n scaleType,\n scale,\n tickNumber,\n colorScale: continuousAxis.colorMap && getSequentialColorScale(continuousAxis.colorMap),\n valueFormatter: axis.valueFormatter ?? createScalarFormatter(tickNumber, getScale(scaleType, range.map(v => scale.invert(v)), range))\n });\n });\n return {\n axis: completeAxis,\n axisIds: allAxis.map(({\n id\n }) => id)\n };\n}","import { isCartesianSeriesType } from \"../../../isCartesian.js\";\nexport const getAxisTriggerTooltip = (axisDirection, seriesConfig, formattedSeries, defaultAxisId) => {\n const tooltipAxesIds = new Set();\n const chartTypes = Object.keys(seriesConfig).filter(isCartesianSeriesType);\n chartTypes.forEach(chartType => {\n const series = formattedSeries[chartType]?.series ?? {};\n const tooltipAxes = seriesConfig[chartType].axisTooltipGetter?.(series);\n if (tooltipAxes === undefined) {\n return;\n }\n tooltipAxes.forEach(({\n axisId,\n direction\n }) => {\n if (direction === axisDirection) {\n tooltipAxesIds.add(axisId ?? defaultAxisId);\n }\n });\n });\n return tooltipAxesIds;\n};","export function isDefined(value) {\n return value !== null && value !== undefined;\n}","import { isDefined } from \"../../../isDefined.js\";\nexport function createDiscreteScaleGetAxisFilter(axisData, zoomStart, zoomEnd, direction) {\n const maxIndex = axisData?.length ?? 0;\n const minVal = Math.floor(zoomStart * maxIndex / 100);\n const maxVal = Math.ceil(zoomEnd * maxIndex / 100);\n return function filterAxis(value, dataIndex) {\n const val = value[direction] ?? axisData?.[dataIndex];\n if (val == null) {\n // If the value does not exist because of missing data point, or out of range index, we just ignore.\n return true;\n }\n return dataIndex >= minVal && dataIndex < maxVal;\n };\n}\nexport function createContinuousScaleGetAxisFilter(domain, zoomStart, zoomEnd, direction, axisData) {\n const min = domain[0].valueOf();\n const max = domain[1].valueOf();\n const minVal = min + zoomStart * (max - min) / 100;\n const maxVal = min + zoomEnd * (max - min) / 100;\n return function filterAxis(value, dataIndex) {\n const val = value[direction] ?? axisData?.[dataIndex];\n if (val == null) {\n // If the value does not exist because of missing data point, or out of range index, we just ignore.\n return true;\n }\n return val >= minVal && val <= maxVal;\n };\n}\nexport const createGetAxisFilters = filters => ({\n currentAxisId,\n seriesXAxisId,\n seriesYAxisId,\n isDefaultAxis\n}) => {\n return (value, dataIndex) => {\n const axisId = currentAxisId === seriesXAxisId ? seriesYAxisId : seriesXAxisId;\n if (!axisId || isDefaultAxis) {\n return Object.values(filters ?? {})[0]?.(value, dataIndex) ?? true;\n }\n const data = [seriesYAxisId, seriesXAxisId].filter(id => id !== currentAxisId).map(id => filters[id ?? '']).filter(isDefined);\n return data.every(f => f(value, dataIndex));\n };\n};","import { defaultizeZoom } from \"./defaultizeZoom.js\";\nexport const createZoomLookup = axisDirection => (axes = []) => axes.reduce((acc, v) => {\n // @ts-ignore\n const {\n zoom,\n id: axisId,\n reverse\n } = v;\n const defaultizedZoom = defaultizeZoom(zoom, axisId, axisDirection, reverse);\n if (defaultizedZoom) {\n acc[axisId] = defaultizedZoom;\n }\n return acc;\n}, {});","import { createSelector } from '@mui/x-internals/store';\nexport const selectorChartExperimentalFeaturesState = state => state.experimentalFeatures;\nexport const selectorPreferStrictDomainInLineCharts = createSelector(selectorChartExperimentalFeaturesState, features => Boolean(features?.preferStrictDomainInLineCharts));","/* eslint-disable func-names */\n// Adapted from d3-scale v4.0.2\n// https://github.com/d3/d3-scale/blob/d6904a4bde09e16005e0ad8ca3e25b10ce54fa0d/src/band.js\nimport { InternMap, range as sequence } from '@mui/x-charts-vendor/d3-array';\nexport function keyof(value) {\n if (Array.isArray(value)) {\n return JSON.stringify(value);\n }\n if (typeof value === 'object' && value !== null) {\n return value.valueOf();\n }\n return value;\n}\n\n/**\n * Constructs a new band scale with the specified range, no padding, no rounding and center alignment.\n * The domain defaults to the empty domain.\n * If range is not specified, it defaults to the unit range [0, 1].\n *\n * The generic corresponds to the data type of domain elements.\n *\n * @param range A two-element array of numeric values.\n */\n\n/**\n * Constructs a new band scale with the specified domain and range, no padding, no rounding and center alignment.\n *\n * The generic corresponds to the data type of domain elements.\n *\n * @param domain Array of domain values.\n * @param range A two-element array of numeric values.\n */\n\nexport function scaleBand(...args) {\n // @ts-expect-error, InternMap accepts two arguments, but its types are set as Map, which doesn't.\n let index = new InternMap(undefined, keyof);\n let domain = [];\n let ordinalRange = [];\n let r0 = 0;\n let r1 = 1;\n let step;\n let bandwidth;\n let isRound = false;\n let paddingInner = 0;\n let paddingOuter = 0;\n let align = 0.5;\n const scale = d => {\n const i = index.get(d);\n if (i === undefined) {\n return undefined;\n }\n return ordinalRange[i % ordinalRange.length];\n };\n const rescale = () => {\n const n = domain.length;\n const reverse = r1 < r0;\n const start = reverse ? r1 : r0;\n const stop = reverse ? r0 : r1;\n step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n if (isRound) {\n step = Math.floor(step);\n }\n const adjustedStart = start + (stop - start - step * (n - paddingInner)) * align;\n bandwidth = step * (1 - paddingInner);\n const finalStart = isRound ? Math.round(adjustedStart) : adjustedStart;\n const finalBandwidth = isRound ? Math.round(bandwidth) : bandwidth;\n bandwidth = finalBandwidth;\n const values = sequence(n).map(i => finalStart + step * i);\n ordinalRange = reverse ? values.reverse() : values;\n return scale;\n };\n scale.domain = function (_) {\n if (!arguments.length) {\n return domain.slice();\n }\n domain = [];\n // @ts-expect-error, InternMap accepts two arguments.\n index = new InternMap(undefined, keyof);\n for (const value of _) {\n if (index.has(value)) {\n continue;\n }\n index.set(value, domain.push(value) - 1);\n }\n return rescale();\n };\n scale.range = function (_) {\n if (!arguments.length) {\n return [r0, r1];\n }\n const [v0, v1] = _;\n r0 = +v0;\n r1 = +v1;\n return rescale();\n };\n scale.rangeRound = function (_) {\n const [v0, v1] = _;\n r0 = +v0;\n r1 = +v1;\n isRound = true;\n return rescale();\n };\n scale.bandwidth = function () {\n return bandwidth;\n };\n scale.step = function () {\n return step;\n };\n scale.round = function (_) {\n if (!arguments.length) {\n return isRound;\n }\n isRound = !!_;\n return rescale();\n };\n scale.padding = function (_) {\n if (!arguments.length) {\n return paddingInner;\n }\n paddingInner = Math.min(1, paddingOuter = +_);\n return rescale();\n };\n scale.paddingInner = function (_) {\n if (!arguments.length) {\n return paddingInner;\n }\n paddingInner = Math.min(1, _);\n return rescale();\n };\n scale.paddingOuter = function (_) {\n if (!arguments.length) {\n return paddingOuter;\n }\n paddingOuter = +_;\n return rescale();\n };\n scale.align = function (_) {\n if (!arguments.length) {\n return align;\n }\n align = Math.max(0, Math.min(1, _));\n return rescale();\n };\n scale.copy = () => {\n return scaleBand(domain, [r0, r1]).round(isRound).paddingInner(paddingInner).paddingOuter(paddingOuter).align(align);\n };\n\n // Initialize from arguments\n const [arg0, arg1] = args;\n if (args.length > 1) {\n scale.domain(arg0);\n scale.range(arg1);\n } else if (arg0) {\n scale.range(arg0);\n } else {\n rescale();\n }\n return scale;\n}","export default function range(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n}\n","import { scaleBand } from \"./scaleBand.js\";\n\n/**\n * Constructs a new point scale with the specified range, no padding, no rounding and center alignment.\n * The domain defaults to the empty domain.\n * If range is not specified, it defaults to the unit range [0, 1].\n *\n * The generic corresponds to the data type of domain elements.\n *\n * @param range A two-element array of numeric values.\n */\n\n/**\n * Constructs a new point scale with the specified domain and range, no padding, no rounding and center alignment.\n * The domain defaults to the empty domain.\n *\n * The generic corresponds to the data type of domain elements.\n *\n * @param domain Array of domain values.\n * @param range A two-element array of numeric values.\n */\n\nexport function scalePoint(...args) {\n // ScalePoint is essentially ScaleBand with paddingInner(1)\n const scale = scaleBand(...args).paddingInner(1);\n\n // Remove paddingInner method and make padding alias to paddingOuter\n const originalCopy = scale.copy;\n scale.padding = scale.paddingOuter;\n delete scale.paddingInner;\n delete scale.paddingOuter;\n scale.copy = () => {\n const copied = originalCopy();\n copied.padding = copied.paddingOuter;\n delete copied.paddingInner;\n delete copied.paddingOuter;\n copied.copy = scale.copy;\n return copied;\n };\n return scale;\n}","import { isBandScaleConfig, isPointScaleConfig, isSymlogScaleConfig } from \"../../../../models/axis.js\";\nimport { getScale } from \"../../../getScale.js\";\nimport { scaleBand, scalePoint } from \"../../../scales/index.js\";\nconst DEFAULT_CATEGORY_GAP_RATIO = 0.2;\nexport function getRange(drawingArea, axisDirection, axis) {\n const range = axisDirection === 'x' ? [drawingArea.left, drawingArea.left + drawingArea.width] : [drawingArea.top + drawingArea.height, drawingArea.top];\n return axis.reverse ? [range[1], range[0]] : range;\n}\nexport function getNormalizedAxisScale(axis, domain) {\n const range = [0, 1];\n if (isBandScaleConfig(axis)) {\n const categoryGapRatio = axis.categoryGapRatio ?? DEFAULT_CATEGORY_GAP_RATIO;\n return scaleBand(domain, range).paddingInner(categoryGapRatio).paddingOuter(categoryGapRatio / 2);\n }\n if (isPointScaleConfig(axis)) {\n return scalePoint(domain, range);\n }\n const scaleType = axis.scaleType ?? 'linear';\n const scale = getScale(scaleType, domain, range);\n if (isSymlogScaleConfig(axis) && axis.constant != null) {\n scale.constant(axis.constant);\n }\n return scale;\n}","/**\n * Applies the zoom into the scale range.\n * It changes the screen coordinates that the scale covers.\n * Not the data that is displayed.\n *\n * @param scaleRange the original range in real screen coordinates.\n * @param zoomRange the zoom range in percentage.\n * @returns zoomed range in real screen coordinates.\n */\nexport const zoomScaleRange = (scaleRange, zoomRange) => {\n const rangeGap = scaleRange[1] - scaleRange[0];\n const zoomGap = zoomRange[1] - zoomRange[0];\n\n // If current zoom show the scale between p1 and p2 percents\n // The range should be extended by adding [0, p1] and [p2, 100] segments\n const min = scaleRange[0] - zoomRange[0] * rangeGap / zoomGap;\n const max = scaleRange[1] + (100 - zoomRange[1]) * rangeGap / zoomGap;\n return [min, max];\n};","import { isCartesianSeriesType } from \"../../../isCartesian.js\";\nconst axisExtremumCallback = (chartType, axis, axisDirection, seriesConfig, axisIndex, formattedSeries, getFilters) => {\n const getter = axisDirection === 'x' ? seriesConfig[chartType].xExtremumGetter : seriesConfig[chartType].yExtremumGetter;\n const series = formattedSeries[chartType]?.series ?? {};\n return getter?.({\n series,\n axis,\n axisIndex,\n isDefaultAxis: axisIndex === 0,\n getFilters\n }) ?? [Infinity, -Infinity];\n};\nexport function getAxisExtrema(axis, axisDirection, seriesConfig, axisIndex, formattedSeries, getFilters) {\n const cartesianChartTypes = Object.keys(seriesConfig).filter(isCartesianSeriesType);\n let extrema = [Infinity, -Infinity];\n for (const chartType of cartesianChartTypes) {\n const [min, max] = axisExtremumCallback(chartType, axis, axisDirection, seriesConfig, axisIndex, formattedSeries, getFilters);\n extrema = [Math.min(extrema[0], min), Math.max(extrema[1], max)];\n }\n if (Number.isNaN(extrema[0]) || Number.isNaN(extrema[1])) {\n return [Infinity, -Infinity];\n }\n return extrema;\n}","import { getScale } from \"../../../getScale.js\";\nimport { getAxisDomainLimit } from \"./getAxisDomainLimit.js\";\nimport { getTickNumber } from \"../../../ticks.js\";\nfunction niceDomain(scaleType, domain, tickNumber) {\n return getScale(scaleType ?? 'linear', domain, [0, 1]).nice(tickNumber).domain();\n}\n\n/**\n * Calculates the initial domain and tick number for a given axis.\n * The domain should still run through the zoom filterMode after this step.\n */\nexport function calculateInitialDomainAndTickNumber(axis, axisDirection, axisIndex, formattedSeries, [minData, maxData], defaultTickNumber, preferStrictDomainInLineCharts) {\n const domainLimit = getDomainLimit(axis, axisDirection, axisIndex, formattedSeries, preferStrictDomainInLineCharts);\n let axisExtrema = getActualAxisExtrema(axis, minData, maxData);\n if (typeof domainLimit === 'function') {\n const {\n min,\n max\n } = domainLimit(minData.valueOf(), maxData.valueOf());\n axisExtrema[0] = min;\n axisExtrema[1] = max;\n }\n const tickNumber = getTickNumber(axis, axisExtrema, defaultTickNumber);\n if (domainLimit === 'nice') {\n axisExtrema = niceDomain(axis.scaleType, axisExtrema, tickNumber);\n }\n axisExtrema = ['min' in axis ? axis.min ?? axisExtrema[0] : axisExtrema[0], 'max' in axis ? axis.max ?? axisExtrema[1] : axisExtrema[1]];\n return {\n domain: axisExtrema,\n tickNumber\n };\n}\n\n/**\n * Calculates the final domain for an axis.\n * After this step, the domain can be used to create the axis scale.\n */\nexport function calculateFinalDomain(axis, axisDirection, axisIndex, formattedSeries, [minData, maxData], tickNumber, preferStrictDomainInLineCharts) {\n const domainLimit = getDomainLimit(axis, axisDirection, axisIndex, formattedSeries, preferStrictDomainInLineCharts);\n let axisExtrema = getActualAxisExtrema(axis, minData, maxData);\n if (typeof domainLimit === 'function') {\n const {\n min,\n max\n } = domainLimit(minData.valueOf(), maxData.valueOf());\n axisExtrema[0] = min;\n axisExtrema[1] = max;\n }\n if (domainLimit === 'nice') {\n axisExtrema = niceDomain(axis.scaleType, axisExtrema, tickNumber);\n }\n return [axis.min ?? axisExtrema[0], axis.max ?? axisExtrema[1]];\n}\nfunction getDomainLimit(axis, axisDirection, axisIndex, formattedSeries, preferStrictDomainInLineCharts) {\n return preferStrictDomainInLineCharts ? getAxisDomainLimit(axis, axisDirection, axisIndex, formattedSeries) : axis.domainLimit ?? 'nice';\n}\n\n/**\n * Get the actual axis extrema considering the user defined min and max values.\n * @param axisExtrema User defined axis extrema.\n * @param minData Minimum value from the data.\n * @param maxData Maximum value from the data.\n */\nfunction getActualAxisExtrema(axisExtrema, minData, maxData) {\n let min = minData;\n let max = maxData;\n if ('max' in axisExtrema && axisExtrema.max != null && axisExtrema.max < minData) {\n min = axisExtrema.max;\n }\n if ('min' in axisExtrema && axisExtrema.min != null && axisExtrema.min > minData) {\n max = axisExtrema.min;\n }\n if (!('min' in axisExtrema) && !('max' in axisExtrema)) {\n return [min, max];\n }\n return [axisExtrema.min ?? min, axisExtrema.max ?? max];\n}","export const getAxisDomainLimit = (axis, axisDirection, axisIndex, formattedSeries) => {\n if (axis.domainLimit !== undefined) {\n return axis.domainLimit;\n }\n if (axisDirection === 'x') {\n for (const seriesId of formattedSeries.line?.seriesOrder ?? []) {\n const series = formattedSeries.line.series[seriesId];\n if (series.xAxisId === axis.id || series.xAxisId === undefined && axisIndex === 0) {\n return 'strict';\n }\n }\n }\n return 'nice';\n};","\n/** @template T */\nexport default class FlatQueue {\n\n constructor() {\n /** @type T[] */\n this.ids = [];\n\n /** @type number[] */\n this.values = [];\n\n /** Number of items in the queue. */\n this.length = 0;\n }\n\n /** Removes all items from the queue. */\n clear() {\n this.length = 0;\n }\n\n /**\n * Adds `item` to the queue with the specified `priority`.\n *\n * `priority` must be a number. Items are sorted and returned from low to high priority. Multiple items\n * with the same priority value can be added to the queue, but there is no guaranteed order between these items.\n *\n * @param {T} item\n * @param {number} priority\n */\n push(item, priority) {\n let pos = this.length++;\n\n while (pos > 0) {\n const parent = (pos - 1) >> 1;\n const parentValue = this.values[parent];\n if (priority >= parentValue) break;\n this.ids[pos] = this.ids[parent];\n this.values[pos] = parentValue;\n pos = parent;\n }\n\n this.ids[pos] = item;\n this.values[pos] = priority;\n }\n\n /**\n * Removes and returns the item from the head of this queue, which is one of\n * the items with the lowest priority. If this queue is empty, returns `undefined`.\n */\n pop() {\n if (this.length === 0) return undefined;\n\n const ids = this.ids,\n values = this.values,\n top = ids[0],\n last = --this.length;\n\n if (last > 0) {\n const id = ids[last];\n const value = values[last];\n let pos = 0;\n const halfLen = last >> 1;\n\n while (pos < halfLen) {\n const left = (pos << 1) + 1;\n const right = left + 1;\n const child = left + (+(right < last) & +(values[right] < values[left]));\n if (values[child] >= value) break;\n ids[pos] = ids[child];\n values[pos] = values[child];\n pos = child;\n }\n\n ids[pos] = id;\n values[pos] = value;\n }\n\n return top;\n }\n\n /** Returns the item from the head of this queue without removing it. If this queue is empty, returns `undefined`. */\n peek() {\n return this.length > 0 ? this.ids[0] : undefined;\n }\n\n /**\n * Returns the priority value of the item at the head of this queue without\n * removing it. If this queue is empty, returns `undefined`.\n */\n peekValue() {\n return this.length > 0 ? this.values[0] : undefined;\n }\n\n /**\n * Shrinks the internal arrays to `this.length`.\n *\n * `pop()` and `clear()` calls don't free memory automatically to avoid unnecessary resize operations.\n * This also means that items that have been added to the queue can't be garbage collected until\n * a new item is pushed in their place, or this method is called.\n */\n shrink() {\n this.ids.length = this.values.length = this.length;\n }\n}\n","// @ts-nocheck\n/* eslint-disable */\nimport FlatQueue from '@mui/x-charts-vendor/flatqueue';\nconst ARRAY_TYPES = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array];\nconst VERSION = 3; // serialized format version\n\nexport class Flatbush {\n /**\n * Recreate a Flatbush index from raw `ArrayBuffer` or `SharedArrayBuffer` data.\n * @param {ArrayBufferLike} data\n * @param {number} [byteOffset=0] byte offset to the start of the Flatbush buffer in the referenced ArrayBuffer.\n * @returns {Flatbush} index\n */\n static from(data, byteOffset = 0) {\n if (byteOffset % 8 !== 0) {\n throw new Error('byteOffset must be 8-byte aligned.');\n }\n\n // @ts-expect-error duck typing array buffers\n if (!data || data.byteLength === undefined || data.buffer) {\n throw new Error('Data must be an instance of ArrayBuffer or SharedArrayBuffer.');\n }\n const [magic, versionAndType] = new Uint8Array(data, byteOffset + 0, 2);\n if (magic !== 0xfb) {\n throw new Error('Data does not appear to be in a Flatbush format.');\n }\n const version = versionAndType >> 4;\n if (version !== VERSION) {\n throw new Error(`Got v${version} data when expected v${VERSION}.`);\n }\n const ArrayType = ARRAY_TYPES[versionAndType & 0x0f];\n if (!ArrayType) {\n throw new Error('Unrecognized array type.');\n }\n const [nodeSize] = new Uint16Array(data, byteOffset + 2, 1);\n const [numItems] = new Uint32Array(data, byteOffset + 4, 1);\n return new Flatbush(numItems, nodeSize, ArrayType, undefined, data, byteOffset);\n }\n\n /**\n * Create a Flatbush index that will hold a given number of items.\n * @param {number} numItems\n * @param {number} [nodeSize=16] Size of the tree node (16 by default).\n * @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).\n * @param {ArrayBufferConstructor | SharedArrayBufferConstructor} [ArrayBufferType=ArrayBuffer] The array buffer type used to store data (`ArrayBuffer` by default).\n * @param {ArrayBufferLike} [data] (Only used internally)\n * @param {number} [byteOffset=0] (Only used internally)\n */\n constructor(numItems, nodeSize = 16, ArrayType = Float64Array, ArrayBufferType = ArrayBuffer, data, byteOffset = 0) {\n if (numItems === undefined) {\n throw new Error('Missing required argument: numItems.');\n }\n if (isNaN(numItems) || numItems <= 0) {\n throw new Error(`Unexpected numItems value: ${numItems}.`);\n }\n this.numItems = +numItems;\n this.nodeSize = Math.min(Math.max(+nodeSize, 2), 65535);\n this.byteOffset = byteOffset;\n\n // calculate the total number of nodes in the R-tree to allocate space for\n // and the index of each tree level (used in search later)\n let n = numItems;\n let numNodes = n;\n this._levelBounds = [n * 4];\n do {\n n = Math.ceil(n / this.nodeSize);\n numNodes += n;\n this._levelBounds.push(numNodes * 4);\n } while (n !== 1);\n this.ArrayType = ArrayType;\n this.IndexArrayType = numNodes < 16384 ? Uint16Array : Uint32Array;\n const arrayTypeIndex = ARRAY_TYPES.indexOf(ArrayType);\n const nodesByteSize = numNodes * 4 * ArrayType.BYTES_PER_ELEMENT;\n if (arrayTypeIndex < 0) {\n throw new Error(`Unexpected typed array class: ${ArrayType}.`);\n }\n if (data) {\n this.data = data;\n this._boxes = new ArrayType(data, byteOffset + 8, numNodes * 4);\n this._indices = new this.IndexArrayType(data, byteOffset + 8 + nodesByteSize, numNodes);\n this._pos = numNodes * 4;\n this.minX = this._boxes[this._pos - 4];\n this.minY = this._boxes[this._pos - 3];\n this.maxX = this._boxes[this._pos - 2];\n this.maxY = this._boxes[this._pos - 1];\n } else {\n const data = this.data = new ArrayBufferType(8 + nodesByteSize + numNodes * this.IndexArrayType.BYTES_PER_ELEMENT);\n this._boxes = new ArrayType(data, 8, numNodes * 4);\n this._indices = new this.IndexArrayType(data, 8 + nodesByteSize, numNodes);\n this._pos = 0;\n this.minX = Infinity;\n this.minY = Infinity;\n this.maxX = -Infinity;\n this.maxY = -Infinity;\n new Uint8Array(data, 0, 2).set([0xfb, (VERSION << 4) + arrayTypeIndex]);\n new Uint16Array(data, 2, 1)[0] = nodeSize;\n new Uint32Array(data, 4, 1)[0] = numItems;\n }\n\n // a priority queue for k-nearest-neighbors queries\n /** @type FlatQueue */\n this._queue = new FlatQueue();\n }\n\n /**\n * Add a given rectangle to the index.\n * @param {number} minX\n * @param {number} minY\n * @param {number} maxX\n * @param {number} maxY\n * @returns {number} A zero-based, incremental number that represents the newly added rectangle.\n */\n add(minX, minY, maxX = minX, maxY = minY) {\n const index = this._pos >> 2;\n const boxes = this._boxes;\n this._indices[index] = index;\n boxes[this._pos++] = minX;\n boxes[this._pos++] = minY;\n boxes[this._pos++] = maxX;\n boxes[this._pos++] = maxY;\n if (minX < this.minX) {\n this.minX = minX;\n }\n if (minY < this.minY) {\n this.minY = minY;\n }\n if (maxX > this.maxX) {\n this.maxX = maxX;\n }\n if (maxY > this.maxY) {\n this.maxY = maxY;\n }\n return index;\n }\n\n /** Perform indexing of the added rectangles. */\n finish() {\n if (this._pos >> 2 !== this.numItems) {\n throw new Error(`Added ${this._pos >> 2} items when expected ${this.numItems}.`);\n }\n const boxes = this._boxes;\n if (this.numItems <= this.nodeSize) {\n // only one node, skip sorting and just fill the root box\n boxes[this._pos++] = this.minX;\n boxes[this._pos++] = this.minY;\n boxes[this._pos++] = this.maxX;\n boxes[this._pos++] = this.maxY;\n return;\n }\n const width = this.maxX - this.minX || 1;\n const height = this.maxY - this.minY || 1;\n const hilbertValues = new Uint32Array(this.numItems);\n const hilbertMax = (1 << 16) - 1;\n\n // map item centers into Hilbert coordinate space and calculate Hilbert values\n for (let i = 0, pos = 0; i < this.numItems; i++) {\n const minX = boxes[pos++];\n const minY = boxes[pos++];\n const maxX = boxes[pos++];\n const maxY = boxes[pos++];\n const x = Math.floor(hilbertMax * ((minX + maxX) / 2 - this.minX) / width);\n const y = Math.floor(hilbertMax * ((minY + maxY) / 2 - this.minY) / height);\n hilbertValues[i] = hilbert(x, y);\n }\n\n // sort items by their Hilbert value (for packing later)\n sort(hilbertValues, boxes, this._indices, 0, this.numItems - 1, this.nodeSize);\n\n // generate nodes at each tree level, bottom-up\n for (let i = 0, pos = 0; i < this._levelBounds.length - 1; i++) {\n const end = this._levelBounds[i];\n\n // generate a parent node for each block of consecutive nodes\n while (pos < end) {\n const nodeIndex = pos;\n\n // calculate bbox for the new node\n let nodeMinX = boxes[pos++];\n let nodeMinY = boxes[pos++];\n let nodeMaxX = boxes[pos++];\n let nodeMaxY = boxes[pos++];\n for (let j = 1; j < this.nodeSize && pos < end; j++) {\n nodeMinX = Math.min(nodeMinX, boxes[pos++]);\n nodeMinY = Math.min(nodeMinY, boxes[pos++]);\n nodeMaxX = Math.max(nodeMaxX, boxes[pos++]);\n nodeMaxY = Math.max(nodeMaxY, boxes[pos++]);\n }\n\n // add the new node to the tree data\n this._indices[this._pos >> 2] = nodeIndex;\n boxes[this._pos++] = nodeMinX;\n boxes[this._pos++] = nodeMinY;\n boxes[this._pos++] = nodeMaxX;\n boxes[this._pos++] = nodeMaxY;\n }\n }\n }\n\n /**\n * Search the index by a bounding box.\n * @param {number} minX\n * @param {number} minY\n * @param {number} maxX\n * @param {number} maxY\n * @param {(index: number) => boolean} [filterFn] An optional function for filtering the results.\n * @returns {number[]} An array containing the index, the x coordinate and the y coordinate of the points intersecting or touching the given bounding box.\n */\n search(minX, minY, maxX, maxY, filterFn) {\n if (this._pos !== this._boxes.length) {\n throw new Error('Data not yet indexed - call index.finish().');\n }\n\n /** @type number | undefined */\n let nodeIndex = this._boxes.length - 4;\n const queue = [];\n const results = [];\n while (nodeIndex !== undefined) {\n // find the end index of the node\n const end = Math.min(nodeIndex + this.nodeSize * 4, upperBound(nodeIndex, this._levelBounds));\n\n // search through child nodes\n for (let /** @type number */pos = nodeIndex; pos < end; pos += 4) {\n // check if node bbox intersects with query bbox\n if (maxX < this._boxes[pos]) {\n continue;\n } // maxX < nodeMinX\n if (maxY < this._boxes[pos + 1]) {\n continue;\n } // maxY < nodeMinY\n if (minX > this._boxes[pos + 2]) {\n continue;\n } // minX > nodeMaxX\n if (minY > this._boxes[pos + 3]) {\n continue;\n } // minY > nodeMaxY\n\n const index = this._indices[pos >> 2] | 0;\n if (nodeIndex >= this.numItems * 4) {\n queue.push(index); // node; add it to the search queue\n } else if (filterFn === undefined || filterFn(index)) {\n results.push(index);\n results.push(this._boxes[pos]); // leaf item\n results.push(this._boxes[pos + 1]);\n }\n }\n nodeIndex = queue.pop();\n }\n return results;\n }\n\n /**\n * Search items in order of distance from the given point.\n * @param x\n * @param y\n * @param [maxResults=Infinity]\n * @param maxDistSq\n * @param [filterFn] An optional function for filtering the results.\n * @param [sqDistFn] An optional function to calculate squared distance from the point to the item.\n * @returns {number[]} An array of indices of items found.\n */\n neighbors(x, y, maxResults = Infinity, maxDistSq = Infinity, filterFn, sqDistFn = sqDist) {\n if (this._pos !== this._boxes.length) {\n throw new Error('Data not yet indexed - call index.finish().');\n }\n\n /** @type number | undefined */\n let nodeIndex = this._boxes.length - 4;\n const q = this._queue;\n const results = [];\n\n /* eslint-disable no-labels */\n outer: while (nodeIndex !== undefined) {\n // find the end index of the node\n const end = Math.min(nodeIndex + this.nodeSize * 4, upperBound(nodeIndex, this._levelBounds));\n\n // add child nodes to the queue\n for (let pos = nodeIndex; pos < end; pos += 4) {\n const index = this._indices[pos >> 2] | 0;\n const minX = this._boxes[pos];\n const minY = this._boxes[pos + 1];\n const maxX = this._boxes[pos + 2];\n const maxY = this._boxes[pos + 3];\n const dx = x < minX ? minX - x : x > maxX ? x - maxX : 0;\n const dy = y < minY ? minY - y : y > maxY ? y - maxY : 0;\n const dist = sqDistFn(dx, dy);\n if (dist > maxDistSq) {\n continue;\n }\n if (nodeIndex >= this.numItems * 4) {\n q.push(index << 1, dist); // node (use even id)\n } else if (filterFn === undefined || filterFn(index)) {\n q.push((index << 1) + 1, dist); // leaf item (use odd id)\n }\n }\n\n // pop items from the queue\n // @ts-expect-error q.length check eliminates undefined values\n while (q.length && q.peek() & 1) {\n const dist = q.peekValue();\n\n // @ts-expect-error\n if (dist > maxDistSq) {\n break outer;\n }\n // @ts-expect-error\n results.push(q.pop() >> 1);\n if (results.length === maxResults) {\n break outer;\n }\n }\n\n // @ts-expect-error\n nodeIndex = q.length ? q.pop() >> 1 : undefined;\n }\n q.clear();\n return results;\n }\n}\nfunction sqDist(dx, dy) {\n return dx * dx + dy * dy;\n}\n\n/**\n * Binary search for the first value in the array bigger than the given.\n * @param {number} value\n * @param {number[]} arr\n */\nfunction upperBound(value, arr) {\n let i = 0;\n let j = arr.length - 1;\n while (i < j) {\n const m = i + j >> 1;\n if (arr[m] > value) {\n j = m;\n } else {\n i = m + 1;\n }\n }\n return arr[i];\n}\n\n/**\n * Custom quicksort that partially sorts bbox data alongside the hilbert values.\n * @param {Uint32Array} values\n * @param {InstanceType} boxes\n * @param {Uint16Array | Uint32Array} indices\n * @param {number} left\n * @param {number} right\n * @param {number} nodeSize\n */\nfunction sort(values, boxes, indices, left, right, nodeSize) {\n if (Math.floor(left / nodeSize) >= Math.floor(right / nodeSize)) {\n return;\n }\n\n // apply median of three method\n const start = values[left];\n const mid = values[left + right >> 1];\n const end = values[right];\n let pivot = end;\n const x = Math.max(start, mid);\n if (end > x) {\n pivot = x;\n } else if (x === start) {\n pivot = Math.max(mid, end);\n } else if (x === mid) {\n pivot = Math.max(start, end);\n }\n let i = left - 1;\n let j = right + 1;\n while (true) {\n do {\n i++;\n } while (values[i] < pivot);\n do {\n j--;\n } while (values[j] > pivot);\n if (i >= j) {\n break;\n }\n swap(values, boxes, indices, i, j);\n }\n sort(values, boxes, indices, left, j, nodeSize);\n sort(values, boxes, indices, j + 1, right, nodeSize);\n}\n\n/**\n * Swap two values and two corresponding boxes.\n * @param {Uint32Array} values\n * @param {InstanceType} boxes\n * @param {Uint16Array | Uint32Array} indices\n * @param {number} i\n * @param {number} j\n */\nfunction swap(values, boxes, indices, i, j) {\n const temp = values[i];\n values[i] = values[j];\n values[j] = temp;\n const k = 4 * i;\n const m = 4 * j;\n const a = boxes[k];\n const b = boxes[k + 1];\n const c = boxes[k + 2];\n const d = boxes[k + 3];\n boxes[k] = boxes[m];\n boxes[k + 1] = boxes[m + 1];\n boxes[k + 2] = boxes[m + 2];\n boxes[k + 3] = boxes[m + 3];\n boxes[m] = a;\n boxes[m + 1] = b;\n boxes[m + 2] = c;\n boxes[m + 3] = d;\n const e = indices[i];\n indices[i] = indices[j];\n indices[j] = e;\n}\n\n/**\n * Fast Hilbert curve algorithm by http://threadlocalmutex.com/\n * Ported from C++ https://github.com/rawrunprotected/hilbert_curves (public domain)\n * @param {number} x\n * @param {number} y\n */\nfunction hilbert(x, y) {\n let a = x ^ y;\n let b = 0xffff ^ a;\n let c = 0xffff ^ (x | y);\n let d = x & (y ^ 0xffff);\n let A = a | b >> 1;\n let B = a >> 1 ^ a;\n let C = c >> 1 ^ b & d >> 1 ^ c;\n let D = a & c >> 1 ^ d >> 1 ^ d;\n a = A;\n b = B;\n c = C;\n d = D;\n A = a & a >> 2 ^ b & b >> 2;\n B = a & b >> 2 ^ b & (a ^ b) >> 2;\n C ^= a & c >> 2 ^ b & d >> 2;\n D ^= b & c >> 2 ^ (a ^ b) & d >> 2;\n a = A;\n b = B;\n c = C;\n d = D;\n A = a & a >> 4 ^ b & b >> 4;\n B = a & b >> 4 ^ b & (a ^ b) >> 4;\n C ^= a & c >> 4 ^ b & d >> 4;\n D ^= b & c >> 4 ^ (a ^ b) & d >> 4;\n a = A;\n b = B;\n c = C;\n d = D;\n C ^= a & c >> 8 ^ b & d >> 8;\n D ^= b & c >> 8 ^ (a ^ b) & d >> 8;\n a = C ^ C >> 1;\n b = D ^ D >> 1;\n let i0 = x ^ y;\n let i1 = b | 0xffff ^ (i0 | a);\n i0 = (i0 | i0 << 8) & 0x00ff00ff;\n i0 = (i0 | i0 << 4) & 0x0f0f0f0f;\n i0 = (i0 | i0 << 2) & 0x33333333;\n i0 = (i0 | i0 << 1) & 0x55555555;\n i1 = (i1 | i1 << 8) & 0x00ff00ff;\n i1 = (i1 | i1 << 4) & 0x0f0f0f0f;\n i1 = (i1 | i1 << 2) & 0x33333333;\n i1 = (i1 | i1 << 1) & 0x55555555;\n return (i1 << 1 | i0) >>> 0;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { createSelector, createSelectorMemoized } from '@mui/x-internals/store';\nimport { selectorChartDrawingArea } from \"../../corePlugins/useChartDimensions/index.js\";\nimport { selectorChartSeriesConfig, selectorChartSeriesProcessed } from \"../../corePlugins/useChartSeries/index.js\";\nimport { computeAxisValue } from \"./computeAxisValue.js\";\nimport { createContinuousScaleGetAxisFilter, createDiscreteScaleGetAxisFilter, createGetAxisFilters } from \"./createAxisFilterMapper.js\";\nimport { createZoomLookup } from \"./createZoomLookup.js\";\nimport { isBandScaleConfig, isPointScaleConfig } from \"../../../../models/axis.js\";\nimport { selectorChartRawXAxis, selectorChartRawYAxis } from \"./useChartCartesianAxisLayout.selectors.js\";\nimport { selectorPreferStrictDomainInLineCharts } from \"../../corePlugins/useChartExperimentalFeature/index.js\";\nimport { getDefaultTickNumber, getTickNumber } from \"../../../ticks.js\";\nimport { getNormalizedAxisScale, getRange } from \"./getAxisScale.js\";\nimport { isOrdinalScale } from \"../../../scaleGuards.js\";\nimport { zoomScaleRange } from \"./zoom.js\";\nimport { getAxisExtrema } from \"./getAxisExtrema.js\";\nimport { calculateFinalDomain, calculateInitialDomainAndTickNumber } from \"./domain.js\";\nimport { Flatbush } from \"../../../Flatbush.js\";\nexport const createZoomMap = zoom => {\n const zoomItemMap = new Map();\n zoom.forEach(zoomItem => {\n zoomItemMap.set(zoomItem.axisId, zoomItem);\n });\n return zoomItemMap;\n};\nconst selectorChartZoomState = state => state.zoom;\nexport const selectorChartHasZoom = createSelector(selectorChartRawXAxis, selectorChartRawYAxis, (xAxes, yAxes) => xAxes?.some(axis => Boolean(axis.zoom)) || yAxes?.some(axis => Boolean(axis.zoom)) || false);\n\n/**\n * Following selectors are not exported because they exist in the MIT chart only to ba able to reuse the Zoom state from the pro.\n */\n\nexport const selectorChartZoomIsInteracting = createSelector(selectorChartZoomState, zoom => zoom?.isInteracting);\nexport const selectorChartZoomMap = createSelectorMemoized(selectorChartZoomState, function selectorChartZoomMap(zoom) {\n return zoom?.zoomData && createZoomMap(zoom?.zoomData);\n});\nexport const selectorChartAxisZoomData = createSelector(selectorChartZoomMap, (zoomMap, axisId) => zoomMap?.get(axisId));\nexport const selectorChartZoomOptionsLookup = createSelectorMemoized(selectorChartRawXAxis, selectorChartRawYAxis, function selectorChartZoomOptionsLookup(xAxis, yAxis) {\n return _extends({}, createZoomLookup('x')(xAxis), createZoomLookup('y')(yAxis));\n});\nexport const selectorChartAxisZoomOptionsLookup = createSelector(selectorChartZoomOptionsLookup, (axisLookup, axisId) => axisLookup[axisId]);\nexport const selectorDefaultXAxisTickNumber = createSelector(selectorChartDrawingArea, function selectorDefaultXAxisTickNumber(drawingArea) {\n return getDefaultTickNumber(drawingArea.width);\n});\nexport const selectorDefaultYAxisTickNumber = createSelector(selectorChartDrawingArea, function selectorDefaultYAxisTickNumber(drawingArea) {\n return getDefaultTickNumber(drawingArea.height);\n});\nexport const selectorChartXAxisWithDomains = createSelectorMemoized(selectorChartRawXAxis, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorPreferStrictDomainInLineCharts, selectorDefaultXAxisTickNumber, function selectorChartXAxisWithDomains(axes, formattedSeries, seriesConfig, preferStrictDomainInLineCharts, defaultTickNumber) {\n const axisDirection = 'x';\n const domains = {};\n axes?.forEach((eachAxis, axisIndex) => {\n const axis = eachAxis;\n if (isBandScaleConfig(axis) || isPointScaleConfig(axis)) {\n domains[axis.id] = {\n domain: axis.data\n };\n if (axis.ordinalTimeTicks !== undefined) {\n domains[axis.id].tickNumber = getTickNumber(axis, [axis.data?.find(d => d !== null), axis.data?.findLast(d => d !== null)], defaultTickNumber);\n }\n return;\n }\n const axisExtrema = getAxisExtrema(axis, axisDirection, seriesConfig, axisIndex, formattedSeries);\n domains[axis.id] = calculateInitialDomainAndTickNumber(axis, 'x', axisIndex, formattedSeries, axisExtrema, defaultTickNumber, preferStrictDomainInLineCharts);\n });\n return {\n axes,\n domains\n };\n});\nexport const selectorChartYAxisWithDomains = createSelectorMemoized(selectorChartRawYAxis, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorPreferStrictDomainInLineCharts, selectorDefaultYAxisTickNumber, function selectorChartYAxisWithDomains(axes, formattedSeries, seriesConfig, preferStrictDomainInLineCharts, defaultTickNumber) {\n const axisDirection = 'y';\n const domains = {};\n axes?.forEach((eachAxis, axisIndex) => {\n const axis = eachAxis;\n if (isBandScaleConfig(axis) || isPointScaleConfig(axis)) {\n domains[axis.id] = {\n domain: axis.data\n };\n if (axis.ordinalTimeTicks !== undefined) {\n domains[axis.id].tickNumber = getTickNumber(axis, [axis.data?.find(d => d !== null), axis.data?.findLast(d => d !== null)], defaultTickNumber);\n }\n return;\n }\n const axisExtrema = getAxisExtrema(axis, axisDirection, seriesConfig, axisIndex, formattedSeries);\n domains[axis.id] = calculateInitialDomainAndTickNumber(axis, 'y', axisIndex, formattedSeries, axisExtrema, defaultTickNumber, preferStrictDomainInLineCharts);\n });\n return {\n axes,\n domains\n };\n});\nexport const selectorChartZoomAxisFilters = createSelectorMemoized(selectorChartZoomMap, selectorChartZoomOptionsLookup, selectorChartXAxisWithDomains, selectorChartYAxisWithDomains, function selectorChartZoomAxisFilters(zoomMap, zoomOptions, {\n axes: xAxis,\n domains: xDomains\n}, {\n axes: yAxis,\n domains: yDomains\n}) {\n if (!zoomMap || !zoomOptions) {\n return undefined;\n }\n let hasFilter = false;\n const filters = {};\n const axes = [...(xAxis ?? []), ...(yAxis ?? [])];\n for (let i = 0; i < axes.length; i += 1) {\n const axis = axes[i];\n if (!zoomOptions[axis.id] || zoomOptions[axis.id].filterMode !== 'discard') {\n continue;\n }\n const zoom = zoomMap.get(axis.id);\n if (zoom === undefined || zoom.start <= 0 && zoom.end >= 100) {\n // No zoom, or zoom with all data visible\n continue;\n }\n const axisDirection = i < (xAxis?.length ?? 0) ? 'x' : 'y';\n if (axis.scaleType === 'band' || axis.scaleType === 'point') {\n filters[axis.id] = createDiscreteScaleGetAxisFilter(axis.data, zoom.start, zoom.end, axisDirection);\n } else {\n const {\n domain\n } = axisDirection === 'x' ? xDomains[axis.id] : yDomains[axis.id];\n filters[axis.id] = createContinuousScaleGetAxisFilter(\n // For continuous scales, the domain is always a two-value array.\n domain, zoom.start, zoom.end, axisDirection, axis.data);\n }\n hasFilter = true;\n }\n if (!hasFilter) {\n return undefined;\n }\n return createGetAxisFilters(filters);\n});\nexport const selectorChartFilteredXDomains = createSelectorMemoized(selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomMap, selectorChartZoomOptionsLookup, selectorChartZoomAxisFilters, selectorPreferStrictDomainInLineCharts, selectorChartXAxisWithDomains, function selectorChartFilteredXDomains(formattedSeries, seriesConfig, zoomMap, zoomOptions, getFilters, preferStrictDomainInLineCharts, {\n axes,\n domains\n}) {\n const filteredDomains = {};\n axes?.forEach((axis, axisIndex) => {\n const domain = domains[axis.id].domain;\n if (isBandScaleConfig(axis) || isPointScaleConfig(axis)) {\n filteredDomains[axis.id] = domain;\n return;\n }\n const zoom = zoomMap?.get(axis.id);\n const zoomOption = zoomOptions?.[axis.id];\n const filter = zoom === undefined && !zoomOption ? getFilters : undefined; // Do not apply filtering if zoom is already defined.\n\n if (!filter) {\n filteredDomains[axis.id] = domain;\n return;\n }\n const rawTickNumber = domains[axis.id].tickNumber;\n const axisExtrema = getAxisExtrema(axis, 'x', seriesConfig, axisIndex, formattedSeries, filter);\n filteredDomains[axis.id] = calculateFinalDomain(axis, 'x', axisIndex, formattedSeries, axisExtrema, rawTickNumber, preferStrictDomainInLineCharts);\n });\n return filteredDomains;\n});\nexport const selectorChartFilteredYDomains = createSelectorMemoized(selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomMap, selectorChartZoomOptionsLookup, selectorChartZoomAxisFilters, selectorPreferStrictDomainInLineCharts, selectorChartYAxisWithDomains, function selectorChartFilteredYDomains(formattedSeries, seriesConfig, zoomMap, zoomOptions, getFilters, preferStrictDomainInLineCharts, {\n axes,\n domains\n}) {\n const filteredDomains = {};\n axes?.forEach((axis, axisIndex) => {\n const domain = domains[axis.id].domain;\n if (isBandScaleConfig(axis) || isPointScaleConfig(axis)) {\n filteredDomains[axis.id] = domain;\n return;\n }\n const zoom = zoomMap?.get(axis.id);\n const zoomOption = zoomOptions?.[axis.id];\n const filter = zoom === undefined && !zoomOption ? getFilters : undefined; // Do not apply filtering if zoom is already defined.\n\n if (!filter) {\n filteredDomains[axis.id] = domain;\n return;\n }\n const rawTickNumber = domains[axis.id].tickNumber;\n const axisExtrema = getAxisExtrema(axis, 'y', seriesConfig, axisIndex, formattedSeries, filter);\n filteredDomains[axis.id] = calculateFinalDomain(axis, 'y', axisIndex, formattedSeries, axisExtrema, rawTickNumber, preferStrictDomainInLineCharts);\n });\n return filteredDomains;\n});\nexport const selectorChartNormalizedXScales = createSelectorMemoized(selectorChartRawXAxis, selectorChartFilteredXDomains, function selectorChartNormalizedXScales(axes, filteredDomains) {\n const scales = {};\n axes?.forEach(eachAxis => {\n const axis = eachAxis;\n const domain = filteredDomains[axis.id];\n scales[axis.id] = getNormalizedAxisScale(axis, domain);\n });\n return scales;\n});\nexport const selectorChartNormalizedYScales = createSelectorMemoized(selectorChartRawYAxis, selectorChartFilteredYDomains, function selectorChartNormalizedYScales(axes, filteredDomains) {\n const scales = {};\n axes?.forEach(eachAxis => {\n const axis = eachAxis;\n const domain = filteredDomains[axis.id];\n scales[axis.id] = getNormalizedAxisScale(axis, domain);\n });\n return scales;\n});\nexport const selectorChartXScales = createSelectorMemoized(selectorChartRawXAxis, selectorChartNormalizedXScales, selectorChartDrawingArea, selectorChartZoomMap, function selectorChartXScales(axes, normalizedScales, drawingArea, zoomMap) {\n const scales = {};\n axes?.forEach(eachAxis => {\n const axis = eachAxis;\n const zoom = zoomMap?.get(axis.id);\n const zoomRange = zoom ? [zoom.start, zoom.end] : [0, 100];\n const range = getRange(drawingArea, 'x', axis);\n const scale = normalizedScales[axis.id].copy();\n const zoomedRange = zoomScaleRange(range, zoomRange);\n scale.range(zoomedRange);\n scales[axis.id] = scale;\n });\n return scales;\n});\nexport const selectorChartYScales = createSelectorMemoized(selectorChartRawYAxis, selectorChartNormalizedYScales, selectorChartDrawingArea, selectorChartZoomMap, function selectorChartYScales(axes, normalizedScales, drawingArea, zoomMap) {\n const scales = {};\n axes?.forEach(eachAxis => {\n const axis = eachAxis;\n const zoom = zoomMap?.get(axis.id);\n const zoomRange = zoom ? [zoom.start, zoom.end] : [0, 100];\n const range = getRange(drawingArea, 'y', axis);\n const scale = normalizedScales[axis.id].copy();\n const scaleRange = isOrdinalScale(scale) ? range.reverse() : range;\n const zoomedRange = zoomScaleRange(scaleRange, zoomRange);\n scale.range(zoomedRange);\n scales[axis.id] = scale;\n });\n return scales;\n});\n\n/**\n * The only interesting selectors that merge axis data and zoom if provided.\n */\n\nexport const selectorChartXAxis = createSelectorMemoized(selectorChartDrawingArea, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomMap, selectorChartXAxisWithDomains, selectorChartXScales, function selectorChartXAxis(drawingArea, formattedSeries, seriesConfig, zoomMap, {\n axes,\n domains\n}, scales) {\n return computeAxisValue({\n scales,\n drawingArea,\n formattedSeries,\n axis: axes,\n seriesConfig,\n axisDirection: 'x',\n zoomMap,\n domains\n });\n});\nexport const selectorChartYAxis = createSelectorMemoized(selectorChartDrawingArea, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomMap, selectorChartYAxisWithDomains, selectorChartYScales, function selectorChartYAxis(drawingArea, formattedSeries, seriesConfig, zoomMap, {\n axes,\n domains\n}, scales) {\n return computeAxisValue({\n scales,\n drawingArea,\n formattedSeries,\n axis: axes,\n seriesConfig,\n axisDirection: 'y',\n zoomMap,\n domains\n });\n});\nexport const selectorChartAxis = createSelector(selectorChartXAxis, selectorChartYAxis, (xAxes, yAxes, axisId) => xAxes?.axis[axisId] ?? yAxes?.axis[axisId]);\nexport const selectorChartRawAxis = createSelector(selectorChartRawXAxis, selectorChartRawYAxis, (xAxes, yAxes, axisId) => {\n const axis = xAxes?.find(a => a.id === axisId) ?? yAxes?.find(a => a.id === axisId) ?? null;\n if (!axis) {\n return undefined;\n }\n return axis;\n});\nexport const selectorChartDefaultXAxisId = createSelector(selectorChartRawXAxis, xAxes => xAxes[0].id);\nexport const selectorChartDefaultYAxisId = createSelector(selectorChartRawYAxis, yAxes => yAxes[0].id);\nconst EMPTY_MAP = new Map();\nexport const selectorChartSeriesEmptyFlatbushMap = () => EMPTY_MAP;\nexport const selectorChartSeriesFlatbushMap = createSelectorMemoized(selectorChartSeriesProcessed, selectorChartNormalizedXScales, selectorChartNormalizedYScales, selectorChartDefaultXAxisId, selectorChartDefaultYAxisId, function selectChartSeriesFlatbushMap(allSeries, xAxesScaleMap, yAxesScaleMap, defaultXAxisId, defaultYAxisId) {\n // FIXME: Do we want to support non-scatter series here?\n const validSeries = allSeries.scatter;\n const flatbushMap = new Map();\n if (!validSeries) {\n return flatbushMap;\n }\n validSeries.seriesOrder.forEach(seriesId => {\n const {\n data,\n xAxisId = defaultXAxisId,\n yAxisId = defaultYAxisId\n } = validSeries.series[seriesId];\n const flatbush = new Flatbush(data.length);\n const originalXScale = xAxesScaleMap[xAxisId];\n const originalYScale = yAxesScaleMap[yAxisId];\n for (const datum of data) {\n // Add the points using a [0, 1] range so that we don't need to recreate the Flatbush structure when zooming.\n // This doesn't happen in practice, though, because currently the scales depend on the drawing area.\n flatbush.add(originalXScale(datum.x), originalYScale(datum.y));\n }\n flatbush.finish();\n flatbushMap.set(seriesId, flatbush);\n });\n return flatbushMap;\n});","import { isOrdinalScale } from \"../../../scaleGuards.js\";\nfunction getAsANumber(value) {\n return value instanceof Date ? value.getTime() : value;\n}\n\n/**\n * For a pointer coordinate, this function returns the dataIndex associated.\n * Returns `-1` if no dataIndex matches.\n */\nexport function getAxisIndex(axisConfig, pointerValue) {\n const {\n scale,\n data: axisData,\n reverse\n } = axisConfig;\n if (!isOrdinalScale(scale)) {\n const value = scale.invert(pointerValue);\n if (axisData === undefined) {\n return -1;\n }\n const valueAsNumber = getAsANumber(value);\n const closestIndex = axisData?.findIndex((pointValue, index) => {\n const v = getAsANumber(pointValue);\n if (v > valueAsNumber) {\n if (index === 0 || Math.abs(valueAsNumber - v) <= Math.abs(valueAsNumber - getAsANumber(axisData[index - 1]))) {\n return true;\n }\n }\n if (v <= valueAsNumber) {\n if (index === axisData.length - 1 || Math.abs(getAsANumber(value) - v) < Math.abs(getAsANumber(value) - getAsANumber(axisData[index + 1]))) {\n return true;\n }\n }\n return false;\n });\n return closestIndex;\n }\n const dataIndex = scale.bandwidth() === 0 ? Math.floor((pointerValue - Math.min(...scale.range()) + scale.step() / 2) / scale.step()) : Math.floor((pointerValue - Math.min(...scale.range())) / scale.step());\n if (dataIndex < 0 || dataIndex >= axisData.length) {\n return -1;\n }\n return reverse ? axisData.length - 1 - dataIndex : dataIndex;\n}\n\n/**\n * For a pointer coordinate, this function returns the value associated.\n * Returns `null` if the coordinate has no value associated.\n */\nexport function getAxisValue(scale, axisData, pointerValue, dataIndex) {\n if (!isOrdinalScale(scale)) {\n if (dataIndex === null) {\n const invertedValue = scale.invert(pointerValue);\n return Number.isNaN(invertedValue) ? null : invertedValue;\n }\n return axisData[dataIndex];\n }\n if (dataIndex === null || dataIndex < 0 || dataIndex >= axisData.length) {\n return null;\n }\n return axisData[dataIndex];\n}","/**\n * Transform mouse event position to coordinates inside the SVG.\n * @param svg The SVG element\n * @param event The mouseEvent to transform\n */\nexport function getSVGPoint(svg, event) {\n const pt = svg.createSVGPoint();\n pt.x = event.clientX;\n pt.y = event.clientY;\n return pt.matrixTransform(svg.getScreenCTM().inverse());\n}","import { createSelector } from '@mui/x-internals/store';\nconst selectInteraction = state => state.interaction;\nexport const selectorChartsInteractionIsInitialized = createSelector(selectInteraction, interaction => interaction !== undefined);\nexport const selectorChartsInteractionPointer = createSelector(selectInteraction, interaction => interaction?.pointer ?? null);\nexport const selectorChartsInteractionPointerX = createSelector(selectorChartsInteractionPointer, pointer => pointer && pointer.x);\nexport const selectorChartsInteractionPointerY = createSelector(selectorChartsInteractionPointer, pointer => pointer && pointer.y);\nexport const selectorChartsLastInteraction = createSelector(selectInteraction, interaction => interaction?.lastUpdate);","/**\n * Based on `fast-deep-equal`\n *\n * MIT License\n *\n * Copyright (c) 2017 Evgeny Poberezkin\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/**\n * Check if two values are deeply equal.\n */\n\nexport function isDeepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (a && b && typeof a === 'object' && typeof b === 'object') {\n if (a.constructor !== b.constructor) {\n return false;\n }\n if (Array.isArray(a)) {\n const length = a.length;\n if (length !== b.length) {\n return false;\n }\n for (let i = 0; i < length; i += 1) {\n if (!isDeepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n if (a instanceof Map && b instanceof Map) {\n if (a.size !== b.size) {\n return false;\n }\n const entriesA = Array.from(a.entries());\n for (let i = 0; i < entriesA.length; i += 1) {\n if (!b.has(entriesA[i][0])) {\n return false;\n }\n }\n for (let i = 0; i < entriesA.length; i += 1) {\n const entryA = entriesA[i];\n if (!isDeepEqual(entryA[1], b.get(entryA[0]))) {\n return false;\n }\n }\n return true;\n }\n if (a instanceof Set && b instanceof Set) {\n if (a.size !== b.size) {\n return false;\n }\n const entries = Array.from(a.entries());\n for (let i = 0; i < entries.length; i += 1) {\n if (!b.has(entries[i][0])) {\n return false;\n }\n }\n return true;\n }\n if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n const length = a.length;\n if (length !== b.length) {\n return false;\n }\n for (let i = 0; i < length; i += 1) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n }\n if (a.constructor === RegExp) {\n return a.source === b.source && a.flags === b.flags;\n }\n if (a.valueOf !== Object.prototype.valueOf) {\n return a.valueOf() === b.valueOf();\n }\n if (a.toString !== Object.prototype.toString) {\n return a.toString() === b.toString();\n }\n const keys = Object.keys(a);\n const length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (let i = 0; i < length; i += 1) {\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (let i = 0; i < length; i += 1) {\n const key = keys[i];\n if (!isDeepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n\n // true if both NaN, false otherwise\n // eslint-disable-next-line no-self-compare\n return a !== a && b !== b;\n}","import { isDeepEqual } from '@mui/x-internals/isDeepEqual';\nimport { createSelector, createSelectorMemoizedWithOptions } from '@mui/x-internals/store';\nimport { selectorChartsInteractionPointerX, selectorChartsInteractionPointerY } from \"../useChartInteraction/useChartInteraction.selectors.js\";\nimport { getAxisIndex, getAxisValue } from \"./getAxisValue.js\";\nimport { selectorChartXAxis, selectorChartYAxis } from \"./useChartCartesianAxisRendering.selectors.js\";\n\n/**\n * Get interaction indexes\n */\n\nfunction indexGetter(value, axes, ids = axes.axisIds[0]) {\n return Array.isArray(ids) ? ids.map(id => getAxisIndex(axes.axis[id], value)) : getAxisIndex(axes.axis[ids], value);\n}\nexport const selectChartsInteractionAxisIndex = (value, axes, id) => {\n if (value === null) {\n return null;\n }\n const index = indexGetter(value, axes, id);\n return index === -1 ? null : index;\n};\nexport const selectorChartsInteractionXAxisIndex = createSelector(selectorChartsInteractionPointerX, selectorChartXAxis, selectChartsInteractionAxisIndex);\nexport const selectorChartsInteractionYAxisIndex = createSelector(selectorChartsInteractionPointerY, selectorChartYAxis, selectChartsInteractionAxisIndex);\nexport const selectorChartAxisInteraction = createSelector(selectorChartsInteractionPointerX, selectorChartsInteractionPointerY, selectorChartXAxis, selectorChartYAxis, (x, y, xAxis, yAxis) => [...(x === null ? [] : xAxis.axisIds.map(axisId => ({\n axisId,\n dataIndex: indexGetter(x, xAxis, axisId)\n}))), ...(y === null ? [] : yAxis.axisIds.map(axisId => ({\n axisId,\n dataIndex: indexGetter(y, yAxis, axisId)\n})))].filter(item => item.dataIndex !== null && item.dataIndex >= 0));\n\n/**\n * Get interaction values\n */\n\nfunction valueGetter(value, axes, indexes, ids = axes.axisIds[0]) {\n return Array.isArray(ids) ? ids.map((id, axisIndex) => {\n const axis = axes.axis[id];\n return getAxisValue(axis.scale, axis.data, value, indexes[axisIndex]);\n }) : getAxisValue(axes.axis[ids].scale, axes.axis[ids].data, value, indexes);\n}\nexport const selectorChartsInteractionXAxisValue = createSelector(selectorChartsInteractionPointerX, selectorChartXAxis, selectorChartsInteractionXAxisIndex, (x, xAxes, xIndex, id) => {\n if (x === null || xAxes.axisIds.length === 0) {\n return null;\n }\n return valueGetter(x, xAxes, xIndex, id);\n});\nexport const selectorChartsInteractionYAxisValue = createSelector(selectorChartsInteractionPointerY, selectorChartYAxis, selectorChartsInteractionYAxisIndex, (y, yAxes, yIndex, id) => {\n if (y === null || yAxes.axisIds.length === 0) {\n return null;\n }\n return valueGetter(y, yAxes, yIndex, id);\n});\nconst EMPTY_ARRAY = [];\n\n/**\n * Get x-axis ids and corresponding data index that should be display in the tooltip.\n */\nexport const selectorChartsInteractionTooltipXAxes = createSelectorMemoizedWithOptions({\n memoizeOptions: {\n // Keep the same reference if array content is the same.\n // If possible, avoid this pattern by creating selectors that\n // uses string/number as arguments.\n resultEqualityCheck: isDeepEqual\n }\n})(selectorChartsInteractionPointerX, selectorChartXAxis, (value, axes) => {\n if (value === null) {\n return EMPTY_ARRAY;\n }\n return axes.axisIds.filter(id => axes.axis[id].triggerTooltip).map(axisId => ({\n axisId,\n dataIndex: getAxisIndex(axes.axis[axisId], value)\n })).filter(({\n dataIndex\n }) => dataIndex >= 0);\n});\n\n/**\n * Get y-axis ids and corresponding data index that should be display in the tooltip.\n */\nexport const selectorChartsInteractionTooltipYAxes = createSelectorMemoizedWithOptions({\n memoizeOptions: {\n // Keep the same reference if array content is the same.\n // If possible, avoid this pattern by creating selectors that\n // uses string/number as arguments.\n resultEqualityCheck: isDeepEqual\n }\n})(selectorChartsInteractionPointerY, selectorChartYAxis, (value, axes) => {\n if (value === null) {\n return EMPTY_ARRAY;\n }\n return axes.axisIds.filter(id => axes.axis[id].triggerTooltip).map(axisId => ({\n axisId,\n dataIndex: getAxisIndex(axes.axis[axisId], value)\n })).filter(({\n dataIndex\n }) => dataIndex >= 0);\n});\n\n/**\n * Return `true` if the axis tooltip has something to display.\n */\nexport const selectorChartsInteractionAxisTooltip = createSelector(selectorChartsInteractionTooltipXAxes, selectorChartsInteractionTooltipYAxes, (xTooltip, yTooltip) => xTooltip.length > 0 || yTooltip.length > 0);","export function checkHasInteractionPlugin(instance) {\n return instance.setPointerCoordinate !== undefined;\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { useStoreEffect } from '@mui/x-internals/store';\nimport { useAssertModelConsistency } from '@mui/x-internals/useAssertModelConsistency';\nimport { warnOnce } from '@mui/x-internals/warning';\nimport { rainbowSurgePalette } from \"../../../../colorPalettes/index.js\";\nimport { selectorChartDrawingArea } from \"../../corePlugins/useChartDimensions/useChartDimensions.selectors.js\";\nimport { selectorChartSeriesProcessed } from \"../../corePlugins/useChartSeries/useChartSeries.selectors.js\";\nimport { defaultizeXAxis, defaultizeYAxis } from \"./defaultizeAxis.js\";\nimport { selectorChartXAxis, selectorChartYAxis } from \"./useChartCartesianAxisRendering.selectors.js\";\nimport { getAxisIndex } from \"./getAxisValue.js\";\nimport { getSVGPoint } from \"../../../getSVGPoint.js\";\nimport { selectorChartsInteractionIsInitialized } from \"../useChartInteraction/index.js\";\nimport { selectorChartAxisInteraction } from \"./useChartCartesianInteraction.selectors.js\";\nimport { checkHasInteractionPlugin } from \"../useChartInteraction/checkHasInteractionPlugin.js\";\nconst AXIS_CLICK_SERIES_TYPES = new Set(['bar', 'rangeBar', 'line']);\nexport const useChartCartesianAxis = ({\n params,\n store,\n seriesConfig,\n svgRef,\n instance\n}) => {\n const {\n xAxis,\n yAxis,\n dataset,\n onHighlightedAxisChange\n } = params;\n if (process.env.NODE_ENV !== 'production') {\n const ids = [...(xAxis ?? []), ...(yAxis ?? [])].filter(axis => axis.id).map(axis => axis.id);\n const duplicates = new Set(ids.filter((id, index) => ids.indexOf(id) !== index));\n if (duplicates.size > 0) {\n warnOnce([`MUI X Charts: The following axis ids are duplicated: ${Array.from(duplicates).join(', ')}.`, `Please make sure that each axis has a unique id.`].join('\\n'), 'error');\n }\n }\n const drawingArea = store.use(selectorChartDrawingArea);\n const processedSeries = store.use(selectorChartSeriesProcessed);\n const isInteractionEnabled = store.use(selectorChartsInteractionIsInitialized);\n const {\n axis: xAxisWithScale,\n axisIds: xAxisIds\n } = store.use(selectorChartXAxis);\n const {\n axis: yAxisWithScale,\n axisIds: yAxisIds\n } = store.use(selectorChartYAxis);\n useAssertModelConsistency({\n warningPrefix: 'MUI X Charts',\n componentName: 'Chart',\n propName: 'highlightedAxis',\n controlled: params.highlightedAxis,\n defaultValue: undefined\n });\n useEnhancedEffect(() => {\n if (params.highlightedAxis !== undefined) {\n store.set('controlledCartesianAxisHighlight', params.highlightedAxis);\n }\n }, [store, params.highlightedAxis]);\n\n // The effect do not track any value defined synchronously during the 1st render by hooks called after `useChartCartesianAxis`\n // As a consequence, the state generated by the 1st run of this useEffect will always be equal to the initialization one\n const isFirstRender = React.useRef(true);\n React.useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n store.set('cartesianAxis', {\n x: defaultizeXAxis(xAxis, dataset),\n y: defaultizeYAxis(yAxis, dataset)\n });\n }, [seriesConfig, drawingArea, xAxis, yAxis, dataset, store]);\n const usedXAxis = xAxisIds[0];\n const usedYAxis = yAxisIds[0];\n useStoreEffect(store, selectorChartAxisInteraction, (prevAxisInteraction, nextAxisInteraction) => {\n if (!onHighlightedAxisChange) {\n return;\n }\n if (Object.is(prevAxisInteraction, nextAxisInteraction)) {\n return;\n }\n if (prevAxisInteraction.length !== nextAxisInteraction.length) {\n onHighlightedAxisChange(nextAxisInteraction);\n return;\n }\n if (prevAxisInteraction?.some(({\n axisId,\n dataIndex\n }, itemIndex) => nextAxisInteraction[itemIndex].axisId !== axisId || nextAxisInteraction[itemIndex].dataIndex !== dataIndex)) {\n onHighlightedAxisChange(nextAxisInteraction);\n }\n });\n const hasInteractionPlugin = checkHasInteractionPlugin(instance);\n React.useEffect(() => {\n const element = svgRef.current;\n if (!isInteractionEnabled || !hasInteractionPlugin || !element || params.disableAxisListener) {\n return () => {};\n }\n\n // Clean the interaction when the mouse leaves the chart.\n const moveEndHandler = instance.addInteractionListener('moveEnd', event => {\n if (!event.detail.activeGestures.pan) {\n instance.cleanInteraction();\n }\n });\n const panEndHandler = instance.addInteractionListener('panEnd', event => {\n if (!event.detail.activeGestures.move) {\n instance.cleanInteraction();\n }\n });\n const pressEndHandler = instance.addInteractionListener('quickPressEnd', event => {\n if (!event.detail.activeGestures.move && !event.detail.activeGestures.pan) {\n instance.cleanInteraction();\n }\n });\n const gestureHandler = event => {\n const srvEvent = event.detail.srcEvent;\n const target = event.detail.target;\n const svgPoint = getSVGPoint(element, srvEvent);\n\n // Release the pointer capture if we are panning, as this would cause the tooltip to\n // be locked to the first \"section\" it touches.\n if (event.detail.srcEvent.buttons >= 1 && target?.hasPointerCapture(event.detail.srcEvent.pointerId) && !target?.closest('[data-charts-zoom-slider]')) {\n target?.releasePointerCapture(event.detail.srcEvent.pointerId);\n }\n if (!instance.isPointInside(svgPoint.x, svgPoint.y, target)) {\n instance.cleanInteraction?.();\n return;\n }\n instance.setPointerCoordinate(svgPoint);\n };\n const moveHandler = instance.addInteractionListener('move', gestureHandler);\n const panHandler = instance.addInteractionListener('pan', gestureHandler);\n const pressHandler = instance.addInteractionListener('quickPress', gestureHandler);\n return () => {\n moveHandler.cleanup();\n moveEndHandler.cleanup();\n panHandler.cleanup();\n panEndHandler.cleanup();\n pressHandler.cleanup();\n pressEndHandler.cleanup();\n };\n }, [svgRef, store, xAxisWithScale, usedXAxis, yAxisWithScale, usedYAxis, instance, params.disableAxisListener, isInteractionEnabled, hasInteractionPlugin]);\n React.useEffect(() => {\n const element = svgRef.current;\n const onAxisClick = params.onAxisClick;\n if (element === null || !onAxisClick) {\n return () => {};\n }\n const axisClickHandler = instance.addInteractionListener('tap', event => {\n let dataIndex = null;\n let isXAxis = false;\n const svgPoint = getSVGPoint(element, event.detail.srcEvent);\n const xIndex = getAxisIndex(xAxisWithScale[usedXAxis], svgPoint.x);\n isXAxis = xIndex !== -1;\n dataIndex = isXAxis ? xIndex : getAxisIndex(yAxisWithScale[usedYAxis], svgPoint.y);\n const USED_AXIS_ID = isXAxis ? xAxisIds[0] : yAxisIds[0];\n if (dataIndex == null || dataIndex === -1) {\n return;\n }\n\n // The .data exist because otherwise the dataIndex would be null or -1.\n const axisValue = (isXAxis ? xAxisWithScale : yAxisWithScale)[USED_AXIS_ID].data[dataIndex];\n const seriesValues = {};\n Object.keys(processedSeries).filter(seriesType => AXIS_CLICK_SERIES_TYPES.has(seriesType)).forEach(seriesType => {\n // @ts-ignore\n const seriesTypeConfig = processedSeries[seriesType];\n seriesTypeConfig?.seriesOrder.forEach(seriesId => {\n const seriesItem = seriesTypeConfig.series[seriesId];\n const providedXAxisId = seriesItem.xAxisId;\n const providedYAxisId = seriesItem.yAxisId;\n const axisKey = isXAxis ? providedXAxisId : providedYAxisId;\n if (axisKey === undefined || axisKey === USED_AXIS_ID) {\n // @ts-ignore This is safe because users need to opt in to use range bar series.\n // In that case, they should import the module augmentation from `x-charts-pro/moduleAugmentation/rangeBarOnClick`\n // Which adds the proper type to the series data.\n // TODO(v9): Remove this ts-ignore when we can make the breaking change to ChartsAxisData.\n seriesValues[seriesId] = seriesItem.data[dataIndex];\n }\n });\n });\n onAxisClick(event.detail.srcEvent, {\n dataIndex,\n axisValue,\n seriesValues\n });\n });\n return () => {\n axisClickHandler.cleanup();\n };\n }, [params.onAxisClick, processedSeries, svgRef, xAxisWithScale, xAxisIds, yAxisWithScale, yAxisIds, usedXAxis, usedYAxis, instance]);\n return {};\n};\nuseChartCartesianAxis.params = {\n xAxis: true,\n yAxis: true,\n dataset: true,\n onAxisClick: true,\n disableAxisListener: true,\n onHighlightedAxisChange: true,\n highlightedAxis: true\n};\nuseChartCartesianAxis.getDefaultizedParams = ({\n params\n}) => {\n return _extends({}, params, {\n colors: params.colors ?? rainbowSurgePalette,\n theme: params.theme ?? 'light',\n defaultizedXAxis: defaultizeXAxis(params.xAxis, params.dataset),\n defaultizedYAxis: defaultizeYAxis(params.yAxis, params.dataset)\n });\n};\nuseChartCartesianAxis.getInitialState = params => _extends({\n cartesianAxis: {\n x: params.defaultizedXAxis,\n y: params.defaultizedYAxis\n }\n}, params.highlightedAxis === undefined ? {} : {\n controlledCartesianAxisHighlight: params.highlightedAxis\n});","const is = Object.is;\n\n/**\n * Fast shallow compare for objects.\n * @returns true if objects are equal.\n */\nexport function fastObjectShallowCompare(a, b) {\n if (a === b) {\n return true;\n }\n if (!(a instanceof Object) || !(b instanceof Object)) {\n return false;\n }\n let aLength = 0;\n let bLength = 0;\n\n /* eslint-disable guard-for-in */\n for (const key in a) {\n aLength += 1;\n if (!is(a[key], b[key])) {\n return false;\n }\n if (!(key in b)) {\n return false;\n }\n }\n\n /* eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unused-vars */\n for (const _ in b) {\n bLength += 1;\n }\n return aLength === bLength;\n}","import useEventCallback from '@mui/utils/useEventCallback';\nimport { fastObjectShallowCompare } from '@mui/x-internals/fastObjectShallowCompare';\nexport const useChartTooltip = ({\n store\n}) => {\n const removeTooltipItem = useEventCallback(function removeTooltipItem(itemToRemove) {\n const prevItem = store.state.tooltip.item;\n if (!itemToRemove) {\n // Remove without taking care of the current item\n if (prevItem !== null) {\n store.set('tooltip', {\n item: null\n });\n }\n return;\n }\n if (prevItem === null || !fastObjectShallowCompare(prevItem, itemToRemove)) {\n // The current item is already different from the one to remove. No need to clean it.\n return;\n }\n store.set('tooltip', {\n item: null\n });\n });\n const setTooltipItem = useEventCallback(function setTooltipItem(newItem) {\n if (!fastObjectShallowCompare(store.state.tooltip.item, newItem)) {\n store.set('tooltip', {\n item: newItem\n });\n }\n });\n return {\n instance: {\n setTooltipItem,\n removeTooltipItem\n }\n };\n};\nuseChartTooltip.getInitialState = () => ({\n tooltip: {\n item: null\n }\n});\nuseChartTooltip.params = {};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport useEventCallback from '@mui/utils/useEventCallback';\nexport const useChartInteraction = ({\n store\n}) => {\n const cleanInteraction = useEventCallback(function cleanInteraction() {\n store.update({\n interaction: _extends({}, store.state.interaction, {\n pointer: null\n })\n });\n });\n const setLastUpdateSource = useEventCallback(function setLastUpdateSource(interaction) {\n if (store.state.interaction.lastUpdate !== interaction) {\n store.set('interaction', _extends({}, store.state.interaction, {\n lastUpdate: interaction\n }));\n }\n });\n const setPointerCoordinate = useEventCallback(function setPointerCoordinate(coordinate) {\n store.set('interaction', _extends({}, store.state.interaction, {\n pointer: coordinate,\n lastUpdate: coordinate !== null ? 'pointer' : store.state.interaction.lastUpdate\n }));\n });\n return {\n instance: {\n cleanInteraction,\n setLastUpdateSource,\n setPointerCoordinate\n }\n };\n};\nuseChartInteraction.getInitialState = () => ({\n interaction: {\n item: null,\n pointer: null,\n lastUpdate: 'pointer'\n }\n});\nuseChartInteraction.params = {};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { getColorScale, getOrdinalColorScale } from \"../../../colorScale.js\";\nfunction addDefaultId(axisConfig, defaultId) {\n if (axisConfig.id !== undefined) {\n return axisConfig;\n }\n return _extends({\n id: defaultId\n }, axisConfig);\n}\nfunction processColorMap(axisConfig) {\n if (!axisConfig.colorMap) {\n return axisConfig;\n }\n return _extends({}, axisConfig, {\n colorScale: axisConfig.colorMap.type === 'ordinal' && axisConfig.data ? getOrdinalColorScale(_extends({\n values: axisConfig.data\n }, axisConfig.colorMap)) : getColorScale(axisConfig.colorMap.type === 'continuous' ? _extends({\n min: axisConfig.min,\n max: axisConfig.max\n }, axisConfig.colorMap) : axisConfig.colorMap)\n });\n}\nfunction getZAxisState(zAxis, dataset) {\n if (!zAxis || zAxis.length === 0) {\n return {\n axis: {},\n axisIds: []\n };\n }\n const zAxisLookup = {};\n const axisIds = [];\n zAxis.forEach((axisConfig, index) => {\n const dataKey = axisConfig.dataKey;\n const defaultizedId = axisConfig.id ?? `defaultized-z-axis-${index}`;\n if (dataKey === undefined || axisConfig.data !== undefined) {\n zAxisLookup[defaultizedId] = processColorMap(addDefaultId(axisConfig, defaultizedId));\n axisIds.push(defaultizedId);\n return;\n }\n if (dataset === undefined) {\n throw new Error('MUI X Charts: z-axis uses `dataKey` but no `dataset` is provided.');\n }\n zAxisLookup[defaultizedId] = processColorMap(addDefaultId(_extends({}, axisConfig, {\n data: dataset.map(d => d[dataKey])\n }), defaultizedId));\n axisIds.push(defaultizedId);\n });\n return {\n axis: zAxisLookup,\n axisIds\n };\n}\nexport const useChartZAxis = ({\n params,\n store\n}) => {\n const {\n zAxis,\n dataset\n } = params;\n\n // The effect do not track any value defined synchronously during the 1st render by hooks called after `useChartZAxis`\n // As a consequence, the state generated by the 1st run of this useEffect will always be equal to the initialization one\n const isFirstRender = React.useRef(true);\n React.useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n store.set('zAxis', getZAxisState(zAxis, dataset));\n }, [zAxis, dataset, store]);\n return {};\n};\nuseChartZAxis.params = {\n zAxis: true,\n dataset: true\n};\nuseChartZAxis.getInitialState = params => ({\n zAxis: getZAxisState(params.zAxis, params.dataset)\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { warnOnce } from '@mui/x-internals/warning';\nimport { useAssertModelConsistency } from '@mui/x-internals/useAssertModelConsistency';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { fastObjectShallowCompare } from '@mui/x-internals/fastObjectShallowCompare';\nexport const useChartHighlight = ({\n store,\n params\n}) => {\n useAssertModelConsistency({\n warningPrefix: 'MUI X Charts',\n componentName: 'Chart',\n propName: 'highlightedItem',\n controlled: params.highlightedItem,\n defaultValue: null\n });\n useEnhancedEffect(() => {\n if (store.state.highlight.item !== params.highlightedItem) {\n store.set('highlight', _extends({}, store.state.highlight, {\n item: params.highlightedItem\n }));\n }\n if (process.env.NODE_ENV !== 'production') {\n if (params.highlightedItem !== undefined && !store.state.highlight.isControlled) {\n warnOnce(['MUI X Charts: The `highlightedItem` switched between controlled and uncontrolled state.', 'To remove the highlight when using controlled state, you must provide `null` to the `highlightedItem` prop instead of `undefined`.'].join('\\n'));\n }\n }\n }, [store, params.highlightedItem]);\n const clearHighlight = useEventCallback(() => {\n params.onHighlightChange?.(null);\n const prevHighlight = store.state.highlight;\n if (prevHighlight.item === null || prevHighlight.isControlled) {\n return;\n }\n store.set('highlight', {\n item: null,\n lastUpdate: 'pointer',\n isControlled: false\n });\n });\n const setHighlight = useEventCallback(newItem => {\n const prevHighlight = store.state.highlight;\n if (fastObjectShallowCompare(prevHighlight.item, newItem)) {\n return;\n }\n params.onHighlightChange?.(newItem);\n if (prevHighlight.isControlled) {\n return;\n }\n store.set('highlight', {\n item: newItem,\n lastUpdate: 'pointer',\n isControlled: false\n });\n });\n return {\n instance: {\n clearHighlight,\n setHighlight\n }\n };\n};\nuseChartHighlight.getInitialState = params => ({\n highlight: {\n item: params.highlightedItem,\n lastUpdate: 'pointer',\n isControlled: params.highlightedItem !== undefined\n }\n});\nuseChartHighlight.params = {\n highlightedItem: true,\n onHighlightChange: true\n};","/**\n * Efficiently finds the minimum and maximum values in an array of numbers.\n * This functions helps preventing maximum call stack errors when dealing with large datasets.\n *\n * @param data The array of numbers to evaluate\n * @returns [min, max] as numbers\n */\nexport function findMinMax(data) {\n let min = Infinity;\n let max = -Infinity;\n for (const value of data ?? []) {\n if (value < min) {\n min = value;\n }\n if (value > max) {\n max = value;\n }\n }\n return [min, max];\n}","import { findMinMax } from \"../../../internals/findMinMax.js\";\nconst createResult = (data, direction) => {\n if (direction === 'x') {\n return {\n x: data,\n y: null\n };\n }\n return {\n x: null,\n y: data\n };\n};\nconst getBaseExtremum = params => {\n const {\n axis,\n getFilters,\n isDefaultAxis\n } = params;\n const filter = getFilters?.({\n currentAxisId: axis.id,\n isDefaultAxis\n });\n const data = filter ? axis.data?.filter((_, i) => filter({\n x: null,\n y: null\n }, i)) : axis.data;\n return findMinMax(data ?? []);\n};\nconst getValueExtremum = direction => params => {\n const {\n series,\n axis,\n getFilters,\n isDefaultAxis\n } = params;\n return Object.keys(series).filter(seriesId => {\n const axisId = direction === 'x' ? series[seriesId].xAxisId : series[seriesId].yAxisId;\n return axisId === axis.id || isDefaultAxis && axisId === undefined;\n }).reduce((acc, seriesId) => {\n const {\n stackedData\n } = series[seriesId];\n const filter = getFilters?.({\n currentAxisId: axis.id,\n isDefaultAxis,\n seriesXAxisId: series[seriesId].xAxisId,\n seriesYAxisId: series[seriesId].yAxisId\n });\n const [seriesMin, seriesMax] = stackedData?.reduce((seriesAcc, values, index) => {\n if (filter && (!filter(createResult(values[0], direction), index) || !filter(createResult(values[1], direction), index))) {\n return seriesAcc;\n }\n return [Math.min(...values, seriesAcc[0]), Math.max(...values, seriesAcc[1])];\n }, [Infinity, -Infinity]) ?? [Infinity, -Infinity];\n return [Math.min(seriesMin, acc[0]), Math.max(seriesMax, acc[1])];\n }, [Infinity, -Infinity]);\n};\nexport const getExtremumX = params => {\n // Notice that bar should be all horizontal or all vertical.\n // Don't think it's a problem for now\n const isHorizontal = Object.keys(params.series).some(seriesId => params.series[seriesId].layout === 'horizontal');\n if (isHorizontal) {\n return getValueExtremum('x')(params);\n }\n return getBaseExtremum(params);\n};\nexport const getExtremumY = params => {\n const isHorizontal = Object.keys(params.series).some(seriesId => params.series[seriesId].layout === 'horizontal');\n if (isHorizontal) {\n return getBaseExtremum(params);\n }\n return getValueExtremum('y')(params);\n};","export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","export default function(series, order) {\n if (!((n = series.length) > 1)) return;\n for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {\n s0 = s1, s1 = series[order[i]];\n for (j = 0; j < m; ++j) {\n s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];\n }\n }\n}\n","export default function(series) {\n var n = series.length, o = new Array(n);\n while (--n >= 0) o[n] = n;\n return o;\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport offsetNone from \"./offset/none.js\";\nimport orderNone from \"./order/none.js\";\n\nfunction stackValue(d, key) {\n return d[key];\n}\n\nfunction stackSeries(key) {\n const series = [];\n series.key = key;\n return series;\n}\n\nexport default function() {\n var keys = constant([]),\n order = orderNone,\n offset = offsetNone,\n value = stackValue;\n\n function stack(data) {\n var sz = Array.from(keys.apply(this, arguments), stackSeries),\n i, n = sz.length, j = -1,\n oz;\n\n for (const d of data) {\n for (i = 0, ++j; i < n; ++i) {\n (sz[i][j] = [0, +value(d, sz[i].key, j, data)]).data = d;\n }\n }\n\n for (i = 0, oz = array(order(sz)); i < n; ++i) {\n sz[oz[i]].index = i;\n }\n\n offset(sz, oz);\n return sz;\n }\n\n stack.keys = function(_) {\n return arguments.length ? (keys = typeof _ === \"function\" ? _ : constant(Array.from(_)), stack) : keys;\n };\n\n stack.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), stack) : value;\n };\n\n stack.order = function(_) {\n return arguments.length ? (order = _ == null ? orderNone : typeof _ === \"function\" ? _ : constant(Array.from(_)), stack) : order;\n };\n\n stack.offset = function(_) {\n return arguments.length ? (offset = _ == null ? offsetNone : _, stack) : offset;\n };\n\n return stack;\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n var peaks = series.map(peak);\n return none(series).sort(function(a, b) { return peaks[a] - peaks[b]; });\n}\n\nfunction peak(series) {\n var i = -1, j = 0, n = series.length, vi, vj = -Infinity;\n while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i;\n return j;\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n var sums = series.map(sum);\n return none(series).sort(function(a, b) { return sums[a] - sums[b]; });\n}\n\nexport function sum(series) {\n var s = 0, i = -1, n = series.length, v;\n while (++i < n) if (v = +series[i][1]) s += v;\n return s;\n}\n","import { stackOrderNone as d3StackOrderNone, stackOrderReverse as d3StackOrderReverse, stackOrderAppearance as d3OrderAppearance, stackOrderAscending as d3OrderAscending, stackOrderDescending as d3OrderDescending, stackOrderInsideOut as d3OrderInsideOut, stackOffsetExpand as d3StackOffsetExpand, stackOffsetNone as d3StackOffsetNone, stackOffsetSilhouette as d3StackOffsetSilhouette, stackOffsetWiggle as d3StackOffsetWiggle } from '@mui/x-charts-vendor/d3-shape';\nimport { offsetDiverging } from \"./offset/index.js\";\nexport const StackOrder = {\n /**\n * Series order such that the earliest series (according to the maximum value) is at the bottom.\n * */\n appearance: d3OrderAppearance,\n /**\n * Series order such that the smallest series (according to the sum of values) is at the bottom.\n * */\n ascending: d3OrderAscending,\n /**\n * Series order such that the largest series (according to the sum of values) is at the bottom.\n */\n descending: d3OrderDescending,\n /**\n * Series order such that the earliest series (according to the maximum value) are on the inside and the later series are on the outside. This order is recommended for streamgraphs in conjunction with the wiggle offset. See Stacked Graphs—Geometry & Aesthetics by Byron & Wattenberg for more information.\n */\n insideOut: d3OrderInsideOut,\n /**\n * Given series order [0, 1, … n - 1] where n is the number of elements in series. Thus, the stack order is given by the key accessor.\n */\n none: d3StackOrderNone,\n /**\n * Reverse of the given series order [n - 1, n - 2, … 0] where n is the number of elements in series. Thus, the stack order is given by the reverse of the key accessor.\n */\n reverse: d3StackOrderReverse\n};\nexport const StackOffset = {\n /**\n * Applies a zero baseline and normalizes the values for each point such that the topline is always one.\n * */\n expand: d3StackOffsetExpand,\n /**\n * Positive values are stacked above zero, negative values are stacked below zero, and zero values are stacked at zero.\n * */\n // @ts-expect-error, d3 types are wrong, our custom function implements the correct signature\n diverging: offsetDiverging,\n /**\n * Applies a zero baseline.\n * */\n none: d3StackOffsetNone,\n /**\n * Shifts the baseline down such that the center of the streamgraph is always at zero.\n * */\n silhouette: d3StackOffsetSilhouette,\n /**\n * Shifts the baseline so as to minimize the weighted wiggle of layers. This offset is recommended for streamgraphs in conjunction with the inside-out order. See Stacked Graphs—Geometry & Aesthetics by Bryon & Wattenberg for more information.\n * */\n wiggle: d3StackOffsetWiggle\n};\n\n/**\n * Takes a set of series and groups their ids\n * @param series the object of all bars series\n * @returns an array of groups, including the ids, the stacking order, and the stacking offset.\n */\nexport const getStackingGroups = params => {\n const {\n series,\n seriesOrder,\n defaultStrategy\n } = params;\n const stackingGroups = [];\n const stackIndex = {};\n seriesOrder.forEach(id => {\n const {\n stack,\n stackOrder,\n stackOffset\n } = series[id];\n if (stack === undefined) {\n stackingGroups.push({\n ids: [id],\n stackingOrder: StackOrder.none,\n stackingOffset: StackOffset.none\n });\n } else if (stackIndex[stack] === undefined) {\n stackIndex[stack] = stackingGroups.length;\n stackingGroups.push({\n ids: [id],\n stackingOrder: StackOrder[stackOrder ?? defaultStrategy?.stackOrder ?? 'none'],\n stackingOffset: StackOffset[stackOffset ?? defaultStrategy?.stackOffset ?? 'diverging']\n });\n } else {\n stackingGroups[stackIndex[stack]].ids.push(id);\n if (stackOrder !== undefined) {\n stackingGroups[stackIndex[stack]].stackingOrder = StackOrder[stackOrder];\n }\n if (stackOffset !== undefined) {\n stackingGroups[stackIndex[stack]].stackingOffset = StackOffset[stackOffset];\n }\n }\n });\n return stackingGroups;\n};","import ascending from \"./ascending.js\";\n\nexport default function(series) {\n return ascending(series).reverse();\n}\n","import appearance from \"./appearance.js\";\nimport {sum} from \"./ascending.js\";\n\nexport default function(series) {\n var n = series.length,\n i,\n j,\n sums = series.map(sum),\n order = appearance(series),\n top = 0,\n bottom = 0,\n tops = [],\n bottoms = [];\n\n for (i = 0; i < n; ++i) {\n j = order[i];\n if (top < bottom) {\n top += sums[j];\n tops.push(j);\n } else {\n bottom += sums[j];\n bottoms.push(j);\n }\n }\n\n return bottoms.reverse().concat(tops);\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n return none(series).reverse();\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {\n for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0;\n if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y;\n }\n none(series, order);\n}\n","// Adapted from D3.js's offsetDiverging function https://github.com/d3/d3-shape/blob/main/src/offset/diverging.js\n// Hidden series (with all zero values) affect the stacking in a different way in our implementation compared to the D3 behavior.\n// The D3 stacking keep those values at the 0 \"line\", which creates issues when animating between hidden and visible states.\n// In our modification, we stack them on top/below already stacked items according to the sign of their original value.\n// A hidden negative value will be placed below all the already stacked negative values\n\n/**\n * Positive values are stacked above zero, while negative values are stacked below zero.\n *\n * @param series A series generated by a stack generator.\n * @param order An array of numeric indexes representing the stack order.\n */\nexport function offsetDiverging(series, order) {\n if (series.length === 0) {\n return;\n }\n const seriesCount = series.length;\n const numericOrder = order;\n const pointCount = series[numericOrder[0]].length;\n for (let pointIndex = 0; pointIndex < pointCount; pointIndex += 1) {\n let positiveSum = 0;\n let negativeSum = 0;\n for (let seriesIndex = 0; seriesIndex < seriesCount; seriesIndex += 1) {\n const currentSeries = series[numericOrder[seriesIndex]];\n const dataPoint = currentSeries[pointIndex];\n const difference = dataPoint[1] - dataPoint[0];\n if (difference > 0) {\n dataPoint[0] = positiveSum;\n positiveSum += difference;\n dataPoint[1] = positiveSum;\n } else if (difference < 0) {\n dataPoint[1] = negativeSum;\n negativeSum += difference;\n dataPoint[0] = negativeSum;\n } else if (dataPoint.data[currentSeries.key] > 0) {\n dataPoint[0] = positiveSum;\n dataPoint[1] = positiveSum;\n } else if (dataPoint.data[currentSeries.key] < 0) {\n dataPoint[1] = negativeSum;\n dataPoint[0] = negativeSum;\n } else {\n dataPoint[0] = 0;\n dataPoint[1] = 0;\n }\n }\n }\n}","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {\n for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0;\n s0[j][1] += s0[j][0] = -y / 2;\n }\n none(series, order);\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;\n for (var y = 0, j = 1, s0, m, n; j < m; ++j) {\n for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {\n var si = series[order[i]],\n sij0 = si[j][1] || 0,\n sij1 = si[j - 1][1] || 0,\n s3 = (sij0 - sij1) / 2;\n for (var k = 0; k < i; ++k) {\n var sk = series[order[k]],\n skj0 = sk[j][1] || 0,\n skj1 = sk[j - 1][1] || 0;\n s3 += skj0 - skj1;\n }\n s1 += sij0, s2 += s3 * sij0;\n }\n s0[j - 1][1] += s0[j - 1][0] = y;\n if (s1) y -= s2 / s1;\n }\n s0[j - 1][1] += s0[j - 1][0] = y;\n none(series, order);\n}\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { stack as d3Stack } from '@mui/x-charts-vendor/d3-shape';\nimport { warnOnce } from '@mui/x-internals/warning';\nimport { getStackingGroups } from \"../../../internals/stacking/index.js\";\nconst barValueFormatter = v => v == null ? '' : v.toLocaleString();\nconst seriesProcessor = (params, dataset) => {\n const {\n seriesOrder,\n series\n } = params;\n const stackingGroups = getStackingGroups(params);\n\n // Create a data set with format adapted to d3\n const d3Dataset = dataset ?? [];\n seriesOrder.forEach(id => {\n const data = series[id].data;\n if (data !== undefined) {\n data.forEach((value, index) => {\n if (d3Dataset.length <= index) {\n d3Dataset.push({\n [id]: value\n });\n } else {\n d3Dataset[index][id] = value;\n }\n });\n } else if (dataset === undefined) {\n throw new Error([`MUI X Charts: bar series with id='${id}' has no data.`, 'Either provide a data property to the series or use the dataset prop.'].join('\\n'));\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!data && dataset) {\n const dataKey = series[id].dataKey;\n if (!dataKey) {\n throw new Error([`MUI X Charts: bar series with id='${id}' has no data and no dataKey.`, 'You must provide a dataKey when using the dataset prop.'].join('\\n'));\n }\n dataset.forEach((entry, index) => {\n const value = entry[dataKey];\n if (value != null && typeof value !== 'number') {\n warnOnce([`MUI X Charts: your dataset key \"${dataKey}\" is used for plotting bars, but the dataset contains the non-null non-numerical element \"${value}\" at index ${index}.`, 'Bar plots only support numeric and null values.'].join('\\n'));\n }\n });\n }\n }\n });\n const completedSeries = {};\n stackingGroups.forEach(stackingGroup => {\n const {\n ids,\n stackingOffset,\n stackingOrder\n } = stackingGroup;\n // Get stacked values, and derive the domain\n const stackedSeries = d3Stack().keys(ids.map(id => {\n // Use dataKey if needed and available\n const dataKey = series[id].dataKey;\n return series[id].data === undefined && dataKey !== undefined ? dataKey : id;\n })).value((d, key) => d[key] ?? 0) // defaultize null value to 0\n .order(stackingOrder).offset(stackingOffset)(d3Dataset);\n ids.forEach((id, index) => {\n const dataKey = series[id].dataKey;\n completedSeries[id] = _extends({\n layout: 'vertical',\n labelMarkType: 'square',\n minBarSize: 0,\n valueFormatter: series[id].valueFormatter ?? barValueFormatter\n }, series[id], {\n data: dataKey ? dataset.map(data => {\n const value = data[dataKey];\n return typeof value === 'number' ? value : null;\n }) : series[id].data,\n stackedData: stackedSeries[index].map(([a, b]) => [a, b])\n });\n });\n });\n return {\n seriesOrder,\n stackingGroups,\n series: completedSeries\n };\n};\nexport default seriesProcessor;","export function getLabel(value, location) {\n return typeof value === 'function' ? value(location) : value;\n}","export function getSeriesColorFn(series) {\n return series.colorGetter ? series.colorGetter : () => series.color;\n}","import { getSeriesColorFn } from \"../../../internals/getSeriesColorFn.js\";\nconst getColor = (series, xAxis, yAxis) => {\n const verticalLayout = series.layout === 'vertical';\n const bandColorScale = verticalLayout ? xAxis?.colorScale : yAxis?.colorScale;\n const valueColorScale = verticalLayout ? yAxis?.colorScale : xAxis?.colorScale;\n const bandValues = verticalLayout ? xAxis?.data : yAxis?.data;\n const getSeriesColor = getSeriesColorFn(series);\n if (valueColorScale) {\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = series.data[dataIndex];\n const color = value === null ? getSeriesColor({\n value,\n dataIndex\n }) : valueColorScale(value);\n if (color === null) {\n return getSeriesColor({\n value,\n dataIndex\n });\n }\n return color;\n };\n }\n if (bandColorScale && bandValues) {\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = bandValues[dataIndex];\n const color = value === null ? getSeriesColor({\n value,\n dataIndex\n }) : bandColorScale(value);\n if (color === null) {\n return getSeriesColor({\n value,\n dataIndex\n });\n }\n return color;\n };\n }\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = series.data[dataIndex];\n return getSeriesColor({\n value,\n dataIndex\n });\n };\n};\nexport default getColor;","export function getNonEmptySeriesArray(series, availableSeriesTypes) {\n return Object.keys(series).filter(type => availableSeriesTypes.has(type)).flatMap(type => {\n const seriesOfType = series[type];\n return seriesOfType.seriesOrder.filter(seriesId => seriesOfType.series[seriesId].data.length > 0 && seriesOfType.series[seriesId].data.some(value => value != null)).map(seriesId => ({\n type,\n seriesId\n }));\n });\n}","import { getNonEmptySeriesArray } from \"./getNonEmptySeriesArray.js\";\n\n/**\n * Returns the previous series type and id that contains some data.\n * Returns `null` if no other series have data.\n */\nexport function getPreviousNonEmptySeries(series, availableSeriesTypes, type, seriesId) {\n const nonEmptySeries = getNonEmptySeriesArray(series, availableSeriesTypes);\n if (nonEmptySeries.length === 0) {\n return null;\n }\n const currentSeriesIndex = type !== undefined && seriesId !== undefined ? nonEmptySeries.findIndex(seriesItem => seriesItem.type === type && seriesItem.seriesId === seriesId) : -1;\n if (currentSeriesIndex <= 0) {\n // If no current series, or if it's the first series\n return nonEmptySeries[nonEmptySeries.length - 1];\n }\n return nonEmptySeries[(currentSeriesIndex - 1 + nonEmptySeries.length) % nonEmptySeries.length];\n}","export function getMaxSeriesLength(series, availableSeriesTypes) {\n return Object.keys(series).filter(type => availableSeriesTypes.has(type)).flatMap(type => {\n const seriesOfType = series[type];\n return seriesOfType.seriesOrder.filter(seriesId => seriesOfType.series[seriesId].data.length > 0 && seriesOfType.series[seriesId].data.some(value => value != null)).map(seriesId => seriesOfType.series[seriesId].data.length);\n }).reduce((maxLengths, length) => Math.max(maxLengths, length), 0);\n}","import { getNonEmptySeriesArray } from \"./getNonEmptySeriesArray.js\";\n\n/**\n * Returns the next series type and id that contains some data.\n * Returns `null` if no other series have data.\n * @param series - The processed series from the store.\n * @param availableSeriesTypes - The set of series types that can be focused.\n * @param type - The current series type.\n * @param seriesId - The current series id.\n */\nexport function getNextNonEmptySeries(series, availableSeriesTypes, type, seriesId) {\n const nonEmptySeries = getNonEmptySeriesArray(series, availableSeriesTypes);\n if (nonEmptySeries.length === 0) {\n return null;\n }\n const currentSeriesIndex = type !== undefined && seriesId !== undefined ? nonEmptySeries.findIndex(seriesItem => seriesItem.type === type && seriesItem.seriesId === seriesId) : -1;\n return nonEmptySeries[(currentSeriesIndex + 1) % nonEmptySeries.length];\n}","export function seriesHasData(series, type, seriesId) {\n // @ts-ignore sankey is not in MIT version\n if (type === 'sankey') {\n return false;\n }\n const data = series[type]?.series[seriesId]?.data;\n return data != null && data.length > 0;\n}","import { getPreviousNonEmptySeries } from \"./plugins/featurePlugins/useChartKeyboardNavigation/utils/getPreviousNonEmptySeries.js\";\nimport { getMaxSeriesLength } from \"./plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength.js\";\nimport { selectorChartSeriesProcessed } from \"./plugins/corePlugins/useChartSeries/index.js\";\nimport { getNextNonEmptySeries } from \"./plugins/featurePlugins/useChartKeyboardNavigation/utils/getNextNonEmptySeries.js\";\nimport { seriesHasData } from \"./seriesHasData.js\";\nexport function createGetNextIndexFocusedItem(compatibleSeriesTypes) {\n return function getNextIndexFocusedItem(currentItem, state) {\n const processedSeries = selectorChartSeriesProcessed(state);\n let seriesId = currentItem?.seriesId;\n let type = currentItem?.type;\n if (!type || seriesId == null || !seriesHasData(processedSeries, type, seriesId)) {\n const nextSeries = getNextNonEmptySeries(processedSeries, compatibleSeriesTypes, type, seriesId);\n if (nextSeries === null) {\n return null;\n }\n type = nextSeries.type;\n seriesId = nextSeries.seriesId;\n }\n const maxLength = getMaxSeriesLength(processedSeries, compatibleSeriesTypes);\n const dataIndex = Math.min(maxLength - 1, currentItem?.dataIndex == null ? 0 : currentItem.dataIndex + 1);\n return {\n type,\n seriesId,\n dataIndex\n };\n };\n}\nexport function createGetPreviousIndexFocusedItem(compatibleSeriesTypes) {\n return function getPreviousIndexFocusedItem(currentItem, state) {\n const processedSeries = selectorChartSeriesProcessed(state);\n let seriesId = currentItem?.seriesId;\n let type = currentItem?.type;\n if (!type || seriesId == null || !seriesHasData(processedSeries, type, seriesId)) {\n const previousSeries = getPreviousNonEmptySeries(processedSeries, compatibleSeriesTypes, type, seriesId);\n if (previousSeries === null) {\n return null;\n }\n type = previousSeries.type;\n seriesId = previousSeries.seriesId;\n }\n const maxLength = getMaxSeriesLength(processedSeries, compatibleSeriesTypes);\n const dataIndex = Math.max(0, currentItem?.dataIndex == null ? maxLength - 1 : currentItem.dataIndex - 1);\n return {\n type,\n seriesId,\n dataIndex\n };\n };\n}\nexport function createGetNextSeriesFocusedItem(compatibleSeriesTypes) {\n return function getNextSeriesFocusedItem(currentItem, state) {\n const processedSeries = selectorChartSeriesProcessed(state);\n let seriesId = currentItem?.seriesId;\n let type = currentItem?.type;\n const nextSeries = getNextNonEmptySeries(processedSeries, compatibleSeriesTypes, type, seriesId);\n if (nextSeries === null) {\n return null; // No series to move the focus to.\n }\n type = nextSeries.type;\n seriesId = nextSeries.seriesId;\n const dataIndex = currentItem?.dataIndex == null ? 0 : currentItem.dataIndex;\n return {\n type,\n seriesId,\n dataIndex\n };\n };\n}\nexport function createGetPreviousSeriesFocusedItem(compatibleSeriesTypes) {\n return function getPreviousSeriesFocusedItem(currentItem, state) {\n const processedSeries = selectorChartSeriesProcessed(state);\n let seriesId = currentItem?.seriesId;\n let type = currentItem?.type;\n const previousSeries = getPreviousNonEmptySeries(processedSeries, compatibleSeriesTypes, type, seriesId);\n if (previousSeries === null) {\n return null; // No series to move the focus to.\n }\n type = previousSeries.type;\n seriesId = previousSeries.seriesId;\n const data = processedSeries[type].series[seriesId].data;\n const dataIndex = currentItem?.dataIndex == null ? data.length - 1 : currentItem.dataIndex;\n return {\n type,\n seriesId,\n dataIndex\n };\n };\n}","import { createGetNextIndexFocusedItem, createGetPreviousIndexFocusedItem, createGetNextSeriesFocusedItem, createGetPreviousSeriesFocusedItem } from \"../../../internals/commonNextFocusItem.js\";\nconst outSeriesTypes = new Set(['bar', 'line', 'scatter']);\nconst keyboardFocusHandler = event => {\n switch (event.key) {\n case 'ArrowRight':\n return createGetNextIndexFocusedItem(outSeriesTypes);\n case 'ArrowLeft':\n return createGetPreviousIndexFocusedItem(outSeriesTypes);\n case 'ArrowDown':\n return createGetPreviousSeriesFocusedItem(outSeriesTypes);\n case 'ArrowUp':\n return createGetNextSeriesFocusedItem(outSeriesTypes);\n default:\n return null;\n }\n};\nexport default keyboardFocusHandler;","/**\n * Solution of the equations\n * W = barWidth * N + offset * (N-1)\n * offset / (offset + barWidth) = r\n * @param bandWidth (W) The width available to place bars.\n * @param groupCount (N) The number of bars to place in that space.\n * @param gapRatio (r) The ratio of the gap between bars over the bar width.\n * @returns The bar width and the offset between bars.\n */\nexport function getBandSize(bandWidth, groupCount, gapRatio) {\n if (gapRatio === 0) {\n return {\n barWidth: bandWidth / groupCount,\n offset: 0\n };\n }\n const barWidth = bandWidth / (groupCount + (groupCount - 1) * gapRatio);\n const offset = gapRatio * barWidth;\n return {\n barWidth,\n offset\n };\n}","import { getBandSize } from \"./getBandSize.js\";\nfunction shouldInvertStartCoordinate(verticalLayout, baseValue, reverse) {\n const isVerticalAndPositive = verticalLayout && baseValue > 0;\n const isHorizontalAndNegative = !verticalLayout && baseValue < 0;\n const invertStartCoordinate = isVerticalAndPositive || isHorizontalAndNegative;\n return reverse ? !invertStartCoordinate : invertStartCoordinate;\n}\nexport function getBarDimensions(params) {\n const {\n verticalLayout,\n xAxisConfig,\n yAxisConfig,\n series,\n dataIndex,\n numberOfGroups,\n groupIndex\n } = params;\n const baseScaleConfig = verticalLayout ? xAxisConfig : yAxisConfig;\n const reverse = (verticalLayout ? yAxisConfig.reverse : xAxisConfig.reverse) ?? false;\n const {\n barWidth,\n offset\n } = getBandSize(baseScaleConfig.scale.bandwidth(), numberOfGroups, baseScaleConfig.barGapRatio);\n const barOffset = groupIndex * (barWidth + offset);\n const xScale = xAxisConfig.scale;\n const yScale = yAxisConfig.scale;\n const baseValue = baseScaleConfig.data[dataIndex];\n const seriesValue = series.data[dataIndex];\n if (seriesValue == null) {\n return null;\n }\n const values = series.stackedData[dataIndex];\n const valueCoordinates = values.map(v => verticalLayout ? yScale(v) : xScale(v));\n const minValueCoord = Math.round(Math.min(...valueCoordinates));\n const maxValueCoord = Math.round(Math.max(...valueCoordinates));\n const barSize = seriesValue === 0 ? 0 : Math.max(series.minBarSize, maxValueCoord - minValueCoord);\n const startCoordinate = shouldInvertStartCoordinate(verticalLayout, seriesValue, reverse) ? maxValueCoord - barSize : minValueCoord;\n return {\n x: verticalLayout ? xScale(baseValue) + barOffset : startCoordinate,\n y: verticalLayout ? startCoordinate : yScale(baseValue) + barOffset,\n height: verticalLayout ? barSize : barWidth,\n width: verticalLayout ? barWidth : barSize\n };\n}","import { getBarDimensions } from \"../../../internals/getBarDimensions.js\";\nconst tooltipItemPositionGetter = params => {\n const {\n series,\n identifier,\n axesConfig,\n placement\n } = params;\n if (!identifier || identifier.dataIndex === undefined) {\n return null;\n }\n const itemSeries = series.bar?.series[identifier.seriesId];\n if (series.bar == null || itemSeries == null) {\n return null;\n }\n if (axesConfig.x === undefined || axesConfig.y === undefined) {\n return null;\n }\n const dimensions = getBarDimensions({\n verticalLayout: itemSeries.layout === 'vertical',\n xAxisConfig: axesConfig.x,\n yAxisConfig: axesConfig.y,\n series: itemSeries,\n dataIndex: identifier.dataIndex,\n numberOfGroups: series.bar.stackingGroups.length,\n groupIndex: series.bar.stackingGroups.findIndex(group => group.ids.includes(itemSeries.id))\n });\n if (dimensions == null) {\n return null;\n }\n const {\n x,\n y,\n width,\n height\n } = dimensions;\n switch (placement) {\n case 'right':\n return {\n x: x + width,\n y: y + height / 2\n };\n case 'bottom':\n return {\n x: x + width / 2,\n y: y + height\n };\n case 'left':\n return {\n x,\n y: y + height / 2\n };\n case 'top':\n default:\n return {\n x: x + width / 2,\n y\n };\n }\n};\nexport default tooltipItemPositionGetter;","export const typeSerializer = type => `Type(${type})`;\nexport const seriesIdSerializer = id => `Series(${id})`;\nexport const dataIndexSerializer = dataIndex => dataIndex === undefined ? '' : `Index(${dataIndex})`;\nexport const identifierSerializerSeriesIdDataIndex = identifier => {\n return `${typeSerializer(identifier.type)}${seriesIdSerializer(identifier.seriesId)}${dataIndexSerializer(identifier.dataIndex)}`;\n};","import { getExtremumX, getExtremumY } from \"./bar/extremums.js\";\nimport seriesProcessor from \"./bar/seriesProcessor.js\";\nimport legendGetter from \"./bar/legend.js\";\nimport getColor from \"./bar/getColor.js\";\nimport keyboardFocusHandler from \"./bar/keyboardFocusHandler.js\";\nimport tooltipGetter, { axisTooltipGetter } from \"./bar/tooltip.js\";\nimport tooltipItemPositionGetter from \"./bar/tooltipPosition.js\";\nimport { getSeriesWithDefaultValues } from \"./bar/getSeriesWithDefaultValues.js\";\nimport { identifierSerializerSeriesIdDataIndex } from \"../../internals/identifierSerializer.js\";\nexport const barSeriesConfig = {\n seriesProcessor,\n colorProcessor: getColor,\n legendGetter,\n tooltipGetter,\n tooltipItemPositionGetter,\n axisTooltipGetter,\n xExtremumGetter: getExtremumX,\n yExtremumGetter: getExtremumY,\n getSeriesWithDefaultValues,\n keyboardFocusHandler,\n identifierSerializer: identifierSerializerSeriesIdDataIndex\n};","import { getLabel } from \"../../../internals/getLabel.js\";\nconst legendGetter = params => {\n const {\n seriesOrder,\n series\n } = params;\n return seriesOrder.reduce((acc, seriesId) => {\n const formattedLabel = getLabel(series[seriesId].label, 'legend');\n if (formattedLabel === undefined) {\n return acc;\n }\n acc.push({\n type: 'bar',\n markType: series[seriesId].labelMarkType,\n id: seriesId,\n seriesId,\n color: series[seriesId].color,\n label: formattedLabel\n });\n return acc;\n }, []);\n};\nexport default legendGetter;","import { getLabel } from \"../../../internals/getLabel.js\";\nconst tooltipGetter = params => {\n const {\n series,\n getColor,\n identifier\n } = params;\n if (!identifier || identifier.dataIndex === undefined) {\n return null;\n }\n const label = getLabel(series.label, 'tooltip');\n const value = series.data[identifier.dataIndex];\n if (value == null) {\n return null;\n }\n const formattedValue = series.valueFormatter(value, {\n dataIndex: identifier.dataIndex\n });\n return {\n identifier,\n color: getColor(identifier.dataIndex),\n label,\n value,\n formattedValue,\n markType: series.labelMarkType\n };\n};\nexport const axisTooltipGetter = series => {\n return Object.values(series).map(s => s.layout === 'horizontal' ? {\n direction: 'y',\n axisId: s.yAxisId\n } : {\n direction: 'x',\n axisId: s.xAxisId\n });\n};\nexport default tooltipGetter;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport function getSeriesWithDefaultValues(seriesData, seriesIndex, colors) {\n return _extends({}, seriesData, {\n id: seriesData.id ?? `auto-generated-id-${seriesIndex}`,\n color: seriesData.color ?? colors[seriesIndex % colors.length]\n });\n}","import { createGetNextIndexFocusedItem, createGetPreviousIndexFocusedItem, createGetNextSeriesFocusedItem, createGetPreviousSeriesFocusedItem } from \"../../internals/commonNextFocusItem.js\";\nconst outSeriesTypes = new Set(['bar', 'line', 'scatter']);\nconst keyboardFocusHandler = event => {\n switch (event.key) {\n case 'ArrowRight':\n return createGetNextIndexFocusedItem(outSeriesTypes);\n case 'ArrowLeft':\n return createGetPreviousIndexFocusedItem(outSeriesTypes);\n case 'ArrowDown':\n return createGetPreviousSeriesFocusedItem(outSeriesTypes);\n case 'ArrowUp':\n return createGetNextSeriesFocusedItem(outSeriesTypes);\n default:\n return null;\n }\n};\nexport default keyboardFocusHandler;","import { getExtremumX, getExtremumY } from \"./extremums.js\";\nimport seriesProcessor from \"./seriesProcessor.js\";\nimport getColor from \"./getColor.js\";\nimport legendGetter from \"./legend.js\";\nimport tooltipGetter from \"./tooltip.js\";\nimport getSeriesWithDefaultValues from \"./getSeriesWithDefaultValues.js\";\nimport tooltipItemPositionGetter from \"./tooltipPosition.js\";\nimport keyboardFocusHandler from \"./keyboardFocusHandler.js\";\nimport { identifierSerializerSeriesIdDataIndex } from \"../../internals/identifierSerializer.js\";\nexport const scatterSeriesConfig = {\n seriesProcessor,\n colorProcessor: getColor,\n legendGetter,\n tooltipGetter,\n tooltipItemPositionGetter,\n xExtremumGetter: getExtremumX,\n yExtremumGetter: getExtremumY,\n getSeriesWithDefaultValues,\n keyboardFocusHandler,\n identifierSerializer: identifierSerializerSeriesIdDataIndex\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nconst seriesProcessor = ({\n series,\n seriesOrder\n}, dataset) => {\n const completeSeries = Object.fromEntries(Object.entries(series).map(([seriesId, seriesData]) => {\n const datasetKeys = seriesData?.datasetKeys;\n const missingKeys = ['x', 'y'].filter(key => typeof datasetKeys?.[key] !== 'string');\n if (seriesData?.datasetKeys && missingKeys.length > 0) {\n throw new Error([`MUI X Charts: scatter series with id='${seriesId}' has incomplete datasetKeys.`, `Properties ${missingKeys.map(key => `\"${key}\"`).join(', ')} are missing.`].join('\\n'));\n }\n const data = !datasetKeys ? seriesData.data ?? [] : dataset?.map(d => {\n return {\n x: d[datasetKeys.x] ?? null,\n y: d[datasetKeys.y] ?? null,\n z: datasetKeys.z && d[datasetKeys.z],\n id: datasetKeys.id && d[datasetKeys.id]\n };\n }) ?? [];\n return [seriesId, _extends({\n labelMarkType: 'circle',\n markerSize: 4\n }, seriesData, {\n preview: _extends({\n markerSize: 1\n }, seriesData?.preview),\n data,\n valueFormatter: seriesData.valueFormatter ?? (v => v && `(${v.x}, ${v.y})`)\n })];\n }));\n return {\n series: completeSeries,\n seriesOrder\n };\n};\nexport default seriesProcessor;","import { getSeriesColorFn } from \"../../internals/getSeriesColorFn.js\";\nconst getColor = (series, xAxis, yAxis, zAxis) => {\n const zColorScale = zAxis?.colorScale;\n const yColorScale = yAxis?.colorScale;\n const xColorScale = xAxis?.colorScale;\n const getSeriesColor = getSeriesColorFn(series);\n if (zColorScale) {\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n if (zAxis?.data?.[dataIndex] !== undefined) {\n const color = zColorScale(zAxis?.data?.[dataIndex]);\n if (color !== null) {\n return color;\n }\n }\n const value = series.data[dataIndex];\n const color = value === null ? getSeriesColor({\n value,\n dataIndex\n }) : zColorScale(value.z);\n if (color === null) {\n return getSeriesColor({\n value,\n dataIndex\n });\n }\n return color;\n };\n }\n if (yColorScale) {\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = series.data[dataIndex];\n const color = value === null ? getSeriesColor({\n value,\n dataIndex\n }) : yColorScale(value.y);\n if (color === null) {\n return getSeriesColor({\n value,\n dataIndex\n });\n }\n return color;\n };\n }\n if (xColorScale) {\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = series.data[dataIndex];\n const color = value === null ? getSeriesColor({\n value,\n dataIndex\n }) : xColorScale(value.x);\n if (color === null) {\n return getSeriesColor({\n value,\n dataIndex\n });\n }\n return color;\n };\n }\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = series.data[dataIndex];\n return getSeriesColor({\n value,\n dataIndex\n });\n };\n};\nexport default getColor;","import { getLabel } from \"../../internals/getLabel.js\";\nconst legendGetter = params => {\n const {\n seriesOrder,\n series\n } = params;\n return seriesOrder.reduce((acc, seriesId) => {\n const formattedLabel = getLabel(series[seriesId].label, 'legend');\n if (formattedLabel === undefined) {\n return acc;\n }\n acc.push({\n type: 'scatter',\n markType: series[seriesId].labelMarkType,\n id: seriesId,\n seriesId,\n color: series[seriesId].color,\n label: formattedLabel\n });\n return acc;\n }, []);\n};\nexport default legendGetter;","import { getLabel } from \"../../internals/getLabel.js\";\nconst tooltipGetter = params => {\n const {\n series,\n getColor,\n identifier\n } = params;\n if (!identifier || identifier.dataIndex === undefined) {\n return null;\n }\n const label = getLabel(series.label, 'tooltip');\n const value = series.data[identifier.dataIndex];\n const formattedValue = series.valueFormatter(value, {\n dataIndex: identifier.dataIndex\n });\n return {\n identifier,\n color: getColor(identifier.dataIndex),\n label,\n value,\n formattedValue,\n markType: series.labelMarkType\n };\n};\nexport default tooltipGetter;","const tooltipItemPositionGetter = params => {\n const {\n series,\n identifier,\n axesConfig\n } = params;\n if (!identifier || identifier.dataIndex === undefined) {\n return null;\n }\n const itemSeries = series.scatter?.series[identifier.seriesId];\n if (itemSeries == null) {\n return null;\n }\n if (axesConfig.x === undefined || axesConfig.y === undefined) {\n return null;\n }\n const xValue = itemSeries.data?.[identifier.dataIndex].x;\n const yValue = itemSeries.data?.[identifier.dataIndex].y;\n if (xValue == null || yValue == null) {\n return null;\n }\n return {\n x: axesConfig.x.scale(xValue),\n y: axesConfig.y.scale(yValue)\n };\n};\nexport default tooltipItemPositionGetter;","export const getExtremumX = params => {\n const {\n series,\n axis,\n isDefaultAxis,\n getFilters\n } = params;\n let min = Infinity;\n let max = -Infinity;\n for (const seriesId in series) {\n if (!Object.hasOwn(series, seriesId)) {\n continue;\n }\n const axisId = series[seriesId].xAxisId;\n if (!(axisId === axis.id || axisId === undefined && isDefaultAxis)) {\n continue;\n }\n const filter = getFilters?.({\n currentAxisId: axis.id,\n isDefaultAxis,\n seriesXAxisId: series[seriesId].xAxisId,\n seriesYAxisId: series[seriesId].yAxisId\n });\n const seriesData = series[seriesId].data ?? [];\n for (let i = 0; i < seriesData.length; i += 1) {\n const d = seriesData[i];\n if (filter && !filter(d, i)) {\n continue;\n }\n if (d.x !== null) {\n if (d.x < min) {\n min = d.x;\n }\n if (d.x > max) {\n max = d.x;\n }\n }\n }\n }\n return [min, max];\n};\nexport const getExtremumY = params => {\n const {\n series,\n axis,\n isDefaultAxis,\n getFilters\n } = params;\n let min = Infinity;\n let max = -Infinity;\n for (const seriesId in series) {\n if (!Object.hasOwn(series, seriesId)) {\n continue;\n }\n const axisId = series[seriesId].yAxisId;\n if (!(axisId === axis.id || axisId === undefined && isDefaultAxis)) {\n continue;\n }\n const filter = getFilters?.({\n currentAxisId: axis.id,\n isDefaultAxis,\n seriesXAxisId: series[seriesId].xAxisId,\n seriesYAxisId: series[seriesId].yAxisId\n });\n const seriesData = series[seriesId].data ?? [];\n for (let i = 0; i < seriesData.length; i += 1) {\n const d = seriesData[i];\n if (filter && !filter(d, i)) {\n continue;\n }\n if (d.y !== null) {\n if (d.y < min) {\n min = d.y;\n }\n if (d.y > max) {\n max = d.y;\n }\n }\n }\n }\n return [min, max];\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nconst getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {\n return _extends({}, seriesData, {\n id: seriesData.id ?? `auto-generated-id-${seriesIndex}`,\n color: seriesData.color ?? colors[seriesIndex % colors.length]\n });\n};\nexport default getSeriesWithDefaultValues;","import { getSeriesColorFn } from \"../../internals/getSeriesColorFn.js\";\nconst getColor = (series, xAxis, yAxis) => {\n const yColorScale = yAxis?.colorScale;\n const xColorScale = xAxis?.colorScale;\n const getSeriesColor = getSeriesColorFn(series);\n if (yColorScale) {\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = series.data[dataIndex];\n const color = value === null ? getSeriesColor({\n value,\n dataIndex\n }) : yColorScale(value);\n if (color === null) {\n return getSeriesColor({\n value,\n dataIndex\n });\n }\n return color;\n };\n }\n if (xColorScale) {\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = xAxis.data?.[dataIndex];\n const color = value === null ? getSeriesColor({\n value,\n dataIndex\n }) : xColorScale(value);\n if (color === null) {\n return getSeriesColor({\n value,\n dataIndex\n });\n }\n return color;\n };\n }\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = series.data[dataIndex];\n return getSeriesColor({\n value,\n dataIndex\n });\n };\n};\nexport default getColor;","import { createGetNextIndexFocusedItem, createGetPreviousIndexFocusedItem, createGetNextSeriesFocusedItem, createGetPreviousSeriesFocusedItem } from \"../../internals/commonNextFocusItem.js\";\nconst outSeriesTypes = new Set(['bar', 'line', 'scatter']);\nconst keyboardFocusHandler = event => {\n switch (event.key) {\n case 'ArrowRight':\n return createGetNextIndexFocusedItem(outSeriesTypes);\n case 'ArrowLeft':\n return createGetPreviousIndexFocusedItem(outSeriesTypes);\n case 'ArrowDown':\n return createGetPreviousSeriesFocusedItem(outSeriesTypes);\n case 'ArrowUp':\n return createGetNextSeriesFocusedItem(outSeriesTypes);\n default:\n return null;\n }\n};\nexport default keyboardFocusHandler;","import { getExtremumX, getExtremumY } from \"./extremums.js\";\nimport seriesProcessor from \"./seriesProcessor.js\";\nimport getColor from \"./getColor.js\";\nimport legendGetter from \"./legend.js\";\nimport tooltipGetter, { axisTooltipGetter } from \"./tooltip.js\";\nimport getSeriesWithDefaultValues from \"./getSeriesWithDefaultValues.js\";\nimport tooltipItemPositionGetter from \"./tooltipPosition.js\";\nimport keyboardFocusHandler from \"./keyboardFocusHandler.js\";\nimport { identifierSerializerSeriesIdDataIndex } from \"../../internals/identifierSerializer.js\";\nexport const lineSeriesConfig = {\n colorProcessor: getColor,\n seriesProcessor,\n legendGetter,\n tooltipGetter,\n tooltipItemPositionGetter,\n axisTooltipGetter,\n xExtremumGetter: getExtremumX,\n yExtremumGetter: getExtremumY,\n getSeriesWithDefaultValues,\n keyboardFocusHandler,\n identifierSerializer: identifierSerializerSeriesIdDataIndex\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { stack as d3Stack } from '@mui/x-charts-vendor/d3-shape';\nimport { warnOnce } from '@mui/x-internals/warning';\nimport { getStackingGroups } from \"../../internals/stacking/index.js\";\nconst seriesProcessor = (params, dataset) => {\n const {\n seriesOrder,\n series\n } = params;\n const stackingGroups = getStackingGroups(_extends({}, params, {\n defaultStrategy: {\n stackOffset: 'none'\n }\n }));\n\n // Create a data set with format adapted to d3\n const d3Dataset = dataset ?? [];\n seriesOrder.forEach(id => {\n const data = series[id].data;\n if (data !== undefined) {\n data.forEach((value, index) => {\n if (d3Dataset.length <= index) {\n d3Dataset.push({\n [id]: value\n });\n } else {\n d3Dataset[index][id] = value;\n }\n });\n } else if (dataset === undefined && process.env.NODE_ENV !== 'production') {\n throw new Error([`MUI X Charts: line series with id='${id}' has no data.`, 'Either provide a data property to the series or use the dataset prop.'].join('\\n'));\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!data && dataset) {\n const dataKey = series[id].dataKey;\n if (!dataKey) {\n throw new Error([`MUI X Charts: line series with id='${id}' has no data and no dataKey.`, 'You must provide a dataKey when using the dataset prop.'].join('\\n'));\n }\n dataset.forEach((entry, index) => {\n const value = entry[dataKey];\n if (value != null && typeof value !== 'number') {\n warnOnce([`MUI X Charts: your dataset key \"${dataKey}\" is used for plotting lines, but the dataset contains the non-null non-numerical element \"${value}\" at index ${index}.`, 'Line plots only support numeric and null values.'].join('\\n'));\n }\n });\n }\n }\n });\n const completedSeries = {};\n stackingGroups.forEach(stackingGroup => {\n // Get stacked values, and derive the domain\n const {\n ids,\n stackingOrder,\n stackingOffset\n } = stackingGroup;\n const stackedSeries = d3Stack().keys(ids.map(id => {\n // Use dataKey if needed and available\n const dataKey = series[id].dataKey;\n return series[id].data === undefined && dataKey !== undefined ? dataKey : id;\n })).value((d, key) => d[key] ?? 0) // defaultize null value to 0\n .order(stackingOrder).offset(stackingOffset)(d3Dataset);\n ids.forEach((id, index) => {\n const dataKey = series[id].dataKey;\n completedSeries[id] = _extends({\n labelMarkType: 'line'\n }, series[id], {\n data: dataKey ? dataset.map(data => {\n const value = data[dataKey];\n return typeof value === 'number' ? value : null;\n }) : series[id].data,\n stackedData: stackedSeries[index].map(([a, b]) => [a, b]),\n valueFormatter: series[id]?.valueFormatter ?? (v => v == null ? '' : v.toLocaleString())\n });\n });\n });\n return {\n seriesOrder,\n stackingGroups,\n series: completedSeries\n };\n};\nexport default seriesProcessor;","import { getLabel } from \"../../internals/getLabel.js\";\nconst legendGetter = params => {\n const {\n seriesOrder,\n series\n } = params;\n return seriesOrder.reduce((acc, seriesId) => {\n const formattedLabel = getLabel(series[seriesId].label, 'legend');\n if (formattedLabel === undefined) {\n return acc;\n }\n acc.push({\n type: 'line',\n markType: series[seriesId].labelMarkType,\n id: seriesId,\n seriesId,\n color: series[seriesId].color,\n label: formattedLabel\n });\n return acc;\n }, []);\n};\nexport default legendGetter;","import { getLabel } from \"../../internals/getLabel.js\";\nconst tooltipGetter = params => {\n const {\n series,\n getColor,\n identifier\n } = params;\n if (!identifier || identifier.dataIndex === undefined) {\n return null;\n }\n const label = getLabel(series.label, 'tooltip');\n const value = series.data[identifier.dataIndex];\n const formattedValue = series.valueFormatter(value, {\n dataIndex: identifier.dataIndex\n });\n return {\n identifier,\n color: getColor(identifier.dataIndex),\n label,\n value,\n formattedValue,\n markType: series.labelMarkType\n };\n};\nexport const axisTooltipGetter = series => {\n return Object.values(series).map(s => ({\n direction: 'x',\n axisId: s.xAxisId\n }));\n};\nexport default tooltipGetter;","const tooltipItemPositionGetter = params => {\n const {\n series,\n identifier,\n axesConfig\n } = params;\n if (!identifier || identifier.dataIndex === undefined) {\n return null;\n }\n const itemSeries = series.line?.series[identifier.seriesId];\n if (itemSeries == null) {\n return null;\n }\n if (axesConfig.x === undefined || axesConfig.y === undefined) {\n return null;\n }\n const xValue = axesConfig.x.data?.[identifier.dataIndex];\n const yValue = itemSeries.data[identifier.dataIndex];\n if (xValue == null || yValue == null) {\n return null;\n }\n return {\n x: axesConfig.x.scale(xValue),\n y: axesConfig.y.scale(yValue)\n };\n};\nexport default tooltipItemPositionGetter;","import { findMinMax } from \"../../internals/findMinMax.js\";\nexport const getExtremumX = params => {\n const {\n axis\n } = params;\n return findMinMax(axis.data ?? []);\n};\nfunction getSeriesExtremums(getValues, data, stackedData, filter) {\n return stackedData.reduce((seriesAcc, stackedValue, index) => {\n if (data[index] === null) {\n return seriesAcc;\n }\n const [base, value] = getValues(stackedValue);\n if (filter && (!filter({\n y: base,\n x: null\n }, index) || !filter({\n y: value,\n x: null\n }, index))) {\n return seriesAcc;\n }\n return [Math.min(base, value, seriesAcc[0]), Math.max(base, value, seriesAcc[1])];\n }, [Infinity, -Infinity]);\n}\nexport const getExtremumY = params => {\n const {\n series,\n axis,\n isDefaultAxis,\n getFilters\n } = params;\n return Object.keys(series).filter(seriesId => {\n const yAxisId = series[seriesId].yAxisId;\n return yAxisId === axis.id || isDefaultAxis && yAxisId === undefined;\n }).reduce((acc, seriesId) => {\n const {\n area,\n stackedData,\n data\n } = series[seriesId];\n const isArea = area !== undefined;\n const filter = getFilters?.({\n currentAxisId: axis.id,\n isDefaultAxis,\n seriesXAxisId: series[seriesId].xAxisId,\n seriesYAxisId: series[seriesId].yAxisId\n });\n\n // Since this series is not used to display an area, we do not consider the base (the d[0]).\n const getValues = isArea && axis.scaleType !== 'log' && typeof series[seriesId].baseline !== 'string' ? d => d : d => [d[1], d[1]];\n const seriesExtremums = getSeriesExtremums(getValues, data, stackedData, filter);\n const [seriesMin, seriesMax] = seriesExtremums;\n return [Math.min(seriesMin, acc[0]), Math.max(seriesMax, acc[1])];\n }, [Infinity, -Infinity]);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nconst getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {\n return _extends({}, seriesData, {\n id: seriesData.id ?? `auto-generated-id-${seriesIndex}`,\n color: seriesData.color ?? colors[seriesIndex % colors.length]\n });\n};\nexport default getSeriesWithDefaultValues;","export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n","export default function(d) {\n return d;\n}\n","export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n","export const deg2rad = (value, defaultRad) => {\n if (value === undefined) {\n return defaultRad;\n }\n return Math.PI * value / 180;\n};\nexport const rad2deg = (value, defaultDeg) => {\n if (value === undefined) {\n return defaultDeg;\n }\n return 180 * value / Math.PI;\n};","/**\n * Helper that converts values and percentages into values.\n * @param value The value provided by the developer. Can either be a number or a string with '%' or 'px'.\n * @param refValue The numerical value associated to 100%.\n * @returns The numerical value associated to the provided value.\n */\nexport function getPercentageValue(value, refValue) {\n if (typeof value === 'number') {\n return value;\n }\n if (value === '100%') {\n // Avoid potential rounding issues\n return refValue;\n }\n if (value.endsWith('%')) {\n const percentage = Number.parseFloat(value.slice(0, value.length - 1));\n if (!Number.isNaN(percentage)) {\n return percentage * refValue / 100;\n }\n }\n if (value.endsWith('px')) {\n const val = Number.parseFloat(value.slice(0, value.length - 2));\n if (!Number.isNaN(val)) {\n return val;\n }\n }\n throw new Error(`MUI X Charts: Received an unknown value \"${value}\". It should be a number, or a string with a percentage value.`);\n}","import { getPercentageValue } from \"../internals/getPercentageValue.js\";\nexport function getPieCoordinates(series, drawing) {\n const {\n height,\n width\n } = drawing;\n const {\n cx: cxParam,\n cy: cyParam\n } = series;\n const availableRadius = Math.min(width, height) / 2;\n const cx = getPercentageValue(cxParam ?? '50%', width);\n const cy = getPercentageValue(cyParam ?? '50%', height);\n return {\n cx,\n cy,\n availableRadius\n };\n}","import { getPercentageValue } from \"../../internals/getPercentageValue.js\";\nimport { getPieCoordinates } from \"../getPieCoordinates.js\";\nconst seriesLayout = (series, drawingArea) => {\n const seriesLayoutRecord = {};\n for (const seriesId of series.seriesOrder) {\n const {\n innerRadius,\n outerRadius,\n arcLabelRadius,\n cx: cxParam,\n cy: cyParam\n } = series.series[seriesId];\n const {\n cx,\n cy,\n availableRadius\n } = getPieCoordinates({\n cx: cxParam,\n cy: cyParam\n }, {\n width: drawingArea.width,\n height: drawingArea.height\n });\n const outer = getPercentageValue(outerRadius ?? availableRadius, availableRadius);\n const inner = getPercentageValue(innerRadius ?? 0, availableRadius);\n const label = arcLabelRadius === undefined ? (inner + outer) / 2 : getPercentageValue(arcLabelRadius, availableRadius);\n seriesLayoutRecord[seriesId] = {\n radius: {\n available: availableRadius,\n inner,\n outer,\n label\n },\n center: {\n x: drawingArea.left + cx,\n y: drawingArea.top + cy\n }\n };\n }\n return seriesLayoutRecord;\n};\nexport default seriesLayout;","import { createGetNextIndexFocusedItem, createGetPreviousIndexFocusedItem, createGetNextSeriesFocusedItem, createGetPreviousSeriesFocusedItem } from \"../../internals/commonNextFocusItem.js\";\nconst outSeriesTypes = new Set(['pie']);\nconst keyboardFocusHandler = event => {\n switch (event.key) {\n case 'ArrowRight':\n return createGetNextIndexFocusedItem(outSeriesTypes);\n case 'ArrowLeft':\n return createGetPreviousIndexFocusedItem(outSeriesTypes);\n case 'ArrowDown':\n return createGetPreviousSeriesFocusedItem(outSeriesTypes);\n case 'ArrowUp':\n return createGetNextSeriesFocusedItem(outSeriesTypes);\n default:\n return null;\n }\n};\nexport default keyboardFocusHandler;","'use client';\n\nimport * as React from 'react';\nimport { useCharts } from \"../../internals/store/useCharts.js\";\nimport { ChartContext } from \"./ChartContext.js\";\nimport { useChartCartesianAxis } from \"../../internals/plugins/featurePlugins/useChartCartesianAxis/index.js\";\nimport { useChartTooltip } from \"../../internals/plugins/featurePlugins/useChartTooltip/index.js\";\nimport { useChartInteraction } from \"../../internals/plugins/featurePlugins/useChartInteraction/index.js\";\nimport { useChartZAxis } from \"../../internals/plugins/featurePlugins/useChartZAxis/index.js\";\nimport { useChartHighlight } from \"../../internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js\";\nimport { barSeriesConfig } from \"../../BarChart/seriesConfig/index.js\";\nimport { scatterSeriesConfig } from \"../../ScatterChart/seriesConfig/index.js\";\nimport { lineSeriesConfig } from \"../../LineChart/seriesConfig/index.js\";\nimport { pieSeriesConfig } from \"../../PieChart/seriesConfig/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const defaultSeriesConfig = {\n bar: barSeriesConfig,\n scatter: scatterSeriesConfig,\n line: lineSeriesConfig,\n pie: pieSeriesConfig\n};\n\n// For consistency with the v7, the cartesian axes are set by default.\n// To remove them, you can provide a `plugins` props.\nconst defaultPlugins = [useChartZAxis, useChartTooltip, useChartInteraction, useChartCartesianAxis, useChartHighlight];\nfunction ChartProvider(props) {\n const {\n children,\n plugins = defaultPlugins,\n pluginParams = {},\n seriesConfig = defaultSeriesConfig\n } = props;\n const {\n contextValue\n } = useCharts(plugins, pluginParams, seriesConfig);\n return /*#__PURE__*/_jsx(ChartContext.Provider, {\n value: contextValue,\n children: children\n });\n}\nexport { ChartProvider };","import seriesProcessor from \"./seriesProcessor.js\";\nimport getColor from \"./getColor.js\";\nimport legendGetter from \"./legend.js\";\nimport tooltipGetter from \"./tooltip.js\";\nimport seriesLayout from \"./seriesLayout.js\";\nimport getSeriesWithDefaultValues from \"./getSeriesWithDefaultValues.js\";\nimport tooltipItemPositionGetter from \"./tooltipPosition.js\";\nimport keyboardFocusHandler from \"./keyboardFocusHandler.js\";\nimport { identifierSerializerSeriesIdDataIndex } from \"../../internals/identifierSerializer.js\";\nexport const pieSeriesConfig = {\n colorProcessor: getColor,\n seriesProcessor,\n seriesLayout,\n legendGetter,\n tooltipGetter,\n tooltipItemPositionGetter,\n getSeriesWithDefaultValues,\n keyboardFocusHandler,\n identifierSerializer: identifierSerializerSeriesIdDataIndex\n};","const getColor = series => {\n return dataIndex => {\n return series.data[dataIndex].color;\n };\n};\nexport default getColor;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { pie as d3Pie } from '@mui/x-charts-vendor/d3-shape';\nimport { getLabel } from \"../../internals/getLabel.js\";\nimport { deg2rad } from \"../../internals/angleConversion.js\";\nconst getSortingComparator = (comparator = 'none') => {\n if (typeof comparator === 'function') {\n return comparator;\n }\n switch (comparator) {\n case 'none':\n return null;\n case 'desc':\n return (a, b) => b - a;\n case 'asc':\n return (a, b) => a - b;\n default:\n return null;\n }\n};\nconst seriesProcessor = params => {\n const {\n seriesOrder,\n series\n } = params;\n const defaultizedSeries = {};\n seriesOrder.forEach(seriesId => {\n const arcs = d3Pie().startAngle(deg2rad(series[seriesId].startAngle ?? 0)).endAngle(deg2rad(series[seriesId].endAngle ?? 360)).padAngle(deg2rad(series[seriesId].paddingAngle ?? 0)).sortValues(getSortingComparator(series[seriesId].sortingValues ?? 'none'))(series[seriesId].data.map(piePoint => piePoint.value));\n defaultizedSeries[seriesId] = _extends({\n labelMarkType: 'circle',\n valueFormatter: item => item.value.toLocaleString()\n }, series[seriesId], {\n data: series[seriesId].data.map((item, index) => _extends({}, item, {\n id: item.id ?? `auto-generated-pie-id-${seriesId}-${index}`\n }, arcs[index])).map((item, index) => _extends({\n labelMarkType: 'circle'\n }, item, {\n formattedValue: series[seriesId].valueFormatter?.(_extends({}, item, {\n label: getLabel(item.label, 'arc')\n }), {\n dataIndex: index\n }) ?? item.value.toLocaleString()\n }))\n });\n });\n return {\n seriesOrder,\n series: defaultizedSeries\n };\n};\nexport default seriesProcessor;","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport {tau} from \"./math.js\";\n\nexport default function() {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = (data = array(data)).length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n }\n\n // Optionally sort the arcs by previously-computed values or by data.\n if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n // Compute the arcs! They are stored in the original data's order.\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function(_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function(_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}\n","import { getLabel } from \"../../internals/getLabel.js\";\nconst legendGetter = params => {\n const {\n seriesOrder,\n series\n } = params;\n return seriesOrder.reduce((acc, seriesId) => {\n series[seriesId].data.forEach((item, dataIndex) => {\n const formattedLabel = getLabel(item.label, 'legend');\n if (formattedLabel === undefined) {\n return;\n }\n const id = item.id ?? dataIndex;\n acc.push({\n type: 'pie',\n markType: item.labelMarkType ?? series[seriesId].labelMarkType,\n seriesId,\n id,\n itemId: id,\n dataIndex,\n color: item.color,\n label: formattedLabel\n });\n });\n return acc;\n }, []);\n};\nexport default legendGetter;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getLabel } from \"../../internals/getLabel.js\";\nconst tooltipGetter = params => {\n const {\n series,\n getColor,\n identifier\n } = params;\n if (!identifier || identifier.dataIndex === undefined) {\n return null;\n }\n const point = series.data[identifier.dataIndex];\n if (point == null) {\n return null;\n }\n const label = getLabel(point.label, 'tooltip');\n const value = _extends({}, point, {\n label\n });\n const formattedValue = series.valueFormatter(value, {\n dataIndex: identifier.dataIndex\n });\n return {\n identifier,\n color: getColor(identifier.dataIndex),\n label,\n value,\n formattedValue,\n markType: point.labelMarkType ?? series.labelMarkType\n };\n};\nexport default tooltipGetter;","import { findMinMax } from \"../../internals/findMinMax.js\";\nconst tooltipItemPositionGetter = params => {\n const {\n series,\n identifier,\n placement,\n seriesLayout\n } = params;\n if (!identifier || identifier.dataIndex === undefined) {\n return null;\n }\n const itemSeries = series.pie?.series[identifier.seriesId];\n const layout = seriesLayout.pie?.[identifier.seriesId];\n if (itemSeries == null || layout == null) {\n return null;\n }\n const {\n center,\n radius\n } = layout;\n const {\n data\n } = itemSeries;\n const dataItem = data[identifier.dataIndex];\n if (!dataItem) {\n return null;\n }\n\n // Compute the 4 corner points of the arc to get the bounding box.\n const points = [[radius.inner, dataItem.startAngle], [radius.inner, dataItem.endAngle], [radius.outer, dataItem.startAngle], [radius.outer, dataItem.endAngle]].map(([r, angle]) => ({\n x: center.x + r * Math.sin(angle),\n y: center.y - r * Math.cos(angle)\n }));\n const [x0, x1] = findMinMax(points.map(p => p.x));\n const [y0, y1] = findMinMax(points.map(p => p.y));\n switch (placement) {\n case 'bottom':\n return {\n x: (x1 + x0) / 2,\n y: y1\n };\n case 'left':\n return {\n x: x0,\n y: (y1 + y0) / 2\n };\n case 'right':\n return {\n x: x1,\n y: (y1 + y0) / 2\n };\n case 'top':\n default:\n return {\n x: (x1 + x0) / 2,\n y: y0\n };\n }\n};\nexport default tooltipItemPositionGetter;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nconst getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {\n return _extends({}, seriesData, {\n id: seriesData.id ?? `auto-generated-id-${seriesIndex}`,\n data: seriesData.data.map((d, index) => _extends({}, d, {\n color: d.color ?? colors[index % colors.length]\n }))\n });\n};\nexport default getSeriesWithDefaultValues;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ChartsSlotsContext = /*#__PURE__*/React.createContext(null);\n\n/**\n * Get the slots and slotProps from the nearest `ChartDataProvider` or `ChartDataProviderPro`.\n * @returns {ChartsSlotsContextValue} The slots and slotProps from the context.\n */\nif (process.env.NODE_ENV !== \"production\") ChartsSlotsContext.displayName = \"ChartsSlotsContext\";\nexport function useChartsSlots() {\n const context = React.useContext(ChartsSlotsContext);\n if (context == null) {\n throw new Error(['MUI X Charts: Could not find the Charts Slots context.', 'It looks like you rendered your component outside of a ChartDataProvider.', 'This can also happen if you are bundling multiple versions of the library.'].join('\\n'));\n }\n return context;\n}\nexport function ChartsSlotsProvider(props) {\n const {\n slots,\n slotProps = {},\n defaultSlots,\n children\n } = props;\n const value = React.useMemo(() => ({\n slots: _extends({}, defaultSlots, slots),\n slotProps\n }), [defaultSlots, slots, slotProps]);\n return /*#__PURE__*/_jsx(ChartsSlotsContext.Provider, {\n value: value,\n children: children\n });\n}","/**\n * Add keys, values of `defaultProps` that does not exist in `props`\n * @param defaultProps\n * @param props\n * @returns resolved props\n */\nexport default function resolveProps(defaultProps, props) {\n const output = {\n ...props\n };\n for (const key in defaultProps) {\n if (Object.prototype.hasOwnProperty.call(defaultProps, key)) {\n const propName = key;\n if (propName === 'components' || propName === 'slots') {\n output[propName] = {\n ...defaultProps[propName],\n ...output[propName]\n };\n } else if (propName === 'componentsProps' || propName === 'slotProps') {\n const defaultSlotProps = defaultProps[propName];\n const slotProps = props[propName];\n if (!slotProps) {\n output[propName] = defaultSlotProps || {};\n } else if (!defaultSlotProps) {\n output[propName] = slotProps;\n } else {\n output[propName] = {\n ...slotProps\n };\n for (const slotKey in defaultSlotProps) {\n if (Object.prototype.hasOwnProperty.call(defaultSlotProps, slotKey)) {\n const slotPropName = slotKey;\n output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);\n }\n }\n }\n } else if (output[propName] === undefined) {\n output[propName] = defaultProps[propName];\n }\n }\n }\n return output;\n}","import resolveProps from '@mui/utils/resolveProps';\nexport default function getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) {\n return props;\n }\n return resolveProps(theme.components[name].defaultProps, props);\n}","import * as React from 'react';\nimport { isValidElementType } from 'react-is';\n\n// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js\nexport function isPlainObject(item) {\n if (typeof item !== 'object' || item === null) {\n return false;\n }\n const prototype = Object.getPrototypeOf(item);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);\n}\nfunction deepClone(source) {\n if (/*#__PURE__*/React.isValidElement(source) || isValidElementType(source) || !isPlainObject(source)) {\n return source;\n }\n const output = {};\n Object.keys(source).forEach(key => {\n output[key] = deepClone(source[key]);\n });\n return output;\n}\n\n/**\n * Merge objects deeply.\n * It will shallow copy React elements.\n *\n * If `options.clone` is set to `false` the source object will be merged directly into the target object.\n *\n * @example\n * ```ts\n * deepmerge({ a: { b: 1 }, d: 2 }, { a: { c: 2 }, d: 4 });\n * // => { a: { b: 1, c: 2 }, d: 4 }\n * ````\n *\n * @param target The target object.\n * @param source The source object.\n * @param options The merge options.\n * @param options.clone Set to `false` to merge the source object directly into the target object.\n * @returns The merged object.\n */\nexport default function deepmerge(target, source, options = {\n clone: true\n}) {\n const output = options.clone ? {\n ...target\n } : target;\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(key => {\n if (/*#__PURE__*/React.isValidElement(source[key]) || isValidElementType(source[key])) {\n output[key] = source[key];\n } else if (isPlainObject(source[key]) &&\n // Avoid prototype pollution\n Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {\n // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.\n output[key] = deepmerge(target[key], source[key], options);\n } else if (options.clone) {\n output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];\n } else {\n output[key] = source[key];\n }\n });\n }\n return output;\n}","// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nexport const breakpointKeys = ['xs', 'sm', 'md', 'lg', 'xl'];\nconst sortBreakpointsValues = values => {\n const breakpointsAsArray = Object.keys(values).map(key => ({\n key,\n val: values[key]\n })) || [];\n // Sort in ascending order\n breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);\n return breakpointsAsArray.reduce((acc, obj) => {\n return {\n ...acc,\n [obj.key]: obj.val\n };\n }, {});\n};\n\n// Keep in mind that @media is inclusive by the CSS specification.\nexport default function createBreakpoints(breakpoints) {\n const {\n // The breakpoint **start** at this value.\n // For instance with the first breakpoint xs: [xs, sm).\n values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n },\n unit = 'px',\n step = 5,\n ...other\n } = breakpoints;\n const sortedValues = sortBreakpointsValues(values);\n const keys = Object.keys(sortedValues);\n function up(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (min-width:${value}${unit})`;\n }\n function down(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (max-width:${value - step / 100}${unit})`;\n }\n function between(start, end) {\n const endIndex = keys.indexOf(end);\n return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;\n }\n function only(key) {\n if (keys.indexOf(key) + 1 < keys.length) {\n return between(key, keys[keys.indexOf(key) + 1]);\n }\n return up(key);\n }\n function not(key) {\n // handle first and last key separately, for better readability\n const keyIndex = keys.indexOf(key);\n if (keyIndex === 0) {\n return up(keys[1]);\n }\n if (keyIndex === keys.length - 1) {\n return down(keys[keyIndex]);\n }\n return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');\n }\n return {\n keys,\n values: sortedValues,\n up,\n down,\n between,\n only,\n not,\n unit,\n ...other\n };\n}","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n/**\n * For using in `sx` prop to sort the breakpoint from low to high.\n * Note: this function does not work and will not support multiple units.\n * e.g. input: { '@container (min-width:300px)': '1rem', '@container (min-width:40rem)': '2rem' }\n * output: { '@container (min-width:40rem)': '2rem', '@container (min-width:300px)': '1rem' } // since 40 < 300 eventhough 40rem > 300px\n */\nexport function sortContainerQueries(theme, css) {\n if (!theme.containerQueries) {\n return css;\n }\n const sorted = Object.keys(css).filter(key => key.startsWith('@container')).sort((a, b) => {\n const regex = /min-width:\\s*([0-9.]+)/;\n return +(a.match(regex)?.[1] || 0) - +(b.match(regex)?.[1] || 0);\n });\n if (!sorted.length) {\n return css;\n }\n return sorted.reduce((acc, key) => {\n const value = css[key];\n delete acc[key];\n acc[key] = value;\n return acc;\n }, {\n ...css\n });\n}\nexport function isCqShorthand(breakpointKeys, value) {\n return value === '@' || value.startsWith('@') && (breakpointKeys.some(key => value.startsWith(`@${key}`)) || !!value.match(/^@\\d/));\n}\nexport function getContainerQuery(theme, shorthand) {\n const matches = shorthand.match(/^@([^/]+)?\\/?(.+)?$/);\n if (!matches) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The provided shorthand ${`(${shorthand})`} is invalid. The format should be \\`@\\` or \\`@/\\`.\\n` + 'For example, `@sm` or `@600` or `@40rem/sidebar`.' : _formatMuiErrorMessage(18, `(${shorthand})`));\n }\n return null;\n }\n const [, containerQuery, containerName] = matches;\n const value = Number.isNaN(+containerQuery) ? containerQuery || 0 : +containerQuery;\n return theme.containerQueries(containerName).up(value);\n}\nexport default function cssContainerQueries(themeInput) {\n const toContainerQuery = (mediaQuery, name) => mediaQuery.replace('@media', name ? `@container ${name}` : '@container');\n function attachCq(node, name) {\n node.up = (...args) => toContainerQuery(themeInput.breakpoints.up(...args), name);\n node.down = (...args) => toContainerQuery(themeInput.breakpoints.down(...args), name);\n node.between = (...args) => toContainerQuery(themeInput.breakpoints.between(...args), name);\n node.only = (...args) => toContainerQuery(themeInput.breakpoints.only(...args), name);\n node.not = (...args) => {\n const result = toContainerQuery(themeInput.breakpoints.not(...args), name);\n if (result.includes('not all and')) {\n // `@container` does not work with `not all and`, so need to invert the logic\n return result.replace('not all and ', '').replace('min-width:', 'width<').replace('max-width:', 'width>').replace('and', 'or');\n }\n return result;\n };\n }\n const node = {};\n const containerQueries = name => {\n attachCq(node, name);\n return node;\n };\n attachCq(containerQueries);\n return {\n ...themeInput,\n containerQueries\n };\n}","const shape = {\n borderRadius: 4\n};\nexport default shape;","import PropTypes from 'prop-types';\nimport deepmerge from '@mui/utils/deepmerge';\nimport merge from \"../merge/index.js\";\nimport { isCqShorthand, getContainerQuery } from \"../cssContainerQueries/index.js\";\n\n// The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\nexport const values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n};\nconst defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: key => `@media (min-width:${values[key]}px)`\n};\nconst defaultContainerQueries = {\n containerQueries: containerName => ({\n up: key => {\n let result = typeof key === 'number' ? key : values[key] || key;\n if (typeof result === 'number') {\n result = `${result}px`;\n }\n return containerName ? `@container ${containerName} (min-width:${result})` : `@container (min-width:${result})`;\n }\n })\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n const theme = props.theme || {};\n if (Array.isArray(propValue)) {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return propValue.reduce((acc, item, index) => {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n if (typeof propValue === 'object') {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return Object.keys(propValue).reduce((acc, breakpoint) => {\n if (isCqShorthand(themeBreakpoints.keys, breakpoint)) {\n const containerKey = getContainerQuery(theme.containerQueries ? theme : defaultContainerQueries, breakpoint);\n if (containerKey) {\n acc[containerKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n }\n }\n // key is breakpoint\n else if (Object.keys(themeBreakpoints.values || values).includes(breakpoint)) {\n const mediaKey = themeBreakpoints.up(breakpoint);\n acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n } else {\n const cssKey = breakpoint;\n acc[cssKey] = propValue[cssKey];\n }\n return acc;\n }, {});\n }\n const output = styleFromPropValue(propValue);\n return output;\n}\nfunction breakpoints(styleFunction) {\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const newStyleFunction = props => {\n const theme = props.theme || {};\n const base = styleFunction(props);\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n const extended = themeBreakpoints.keys.reduce((acc, key) => {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction({\n theme,\n ...props[key]\n });\n }\n return acc;\n }, null);\n return merge(base, extended);\n };\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? {\n ...styleFunction.propTypes,\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n } : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps];\n return newStyleFunction;\n}\nexport function createEmptyBreakpointObject(breakpointsInput = {}) {\n const breakpointsInOrder = breakpointsInput.keys?.reduce((acc, key) => {\n const breakpointStyleKey = breakpointsInput.up(key);\n acc[breakpointStyleKey] = {};\n return acc;\n }, {});\n return breakpointsInOrder || {};\n}\nexport function removeUnusedBreakpoints(breakpointKeys, style) {\n return breakpointKeys.reduce((acc, key) => {\n const breakpointOutput = acc[key];\n const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0;\n if (isBreakpointUnused) {\n delete acc[key];\n }\n return acc;\n }, style);\n}\nexport function mergeBreakpointsInOrder(breakpointsInput, ...styles) {\n const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput);\n const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => deepmerge(prev, next), {});\n return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput);\n}\n\n// compute base for responsive values; e.g.,\n// [1,2,3] => {xs: true, sm: true, md: true}\n// {xs: 1, sm: 2, md: 3} => {xs: true, sm: true, md: true}\nexport function computeBreakpointsBase(breakpointValues, themeBreakpoints) {\n // fixed value\n if (typeof breakpointValues !== 'object') {\n return {};\n }\n const base = {};\n const breakpointsKeys = Object.keys(themeBreakpoints);\n if (Array.isArray(breakpointValues)) {\n breakpointsKeys.forEach((breakpoint, i) => {\n if (i < breakpointValues.length) {\n base[breakpoint] = true;\n }\n });\n } else {\n breakpointsKeys.forEach(breakpoint => {\n if (breakpointValues[breakpoint] != null) {\n base[breakpoint] = true;\n }\n });\n }\n return base;\n}\nexport function resolveBreakpointValues({\n values: breakpointValues,\n breakpoints: themeBreakpoints,\n base: customBase\n}) {\n const base = customBase || computeBreakpointsBase(breakpointValues, themeBreakpoints);\n const keys = Object.keys(base);\n if (keys.length === 0) {\n return breakpointValues;\n }\n let previous;\n return keys.reduce((acc, breakpoint, i) => {\n if (Array.isArray(breakpointValues)) {\n acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];\n previous = i;\n } else if (typeof breakpointValues === 'object') {\n acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];\n previous = breakpoint;\n } else {\n acc[breakpoint] = breakpointValues;\n }\n return acc;\n }, {});\n}\nexport default breakpoints;","/**\n * WARNING: Don't import this directly. It's imported by the code generated by\n * `@mui/interal-babel-plugin-minify-errors`. Make sure to always use string literals in `Error`\n * constructors to ensure the plugin works as expected. Supported patterns include:\n * throw new Error('My message');\n * throw new Error(`My message: ${foo}`);\n * throw new Error(`My message: ${foo}` + 'another string');\n * ...\n * @param {number} code\n */\nexport default function formatMuiErrorMessage(code, ...args) {\n const url = new URL(`https://mui.com/production-error/?code=${code}`);\n args.forEach(arg => url.searchParams.append('args[]', arg));\n return `Minified MUI error #${code}; visit ${url} for the full message.`;\n}","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word in the sentence.\n// We only handle the first word.\nexport default function capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI: `capitalize(string)` expects a string argument.' : _formatMuiErrorMessage(7));\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n}","import capitalize from '@mui/utils/capitalize';\nimport responsivePropType from \"../responsivePropType/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nexport function getPath(obj, path, checkVars = true) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n // Check if CSS variables are used\n if (obj && obj.vars && checkVars) {\n const val = `vars.${path}`.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);\n if (val != null) {\n return val;\n }\n }\n return path.split('.').reduce((acc, item) => {\n if (acc && acc[item] != null) {\n return acc[item];\n }\n return null;\n }, obj);\n}\nexport function getStyleValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {\n let value;\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || userValue;\n } else {\n value = getPath(themeMapping, propValueFinal) || userValue;\n }\n if (transform) {\n value = transform(value, userValue, themeMapping);\n }\n return value;\n}\nfunction style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n if (props[prop] == null) {\n return null;\n }\n const propValue = props[prop];\n const theme = props.theme;\n const themeMapping = getPath(theme, themeKey) || {};\n const styleFromPropValue = propValueFinal => {\n let value = getStyleValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, propValue, styleFromPropValue);\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? {\n [prop]: responsivePropType\n } : {};\n fn.filterProps = [prop];\n return fn;\n}\nexport default style;","import deepmerge from '@mui/utils/deepmerge';\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n return deepmerge(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n });\n}\nexport default merge;","import responsivePropType from \"../responsivePropType/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nimport { getPath } from \"../style/index.js\";\nimport merge from \"../merge/index.js\";\nimport memoize from \"../memoize/index.js\";\nconst properties = {\n m: 'margin',\n p: 'padding'\n};\nconst directions = {\n t: 'Top',\n r: 'Right',\n b: 'Bottom',\n l: 'Left',\n x: ['Left', 'Right'],\n y: ['Top', 'Bottom']\n};\nconst aliases = {\n marginX: 'mx',\n marginY: 'my',\n paddingX: 'px',\n paddingY: 'py'\n};\n\n// memoize() impact:\n// From 300,000 ops/sec\n// To 350,000 ops/sec\nconst getCssProperties = memoize(prop => {\n // It's not a shorthand notation.\n if (prop.length > 2) {\n if (aliases[prop]) {\n prop = aliases[prop];\n } else {\n return [prop];\n }\n }\n const [a, b] = prop.split('');\n const property = properties[a];\n const direction = directions[b] || '';\n return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];\n});\nexport const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];\nexport const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];\nconst spacingKeys = [...marginKeys, ...paddingKeys];\nexport function createUnaryUnit(theme, themeKey, defaultValue, propName) {\n const themeSpacing = getPath(theme, themeKey, true) ?? defaultValue;\n if (typeof themeSpacing === 'number' || typeof themeSpacing === 'string') {\n return val => {\n if (typeof val === 'string') {\n return val;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (typeof val !== 'number') {\n console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${val}.`);\n }\n }\n if (typeof themeSpacing === 'string') {\n return `calc(${val} * ${themeSpacing})`;\n }\n return themeSpacing * val;\n };\n }\n if (Array.isArray(themeSpacing)) {\n return val => {\n if (typeof val === 'string') {\n return val;\n }\n const abs = Math.abs(val);\n if (process.env.NODE_ENV !== 'production') {\n if (!Number.isInteger(abs)) {\n console.error([`MUI: The \\`theme.${themeKey}\\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \\`theme.${themeKey}\\` as a number.`].join('\\n'));\n } else if (abs > themeSpacing.length - 1) {\n console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\\n'));\n }\n }\n const transformed = themeSpacing[abs];\n if (val >= 0) {\n return transformed;\n }\n if (typeof transformed === 'number') {\n return -transformed;\n }\n return `-${transformed}`;\n };\n }\n if (typeof themeSpacing === 'function') {\n return themeSpacing;\n }\n if (process.env.NODE_ENV !== 'production') {\n console.error([`MUI: The \\`theme.${themeKey}\\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\\n'));\n }\n return () => undefined;\n}\nexport function createUnarySpacing(theme) {\n return createUnaryUnit(theme, 'spacing', 8, 'spacing');\n}\nexport function getValue(transformer, propValue) {\n if (typeof propValue === 'string' || propValue == null) {\n return propValue;\n }\n return transformer(propValue);\n}\nexport function getStyleFromPropValue(cssProperties, transformer) {\n return propValue => cssProperties.reduce((acc, cssProperty) => {\n acc[cssProperty] = getValue(transformer, propValue);\n return acc;\n }, {});\n}\nfunction resolveCssProperty(props, keys, prop, transformer) {\n // Using a hash computation over an array iteration could be faster, but with only 28 items,\n // it's doesn't worth the bundle size.\n if (!keys.includes(prop)) {\n return null;\n }\n const cssProperties = getCssProperties(prop);\n const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);\n const propValue = props[prop];\n return handleBreakpoints(props, propValue, styleFromPropValue);\n}\nfunction style(props, keys) {\n const transformer = createUnarySpacing(props.theme);\n return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});\n}\nexport function margin(props) {\n return style(props, marginKeys);\n}\nmargin.propTypes = process.env.NODE_ENV !== 'production' ? marginKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nmargin.filterProps = marginKeys;\nexport function padding(props) {\n return style(props, paddingKeys);\n}\npadding.propTypes = process.env.NODE_ENV !== 'production' ? paddingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\npadding.filterProps = paddingKeys;\nfunction spacing(props) {\n return style(props, spacingKeys);\n}\nspacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nspacing.filterProps = spacingKeys;\nexport default spacing;","export default function memoize(fn) {\n const cache = {};\n return arg => {\n if (cache[arg] === undefined) {\n cache[arg] = fn(arg);\n }\n return cache[arg];\n };\n}","import { createUnarySpacing } from \"../spacing/index.js\";\n\n// The different signatures imply different meaning for their arguments that can't be expressed structurally.\n// We express the difference with variable names.\n\nexport default function createSpacing(spacingInput = 8,\n// Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.\n// Smaller components, such as icons, can align to a 4dp grid.\n// https://m2.material.io/design/layout/understanding-layout.html\ntransform = createUnarySpacing({\n spacing: spacingInput\n})) {\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n }\n const spacing = (...argsInput) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!(argsInput.length <= 4)) {\n console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);\n }\n }\n const args = argsInput.length === 0 ? [1] : argsInput;\n return args.map(argument => {\n const output = transform(argument);\n return typeof output === 'number' ? `${output}px` : output;\n }).join(' ');\n };\n spacing.mui = true;\n return spacing;\n}","import merge from \"../merge/index.js\";\nfunction compose(...styles) {\n const handlers = styles.reduce((acc, style) => {\n style.filterProps.forEach(prop => {\n acc[prop] = style;\n });\n return acc;\n }, {});\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n return Object.keys(props).reduce((acc, prop) => {\n if (handlers[prop]) {\n return merge(acc, handlers[prop](props));\n }\n return acc;\n }, {});\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => Object.assign(acc, style.propTypes), {}) : {};\n fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);\n return fn;\n}\nexport default compose;","import responsivePropType from \"../responsivePropType/index.js\";\nimport style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nimport { createUnaryUnit, getValue } from \"../spacing/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nexport function borderTransform(value) {\n if (typeof value !== 'number') {\n return value;\n }\n return `${value}px solid`;\n}\nfunction createBorderStyle(prop, transform) {\n return style({\n prop,\n themeKey: 'borders',\n transform\n });\n}\nexport const border = createBorderStyle('border', borderTransform);\nexport const borderTop = createBorderStyle('borderTop', borderTransform);\nexport const borderRight = createBorderStyle('borderRight', borderTransform);\nexport const borderBottom = createBorderStyle('borderBottom', borderTransform);\nexport const borderLeft = createBorderStyle('borderLeft', borderTransform);\nexport const borderColor = createBorderStyle('borderColor');\nexport const borderTopColor = createBorderStyle('borderTopColor');\nexport const borderRightColor = createBorderStyle('borderRightColor');\nexport const borderBottomColor = createBorderStyle('borderBottomColor');\nexport const borderLeftColor = createBorderStyle('borderLeftColor');\nexport const outline = createBorderStyle('outline', borderTransform);\nexport const outlineColor = createBorderStyle('outlineColor');\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const borderRadius = props => {\n if (props.borderRadius !== undefined && props.borderRadius !== null) {\n const transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4, 'borderRadius');\n const styleFromPropValue = propValue => ({\n borderRadius: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.borderRadius, styleFromPropValue);\n }\n return null;\n};\nborderRadius.propTypes = process.env.NODE_ENV !== 'production' ? {\n borderRadius: responsivePropType\n} : {};\nborderRadius.filterProps = ['borderRadius'];\nconst borders = compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor);\nexport default borders;","import style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nimport { createUnaryUnit, getValue } from \"../spacing/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nimport responsivePropType from \"../responsivePropType/index.js\";\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const gap = props => {\n if (props.gap !== undefined && props.gap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'gap');\n const styleFromPropValue = propValue => ({\n gap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.gap, styleFromPropValue);\n }\n return null;\n};\ngap.propTypes = process.env.NODE_ENV !== 'production' ? {\n gap: responsivePropType\n} : {};\ngap.filterProps = ['gap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const columnGap = props => {\n if (props.columnGap !== undefined && props.columnGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'columnGap');\n const styleFromPropValue = propValue => ({\n columnGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.columnGap, styleFromPropValue);\n }\n return null;\n};\ncolumnGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n columnGap: responsivePropType\n} : {};\ncolumnGap.filterProps = ['columnGap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const rowGap = props => {\n if (props.rowGap !== undefined && props.rowGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'rowGap');\n const styleFromPropValue = propValue => ({\n rowGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.rowGap, styleFromPropValue);\n }\n return null;\n};\nrowGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n rowGap: responsivePropType\n} : {};\nrowGap.filterProps = ['rowGap'];\nexport const gridColumn = style({\n prop: 'gridColumn'\n});\nexport const gridRow = style({\n prop: 'gridRow'\n});\nexport const gridAutoFlow = style({\n prop: 'gridAutoFlow'\n});\nexport const gridAutoColumns = style({\n prop: 'gridAutoColumns'\n});\nexport const gridAutoRows = style({\n prop: 'gridAutoRows'\n});\nexport const gridTemplateColumns = style({\n prop: 'gridTemplateColumns'\n});\nexport const gridTemplateRows = style({\n prop: 'gridTemplateRows'\n});\nexport const gridTemplateAreas = style({\n prop: 'gridTemplateAreas'\n});\nexport const gridArea = style({\n prop: 'gridArea'\n});\nconst grid = compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);\nexport default grid;","import style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nexport function paletteTransform(value, userValue) {\n if (userValue === 'grey') {\n return userValue;\n }\n return value;\n}\nexport const color = style({\n prop: 'color',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const bgcolor = style({\n prop: 'bgcolor',\n cssProperty: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const backgroundColor = style({\n prop: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nconst palette = compose(color, bgcolor, backgroundColor);\nexport default palette;","import style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nimport { handleBreakpoints, values as breakpointsValues } from \"../breakpoints/index.js\";\nexport function sizingTransform(value) {\n return value <= 1 && value !== 0 ? `${value * 100}%` : value;\n}\nexport const width = style({\n prop: 'width',\n transform: sizingTransform\n});\nexport const maxWidth = props => {\n if (props.maxWidth !== undefined && props.maxWidth !== null) {\n const styleFromPropValue = propValue => {\n const breakpoint = props.theme?.breakpoints?.values?.[propValue] || breakpointsValues[propValue];\n if (!breakpoint) {\n return {\n maxWidth: sizingTransform(propValue)\n };\n }\n if (props.theme?.breakpoints?.unit !== 'px') {\n return {\n maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`\n };\n }\n return {\n maxWidth: breakpoint\n };\n };\n return handleBreakpoints(props, props.maxWidth, styleFromPropValue);\n }\n return null;\n};\nmaxWidth.filterProps = ['maxWidth'];\nexport const minWidth = style({\n prop: 'minWidth',\n transform: sizingTransform\n});\nexport const height = style({\n prop: 'height',\n transform: sizingTransform\n});\nexport const maxHeight = style({\n prop: 'maxHeight',\n transform: sizingTransform\n});\nexport const minHeight = style({\n prop: 'minHeight',\n transform: sizingTransform\n});\nexport const sizeWidth = style({\n prop: 'size',\n cssProperty: 'width',\n transform: sizingTransform\n});\nexport const sizeHeight = style({\n prop: 'size',\n cssProperty: 'height',\n transform: sizingTransform\n});\nexport const boxSizing = style({\n prop: 'boxSizing'\n});\nconst sizing = compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);\nexport default sizing;","import { padding, margin } from \"../spacing/index.js\";\nimport { borderRadius, borderTransform } from \"../borders/index.js\";\nimport { gap, rowGap, columnGap } from \"../cssGrid/index.js\";\nimport { paletteTransform } from \"../palette/index.js\";\nimport { maxWidth, sizingTransform } from \"../sizing/index.js\";\nconst defaultSxConfig = {\n // borders\n border: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderTop: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderRight: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderBottom: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderLeft: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderColor: {\n themeKey: 'palette'\n },\n borderTopColor: {\n themeKey: 'palette'\n },\n borderRightColor: {\n themeKey: 'palette'\n },\n borderBottomColor: {\n themeKey: 'palette'\n },\n borderLeftColor: {\n themeKey: 'palette'\n },\n outline: {\n themeKey: 'borders',\n transform: borderTransform\n },\n outlineColor: {\n themeKey: 'palette'\n },\n borderRadius: {\n themeKey: 'shape.borderRadius',\n style: borderRadius\n },\n // palette\n color: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n bgcolor: {\n themeKey: 'palette',\n cssProperty: 'backgroundColor',\n transform: paletteTransform\n },\n backgroundColor: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n // spacing\n p: {\n style: padding\n },\n pt: {\n style: padding\n },\n pr: {\n style: padding\n },\n pb: {\n style: padding\n },\n pl: {\n style: padding\n },\n px: {\n style: padding\n },\n py: {\n style: padding\n },\n padding: {\n style: padding\n },\n paddingTop: {\n style: padding\n },\n paddingRight: {\n style: padding\n },\n paddingBottom: {\n style: padding\n },\n paddingLeft: {\n style: padding\n },\n paddingX: {\n style: padding\n },\n paddingY: {\n style: padding\n },\n paddingInline: {\n style: padding\n },\n paddingInlineStart: {\n style: padding\n },\n paddingInlineEnd: {\n style: padding\n },\n paddingBlock: {\n style: padding\n },\n paddingBlockStart: {\n style: padding\n },\n paddingBlockEnd: {\n style: padding\n },\n m: {\n style: margin\n },\n mt: {\n style: margin\n },\n mr: {\n style: margin\n },\n mb: {\n style: margin\n },\n ml: {\n style: margin\n },\n mx: {\n style: margin\n },\n my: {\n style: margin\n },\n margin: {\n style: margin\n },\n marginTop: {\n style: margin\n },\n marginRight: {\n style: margin\n },\n marginBottom: {\n style: margin\n },\n marginLeft: {\n style: margin\n },\n marginX: {\n style: margin\n },\n marginY: {\n style: margin\n },\n marginInline: {\n style: margin\n },\n marginInlineStart: {\n style: margin\n },\n marginInlineEnd: {\n style: margin\n },\n marginBlock: {\n style: margin\n },\n marginBlockStart: {\n style: margin\n },\n marginBlockEnd: {\n style: margin\n },\n // display\n displayPrint: {\n cssProperty: false,\n transform: value => ({\n '@media print': {\n display: value\n }\n })\n },\n display: {},\n overflow: {},\n textOverflow: {},\n visibility: {},\n whiteSpace: {},\n // flexbox\n flexBasis: {},\n flexDirection: {},\n flexWrap: {},\n justifyContent: {},\n alignItems: {},\n alignContent: {},\n order: {},\n flex: {},\n flexGrow: {},\n flexShrink: {},\n alignSelf: {},\n justifyItems: {},\n justifySelf: {},\n // grid\n gap: {\n style: gap\n },\n rowGap: {\n style: rowGap\n },\n columnGap: {\n style: columnGap\n },\n gridColumn: {},\n gridRow: {},\n gridAutoFlow: {},\n gridAutoColumns: {},\n gridAutoRows: {},\n gridTemplateColumns: {},\n gridTemplateRows: {},\n gridTemplateAreas: {},\n gridArea: {},\n // positions\n position: {},\n zIndex: {\n themeKey: 'zIndex'\n },\n top: {},\n right: {},\n bottom: {},\n left: {},\n // shadows\n boxShadow: {\n themeKey: 'shadows'\n },\n // sizing\n width: {\n transform: sizingTransform\n },\n maxWidth: {\n style: maxWidth\n },\n minWidth: {\n transform: sizingTransform\n },\n height: {\n transform: sizingTransform\n },\n maxHeight: {\n transform: sizingTransform\n },\n minHeight: {\n transform: sizingTransform\n },\n boxSizing: {},\n // typography\n font: {\n themeKey: 'font'\n },\n fontFamily: {\n themeKey: 'typography'\n },\n fontSize: {\n themeKey: 'typography'\n },\n fontStyle: {\n themeKey: 'typography'\n },\n fontWeight: {\n themeKey: 'typography'\n },\n letterSpacing: {},\n textTransform: {},\n lineHeight: {},\n textAlign: {},\n typography: {\n cssProperty: false,\n themeKey: 'typography'\n }\n};\nexport default defaultSxConfig;","import capitalize from '@mui/utils/capitalize';\nimport merge from \"../merge/index.js\";\nimport { getPath, getStyleValue as getValue } from \"../style/index.js\";\nimport { handleBreakpoints, createEmptyBreakpointObject, removeUnusedBreakpoints } from \"../breakpoints/index.js\";\nimport { sortContainerQueries } from \"../cssContainerQueries/index.js\";\nimport defaultSxConfig from \"./defaultSxConfig.js\";\nfunction objectsHaveSameKeys(...objects) {\n const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);\n const union = new Set(allKeys);\n return objects.every(object => union.size === Object.keys(object).length);\n}\nfunction callIfFn(maybeFn, arg) {\n return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function unstable_createStyleFunctionSx() {\n function getThemeValue(prop, val, theme, config) {\n const props = {\n [prop]: val,\n theme\n };\n const options = config[prop];\n if (!options) {\n return {\n [prop]: val\n };\n }\n const {\n cssProperty = prop,\n themeKey,\n transform,\n style\n } = options;\n if (val == null) {\n return null;\n }\n\n // TODO v6: remove, see https://github.com/mui/material-ui/pull/38123\n if (themeKey === 'typography' && val === 'inherit') {\n return {\n [prop]: val\n };\n }\n const themeMapping = getPath(theme, themeKey) || {};\n if (style) {\n return style(props);\n }\n const styleFromPropValue = propValueFinal => {\n let value = getValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, val, styleFromPropValue);\n }\n function styleFunctionSx(props) {\n const {\n sx,\n theme = {},\n nested\n } = props || {};\n if (!sx) {\n return null; // Emotion & styled-components will neglect null\n }\n const config = theme.unstable_sxConfig ?? defaultSxConfig;\n\n /*\n * Receive `sxInput` as object or callback\n * and then recursively check keys & values to create media query object styles.\n * (the result will be used in `styled`)\n */\n function traverse(sxInput) {\n let sxObject = sxInput;\n if (typeof sxInput === 'function') {\n sxObject = sxInput(theme);\n } else if (typeof sxInput !== 'object') {\n // value\n return sxInput;\n }\n if (!sxObject) {\n return null;\n }\n const emptyBreakpoints = createEmptyBreakpointObject(theme.breakpoints);\n const breakpointsKeys = Object.keys(emptyBreakpoints);\n let css = emptyBreakpoints;\n Object.keys(sxObject).forEach(styleKey => {\n const value = callIfFn(sxObject[styleKey], theme);\n if (value !== null && value !== undefined) {\n if (typeof value === 'object') {\n if (config[styleKey]) {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n } else {\n const breakpointsValues = handleBreakpoints({\n theme\n }, value, x => ({\n [styleKey]: x\n }));\n if (objectsHaveSameKeys(breakpointsValues, value)) {\n css[styleKey] = styleFunctionSx({\n sx: value,\n theme,\n nested: true\n });\n } else {\n css = merge(css, breakpointsValues);\n }\n }\n } else {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n }\n }\n });\n if (!nested && theme.modularCssLayers) {\n return {\n '@layer sx': sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css))\n };\n }\n return sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css));\n }\n return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);\n }\n return styleFunctionSx;\n}\nconst styleFunctionSx = unstable_createStyleFunctionSx();\nstyleFunctionSx.filterProps = ['sx'];\nexport default styleFunctionSx;","/**\n * A universal utility to style components with multiple color modes. Always use it from the theme object.\n * It works with:\n * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)\n * - [CSS theme variables](https://mui.com/material-ui/customization/css-theme-variables/overview/)\n * - Zero-runtime engine\n *\n * Tips: Use an array over object spread and place `theme.applyStyles()` last.\n *\n * With the styled function:\n * ✅ [{ background: '#e5e5e5' }, theme.applyStyles('dark', { background: '#1c1c1c' })]\n * 🚫 { background: '#e5e5e5', ...theme.applyStyles('dark', { background: '#1c1c1c' })}\n *\n * With the sx prop:\n * ✅ [{ background: '#e5e5e5' }, theme => theme.applyStyles('dark', { background: '#1c1c1c' })]\n * 🚫 { background: '#e5e5e5', ...theme => theme.applyStyles('dark', { background: '#1c1c1c' })}\n *\n * @example\n * 1. using with `styled`:\n * ```jsx\n * const Component = styled('div')(({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]);\n * ```\n *\n * @example\n * 2. using with `sx` prop:\n * ```jsx\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]}\n * />\n * ```\n *\n * @example\n * 3. theming a component:\n * ```jsx\n * extendTheme({\n * components: {\n * MuiButton: {\n * styleOverrides: {\n * root: ({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ],\n * },\n * }\n * }\n * })\n *```\n */\nexport default function applyStyles(key, styles) {\n // @ts-expect-error this is 'any' type\n const theme = this;\n if (theme.vars) {\n if (!theme.colorSchemes?.[key] || typeof theme.getColorSchemeSelector !== 'function') {\n return {};\n }\n // If CssVarsProvider is used as a provider, returns '*:where({selector}) &'\n let selector = theme.getColorSchemeSelector(key);\n if (selector === '&') {\n return styles;\n }\n if (selector.includes('data-') || selector.includes('.')) {\n // '*' is required as a workaround for Emotion issue (https://github.com/emotion-js/emotion/issues/2836)\n selector = `*:where(${selector.replace(/\\s*&$/, '')}) &`;\n }\n return {\n [selector]: styles\n };\n }\n if (theme.palette.mode === key) {\n return styles;\n }\n return {};\n}","import deepmerge from '@mui/utils/deepmerge';\nimport createBreakpoints from \"../createBreakpoints/createBreakpoints.js\";\nimport cssContainerQueries from \"../cssContainerQueries/index.js\";\nimport shape from \"./shape.js\";\nimport createSpacing from \"./createSpacing.js\";\nimport styleFunctionSx from \"../styleFunctionSx/styleFunctionSx.js\";\nimport defaultSxConfig from \"../styleFunctionSx/defaultSxConfig.js\";\nimport applyStyles from \"./applyStyles.js\";\nfunction createTheme(options = {}, ...args) {\n const {\n breakpoints: breakpointsInput = {},\n palette: paletteInput = {},\n spacing: spacingInput,\n shape: shapeInput = {},\n ...other\n } = options;\n const breakpoints = createBreakpoints(breakpointsInput);\n const spacing = createSpacing(spacingInput);\n let muiTheme = deepmerge({\n breakpoints,\n direction: 'ltr',\n components: {},\n // Inject component definitions.\n palette: {\n mode: 'light',\n ...paletteInput\n },\n spacing,\n shape: {\n ...shape,\n ...shapeInput\n }\n }, other);\n muiTheme = cssContainerQueries(muiTheme);\n muiTheme.applyStyles = applyStyles;\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n muiTheme.unstable_sxConfig = {\n ...defaultSxConfig,\n ...other?.unstable_sxConfig\n };\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nexport default createTheme;","var isDevelopment = false;\n\n/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n return document.styleSheets[i];\n }\n } // this function should always return with a value\n // TS can't understand it though so we make it stop complaining here\n\n\n return undefined;\n}\n\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n\n tag.appendChild(document.createTextNode(''));\n tag.setAttribute('data-s', '');\n return tag;\n}\n\nvar StyleSheet = /*#__PURE__*/function () {\n // Using Node instead of HTMLElement since container may be a ShadowRoot\n function StyleSheet(options) {\n var _this = this;\n\n this._insertTag = function (tag) {\n var before;\n\n if (_this.tags.length === 0) {\n if (_this.insertionPoint) {\n before = _this.insertionPoint.nextSibling;\n } else if (_this.prepend) {\n before = _this.container.firstChild;\n } else {\n before = _this.before;\n }\n } else {\n before = _this.tags[_this.tags.length - 1].nextSibling;\n }\n\n _this.container.insertBefore(tag, before);\n\n _this.tags.push(tag);\n };\n\n this.isSpeedy = options.speedy === undefined ? !isDevelopment : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.prepend = options.prepend;\n this.insertionPoint = options.insertionPoint;\n this.before = null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.hydrate = function hydrate(nodes) {\n nodes.forEach(this._insertTag);\n };\n\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n this._insertTag(createStyleElement(this));\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n\n try {\n // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n\n this.ctr++;\n };\n\n _proto.flush = function flush() {\n this.tags.forEach(function (tag) {\n var _tag$parentNode;\n\n return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n };\n\n return StyleSheet;\n}();\n\nexport { StyleSheet };\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\n","import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen, sizeof} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\tvar length = sizeof(children)\n\n\tfor (var i = 0; i < length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: element.value = element.props.join(',')\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f') != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @return {object}\n */\nexport function comment (value, root, parent) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @return {object}\n */\nexport function declaration (value, root, parent, length) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)\n}\n","import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, slice, position, RULESET, combine, match, serialize, copy, replace, WEBKIT, MOZ, MS, KEYFRAMES, DECLARATION, hash, charat, strlen, indexof, stringify, rulesheet, middleware, compile } from 'stylis';\nimport '@emotion/weak-memoize';\nimport '@emotion/memoize';\n\nvar identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {\n var previous = 0;\n var character = 0;\n\n while (true) {\n previous = character;\n character = peek(); // &\\f\n\n if (previous === 38 && character === 12) {\n points[index] = 1;\n }\n\n if (token(character)) {\n break;\n }\n\n next();\n }\n\n return slice(begin, position);\n};\n\nvar toRules = function toRules(parsed, points) {\n // pretend we've started with a comma\n var index = -1;\n var character = 44;\n\n do {\n switch (token(character)) {\n case 0:\n // &\\f\n if (character === 38 && peek() === 12) {\n // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n // and when it should just concatenate the outer and inner selectors\n // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n points[index] = 1;\n }\n\n parsed[index] += identifierWithPointTracking(position - 1, points, index);\n break;\n\n case 2:\n parsed[index] += delimit(character);\n break;\n\n case 4:\n // comma\n if (character === 44) {\n // colon\n parsed[++index] = peek() === 58 ? '&\\f' : '';\n points[index] = parsed[index].length;\n break;\n }\n\n // fallthrough\n\n default:\n parsed[index] += from(character);\n }\n } while (character = next());\n\n return parsed;\n};\n\nvar getRules = function getRules(value, points) {\n return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo\n // negative .length indicates that this rule has been already prefixed\n element.length < 1) {\n return;\n }\n\n var value = element.value;\n var parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n\n while (parent.type !== 'rule') {\n parent = parent.parent;\n if (!parent) return;\n } // short-circuit for the simplest case\n\n\n if (element.props.length === 1 && value.charCodeAt(0) !== 58\n /* colon */\n && !fixedElements.get(parent)) {\n return;\n } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n\n if (isImplicitRule) {\n return;\n }\n\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel(element) {\n if (element.type === 'decl') {\n var value = element.value;\n\n if ( // charcode for l\n value.charCodeAt(0) === 108 && // charcode for b\n value.charCodeAt(2) === 98) {\n // this ignores label\n element[\"return\"] = '';\n element.value = '';\n }\n }\n};\n\n/* eslint-disable no-fallthrough */\n\nfunction prefix(value, length) {\n switch (hash(value, length)) {\n // color-adjust\n case 5103:\n return WEBKIT + 'print-' + value + value;\n // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\n case 5737:\n case 4201:\n case 3177:\n case 3433:\n case 1641:\n case 4457:\n case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\n case 5572:\n case 6356:\n case 5844:\n case 3191:\n case 6645:\n case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\n case 4215:\n case 6389:\n case 5109:\n case 5365:\n case 5621:\n case 3829:\n return WEBKIT + value + value;\n // appearance, user-select, transform, hyphens, text-size-adjust\n\n case 5349:\n case 4246:\n case 4810:\n case 6968:\n case 2756:\n return WEBKIT + value + MOZ + value + MS + value + value;\n // flex, flex-direction\n\n case 6828:\n case 4268:\n return WEBKIT + value + MS + value + value;\n // order\n\n case 6165:\n return WEBKIT + value + MS + 'flex-' + value + value;\n // align-items\n\n case 5187:\n return WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;\n // align-self\n\n case 5443:\n return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;\n // align-content\n\n case 4675:\n return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;\n // flex-shrink\n\n case 5548:\n return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;\n // flex-basis\n\n case 5292:\n return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;\n // flex-grow\n\n case 6060:\n return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;\n // transition\n\n case 4554:\n return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;\n // cursor\n\n case 6187:\n return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;\n // background, background-image\n\n case 5495:\n case 3959:\n return replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1');\n // justify-content\n\n case 4968:\n return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;\n // (margin|padding)-inline-(start|end)\n\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;\n // (min|max)?(width|height|inline-size|block-size)\n\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n // stretch, max-content, min-content, fill-available\n if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {\n // (m)ax-content, (m)in-content\n case 109:\n // -\n if (charat(value, length + 4) !== 45) break;\n // (f)ill-available, (f)it-content\n\n case 102:\n return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;\n // (s)tretch\n\n case 115:\n return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;\n }\n break;\n // position: sticky\n\n case 4949:\n // (s)ticky?\n if (charat(value, length + 1) !== 115) break;\n // display: (flex|inline-flex)\n\n case 6444:\n switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n // stic(k)y\n case 107:\n return replace(value, ':', ':' + WEBKIT) + value;\n // (inline-)?fl(e)x\n\n case 101:\n return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;\n }\n\n break;\n // writing-mode\n\n case 5936:\n switch (charat(value, length + 11)) {\n // vertical-l(r)\n case 114:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value;\n // vertical-r(l)\n\n case 108:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value;\n // horizontal(-)tb\n\n case 45:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value;\n }\n\n return WEBKIT + value + MS + value + value;\n }\n\n return value;\n}\n\nvar prefixer = function prefixer(element, index, children, callback) {\n if (element.length > -1) if (!element[\"return\"]) switch (element.type) {\n case DECLARATION:\n element[\"return\"] = prefix(element.value, element.length);\n break;\n\n case KEYFRAMES:\n return serialize([copy(element, {\n value: replace(element.value, '@', '@' + WEBKIT)\n })], callback);\n\n case RULESET:\n if (element.length) return combine(element.props, function (value) {\n switch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n // :read-(only|write)\n case ':read-only':\n case ':read-write':\n return serialize([copy(element, {\n props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]\n })], callback);\n // :placeholder\n\n case '::placeholder':\n return serialize([copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]\n })], callback);\n }\n\n return '';\n });\n }\n};\n\nvar defaultStylisPlugins = [prefixer];\n\nvar createCache = function createCache(options) {\n var key = options.key;\n\n if (key === 'css') {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n // note this very very intentionally targets all style elements regardless of the key to ensure\n // that creating a cache works inside of render of a React component\n\n Array.prototype.forEach.call(ssrStyles, function (node) {\n // we want to only move elements which have a space in the data-emotion attribute value\n // because that indicates that it is an Emotion 11 server-side rendered style elements\n // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n // will not result in the Emotion 10 styles being destroyed\n var dataEmotionAttribute = node.getAttribute('data-emotion');\n\n if (dataEmotionAttribute.indexOf(' ') === -1) {\n return;\n }\n\n document.head.appendChild(node);\n node.setAttribute('data-s', '');\n });\n }\n\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n\n var inserted = {};\n var container;\n var nodesToHydrate = [];\n\n {\n container = options.container || document.head;\n Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node) {\n var attrib = node.getAttribute(\"data-emotion\").split(' ');\n\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n\n nodesToHydrate.push(node);\n });\n }\n\n var _insert;\n\n var omnipresentPlugins = [compat, removeLabel];\n\n {\n var currentSheet;\n var finalizingPlugins = [stringify, rulesheet(function (rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n\n var stylis = function stylis(styles) {\n return serialize(compile(styles), serializer);\n };\n\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n currentSheet = sheet;\n\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n }\n\n var cache = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend,\n insertionPoint: options.insertionPoint\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\n\nexport { createCache as default };\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine} from './Utility.js'\nimport {copy, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\treturn serialize([copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]})], callback)\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\treturn serialize([\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]})\n\t\t\t\t\t\t\t\t\t], callback)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n","var isBrowser = true;\n\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else if (className) {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false ) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles, registerStyles };\n","var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n scale: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport { unitlessKeys as default };\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar isDevelopment = false;\n\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nvar noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n\n var componentSelector = interpolation;\n\n if (componentSelector.__emotion_styles !== undefined) {\n\n return componentSelector;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n var keyframes = interpolation;\n\n if (keyframes.anim === 1) {\n cursor = {\n name: keyframes.name,\n styles: keyframes.styles,\n next: cursor\n };\n return keyframes.name;\n }\n\n var serializedStyles = interpolation;\n\n if (serializedStyles.styles !== undefined) {\n var next = serializedStyles.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = serializedStyles.styles + \";\";\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n }\n\n break;\n }\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n var asString = interpolation;\n\n if (registered == null) {\n return asString;\n }\n\n var cached = registered[asString];\n return cached !== undefined ? cached : asString;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var key in obj) {\n var value = obj[key];\n\n if (typeof value !== 'object') {\n var asString = value;\n\n if (registered != null && registered[asString] !== undefined) {\n string += key + \"{\" + registered[asString] + \"}\";\n } else if (isProcessableValue(asString)) {\n string += processStyleName(key) + \":\" + processStyleValue(key, asString) + \";\";\n }\n } else {\n if (key === 'NO_COMPONENT_SELECTOR' && isDevelopment) {\n throw new Error(noComponentSelectorMessage);\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(key) + \":\" + processStyleValue(key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n\n string += key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;{]+)\\s*(;|$)/g; // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\nvar cursor;\nfunction serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n var asTemplateStringsArr = strings;\n\n styles += asTemplateStringsArr[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n\n if (stringMode) {\n var templateStringsArr = strings;\n\n styles += templateStringsArr[i];\n }\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n}\n\nexport { serializeStyles };\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport { murmur2 as default };\n","import * as React from 'react';\n\nvar syncFallback = function syncFallback(create) {\n return create();\n};\n\nvar useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;\nvar useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;\nvar useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;\n\nexport { useInsertionEffectAlwaysWithSyncFallback, useInsertionEffectWithLayoutFallback };\n","import * as React from 'react';\nimport { useContext, forwardRef } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\n\nvar isDevelopment = false;\n\nvar EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n return /*#__PURE__*/forwardRef(function (props, ref) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nvar ThemeContext = /* #__PURE__ */React.createContext({});\n\nvar useTheme = function useTheme() {\n return React.useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n return mergedTheme;\n }\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = React.useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n var WithTheme = /*#__PURE__*/React.forwardRef(function render(props, ref) {\n var theme = React.useContext(ThemeContext);\n return /*#__PURE__*/React.createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n });\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\n\nvar hasOwn = {}.hasOwnProperty;\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n\n var newProps = {};\n\n for (var _key in props) {\n if (hasOwn.call(props, _key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps[typePropName] = type; // Runtime labeling is an opt-in feature because:\n\n return newProps;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var WrappedComponent = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));\n\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var _key2 in props) {\n if (hasOwn.call(props, _key2) && _key2 !== 'css' && _key2 !== typePropName && (!isDevelopment )) {\n newProps[_key2] = props[_key2];\n }\n }\n\n newProps.className = className;\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof WrappedComponent === 'string'\n }), /*#__PURE__*/React.createElement(WrappedComponent, newProps));\n});\n\nvar Emotion$1 = Emotion;\n\nexport { CacheProvider as C, Emotion$1 as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwn as h, isDevelopment as i, useTheme as u, withEmotionCache as w };\n","'use client';\n\nimport * as React from 'react';\nimport { ThemeContext } from '@mui/styled-engine';\nfunction isObjectEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction useTheme(defaultTheme = null) {\n const contextTheme = React.useContext(ThemeContext);\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\nexport default useTheme;","'use client';\n\nimport createTheme from \"../createTheme/index.js\";\nimport useThemeWithoutDefault from \"../useThemeWithoutDefault/index.js\";\nexport const systemDefaultTheme = createTheme();\nfunction useTheme(defaultTheme = systemDefaultTheme) {\n return useThemeWithoutDefault(defaultTheme);\n}\nexport default useTheme;","function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {\n return Math.max(min, Math.min(val, max));\n}\nexport default clamp;","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport clamp from '@mui/utils/clamp';\n\n/**\n * Returns a number whose value is limited to the given range.\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clampWrapper(value, min = 0, max = 1) {\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);\n }\n }\n return clamp(value, min, max);\n}\n\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\nexport function hexToRgb(color) {\n color = color.slice(1);\n const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');\n let colors = color.match(re);\n if (colors && colors[0].length === 1) {\n colors = colors.map(n => n + n);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (color.length !== color.trim().length) {\n console.error(`MUI: The color: \"${color}\" is invalid. Make sure the color input doesn't contain leading/trailing space.`);\n }\n }\n return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', ')})` : '';\n}\nfunction intToHex(int) {\n const hex = int.toString(16);\n return hex.length === 1 ? `0${hex}` : hex;\n}\n\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\nexport function decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n const marker = color.indexOf('(');\n const type = color.substring(0, marker);\n if (!['rgb', 'rgba', 'hsl', 'hsla', 'color'].includes(type)) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Unsupported \\`${color}\\` color.\\n` + 'The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().' : _formatMuiErrorMessage(9, color));\n }\n let values = color.substring(marker + 1, color.length - 1);\n let colorSpace;\n if (type === 'color') {\n values = values.split(' ');\n colorSpace = values.shift();\n if (values.length === 4 && values[3].charAt(0) === '/') {\n values[3] = values[3].slice(1);\n }\n if (!['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].includes(colorSpace)) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: unsupported \\`${colorSpace}\\` color space.\\n` + 'The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.' : _formatMuiErrorMessage(10, colorSpace));\n }\n } else {\n values = values.split(',');\n }\n values = values.map(value => parseFloat(value));\n return {\n type,\n values,\n colorSpace\n };\n}\n\n/**\n * Returns a channel created from the input color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {string} - The channel for the color, that can be used in rgba or hsla colors\n */\nexport const colorChannel = color => {\n const decomposedColor = decomposeColor(color);\n return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.includes('hsl') && idx !== 0 ? `${val}%` : val).join(' ');\n};\nexport const private_safeColorChannel = (color, warning) => {\n try {\n return colorChannel(color);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n};\n\n/**\n * Converts a color object with type and values to a string.\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\nexport function recomposeColor(color) {\n const {\n type,\n colorSpace\n } = color;\n let {\n values\n } = color;\n if (type.includes('rgb')) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);\n } else if (type.includes('hsl')) {\n values[1] = `${values[1]}%`;\n values[2] = `${values[2]}%`;\n }\n if (type.includes('color')) {\n values = `${colorSpace} ${values.join(' ')}`;\n } else {\n values = `${values.join(', ')}`;\n }\n return `${type}(${values})`;\n}\n\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\nexport function rgbToHex(color) {\n // Idempotent\n if (color.startsWith('#')) {\n return color;\n }\n const {\n values\n } = decomposeColor(color);\n return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;\n}\n\n/**\n * Converts a color from hsl format to rgb format.\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\nexport function hslToRgb(color) {\n color = decomposeColor(color);\n const {\n values\n } = color;\n const h = values[0];\n const s = values[1] / 100;\n const l = values[2] / 100;\n const a = s * Math.min(l, 1 - l);\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n let type = 'rgb';\n const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n return recomposeColor({\n type,\n values: rgb\n });\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\nexport function getLuminance(color) {\n color = decomposeColor(color);\n let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(val => {\n if (color.type !== 'color') {\n val /= 255; // normalized\n }\n return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;\n });\n\n // Truncate at 3 digits\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\nexport function getContrastRatio(foreground, background) {\n const lumA = getLuminance(foreground);\n const lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n\n/**\n * Sets the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} value - value to set the alpha channel to in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function alpha(color, value) {\n color = decomposeColor(color);\n value = clampWrapper(value);\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n if (color.type === 'color') {\n color.values[3] = `/${value}`;\n } else {\n color.values[3] = value;\n }\n return recomposeColor(color);\n}\nexport function private_safeAlpha(color, value, warning) {\n try {\n return alpha(color, value);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darkens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.includes('hsl')) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.includes('rgb') || color.type.includes('color')) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeDarken(color, coefficient, warning) {\n try {\n return darken(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Lightens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.includes('hsl')) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.includes('rgb')) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n } else if (color.type.includes('color')) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (1 - color.values[i]) * coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeLighten(color, coefficient, warning) {\n try {\n return lighten(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function emphasize(color, coefficient = 0.15) {\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\nexport function private_safeEmphasize(color, coefficient, warning) {\n try {\n return emphasize(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Blend a transparent overlay color with a background color, resulting in a single\n * RGB color.\n * @param {string} background - CSS color\n * @param {string} overlay - CSS color\n * @param {number} opacity - Opacity multiplier in the range 0 - 1\n * @param {number} [gamma=1.0] - Gamma correction factor. For gamma-correct blending, 2.2 is usual.\n */\nexport function blend(background, overlay, opacity, gamma = 1.0) {\n const blendChannel = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma);\n const backgroundColor = decomposeColor(background);\n const overlayColor = decomposeColor(overlay);\n const rgb = [blendChannel(backgroundColor.values[0], overlayColor.values[0]), blendChannel(backgroundColor.values[1], overlayColor.values[1]), blendChannel(backgroundColor.values[2], overlayColor.values[2])];\n return recomposeColor({\n type: 'rgb',\n values: rgb\n });\n}","const common = {\n black: '#000',\n white: '#fff'\n};\nexport default common;","const grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#f5f5f5',\n A200: '#eeeeee',\n A400: '#bdbdbd',\n A700: '#616161'\n};\nexport default grey;","const purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\nexport default purple;","const red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nexport default red;","const orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nexport default orange;","const blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nexport default blue;","const lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\nexport default lightBlue;","const green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nexport default green;","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nimport deepmerge from '@mui/utils/deepmerge';\nimport { darken, getContrastRatio, lighten } from '@mui/system/colorManipulator';\nimport common from \"../colors/common.js\";\nimport grey from \"../colors/grey.js\";\nimport purple from \"../colors/purple.js\";\nimport red from \"../colors/red.js\";\nimport orange from \"../colors/orange.js\";\nimport blue from \"../colors/blue.js\";\nimport lightBlue from \"../colors/lightBlue.js\";\nimport green from \"../colors/green.js\";\nfunction getLight() {\n return {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.6)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: common.white,\n default: common.white\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n };\n}\nexport const light = getLight();\nfunction getDark() {\n return {\n text: {\n primary: common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: '#121212',\n default: '#121212'\n },\n action: {\n active: common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n };\n}\nexport const dark = getDark();\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n const tonalOffsetLight = tonalOffset.light || tonalOffset;\n const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = lighten(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = darken(intent.main, tonalOffsetDark);\n }\n }\n}\nfunction getDefaultPrimary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: blue[200],\n light: blue[50],\n dark: blue[400]\n };\n }\n return {\n main: blue[700],\n light: blue[400],\n dark: blue[800]\n };\n}\nfunction getDefaultSecondary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: purple[200],\n light: purple[50],\n dark: purple[400]\n };\n }\n return {\n main: purple[500],\n light: purple[300],\n dark: purple[700]\n };\n}\nfunction getDefaultError(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: red[500],\n light: red[300],\n dark: red[700]\n };\n }\n return {\n main: red[700],\n light: red[400],\n dark: red[800]\n };\n}\nfunction getDefaultInfo(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: lightBlue[400],\n light: lightBlue[300],\n dark: lightBlue[700]\n };\n }\n return {\n main: lightBlue[700],\n light: lightBlue[500],\n dark: lightBlue[900]\n };\n}\nfunction getDefaultSuccess(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: green[400],\n light: green[300],\n dark: green[700]\n };\n }\n return {\n main: green[800],\n light: green[500],\n dark: green[900]\n };\n}\nfunction getDefaultWarning(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: orange[400],\n light: orange[300],\n dark: orange[700]\n };\n }\n return {\n main: '#ed6c02',\n // closest to orange[800] that pass 3:1.\n light: orange[500],\n dark: orange[900]\n };\n}\nexport default function createPalette(palette) {\n const {\n mode = 'light',\n contrastThreshold = 3,\n tonalOffset = 0.2,\n ...other\n } = palette;\n const primary = palette.primary || getDefaultPrimary(mode);\n const secondary = palette.secondary || getDefaultSecondary(mode);\n const error = palette.error || getDefaultError(mode);\n const info = palette.info || getDefaultInfo(mode);\n const success = palette.success || getDefaultSuccess(mode);\n const warning = palette.warning || getDefaultWarning(mode);\n\n // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n function getContrastText(background) {\n const contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n if (process.env.NODE_ENV !== 'production') {\n const contrast = getContrastRatio(background, contrastText);\n if (contrast < 3) {\n console.error([`MUI: The contrast ratio of ${contrast}:1 for ${contrastText} on ${background}`, 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n return contrastText;\n }\n const augmentColor = ({\n color,\n name,\n mainShade = 500,\n lightShade = 300,\n darkShade = 700\n }) => {\n color = {\n ...color\n };\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n if (!color.hasOwnProperty('main')) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\\n` + `The color object needs to have a \\`main\\` property or a \\`${mainShade}\\` property.` : _formatMuiErrorMessage(11, name ? ` (${name})` : '', mainShade));\n }\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\\n` + `\\`color.main\\` should be a string, but \\`${JSON.stringify(color.main)}\\` was provided instead.\\n` + '\\n' + 'Did you intend to use one of the following approaches?\\n' + '\\n' + 'import { green } from \"@mui/material/colors\";\\n' + '\\n' + 'const theme1 = createTheme({ palette: {\\n' + ' primary: green,\\n' + '} });\\n' + '\\n' + 'const theme2 = createTheme({ palette: {\\n' + ' primary: { main: green[500] },\\n' + '} });' : _formatMuiErrorMessage(12, name ? ` (${name})` : '', JSON.stringify(color.main)));\n }\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n return color;\n };\n let modeHydrated;\n if (mode === 'light') {\n modeHydrated = getLight();\n } else if (mode === 'dark') {\n modeHydrated = getDark();\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!modeHydrated) {\n console.error(`MUI: The palette mode \\`${mode}\\` is not supported.`);\n }\n }\n const paletteOutput = deepmerge({\n // A collection of common colors.\n common: {\n ...common\n },\n // prevent mutable object.\n // The palette mode, can be light or dark.\n mode,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor({\n color: primary,\n name: 'primary'\n }),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor({\n color: secondary,\n name: 'secondary',\n mainShade: 'A400',\n lightShade: 'A200',\n darkShade: 'A700'\n }),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor({\n color: error,\n name: 'error'\n }),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor({\n color: warning,\n name: 'warning'\n }),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor({\n color: info,\n name: 'info'\n }),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor({\n color: success,\n name: 'success'\n }),\n // The grey colors.\n grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText,\n // Generate a rich color object.\n augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset,\n // The light and dark mode object.\n ...modeHydrated\n }, other);\n return paletteOutput;\n}","/**\n * The benefit of this function is to help developers get CSS var from theme without specifying the whole variable\n * and they does not need to remember the prefix (defined once).\n */\nexport default function createGetCssVar(prefix = '') {\n function appendVar(...vars) {\n if (!vars.length) {\n return '';\n }\n const value = vars[0];\n if (typeof value === 'string' && !value.match(/(#|\\(|\\)|(-?(\\d*\\.)?\\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\\d*\\.)?\\d+)$|(\\d+ \\d+ \\d+)/)) {\n return `, var(--${prefix ? `${prefix}-` : ''}${value}${appendVar(...vars.slice(1))})`;\n }\n return `, ${value}`;\n }\n\n // AdditionalVars makes `getCssVar` less strict, so it can be use like this `getCssVar('non-mui-variable')` without type error.\n const getCssVar = (field, ...fallbacks) => {\n return `var(--${prefix ? `${prefix}-` : ''}${field}${appendVar(...fallbacks)})`;\n };\n return getCssVar;\n}","export default function prepareTypographyVars(typography) {\n const vars = {};\n const entries = Object.entries(typography);\n entries.forEach(entry => {\n const [key, value] = entry;\n if (typeof value === 'object') {\n vars[key] = `${value.fontStyle ? `${value.fontStyle} ` : ''}${value.fontVariant ? `${value.fontVariant} ` : ''}${value.fontWeight ? `${value.fontWeight} ` : ''}${value.fontStretch ? `${value.fontStretch} ` : ''}${value.fontSize || ''}${value.lineHeight ? `/${value.lineHeight} ` : ''}${value.fontFamily || ''}`;\n }\n });\n return vars;\n}","/**\n * This function create an object from keys, value and then assign to target\n *\n * @param {Object} obj : the target object to be assigned\n * @param {string[]} keys\n * @param {string | number} value\n *\n * @example\n * const source = {}\n * assignNestedKeys(source, ['palette', 'primary'], 'var(--palette-primary)')\n * console.log(source) // { palette: { primary: 'var(--palette-primary)' } }\n *\n * @example\n * const source = { palette: { primary: 'var(--palette-primary)' } }\n * assignNestedKeys(source, ['palette', 'secondary'], 'var(--palette-secondary)')\n * console.log(source) // { palette: { primary: 'var(--palette-primary)', secondary: 'var(--palette-secondary)' } }\n */\nexport const assignNestedKeys = (obj, keys, value, arrayKeys = []) => {\n let temp = obj;\n keys.forEach((k, index) => {\n if (index === keys.length - 1) {\n if (Array.isArray(temp)) {\n temp[Number(k)] = value;\n } else if (temp && typeof temp === 'object') {\n temp[k] = value;\n }\n } else if (temp && typeof temp === 'object') {\n if (!temp[k]) {\n temp[k] = arrayKeys.includes(k) ? [] : {};\n }\n temp = temp[k];\n }\n });\n};\n\n/**\n *\n * @param {Object} obj : source object\n * @param {Function} callback : a function that will be called when\n * - the deepest key in source object is reached\n * - the value of the deepest key is NOT `undefined` | `null`\n *\n * @example\n * walkObjectDeep({ palette: { primary: { main: '#000000' } } }, console.log)\n * // ['palette', 'primary', 'main'] '#000000'\n */\nexport const walkObjectDeep = (obj, callback, shouldSkipPaths) => {\n function recurse(object, parentKeys = [], arrayKeys = []) {\n Object.entries(object).forEach(([key, value]) => {\n if (!shouldSkipPaths || shouldSkipPaths && !shouldSkipPaths([...parentKeys, key])) {\n if (value !== undefined && value !== null) {\n if (typeof value === 'object' && Object.keys(value).length > 0) {\n recurse(value, [...parentKeys, key], Array.isArray(value) ? [...arrayKeys, key] : arrayKeys);\n } else {\n callback([...parentKeys, key], value, arrayKeys);\n }\n }\n }\n });\n }\n recurse(obj);\n};\nconst getCssValue = (keys, value) => {\n if (typeof value === 'number') {\n if (['lineHeight', 'fontWeight', 'opacity', 'zIndex'].some(prop => keys.includes(prop))) {\n // CSS property that are unitless\n return value;\n }\n const lastKey = keys[keys.length - 1];\n if (lastKey.toLowerCase().includes('opacity')) {\n // opacity values are unitless\n return value;\n }\n return `${value}px`;\n }\n return value;\n};\n\n/**\n * a function that parse theme and return { css, vars }\n *\n * @param {Object} theme\n * @param {{\n * prefix?: string,\n * shouldSkipGeneratingVar?: (objectPathKeys: Array, value: string | number) => boolean\n * }} options.\n * `prefix`: The prefix of the generated CSS variables. This function does not change the value.\n *\n * @returns {{ css: Object, vars: Object }} `css` is the stylesheet, `vars` is an object to get css variable (same structure as theme).\n *\n * @example\n * const { css, vars } = parser({\n * fontSize: 12,\n * lineHeight: 1.2,\n * palette: { primary: { 500: 'var(--color)' } }\n * }, { prefix: 'foo' })\n *\n * console.log(css) // { '--foo-fontSize': '12px', '--foo-lineHeight': 1.2, '--foo-palette-primary-500': 'var(--color)' }\n * console.log(vars) // { fontSize: 'var(--foo-fontSize)', lineHeight: 'var(--foo-lineHeight)', palette: { primary: { 500: 'var(--foo-palette-primary-500)' } } }\n */\nexport default function cssVarsParser(theme, options) {\n const {\n prefix,\n shouldSkipGeneratingVar\n } = options || {};\n const css = {};\n const vars = {};\n const varsWithDefaults = {};\n walkObjectDeep(theme, (keys, value, arrayKeys) => {\n if (typeof value === 'string' || typeof value === 'number') {\n if (!shouldSkipGeneratingVar || !shouldSkipGeneratingVar(keys, value)) {\n // only create css & var if `shouldSkipGeneratingVar` return false\n const cssVar = `--${prefix ? `${prefix}-` : ''}${keys.join('-')}`;\n const resolvedValue = getCssValue(keys, value);\n Object.assign(css, {\n [cssVar]: resolvedValue\n });\n assignNestedKeys(vars, keys, `var(${cssVar})`, arrayKeys);\n assignNestedKeys(varsWithDefaults, keys, `var(${cssVar}, ${resolvedValue})`, arrayKeys);\n }\n }\n }, keys => keys[0] === 'vars' // skip 'vars/*' paths\n );\n return {\n css,\n vars,\n varsWithDefaults\n };\n}","import deepmerge from '@mui/utils/deepmerge';\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst caseAllCaps = {\n textTransform: 'uppercase'\n};\nconst defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n\n/**\n * @see @link{https://m2.material.io/design/typography/the-type-system.html}\n * @see @link{https://m2.material.io/design/typography/understanding-typography.html}\n */\nexport default function createTypography(palette, typography) {\n const {\n fontFamily = defaultFontFamily,\n // The default font size of the Material Specification.\n fontSize = 14,\n // px\n fontWeightLight = 300,\n fontWeightRegular = 400,\n fontWeightMedium = 500,\n fontWeightBold = 700,\n // Tell MUI what's the font-size on the html element.\n // 16px is the default font-size used by browsers.\n htmlFontSize = 16,\n // Apply the CSS properties to all the variants.\n allVariants,\n pxToRem: pxToRem2,\n ...other\n } = typeof typography === 'function' ? typography(palette) : typography;\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('MUI: `fontSize` is required to be a number.');\n }\n if (typeof htmlFontSize !== 'number') {\n console.error('MUI: `htmlFontSize` is required to be a number.');\n }\n }\n const coef = fontSize / 14;\n const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);\n const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => ({\n fontFamily,\n fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight,\n // The letter spacing was designed for the Roboto font-family. Using the same letter-spacing\n // across font-families can cause issues with the kerning.\n ...(fontFamily === defaultFontFamily ? {\n letterSpacing: `${round(letterSpacing / size)}em`\n } : {}),\n ...casing,\n ...allVariants\n });\n const variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),\n // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types.\n inherit: {\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n fontSize: 'inherit',\n lineHeight: 'inherit',\n letterSpacing: 'inherit'\n }\n };\n return deepmerge({\n htmlFontSize,\n pxToRem,\n fontFamily,\n fontSize,\n fontWeightLight,\n fontWeightRegular,\n fontWeightMedium,\n fontWeightBold,\n ...variants\n }, other, {\n clone: false // No need to clone deep\n });\n}","const shadowKeyUmbraOpacity = 0.2;\nconst shadowKeyPenumbraOpacity = 0.14;\nconst shadowAmbientShadowOpacity = 0.12;\nfunction createShadow(...px) {\n return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(',');\n}\n\n// Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\nconst shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nexport default shadows;","// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nexport const easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n};\n\n// Follow https://m2.material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\nexport const duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\nfunction formatMs(milliseconds) {\n return `${Math.round(milliseconds)}ms`;\n}\nfunction getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n const constant = height / 36;\n\n // https://www.desmos.com/calculator/vbrp3ggqet\n return Math.min(Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10), 3000);\n}\nexport default function createTransitions(inputTransitions) {\n const mergedEasing = {\n ...easing,\n ...inputTransitions.easing\n };\n const mergedDuration = {\n ...duration,\n ...inputTransitions.duration\n };\n const create = (props = ['all'], options = {}) => {\n const {\n duration: durationOption = mergedDuration.standard,\n easing: easingOption = mergedEasing.easeInOut,\n delay = 0,\n ...other\n } = options;\n if (process.env.NODE_ENV !== 'production') {\n const isString = value => typeof value === 'string';\n const isNumber = value => !Number.isNaN(parseFloat(value));\n if (!isString(props) && !Array.isArray(props)) {\n console.error('MUI: Argument \"props\" must be a string or Array.');\n }\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(`MUI: Argument \"duration\" must be a number or a string but found ${durationOption}.`);\n }\n if (!isString(easingOption)) {\n console.error('MUI: Argument \"easing\" must be a string.');\n }\n if (!isNumber(delay) && !isString(delay)) {\n console.error('MUI: Argument \"delay\" must be a number or a string.');\n }\n if (typeof options !== 'object') {\n console.error(['MUI: Secong argument of transition.create must be an object.', \"Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`\"].join('\\n'));\n }\n if (Object.keys(other).length !== 0) {\n console.error(`MUI: Unrecognized argument(s) [${Object.keys(other).join(',')}].`);\n }\n }\n return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');\n };\n return {\n getAutoHeightDuration,\n create,\n ...inputTransitions,\n easing: mergedEasing,\n duration: mergedDuration\n };\n}","// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nconst zIndex = {\n mobileStepper: 1000,\n fab: 1050,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nexport default zIndex;","/* eslint-disable import/prefer-default-export */\nimport { isPlainObject } from '@mui/utils/deepmerge';\nfunction isSerializable(val) {\n return isPlainObject(val) || typeof val === 'undefined' || typeof val === 'string' || typeof val === 'boolean' || typeof val === 'number' || Array.isArray(val);\n}\n\n/**\n * `baseTheme` usually comes from `createTheme()` or `extendTheme()`.\n *\n * This function is intended to be used with zero-runtime CSS-in-JS like Pigment CSS\n * For example, in a Next.js project:\n *\n * ```js\n * // next.config.js\n * const { extendTheme } = require('@mui/material/styles');\n *\n * const theme = extendTheme();\n * // `.toRuntimeSource` is Pigment CSS specific to create a theme that is available at runtime.\n * theme.toRuntimeSource = stringifyTheme;\n *\n * module.exports = withPigment({\n * theme,\n * });\n * ```\n */\nexport function stringifyTheme(baseTheme = {}) {\n const serializableTheme = {\n ...baseTheme\n };\n function serializeTheme(object) {\n const array = Object.entries(object);\n // eslint-disable-next-line no-plusplus\n for (let index = 0; index < array.length; index++) {\n const [key, value] = array[index];\n if (!isSerializable(value) || key.startsWith('unstable_')) {\n delete object[key];\n } else if (isPlainObject(value)) {\n object[key] = {\n ...value\n };\n serializeTheme(object[key]);\n }\n }\n }\n serializeTheme(serializableTheme);\n return `import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';\n\nconst theme = ${JSON.stringify(serializableTheme, null, 2)};\n\ntheme.breakpoints = createBreakpoints(theme.breakpoints || {});\ntheme.transitions = createTransitions(theme.transitions || {});\n\nexport default theme;`;\n}","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nimport deepmerge from '@mui/utils/deepmerge';\nimport styleFunctionSx, { unstable_defaultSxConfig as defaultSxConfig } from '@mui/system/styleFunctionSx';\nimport systemCreateTheme from '@mui/system/createTheme';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport createMixins from \"./createMixins.js\";\nimport createPalette from \"./createPalette.js\";\nimport createTypography from \"./createTypography.js\";\nimport shadows from \"./shadows.js\";\nimport createTransitions from \"./createTransitions.js\";\nimport zIndex from \"./zIndex.js\";\nimport { stringifyTheme } from \"./stringifyTheme.js\";\nfunction createThemeNoVars(options = {}, ...args) {\n const {\n breakpoints: breakpointsInput,\n mixins: mixinsInput = {},\n spacing: spacingInput,\n palette: paletteInput = {},\n transitions: transitionsInput = {},\n typography: typographyInput = {},\n shape: shapeInput,\n ...other\n } = options;\n if (options.vars &&\n // The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.\n // `generateThemeVars` is the closest identifier for checking that the `options` is a result of `createTheme` with CSS variables so that user can create new theme for nested ThemeProvider.\n options.generateThemeVars === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI: `vars` is a private field used for CSS variables support.\\n' + 'Please use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : _formatMuiErrorMessage(20));\n }\n const palette = createPalette(paletteInput);\n const systemTheme = systemCreateTheme(options);\n let muiTheme = deepmerge(systemTheme, {\n mixins: createMixins(systemTheme.breakpoints, mixinsInput),\n palette,\n // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.\n shadows: shadows.slice(),\n typography: createTypography(palette, typographyInput),\n transitions: createTransitions(transitionsInput),\n zIndex: {\n ...zIndex\n }\n });\n muiTheme = deepmerge(muiTheme, other);\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n if (process.env.NODE_ENV !== 'production') {\n // TODO v6: Refactor to use globalStateClassesMapping from @mui/utils once `readOnly` state class is used in Rating component.\n const stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];\n const traverse = (node, component) => {\n let key;\n\n // eslint-disable-next-line guard-for-in\n for (key in node) {\n const child = node[key];\n if (stateClasses.includes(key) && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n const stateClass = generateUtilityClass('', key);\n console.error([`MUI: The \\`${component}\\` component increases ` + `the CSS specificity of the \\`${key}\\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({\n root: {\n [`&.${stateClass}`]: child\n }\n }, null, 2), '', 'https://mui.com/r/state-classes-guide'].join('\\n'));\n }\n // Remove the style to prevent global conflicts.\n node[key] = {};\n }\n }\n };\n Object.keys(muiTheme.components).forEach(component => {\n const styleOverrides = muiTheme.components[component].styleOverrides;\n if (styleOverrides && component.startsWith('Mui')) {\n traverse(styleOverrides, component);\n }\n });\n }\n muiTheme.unstable_sxConfig = {\n ...defaultSxConfig,\n ...other?.unstable_sxConfig\n };\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n muiTheme.toRuntimeSource = stringifyTheme; // for Pigment CSS integration\n\n return muiTheme;\n}\nlet warnedOnce = false;\nexport function createMuiTheme(...args) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['MUI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@mui/material/styles'`\"].join('\\n'));\n }\n }\n return createThemeNoVars(...args);\n}\nexport default createThemeNoVars;","export default function createMixins(breakpoints, mixins) {\n return {\n toolbar: {\n minHeight: 56,\n [breakpoints.up('xs')]: {\n '@media (orientation: landscape)': {\n minHeight: 48\n }\n },\n [breakpoints.up('sm')]: {\n minHeight: 64\n }\n },\n ...mixins\n };\n}","// Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61\nexport default function getOverlayAlpha(elevation) {\n let alphaValue;\n if (elevation < 1) {\n alphaValue = 5.11916 * elevation ** 2;\n } else {\n alphaValue = 4.5 * Math.log(elevation + 1) + 2;\n }\n return Math.round(alphaValue * 10) / 1000;\n}","import createPalette from \"./createPalette.js\";\nimport getOverlayAlpha from \"./getOverlayAlpha.js\";\nconst defaultDarkOverlays = [...Array(25)].map((_, index) => {\n if (index === 0) {\n return 'none';\n }\n const overlay = getOverlayAlpha(index);\n return `linear-gradient(rgba(255 255 255 / ${overlay}), rgba(255 255 255 / ${overlay}))`;\n});\nexport function getOpacity(mode) {\n return {\n inputPlaceholder: mode === 'dark' ? 0.5 : 0.42,\n inputUnderline: mode === 'dark' ? 0.7 : 0.42,\n switchTrackDisabled: mode === 'dark' ? 0.2 : 0.12,\n switchTrack: mode === 'dark' ? 0.3 : 0.38\n };\n}\nexport function getOverlays(mode) {\n return mode === 'dark' ? defaultDarkOverlays : [];\n}\nexport default function createColorScheme(options) {\n const {\n palette: paletteInput = {\n mode: 'light'\n },\n // need to cast to avoid module augmentation test\n opacity,\n overlays,\n ...rest\n } = options;\n const palette = createPalette(paletteInput);\n return {\n palette,\n opacity: {\n ...getOpacity(palette.mode),\n ...opacity\n },\n overlays: overlays || getOverlays(palette.mode),\n ...rest\n };\n}","export default function shouldSkipGeneratingVar(keys) {\n return !!keys[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||\n // ends with sxConfig\n keys[0] === 'palette' && !!keys[1]?.match(/(mode|contrastThreshold|tonalOffset)/);\n}","/**\n * @internal These variables should not appear in the :root stylesheet when the `defaultColorScheme=\"dark\"`\n */\nconst excludeVariablesFromRoot = cssVarPrefix => [...[...Array(25)].map((_, index) => `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}overlays-${index}`), `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkBg`, `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkColor`];\nexport default excludeVariablesFromRoot;","import excludeVariablesFromRoot from \"./excludeVariablesFromRoot.js\";\nexport default theme => (colorScheme, css) => {\n const root = theme.rootSelector || ':root';\n const selector = theme.colorSchemeSelector;\n let rule = selector;\n if (selector === 'class') {\n rule = '.%s';\n }\n if (selector === 'data') {\n rule = '[data-%s]';\n }\n if (selector?.startsWith('data-') && !selector.includes('%s')) {\n // 'data-mui-color-scheme' -> '[data-mui-color-scheme=\"%s\"]'\n rule = `[${selector}=\"%s\"]`;\n }\n if (theme.defaultColorScheme === colorScheme) {\n if (colorScheme === 'dark') {\n const excludedVariables = {};\n excludeVariablesFromRoot(theme.cssVarPrefix).forEach(cssVar => {\n excludedVariables[cssVar] = css[cssVar];\n delete css[cssVar];\n });\n if (rule === 'media') {\n return {\n [root]: css,\n [`@media (prefers-color-scheme: dark)`]: {\n [root]: excludedVariables\n }\n };\n }\n if (rule) {\n return {\n [rule.replace('%s', colorScheme)]: excludedVariables,\n [`${root}, ${rule.replace('%s', colorScheme)}`]: css\n };\n }\n return {\n [root]: {\n ...css,\n ...excludedVariables\n }\n };\n }\n if (rule && rule !== 'media') {\n return `${root}, ${rule.replace('%s', String(colorScheme))}`;\n }\n } else if (colorScheme) {\n if (rule === 'media') {\n return {\n [`@media (prefers-color-scheme: ${String(colorScheme)})`]: {\n [root]: css\n }\n };\n }\n if (rule) {\n return rule.replace('%s', String(colorScheme));\n }\n }\n return root;\n};","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nimport deepmerge from '@mui/utils/deepmerge';\nimport { unstable_createGetCssVar as systemCreateGetCssVar, createSpacing } from '@mui/system';\nimport { createUnarySpacing } from '@mui/system/spacing';\nimport { prepareCssVars, prepareTypographyVars, createGetColorSchemeSelector } from '@mui/system/cssVars';\nimport styleFunctionSx, { unstable_defaultSxConfig as defaultSxConfig } from '@mui/system/styleFunctionSx';\nimport { private_safeColorChannel as safeColorChannel, private_safeAlpha as safeAlpha, private_safeDarken as safeDarken, private_safeLighten as safeLighten, private_safeEmphasize as safeEmphasize, hslToRgb } from '@mui/system/colorManipulator';\nimport createThemeNoVars from \"./createThemeNoVars.js\";\nimport createColorScheme, { getOpacity, getOverlays } from \"./createColorScheme.js\";\nimport defaultShouldSkipGeneratingVar from \"./shouldSkipGeneratingVar.js\";\nimport defaultGetSelector from \"./createGetSelector.js\";\nimport { stringifyTheme } from \"./stringifyTheme.js\";\nfunction assignNode(obj, keys) {\n keys.forEach(k => {\n if (!obj[k]) {\n obj[k] = {};\n }\n });\n}\nfunction setColor(obj, key, defaultValue) {\n if (!obj[key] && defaultValue) {\n obj[key] = defaultValue;\n }\n}\nfunction toRgb(color) {\n if (typeof color !== 'string' || !color.startsWith('hsl')) {\n return color;\n }\n return hslToRgb(color);\n}\nfunction setColorChannel(obj, key) {\n if (!(`${key}Channel` in obj)) {\n // custom channel token is not provided, generate one.\n // if channel token can't be generated, show a warning.\n obj[`${key}Channel`] = safeColorChannel(toRgb(obj[key]), `MUI: Can't create \\`palette.${key}Channel\\` because \\`palette.${key}\\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` + '\\n' + `To suppress this warning, you need to explicitly provide the \\`palette.${key}Channel\\` as a string (in rgb format, for example \"12 12 12\") or undefined if you want to remove the channel token.`);\n }\n}\nfunction getSpacingVal(spacingInput) {\n if (typeof spacingInput === 'number') {\n return `${spacingInput}px`;\n }\n if (typeof spacingInput === 'string' || typeof spacingInput === 'function' || Array.isArray(spacingInput)) {\n return spacingInput;\n }\n return '8px';\n}\nconst silent = fn => {\n try {\n return fn();\n } catch (error) {\n // ignore error\n }\n return undefined;\n};\nexport const createGetCssVar = (cssVarPrefix = 'mui') => systemCreateGetCssVar(cssVarPrefix);\nfunction attachColorScheme(colorSchemes, scheme, restTheme, colorScheme) {\n if (!scheme) {\n return undefined;\n }\n scheme = scheme === true ? {} : scheme;\n const mode = colorScheme === 'dark' ? 'dark' : 'light';\n if (!restTheme) {\n colorSchemes[colorScheme] = createColorScheme({\n ...scheme,\n palette: {\n mode,\n ...scheme?.palette\n }\n });\n return undefined;\n }\n const {\n palette,\n ...muiTheme\n } = createThemeNoVars({\n ...restTheme,\n palette: {\n mode,\n ...scheme?.palette\n }\n });\n colorSchemes[colorScheme] = {\n ...scheme,\n palette,\n opacity: {\n ...getOpacity(mode),\n ...scheme?.opacity\n },\n overlays: scheme?.overlays || getOverlays(mode)\n };\n return muiTheme;\n}\n\n/**\n * A default `createThemeWithVars` comes with a single color scheme, either `light` or `dark` based on the `defaultColorScheme`.\n * This is better suited for apps that only need a single color scheme.\n *\n * To enable built-in `light` and `dark` color schemes, either:\n * 1. provide a `colorSchemeSelector` to define how the color schemes will change.\n * 2. provide `colorSchemes.dark` will set `colorSchemeSelector: 'media'` by default.\n */\nexport default function createThemeWithVars(options = {}, ...args) {\n const {\n colorSchemes: colorSchemesInput = {\n light: true\n },\n defaultColorScheme: defaultColorSchemeInput,\n disableCssColorScheme = false,\n cssVarPrefix = 'mui',\n shouldSkipGeneratingVar = defaultShouldSkipGeneratingVar,\n colorSchemeSelector: selector = colorSchemesInput.light && colorSchemesInput.dark ? 'media' : undefined,\n rootSelector = ':root',\n ...input\n } = options;\n const firstColorScheme = Object.keys(colorSchemesInput)[0];\n const defaultColorScheme = defaultColorSchemeInput || (colorSchemesInput.light && firstColorScheme !== 'light' ? 'light' : firstColorScheme);\n const getCssVar = createGetCssVar(cssVarPrefix);\n const {\n [defaultColorScheme]: defaultSchemeInput,\n light: builtInLight,\n dark: builtInDark,\n ...customColorSchemes\n } = colorSchemesInput;\n const colorSchemes = {\n ...customColorSchemes\n };\n let defaultScheme = defaultSchemeInput;\n\n // For built-in light and dark color schemes, ensure that the value is valid if they are the default color scheme.\n if (defaultColorScheme === 'dark' && !('dark' in colorSchemesInput) || defaultColorScheme === 'light' && !('light' in colorSchemesInput)) {\n defaultScheme = true;\n }\n if (!defaultScheme) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The \\`colorSchemes.${defaultColorScheme}\\` option is either missing or invalid.` : _formatMuiErrorMessage(21, defaultColorScheme));\n }\n\n // Create the palette for the default color scheme, either `light`, `dark`, or custom color scheme.\n const muiTheme = attachColorScheme(colorSchemes, defaultScheme, input, defaultColorScheme);\n if (builtInLight && !colorSchemes.light) {\n attachColorScheme(colorSchemes, builtInLight, undefined, 'light');\n }\n if (builtInDark && !colorSchemes.dark) {\n attachColorScheme(colorSchemes, builtInDark, undefined, 'dark');\n }\n let theme = {\n defaultColorScheme,\n ...muiTheme,\n cssVarPrefix,\n colorSchemeSelector: selector,\n rootSelector,\n getCssVar,\n colorSchemes,\n font: {\n ...prepareTypographyVars(muiTheme.typography),\n ...muiTheme.font\n },\n spacing: getSpacingVal(input.spacing)\n };\n Object.keys(theme.colorSchemes).forEach(key => {\n const palette = theme.colorSchemes[key].palette;\n const setCssVarColor = cssVar => {\n const tokens = cssVar.split('-');\n const color = tokens[1];\n const colorToken = tokens[2];\n return getCssVar(cssVar, palette[color][colorToken]);\n };\n\n // attach black & white channels to common node\n if (palette.mode === 'light') {\n setColor(palette.common, 'background', '#fff');\n setColor(palette.common, 'onBackground', '#000');\n }\n if (palette.mode === 'dark') {\n setColor(palette.common, 'background', '#000');\n setColor(palette.common, 'onBackground', '#fff');\n }\n\n // assign component variables\n assignNode(palette, ['Alert', 'AppBar', 'Avatar', 'Button', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);\n if (palette.mode === 'light') {\n setColor(palette.Alert, 'errorColor', safeDarken(palette.error.light, 0.6));\n setColor(palette.Alert, 'infoColor', safeDarken(palette.info.light, 0.6));\n setColor(palette.Alert, 'successColor', safeDarken(palette.success.light, 0.6));\n setColor(palette.Alert, 'warningColor', safeDarken(palette.warning.light, 0.6));\n setColor(palette.Alert, 'errorFilledBg', setCssVarColor('palette-error-main'));\n setColor(palette.Alert, 'infoFilledBg', setCssVarColor('palette-info-main'));\n setColor(palette.Alert, 'successFilledBg', setCssVarColor('palette-success-main'));\n setColor(palette.Alert, 'warningFilledBg', setCssVarColor('palette-warning-main'));\n setColor(palette.Alert, 'errorFilledColor', silent(() => palette.getContrastText(palette.error.main)));\n setColor(palette.Alert, 'infoFilledColor', silent(() => palette.getContrastText(palette.info.main)));\n setColor(palette.Alert, 'successFilledColor', silent(() => palette.getContrastText(palette.success.main)));\n setColor(palette.Alert, 'warningFilledColor', silent(() => palette.getContrastText(palette.warning.main)));\n setColor(palette.Alert, 'errorStandardBg', safeLighten(palette.error.light, 0.9));\n setColor(palette.Alert, 'infoStandardBg', safeLighten(palette.info.light, 0.9));\n setColor(palette.Alert, 'successStandardBg', safeLighten(palette.success.light, 0.9));\n setColor(palette.Alert, 'warningStandardBg', safeLighten(palette.warning.light, 0.9));\n setColor(palette.Alert, 'errorIconColor', setCssVarColor('palette-error-main'));\n setColor(palette.Alert, 'infoIconColor', setCssVarColor('palette-info-main'));\n setColor(palette.Alert, 'successIconColor', setCssVarColor('palette-success-main'));\n setColor(palette.Alert, 'warningIconColor', setCssVarColor('palette-warning-main'));\n setColor(palette.AppBar, 'defaultBg', setCssVarColor('palette-grey-100'));\n setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-400'));\n setColor(palette.Button, 'inheritContainedBg', setCssVarColor('palette-grey-300'));\n setColor(palette.Button, 'inheritContainedHoverBg', setCssVarColor('palette-grey-A100'));\n setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-400'));\n setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-700'));\n setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-700'));\n setColor(palette.FilledInput, 'bg', 'rgba(0, 0, 0, 0.06)');\n setColor(palette.FilledInput, 'hoverBg', 'rgba(0, 0, 0, 0.09)');\n setColor(palette.FilledInput, 'disabledBg', 'rgba(0, 0, 0, 0.12)');\n setColor(palette.LinearProgress, 'primaryBg', safeLighten(palette.primary.main, 0.62));\n setColor(palette.LinearProgress, 'secondaryBg', safeLighten(palette.secondary.main, 0.62));\n setColor(palette.LinearProgress, 'errorBg', safeLighten(palette.error.main, 0.62));\n setColor(palette.LinearProgress, 'infoBg', safeLighten(palette.info.main, 0.62));\n setColor(palette.LinearProgress, 'successBg', safeLighten(palette.success.main, 0.62));\n setColor(palette.LinearProgress, 'warningBg', safeLighten(palette.warning.main, 0.62));\n setColor(palette.Skeleton, 'bg', `rgba(${setCssVarColor('palette-text-primaryChannel')} / 0.11)`);\n setColor(palette.Slider, 'primaryTrack', safeLighten(palette.primary.main, 0.62));\n setColor(palette.Slider, 'secondaryTrack', safeLighten(palette.secondary.main, 0.62));\n setColor(palette.Slider, 'errorTrack', safeLighten(palette.error.main, 0.62));\n setColor(palette.Slider, 'infoTrack', safeLighten(palette.info.main, 0.62));\n setColor(palette.Slider, 'successTrack', safeLighten(palette.success.main, 0.62));\n setColor(palette.Slider, 'warningTrack', safeLighten(palette.warning.main, 0.62));\n const snackbarContentBackground = safeEmphasize(palette.background.default, 0.8);\n setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);\n setColor(palette.SnackbarContent, 'color', silent(() => palette.getContrastText(snackbarContentBackground)));\n setColor(palette.SpeedDialAction, 'fabHoverBg', safeEmphasize(palette.background.paper, 0.15));\n setColor(palette.StepConnector, 'border', setCssVarColor('palette-grey-400'));\n setColor(palette.StepContent, 'border', setCssVarColor('palette-grey-400'));\n setColor(palette.Switch, 'defaultColor', setCssVarColor('palette-common-white'));\n setColor(palette.Switch, 'defaultDisabledColor', setCssVarColor('palette-grey-100'));\n setColor(palette.Switch, 'primaryDisabledColor', safeLighten(palette.primary.main, 0.62));\n setColor(palette.Switch, 'secondaryDisabledColor', safeLighten(palette.secondary.main, 0.62));\n setColor(palette.Switch, 'errorDisabledColor', safeLighten(palette.error.main, 0.62));\n setColor(palette.Switch, 'infoDisabledColor', safeLighten(palette.info.main, 0.62));\n setColor(palette.Switch, 'successDisabledColor', safeLighten(palette.success.main, 0.62));\n setColor(palette.Switch, 'warningDisabledColor', safeLighten(palette.warning.main, 0.62));\n setColor(palette.TableCell, 'border', safeLighten(safeAlpha(palette.divider, 1), 0.88));\n setColor(palette.Tooltip, 'bg', safeAlpha(palette.grey[700], 0.92));\n }\n if (palette.mode === 'dark') {\n setColor(palette.Alert, 'errorColor', safeLighten(palette.error.light, 0.6));\n setColor(palette.Alert, 'infoColor', safeLighten(palette.info.light, 0.6));\n setColor(palette.Alert, 'successColor', safeLighten(palette.success.light, 0.6));\n setColor(palette.Alert, 'warningColor', safeLighten(palette.warning.light, 0.6));\n setColor(palette.Alert, 'errorFilledBg', setCssVarColor('palette-error-dark'));\n setColor(palette.Alert, 'infoFilledBg', setCssVarColor('palette-info-dark'));\n setColor(palette.Alert, 'successFilledBg', setCssVarColor('palette-success-dark'));\n setColor(palette.Alert, 'warningFilledBg', setCssVarColor('palette-warning-dark'));\n setColor(palette.Alert, 'errorFilledColor', silent(() => palette.getContrastText(palette.error.dark)));\n setColor(palette.Alert, 'infoFilledColor', silent(() => palette.getContrastText(palette.info.dark)));\n setColor(palette.Alert, 'successFilledColor', silent(() => palette.getContrastText(palette.success.dark)));\n setColor(palette.Alert, 'warningFilledColor', silent(() => palette.getContrastText(palette.warning.dark)));\n setColor(palette.Alert, 'errorStandardBg', safeDarken(palette.error.light, 0.9));\n setColor(palette.Alert, 'infoStandardBg', safeDarken(palette.info.light, 0.9));\n setColor(palette.Alert, 'successStandardBg', safeDarken(palette.success.light, 0.9));\n setColor(palette.Alert, 'warningStandardBg', safeDarken(palette.warning.light, 0.9));\n setColor(palette.Alert, 'errorIconColor', setCssVarColor('palette-error-main'));\n setColor(palette.Alert, 'infoIconColor', setCssVarColor('palette-info-main'));\n setColor(palette.Alert, 'successIconColor', setCssVarColor('palette-success-main'));\n setColor(palette.Alert, 'warningIconColor', setCssVarColor('palette-warning-main'));\n setColor(palette.AppBar, 'defaultBg', setCssVarColor('palette-grey-900'));\n setColor(palette.AppBar, 'darkBg', setCssVarColor('palette-background-paper')); // specific for dark mode\n setColor(palette.AppBar, 'darkColor', setCssVarColor('palette-text-primary')); // specific for dark mode\n setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-600'));\n setColor(palette.Button, 'inheritContainedBg', setCssVarColor('palette-grey-800'));\n setColor(palette.Button, 'inheritContainedHoverBg', setCssVarColor('palette-grey-700'));\n setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-700'));\n setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-300'));\n setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-300'));\n setColor(palette.FilledInput, 'bg', 'rgba(255, 255, 255, 0.09)');\n setColor(palette.FilledInput, 'hoverBg', 'rgba(255, 255, 255, 0.13)');\n setColor(palette.FilledInput, 'disabledBg', 'rgba(255, 255, 255, 0.12)');\n setColor(palette.LinearProgress, 'primaryBg', safeDarken(palette.primary.main, 0.5));\n setColor(palette.LinearProgress, 'secondaryBg', safeDarken(palette.secondary.main, 0.5));\n setColor(palette.LinearProgress, 'errorBg', safeDarken(palette.error.main, 0.5));\n setColor(palette.LinearProgress, 'infoBg', safeDarken(palette.info.main, 0.5));\n setColor(palette.LinearProgress, 'successBg', safeDarken(palette.success.main, 0.5));\n setColor(palette.LinearProgress, 'warningBg', safeDarken(palette.warning.main, 0.5));\n setColor(palette.Skeleton, 'bg', `rgba(${setCssVarColor('palette-text-primaryChannel')} / 0.13)`);\n setColor(palette.Slider, 'primaryTrack', safeDarken(palette.primary.main, 0.5));\n setColor(palette.Slider, 'secondaryTrack', safeDarken(palette.secondary.main, 0.5));\n setColor(palette.Slider, 'errorTrack', safeDarken(palette.error.main, 0.5));\n setColor(palette.Slider, 'infoTrack', safeDarken(palette.info.main, 0.5));\n setColor(palette.Slider, 'successTrack', safeDarken(palette.success.main, 0.5));\n setColor(palette.Slider, 'warningTrack', safeDarken(palette.warning.main, 0.5));\n const snackbarContentBackground = safeEmphasize(palette.background.default, 0.98);\n setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);\n setColor(palette.SnackbarContent, 'color', silent(() => palette.getContrastText(snackbarContentBackground)));\n setColor(palette.SpeedDialAction, 'fabHoverBg', safeEmphasize(palette.background.paper, 0.15));\n setColor(palette.StepConnector, 'border', setCssVarColor('palette-grey-600'));\n setColor(palette.StepContent, 'border', setCssVarColor('palette-grey-600'));\n setColor(palette.Switch, 'defaultColor', setCssVarColor('palette-grey-300'));\n setColor(palette.Switch, 'defaultDisabledColor', setCssVarColor('palette-grey-600'));\n setColor(palette.Switch, 'primaryDisabledColor', safeDarken(palette.primary.main, 0.55));\n setColor(palette.Switch, 'secondaryDisabledColor', safeDarken(palette.secondary.main, 0.55));\n setColor(palette.Switch, 'errorDisabledColor', safeDarken(palette.error.main, 0.55));\n setColor(palette.Switch, 'infoDisabledColor', safeDarken(palette.info.main, 0.55));\n setColor(palette.Switch, 'successDisabledColor', safeDarken(palette.success.main, 0.55));\n setColor(palette.Switch, 'warningDisabledColor', safeDarken(palette.warning.main, 0.55));\n setColor(palette.TableCell, 'border', safeDarken(safeAlpha(palette.divider, 1), 0.68));\n setColor(palette.Tooltip, 'bg', safeAlpha(palette.grey[700], 0.92));\n }\n\n // MUI X - DataGrid needs this token.\n setColorChannel(palette.background, 'default');\n\n // added for consistency with the `background.default` token\n setColorChannel(palette.background, 'paper');\n setColorChannel(palette.common, 'background');\n setColorChannel(palette.common, 'onBackground');\n setColorChannel(palette, 'divider');\n Object.keys(palette).forEach(color => {\n const colors = palette[color];\n\n // The default palettes (primary, secondary, error, info, success, and warning) errors are handled by the above `createTheme(...)`.\n\n if (color !== 'tonalOffset' && colors && typeof colors === 'object') {\n // Silent the error for custom palettes.\n if (colors.main) {\n setColor(palette[color], 'mainChannel', safeColorChannel(toRgb(colors.main)));\n }\n if (colors.light) {\n setColor(palette[color], 'lightChannel', safeColorChannel(toRgb(colors.light)));\n }\n if (colors.dark) {\n setColor(palette[color], 'darkChannel', safeColorChannel(toRgb(colors.dark)));\n }\n if (colors.contrastText) {\n setColor(palette[color], 'contrastTextChannel', safeColorChannel(toRgb(colors.contrastText)));\n }\n if (color === 'text') {\n // Text colors: text.primary, text.secondary\n setColorChannel(palette[color], 'primary');\n setColorChannel(palette[color], 'secondary');\n }\n if (color === 'action') {\n // Action colors: action.active, action.selected\n if (colors.active) {\n setColorChannel(palette[color], 'active');\n }\n if (colors.selected) {\n setColorChannel(palette[color], 'selected');\n }\n }\n }\n });\n });\n theme = args.reduce((acc, argument) => deepmerge(acc, argument), theme);\n const parserConfig = {\n prefix: cssVarPrefix,\n disableCssColorScheme,\n shouldSkipGeneratingVar,\n getSelector: defaultGetSelector(theme)\n };\n const {\n vars,\n generateThemeVars,\n generateStyleSheets\n } = prepareCssVars(theme, parserConfig);\n theme.vars = vars;\n Object.entries(theme.colorSchemes[theme.defaultColorScheme]).forEach(([key, value]) => {\n theme[key] = value;\n });\n theme.generateThemeVars = generateThemeVars;\n theme.generateStyleSheets = generateStyleSheets;\n theme.generateSpacing = function generateSpacing() {\n return createSpacing(input.spacing, createUnarySpacing(this));\n };\n theme.getColorSchemeSelector = createGetColorSchemeSelector(selector);\n theme.spacing = theme.generateSpacing();\n theme.shouldSkipGeneratingVar = shouldSkipGeneratingVar;\n theme.unstable_sxConfig = {\n ...defaultSxConfig,\n ...input?.unstable_sxConfig\n };\n theme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n theme.toRuntimeSource = stringifyTheme; // for Pigment CSS integration\n\n return theme;\n}","import deepmerge from '@mui/utils/deepmerge';\nimport cssVarsParser from \"./cssVarsParser.js\";\nfunction prepareCssVars(theme, parserConfig = {}) {\n const {\n getSelector = defaultGetSelector,\n disableCssColorScheme,\n colorSchemeSelector: selector\n } = parserConfig;\n // @ts-ignore - ignore components do not exist\n const {\n colorSchemes = {},\n components,\n defaultColorScheme = 'light',\n ...otherTheme\n } = theme;\n const {\n vars: rootVars,\n css: rootCss,\n varsWithDefaults: rootVarsWithDefaults\n } = cssVarsParser(otherTheme, parserConfig);\n let themeVars = rootVarsWithDefaults;\n const colorSchemesMap = {};\n const {\n [defaultColorScheme]: defaultScheme,\n ...otherColorSchemes\n } = colorSchemes;\n Object.entries(otherColorSchemes || {}).forEach(([key, scheme]) => {\n const {\n vars,\n css,\n varsWithDefaults\n } = cssVarsParser(scheme, parserConfig);\n themeVars = deepmerge(themeVars, varsWithDefaults);\n colorSchemesMap[key] = {\n css,\n vars\n };\n });\n if (defaultScheme) {\n // default color scheme vars should be merged last to set as default\n const {\n css,\n vars,\n varsWithDefaults\n } = cssVarsParser(defaultScheme, parserConfig);\n themeVars = deepmerge(themeVars, varsWithDefaults);\n colorSchemesMap[defaultColorScheme] = {\n css,\n vars\n };\n }\n function defaultGetSelector(colorScheme, cssObject) {\n let rule = selector;\n if (selector === 'class') {\n rule = '.%s';\n }\n if (selector === 'data') {\n rule = '[data-%s]';\n }\n if (selector?.startsWith('data-') && !selector.includes('%s')) {\n // 'data-joy-color-scheme' -> '[data-joy-color-scheme=\"%s\"]'\n rule = `[${selector}=\"%s\"]`;\n }\n if (colorScheme) {\n if (rule === 'media') {\n if (theme.defaultColorScheme === colorScheme) {\n return ':root';\n }\n const mode = colorSchemes[colorScheme]?.palette?.mode || colorScheme;\n return {\n [`@media (prefers-color-scheme: ${mode})`]: {\n ':root': cssObject\n }\n };\n }\n if (rule) {\n if (theme.defaultColorScheme === colorScheme) {\n return `:root, ${rule.replace('%s', String(colorScheme))}`;\n }\n return rule.replace('%s', String(colorScheme));\n }\n }\n return ':root';\n }\n const generateThemeVars = () => {\n let vars = {\n ...rootVars\n };\n Object.entries(colorSchemesMap).forEach(([, {\n vars: schemeVars\n }]) => {\n vars = deepmerge(vars, schemeVars);\n });\n return vars;\n };\n const generateStyleSheets = () => {\n const stylesheets = [];\n const colorScheme = theme.defaultColorScheme || 'light';\n function insertStyleSheet(key, css) {\n if (Object.keys(css).length) {\n stylesheets.push(typeof key === 'string' ? {\n [key]: {\n ...css\n }\n } : key);\n }\n }\n insertStyleSheet(getSelector(undefined, {\n ...rootCss\n }), rootCss);\n const {\n [colorScheme]: defaultSchemeVal,\n ...other\n } = colorSchemesMap;\n if (defaultSchemeVal) {\n // default color scheme has to come before other color schemes\n const {\n css\n } = defaultSchemeVal;\n const cssColorSheme = colorSchemes[colorScheme]?.palette?.mode;\n const finalCss = !disableCssColorScheme && cssColorSheme ? {\n colorScheme: cssColorSheme,\n ...css\n } : {\n ...css\n };\n insertStyleSheet(getSelector(colorScheme, {\n ...finalCss\n }), finalCss);\n }\n Object.entries(other).forEach(([key, {\n css\n }]) => {\n const cssColorSheme = colorSchemes[key]?.palette?.mode;\n const finalCss = !disableCssColorScheme && cssColorSheme ? {\n colorScheme: cssColorSheme,\n ...css\n } : {\n ...css\n };\n insertStyleSheet(getSelector(key, {\n ...finalCss\n }), finalCss);\n });\n return stylesheets;\n };\n return {\n vars: themeVars,\n generateThemeVars,\n generateStyleSheets\n };\n}\nexport default prepareCssVars;","/* eslint-disable import/prefer-default-export */\nexport function createGetColorSchemeSelector(selector) {\n return function getColorSchemeSelector(colorScheme) {\n if (selector === 'media') {\n if (process.env.NODE_ENV !== 'production') {\n if (colorScheme !== 'light' && colorScheme !== 'dark') {\n console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${colorScheme}'.`);\n }\n }\n return `@media (prefers-color-scheme: ${colorScheme})`;\n }\n if (selector) {\n if (selector.startsWith('data-') && !selector.includes('%s')) {\n return `[${selector}=\"${colorScheme}\"] &`;\n }\n if (selector === 'class') {\n return `.${colorScheme} &`;\n }\n if (selector === 'data') {\n return `[data-${colorScheme}] &`;\n }\n return `${selector.replace('%s', colorScheme)} &`;\n }\n return '&';\n };\n}","import createPalette from \"./createPalette.js\";\nimport createThemeWithVars from \"./createThemeWithVars.js\";\nimport createThemeNoVars from \"./createThemeNoVars.js\";\nexport { createMuiTheme } from \"./createThemeNoVars.js\";\n// eslint-disable-next-line consistent-return\nfunction attachColorScheme(theme, scheme, colorScheme) {\n if (!theme.colorSchemes) {\n return undefined;\n }\n if (colorScheme) {\n theme.colorSchemes[scheme] = {\n ...(colorScheme !== true && colorScheme),\n palette: createPalette({\n ...(colorScheme === true ? {} : colorScheme.palette),\n mode: scheme\n }) // cast type to skip module augmentation test\n };\n }\n}\n\n/**\n * Generate a theme base on the options received.\n * @param options Takes an incomplete theme object and adds the missing parts.\n * @param args Deep merge the arguments with the about to be returned theme.\n * @returns A complete, ready-to-use theme object.\n */\nexport default function createTheme(options = {},\n// cast type to skip module augmentation test\n...args) {\n const {\n palette,\n cssVariables = false,\n colorSchemes: initialColorSchemes = !palette ? {\n light: true\n } : undefined,\n defaultColorScheme: initialDefaultColorScheme = palette?.mode,\n ...rest\n } = options;\n const defaultColorSchemeInput = initialDefaultColorScheme || 'light';\n const defaultScheme = initialColorSchemes?.[defaultColorSchemeInput];\n const colorSchemesInput = {\n ...initialColorSchemes,\n ...(palette ? {\n [defaultColorSchemeInput]: {\n ...(typeof defaultScheme !== 'boolean' && defaultScheme),\n palette\n }\n } : undefined)\n };\n if (cssVariables === false) {\n if (!('colorSchemes' in options)) {\n // Behaves exactly as v5\n return createThemeNoVars(options, ...args);\n }\n let paletteOptions = palette;\n if (!('palette' in options)) {\n if (colorSchemesInput[defaultColorSchemeInput]) {\n if (colorSchemesInput[defaultColorSchemeInput] !== true) {\n paletteOptions = colorSchemesInput[defaultColorSchemeInput].palette;\n } else if (defaultColorSchemeInput === 'dark') {\n // @ts-ignore to prevent the module augmentation test from failing\n paletteOptions = {\n mode: 'dark'\n };\n }\n }\n }\n const theme = createThemeNoVars({\n ...options,\n palette: paletteOptions\n }, ...args);\n theme.defaultColorScheme = defaultColorSchemeInput;\n theme.colorSchemes = colorSchemesInput;\n if (theme.palette.mode === 'light') {\n theme.colorSchemes.light = {\n ...(colorSchemesInput.light !== true && colorSchemesInput.light),\n palette: theme.palette\n };\n attachColorScheme(theme, 'dark', colorSchemesInput.dark);\n }\n if (theme.palette.mode === 'dark') {\n theme.colorSchemes.dark = {\n ...(colorSchemesInput.dark !== true && colorSchemesInput.dark),\n palette: theme.palette\n };\n attachColorScheme(theme, 'light', colorSchemesInput.light);\n }\n return theme;\n }\n if (!palette && !('light' in colorSchemesInput) && defaultColorSchemeInput === 'light') {\n colorSchemesInput.light = true;\n }\n return createThemeWithVars({\n ...rest,\n colorSchemes: colorSchemesInput,\n defaultColorScheme: defaultColorSchemeInput,\n ...(typeof cssVariables !== 'boolean' && cssVariables)\n }, ...args);\n}","'use client';\n\nimport createTheme from \"./createTheme.js\";\nconst defaultTheme = createTheme();\nexport default defaultTheme;","export default '$$material';","'use client';\n\nimport systemUseThemeProps from '@mui/system/useThemeProps';\nimport defaultTheme from \"./defaultTheme.js\";\nimport THEME_ID from \"./identifier.js\";\nexport default function useThemeProps({\n props,\n name\n}) {\n return systemUseThemeProps({\n props,\n name,\n defaultTheme,\n themeId: THEME_ID\n });\n}","'use client';\n\nimport getThemeProps from \"./getThemeProps.js\";\nimport useTheme from \"../useTheme/index.js\";\nexport default function useThemeProps({\n props,\n name,\n defaultTheme,\n themeId\n}) {\n let theme = useTheme(defaultTheme);\n if (themeId) {\n theme = theme[themeId] || theme;\n }\n return getThemeProps({\n theme,\n name,\n props\n });\n}","export const imageMimeTypes = {\n 'image/png': 'PNG',\n 'image/jpeg': 'JPEG',\n 'image/webp': 'WebP'\n};","import { imageMimeTypes } from \"./utils/imageMimeTypes.js\";\nimport { getChartsLocalization } from \"./utils/getChartsLocalization.js\";\n\n// This object is not Partial because it is the default values\n\nexport const enUSLocaleText = {\n // Overlay\n loading: 'Loading data…',\n noData: 'No data to display',\n // Toolbar\n zoomIn: 'Zoom in',\n zoomOut: 'Zoom out',\n toolbarExport: 'Export',\n // Toolbar Export Menu\n toolbarExportPrint: 'Print',\n toolbarExportImage: mimeType => `Export as ${imageMimeTypes[mimeType] ?? mimeType}`,\n // Charts renderer configuration\n chartTypeBar: 'Bar',\n chartTypeColumn: 'Column',\n chartTypeLine: 'Line',\n chartTypeArea: 'Area',\n chartTypePie: 'Pie',\n chartPaletteLabel: 'Color palette',\n chartPaletteNameRainbowSurge: 'Rainbow Surge',\n chartPaletteNameBlueberryTwilight: 'Blueberry Twilight',\n chartPaletteNameMangoFusion: 'Mango Fusion',\n chartPaletteNameCheerfulFiesta: 'Cheerful Fiesta',\n chartPaletteNameStrawberrySky: 'Strawberry Sky',\n chartPaletteNameBlue: 'Blue',\n chartPaletteNameGreen: 'Green',\n chartPaletteNamePurple: 'Purple',\n chartPaletteNameRed: 'Red',\n chartPaletteNameOrange: 'Orange',\n chartPaletteNameYellow: 'Yellow',\n chartPaletteNameCyan: 'Cyan',\n chartPaletteNamePink: 'Pink',\n chartConfigurationSectionChart: 'Chart',\n chartConfigurationSectionColumns: 'Columns',\n chartConfigurationSectionBars: 'Bars',\n chartConfigurationSectionAxes: 'Axes',\n chartConfigurationGrid: 'Grid',\n chartConfigurationBorderRadius: 'Border radius',\n chartConfigurationCategoryGapRatio: 'Category gap ratio',\n chartConfigurationBarGapRatio: 'Series gap ratio',\n chartConfigurationStacked: 'Stacked',\n chartConfigurationShowToolbar: 'Show toolbar',\n chartConfigurationSkipAnimation: 'Skip animation',\n chartConfigurationInnerRadius: 'Inner radius',\n chartConfigurationOuterRadius: 'Outer radius',\n chartConfigurationColors: 'Colors',\n chartConfigurationHideLegend: 'Hide legend',\n chartConfigurationShowMark: 'Show mark',\n chartConfigurationHeight: 'Height',\n chartConfigurationWidth: 'Width',\n chartConfigurationSeriesGap: 'Series gap',\n chartConfigurationTickPlacement: 'Tick placement',\n chartConfigurationTickLabelPlacement: 'Tick label placement',\n chartConfigurationCategoriesAxisLabel: 'Categories axis label',\n chartConfigurationSeriesAxisLabel: 'Series axis label',\n chartConfigurationXAxisPosition: 'X-axis position',\n chartConfigurationYAxisPosition: 'Y-axis position',\n chartConfigurationSeriesAxisReverse: 'Reverse series axis',\n chartConfigurationTooltipPlacement: 'Placement',\n chartConfigurationTooltipTrigger: 'Trigger',\n chartConfigurationLegendPosition: 'Position',\n chartConfigurationLegendDirection: 'Direction',\n chartConfigurationBarLabels: 'Bar labels',\n chartConfigurationColumnLabels: 'Column labels',\n chartConfigurationInterpolation: 'Interpolation',\n chartConfigurationSectionTooltip: 'Tooltip',\n chartConfigurationSectionLegend: 'Legend',\n chartConfigurationSectionLines: 'Lines',\n chartConfigurationSectionAreas: 'Areas',\n chartConfigurationSectionArcs: 'Arcs',\n chartConfigurationPaddingAngle: 'Padding angle',\n chartConfigurationCornerRadius: 'Corner radius',\n chartConfigurationArcLabels: 'Arc labels',\n chartConfigurationStartAngle: 'Start angle',\n chartConfigurationEndAngle: 'End angle',\n chartConfigurationPieTooltipTrigger: 'Trigger',\n chartConfigurationPieLegendPosition: 'Position',\n chartConfigurationPieLegendDirection: 'Direction',\n // Common option labels\n chartConfigurationOptionNone: 'None',\n chartConfigurationOptionValue: 'Value',\n chartConfigurationOptionAuto: 'Auto',\n chartConfigurationOptionTop: 'Top',\n chartConfigurationOptionTopLeft: 'Top Left',\n chartConfigurationOptionTopRight: 'Top Right',\n chartConfigurationOptionBottom: 'Bottom',\n chartConfigurationOptionBottomLeft: 'Bottom Left',\n chartConfigurationOptionBottomRight: 'Bottom Right',\n chartConfigurationOptionLeft: 'Left',\n chartConfigurationOptionRight: 'Right',\n chartConfigurationOptionAxis: 'Axis',\n chartConfigurationOptionItem: 'Item',\n chartConfigurationOptionHorizontal: 'Horizontal',\n chartConfigurationOptionVertical: 'Vertical',\n chartConfigurationOptionBoth: 'Both',\n chartConfigurationOptionStart: 'Start',\n chartConfigurationOptionMiddle: 'Middle',\n chartConfigurationOptionEnd: 'End',\n chartConfigurationOptionExtremities: 'Extremities',\n chartConfigurationOptionTick: 'Tick',\n chartConfigurationOptionMonotoneX: 'Monotone X',\n chartConfigurationOptionMonotoneY: 'Monotone Y',\n chartConfigurationOptionCatmullRom: 'Catmull-Rom',\n chartConfigurationOptionLinear: 'Linear',\n chartConfigurationOptionNatural: 'Natural',\n chartConfigurationOptionStep: 'Step',\n chartConfigurationOptionStepBefore: 'Step Before',\n chartConfigurationOptionStepAfter: 'Step After',\n chartConfigurationOptionBumpX: 'Bump X',\n chartConfigurationOptionBumpY: 'Bump Y'\n};\nexport const DEFAULT_LOCALE = enUSLocaleText;\nexport const enUS = getChartsLocalization(enUSLocaleText);","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * Helper to pass translation to all charts thanks to the MUI theme.\n * @param chartsTranslations The translation object.\n * @returns an object to pass the translation by using the MUI theme default props\n */\nexport const getChartsLocalization = chartsTranslations => {\n return {\n components: {\n MuiChartsLocalizationProvider: {\n defaultProps: {\n localeText: _extends({}, chartsTranslations)\n }\n }\n }\n };\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"localeText\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useThemeProps } from '@mui/material/styles';\nimport { DEFAULT_LOCALE } from \"../locales/enUS.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ChartsLocalizationContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") ChartsLocalizationContext.displayName = \"ChartsLocalizationContext\";\n/**\n * Demos:\n *\n * - [localization](https://mui.com/x/react-charts/localization/)\n *\n * API:\n *\n * - [ChartsLocalizationProvider API](https://mui.com/x/api/charts/charts-localization-provider/)\n */\nfunction ChartsLocalizationProvider(inProps) {\n const {\n localeText: inLocaleText\n } = inProps,\n other = _objectWithoutPropertiesLoose(inProps, _excluded);\n const {\n localeText: parentLocaleText\n } = React.useContext(ChartsLocalizationContext) ?? {\n localeText: undefined\n };\n const props = useThemeProps({\n // We don't want to pass the `localeText` prop to the theme, that way it will always return the theme value,\n // We will then merge this theme value with our value manually\n props: other,\n name: 'MuiChartsLocalizationProvider'\n });\n const {\n children,\n localeText: themeLocaleText\n } = props;\n const localeText = React.useMemo(() => _extends({}, DEFAULT_LOCALE, themeLocaleText, parentLocaleText, inLocaleText), [themeLocaleText, parentLocaleText, inLocaleText]);\n const contextValue = React.useMemo(() => {\n return {\n localeText\n };\n }, [localeText]);\n return /*#__PURE__*/_jsx(ChartsLocalizationContext.Provider, {\n value: contextValue,\n children: children\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? ChartsLocalizationProvider.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n children: PropTypes.node,\n /**\n * Localized text for chart components.\n */\n localeText: PropTypes.object\n} : void 0;\nexport { ChartsLocalizationProvider };","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t {\n this.currentId = null;\n fn();\n }, delay);\n }\n clear = () => {\n if (this.currentId !== null) {\n clearTimeout(this.currentId);\n this.currentId = null;\n }\n };\n disposeEffect = () => {\n return this.clear;\n };\n}\nexport default function useTimeout() {\n const timeout = useLazyRef(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","/* eslint no-restricted-syntax: 0, prefer-template: 0, guard-for-in: 0\n ---\n These rules are preventing the performance optimizations below.\n */\n\n/**\n * Compose classes from multiple sources.\n *\n * @example\n * ```tsx\n * const slots = {\n * root: ['root', 'primary'],\n * label: ['label'],\n * };\n *\n * const getUtilityClass = (slot) => `MuiButton-${slot}`;\n *\n * const classes = {\n * root: 'my-root-class',\n * };\n *\n * const output = composeClasses(slots, getUtilityClass, classes);\n * // {\n * // root: 'MuiButton-root MuiButton-primary my-root-class',\n * // label: 'MuiButton-label',\n * // }\n * ```\n *\n * @param slots a list of classes for each possible slot\n * @param getUtilityClass a function to resolve the class based on the slot name\n * @param classes the input classes from props\n * @returns the resolved classes for all slots\n */\nexport default function composeClasses(slots, getUtilityClass, classes = undefined) {\n const output = {};\n for (const slotName in slots) {\n const slot = slots[slotName];\n let buffer = '';\n let start = true;\n for (let i = 0; i < slot.length; i += 1) {\n const value = slot[i];\n if (value) {\n buffer += (start === true ? '' : ' ') + getUtilityClass(value);\n start = false;\n if (classes && classes[value]) {\n buffer += ' ' + classes[value];\n }\n }\n }\n output[slotName] = buffer;\n }\n return output;\n}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst RtlContext = /*#__PURE__*/React.createContext();\nfunction RtlProvider({\n value,\n ...props\n}) {\n return /*#__PURE__*/_jsx(RtlContext.Provider, {\n value: value ?? true,\n ...props\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? RtlProvider.propTypes = {\n children: PropTypes.node,\n value: PropTypes.bool\n} : void 0;\nexport const useRtl = () => {\n const value = React.useContext(RtlContext);\n return value ?? false;\n};\nexport default RtlProvider;","/**\n * Returns a boolean indicating if the event's target has :focus-visible\n */\nexport default function isFocusVisible(element) {\n try {\n return element.matches(':focus-visible');\n } catch (error) {\n // Do not warn on jsdom tests, otherwise all tests that rely on focus have to be skipped\n // Tests that rely on `:focus-visible` will still have to be skipped in jsdom\n if (process.env.NODE_ENV !== 'production' && !/jsdom/.test(window.navigator.userAgent)) {\n console.warn(['MUI: The `:focus-visible` pseudo class is not supported in this browser.', 'Some components rely on this feature to work properly.'].join('\\n'));\n }\n }\n return false;\n}","import * as React from 'react';\n\n/**\n * Returns the ref of a React element handling differences between React 19 and older versions.\n * It will throw runtime error if the element is not a valid React element.\n *\n * @param element React.ReactElement\n * @returns React.Ref | null\n */\nexport default function getReactElementRef(element) {\n // 'ref' is passed as prop in React 19, whereas 'ref' is directly attached to children in older versions\n if (parseInt(React.version, 10) >= 19) {\n return element?.props?.ref || null;\n }\n // @ts-expect-error element.ref is not included in the ReactElement type\n // https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/70189\n return element?.ref || null;\n}","import memoize from '@emotion/memoize';\n\n// eslint-disable-next-line no-undef\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { withEmotionCache, ThemeContext } from '@emotion/react';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport * as React from 'react';\nimport isPropValid from '@emotion/is-prop-valid';\n\nvar isDevelopment = false;\n\nvar testOmitPropsOnStringTag = isPropValid;\n\nvar testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {\n return key !== 'theme';\n};\n\nvar getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {\n return typeof tag === 'string' && // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;\n};\nvar composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) {\n var shouldForwardProp;\n\n if (options) {\n var optionsShouldForwardProp = options.shouldForwardProp;\n shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) {\n return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);\n } : optionsShouldForwardProp;\n }\n\n if (typeof shouldForwardProp !== 'function' && isReal) {\n shouldForwardProp = tag.__emotion_forwardProp;\n }\n\n return shouldForwardProp;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar createStyled = function createStyled(tag, options) {\n\n var isReal = tag.__emotion_real === tag;\n var baseTag = isReal && tag.__emotion_base || tag;\n var identifierName;\n var targetClassName;\n\n if (options !== undefined) {\n identifierName = options.label;\n targetClassName = options.target;\n }\n\n var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);\n var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);\n var shouldUseAs = !defaultShouldForwardProp('as');\n return function () {\n // eslint-disable-next-line prefer-rest-params\n var args = arguments;\n var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];\n\n if (identifierName !== undefined) {\n styles.push(\"label:\" + identifierName + \";\");\n }\n\n if (args[0] == null || args[0].raw === undefined) {\n // eslint-disable-next-line prefer-spread\n styles.push.apply(styles, args);\n } else {\n var templateStringsArr = args[0];\n\n styles.push(templateStringsArr[0]);\n var len = args.length;\n var i = 1;\n\n for (; i < len; i++) {\n\n styles.push(args[i], templateStringsArr[i]);\n }\n }\n\n var Styled = withEmotionCache(function (props, cache, ref) {\n var FinalTag = shouldUseAs && props.as || baseTag;\n var className = '';\n var classInterpolations = [];\n var mergedProps = props;\n\n if (props.theme == null) {\n mergedProps = {};\n\n for (var key in props) {\n mergedProps[key] = props[key];\n }\n\n mergedProps.theme = React.useContext(ThemeContext);\n }\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, classInterpolations, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);\n className += cache.key + \"-\" + serialized.name;\n\n if (targetClassName !== undefined) {\n className += \" \" + targetClassName;\n }\n\n var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;\n var newProps = {};\n\n for (var _key in props) {\n if (shouldUseAs && _key === 'as') continue;\n\n if (finalShouldForwardProp(_key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps.className = className;\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof FinalTag === 'string'\n }), /*#__PURE__*/React.createElement(FinalTag, newProps));\n });\n Styled.displayName = identifierName !== undefined ? identifierName : \"Styled(\" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + \")\";\n Styled.defaultProps = tag.defaultProps;\n Styled.__emotion_real = Styled;\n Styled.__emotion_base = baseTag;\n Styled.__emotion_styles = styles;\n Styled.__emotion_forwardProp = shouldForwardProp;\n Object.defineProperty(Styled, 'toString', {\n value: function value() {\n if (targetClassName === undefined && isDevelopment) {\n return 'NO_COMPONENT_SELECTOR';\n }\n\n return \".\" + targetClassName;\n }\n });\n\n Styled.withComponent = function (nextTag, nextOptions) {\n var newStyled = createStyled(nextTag, _extends({}, options, nextOptions, {\n shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)\n }));\n return newStyled.apply(void 0, styles);\n };\n\n return Styled;\n };\n};\n\nexport { createStyled as default };\n","import createStyled from '../base/dist/emotion-styled-base.browser.esm.js';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/react';\nimport '@emotion/serialize';\nimport '@emotion/use-insertion-effect-with-fallbacks';\nimport '@emotion/utils';\nimport 'react';\nimport '@emotion/is-prop-valid';\n\nvar tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG\n'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\n// bind it to avoid mutating the original function\nvar styled = createStyled.bind(null);\ntags.forEach(function (tagName) {\n styled[tagName] = styled(tagName);\n});\n\nexport { styled as default };\n","/**\n * @mui/styled-engine v6.5.0\n *\n * @license MIT\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/* eslint-disable no-underscore-dangle */\nimport emStyled from '@emotion/styled';\nimport { serializeStyles as emSerializeStyles } from '@emotion/serialize';\nexport default function styled(tag, options) {\n const stylesFactory = emStyled(tag, options);\n if (process.env.NODE_ENV !== 'production') {\n return (...styles) => {\n const component = typeof tag === 'string' ? `\"${tag}\"` : 'component';\n if (styles.length === 0) {\n console.error([`MUI: Seems like you called \\`styled(${component})()\\` without a \\`style\\` argument.`, 'You must provide a `styles` argument: `styled(\"div\")(styleYouForgotToPass)`.'].join('\\n'));\n } else if (styles.some(style => style === undefined)) {\n console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);\n }\n return stylesFactory(...styles);\n };\n }\n return stylesFactory;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function internal_mutateStyles(tag, processor) {\n // Emotion attaches all the styles as `__emotion_styles`.\n // Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186\n if (Array.isArray(tag.__emotion_styles)) {\n tag.__emotion_styles = processor(tag.__emotion_styles);\n }\n}\n\n// Emotion only accepts an array, but we want to avoid allocations\nconst wrapper = [];\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function internal_serializeStyles(styles) {\n wrapper[0] = styles;\n return emSerializeStyles(wrapper);\n}\nexport { ThemeContext, keyframes, css } from '@emotion/react';\nexport { default as StyledEngineProvider } from \"./StyledEngineProvider/index.js\";\nexport { default as GlobalStyles } from \"./GlobalStyles/index.js\";","import { internal_serializeStyles } from '@mui/styled-engine';\nexport default function preprocessStyles(input) {\n const {\n variants,\n ...style\n } = input;\n const result = {\n variants,\n style: internal_serializeStyles(style),\n isProcessed: true\n };\n\n // Not supported on styled-components\n if (result.style === style) {\n return result;\n }\n if (variants) {\n variants.forEach(variant => {\n if (typeof variant.style !== 'function') {\n variant.style = internal_serializeStyles(variant.style);\n }\n });\n }\n return result;\n}","import styledEngineStyled, { internal_mutateStyles as mutateStyles, internal_serializeStyles as serializeStyles } from '@mui/styled-engine';\nimport { isPlainObject } from '@mui/utils/deepmerge';\nimport capitalize from '@mui/utils/capitalize';\nimport getDisplayName from '@mui/utils/getDisplayName';\nimport createTheme from \"../createTheme/index.js\";\nimport styleFunctionSx from \"../styleFunctionSx/index.js\";\nimport preprocessStyles from \"../preprocessStyles.js\";\n\n/* eslint-disable no-underscore-dangle */\n/* eslint-disable no-labels */\n/* eslint-disable no-lone-blocks */\n\nexport const systemDefaultTheme = createTheme();\n\n// Update /system/styled/#api in case if this changes\nexport function shouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nfunction shallowLayer(serialized, layerName) {\n if (layerName && serialized && typeof serialized === 'object' && serialized.styles && !serialized.styles.startsWith('@layer') // only add the layer if it is not already there.\n ) {\n serialized.styles = `@layer ${layerName}{${String(serialized.styles)}}`;\n }\n return serialized;\n}\nfunction defaultOverridesResolver(slot) {\n if (!slot) {\n return null;\n }\n return (_props, styles) => styles[slot];\n}\nfunction attachTheme(props, themeId, defaultTheme) {\n props.theme = isObjectEmpty(props.theme) ? defaultTheme : props.theme[themeId] || props.theme;\n}\nfunction processStyle(props, style, layerName) {\n /*\n * Style types:\n * - null/undefined\n * - string\n * - CSS style object: { [cssKey]: [cssValue], variants }\n * - Processed style object: { style, variants, isProcessed: true }\n * - Array of any of the above\n */\n\n const resolvedStyle = typeof style === 'function' ? style(props) : style;\n if (Array.isArray(resolvedStyle)) {\n return resolvedStyle.flatMap(subStyle => processStyle(props, subStyle, layerName));\n }\n if (Array.isArray(resolvedStyle?.variants)) {\n let rootStyle;\n if (resolvedStyle.isProcessed) {\n rootStyle = layerName ? shallowLayer(resolvedStyle.style, layerName) : resolvedStyle.style;\n } else {\n const {\n variants,\n ...otherStyles\n } = resolvedStyle;\n rootStyle = layerName ? shallowLayer(serializeStyles(otherStyles), layerName) : otherStyles;\n }\n return processStyleVariants(props, resolvedStyle.variants, [rootStyle], layerName);\n }\n if (resolvedStyle?.isProcessed) {\n return layerName ? shallowLayer(serializeStyles(resolvedStyle.style), layerName) : resolvedStyle.style;\n }\n return layerName ? shallowLayer(serializeStyles(resolvedStyle), layerName) : resolvedStyle;\n}\nfunction processStyleVariants(props, variants, results = [], layerName = undefined) {\n let mergedState; // We might not need it, initialized lazily\n\n variantLoop: for (let i = 0; i < variants.length; i += 1) {\n const variant = variants[i];\n if (typeof variant.props === 'function') {\n mergedState ??= {\n ...props,\n ...props.ownerState,\n ownerState: props.ownerState\n };\n if (!variant.props(mergedState)) {\n continue;\n }\n } else {\n for (const key in variant.props) {\n if (props[key] !== variant.props[key] && props.ownerState?.[key] !== variant.props[key]) {\n continue variantLoop;\n }\n }\n }\n if (typeof variant.style === 'function') {\n mergedState ??= {\n ...props,\n ...props.ownerState,\n ownerState: props.ownerState\n };\n results.push(layerName ? shallowLayer(serializeStyles(variant.style(mergedState)), layerName) : variant.style(mergedState));\n } else {\n results.push(layerName ? shallowLayer(serializeStyles(variant.style), layerName) : variant.style);\n }\n }\n return results;\n}\nexport default function createStyled(input = {}) {\n const {\n themeId,\n defaultTheme = systemDefaultTheme,\n rootShouldForwardProp = shouldForwardProp,\n slotShouldForwardProp = shouldForwardProp\n } = input;\n function styleAttachTheme(props) {\n attachTheme(props, themeId, defaultTheme);\n }\n const styled = (tag, inputOptions = {}) => {\n // If `tag` is already a styled component, filter out the `sx` style function\n // to prevent unnecessary styles generated by the composite components.\n mutateStyles(tag, styles => styles.filter(style => style !== styleFunctionSx));\n const {\n name: componentName,\n slot: componentSlot,\n skipVariantsResolver: inputSkipVariantsResolver,\n skipSx: inputSkipSx,\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot)),\n ...options\n } = inputOptions;\n const layerName = componentName && componentName.startsWith('Mui') || !!componentSlot ? 'components' : 'custom';\n\n // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.\n const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n componentSlot && componentSlot !== 'Root' && componentSlot !== 'root' || false;\n const skipSx = inputSkipSx || false;\n let shouldForwardPropOption = shouldForwardProp;\n\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n if (componentSlot === 'Root' || componentSlot === 'root') {\n shouldForwardPropOption = rootShouldForwardProp;\n } else if (componentSlot) {\n // any other slot specified\n shouldForwardPropOption = slotShouldForwardProp;\n } else if (isStringTag(tag)) {\n // for string (html) tag, preserve the behavior in emotion & styled-components.\n shouldForwardPropOption = undefined;\n }\n const defaultStyledResolver = styledEngineStyled(tag, {\n shouldForwardProp: shouldForwardPropOption,\n label: generateStyledLabel(componentName, componentSlot),\n ...options\n });\n const transformStyle = style => {\n // - On the server Emotion doesn't use React.forwardRef for creating components, so the created\n // component stays as a function. This condition makes sure that we do not interpolate functions\n // which are basically components used as a selectors.\n // - `style` could be a styled component from a babel plugin for component selectors, This condition\n // makes sure that we do not interpolate them.\n if (style.__emotion_real === style) {\n return style;\n }\n if (typeof style === 'function') {\n return function styleFunctionProcessor(props) {\n return processStyle(props, style, props.theme.modularCssLayers ? layerName : undefined);\n };\n }\n if (isPlainObject(style)) {\n const serialized = preprocessStyles(style);\n return function styleObjectProcessor(props) {\n if (!serialized.variants) {\n return props.theme.modularCssLayers ? shallowLayer(serialized.style, layerName) : serialized.style;\n }\n return processStyle(props, serialized, props.theme.modularCssLayers ? layerName : undefined);\n };\n }\n return style;\n };\n const muiStyledResolver = (...expressionsInput) => {\n const expressionsHead = [];\n const expressionsBody = expressionsInput.map(transformStyle);\n const expressionsTail = [];\n\n // Preprocess `props` to set the scoped theme value.\n // This must run before any other expression.\n expressionsHead.push(styleAttachTheme);\n if (componentName && overridesResolver) {\n expressionsTail.push(function styleThemeOverrides(props) {\n const theme = props.theme;\n const styleOverrides = theme.components?.[componentName]?.styleOverrides;\n if (!styleOverrides) {\n return null;\n }\n const resolvedStyleOverrides = {};\n\n // TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly\n // eslint-disable-next-line guard-for-in\n for (const slotKey in styleOverrides) {\n resolvedStyleOverrides[slotKey] = processStyle(props, styleOverrides[slotKey], props.theme.modularCssLayers ? 'theme' : undefined);\n }\n return overridesResolver(props, resolvedStyleOverrides);\n });\n }\n if (componentName && !skipVariantsResolver) {\n expressionsTail.push(function styleThemeVariants(props) {\n const theme = props.theme;\n const themeVariants = theme?.components?.[componentName]?.variants;\n if (!themeVariants) {\n return null;\n }\n return processStyleVariants(props, themeVariants, [], props.theme.modularCssLayers ? 'theme' : undefined);\n });\n }\n if (!skipSx) {\n expressionsTail.push(styleFunctionSx);\n }\n\n // This function can be called as a tagged template, so the first argument would contain\n // CSS `string[]` values.\n if (Array.isArray(expressionsBody[0])) {\n const inputStrings = expressionsBody.shift();\n\n // We need to add placeholders in the tagged template for the custom functions we have\n // possibly added (attachTheme, overrides, variants, and sx).\n const placeholdersHead = new Array(expressionsHead.length).fill('');\n const placeholdersTail = new Array(expressionsTail.length).fill('');\n let outputStrings;\n // prettier-ignore\n {\n outputStrings = [...placeholdersHead, ...inputStrings, ...placeholdersTail];\n outputStrings.raw = [...placeholdersHead, ...inputStrings.raw, ...placeholdersTail];\n }\n\n // The only case where we put something before `attachTheme`\n expressionsHead.unshift(outputStrings);\n }\n const expressions = [...expressionsHead, ...expressionsBody, ...expressionsTail];\n const Component = defaultStyledResolver(...expressions);\n if (tag.muiName) {\n Component.muiName = tag.muiName;\n }\n if (process.env.NODE_ENV !== 'production') {\n Component.displayName = generateDisplayName(componentName, componentSlot, tag);\n }\n return Component;\n };\n if (defaultStyledResolver.withConfig) {\n muiStyledResolver.withConfig = defaultStyledResolver.withConfig;\n }\n return muiStyledResolver;\n };\n return styled;\n}\nfunction generateDisplayName(componentName, componentSlot, tag) {\n if (componentName) {\n return `${componentName}${capitalize(componentSlot || '')}`;\n }\n return `Styled(${getDisplayName(tag)})`;\n}\nfunction generateStyledLabel(componentName, componentSlot) {\n let label;\n if (process.env.NODE_ENV !== 'production') {\n if (componentName) {\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;\n }\n }\n return label;\n}\nfunction isObjectEmpty(object) {\n // eslint-disable-next-line\n for (const _ in object) {\n return false;\n }\n return true;\n}\n\n// https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40\nfunction isStringTag(tag) {\n return typeof tag === 'string' &&\n // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96;\n}\nfunction lowercaseFirstLetter(string) {\n if (!string) {\n return string;\n }\n return string.charAt(0).toLowerCase() + string.slice(1);\n}","// copied from @mui/system/createStyled\nfunction slotShouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nexport default slotShouldForwardProp;","import slotShouldForwardProp from \"./slotShouldForwardProp.js\";\nconst rootShouldForwardProp = prop => slotShouldForwardProp(prop) && prop !== 'classes';\nexport default rootShouldForwardProp;","'use client';\n\nimport createStyled from '@mui/system/createStyled';\nimport defaultTheme from \"./defaultTheme.js\";\nimport THEME_ID from \"./identifier.js\";\nimport rootShouldForwardProp from \"./rootShouldForwardProp.js\";\nexport { default as slotShouldForwardProp } from \"./slotShouldForwardProp.js\";\nexport { default as rootShouldForwardProp } from \"./rootShouldForwardProp.js\";\nconst styled = createStyled({\n themeId: THEME_ID,\n defaultTheme,\n rootShouldForwardProp\n});\nexport default styled;","'use client';\n\nimport * as React from 'react';\nimport { useTheme as useThemeSystem } from '@mui/system';\nimport defaultTheme from \"./defaultTheme.js\";\nimport THEME_ID from \"./identifier.js\";\nexport default function useTheme() {\n const theme = useThemeSystem(defaultTheme);\n if (process.env.NODE_ENV !== 'production') {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(theme);\n }\n return theme[THEME_ID] || theme;\n}","import preprocessStyles from \"./preprocessStyles.js\";\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\n// We need to pass an argument as `{ theme }` for PigmentCSS, but we don't want to\n// allocate more objects.\nconst arg = {\n theme: undefined\n};\n\n/**\n * Memoize style function on theme.\n * Intended to be used in styled() calls that only need access to the theme.\n */\nexport default function unstable_memoTheme(styleFn) {\n let lastValue;\n let lastTheme;\n return function styleMemoized(props) {\n let value = lastValue;\n if (value === undefined || props.theme !== lastTheme) {\n arg.theme = props.theme;\n value = preprocessStyles(styleFn(arg));\n lastValue = value;\n lastTheme = props.theme;\n }\n return value;\n };\n}","import { unstable_memoTheme } from '@mui/system';\nconst memoTheme = unstable_memoTheme;\nexport default memoTheme;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport resolveProps from '@mui/utils/resolveProps';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PropsContext = /*#__PURE__*/React.createContext(undefined);\nfunction DefaultPropsProvider({\n value,\n children\n}) {\n return /*#__PURE__*/_jsx(PropsContext.Provider, {\n value: value,\n children: children\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? DefaultPropsProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n value: PropTypes.object\n} : void 0;\nfunction getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n if (!theme || !theme.components || !theme.components[name]) {\n return props;\n }\n const config = theme.components[name];\n if (config.defaultProps) {\n // compatible with v5 signature\n return resolveProps(config.defaultProps, props);\n }\n if (!config.styleOverrides && !config.variants) {\n // v6 signature, no property 'defaultProps'\n return resolveProps(config, props);\n }\n return props;\n}\nexport function useDefaultProps({\n props,\n name\n}) {\n const ctx = React.useContext(PropsContext);\n return getThemeProps({\n props,\n name,\n theme: {\n components: ctx\n }\n });\n}\nexport default DefaultPropsProvider;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport SystemDefaultPropsProvider, { useDefaultProps as useSystemDefaultProps } from '@mui/system/DefaultPropsProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction DefaultPropsProvider(props) {\n return /*#__PURE__*/_jsx(SystemDefaultPropsProvider, {\n ...props\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? DefaultPropsProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n value: PropTypes.object.isRequired\n} : void 0;\nexport default DefaultPropsProvider;\nexport function useDefaultProps(params) {\n return useSystemDefaultProps(params);\n}","import capitalize from '@mui/utils/capitalize';\nexport default capitalize;","function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"ReactDOM\"];","export default {\n disabled: false\n};","import React from 'react';\nexport default React.createContext(null);","export var forceReflow = function forceReflow(node) {\n return node.scrollTop;\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { forceReflow } from './utils/reflow';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {state => (\n *
\n * I'm a fade Transition!\n *
\n * )}\n *
\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n *
\n * \n * {state => (\n * // ...\n * )}\n * \n * \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n if (this.props.unmountOnExit || this.props.mountOnEnter) {\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749\n // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.\n // To make the animation happen, we have to separate each rendering and avoid being processed as batched.\n\n if (node) forceReflow(node);\n }\n\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","export const reflow = node => node.scrollTop;\nexport function getTransitionProps(props, options) {\n const {\n timeout,\n easing,\n style = {}\n } = props;\n return {\n duration: style.transitionDuration ?? (typeof timeout === 'number' ? timeout : timeout[options.mode] || 0),\n easing: style.transitionTimingFunction ?? (typeof easing === 'object' ? easing[options.mode] : easing),\n delay: style.transitionDelay\n };\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * Merges refs into a single memoized callback ref or `null`.\n *\n * ```tsx\n * const rootRef = React.useRef(null);\n * const refFork = useForkRef(rootRef, props.ref);\n *\n * return (\n * \n * );\n * ```\n *\n * @param {Array | undefined>} refs The ref array.\n * @returns {React.RefCallback | null} The new ref callback.\n */\nexport default function useForkRef(...refs) {\n const cleanupRef = React.useRef(undefined);\n const refEffect = React.useCallback(instance => {\n const cleanups = refs.map(ref => {\n if (ref == null) {\n return null;\n }\n if (typeof ref === 'function') {\n const refCallback = ref;\n const refCleanup = refCallback(instance);\n return typeof refCleanup === 'function' ? refCleanup : () => {\n refCallback(null);\n };\n }\n ref.current = instance;\n return () => {\n ref.current = null;\n };\n });\n return () => {\n cleanups.forEach(refCleanup => refCleanup?.());\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return value => {\n if (cleanupRef.current) {\n cleanupRef.current();\n cleanupRef.current = undefined;\n }\n if (value != null) {\n cleanupRef.current = refEffect(value);\n }\n };\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- intentionally ignoring that the dependency array must be an array literal\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}","'use client';\n\nimport useForkRef from '@mui/utils/useForkRef';\nexport default useForkRef;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useTimeout from '@mui/utils/useTimeout';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport { Transition } from 'react-transition-group';\nimport { useTheme } from \"../zero-styled/index.js\";\nimport { getTransitionProps, reflow } from \"../transitions/utils.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getScale(value) {\n return `scale(${value}, ${value ** 2})`;\n}\nconst styles = {\n entering: {\n opacity: 1,\n transform: getScale(1)\n },\n entered: {\n opacity: 1,\n transform: 'none'\n }\n};\n\n/*\n TODO v6: remove\n Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers.\n */\nconst isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\\/)15(.|_)4/i.test(navigator.userAgent);\n\n/**\n * The Grow transition is used by the [Tooltip](/material-ui/react-tooltip/) and\n * [Popover](/material-ui/react-popover/) components.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {\n const {\n addEndListener,\n appear = true,\n children,\n easing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n style,\n timeout = 'auto',\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition,\n ...other\n } = props;\n const timer = useTimeout();\n const autoTimeout = React.useRef();\n const theme = useTheme();\n const nodeRef = React.useRef(null);\n const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);\n const normalizedTransitionCallback = callback => maybeIsAppearing => {\n if (callback) {\n const node = nodeRef.current;\n\n // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n if (maybeIsAppearing === undefined) {\n callback(node);\n } else {\n callback(node, maybeIsAppearing);\n }\n }\n };\n const handleEntering = normalizedTransitionCallback(onEntering);\n const handleEnter = normalizedTransitionCallback((node, isAppearing) => {\n reflow(node); // So the animation always start from the start.\n\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: isWebKit154 ? duration : duration * 0.666,\n delay,\n easing: transitionTimingFunction\n })].join(',');\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback(onEntered);\n const handleExiting = normalizedTransitionCallback(onExiting);\n const handleExit = normalizedTransitionCallback(node => {\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: isWebKit154 ? duration : duration * 0.666,\n delay: isWebKit154 ? delay : delay || duration * 0.333,\n easing: transitionTimingFunction\n })].join(',');\n node.style.opacity = 0;\n node.style.transform = getScale(0.75);\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n const handleAddEndListener = next => {\n if (timeout === 'auto') {\n timer.start(autoTimeout.current || 0, next);\n }\n if (addEndListener) {\n // Old call signature before `react-transition-group` implemented `nodeRef`\n addEndListener(nodeRef.current, next);\n }\n };\n return /*#__PURE__*/_jsx(TransitionComponent, {\n appear: appear,\n in: inProp,\n nodeRef: nodeRef,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout === 'auto' ? null : timeout,\n ...other,\n children: (state, {\n ownerState,\n ...restChildProps\n }) => {\n return /*#__PURE__*/React.cloneElement(children, {\n style: {\n opacity: 0,\n transform: getScale(0.75),\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined,\n ...styles[state],\n ...style,\n ...children.props.style\n },\n ref: handleRef,\n ...restChildProps\n });\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Grow.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Add a custom transition end trigger. Called with the transitioning DOM\n * node and a done callback. Allows for more fine grained transition end\n * logic. Note: Timeouts are still used as a fallback if provided.\n */\n addEndListener: PropTypes.func,\n /**\n * Perform the enter transition when it first mounts if `in` is also `true`.\n * Set this to `false` to disable this behavior.\n * @default true\n */\n appear: PropTypes.bool,\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nif (Grow) {\n Grow.muiSupportAuto = true;\n}\nexport default Grow;","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nfunction isHostComponent(element) {\n return typeof element === 'string';\n}\nexport default isHostComponent;","import isHostComponent from \"../isHostComponent/index.js\";\n\n/**\n * Type of the ownerState based on the type of an element it applies to.\n * This resolves to the provided OwnerState for React components and `undefined` for host components.\n * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.\n */\n\n/**\n * Appends the ownerState object to the props, merging with the existing one if necessary.\n *\n * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.\n * @param otherProps Props of the element.\n * @param ownerState\n */\nfunction appendOwnerState(elementType, otherProps, ownerState) {\n if (elementType === undefined || isHostComponent(elementType)) {\n return otherProps;\n }\n return {\n ...otherProps,\n ownerState: {\n ...otherProps.ownerState,\n ...ownerState\n }\n };\n}\nexport default appendOwnerState;","/**\n * Extracts event handlers from a given object.\n * A prop is considered an event handler if it is a function and its name starts with `on`.\n *\n * @param object An object to extract event handlers from.\n * @param excludeKeys An array of keys to exclude from the returned object.\n */\nfunction extractEventHandlers(object, excludeKeys = []) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nexport default extractEventHandlers;","/**\n * Removes event handlers from the given object.\n * A field is considered an event handler if it is a function with a name beginning with `on`.\n *\n * @param object Object to remove event handlers from.\n * @returns Object with event handlers removed.\n */\nfunction omitEventHandlers(object) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nexport default omitEventHandlers;","import clsx from 'clsx';\nimport extractEventHandlers from \"../extractEventHandlers/index.js\";\nimport omitEventHandlers from \"../omitEventHandlers/index.js\";\n/**\n * Merges the slot component internal props (usually coming from a hook)\n * with the externally provided ones.\n *\n * The merge order is (the latter overrides the former):\n * 1. The internal props (specified as a getter function to work with get*Props hook result)\n * 2. Additional props (specified internally on a Base UI component)\n * 3. External props specified on the owner component. These should only be used on a root slot.\n * 4. External props specified in the `slotProps.*` prop.\n * 5. The `className` prop - combined from all the above.\n * @param parameters\n * @returns\n */\nfunction mergeSlotProps(parameters) {\n const {\n getSlotProps,\n additionalProps,\n externalSlotProps,\n externalForwardedProps,\n className\n } = parameters;\n if (!getSlotProps) {\n // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,\n // so we can simply merge all the props without having to worry about extracting event handlers.\n const joinedClasses = clsx(additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);\n const mergedStyle = {\n ...additionalProps?.style,\n ...externalForwardedProps?.style,\n ...externalSlotProps?.style\n };\n const props = {\n ...additionalProps,\n ...externalForwardedProps,\n ...externalSlotProps\n };\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: undefined\n };\n }\n\n // In this case, getSlotProps is responsible for calling the external event handlers.\n // We don't need to include them in the merged props because of this.\n\n const eventHandlers = extractEventHandlers({\n ...externalForwardedProps,\n ...externalSlotProps\n });\n const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);\n const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);\n const internalSlotProps = getSlotProps(eventHandlers);\n\n // The order of classes is important here.\n // Emotion (that we use in libraries consuming Base UI) depends on this order\n // to properly override style. It requires the most important classes to be last\n // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.\n const joinedClasses = clsx(internalSlotProps?.className, additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);\n const mergedStyle = {\n ...internalSlotProps?.style,\n ...additionalProps?.style,\n ...externalForwardedProps?.style,\n ...externalSlotProps?.style\n };\n const props = {\n ...internalSlotProps,\n ...additionalProps,\n ...otherPropsWithoutEventHandlers,\n ...componentsPropsWithoutEventHandlers\n };\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: internalSlotProps.ref\n };\n}\nexport default mergeSlotProps;","/**\n * If `componentProps` is a function, calls it with the provided `ownerState`.\n * Otherwise, just returns `componentProps`.\n */\nfunction resolveComponentProps(componentProps, ownerState, slotState) {\n if (typeof componentProps === 'function') {\n return componentProps(ownerState, slotState);\n }\n return componentProps;\n}\nexport default resolveComponentProps;","'use client';\n\nimport useForkRef from \"../useForkRef/index.js\";\nimport appendOwnerState from \"../appendOwnerState/index.js\";\nimport mergeSlotProps from \"../mergeSlotProps/index.js\";\nimport resolveComponentProps from \"../resolveComponentProps/index.js\";\n/**\n * @ignore - do not document.\n * Builds the props to be passed into the slot of an unstyled component.\n * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior.\n * If the slot component is not a host component, it also merges in the `ownerState`.\n *\n * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component.\n */\nfunction useSlotProps(parameters) {\n const {\n elementType,\n externalSlotProps,\n ownerState,\n skipResolvingSlotProps = false,\n ...other\n } = parameters;\n const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);\n const {\n props: mergedProps,\n internalRef\n } = mergeSlotProps({\n ...other,\n externalSlotProps: resolvedComponentsProps\n });\n const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.additionalProps?.ref);\n const props = appendOwnerState(elementType, {\n ...mergedProps,\n ref\n }, ownerState);\n return props;\n}\nexport default useSlotProps;","/**\n * TODO v5: consider making it private\n *\n * passes {value} to {ref}\n *\n * WARNING: Be sure to only call this inside a callback that is passed as a ref.\n * Otherwise, make sure to cleanup the previous {ref} if it changes. See\n * https://github.com/mui/material-ui/issues/13539\n *\n * Useful if you want to expose the ref of an inner component to the public API\n * while still using it inside the component.\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { exactProp, HTMLElementType, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef, unstable_setRef as setRef, unstable_getReactElementRef as getReactElementRef } from '@mui/utils';\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\n\n/**\n * Portals provide a first-class way to render children into a DOM node\n * that exists outside the DOM hierarchy of the parent component.\n *\n * Demos:\n *\n * - [Portal](https://v6.mui.com/material-ui/react-portal/)\n *\n * API:\n *\n * - [Portal API](https://v6.mui.com/material-ui/api/portal/)\n */\nconst Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef) {\n const {\n children,\n container,\n disablePortal = false\n } = props;\n const [mountNode, setMountNode] = React.useState(null);\n const handleRef = useForkRef(/*#__PURE__*/React.isValidElement(children) ? getReactElementRef(children) : null, forwardedRef);\n useEnhancedEffect(() => {\n if (!disablePortal) {\n setMountNode(getContainer(container) || document.body);\n }\n }, [container, disablePortal]);\n useEnhancedEffect(() => {\n if (mountNode && !disablePortal) {\n setRef(forwardedRef, mountNode);\n return () => {\n setRef(forwardedRef, null);\n };\n }\n return undefined;\n }, [forwardedRef, mountNode, disablePortal]);\n if (disablePortal) {\n if (/*#__PURE__*/React.isValidElement(children)) {\n const newProps = {\n ref: handleRef\n };\n return /*#__PURE__*/React.cloneElement(children, newProps);\n }\n return children;\n }\n return mountNode ? /*#__PURE__*/ReactDOM.createPortal(children, mountNode) : mountNode;\n});\nprocess.env.NODE_ENV !== \"production\" ? Portal.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The children to render into the `container`.\n */\n children: PropTypes.node,\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n Portal['propTypes' + ''] = exactProp(Portal.propTypes);\n}\nexport default Portal;","const defaultGenerator = componentName => componentName;\nconst createClassNameGenerator = () => {\n let generate = defaultGenerator;\n return {\n configure(generator) {\n generate = generator;\n },\n generate(componentName) {\n return generate(componentName);\n },\n reset() {\n generate = defaultGenerator;\n }\n };\n};\nconst ClassNameGenerator = createClassNameGenerator();\nexport default ClassNameGenerator;","import ClassNameGenerator from \"../ClassNameGenerator/index.js\";\nexport const globalStateClasses = {\n active: 'active',\n checked: 'checked',\n completed: 'completed',\n disabled: 'disabled',\n error: 'error',\n expanded: 'expanded',\n focused: 'focused',\n focusVisible: 'focusVisible',\n open: 'open',\n readOnly: 'readOnly',\n required: 'required',\n selected: 'selected'\n};\nexport default function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import generateUtilityClass from \"../generateUtilityClass/index.js\";\nexport default function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);\n });\n return result;\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPopperUtilityClass(slot) {\n return generateUtilityClass('MuiPopper', slot);\n}\nconst popperClasses = generateUtilityClasses('MuiPopper', ['root']);\nexport default popperClasses;","'use client';\n\nimport * as React from 'react';\nimport { chainPropTypes, HTMLElementType, refType, unstable_ownerDocument as ownerDocument, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef } from '@mui/utils';\nimport { createPopper } from '@popperjs/core';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport Portal from \"../Portal/index.js\";\nimport { getPopperUtilityClass } from \"./popperClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction flipPlacement(placement, direction) {\n if (direction === 'ltr') {\n return placement;\n }\n switch (placement) {\n case 'bottom-end':\n return 'bottom-start';\n case 'bottom-start':\n return 'bottom-end';\n case 'top-end':\n return 'top-start';\n case 'top-start':\n return 'top-end';\n default:\n return placement;\n }\n}\nfunction resolveAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\nfunction isHTMLElement(element) {\n return element.nodeType !== undefined;\n}\nfunction isVirtualElement(element) {\n return !isHTMLElement(element);\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getPopperUtilityClass, classes);\n};\nconst defaultPopperOptions = {};\nconst PopperTooltip = /*#__PURE__*/React.forwardRef(function PopperTooltip(props, forwardedRef) {\n const {\n anchorEl,\n children,\n direction,\n disablePortal,\n modifiers,\n open,\n placement: initialPlacement,\n popperOptions,\n popperRef: popperRefProp,\n slotProps = {},\n slots = {},\n TransitionProps,\n // @ts-ignore internal logic\n ownerState: ownerStateProp,\n // prevent from spreading to DOM, it can come from the parent component e.g. Select.\n ...other\n } = props;\n const tooltipRef = React.useRef(null);\n const ownRef = useForkRef(tooltipRef, forwardedRef);\n const popperRef = React.useRef(null);\n const handlePopperRef = useForkRef(popperRef, popperRefProp);\n const handlePopperRefRef = React.useRef(handlePopperRef);\n useEnhancedEffect(() => {\n handlePopperRefRef.current = handlePopperRef;\n }, [handlePopperRef]);\n React.useImperativeHandle(popperRefProp, () => popperRef.current, []);\n const rtlPlacement = flipPlacement(initialPlacement, direction);\n /**\n * placement initialized from prop but can change during lifetime if modifiers.flip.\n * modifiers.flip is essentially a flip for controlled/uncontrolled behavior\n */\n const [placement, setPlacement] = React.useState(rtlPlacement);\n const [resolvedAnchorElement, setResolvedAnchorElement] = React.useState(resolveAnchorEl(anchorEl));\n React.useEffect(() => {\n if (popperRef.current) {\n popperRef.current.forceUpdate();\n }\n });\n React.useEffect(() => {\n if (anchorEl) {\n setResolvedAnchorElement(resolveAnchorEl(anchorEl));\n }\n }, [anchorEl]);\n useEnhancedEffect(() => {\n if (!resolvedAnchorElement || !open) {\n return undefined;\n }\n const handlePopperUpdate = data => {\n setPlacement(data.placement);\n };\n if (process.env.NODE_ENV !== 'production') {\n if (resolvedAnchorElement && isHTMLElement(resolvedAnchorElement) && resolvedAnchorElement.nodeType === 1) {\n const box = resolvedAnchorElement.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n console.warn(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n }\n let popperModifiers = [{\n name: 'preventOverflow',\n options: {\n altBoundary: disablePortal\n }\n }, {\n name: 'flip',\n options: {\n altBoundary: disablePortal\n }\n }, {\n name: 'onUpdate',\n enabled: true,\n phase: 'afterWrite',\n fn: ({\n state\n }) => {\n handlePopperUpdate(state);\n }\n }];\n if (modifiers != null) {\n popperModifiers = popperModifiers.concat(modifiers);\n }\n if (popperOptions && popperOptions.modifiers != null) {\n popperModifiers = popperModifiers.concat(popperOptions.modifiers);\n }\n const popper = createPopper(resolvedAnchorElement, tooltipRef.current, {\n placement: rtlPlacement,\n ...popperOptions,\n modifiers: popperModifiers\n });\n handlePopperRefRef.current(popper);\n return () => {\n popper.destroy();\n handlePopperRefRef.current(null);\n };\n }, [resolvedAnchorElement, disablePortal, modifiers, open, popperOptions, rtlPlacement]);\n const childProps = {\n placement: placement\n };\n if (TransitionProps !== null) {\n childProps.TransitionProps = TransitionProps;\n }\n const classes = useUtilityClasses(props);\n const Root = slots.root ?? 'div';\n const rootProps = useSlotProps({\n elementType: Root,\n externalSlotProps: slotProps.root,\n externalForwardedProps: other,\n additionalProps: {\n role: 'tooltip',\n ref: ownRef\n },\n ownerState: props,\n className: classes.root\n });\n return /*#__PURE__*/_jsx(Root, {\n ...rootProps,\n children: typeof children === 'function' ? children(childProps) : children\n });\n});\n\n/**\n * @ignore - internal component.\n */\nconst Popper = /*#__PURE__*/React.forwardRef(function Popper(props, forwardedRef) {\n const {\n anchorEl,\n children,\n container: containerProp,\n direction = 'ltr',\n disablePortal = false,\n keepMounted = false,\n modifiers,\n open,\n placement = 'bottom',\n popperOptions = defaultPopperOptions,\n popperRef,\n style,\n transition = false,\n slotProps = {},\n slots = {},\n ...other\n } = props;\n const [exited, setExited] = React.useState(true);\n const handleEnter = () => {\n setExited(false);\n };\n const handleExited = () => {\n setExited(true);\n };\n if (!keepMounted && !open && (!transition || exited)) {\n return null;\n }\n\n // If the container prop is provided, use that\n // If the anchorEl prop is provided, use its parent body element as the container\n // If neither are provided let the Modal take care of choosing the container\n let container;\n if (containerProp) {\n container = containerProp;\n } else if (anchorEl) {\n const resolvedAnchorEl = resolveAnchorEl(anchorEl);\n container = resolvedAnchorEl && isHTMLElement(resolvedAnchorEl) ? ownerDocument(resolvedAnchorEl).body : ownerDocument(null).body;\n }\n const display = !open && keepMounted && (!transition || exited) ? 'none' : undefined;\n const transitionProps = transition ? {\n in: open,\n onEnter: handleEnter,\n onExited: handleExited\n } : undefined;\n return /*#__PURE__*/_jsx(Portal, {\n disablePortal: disablePortal,\n container: container,\n children: /*#__PURE__*/_jsx(PopperTooltip, {\n anchorEl: anchorEl,\n direction: direction,\n disablePortal: disablePortal,\n modifiers: modifiers,\n ref: forwardedRef,\n open: transition ? !exited : open,\n placement: placement,\n popperOptions: popperOptions,\n popperRef: popperRef,\n slotProps: slotProps,\n slots: slots,\n ...other,\n style: {\n // Prevents scroll issue, waiting for Popper.js to add this style once initiated.\n position: 'fixed',\n // Fix Popper.js display issue\n top: 0,\n left: 0,\n display,\n ...style\n },\n TransitionProps: transitionProps,\n children: children\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Popper.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),\n * or a function that returns either.\n * It's used to set the position of the popper.\n * The return value will passed as the reference object of the Popper instance.\n */\n anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]), props => {\n if (props.open) {\n const resolvedAnchorEl = resolveAnchorEl(props.anchorEl);\n if (resolvedAnchorEl && isHTMLElement(resolvedAnchorEl) && resolvedAnchorEl.nodeType === 1) {\n const box = resolvedAnchorEl.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n } else if (!resolvedAnchorEl || typeof resolvedAnchorEl.getBoundingClientRect !== 'function' || isVirtualElement(resolvedAnchorEl) && resolvedAnchorEl.contextElement != null && resolvedAnchorEl.contextElement.nodeType !== 1) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'It should be an HTML element instance or a virtualElement ', '(https://popper.js.org/docs/v2/virtual-elements/).'].join('\\n'));\n }\n }\n return null;\n }),\n /**\n * Popper render function or node.\n */\n children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * Direction of the text.\n * @default 'ltr'\n */\n direction: PropTypes.oneOf(['ltr', 'rtl']),\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Popper.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Popper.js is based on a \"plugin-like\" architecture,\n * most of its features are fully encapsulated \"modifiers\".\n *\n * A modifier is a function that is called each time Popper.js needs to\n * compute the position of the popper.\n * For this reason, modifiers should be very performant to avoid bottlenecks.\n * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).\n */\n modifiers: PropTypes.arrayOf(PropTypes.shape({\n data: PropTypes.object,\n effect: PropTypes.func,\n enabled: PropTypes.bool,\n fn: PropTypes.func,\n name: PropTypes.any,\n options: PropTypes.object,\n phase: PropTypes.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),\n requires: PropTypes.arrayOf(PropTypes.string),\n requiresIfExists: PropTypes.arrayOf(PropTypes.string)\n })),\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Popper placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.\n * @default {}\n */\n popperOptions: PropTypes.shape({\n modifiers: PropTypes.array,\n onFirstUpdate: PropTypes.func,\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n strategy: PropTypes.oneOf(['absolute', 'fixed'])\n }),\n /**\n * A ref that points to the used popper instance.\n */\n popperRef: refType,\n /**\n * The props used for each slot inside the Popper.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * Help supporting a react-transition-group/Transition component.\n * @default false\n */\n transition: PropTypes.bool\n} : void 0;\nexport default Popper;","'use client';\n\nimport { useRtl } from '@mui/system/RtlProvider';\nimport refType from '@mui/utils/refType';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport BasePopper from \"./BasePopper.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PopperRoot = styled(BasePopper, {\n name: 'MuiPopper',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\n\n/**\n *\n * Demos:\n *\n * - [Autocomplete](https://v6.mui.com/material-ui/react-autocomplete/)\n * - [Menu](https://v6.mui.com/material-ui/react-menu/)\n * - [Popper](https://v6.mui.com/material-ui/react-popper/)\n *\n * API:\n *\n * - [Popper API](https://v6.mui.com/material-ui/api/popper/)\n */\nconst Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {\n const isRtl = useRtl();\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiPopper'\n });\n const {\n anchorEl,\n component,\n components,\n componentsProps,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition,\n slots,\n slotProps,\n ...other\n } = props;\n const RootComponent = slots?.root ?? components?.Root;\n const otherProps = {\n anchorEl,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition,\n ...other\n };\n return /*#__PURE__*/_jsx(PopperRoot, {\n as: component,\n direction: isRtl ? 'rtl' : 'ltr',\n slots: {\n root: RootComponent\n },\n slotProps: slotProps ?? componentsProps,\n ...otherProps,\n ref: ref\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Popper.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),\n * or a function that returns either.\n * It's used to set the position of the popper.\n * The return value will passed as the reference object of the Popper instance.\n */\n anchorEl: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]),\n /**\n * Popper render function or node.\n */\n children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n /**\n * The props used for each slot inside the Popper.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).\n * @default {}\n */\n componentsProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Popper.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Popper.js is based on a \"plugin-like\" architecture,\n * most of its features are fully encapsulated \"modifiers\".\n *\n * A modifier is a function that is called each time Popper.js needs to\n * compute the position of the popper.\n * For this reason, modifiers should be very performant to avoid bottlenecks.\n * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).\n */\n modifiers: PropTypes.arrayOf(PropTypes.shape({\n data: PropTypes.object,\n effect: PropTypes.func,\n enabled: PropTypes.bool,\n fn: PropTypes.func,\n name: PropTypes.any,\n options: PropTypes.object,\n phase: PropTypes.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),\n requires: PropTypes.arrayOf(PropTypes.string),\n requiresIfExists: PropTypes.arrayOf(PropTypes.string)\n })),\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Popper placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.\n * @default {}\n */\n popperOptions: PropTypes.shape({\n modifiers: PropTypes.array,\n onFirstUpdate: PropTypes.func,\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n strategy: PropTypes.oneOf(['absolute', 'fixed'])\n }),\n /**\n * A ref that points to the used popper instance.\n */\n popperRef: refType,\n /**\n * The props used for each slot inside the Popper.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Help supporting a react-transition-group/Transition component.\n * @default false\n */\n transition: PropTypes.bool\n} : void 0;\nexport default Popper;","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from \"../useEnhancedEffect/index.js\";\n\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nexport default useEventCallback;","'use client';\n\nimport useEventCallback from '@mui/utils/useEventCallback';\nexport default useEventCallback;","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why\nconst safeReact = {\n ...React\n};\nconst maybeReactUseId = safeReact.useId;\n\n/**\n *\n * @example
\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n // React.useId() is only available from React 17.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? reactId;\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","'use client';\n\nimport useId from '@mui/utils/useId';\nexport default useId;","'use client';\n\n// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- process.env never changes, dependency arrays are intentionally ignored\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport default function useControlled({\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n}) {\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n // Object.is() is not equivalent to the === operator.\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is for more details.\n if (!isControlled && !Object.is(defaultValue, defaultProp)) {\n console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}","'use client';\n\nimport useControlled from '@mui/utils/useControlled';\nexport default useControlled;","'use client';\n\nimport useForkRef from '@mui/utils/useForkRef';\nimport appendOwnerState from '@mui/utils/appendOwnerState';\nimport resolveComponentProps from '@mui/utils/resolveComponentProps';\nimport mergeSlotProps from '@mui/utils/mergeSlotProps';\n/**\n * An internal function to create a Material UI slot.\n *\n * This is an advanced version of Base UI `useSlotProps` because Material UI allows leaf component to be customized via `component` prop\n * while Base UI does not need to support leaf component customization.\n *\n * @param {string} name: name of the slot\n * @param {object} parameters\n * @returns {[Slot, slotProps]} The slot's React component and the slot's props\n *\n * Note: the returned slot's props\n * - will never contain `component` prop.\n * - might contain `as` prop.\n */\nexport default function useSlot(\n/**\n * The slot's name. All Material UI components should have `root` slot.\n *\n * If the name is `root`, the logic behaves differently from other slots,\n * e.g. the `externalForwardedProps` are spread to `root` slot but not other slots.\n */\nname, parameters) {\n const {\n className,\n elementType: initialElementType,\n ownerState,\n externalForwardedProps,\n internalForwardedProps,\n shouldForwardComponentProp = false,\n ...useSlotPropsParams\n } = parameters;\n const {\n component: rootComponent,\n slots = {\n [name]: undefined\n },\n slotProps = {\n [name]: undefined\n },\n ...other\n } = externalForwardedProps;\n const elementType = slots[name] || initialElementType;\n\n // `slotProps[name]` can be a callback that receives the component's ownerState.\n // `resolvedComponentsProps` is always a plain object.\n const resolvedComponentsProps = resolveComponentProps(slotProps[name], ownerState);\n const {\n props: {\n component: slotComponent,\n ...mergedProps\n },\n internalRef\n } = mergeSlotProps({\n className,\n ...useSlotPropsParams,\n externalForwardedProps: name === 'root' ? other : undefined,\n externalSlotProps: resolvedComponentsProps\n });\n const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.ref);\n const LeafComponent = name === 'root' ? slotComponent || rootComponent : slotComponent;\n const props = appendOwnerState(elementType, {\n ...(name === 'root' && !rootComponent && !slots[name] && internalForwardedProps),\n ...(name !== 'root' && !slots[name] && internalForwardedProps),\n ...mergedProps,\n ...(LeafComponent && !shouldForwardComponentProp && {\n as: LeafComponent\n }),\n ...(LeafComponent && shouldForwardComponentProp && {\n component: LeafComponent\n }),\n ref\n }, ownerState);\n return [elementType, props];\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTooltipUtilityClass(slot) {\n return generateUtilityClass('MuiTooltip', slot);\n}\nconst tooltipClasses = generateUtilityClasses('MuiTooltip', ['popper', 'popperInteractive', 'popperArrow', 'popperClose', 'tooltip', 'tooltipArrow', 'touch', 'tooltipPlacementLeft', 'tooltipPlacementRight', 'tooltipPlacementTop', 'tooltipPlacementBottom', 'arrow']);\nexport default tooltipClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useTimeout, { Timeout } from '@mui/utils/useTimeout';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha } from '@mui/system/colorManipulator';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport isFocusVisible from '@mui/utils/isFocusVisible';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport { styled, useTheme } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport Grow from \"../Grow/index.js\";\nimport Popper from \"../Popper/index.js\";\nimport useEventCallback from \"../utils/useEventCallback.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useId from \"../utils/useId.js\";\nimport useControlled from \"../utils/useControlled.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport tooltipClasses, { getTooltipUtilityClass } from \"./tooltipClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableInteractive,\n arrow,\n touch,\n placement\n } = ownerState;\n const slots = {\n popper: ['popper', !disableInteractive && 'popperInteractive', arrow && 'popperArrow'],\n tooltip: ['tooltip', arrow && 'tooltipArrow', touch && 'touch', `tooltipPlacement${capitalize(placement.split('-')[0])}`],\n arrow: ['arrow']\n };\n return composeClasses(slots, getTooltipUtilityClass, classes);\n};\nconst TooltipPopper = styled(Popper, {\n name: 'MuiTooltip',\n slot: 'Popper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];\n }\n})(memoTheme(({\n theme\n}) => ({\n zIndex: (theme.vars || theme).zIndex.tooltip,\n pointerEvents: 'none',\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disableInteractive,\n style: {\n pointerEvents: 'auto'\n }\n }, {\n props: ({\n open\n }) => !open,\n style: {\n pointerEvents: 'none'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow,\n style: {\n [`&[data-popper-placement*=\"bottom\"] .${tooltipClasses.arrow}`]: {\n top: 0,\n marginTop: '-0.71em',\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n [`&[data-popper-placement*=\"top\"] .${tooltipClasses.arrow}`]: {\n bottom: 0,\n marginBottom: '-0.71em',\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '100% 100%'\n }\n },\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '0 0'\n }\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n left: 0,\n marginLeft: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !!ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n right: 0,\n marginRight: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n right: 0,\n marginRight: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !!ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n left: 0,\n marginLeft: '-0.71em'\n }\n }\n }]\n})));\nconst TooltipTooltip = styled('div', {\n name: 'MuiTooltip',\n slot: 'Tooltip',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles[`tooltipPlacement${capitalize(ownerState.placement.split('-')[0])}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.92),\n borderRadius: (theme.vars || theme).shape.borderRadius,\n color: (theme.vars || theme).palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(11),\n maxWidth: 300,\n margin: 2,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium,\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n transformOrigin: 'right center'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n transformOrigin: 'left center'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: {\n transformOrigin: 'center bottom',\n marginBottom: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: {\n transformOrigin: 'center top',\n marginTop: '14px'\n },\n variants: [{\n props: ({\n ownerState\n }) => ownerState.arrow,\n style: {\n position: 'relative',\n margin: 0\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: `${round(16 / 14)}em`,\n fontWeight: theme.typography.fontWeightRegular\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.isRtl,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginRight: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginLeft: '14px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.isRtl && ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginRight: '24px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginLeft: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.isRtl,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginLeft: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginRight: '14px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.isRtl && ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginLeft: '24px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginRight: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: {\n marginBottom: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: {\n marginTop: '24px'\n }\n }\n }]\n})));\nconst TooltipArrow = styled('span', {\n name: 'MuiTooltip',\n slot: 'Arrow',\n overridesResolver: (props, styles) => styles.arrow\n})(memoTheme(({\n theme\n}) => ({\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em' /* = width / sqrt(2) = (length of the hypotenuse) */,\n boxSizing: 'border-box',\n color: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n})));\nlet hystersisOpen = false;\nconst hystersisTimer = new Timeout();\nlet cursorPosition = {\n x: 0,\n y: 0\n};\nexport function testReset() {\n hystersisOpen = false;\n hystersisTimer.clear();\n}\nfunction composeEventHandler(handler, eventHandler) {\n return (event, ...params) => {\n if (eventHandler) {\n eventHandler(event, ...params);\n }\n handler(event, ...params);\n };\n}\n\n// TODO v6: Remove PopperComponent, PopperProps, TransitionComponent and TransitionProps.\nconst Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTooltip'\n });\n const {\n arrow = false,\n children: childrenProp,\n classes: classesProp,\n components = {},\n componentsProps = {},\n describeChild = false,\n disableFocusListener = false,\n disableHoverListener = false,\n disableInteractive: disableInteractiveProp = false,\n disableTouchListener = false,\n enterDelay = 100,\n enterNextDelay = 0,\n enterTouchDelay = 700,\n followCursor = false,\n id: idProp,\n leaveDelay = 0,\n leaveTouchDelay = 1500,\n onClose,\n onOpen,\n open: openProp,\n placement = 'bottom',\n PopperComponent: PopperComponentProp,\n PopperProps = {},\n slotProps = {},\n slots = {},\n title,\n TransitionComponent: TransitionComponentProp,\n TransitionProps,\n ...other\n } = props;\n\n // to prevent runtime errors, developers will need to provide a child as a React element anyway.\n const children = /*#__PURE__*/React.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/_jsx(\"span\", {\n children: childrenProp\n });\n const theme = useTheme();\n const isRtl = useRtl();\n const [childNode, setChildNode] = React.useState();\n const [arrowRef, setArrowRef] = React.useState(null);\n const ignoreNonTouchEvents = React.useRef(false);\n const disableInteractive = disableInteractiveProp || followCursor;\n const closeTimer = useTimeout();\n const enterTimer = useTimeout();\n const leaveTimer = useTimeout();\n const touchTimer = useTimeout();\n const [openState, setOpenState] = useControlled({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n });\n let open = openState;\n if (process.env.NODE_ENV !== 'production') {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n const {\n current: isControlled\n } = React.useRef(openProp !== undefined);\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n React.useEffect(() => {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.warn(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n const id = useId(idProp);\n const prevUserSelect = React.useRef();\n const stopTouchInteraction = useEventCallback(() => {\n if (prevUserSelect.current !== undefined) {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n prevUserSelect.current = undefined;\n }\n touchTimer.clear();\n });\n React.useEffect(() => stopTouchInteraction, [stopTouchInteraction]);\n const handleOpen = event => {\n hystersisTimer.clear();\n hystersisOpen = true;\n\n // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n setOpenState(true);\n if (onOpen && !open) {\n onOpen(event);\n }\n };\n const handleClose = useEventCallback(\n /**\n * @param {React.SyntheticEvent | Event} event\n */\n event => {\n hystersisTimer.start(800 + leaveDelay, () => {\n hystersisOpen = false;\n });\n setOpenState(false);\n if (onClose && open) {\n onClose(event);\n }\n closeTimer.start(theme.transitions.duration.shortest, () => {\n ignoreNonTouchEvents.current = false;\n });\n });\n const handleMouseOver = event => {\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n }\n\n // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n if (childNode) {\n childNode.removeAttribute('title');\n }\n enterTimer.clear();\n leaveTimer.clear();\n if (enterDelay || hystersisOpen && enterNextDelay) {\n enterTimer.start(hystersisOpen ? enterNextDelay : enterDelay, () => {\n handleOpen(event);\n });\n } else {\n handleOpen(event);\n }\n };\n const handleMouseLeave = event => {\n enterTimer.clear();\n leaveTimer.start(leaveDelay, () => {\n handleClose(event);\n });\n };\n const [, setChildIsFocusVisible] = React.useState(false);\n const handleBlur = event => {\n if (!isFocusVisible(event.target)) {\n setChildIsFocusVisible(false);\n handleMouseLeave(event);\n }\n };\n const handleFocus = event => {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n if (isFocusVisible(event.target)) {\n setChildIsFocusVisible(true);\n handleMouseOver(event);\n }\n };\n const detectTouchStart = event => {\n ignoreNonTouchEvents.current = true;\n const childrenProps = children.props;\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n const handleTouchStart = event => {\n detectTouchStart(event);\n leaveTimer.clear();\n closeTimer.clear();\n stopTouchInteraction();\n prevUserSelect.current = document.body.style.WebkitUserSelect;\n // Prevent iOS text selection on long-tap.\n document.body.style.WebkitUserSelect = 'none';\n touchTimer.start(enterTouchDelay, () => {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n handleMouseOver(event);\n });\n };\n const handleTouchEnd = event => {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n stopTouchInteraction();\n leaveTimer.start(leaveTouchDelay, () => {\n handleClose(event);\n });\n };\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n\n /**\n * @param {KeyboardEvent} nativeEvent\n */\n function handleKeyDown(nativeEvent) {\n if (nativeEvent.key === 'Escape') {\n handleClose(nativeEvent);\n }\n }\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleClose, open]);\n const handleRef = useForkRef(getReactElementRef(children), setChildNode, ref);\n\n // There is no point in displaying an empty tooltip.\n // So we exclude all falsy values, except 0, which is valid.\n if (!title && title !== 0) {\n open = false;\n }\n const popperRef = React.useRef();\n const handleMouseMove = event => {\n const childrenProps = children.props;\n if (childrenProps.onMouseMove) {\n childrenProps.onMouseMove(event);\n }\n cursorPosition = {\n x: event.clientX,\n y: event.clientY\n };\n if (popperRef.current) {\n popperRef.current.update();\n }\n };\n const nameOrDescProps = {};\n const titleIsString = typeof title === 'string';\n if (describeChild) {\n nameOrDescProps.title = !open && titleIsString && !disableHoverListener ? title : null;\n nameOrDescProps['aria-describedby'] = open ? id : null;\n } else {\n nameOrDescProps['aria-label'] = titleIsString ? title : null;\n nameOrDescProps['aria-labelledby'] = open && !titleIsString ? id : null;\n }\n const childrenProps = {\n ...nameOrDescProps,\n ...other,\n ...children.props,\n className: clsx(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef,\n ...(followCursor ? {\n onMouseMove: handleMouseMove\n } : {})\n };\n if (process.env.NODE_ENV !== 'production') {\n childrenProps['data-mui-internal-clone-element'] = true;\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n React.useEffect(() => {\n if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {\n console.error(['MUI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\\n'));\n }\n }, [childNode]);\n }\n const interactiveWrapperListeners = {};\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n if (!disableHoverListener) {\n childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);\n childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);\n if (!disableInteractive) {\n interactiveWrapperListeners.onMouseOver = handleMouseOver;\n interactiveWrapperListeners.onMouseLeave = handleMouseLeave;\n }\n }\n if (!disableFocusListener) {\n childrenProps.onFocus = composeEventHandler(handleFocus, childrenProps.onFocus);\n childrenProps.onBlur = composeEventHandler(handleBlur, childrenProps.onBlur);\n if (!disableInteractive) {\n interactiveWrapperListeners.onFocus = handleFocus;\n interactiveWrapperListeners.onBlur = handleBlur;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (children.props.title) {\n console.error(['MUI: You have provided a `title` prop to the child of .', `Remove this title prop \\`${children.props.title}\\` or the Tooltip component.`].join('\\n'));\n }\n }\n const ownerState = {\n ...props,\n isRtl,\n arrow,\n disableInteractive,\n placement,\n PopperComponentProp,\n touch: ignoreNonTouchEvents.current\n };\n const resolvedPopperProps = typeof slotProps.popper === 'function' ? slotProps.popper(ownerState) : slotProps.popper;\n const popperOptions = React.useMemo(() => {\n let tooltipModifiers = [{\n name: 'arrow',\n enabled: Boolean(arrowRef),\n options: {\n element: arrowRef,\n padding: 4\n }\n }];\n if (PopperProps.popperOptions?.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);\n }\n if (resolvedPopperProps?.popperOptions?.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(resolvedPopperProps.popperOptions.modifiers);\n }\n return {\n ...PopperProps.popperOptions,\n ...resolvedPopperProps?.popperOptions,\n modifiers: tooltipModifiers\n };\n }, [arrowRef, PopperProps.popperOptions, resolvedPopperProps?.popperOptions]);\n const classes = useUtilityClasses(ownerState);\n const resolvedTransitionProps = typeof slotProps.transition === 'function' ? slotProps.transition(ownerState) : slotProps.transition;\n const externalForwardedProps = {\n slots: {\n popper: components.Popper,\n transition: components.Transition ?? TransitionComponentProp,\n tooltip: components.Tooltip,\n arrow: components.Arrow,\n ...slots\n },\n slotProps: {\n arrow: slotProps.arrow ?? componentsProps.arrow,\n popper: {\n ...PopperProps,\n ...(resolvedPopperProps ?? componentsProps.popper)\n },\n // resolvedPopperProps can be spread because it's already an object\n tooltip: slotProps.tooltip ?? componentsProps.tooltip,\n transition: {\n ...TransitionProps,\n ...(resolvedTransitionProps ?? componentsProps.transition)\n }\n }\n };\n const [PopperSlot, popperSlotProps] = useSlot('popper', {\n elementType: TooltipPopper,\n externalForwardedProps,\n ownerState,\n className: clsx(classes.popper, PopperProps?.className)\n });\n const [TransitionSlot, transitionSlotProps] = useSlot('transition', {\n elementType: Grow,\n externalForwardedProps,\n ownerState\n });\n const [TooltipSlot, tooltipSlotProps] = useSlot('tooltip', {\n elementType: TooltipTooltip,\n className: classes.tooltip,\n externalForwardedProps,\n ownerState\n });\n const [ArrowSlot, arrowSlotProps] = useSlot('arrow', {\n elementType: TooltipArrow,\n className: classes.arrow,\n externalForwardedProps,\n ownerState,\n ref: setArrowRef\n });\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/_jsx(PopperSlot, {\n as: PopperComponentProp ?? Popper,\n placement: placement,\n anchorEl: followCursor ? {\n getBoundingClientRect: () => ({\n top: cursorPosition.y,\n left: cursorPosition.x,\n right: cursorPosition.x,\n bottom: cursorPosition.y,\n width: 0,\n height: 0\n })\n } : childNode,\n popperRef: popperRef,\n open: childNode ? open : false,\n id: id,\n transition: true,\n ...interactiveWrapperListeners,\n ...popperSlotProps,\n popperOptions: popperOptions,\n children: ({\n TransitionProps: TransitionPropsInner\n }) => /*#__PURE__*/_jsx(TransitionSlot, {\n timeout: theme.transitions.duration.shorter,\n ...TransitionPropsInner,\n ...transitionSlotProps,\n children: /*#__PURE__*/_jsxs(TooltipSlot, {\n ...tooltipSlotProps,\n children: [title, arrow ? /*#__PURE__*/_jsx(ArrowSlot, {\n ...arrowSlotProps\n }) : null]\n })\n })\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Tooltip.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, adds an arrow to the tooltip.\n * @default false\n */\n arrow: PropTypes.bool,\n /**\n * Tooltip reference element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Arrow: PropTypes.elementType,\n Popper: PropTypes.elementType,\n Tooltip: PropTypes.elementType,\n Transition: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n arrow: PropTypes.object,\n popper: PropTypes.object,\n tooltip: PropTypes.object,\n transition: PropTypes.object\n }),\n /**\n * Set to `true` if the `title` acts as an accessible description.\n * By default the `title` acts as an accessible label for the child.\n * @default false\n */\n describeChild: PropTypes.bool,\n /**\n * Do not respond to focus-visible events.\n * @default false\n */\n disableFocusListener: PropTypes.bool,\n /**\n * Do not respond to hover events.\n * @default false\n */\n disableHoverListener: PropTypes.bool,\n /**\n * Makes a tooltip not interactive, i.e. it will close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n * @default false\n */\n disableInteractive: PropTypes.bool,\n /**\n * Do not respond to long press touch events.\n * @default false\n */\n disableTouchListener: PropTypes.bool,\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n * @default 100\n */\n enterDelay: PropTypes.number,\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n * @default 0\n */\n enterNextDelay: PropTypes.number,\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n * @default 700\n */\n enterTouchDelay: PropTypes.number,\n /**\n * If `true`, the tooltip follow the cursor over the wrapped element.\n * @default false\n */\n followCursor: PropTypes.bool,\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: PropTypes.string,\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n * @default 0\n */\n leaveDelay: PropTypes.number,\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n * @default 1500\n */\n leaveTouchDelay: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool,\n /**\n * Tooltip placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * The component used for the popper.\n * @deprecated use the `slots.popper` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n PopperComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Popper`](https://mui.com/material-ui/api/popper/) element.\n * @deprecated use the `slotProps.popper` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n PopperProps: PropTypes.object,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n arrow: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n popper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n tooltip: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n arrow: PropTypes.elementType,\n popper: PropTypes.elementType,\n tooltip: PropTypes.elementType,\n transition: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.\n */\n title: PropTypes.node,\n /**\n * The component used for the transition.\n * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @deprecated use the `slots.transition` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.\n * @deprecated use the `slotProps.transition` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Tooltip;","import ownerDocument from '@mui/utils/ownerDocument';\nexport default ownerDocument;","'use client';\n\nimport * as React from 'react';\n\n/**\n * @ignore - internal component.\n */\nconst ListContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n ListContext.displayName = 'ListContext';\n}\nexport default ListContext;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListUtilityClass(slot) {\n return generateUtilityClass('MuiList', slot);\n}\nconst listClasses = generateUtilityClasses('MuiList', ['root', 'padding', 'dense', 'subheader']);\nexport default listClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport ListContext from \"./ListContext.js\";\nimport { getListUtilityClass } from \"./listClasses.js\";\nimport { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disablePadding,\n dense,\n subheader\n } = ownerState;\n const slots = {\n root: ['root', !disablePadding && 'padding', dense && 'dense', subheader && 'subheader']\n };\n return composeClasses(slots, getListUtilityClass, classes);\n};\nconst ListRoot = styled('ul', {\n name: 'MuiList',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disablePadding && styles.padding, ownerState.dense && styles.dense, ownerState.subheader && styles.subheader];\n }\n})({\n listStyle: 'none',\n margin: 0,\n padding: 0,\n position: 'relative',\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disablePadding,\n style: {\n paddingTop: 8,\n paddingBottom: 8\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.subheader,\n style: {\n paddingTop: 0\n }\n }]\n});\nconst List = /*#__PURE__*/React.forwardRef(function List(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiList'\n });\n const {\n children,\n className,\n component = 'ul',\n dense = false,\n disablePadding = false,\n subheader,\n ...other\n } = props;\n const context = React.useMemo(() => ({\n dense\n }), [dense]);\n const ownerState = {\n ...props,\n component,\n dense,\n disablePadding\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: context,\n children: /*#__PURE__*/_jsxs(ListRoot, {\n as: component,\n className: clsx(classes.root, className),\n ref: ref,\n ownerState: ownerState,\n ...other,\n children: [subheader, children]\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? List.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used for\n * the list and list items.\n * The prop is available to descendant components as the `dense` context.\n * @default false\n */\n dense: PropTypes.bool,\n /**\n * If `true`, vertical padding is removed from the list.\n * @default false\n */\n disablePadding: PropTypes.bool,\n /**\n * The content of the subheader, normally `ListSubheader`.\n */\n subheader: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default List;","// A change of the browser zoom change the scrollbar size.\n// Credit https://github.com/twbs/bootstrap/blob/488fd8afc535ca3a6ad4dc581f5e89217b6a36ac/js/src/util/scrollbar.js#L14-L18\nexport default function getScrollbarSize(win = window) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = win.document.documentElement.clientWidth;\n return win.innerWidth - documentWidth;\n}","import getScrollbarSize from '@mui/utils/getScrollbarSize';\nexport default getScrollbarSize;","'use client';\n\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nexport default useEnhancedEffect;","import ownerDocument from \"../ownerDocument/index.js\";\nexport default function ownerWindow(node) {\n const doc = ownerDocument(node);\n return doc.defaultView || window;\n}","import ownerWindow from '@mui/utils/ownerWindow';\nexport default ownerWindow;","'use client';\n\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport ownerDocument from \"../utils/ownerDocument.js\";\nimport List from \"../List/index.js\";\nimport getScrollbarSize from \"../utils/getScrollbarSize.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useEnhancedEffect from \"../utils/useEnhancedEffect.js\";\nimport { ownerWindow } from \"../utils/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction nextItem(list, item, disableListWrap) {\n if (list === item) {\n return list.firstChild;\n }\n if (item && item.nextElementSibling) {\n return item.nextElementSibling;\n }\n return disableListWrap ? null : list.firstChild;\n}\nfunction previousItem(list, item, disableListWrap) {\n if (list === item) {\n return disableListWrap ? list.firstChild : list.lastChild;\n }\n if (item && item.previousElementSibling) {\n return item.previousElementSibling;\n }\n return disableListWrap ? null : list.lastChild;\n}\nfunction textCriteriaMatches(nextFocus, textCriteria) {\n if (textCriteria === undefined) {\n return true;\n }\n let text = nextFocus.innerText;\n if (text === undefined) {\n // jsdom doesn't support innerText\n text = nextFocus.textContent;\n }\n text = text.trim().toLowerCase();\n if (text.length === 0) {\n return false;\n }\n if (textCriteria.repeating) {\n return text[0] === textCriteria.keys[0];\n }\n return text.startsWith(textCriteria.keys.join(''));\n}\nfunction moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, traversalFunction, textCriteria) {\n let wrappedOnce = false;\n let nextFocus = traversalFunction(list, currentFocus, currentFocus ? disableListWrap : false);\n while (nextFocus) {\n // Prevent infinite loop.\n if (nextFocus === list.firstChild) {\n if (wrappedOnce) {\n return false;\n }\n wrappedOnce = true;\n }\n\n // Same logic as useAutocomplete.js\n const nextFocusDisabled = disabledItemsFocusable ? false : nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';\n if (!nextFocus.hasAttribute('tabindex') || !textCriteriaMatches(nextFocus, textCriteria) || nextFocusDisabled) {\n // Move to the next element.\n nextFocus = traversalFunction(list, nextFocus, disableListWrap);\n } else {\n nextFocus.focus();\n return true;\n }\n }\n return false;\n}\n\n/**\n * A permanently displayed menu following https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/.\n * It's exposed to help customization of the [`Menu`](/material-ui/api/menu/) component if you\n * use it separately you need to move focus into the component manually. Once\n * the focus is placed inside the component it is fully keyboard accessible.\n */\nconst MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {\n const {\n // private\n // eslint-disable-next-line react/prop-types\n actions,\n autoFocus = false,\n autoFocusItem = false,\n children,\n className,\n disabledItemsFocusable = false,\n disableListWrap = false,\n onKeyDown,\n variant = 'selectedMenu',\n ...other\n } = props;\n const listRef = React.useRef(null);\n const textCriteriaRef = React.useRef({\n keys: [],\n repeating: true,\n previousKeyMatched: true,\n lastTime: null\n });\n useEnhancedEffect(() => {\n if (autoFocus) {\n listRef.current.focus();\n }\n }, [autoFocus]);\n React.useImperativeHandle(actions, () => ({\n adjustStyleForScrollbar: (containerElement, {\n direction\n }) => {\n // Let's ignore that piece of logic if users are already overriding the width\n // of the menu.\n const noExplicitWidth = !listRef.current.style.width;\n if (containerElement.clientHeight < listRef.current.clientHeight && noExplicitWidth) {\n const scrollbarSize = `${getScrollbarSize(ownerWindow(containerElement))}px`;\n listRef.current.style[direction === 'rtl' ? 'paddingLeft' : 'paddingRight'] = scrollbarSize;\n listRef.current.style.width = `calc(100% + ${scrollbarSize})`;\n }\n return listRef.current;\n }\n }), []);\n const handleKeyDown = event => {\n const list = listRef.current;\n const key = event.key;\n const isModifierKeyPressed = event.ctrlKey || event.metaKey || event.altKey;\n if (isModifierKeyPressed) {\n if (onKeyDown) {\n onKeyDown(event);\n }\n return;\n }\n\n /**\n * @type {Element} - will always be defined since we are in a keydown handler\n * attached to an element. A keydown event is either dispatched to the activeElement\n * or document.body or document.documentElement. Only the first case will\n * trigger this specific handler.\n */\n const currentFocus = ownerDocument(list).activeElement;\n if (key === 'ArrowDown') {\n // Prevent scroll of the page\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'ArrowUp') {\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key === 'Home') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'End') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key.length === 1) {\n const criteria = textCriteriaRef.current;\n const lowerKey = key.toLowerCase();\n const currTime = performance.now();\n if (criteria.keys.length > 0) {\n // Reset\n if (currTime - criteria.lastTime > 500) {\n criteria.keys = [];\n criteria.repeating = true;\n criteria.previousKeyMatched = true;\n } else if (criteria.repeating && lowerKey !== criteria.keys[0]) {\n criteria.repeating = false;\n }\n }\n criteria.lastTime = currTime;\n criteria.keys.push(lowerKey);\n const keepFocusOnCurrent = currentFocus && !criteria.repeating && textCriteriaMatches(currentFocus, criteria);\n if (criteria.previousKeyMatched && (keepFocusOnCurrent || moveFocus(list, currentFocus, false, disabledItemsFocusable, nextItem, criteria))) {\n event.preventDefault();\n } else {\n criteria.previousKeyMatched = false;\n }\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n const handleRef = useForkRef(listRef, ref);\n\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n let activeItemIndex = -1;\n // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n React.Children.forEach(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n if (activeItemIndex === index) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n if (activeItemIndex === index && (child.props.disabled || child.props.muiSkipListHighlight || child.type.muiSkipListHighlight)) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n });\n const items = React.Children.map(children, (child, index) => {\n if (index === activeItemIndex) {\n const newChildProps = {};\n if (autoFocusItem) {\n newChildProps.autoFocus = true;\n }\n if (child.props.tabIndex === undefined && variant === 'selectedMenu') {\n newChildProps.tabIndex = 0;\n }\n return /*#__PURE__*/React.cloneElement(child, newChildProps);\n }\n return child;\n });\n return /*#__PURE__*/_jsx(List, {\n role: \"menu\",\n ref: handleRef,\n className: className,\n onKeyDown: handleKeyDown,\n tabIndex: autoFocus ? 0 : -1,\n ...other,\n children: items\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuList.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, will focus the `[role=\"menu\"]` container and move into tab order.\n * @default false\n */\n autoFocus: PropTypes.bool,\n /**\n * If `true`, will focus the first menuitem if `variant=\"menu\"` or selected item\n * if `variant=\"selectedMenu\"`.\n * @default false\n */\n autoFocusItem: PropTypes.bool,\n /**\n * MenuList contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, will allow focus on disabled items.\n * @default false\n */\n disabledItemsFocusable: PropTypes.bool,\n /**\n * If `true`, the menu items will not wrap focus.\n * @default false\n */\n disableListWrap: PropTypes.bool,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus\n * and the vertical alignment relative to the anchor element.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default MenuList;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getDividerUtilityClass(slot) {\n return generateUtilityClass('MuiDivider', slot);\n}\nconst dividerClasses = generateUtilityClasses('MuiDivider', ['root', 'absolute', 'fullWidth', 'inset', 'middle', 'flexItem', 'light', 'vertical', 'withChildren', 'withChildrenVertical', 'textAlignRight', 'textAlignLeft', 'wrapper', 'wrapperVertical']);\nexport default dividerClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha } from '@mui/system/colorManipulator';\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getDividerUtilityClass } from \"./dividerClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n absolute,\n children,\n classes,\n flexItem,\n light,\n orientation,\n textAlign,\n variant\n } = ownerState;\n const slots = {\n root: ['root', absolute && 'absolute', variant, light && 'light', orientation === 'vertical' && 'vertical', flexItem && 'flexItem', children && 'withChildren', children && orientation === 'vertical' && 'withChildrenVertical', textAlign === 'right' && orientation !== 'vertical' && 'textAlignRight', textAlign === 'left' && orientation !== 'vertical' && 'textAlignLeft'],\n wrapper: ['wrapper', orientation === 'vertical' && 'wrapperVertical']\n };\n return composeClasses(slots, getDividerUtilityClass, classes);\n};\nconst DividerRoot = styled('div', {\n name: 'MuiDivider',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.absolute && styles.absolute, styles[ownerState.variant], ownerState.light && styles.light, ownerState.orientation === 'vertical' && styles.vertical, ownerState.flexItem && styles.flexItem, ownerState.children && styles.withChildren, ownerState.children && ownerState.orientation === 'vertical' && styles.withChildrenVertical, ownerState.textAlign === 'right' && ownerState.orientation !== 'vertical' && styles.textAlignRight, ownerState.textAlign === 'left' && ownerState.orientation !== 'vertical' && styles.textAlignLeft];\n }\n})(memoTheme(({\n theme\n}) => ({\n margin: 0,\n // Reset browser default style.\n flexShrink: 0,\n borderWidth: 0,\n borderStyle: 'solid',\n borderColor: (theme.vars || theme).palette.divider,\n borderBottomWidth: 'thin',\n variants: [{\n props: {\n absolute: true\n },\n style: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n width: '100%'\n }\n }, {\n props: {\n light: true\n },\n style: {\n borderColor: theme.vars ? `rgba(${theme.vars.palette.dividerChannel} / 0.08)` : alpha(theme.palette.divider, 0.08)\n }\n }, {\n props: {\n variant: 'inset'\n },\n style: {\n marginLeft: 72\n }\n }, {\n props: {\n variant: 'middle',\n orientation: 'horizontal'\n },\n style: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2)\n }\n }, {\n props: {\n variant: 'middle',\n orientation: 'vertical'\n },\n style: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n }\n }, {\n props: {\n orientation: 'vertical'\n },\n style: {\n height: '100%',\n borderBottomWidth: 0,\n borderRightWidth: 'thin'\n }\n }, {\n props: {\n flexItem: true\n },\n style: {\n alignSelf: 'stretch',\n height: 'auto'\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.children,\n style: {\n display: 'flex',\n textAlign: 'center',\n border: 0,\n borderTopStyle: 'solid',\n borderLeftStyle: 'solid',\n '&::before, &::after': {\n content: '\"\"',\n alignSelf: 'center'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.children && ownerState.orientation !== 'vertical',\n style: {\n '&::before, &::after': {\n width: '100%',\n borderTop: `thin solid ${(theme.vars || theme).palette.divider}`,\n borderTopStyle: 'inherit'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.orientation === 'vertical' && ownerState.children,\n style: {\n flexDirection: 'column',\n '&::before, &::after': {\n height: '100%',\n borderLeft: `thin solid ${(theme.vars || theme).palette.divider}`,\n borderLeftStyle: 'inherit'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.textAlign === 'right' && ownerState.orientation !== 'vertical',\n style: {\n '&::before': {\n width: '90%'\n },\n '&::after': {\n width: '10%'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.textAlign === 'left' && ownerState.orientation !== 'vertical',\n style: {\n '&::before': {\n width: '10%'\n },\n '&::after': {\n width: '90%'\n }\n }\n }]\n})));\nconst DividerWrapper = styled('span', {\n name: 'MuiDivider',\n slot: 'Wrapper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.wrapper, ownerState.orientation === 'vertical' && styles.wrapperVertical];\n }\n})(memoTheme(({\n theme\n}) => ({\n display: 'inline-block',\n paddingLeft: `calc(${theme.spacing(1)} * 1.2)`,\n paddingRight: `calc(${theme.spacing(1)} * 1.2)`,\n whiteSpace: 'nowrap',\n variants: [{\n props: {\n orientation: 'vertical'\n },\n style: {\n paddingTop: `calc(${theme.spacing(1)} * 1.2)`,\n paddingBottom: `calc(${theme.spacing(1)} * 1.2)`\n }\n }]\n})));\nconst Divider = /*#__PURE__*/React.forwardRef(function Divider(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiDivider'\n });\n const {\n absolute = false,\n children,\n className,\n orientation = 'horizontal',\n component = children || orientation === 'vertical' ? 'div' : 'hr',\n flexItem = false,\n light = false,\n role = component !== 'hr' ? 'separator' : undefined,\n textAlign = 'center',\n variant = 'fullWidth',\n ...other\n } = props;\n const ownerState = {\n ...props,\n absolute,\n component,\n flexItem,\n light,\n orientation,\n role,\n textAlign,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(DividerRoot, {\n as: component,\n className: clsx(classes.root, className),\n role: role,\n ref: ref,\n ownerState: ownerState,\n \"aria-orientation\": role === 'separator' && (component !== 'hr' || orientation === 'vertical') ? orientation : undefined,\n ...other,\n children: children ? /*#__PURE__*/_jsx(DividerWrapper, {\n className: classes.wrapper,\n ownerState: ownerState,\n children: children\n }) : null\n });\n});\n\n/**\n * The following flag is used to ensure that this component isn't tabbable i.e.\n * does not get highlight/focus inside of MUI List.\n */\nif (Divider) {\n Divider.muiSkipListHighlight = true;\n}\nprocess.env.NODE_ENV !== \"production\" ? Divider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Absolutely position the element.\n * @default false\n */\n absolute: PropTypes.bool,\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, a vertical divider will have the correct height when used in flex container.\n * (By default, a vertical divider will have a calculated height of `0px` if it is the child of a flex container.)\n * @default false\n */\n flexItem: PropTypes.bool,\n /**\n * If `true`, the divider will have a lighter color.\n * @default false\n * @deprecated Use (or any opacity or color) instead. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n light: PropTypes.bool,\n /**\n * The component orientation.\n * @default 'horizontal'\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n /**\n * @ignore\n */\n role: PropTypes /* @typescript-to-proptypes-ignore */.string,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The text alignment.\n * @default 'center'\n */\n textAlign: PropTypes.oneOf(['center', 'left', 'right']),\n /**\n * The variant to use.\n * @default 'fullWidth'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['fullWidth', 'inset', 'middle']), PropTypes.string])\n} : void 0;\nexport default Divider;","/**\n * Type guard to check if the object has a \"main\" property of type string.\n *\n * @param obj - the object to check\n * @returns boolean\n */\nfunction hasCorrectMainProperty(obj) {\n return typeof obj.main === 'string';\n}\n/**\n * Checks if the object conforms to the SimplePaletteColorOptions type.\n * The minimum requirement is that the object has a \"main\" property of type string, this is always checked.\n * Optionally, you can pass additional properties to check.\n *\n * @param obj - The object to check\n * @param additionalPropertiesToCheck - Array containing \"light\", \"dark\", and/or \"contrastText\"\n * @returns boolean\n */\nfunction checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {\n if (!hasCorrectMainProperty(obj)) {\n return false;\n }\n for (const value of additionalPropertiesToCheck) {\n if (!obj.hasOwnProperty(value) || typeof obj[value] !== 'string') {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Creates a filter function used to filter simple palette color options.\n * The minimum requirement is that the object has a \"main\" property of type string, this is always checked.\n * Optionally, you can pass additional properties to check.\n *\n * @param additionalPropertiesToCheck - Array containing \"light\", \"dark\", and/or \"contrastText\"\n * @returns ([, value]: [any, PaletteColorOptions]) => boolean\n */\nexport default function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {\n return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);\n}","'use client';\n\nimport * as React from 'react';\nimport useLazyRef from '@mui/utils/useLazyRef';\n/**\n * Lazy initialization container for the Ripple instance. This improves\n * performance by delaying mounting the ripple until it's needed.\n */\nexport class LazyRipple {\n /** React ref to the ripple instance */\n\n /** If the ripple component should be mounted */\n\n /** Promise that resolves when the ripple component is mounted */\n\n /** If the ripple component has been mounted */\n\n /** React state hook setter */\n\n static create() {\n return new LazyRipple();\n }\n static use() {\n /* eslint-disable */\n const ripple = useLazyRef(LazyRipple.create).current;\n const [shouldMount, setShouldMount] = React.useState(false);\n ripple.shouldMount = shouldMount;\n ripple.setShouldMount = setShouldMount;\n React.useEffect(ripple.mountEffect, [shouldMount]);\n /* eslint-enable */\n\n return ripple;\n }\n constructor() {\n this.ref = {\n current: null\n };\n this.mounted = null;\n this.didMount = false;\n this.shouldMount = false;\n this.setShouldMount = null;\n }\n mount() {\n if (!this.mounted) {\n this.mounted = createControlledPromise();\n this.shouldMount = true;\n this.setShouldMount(this.shouldMount);\n }\n return this.mounted;\n }\n mountEffect = () => {\n if (this.shouldMount && !this.didMount) {\n if (this.ref.current !== null) {\n this.didMount = true;\n this.mounted.resolve();\n }\n }\n };\n\n /* Ripple API */\n\n start(...args) {\n this.mount().then(() => this.ref.current?.start(...args));\n }\n stop(...args) {\n this.mount().then(() => this.ref.current?.stop(...args));\n }\n pulsate(...args) {\n this.mount().then(() => this.ref.current?.pulsate(...args));\n }\n}\nexport default function useLazyRipple() {\n return LazyRipple.use();\n}\nfunction createControlledPromise() {\n let resolve;\n let reject;\n const p = new Promise((resolveFn, rejectFn) => {\n resolve = resolveFn;\n reject = rejectFn;\n });\n p.resolve = resolve;\n p.reject = reject;\n return p;\n}","import { Children, cloneElement, isValidElement } from 'react';\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\n\nexport function getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && isValidElement(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\nexport function mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nexport function getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\nexport function getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!isValidElement(child)) return;\n var hasPrev = (key in prevChildMapping);\n var hasNext = (key in nextChildMapping);\n var prevChild = prevChildMapping[key];\n var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = cloneElement(child, {\n in: false\n });\n } else if (hasNext && hasPrev && isValidElement(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { getChildMapping, getInitialChildMapping, getNextChildMapping } from './utils/ChildMapping';\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n/**\n * The `` component manages a set of transition components\n * (`` and ``) in a list. Like with the transition\n * components, `` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the ``.\n *\n * Note that `` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\nvar TransitionGroup = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n contextValue: {\n isMounting: true\n },\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true;\n this.setState({\n contextValue: {\n isMounting: false\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n } // node is `undefined` when user provided `nodeRef` prop\n ;\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = getChildMapping(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var contextValue = this.state.contextValue;\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, children);\n }\n\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Component, props, children));\n };\n\n return TransitionGroup;\n}(React.Component);\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `` renders a `
` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `
` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: PropTypes.any,\n\n /**\n * A set of `` components, that are toggled `in` and out as they\n * leave. the `` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `` as\n * with our `` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: PropTypes.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: PropTypes.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\nexport default TransitionGroup;","function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nexport { _assertThisInitialized as default };","import { h as hasOwn, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext, i as isDevelopment } from './emotion-element-f0de968e.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, a as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, b as withTheme } from './emotion-element-f0de968e.browser.esm.js';\nimport * as React from 'react';\nimport { insertStyles, registerStyles, getRegisteredStyles } from '@emotion/utils';\nimport { useInsertionEffectWithLayoutFallback, useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { serializeStyles } from '@emotion/serialize';\nimport '@emotion/cache';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport 'hoist-non-react-statics';\n\nvar jsx = function jsx(type, props) {\n // eslint-disable-next-line prefer-rest-params\n var args = arguments;\n\n if (props == null || !hasOwn.call(props, 'css')) {\n return React.createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n }\n\n return React.createElement.apply(null, createElementArgArray);\n};\n\n(function (_jsx) {\n var JSX;\n\n (function (_JSX) {})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));\n})(jsx || (jsx = {}));\n\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n\n var styles = props.styles;\n var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));\n // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n\n var sheetRef = React.useRef();\n useInsertionEffectWithLayoutFallback(function () {\n var key = cache.key + \"-global\"; // use case of https://github.com/emotion-js/emotion/issues/2675\n\n var sheet = new cache.sheet.constructor({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false;\n var node = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n useInsertionEffectWithLayoutFallback(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n\n if (serialized.next !== undefined) {\n // insert keyframes\n insertStyles(cache, serialized.next, true);\n }\n\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\n\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serializeStyles(args);\n}\n\nfunction keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name;\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n}\n\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serializedArr = _ref.serializedArr;\n useInsertionEffectAlwaysWithSyncFallback(function () {\n\n for (var i = 0; i < serializedArr.length; i++) {\n insertStyles(cache, serializedArr[i], false);\n }\n });\n\n return null;\n};\n\nvar ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {\n var hasRendered = false;\n var serializedArr = [];\n\n var css = function css() {\n if (hasRendered && isDevelopment) {\n throw new Error('css can only be used during render');\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`\n\n registerStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && isDevelopment) {\n throw new Error('cx can only be used during render');\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: React.useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serializedArr: serializedArr\n }), ele);\n});\n\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };\n","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction Ripple(props) {\n const {\n className,\n classes,\n pulsate = false,\n rippleX,\n rippleY,\n rippleSize,\n in: inProp,\n onExited,\n timeout\n } = props;\n const [leaving, setLeaving] = React.useState(false);\n const rippleClassName = clsx(className, classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);\n const rippleStyles = {\n width: rippleSize,\n height: rippleSize,\n top: -(rippleSize / 2) + rippleY,\n left: -(rippleSize / 2) + rippleX\n };\n const childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);\n if (!inProp && !leaving) {\n setLeaving(true);\n }\n React.useEffect(() => {\n if (!inProp && onExited != null) {\n // react-transition-group#onExited\n const timeoutId = setTimeout(onExited, timeout);\n return () => {\n clearTimeout(timeoutId);\n };\n }\n return undefined;\n }, [onExited, inProp, timeout]);\n return /*#__PURE__*/_jsx(\"span\", {\n className: rippleClassName,\n style: rippleStyles,\n children: /*#__PURE__*/_jsx(\"span\", {\n className: childClassName\n })\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? Ripple.propTypes /* remove-proptypes */ = {\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n /**\n * @ignore - injected from TransitionGroup\n */\n in: PropTypes.bool,\n /**\n * @ignore - injected from TransitionGroup\n */\n onExited: PropTypes.func,\n /**\n * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.\n */\n pulsate: PropTypes.bool,\n /**\n * Diameter of the ripple.\n */\n rippleSize: PropTypes.number,\n /**\n * Horizontal position of the ripple center.\n */\n rippleX: PropTypes.number,\n /**\n * Vertical position of the ripple center.\n */\n rippleY: PropTypes.number,\n /**\n * exit delay\n */\n timeout: PropTypes.number.isRequired\n} : void 0;\nexport default Ripple;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTouchRippleUtilityClass(slot) {\n return generateUtilityClass('MuiTouchRipple', slot);\n}\nconst touchRippleClasses = generateUtilityClasses('MuiTouchRipple', ['root', 'ripple', 'rippleVisible', 'ripplePulsate', 'child', 'childLeaving', 'childPulsate']);\nexport default touchRippleClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\nimport useTimeout from '@mui/utils/useTimeout';\nimport { keyframes, styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport Ripple from \"./Ripple.js\";\nimport touchRippleClasses from \"./touchRippleClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DURATION = 550;\nexport const DELAY_RIPPLE = 80;\nconst enterKeyframe = keyframes`\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n`;\nconst exitKeyframe = keyframes`\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n`;\nconst pulsateKeyframe = keyframes`\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n`;\nexport const TouchRippleRoot = styled('span', {\n name: 'MuiTouchRipple',\n slot: 'Root'\n})({\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 0,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit'\n});\n\n// This `styled()` function invokes keyframes. `styled-components` only supports keyframes\n// in string templates. Do not convert these styles in JS object as it will break.\nexport const TouchRippleRipple = styled(Ripple, {\n name: 'MuiTouchRipple',\n slot: 'Ripple'\n})`\n opacity: 0;\n position: absolute;\n\n &.${touchRippleClasses.rippleVisible} {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ${enterKeyframe};\n animation-duration: ${DURATION}ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n }\n\n &.${touchRippleClasses.ripplePulsate} {\n animation-duration: ${({\n theme\n}) => theme.transitions.duration.shorter}ms;\n }\n\n & .${touchRippleClasses.child} {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & .${touchRippleClasses.childLeaving} {\n opacity: 0;\n animation-name: ${exitKeyframe};\n animation-duration: ${DURATION}ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n }\n\n & .${touchRippleClasses.childPulsate} {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ${pulsateKeyframe};\n animation-duration: 2500ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n`;\n\n/**\n * @ignore - internal component.\n *\n * TODO v5: Make private\n */\nconst TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTouchRipple'\n });\n const {\n center: centerProp = false,\n classes = {},\n className,\n ...other\n } = props;\n const [ripples, setRipples] = React.useState([]);\n const nextKey = React.useRef(0);\n const rippleCallback = React.useRef(null);\n React.useEffect(() => {\n if (rippleCallback.current) {\n rippleCallback.current();\n rippleCallback.current = null;\n }\n }, [ripples]);\n\n // Used to filter out mouse emulated events on mobile.\n const ignoringMouseDown = React.useRef(false);\n // We use a timer in order to only show the ripples for touch \"click\" like events.\n // We don't want to display the ripple for touch scroll events.\n const startTimer = useTimeout();\n\n // This is the hook called once the previous timeout is ready.\n const startTimerCommit = React.useRef(null);\n const container = React.useRef(null);\n const startCommit = React.useCallback(params => {\n const {\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n } = params;\n setRipples(oldRipples => [...oldRipples, /*#__PURE__*/_jsx(TouchRippleRipple, {\n classes: {\n ripple: clsx(classes.ripple, touchRippleClasses.ripple),\n rippleVisible: clsx(classes.rippleVisible, touchRippleClasses.rippleVisible),\n ripplePulsate: clsx(classes.ripplePulsate, touchRippleClasses.ripplePulsate),\n child: clsx(classes.child, touchRippleClasses.child),\n childLeaving: clsx(classes.childLeaving, touchRippleClasses.childLeaving),\n childPulsate: clsx(classes.childPulsate, touchRippleClasses.childPulsate)\n },\n timeout: DURATION,\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize\n }, nextKey.current)]);\n nextKey.current += 1;\n rippleCallback.current = cb;\n }, [classes]);\n const start = React.useCallback((event = {}, options = {}, cb = () => {}) => {\n const {\n pulsate = false,\n center = centerProp || options.pulsate,\n fakeElement = false // For test purposes\n } = options;\n if (event?.type === 'mousedown' && ignoringMouseDown.current) {\n ignoringMouseDown.current = false;\n return;\n }\n if (event?.type === 'touchstart') {\n ignoringMouseDown.current = true;\n }\n const element = fakeElement ? null : container.current;\n const rect = element ? element.getBoundingClientRect() : {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n };\n\n // Get the size of the ripple\n let rippleX;\n let rippleY;\n let rippleSize;\n if (center || event === undefined || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {\n rippleX = Math.round(rect.width / 2);\n rippleY = Math.round(rect.height / 2);\n } else {\n const {\n clientX,\n clientY\n } = event.touches && event.touches.length > 0 ? event.touches[0] : event;\n rippleX = Math.round(clientX - rect.left);\n rippleY = Math.round(clientY - rect.top);\n }\n if (center) {\n rippleSize = Math.sqrt((2 * rect.width ** 2 + rect.height ** 2) / 3);\n\n // For some reason the animation is broken on Mobile Chrome if the size is even.\n if (rippleSize % 2 === 0) {\n rippleSize += 1;\n }\n } else {\n const sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;\n const sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;\n rippleSize = Math.sqrt(sizeX ** 2 + sizeY ** 2);\n }\n\n // Touche devices\n if (event?.touches) {\n // check that this isn't another touchstart due to multitouch\n // otherwise we will only clear a single timer when unmounting while two\n // are running\n if (startTimerCommit.current === null) {\n // Prepare the ripple effect.\n startTimerCommit.current = () => {\n startCommit({\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n });\n };\n // Delay the execution of the ripple effect.\n // We have to make a tradeoff with this delay value.\n startTimer.start(DELAY_RIPPLE, () => {\n if (startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n }\n });\n }\n } else {\n startCommit({\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n });\n }\n }, [centerProp, startCommit, startTimer]);\n const pulsate = React.useCallback(() => {\n start({}, {\n pulsate: true\n });\n }, [start]);\n const stop = React.useCallback((event, cb) => {\n startTimer.clear();\n\n // The touch interaction occurs too quickly.\n // We still want to show ripple effect.\n if (event?.type === 'touchend' && startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n startTimer.start(0, () => {\n stop(event, cb);\n });\n return;\n }\n startTimerCommit.current = null;\n setRipples(oldRipples => {\n if (oldRipples.length > 0) {\n return oldRipples.slice(1);\n }\n return oldRipples;\n });\n rippleCallback.current = cb;\n }, [startTimer]);\n React.useImperativeHandle(ref, () => ({\n pulsate,\n start,\n stop\n }), [pulsate, start, stop]);\n return /*#__PURE__*/_jsx(TouchRippleRoot, {\n className: clsx(touchRippleClasses.root, classes.root, className),\n ref: container,\n ...other,\n children: /*#__PURE__*/_jsx(TransitionGroup, {\n component: null,\n exit: true,\n children: ripples\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? TouchRipple.propTypes /* remove-proptypes */ = {\n /**\n * If `true`, the ripple starts at the center of the component\n * rather than at the point of interaction.\n */\n center: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default TouchRipple;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getButtonBaseUtilityClass(slot) {\n return generateUtilityClass('MuiButtonBase', slot);\n}\nconst buttonBaseClasses = generateUtilityClasses('MuiButtonBase', ['root', 'disabled', 'focusVisible']);\nexport default buttonBaseClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport refType from '@mui/utils/refType';\nimport elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport isFocusVisible from '@mui/utils/isFocusVisible';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useEventCallback from \"../utils/useEventCallback.js\";\nimport useLazyRipple from \"../useLazyRipple/index.js\";\nimport TouchRipple from \"./TouchRipple.js\";\nimport buttonBaseClasses, { getButtonBaseUtilityClass } from \"./buttonBaseClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n focusVisible,\n focusVisibleClassName,\n classes\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', focusVisible && 'focusVisible']\n };\n const composedClasses = composeClasses(slots, getButtonBaseUtilityClass, classes);\n if (focusVisible && focusVisibleClassName) {\n composedClasses.root += ` ${focusVisibleClassName}`;\n }\n return composedClasses;\n};\nexport const ButtonBaseRoot = styled('button', {\n name: 'MuiButtonBase',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n boxSizing: 'border-box',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n MozAppearance: 'none',\n // Reset\n WebkitAppearance: 'none',\n // Reset\n textDecoration: 'none',\n // So we take precedent over the style of a native element.\n color: 'inherit',\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n },\n [`&.${buttonBaseClasses.disabled}`]: {\n pointerEvents: 'none',\n // Disable link interactions\n cursor: 'default'\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n});\n\n/**\n * `ButtonBase` contains as few styles as possible.\n * It aims to be a simple building block for creating a button.\n * It contains a load of style reset and some focus/ripple logic.\n */\nconst ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiButtonBase'\n });\n const {\n action,\n centerRipple = false,\n children,\n className,\n component = 'button',\n disabled = false,\n disableRipple = false,\n disableTouchRipple = false,\n focusRipple = false,\n focusVisibleClassName,\n LinkComponent = 'a',\n onBlur,\n onClick,\n onContextMenu,\n onDragLeave,\n onFocus,\n onFocusVisible,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseLeave,\n onMouseUp,\n onTouchEnd,\n onTouchMove,\n onTouchStart,\n tabIndex = 0,\n TouchRippleProps,\n touchRippleRef,\n type,\n ...other\n } = props;\n const buttonRef = React.useRef(null);\n const ripple = useLazyRipple();\n const handleRippleRef = useForkRef(ripple.ref, touchRippleRef);\n const [focusVisible, setFocusVisible] = React.useState(false);\n if (disabled && focusVisible) {\n setFocusVisible(false);\n }\n React.useImperativeHandle(action, () => ({\n focusVisible: () => {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n }), []);\n const enableTouchRipple = ripple.shouldMount && !disableRipple && !disabled;\n React.useEffect(() => {\n if (focusVisible && focusRipple && !disableRipple) {\n ripple.pulsate();\n }\n }, [disableRipple, focusRipple, focusVisible, ripple]);\n const handleMouseDown = useRippleHandler(ripple, 'start', onMouseDown, disableTouchRipple);\n const handleContextMenu = useRippleHandler(ripple, 'stop', onContextMenu, disableTouchRipple);\n const handleDragLeave = useRippleHandler(ripple, 'stop', onDragLeave, disableTouchRipple);\n const handleMouseUp = useRippleHandler(ripple, 'stop', onMouseUp, disableTouchRipple);\n const handleMouseLeave = useRippleHandler(ripple, 'stop', event => {\n if (focusVisible) {\n event.preventDefault();\n }\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n }, disableTouchRipple);\n const handleTouchStart = useRippleHandler(ripple, 'start', onTouchStart, disableTouchRipple);\n const handleTouchEnd = useRippleHandler(ripple, 'stop', onTouchEnd, disableTouchRipple);\n const handleTouchMove = useRippleHandler(ripple, 'stop', onTouchMove, disableTouchRipple);\n const handleBlur = useRippleHandler(ripple, 'stop', event => {\n if (!isFocusVisible(event.target)) {\n setFocusVisible(false);\n }\n if (onBlur) {\n onBlur(event);\n }\n }, false);\n const handleFocus = useEventCallback(event => {\n // Fix for https://github.com/facebook/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n if (isFocusVisible(event.target)) {\n setFocusVisible(true);\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n if (onFocus) {\n onFocus(event);\n }\n });\n const isNonNativeButton = () => {\n const button = buttonRef.current;\n return component && component !== 'button' && !(button.tagName === 'A' && button.href);\n };\n const handleKeyDown = useEventCallback(event => {\n // Check if key is already down to avoid repeats being counted as multiple activations\n if (focusRipple && !event.repeat && focusVisible && event.key === ' ') {\n ripple.stop(event, () => {\n ripple.start(event);\n });\n }\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {\n event.preventDefault();\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n\n // Keyboard accessibility for non interactive elements\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {\n event.preventDefault();\n if (onClick) {\n onClick(event);\n }\n }\n });\n const handleKeyUp = useEventCallback(event => {\n // calling preventDefault in keyUp on a
\n );\n};\n\nItemLabelWithControls.propTypes = {\n itemId: PropTypes.string,\n children: PropTypes.node,\n className: PropTypes.string,\n editable: PropTypes.bool,\n ownerState: PropTypes.object,\n};\n\n// Custom label-input slot. When `itemsReordering` is on, MUI's reorder plugin\n// puts `draggable=\"true\"` on the TreeItem root with NO editing guard. While the\n// label input is focused, that native draggable ancestor hijacks text\n// selection: dragging to highlight a word starts an HTML5 element drag, the\n// input loses focus, MUI's onBlur fires, and edit mode exits mid-gesture.\n//\n// Fix: while this input is mounted (i.e. editing), flip the nearest\n// draggable ancestor to draggable=\"false\" and restore it on cleanup. Also\n// stop mouse/pointer/click from reaching the row (so clicking inside the cell\n// doesn't toggle selection or steal focus) and cancel any dragstart that does\n// fire. We deliberately do NOT preventDefault on mousedown — the browser needs\n// it for caret placement and native text selection inside the input.\nconst EditableLabelInput = React.forwardRef(function EditableLabelInput(\n props,\n ref\n) {\n const innerRef = useRef(null);\n const restoreRef = useRef(null);\n\n const setRefs = useCallback(\n (node) => {\n innerRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n },\n [ref]\n );\n\n useEffect(() => {\n const el = innerRef.current;\n if (!el || typeof el.closest !== 'function') return undefined;\n const host = el.closest('[draggable=\"true\"]');\n if (host) {\n restoreRef.current = host;\n host.setAttribute('draggable', 'false');\n }\n return () => {\n if (restoreRef.current) {\n restoreRef.current.setAttribute('draggable', 'true');\n restoreRef.current = null;\n }\n };\n }, []);\n\n const stopOnly = (handler) => (e) => {\n e.stopPropagation();\n if (handler) handler(e);\n };\n\n return (\n {\n e.preventDefault();\n e.stopPropagation();\n }}\n />\n );\n});\n\nEditableLabelInput.propTypes = {\n onMouseDown: PropTypes.func,\n onPointerDown: PropTypes.func,\n onClick: PropTypes.func,\n};\n\nconst CustomTreeItem = React.forwardRef(function CustomTreeItem(props, ref) {\n const {itemId} = props;\n // Keep the real string `label` prop intact so MUI's edit input and\n // `onItemLabelChange` get the actual text (not \"[object Object]\").\n // Inject the slider + kebab through the label *slot*, and harden the\n // label-input slot so editing stays stable under itemsReordering.\n return (\n \n );\n});\n\nCustomTreeItem.propTypes = {\n itemId: PropTypes.string,\n};\n\n// --- Main component ----------------------------------------------------------\nconst TreeViewPro = ({\n id,\n items: itemsProp = [],\n licenseKey = '',\n // Item accessors\n getItemId: getItemIdProp = 'id',\n getItemLabel: getItemLabelProp = 'label',\n getItemChildren: getItemChildrenProp = 'children',\n // Selection\n selectedItems,\n defaultSelectedItems,\n multiSelect = false,\n checkboxSelection = false,\n disableSelection = false,\n selectionPropagation,\n // Expansion\n expandedItems,\n defaultExpandedItems,\n expansionTrigger = 'content',\n // Editing\n isItemEditable = false,\n editableItems,\n // Disabled\n disabledItems,\n disabledItemsFocusable = false,\n // Appearance\n itemChildrenIndentation = '12px',\n height,\n sx,\n // Icons\n collapseIcon,\n expandIcon,\n endIcon,\n // Accessibility\n ariaLabel,\n ariaLabelledBy,\n // PRO: Ordering\n itemsReordering = false,\n reorderableItems,\n // PRO: Lazy Loading\n lazyLoading = false,\n lazyLoadedChildren,\n // Per-item controls\n showItemControls = false,\n controlsItems,\n sliderValues,\n sliderMin = 0,\n sliderMax = 100,\n sliderStep = 1,\n sliderColor,\n kebabMenuItems,\n // Dash\n setProps,\n}) => {\n const colorScheme = useMantineColorScheme();\n const muiTheme = colorScheme === 'dark' ? darkTheme : lightTheme;\n\n // --- License key ---\n if (licenseKey && !licenseKeySet) {\n LicenseInfo.setLicenseKey(licenseKey);\n licenseKeySet = true;\n }\n\n // --- Lazy loading: merge loaded children into items ---\n const items = useMemo(() => {\n if (!lazyLoading || !lazyLoadedChildren || !itemsProp) return itemsProp || [];\n const childrenProp = getItemChildrenProp || 'children';\n const idProp = getItemIdProp || 'id';\n\n const mergeChildren = (nodeList) => {\n if (!nodeList) return nodeList;\n return nodeList.map((node) => {\n const nodeId = node[idProp];\n const loadedKids = lazyLoadedChildren[nodeId];\n const existingChildren = node[childrenProp];\n const mergedChildren = loadedKids || existingChildren;\n return {\n ...node,\n [childrenProp]: mergeChildren(mergedChildren),\n };\n });\n };\n return mergeChildren(itemsProp);\n }, [itemsProp, lazyLoadedChildren, lazyLoading, getItemChildrenProp, getItemIdProp]);\n\n // --- Accessor conversion ---\n const getItemId = useCallback(\n (item) => item[getItemIdProp || 'id'],\n [getItemIdProp]\n );\n const getItemLabel = useCallback(\n (item) => item[getItemLabelProp || 'label'],\n [getItemLabelProp]\n );\n const getItemChildren = useCallback(\n (item) => item[getItemChildrenProp || 'children'],\n [getItemChildrenProp]\n );\n\n // --- Disabled/editable conversion ---\n const isItemDisabledFn = useMemo(() => {\n if (!disabledItems || disabledItems.length === 0) return undefined;\n const s = new Set(disabledItems);\n return (item) => s.has(getItemId(item));\n }, [disabledItems, getItemId]);\n\n const isItemEditableFn = useMemo(() => {\n if (typeof isItemEditable === 'boolean') return isItemEditable;\n if (editableItems && editableItems.length > 0) {\n const s = new Set(editableItems);\n return (item) => s.has(getItemId(item));\n }\n return false;\n }, [isItemEditable, editableItems, getItemId]);\n\n // --- PRO: Reorderable conversion ---\n const isItemReorderableFn = useMemo(() => {\n if (!reorderableItems || reorderableItems.length === 0) return undefined;\n const s = new Set(reorderableItems);\n return (itemId) => s.has(itemId);\n }, [reorderableItems]);\n\n // --- Per-item controls: slider + kebab handlers ---\n const sliderValuesRef = useRef(sliderValues || {});\n sliderValuesRef.current = sliderValues || sliderValuesRef.current || {};\n\n const handleSliderChange = useCallback(\n (itemId, value, committed) => {\n const next = {...sliderValuesRef.current, [itemId]: value};\n sliderValuesRef.current = next;\n if (setProps) {\n setProps({sliderValues: next});\n if (committed) {\n setProps({\n sliderChange: {\n itemId,\n value,\n event_timestamp: Date.now(),\n },\n });\n }\n }\n },\n [setProps]\n );\n\n const handleKebabAction = useCallback(\n (itemId, action) => {\n if (setProps) {\n setProps({\n kebabAction: {\n itemId,\n action,\n event_timestamp: Date.now(),\n },\n });\n }\n },\n [setProps]\n );\n\n const controlsItemSet = useMemo(() => {\n if (!controlsItems || controlsItems.length === 0) return null;\n return new Set(controlsItems);\n }, [controlsItems]);\n\n const resolvedSliderColor = useMemo(\n () => resolveSliderColor(sliderColor),\n [sliderColor]\n );\n\n const controlsContextValue = useMemo(\n () => ({\n controlsItemSet,\n sliderValues: sliderValues || {},\n sliderMin,\n sliderMax,\n sliderStep,\n sliderColor: resolvedSliderColor,\n onSliderChange: handleSliderChange,\n kebabMenuItems: kebabMenuItems || [],\n onKebabAction: handleKebabAction,\n }),\n [\n controlsItemSet,\n sliderValues,\n sliderMin,\n sliderMax,\n sliderStep,\n resolvedSliderColor,\n kebabMenuItems,\n handleSliderChange,\n handleKebabAction,\n ]\n );\n\n // --- Slots ---\n const slots = useMemo(() => {\n const s = {};\n if (collapseIcon) s.collapseIcon = resolveIcon(collapseIcon);\n if (expandIcon) s.expandIcon = resolveIcon(expandIcon);\n if (endIcon) s.endIcon = resolveIcon(endIcon);\n if (showItemControls) s.item = CustomTreeItem;\n return Object.keys(s).length > 0 ? s : undefined;\n }, [collapseIcon, expandIcon, endIcon, showItemControls]);\n\n // --- Callbacks ---\n const handleSelectedItemsChange = useCallback(\n (event, itemIds) => {\n if (setProps) setProps({selectedItems: itemIds});\n },\n [setProps]\n );\n\n const handleExpandedItemsChange = useCallback(\n (event, itemIds) => {\n if (setProps) setProps({expandedItems: itemIds});\n\n // Lazy loading: fire request for items that have no children\n if (lazyLoading && setProps && itemIds) {\n const idProp = getItemIdProp || 'id';\n const childrenProp = getItemChildrenProp || 'children';\n const findItem = (nodes, targetId) => {\n if (!nodes) return null;\n for (const node of nodes) {\n if (node[idProp] === targetId) return node;\n const found = findItem(node[childrenProp], targetId);\n if (found) return found;\n }\n return null;\n };\n\n // Check newly expanded items for missing children\n for (const itemId of itemIds) {\n const item = findItem(items, itemId);\n if (item && !item[childrenProp]) {\n setProps({\n lazyLoadRequest: {\n itemId,\n event_timestamp: Date.now(),\n },\n });\n break;\n }\n }\n }\n },\n [setProps, lazyLoading, items, getItemIdProp, getItemChildrenProp]\n );\n\n const handleItemClick = useCallback(\n (event, itemId) => {\n if (setProps) setProps({clickedItem: {itemId, event_timestamp: Date.now()}});\n },\n [setProps]\n );\n\n const handleItemFocus = useCallback(\n (event, itemId) => {\n if (setProps) setProps({focusedItem: {itemId, event_timestamp: Date.now()}});\n },\n [setProps]\n );\n\n const handleItemLabelChange = useCallback(\n (itemId, newLabel) => {\n if (setProps) setProps({editedItemLabel: {itemId, newLabel, event_timestamp: Date.now()}});\n },\n [setProps]\n );\n\n // Track the live (reordered) tree so we can emit it as `orderedItems`.\n // Re-seed from the items prop whenever it changes externally.\n const orderedRef = useRef(itemsProp || []);\n useEffect(() => {\n orderedRef.current = itemsProp || [];\n }, [itemsProp]);\n\n const handleItemPositionChange = useCallback(\n (params) => {\n const updated = applyReorder(\n orderedRef.current,\n params,\n getItemIdProp,\n getItemChildrenProp\n );\n orderedRef.current = updated;\n if (setProps) {\n setProps({\n itemPositionChanged: {\n itemId: params.itemId,\n oldPosition: params.oldPosition,\n newPosition: params.newPosition,\n event_timestamp: Date.now(),\n },\n orderedItems: updated,\n });\n }\n },\n [setProps, getItemIdProp, getItemChildrenProp]\n );\n\n const containerStyle = useMemo(() => {\n const s = {};\n if (height) s.height = typeof height === 'number' ? `${height}px` : height;\n return s;\n }, [height]);\n\n return (\n \n
\n \n \n \n
\n
\n );\n};\n\nTreeViewPro.propTypes = {\n /** Dash component id */\n id: PropTypes.string,\n\n /** MUI X Pro license key. Required for Pro features. */\n licenseKey: PropTypes.string,\n\n /** Array of item objects. */\n items: PropTypes.arrayOf(PropTypes.object),\n\n // --- Accessors ---\n /** Property name for item ID (default: \"id\") */\n getItemId: PropTypes.string,\n\n /** Property name for item label (default: \"label\") */\n getItemLabel: PropTypes.string,\n\n /** Property name for item children (default: \"children\") */\n getItemChildren: PropTypes.string,\n\n // --- Selection ---\n /** Controlled selected item(s). String when multiSelect=false, array when true. */\n selectedItems: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n\n /** Default selected items (uncontrolled). */\n defaultSelectedItems: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n\n /** Allow selecting multiple items. */\n multiSelect: PropTypes.bool,\n\n /** Show checkboxes for selection. */\n checkboxSelection: PropTypes.bool,\n\n /** Disable all selection. */\n disableSelection: PropTypes.bool,\n\n /** Auto-propagate selection to parents/descendants. */\n selectionPropagation: PropTypes.exact({\n parents: PropTypes.bool,\n descendants: PropTypes.bool,\n }),\n\n // --- Expansion ---\n /** Controlled expanded item IDs. */\n expandedItems: PropTypes.arrayOf(PropTypes.string),\n\n /** Default expanded items (uncontrolled). */\n defaultExpandedItems: PropTypes.arrayOf(PropTypes.string),\n\n /** What triggers expansion: \"content\" or \"iconContainer\". */\n expansionTrigger: PropTypes.oneOf(['content', 'iconContainer']),\n\n // --- Editing ---\n /** Enable label editing for all items. */\n isItemEditable: PropTypes.bool,\n\n /** List of item IDs that are editable. */\n editableItems: PropTypes.arrayOf(PropTypes.string),\n\n // --- Disabled ---\n /** List of item IDs that should be disabled. */\n disabledItems: PropTypes.arrayOf(PropTypes.string),\n\n /** Allow focus on disabled items. */\n disabledItemsFocusable: PropTypes.bool,\n\n // --- Appearance ---\n /** Indentation of children. */\n itemChildrenIndentation: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /** Container height. */\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /** MUI sx styling object. */\n sx: PropTypes.object,\n\n // --- Icons ---\n /** MUI icon name for collapse icon. */\n collapseIcon: PropTypes.string,\n\n /** MUI icon name for expand icon. */\n expandIcon: PropTypes.string,\n\n /** MUI icon name for leaf/end icon. */\n endIcon: PropTypes.string,\n\n // --- Accessibility ---\n /** ARIA label for the tree. */\n ariaLabel: PropTypes.string,\n\n /** ID of element that labels the tree. */\n ariaLabelledBy: PropTypes.string,\n\n // --- PRO: Ordering ---\n /** Enable drag-and-drop item reordering. */\n itemsReordering: PropTypes.bool,\n\n /** List of item IDs that can be reordered. If empty, all items are reorderable. */\n reorderableItems: PropTypes.arrayOf(PropTypes.string),\n\n /** Output: Fired after item reorder. {itemId, oldPosition, newPosition, event_timestamp} */\n itemPositionChanged: PropTypes.object,\n\n /**\n * Output: the current tree after any drag-and-drop reorder, preserving\n * each node's original fields (id, label, children, etc.). Updates on\n * every reorder so Python callbacks can render the live order.\n */\n orderedItems: PropTypes.arrayOf(PropTypes.object),\n\n // --- PRO: Lazy Loading ---\n /** Enable lazy loading mode. */\n lazyLoading: PropTypes.bool,\n\n /** Input: Children loaded by Dash callback. {parentItemId: [childItems]} */\n lazyLoadedChildren: PropTypes.object,\n\n /** Output: Fired when unloaded node is expanded. {itemId, event_timestamp} */\n lazyLoadRequest: PropTypes.exact({\n itemId: PropTypes.string,\n event_timestamp: PropTypes.number,\n }),\n\n // --- Per-item controls (slider + kebab) ---\n /** Show a Slider + kebab menu on each item row. */\n showItemControls: PropTypes.bool,\n\n /** Restrict slider+kebab to a subset of item IDs. Empty/omitted means all items. */\n controlsItems: PropTypes.arrayOf(PropTypes.string),\n\n /** Controlled slider values keyed by itemId, e.g. {\"task-1\": 40}. Also updated as user drags. */\n sliderValues: PropTypes.object,\n\n /** Slider minimum. */\n sliderMin: PropTypes.number,\n\n /** Slider maximum. */\n sliderMax: PropTypes.number,\n\n /** Slider step. */\n sliderStep: PropTypes.number,\n\n /**\n * Slider color. Accepts a Mantine theme color name (\"teal\", \"blue.5\"),\n * a CSS color literal (\"#ff6b6b\", \"rgb(...)\"), or a CSS expression\n * (\"var(--mantine-color-teal-6)\", \"light-dark(...)\"). Bare names use\n * shade 6 by default. When omitted, the slider falls back to MUI's\n * `primary` palette color.\n */\n sliderColor: PropTypes.string,\n\n /** Kebab menu options: [{label, value, icon?}]. `value` is sent back as `action`. */\n kebabMenuItems: PropTypes.arrayOf(\n PropTypes.exact({\n label: PropTypes.string.isRequired,\n value: PropTypes.string.isRequired,\n icon: PropTypes.string,\n })\n ),\n\n /** Output: fires once on each commit (mouse-up) of a slider drag. {itemId, value, event_timestamp} */\n sliderChange: PropTypes.exact({\n itemId: PropTypes.string,\n value: PropTypes.number,\n event_timestamp: PropTypes.number,\n }),\n\n /** Output: fires when a kebab menu item is chosen. {itemId, action, event_timestamp} */\n kebabAction: PropTypes.exact({\n itemId: PropTypes.string,\n action: PropTypes.string,\n event_timestamp: PropTypes.number,\n }),\n\n // --- Output Props ---\n /** Fired when item is clicked. {itemId, event_timestamp} */\n clickedItem: PropTypes.exact({\n itemId: PropTypes.string,\n event_timestamp: PropTypes.number,\n }),\n\n /** Fired when item is focused. {itemId, event_timestamp} */\n focusedItem: PropTypes.exact({\n itemId: PropTypes.string,\n event_timestamp: PropTypes.number,\n }),\n\n /** Fired when label edit completes. {itemId, newLabel, event_timestamp} */\n editedItemLabel: PropTypes.exact({\n itemId: PropTypes.string,\n newLabel: PropTypes.string,\n event_timestamp: PropTypes.number,\n }),\n\n /** Dash setProps callback */\n setProps: PropTypes.func,\n};\n\nexport default TreeViewPro;\n","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"localeText\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useThemeProps } from '@mui/material/styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const PickerAdapterContext = /*#__PURE__*/React.createContext(null);\n\n// TODO v9: Remove this public export\n/**\n * The context that provides the date adapter and default dates to the pickers.\n * @deprecated Use `usePickersAdapter` hook if you need access to the adapter instead.\n */\nif (process.env.NODE_ENV !== \"production\") PickerAdapterContext.displayName = \"PickerAdapterContext\";\nexport const MuiPickersAdapterContext = PickerAdapterContext;\n/**\n * Demos:\n *\n * - [Date format and localization](https://mui.com/x/react-date-pickers/adapters-locale/)\n * - [Calendar systems](https://mui.com/x/react-date-pickers/calendar-systems/)\n * - [Translated components](https://mui.com/x/react-date-pickers/localization/)\n * - [UTC and timezones](https://mui.com/x/react-date-pickers/timezone/)\n *\n * API:\n *\n * - [LocalizationProvider API](https://mui.com/x/api/date-pickers/localization-provider/)\n */\nexport const LocalizationProvider = function LocalizationProvider(inProps) {\n const {\n localeText: inLocaleText\n } = inProps,\n otherInProps = _objectWithoutPropertiesLoose(inProps, _excluded);\n const {\n adapter: parentAdapter,\n localeText: parentLocaleText\n } = React.useContext(PickerAdapterContext) ?? {\n utils: undefined,\n adapter: undefined,\n localeText: undefined\n };\n const props = useThemeProps({\n // We don't want to pass the `localeText` prop to the theme, that way it will always return the theme value,\n // We will then merge this theme value with our value manually\n props: otherInProps,\n name: 'MuiLocalizationProvider'\n });\n const {\n children,\n dateAdapter: DateAdapter,\n dateFormats,\n dateLibInstance,\n adapterLocale,\n localeText: themeLocaleText\n } = props;\n const localeText = React.useMemo(() => _extends({}, themeLocaleText, parentLocaleText, inLocaleText), [themeLocaleText, parentLocaleText, inLocaleText]);\n const adapter = React.useMemo(() => {\n if (!DateAdapter) {\n if (parentAdapter) {\n return parentAdapter;\n }\n return null;\n }\n const dateAdapter = new DateAdapter({\n locale: adapterLocale,\n formats: dateFormats,\n instance: dateLibInstance\n });\n if (!dateAdapter.isMUIAdapter) {\n throw new Error(['MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`', \"For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`\", 'More information on the installation documentation: https://mui.com/x/react-date-pickers/quickstart/#installation'].join(`\\n`));\n }\n return dateAdapter;\n }, [DateAdapter, adapterLocale, dateFormats, dateLibInstance, parentAdapter]);\n const defaultDates = React.useMemo(() => {\n if (!adapter) {\n return null;\n }\n return {\n minDate: adapter.date('1900-01-01T00:00:00.000'),\n maxDate: adapter.date('2099-12-31T00:00:00.000')\n };\n }, [adapter]);\n const contextValue = React.useMemo(() => {\n return {\n utils: adapter,\n adapter,\n defaultDates,\n localeText\n };\n }, [defaultDates, adapter, localeText]);\n return /*#__PURE__*/_jsx(PickerAdapterContext.Provider, {\n value: contextValue,\n children: children\n });\n};\nif (process.env.NODE_ENV !== \"production\") LocalizationProvider.displayName = \"LocalizationProvider\";\nprocess.env.NODE_ENV !== \"production\" ? LocalizationProvider.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Locale for the date library you are using\n */\n adapterLocale: PropTypes.any,\n children: PropTypes.node,\n /**\n * Date library adapter class function.\n * @see See the localization provider {@link https://mui.com/x/react-date-pickers/quickstart/#integrate-provider-and-adapter date adapter setup section} for more details.\n */\n dateAdapter: PropTypes.func,\n /**\n * Formats that are used for any child pickers\n */\n dateFormats: PropTypes.shape({\n dayOfMonth: PropTypes.string,\n dayOfMonthFull: PropTypes.string,\n fullDate: PropTypes.string,\n fullTime12h: PropTypes.string,\n fullTime24h: PropTypes.string,\n hours12h: PropTypes.string,\n hours24h: PropTypes.string,\n keyboardDate: PropTypes.string,\n keyboardDateTime12h: PropTypes.string,\n keyboardDateTime24h: PropTypes.string,\n meridiem: PropTypes.string,\n minutes: PropTypes.string,\n month: PropTypes.string,\n monthShort: PropTypes.string,\n normalDate: PropTypes.string,\n normalDateWithWeekday: PropTypes.string,\n seconds: PropTypes.string,\n shortDate: PropTypes.string,\n weekday: PropTypes.string,\n weekdayShort: PropTypes.string,\n year: PropTypes.string\n }),\n /**\n * Date library instance you are using, if it has some global overrides\n * ```jsx\n * dateLibInstance={momentTimeZone}\n * ```\n */\n dateLibInstance: PropTypes.any,\n /**\n * Locale for components texts\n */\n localeText: PropTypes.object\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/* v8 ignore start */\nimport dayjs from 'dayjs';\n// dayjs has no exports field defined\n// See https://github.com/iamkun/dayjs/issues/2562\n/* eslint-disable import/extensions */\nimport weekOfYearPlugin from 'dayjs/plugin/weekOfYear.js';\nimport customParseFormatPlugin from 'dayjs/plugin/customParseFormat.js';\nimport localizedFormatPlugin from 'dayjs/plugin/localizedFormat.js';\nimport isBetweenPlugin from 'dayjs/plugin/isBetween.js';\nimport advancedFormatPlugin from 'dayjs/plugin/advancedFormat.js';\n/* v8 ignore stop */\n/* eslint-enable import/extensions */\nimport { warnOnce } from '@mui/x-internals/warning';\ndayjs.extend(localizedFormatPlugin);\ndayjs.extend(weekOfYearPlugin);\ndayjs.extend(isBetweenPlugin);\ndayjs.extend(advancedFormatPlugin);\nconst formatTokenMap = {\n // Year\n YY: 'year',\n YYYY: {\n sectionType: 'year',\n contentType: 'digit',\n maxLength: 4\n },\n // Month\n M: {\n sectionType: 'month',\n contentType: 'digit',\n maxLength: 2\n },\n MM: 'month',\n MMM: {\n sectionType: 'month',\n contentType: 'letter'\n },\n MMMM: {\n sectionType: 'month',\n contentType: 'letter'\n },\n // Day of the month\n D: {\n sectionType: 'day',\n contentType: 'digit',\n maxLength: 2\n },\n DD: 'day',\n Do: {\n sectionType: 'day',\n contentType: 'digit-with-letter'\n },\n // Day of the week\n d: {\n sectionType: 'weekDay',\n contentType: 'digit',\n maxLength: 2\n },\n dd: {\n sectionType: 'weekDay',\n contentType: 'letter'\n },\n ddd: {\n sectionType: 'weekDay',\n contentType: 'letter'\n },\n dddd: {\n sectionType: 'weekDay',\n contentType: 'letter'\n },\n // Meridiem\n A: 'meridiem',\n a: 'meridiem',\n // Hours\n H: {\n sectionType: 'hours',\n contentType: 'digit',\n maxLength: 2\n },\n HH: 'hours',\n h: {\n sectionType: 'hours',\n contentType: 'digit',\n maxLength: 2\n },\n hh: 'hours',\n // Minutes\n m: {\n sectionType: 'minutes',\n contentType: 'digit',\n maxLength: 2\n },\n mm: 'minutes',\n // Seconds\n s: {\n sectionType: 'seconds',\n contentType: 'digit',\n maxLength: 2\n },\n ss: 'seconds'\n};\nconst defaultFormats = {\n year: 'YYYY',\n month: 'MMMM',\n monthShort: 'MMM',\n dayOfMonth: 'D',\n dayOfMonthFull: 'Do',\n weekday: 'dddd',\n weekdayShort: 'dd',\n hours24h: 'HH',\n hours12h: 'hh',\n meridiem: 'A',\n minutes: 'mm',\n seconds: 'ss',\n fullDate: 'll',\n keyboardDate: 'L',\n shortDate: 'MMM D',\n normalDate: 'D MMMM',\n normalDateWithWeekday: 'ddd, MMM D',\n fullTime12h: 'hh:mm A',\n fullTime24h: 'HH:mm',\n keyboardDateTime12h: 'L hh:mm A',\n keyboardDateTime24h: 'L HH:mm'\n};\nconst MISSING_UTC_PLUGIN = ['Missing UTC plugin', 'To be able to use UTC or timezones, you have to enable the `utc` plugin', 'Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc'].join('\\n');\nconst MISSING_TIMEZONE_PLUGIN = ['Missing timezone plugin', 'To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin', 'Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone'].join('\\n');\n/**\n * Based on `@date-io/dayjs`\n *\n * MIT License\n *\n * Copyright (c) 2017 Dmitriy Kovalenko\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nexport class AdapterDayjs {\n isMUIAdapter = true;\n isTimezoneCompatible = true;\n lib = 'dayjs';\n escapedCharacters = {\n start: '[',\n end: ']'\n };\n formatTokenMap = (() => formatTokenMap)();\n constructor({\n locale,\n formats\n } = {}) {\n this.locale = locale;\n this.formats = _extends({}, defaultFormats, formats);\n\n // Moved plugins to the constructor to allow for users to use options on the library\n // for reference: https://github.com/mui/mui-x/pull/11151\n dayjs.extend(customParseFormatPlugin);\n }\n setLocaleToValue = value => {\n const expectedLocale = this.getCurrentLocaleCode();\n if (expectedLocale === value.locale()) {\n return value;\n }\n return value.locale(expectedLocale);\n };\n hasUTCPlugin = () => typeof dayjs.utc !== 'undefined';\n hasTimezonePlugin = () => typeof dayjs.tz !== 'undefined';\n isSame = (value, comparing, comparisonTemplate) => {\n const comparingInValueTimezone = this.setTimezone(comparing, this.getTimezone(value));\n return value.format(comparisonTemplate) === comparingInValueTimezone.format(comparisonTemplate);\n };\n\n /**\n * Replaces \"default\" by undefined and \"system\" by the system timezone before passing it to `dayjs`.\n */\n cleanTimezone = timezone => {\n switch (timezone) {\n case 'default':\n {\n return undefined;\n }\n case 'system':\n {\n return dayjs.tz.guess();\n }\n default:\n {\n return timezone;\n }\n }\n };\n createSystemDate = value => {\n let date;\n if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {\n const timezone = dayjs.tz.guess();\n if (timezone === 'UTC') {\n date = dayjs(value);\n } /* v8 ignore next 3 */else {\n // We can't change the system timezone in the tests\n date = dayjs.tz(value, timezone);\n }\n } else {\n date = dayjs(value);\n }\n return this.setLocaleToValue(date);\n };\n createUTCDate = value => {\n /* v8 ignore next 3 */\n if (!this.hasUTCPlugin()) {\n throw new Error(MISSING_UTC_PLUGIN);\n }\n return this.setLocaleToValue(dayjs.utc(value));\n };\n createTZDate = (value, timezone) => {\n /* v8 ignore next 3 */\n if (!this.hasUTCPlugin()) {\n throw new Error(MISSING_UTC_PLUGIN);\n }\n\n /* v8 ignore next 3 */\n if (!this.hasTimezonePlugin()) {\n throw new Error(MISSING_TIMEZONE_PLUGIN);\n }\n const keepLocalTime = value !== undefined && !value.endsWith('Z');\n return this.setLocaleToValue(dayjs(value).tz(this.cleanTimezone(timezone), keepLocalTime));\n };\n getLocaleFormats = () => {\n const locales = dayjs.Ls;\n const locale = this.locale || 'en';\n let localeObject = locales[locale];\n if (localeObject === undefined) {\n /* v8 ignore start */\n if (process.env.NODE_ENV !== 'production') {\n warnOnce(['MUI X: Your locale has not been found.', 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.', \"Or you forget to import the locale from 'dayjs/locale/{localeUsed}'\", 'fallback on English locale.']);\n }\n /* v8 ignore stop */\n localeObject = locales.en;\n }\n return localeObject.formats;\n };\n\n /**\n * If the new day does not have the same offset as the old one (when switching to summer day time for example),\n * Then dayjs will not automatically adjust the offset (moment does).\n * We have to parse again the value to make sure the `fixOffset` method is applied.\n * See https://github.com/iamkun/dayjs/blob/b3624de619d6e734cd0ffdbbd3502185041c1b60/src/plugin/timezone/index.js#L72\n */\n adjustOffset = value => {\n if (!this.hasTimezonePlugin()) {\n return value;\n }\n const timezone = this.getTimezone(value);\n if (timezone !== 'UTC') {\n const fixedValue = value.tz(this.cleanTimezone(timezone), true);\n // TODO: Simplify the case when we raise the `dayjs` peer dep to 1.11.12 (https://github.com/iamkun/dayjs/releases/tag/v1.11.12)\n /* v8 ignore next 3 */\n // @ts-ignore\n if (fixedValue.$offset === (value.$offset ?? 0)) {\n return value;\n }\n // Change only what is needed to avoid creating a new object with unwanted data\n // Especially important when used in an environment where utc or timezone dates are used only in some places\n // Reference: https://github.com/mui/mui-x/issues/13290\n // @ts-ignore\n value.$offset = fixedValue.$offset;\n }\n return value;\n };\n date = (value, timezone = 'default') => {\n if (value === null) {\n return null;\n }\n if (timezone === 'UTC') {\n return this.createUTCDate(value);\n }\n if (timezone === 'system' || timezone === 'default' && !this.hasTimezonePlugin()) {\n return this.createSystemDate(value);\n }\n return this.createTZDate(value, timezone);\n };\n getInvalidDate = () => dayjs(new Date('Invalid date'));\n getTimezone = value => {\n if (this.hasTimezonePlugin()) {\n // @ts-ignore\n const zone = value.$x?.$timezone;\n if (zone) {\n return zone;\n }\n }\n if (this.hasUTCPlugin() && value.isUTC()) {\n return 'UTC';\n }\n return 'system';\n };\n setTimezone = (value, timezone) => {\n if (this.getTimezone(value) === timezone) {\n return value;\n }\n if (timezone === 'UTC') {\n /* v8 ignore next 3 */\n if (!this.hasUTCPlugin()) {\n throw new Error(MISSING_UTC_PLUGIN);\n }\n return value.utc();\n }\n\n // We know that we have the UTC plugin.\n // Otherwise, the value timezone would always equal \"system\".\n // And it would be caught by the first \"if\" of this method.\n if (timezone === 'system') {\n return value.local();\n }\n if (!this.hasTimezonePlugin()) {\n if (timezone === 'default') {\n return value;\n }\n\n /* v8 ignore next */\n throw new Error(MISSING_TIMEZONE_PLUGIN);\n }\n return this.setLocaleToValue(dayjs.tz(value, this.cleanTimezone(timezone)));\n };\n toJsDate = value => {\n return value.toDate();\n };\n parse = (value, format) => {\n if (value === '') {\n return null;\n }\n return dayjs(value, format, this.locale, true);\n };\n getCurrentLocaleCode = () => {\n return this.locale || 'en';\n };\n is12HourCycleInCurrentLocale = () => {\n /* v8 ignore next */\n return /A|a/.test(this.getLocaleFormats().LT || '');\n };\n expandFormat = format => {\n const localeFormats = this.getLocaleFormats();\n\n // @see https://github.com/iamkun/dayjs/blob/dev/src/plugin/localizedFormat/index.js\n const t = formatBis => formatBis.replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g, (_, a, b) => a || b.slice(1));\n return format.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g, (_, a, b) => {\n const B = b && b.toUpperCase();\n return a || localeFormats[b] || t(localeFormats[B]);\n });\n };\n isValid = value => {\n if (value == null) {\n return false;\n }\n return value.isValid();\n };\n format = (value, formatKey) => {\n return this.formatByString(value, this.formats[formatKey]);\n };\n formatByString = (value, formatString) => {\n return this.setLocaleToValue(value).format(formatString);\n };\n formatNumber = numberToFormat => {\n return numberToFormat;\n };\n isEqual = (value, comparing) => {\n if (value === null && comparing === null) {\n return true;\n }\n if (value === null || comparing === null) {\n return false;\n }\n return value.toDate().getTime() === comparing.toDate().getTime();\n };\n isSameYear = (value, comparing) => {\n return this.isSame(value, comparing, 'YYYY');\n };\n isSameMonth = (value, comparing) => {\n return this.isSame(value, comparing, 'YYYY-MM');\n };\n isSameDay = (value, comparing) => {\n return this.isSame(value, comparing, 'YYYY-MM-DD');\n };\n isSameHour = (value, comparing) => {\n return value.isSame(comparing, 'hour');\n };\n isAfter = (value, comparing) => {\n return value > comparing;\n };\n isAfterYear = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isAfter(comparing, 'year');\n }\n return !this.isSameYear(value, comparing) && value.utc() > comparing.utc();\n };\n isAfterDay = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isAfter(comparing, 'day');\n }\n return !this.isSameDay(value, comparing) && value.utc() > comparing.utc();\n };\n isBefore = (value, comparing) => {\n return value < comparing;\n };\n isBeforeYear = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isBefore(comparing, 'year');\n }\n return !this.isSameYear(value, comparing) && value.utc() < comparing.utc();\n };\n isBeforeDay = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isBefore(comparing, 'day');\n }\n return !this.isSameDay(value, comparing) && value.utc() < comparing.utc();\n };\n isWithinRange = (value, [start, end]) => {\n return value >= start && value <= end;\n };\n startOfYear = value => {\n return this.adjustOffset(value.startOf('year'));\n };\n startOfMonth = value => {\n return this.adjustOffset(value.startOf('month'));\n };\n startOfWeek = value => {\n return this.adjustOffset(this.setLocaleToValue(value).startOf('week'));\n };\n startOfDay = value => {\n return this.adjustOffset(value.startOf('day'));\n };\n endOfYear = value => {\n return this.adjustOffset(value.endOf('year'));\n };\n endOfMonth = value => {\n return this.adjustOffset(value.endOf('month'));\n };\n endOfWeek = value => {\n return this.adjustOffset(this.setLocaleToValue(value).endOf('week'));\n };\n endOfDay = value => {\n return this.adjustOffset(value.endOf('day'));\n };\n addYears = (value, amount) => {\n return this.adjustOffset(value.add(amount, 'year'));\n };\n addMonths = (value, amount) => {\n return this.adjustOffset(value.add(amount, 'month'));\n };\n addWeeks = (value, amount) => {\n return this.adjustOffset(value.add(amount, 'week'));\n };\n addDays = (value, amount) => {\n return this.adjustOffset(value.add(amount, 'day'));\n };\n addHours = (value, amount) => {\n return this.adjustOffset(value.add(amount, 'hour'));\n };\n addMinutes = (value, amount) => {\n return this.adjustOffset(value.add(amount, 'minute'));\n };\n addSeconds = (value, amount) => {\n return this.adjustOffset(value.add(amount, 'second'));\n };\n getYear = value => {\n return value.year();\n };\n getMonth = value => {\n return value.month();\n };\n getDate = value => {\n return value.date();\n };\n getHours = value => {\n return value.hour();\n };\n getMinutes = value => {\n return value.minute();\n };\n getSeconds = value => {\n return value.second();\n };\n getMilliseconds = value => {\n return value.millisecond();\n };\n setYear = (value, year) => {\n return this.adjustOffset(value.set('year', year));\n };\n setMonth = (value, month) => {\n return this.adjustOffset(value.set('month', month));\n };\n setDate = (value, date) => {\n return this.adjustOffset(value.set('date', date));\n };\n setHours = (value, hours) => {\n return this.adjustOffset(value.set('hour', hours));\n };\n setMinutes = (value, minutes) => {\n return this.adjustOffset(value.set('minute', minutes));\n };\n setSeconds = (value, seconds) => {\n return this.adjustOffset(value.set('second', seconds));\n };\n setMilliseconds = (value, milliseconds) => {\n return this.adjustOffset(value.set('millisecond', milliseconds));\n };\n getDaysInMonth = value => {\n return value.daysInMonth();\n };\n getWeekArray = value => {\n const start = this.startOfWeek(this.startOfMonth(value));\n const end = this.endOfWeek(this.endOfMonth(value));\n let count = 0;\n let current = start;\n const nestedWeeks = [];\n while (current < end) {\n const weekNumber = Math.floor(count / 7);\n nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];\n nestedWeeks[weekNumber].push(current);\n current = this.addDays(current, 1);\n count += 1;\n }\n return nestedWeeks;\n };\n getWeekNumber = value => {\n return value.week();\n };\n getDayOfWeek(value) {\n return value.day() + 1;\n }\n getYearRange = ([start, end]) => {\n const startDate = this.startOfYear(start);\n const endDate = this.endOfYear(end);\n const years = [];\n let current = startDate;\n while (this.isBefore(current, endDate)) {\n years.push(current);\n current = this.addYears(current, 1);\n }\n return years;\n };\n}","/* eslint no-restricted-syntax: 0, prefer-template: 0, guard-for-in: 0\n ---\n These rules are preventing the performance optimizations below.\n */\n\n/**\n * Compose classes from multiple sources.\n *\n * @example\n * ```tsx\n * const slots = {\n * root: ['root', 'primary'],\n * label: ['label'],\n * };\n *\n * const getUtilityClass = (slot) => `MuiButton-${slot}`;\n *\n * const classes = {\n * root: 'my-root-class',\n * };\n *\n * const output = composeClasses(slots, getUtilityClass, classes);\n * // {\n * // root: 'MuiButton-root MuiButton-primary my-root-class',\n * // label: 'MuiButton-label',\n * // }\n * ```\n *\n * @param slots a list of classes for each possible slot\n * @param getUtilityClass a function to resolve the class based on the slot name\n * @param classes the input classes from props\n * @returns the resolved classes for all slots\n */\nexport default function composeClasses(slots, getUtilityClass, classes = undefined) {\n const output = {};\n for (const slotName in slots) {\n const slot = slots[slotName];\n let buffer = '';\n let start = true;\n for (let i = 0; i < slot.length; i += 1) {\n const value = slot[i];\n if (value) {\n buffer += (start === true ? '' : ' ') + getUtilityClass(value);\n start = false;\n if (classes && classes[value]) {\n buffer += ' ' + classes[value];\n }\n }\n }\n output[slotName] = buffer;\n }\n return output;\n}","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why\nconst safeReact = {\n ...React\n};\nconst maybeReactUseId = safeReact.useId;\n\n/**\n *\n * @example
\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n // React.useId() is only available from React 17.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? reactId;\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport const getPickersLocalization = pickersTranslations => {\n return {\n components: {\n MuiLocalizationProvider: {\n defaultProps: {\n localeText: _extends({}, pickersTranslations)\n }\n }\n }\n };\n};","import { getPickersLocalization } from \"./utils/getPickersLocalization.js\";\n\n// This object is not Partial because it is the default values\n\nconst enUSPickers = {\n // Calendar navigation\n previousMonth: 'Previous month',\n nextMonth: 'Next month',\n // View navigation\n openPreviousView: 'Open previous view',\n openNextView: 'Open next view',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view',\n // DateRange labels\n start: 'Start',\n end: 'End',\n startDate: 'Start date',\n startTime: 'Start time',\n endDate: 'End date',\n endTime: 'End time',\n // Action bar\n cancelButtonLabel: 'Cancel',\n clearButtonLabel: 'Clear',\n okButtonLabel: 'OK',\n todayButtonLabel: 'Today',\n nextStepButtonLabel: 'Next',\n // Toolbar titles\n datePickerToolbarTitle: 'Select date',\n dateTimePickerToolbarTitle: 'Select date & time',\n timePickerToolbarTitle: 'Select time',\n dateRangePickerToolbarTitle: 'Select date range',\n timeRangePickerToolbarTitle: 'Select time range',\n // Clock labels\n clockLabelText: (view, formattedTime) => `Select ${view}. ${!formattedTime ? 'No time selected' : `Selected time is ${formattedTime}`}`,\n hoursClockNumberText: hours => `${hours} hours`,\n minutesClockNumberText: minutes => `${minutes} minutes`,\n secondsClockNumberText: seconds => `${seconds} seconds`,\n // Digital clock labels\n selectViewText: view => `Select ${view}`,\n // Calendar labels\n calendarWeekNumberHeaderLabel: 'Week number',\n calendarWeekNumberHeaderText: '#',\n calendarWeekNumberAriaLabelText: weekNumber => `Week ${weekNumber}`,\n calendarWeekNumberText: weekNumber => `${weekNumber}`,\n // Open Picker labels\n openDatePickerDialogue: formattedDate => formattedDate ? `Choose date, selected date is ${formattedDate}` : 'Choose date',\n openTimePickerDialogue: formattedTime => formattedTime ? `Choose time, selected time is ${formattedTime}` : 'Choose time',\n openRangePickerDialogue: formattedRange => formattedRange ? `Choose range, selected range is ${formattedRange}` : 'Choose range',\n fieldClearLabel: 'Clear',\n // Table labels\n timeTableLabel: 'pick time',\n dateTableLabel: 'pick date',\n // Field section placeholders\n fieldYearPlaceholder: params => 'Y'.repeat(params.digitAmount),\n fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'MMMM' : 'MM',\n fieldDayPlaceholder: () => 'DD',\n fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'EEEE' : 'EE',\n fieldHoursPlaceholder: () => 'hh',\n fieldMinutesPlaceholder: () => 'mm',\n fieldSecondsPlaceholder: () => 'ss',\n fieldMeridiemPlaceholder: () => 'aa',\n // View names\n year: 'Year',\n month: 'Month',\n day: 'Day',\n weekDay: 'Week day',\n hours: 'Hours',\n minutes: 'Minutes',\n seconds: 'Seconds',\n meridiem: 'Meridiem',\n // Common\n empty: 'Empty'\n};\nexport const DEFAULT_LOCALE = enUSPickers;\nexport const enUS = getPickersLocalization(enUSPickers);","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { DEFAULT_LOCALE } from \"../locales/enUS.js\";\nimport { PickerAdapterContext } from \"../LocalizationProvider/LocalizationProvider.js\";\nexport const useLocalizationContext = () => {\n const localization = React.useContext(PickerAdapterContext);\n if (localization === null) {\n throw new Error(['MUI X: Can not find the date and time pickers localization context.', 'It looks like you forgot to wrap your component in LocalizationProvider.', 'This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package'].join('\\n'));\n }\n if (localization.adapter === null) {\n throw new Error(['MUI X: Can not find the date and time pickers adapter from its localization context.', 'It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider.'].join('\\n'));\n }\n const localeText = React.useMemo(() => _extends({}, DEFAULT_LOCALE, localization.localeText), [localization.localeText]);\n return React.useMemo(() => _extends({}, localization, {\n localeText\n }), [localization, localeText]);\n};\nexport const usePickerAdapter = () => useLocalizationContext().adapter;","'use client';\n\nimport { useLocalizationContext } from \"./usePickerAdapter.js\";\nexport const usePickerTranslations = () => useLocalizationContext().localeText;","/**\n * Removes event handlers from the given object.\n * A field is considered an event handler if it is a function with a name beginning with `on`.\n *\n * @param object Object to remove event handlers from.\n * @returns Object with event handlers removed.\n */\nfunction omitEventHandlers(object) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nexport default omitEventHandlers;","import clsx from 'clsx';\nimport extractEventHandlers from \"../extractEventHandlers/index.js\";\nimport omitEventHandlers from \"../omitEventHandlers/index.js\";\n/**\n * Merges the slot component internal props (usually coming from a hook)\n * with the externally provided ones.\n *\n * The merge order is (the latter overrides the former):\n * 1. The internal props (specified as a getter function to work with get*Props hook result)\n * 2. Additional props (specified internally on a Base UI component)\n * 3. External props specified on the owner component. These should only be used on a root slot.\n * 4. External props specified in the `slotProps.*` prop.\n * 5. The `className` prop - combined from all the above.\n * @param parameters\n * @returns\n */\nfunction mergeSlotProps(parameters) {\n const {\n getSlotProps,\n additionalProps,\n externalSlotProps,\n externalForwardedProps,\n className\n } = parameters;\n if (!getSlotProps) {\n // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,\n // so we can simply merge all the props without having to worry about extracting event handlers.\n const joinedClasses = clsx(additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);\n const mergedStyle = {\n ...additionalProps?.style,\n ...externalForwardedProps?.style,\n ...externalSlotProps?.style\n };\n const props = {\n ...additionalProps,\n ...externalForwardedProps,\n ...externalSlotProps\n };\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: undefined\n };\n }\n\n // In this case, getSlotProps is responsible for calling the external event handlers.\n // We don't need to include them in the merged props because of this.\n\n const eventHandlers = extractEventHandlers({\n ...externalForwardedProps,\n ...externalSlotProps\n });\n const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);\n const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);\n const internalSlotProps = getSlotProps(eventHandlers);\n\n // The order of classes is important here.\n // Emotion (that we use in libraries consuming Base UI) depends on this order\n // to properly override style. It requires the most important classes to be last\n // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.\n const joinedClasses = clsx(internalSlotProps?.className, additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);\n const mergedStyle = {\n ...internalSlotProps?.style,\n ...additionalProps?.style,\n ...externalForwardedProps?.style,\n ...externalSlotProps?.style\n };\n const props = {\n ...internalSlotProps,\n ...additionalProps,\n ...otherPropsWithoutEventHandlers,\n ...componentsPropsWithoutEventHandlers\n };\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: internalSlotProps.ref\n };\n}\nexport default mergeSlotProps;","/**\n * Extracts event handlers from a given object.\n * A prop is considered an event handler if it is a function and its name starts with `on`.\n *\n * @param object An object to extract event handlers from.\n * @param excludeKeys An array of keys to exclude from the returned object.\n */\nfunction extractEventHandlers(object, excludeKeys = []) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nexport default extractEventHandlers;","'use client';\n\nimport useForkRef from \"../useForkRef/index.js\";\nimport appendOwnerState from \"../appendOwnerState/index.js\";\nimport mergeSlotProps from \"../mergeSlotProps/index.js\";\nimport resolveComponentProps from \"../resolveComponentProps/index.js\";\n/**\n * @ignore - do not document.\n * Builds the props to be passed into the slot of an unstyled component.\n * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior.\n * If the slot component is not a host component, it also merges in the `ownerState`.\n *\n * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component.\n */\nfunction useSlotProps(parameters) {\n const {\n elementType,\n externalSlotProps,\n ownerState,\n skipResolvingSlotProps = false,\n ...other\n } = parameters;\n const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);\n const {\n props: mergedProps,\n internalRef\n } = mergeSlotProps({\n ...other,\n externalSlotProps: resolvedComponentsProps\n });\n const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.additionalProps?.ref);\n const props = appendOwnerState(elementType, {\n ...mergedProps,\n ref\n }, ownerState);\n return props;\n}\nexport default useSlotProps;","/**\n * If `componentProps` is a function, calls it with the provided `ownerState`.\n * Otherwise, just returns `componentProps`.\n */\nfunction resolveComponentProps(componentProps, ownerState, slotState) {\n if (typeof componentProps === 'function') {\n return componentProps(ownerState, slotState);\n }\n return componentProps;\n}\nexport default resolveComponentProps;","'use client';\n\nimport * as React from 'react';\n\n/**\n * Merges refs into a single memoized callback ref or `null`.\n *\n * ```tsx\n * const rootRef = React.useRef(null);\n * const refFork = useForkRef(rootRef, props.ref);\n *\n * return (\n * \n * );\n * ```\n *\n * @param {Array | undefined>} refs The ref array.\n * @returns {React.RefCallback | null} The new ref callback.\n */\nexport default function useForkRef(...refs) {\n const cleanupRef = React.useRef(undefined);\n const refEffect = React.useCallback(instance => {\n const cleanups = refs.map(ref => {\n if (ref == null) {\n return null;\n }\n if (typeof ref === 'function') {\n const refCallback = ref;\n const refCleanup = refCallback(instance);\n return typeof refCleanup === 'function' ? refCleanup : () => {\n refCallback(null);\n };\n }\n ref.current = instance;\n return () => {\n ref.current = null;\n };\n });\n return () => {\n cleanups.forEach(refCleanup => refCleanup?.());\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return value => {\n if (cleanupRef.current) {\n cleanupRef.current();\n cleanupRef.current = undefined;\n }\n if (value != null) {\n cleanupRef.current = refEffect(value);\n }\n };\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- intentionally ignoring that the dependency array must be an array literal\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}","import isHostComponent from \"../isHostComponent/index.js\";\n\n/**\n * Type of the ownerState based on the type of an element it applies to.\n * This resolves to the provided OwnerState for React components and `undefined` for host components.\n * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.\n */\n\n/**\n * Appends the ownerState object to the props, merging with the existing one if necessary.\n *\n * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.\n * @param otherProps Props of the element.\n * @param ownerState\n */\nfunction appendOwnerState(elementType, otherProps, ownerState) {\n if (elementType === undefined || isHostComponent(elementType)) {\n return otherProps;\n }\n return {\n ...otherProps,\n ownerState: {\n ...otherProps.ownerState,\n ...ownerState\n }\n };\n}\nexport default appendOwnerState;","/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nfunction isHostComponent(element) {\n return typeof element === 'string';\n}\nexport default isHostComponent;","import { createSvgIcon } from '@mui/material/utils';\nimport * as React from 'react';\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const ArrowDropDownIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M7 10l5 5 5-5z\"\n}), 'ArrowDropDown');\n\n/**\n * @ignore - internal component.\n */\nexport const ArrowLeftIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z\"\n}), 'ArrowLeft');\n\n/**\n * @ignore - internal component.\n */\nexport const ArrowRightIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z\"\n}), 'ArrowRight');\n\n/**\n * @ignore - internal component.\n */\nexport const CalendarIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z\"\n}), 'Calendar');\n\n/**\n * @ignore - internal component.\n */\nexport const ClockIcon = createSvgIcon(/*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"path\", {\n d: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n }), /*#__PURE__*/_jsx(\"path\", {\n d: \"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z\"\n })]\n}), 'Clock');\n\n/**\n * @ignore - internal component.\n */\nexport const DateRangeIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z\"\n}), 'DateRange');\n\n/**\n * @ignore - internal component.\n */\nexport const TimeIcon = createSvgIcon(/*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"path\", {\n d: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n }), /*#__PURE__*/_jsx(\"path\", {\n d: \"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z\"\n })]\n}), 'Time');\n\n/**\n * @ignore - internal component.\n */\nexport const ClearIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Clear');","const defaultGenerator = componentName => componentName;\nconst createClassNameGenerator = () => {\n let generate = defaultGenerator;\n return {\n configure(generator) {\n generate = generator;\n },\n generate(componentName) {\n return generate(componentName);\n },\n reset() {\n generate = defaultGenerator;\n }\n };\n};\nconst ClassNameGenerator = createClassNameGenerator();\nexport default ClassNameGenerator;","import ClassNameGenerator from \"../ClassNameGenerator/index.js\";\nexport const globalStateClasses = {\n active: 'active',\n checked: 'checked',\n completed: 'completed',\n disabled: 'disabled',\n error: 'error',\n expanded: 'expanded',\n focused: 'focused',\n focusVisible: 'focusVisible',\n open: 'open',\n readOnly: 'readOnly',\n required: 'required',\n selected: 'selected'\n};\nexport default function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import generateUtilityClass from \"../generateUtilityClass/index.js\";\nexport default function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);\n });\n return result;\n}","import generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nexport function getPickersArrowSwitcherUtilityClass(slot) {\n return generateUtilityClass('MuiPickersArrowSwitcher', slot);\n}\nexport const pickersArrowSwitcherClasses = generateUtilityClasses('MuiPickersArrowSwitcher', ['root', 'spacer', 'button', 'previousIconButton', 'nextIconButton', 'leftArrowIcon', 'rightArrowIcon']);","'use client';\n\nimport * as React from 'react';\nimport { LocalizationProvider } from \"../../LocalizationProvider/index.js\";\nimport { IsValidValueContext } from \"../../hooks/useIsValidValue.js\";\nimport { PickerFieldPrivateContext } from \"../hooks/useNullableFieldPrivateContext.js\";\nimport { PickerContext } from \"../../hooks/usePickerContext.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const PickerActionsContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") PickerActionsContext.displayName = \"PickerActionsContext\";\nexport const PickerPrivateContext = /*#__PURE__*/React.createContext({\n ownerState: {\n isPickerDisabled: false,\n isPickerReadOnly: false,\n isPickerValueEmpty: false,\n isPickerOpen: false,\n pickerVariant: 'desktop',\n pickerOrientation: 'portrait'\n },\n rootRefObject: {\n current: null\n },\n labelId: undefined,\n dismissViews: () => {},\n hasUIView: true,\n getCurrentViewMode: () => 'UI',\n triggerElement: null,\n viewContainerRole: null,\n defaultActionBarActions: [],\n onPopperExited: undefined\n});\n\n/**\n * Provides the context for the various parts of a Picker component:\n * - contextValue: the context for the Picker sub-components.\n * - localizationProvider: the translations passed through the props and through a parent LocalizationProvider.\n *\n * @ignore - do not document.\n */\nif (process.env.NODE_ENV !== \"production\") PickerPrivateContext.displayName = \"PickerPrivateContext\";\nexport function PickerProvider(props) {\n const {\n contextValue,\n actionsContextValue,\n privateContextValue,\n fieldPrivateContextValue,\n isValidContextValue,\n localeText,\n children\n } = props;\n return /*#__PURE__*/_jsx(PickerContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(PickerActionsContext.Provider, {\n value: actionsContextValue,\n children: /*#__PURE__*/_jsx(PickerPrivateContext.Provider, {\n value: privateContextValue,\n children: /*#__PURE__*/_jsx(PickerFieldPrivateContext.Provider, {\n value: fieldPrivateContextValue,\n children: /*#__PURE__*/_jsx(IsValidValueContext.Provider, {\n value: isValidContextValue,\n children: /*#__PURE__*/_jsx(LocalizationProvider, {\n localeText: localeText,\n children: children\n })\n })\n })\n })\n })\n });\n}","'use client';\n\nimport * as React from 'react';\nimport { PickerPrivateContext } from \"../components/PickerProvider.js\";\n\n/**\n * Returns the private context passed by the Picker wrapping the current component.\n */\nexport const usePickerPrivateContext = () => React.useContext(PickerPrivateContext);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"className\", \"slots\", \"slotProps\", \"isNextDisabled\", \"isNextHidden\", \"onGoToNext\", \"nextLabel\", \"isPreviousDisabled\", \"isPreviousHidden\", \"onGoToPrevious\", \"previousLabel\", \"labelId\", \"classes\"],\n _excluded2 = [\"ownerState\"],\n _excluded3 = [\"ownerState\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport Typography from '@mui/material/Typography';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport IconButton from '@mui/material/IconButton';\nimport { ArrowLeftIcon, ArrowRightIcon } from \"../../../icons/index.js\";\nimport { getPickersArrowSwitcherUtilityClass } from \"./pickersArrowSwitcherClasses.js\";\nimport { usePickerPrivateContext } from \"../../hooks/usePickerPrivateContext.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst PickersArrowSwitcherRoot = styled('div', {\n name: 'MuiPickersArrowSwitcher',\n slot: 'Root'\n})({\n display: 'flex'\n});\nconst PickersArrowSwitcherSpacer = styled('div', {\n name: 'MuiPickersArrowSwitcher',\n slot: 'Spacer'\n})(({\n theme\n}) => ({\n width: theme.spacing(3)\n}));\nconst PickersArrowSwitcherButton = styled(IconButton, {\n name: 'MuiPickersArrowSwitcher',\n slot: 'Button'\n})({\n variants: [{\n props: {\n isButtonHidden: true\n },\n style: {\n visibility: 'hidden'\n }\n }]\n});\nconst useUtilityClasses = classes => {\n const slots = {\n root: ['root'],\n spacer: ['spacer'],\n button: ['button'],\n previousIconButton: ['previousIconButton'],\n nextIconButton: ['nextIconButton'],\n leftArrowIcon: ['leftArrowIcon'],\n rightArrowIcon: ['rightArrowIcon']\n };\n return composeClasses(slots, getPickersArrowSwitcherUtilityClass, classes);\n};\nexport const PickersArrowSwitcher = /*#__PURE__*/React.forwardRef(function PickersArrowSwitcher(inProps, ref) {\n const isRtl = useRtl();\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersArrowSwitcher'\n });\n const {\n children,\n className,\n slots,\n slotProps,\n isNextDisabled,\n isNextHidden,\n onGoToNext,\n nextLabel,\n isPreviousDisabled,\n isPreviousHidden,\n onGoToPrevious,\n previousLabel,\n labelId,\n classes: classesProp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n ownerState\n } = usePickerPrivateContext();\n const classes = useUtilityClasses(classesProp);\n const nextProps = {\n isDisabled: isNextDisabled,\n isHidden: isNextHidden,\n goTo: onGoToNext,\n label: nextLabel\n };\n const previousProps = {\n isDisabled: isPreviousDisabled,\n isHidden: isPreviousHidden,\n goTo: onGoToPrevious,\n label: previousLabel\n };\n const PreviousIconButton = slots?.previousIconButton ?? PickersArrowSwitcherButton;\n const previousIconButtonProps = useSlotProps({\n elementType: PreviousIconButton,\n externalSlotProps: slotProps?.previousIconButton,\n additionalProps: {\n size: 'medium',\n title: previousProps.label,\n 'aria-label': previousProps.label,\n disabled: previousProps.isDisabled,\n edge: 'end',\n onClick: previousProps.goTo\n },\n ownerState: _extends({}, ownerState, {\n isButtonHidden: previousProps.isHidden ?? false\n }),\n className: clsx(classes.button, classes.previousIconButton)\n });\n const NextIconButton = slots?.nextIconButton ?? PickersArrowSwitcherButton;\n const nextIconButtonProps = useSlotProps({\n elementType: NextIconButton,\n externalSlotProps: slotProps?.nextIconButton,\n additionalProps: {\n size: 'medium',\n title: nextProps.label,\n 'aria-label': nextProps.label,\n disabled: nextProps.isDisabled,\n edge: 'start',\n onClick: nextProps.goTo\n },\n ownerState: _extends({}, ownerState, {\n isButtonHidden: nextProps.isHidden ?? false\n }),\n className: clsx(classes.button, classes.nextIconButton)\n });\n const LeftArrowIcon = slots?.leftArrowIcon ?? ArrowLeftIcon;\n // The spread is here to avoid this bug mui/material-ui#34056\n const _useSlotProps = useSlotProps({\n elementType: LeftArrowIcon,\n externalSlotProps: slotProps?.leftArrowIcon,\n additionalProps: {\n fontSize: 'inherit'\n },\n ownerState,\n className: classes.leftArrowIcon\n }),\n leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);\n const RightArrowIcon = slots?.rightArrowIcon ?? ArrowRightIcon;\n // The spread is here to avoid this bug mui/material-ui#34056\n const _useSlotProps2 = useSlotProps({\n elementType: RightArrowIcon,\n externalSlotProps: slotProps?.rightArrowIcon,\n additionalProps: {\n fontSize: 'inherit'\n },\n ownerState,\n className: classes.rightArrowIcon\n }),\n rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3);\n return /*#__PURE__*/_jsxs(PickersArrowSwitcherRoot, _extends({\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n children: [/*#__PURE__*/_jsx(PreviousIconButton, _extends({}, previousIconButtonProps, {\n children: isRtl ? /*#__PURE__*/_jsx(RightArrowIcon, _extends({}, rightArrowIconProps)) : /*#__PURE__*/_jsx(LeftArrowIcon, _extends({}, leftArrowIconProps))\n })), children ? /*#__PURE__*/_jsx(Typography, {\n variant: \"subtitle1\",\n component: \"span\",\n id: labelId,\n children: children\n }) : /*#__PURE__*/_jsx(PickersArrowSwitcherSpacer, {\n className: classes.spacer,\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(NextIconButton, _extends({}, nextIconButtonProps, {\n children: isRtl ? /*#__PURE__*/_jsx(LeftArrowIcon, _extends({}, leftArrowIconProps)) : /*#__PURE__*/_jsx(RightArrowIcon, _extends({}, rightArrowIconProps))\n }))]\n }));\n});\nif (process.env.NODE_ENV !== \"production\") PickersArrowSwitcher.displayName = \"PickersArrowSwitcher\";","import { areViewsEqual } from \"./views.js\";\nexport const EXPORTED_TIME_VIEWS = ['hours', 'minutes', 'seconds'];\nexport const TIME_VIEWS = ['hours', 'minutes', 'seconds', 'meridiem'];\nexport const isTimeView = view => EXPORTED_TIME_VIEWS.includes(view);\nexport const isInternalTimeView = view => TIME_VIEWS.includes(view);\nexport const getMeridiem = (date, adapter) => {\n if (!date) {\n return null;\n }\n return adapter.getHours(date) >= 12 ? 'pm' : 'am';\n};\nexport const convertValueToMeridiem = (value, meridiem, ampm) => {\n if (ampm) {\n const currentMeridiem = value >= 12 ? 'pm' : 'am';\n if (currentMeridiem !== meridiem) {\n return meridiem === 'am' ? value - 12 : value + 12;\n }\n }\n return value;\n};\nexport const convertToMeridiem = (time, meridiem, ampm, adapter) => {\n const newHoursAmount = convertValueToMeridiem(adapter.getHours(time), meridiem, ampm);\n return adapter.setHours(time, newHoursAmount);\n};\nexport const getSecondsInDay = (date, adapter) => {\n return adapter.getHours(date) * 3600 + adapter.getMinutes(date) * 60 + adapter.getSeconds(date);\n};\nexport const createIsAfterIgnoreDatePart = (disableIgnoringDatePartForTimeValidation, adapter) => (dateLeft, dateRight) => {\n if (disableIgnoringDatePartForTimeValidation) {\n return adapter.isAfter(dateLeft, dateRight);\n }\n return getSecondsInDay(dateLeft, adapter) > getSecondsInDay(dateRight, adapter);\n};\nexport const resolveTimeFormat = (adapter, {\n format,\n views,\n ampm\n}) => {\n if (format != null) {\n return format;\n }\n const formats = adapter.formats;\n if (areViewsEqual(views, ['hours'])) {\n return ampm ? `${formats.hours12h} ${formats.meridiem}` : formats.hours24h;\n }\n if (areViewsEqual(views, ['minutes'])) {\n return formats.minutes;\n }\n if (areViewsEqual(views, ['seconds'])) {\n return formats.seconds;\n }\n if (areViewsEqual(views, ['minutes', 'seconds'])) {\n return `${formats.minutes}:${formats.seconds}`;\n }\n if (areViewsEqual(views, ['hours', 'minutes', 'seconds'])) {\n return ampm ? `${formats.hours12h}:${formats.minutes}:${formats.seconds} ${formats.meridiem}` : `${formats.hours24h}:${formats.minutes}:${formats.seconds}`;\n }\n return ampm ? `${formats.hours12h}:${formats.minutes} ${formats.meridiem}` : `${formats.hours24h}:${formats.minutes}`;\n};","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from \"../useEnhancedEffect/index.js\";\n\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nexport default useEventCallback;","'use client';\n\n// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- process.env never changes, dependency arrays are intentionally ignored\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport default function useControlled(props) {\n const {\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n } = props;\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n if (!isControlled && JSON.stringify(defaultProp) !== JSON.stringify(defaultValue)) {\n console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n\n // TODO: provide overloads for the useControlled function to account for the case where either\n // controlled or default is not undefined.\n // In that case the return type should be [T, React.Dispatch>]\n // otherwise it should be [T | undefined, React.Dispatch>]\n return [value, setValueIfUncontrolled];\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport const DEFAULT_STEP_NAVIGATION = {\n hasNextStep: false,\n hasSeveralSteps: false,\n goToNextStep: () => {},\n areViewsInSameStep: () => true\n};\n\n/**\n * Create an object that determines whether there is a next step and allows to go to the next step.\n * @param {CreateStepNavigationParameters} parameters The parameters of the createStepNavigation function\n * @returns {CreateStepNavigationReturnValue} The return value of the createStepNavigation function\n */\nexport function createStepNavigation(parameters) {\n const {\n steps,\n isViewMatchingStep,\n onStepChange\n } = parameters;\n return parametersBis => {\n if (steps == null) {\n return DEFAULT_STEP_NAVIGATION;\n }\n const currentStepIndex = steps.findIndex(step => isViewMatchingStep(parametersBis.view, step));\n const nextStep = currentStepIndex === -1 || currentStepIndex === steps.length - 1 ? null : steps[currentStepIndex + 1];\n return {\n hasNextStep: nextStep != null,\n hasSeveralSteps: steps.length > 1,\n goToNextStep: () => {\n if (nextStep == null) {\n return;\n }\n onStepChange(_extends({}, parametersBis, {\n step: nextStep\n }));\n },\n areViewsInSameStep: (viewA, viewB) => {\n const stepA = steps.find(step => isViewMatchingStep(viewA, step));\n const stepB = steps.find(step => isViewMatchingStep(viewB, step));\n return stepA === stepB;\n }\n };\n };\n}","export const DAY_SIZE = 36;\nexport const DAY_MARGIN = 2;\nexport const DIALOG_WIDTH = 320;\nexport const MAX_CALENDAR_HEIGHT = 280;\nexport const VIEW_HEIGHT = 336;\nexport const DIGITAL_CLOCK_VIEW_HEIGHT = 232;\nexport const MULTI_SECTION_CLOCK_SECTION_WIDTH = 48;","import { styled } from '@mui/material/styles';\nimport { DIALOG_WIDTH, VIEW_HEIGHT } from \"../../constants/dimensions.js\";\nexport const PickerViewRoot = styled('div', {\n slot: 'internal',\n shouldForwardProp: undefined\n})({\n overflow: 'hidden',\n width: DIALOG_WIDTH,\n maxHeight: VIEW_HEIGHT,\n display: 'flex',\n flexDirection: 'column',\n margin: '0 auto'\n});","import generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nexport function getTimeClockUtilityClass(slot) {\n return generateUtilityClass('MuiTimeClock', slot);\n}\nexport const timeClockClasses = generateUtilityClasses('MuiTimeClock', ['root', 'arrowSwitcher']);","export const CLOCK_WIDTH = 220;\nexport const CLOCK_HOUR_WIDTH = 36;\nconst clockCenter = {\n x: CLOCK_WIDTH / 2,\n y: CLOCK_WIDTH / 2\n};\nconst baseClockPoint = {\n x: clockCenter.x,\n y: 0\n};\nconst cx = baseClockPoint.x - clockCenter.x;\nconst cy = baseClockPoint.y - clockCenter.y;\nconst rad2deg = rad => rad * (180 / Math.PI);\nconst getAngleValue = (step, offsetX, offsetY) => {\n const x = offsetX - clockCenter.x;\n const y = offsetY - clockCenter.y;\n const atan = Math.atan2(cx, cy) - Math.atan2(x, y);\n let deg = rad2deg(atan);\n deg = Math.round(deg / step) * step;\n deg %= 360;\n const value = Math.floor(deg / step) || 0;\n const delta = x ** 2 + y ** 2;\n const distance = Math.sqrt(delta);\n return {\n value,\n distance\n };\n};\nexport const getMinutes = (offsetX, offsetY, step = 1) => {\n const angleStep = step * 6;\n let {\n value\n } = getAngleValue(angleStep, offsetX, offsetY);\n value = value * step % 60;\n return value;\n};\nexport const getHours = (offsetX, offsetY, ampm) => {\n const {\n value,\n distance\n } = getAngleValue(30, offsetX, offsetY);\n let hour = value || 12;\n if (!ampm) {\n if (distance < CLOCK_WIDTH / 2 - CLOCK_HOUR_WIDTH) {\n hour += 12;\n hour %= 24;\n }\n } else {\n hour %= 12;\n }\n return hour;\n};","import generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nexport function getClockPointerUtilityClass(slot) {\n return generateUtilityClass('MuiClockPointer', slot);\n}\nexport const clockPointerClasses = generateUtilityClasses('MuiClockPointer', ['root', 'thumb']);","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"classes\", \"isBetweenTwoClockValues\", \"isInner\", \"type\", \"viewValue\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { CLOCK_WIDTH, CLOCK_HOUR_WIDTH } from \"./shared.js\";\nimport { getClockPointerUtilityClass } from \"./clockPointerClasses.js\";\nimport { usePickerPrivateContext } from \"../internals/hooks/usePickerPrivateContext.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = classes => {\n const slots = {\n root: ['root'],\n thumb: ['thumb']\n };\n return composeClasses(slots, getClockPointerUtilityClass, classes);\n};\nconst ClockPointerRoot = styled('div', {\n name: 'MuiClockPointer',\n slot: 'Root'\n})(({\n theme\n}) => ({\n width: 2,\n backgroundColor: (theme.vars || theme).palette.primary.main,\n position: 'absolute',\n left: 'calc(50% - 1px)',\n bottom: '50%',\n transformOrigin: 'center bottom 0px',\n variants: [{\n props: {\n isClockPointerAnimated: true\n },\n style: {\n transition: theme.transitions.create(['transform', 'height'])\n }\n }]\n}));\nconst ClockPointerThumb = styled('div', {\n name: 'MuiClockPointer',\n slot: 'Thumb'\n})(({\n theme\n}) => ({\n width: 4,\n height: 4,\n backgroundColor: (theme.vars || theme).palette.primary.contrastText,\n borderRadius: '50%',\n position: 'absolute',\n top: -21,\n left: `calc(50% - ${CLOCK_HOUR_WIDTH / 2}px)`,\n border: `${(CLOCK_HOUR_WIDTH - 4) / 2}px solid ${(theme.vars || theme).palette.primary.main}`,\n boxSizing: 'content-box',\n variants: [{\n props: {\n isClockPointerBetweenTwoValues: false\n },\n style: {\n backgroundColor: (theme.vars || theme).palette.primary.main\n }\n }]\n}));\n\n/**\n * @ignore - internal component.\n */\nexport function ClockPointer(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiClockPointer'\n });\n const {\n className,\n classes: classesProp,\n isBetweenTwoClockValues,\n isInner,\n type,\n viewValue\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const previousType = React.useRef(type);\n React.useEffect(() => {\n previousType.current = type;\n }, [type]);\n const {\n ownerState: pickerOwnerState\n } = usePickerPrivateContext();\n const ownerState = _extends({}, pickerOwnerState, {\n isClockPointerAnimated: previousType.current !== type,\n isClockPointerBetweenTwoValues: isBetweenTwoClockValues\n });\n const classes = useUtilityClasses(classesProp);\n const getAngleStyle = () => {\n const max = type === 'hours' ? 12 : 60;\n let angle = 360 / max * viewValue;\n if (type === 'hours' && viewValue > 12) {\n angle -= 360; // round up angle to max 360 degrees\n }\n return {\n height: Math.round((isInner ? 0.26 : 0.4) * CLOCK_WIDTH),\n transform: `rotateZ(${angle}deg)`\n };\n };\n return /*#__PURE__*/_jsx(ClockPointerRoot, _extends({\n style: getAngleStyle(),\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n children: /*#__PURE__*/_jsx(ClockPointerThumb, {\n ownerState: ownerState,\n className: classes.thumb\n })\n }));\n}","import generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nexport function getClockUtilityClass(slot) {\n return generateUtilityClass('MuiClock', slot);\n}\nexport const clockClasses = generateUtilityClasses('MuiClock', ['root', 'clock', 'wrapper', 'squareMask', 'pin', 'amButton', 'pmButton', 'meridiemText', 'selected']);","import { areViewsEqual } from \"./views.js\";\nexport const mergeDateAndTime = (adapter, dateParam, timeParam) => {\n let mergedDate = dateParam;\n mergedDate = adapter.setHours(mergedDate, adapter.getHours(timeParam));\n mergedDate = adapter.setMinutes(mergedDate, adapter.getMinutes(timeParam));\n mergedDate = adapter.setSeconds(mergedDate, adapter.getSeconds(timeParam));\n mergedDate = adapter.setMilliseconds(mergedDate, adapter.getMilliseconds(timeParam));\n return mergedDate;\n};\nexport const findClosestEnabledDate = ({\n date,\n disableFuture,\n disablePast,\n maxDate,\n minDate,\n isDateDisabled,\n adapter,\n timezone\n}) => {\n const today = mergeDateAndTime(adapter, adapter.date(undefined, timezone), date);\n if (disablePast && adapter.isBefore(minDate, today)) {\n minDate = today;\n }\n if (disableFuture && adapter.isAfter(maxDate, today)) {\n maxDate = today;\n }\n let forward = date;\n let backward = date;\n if (adapter.isBefore(date, minDate)) {\n forward = minDate;\n backward = null;\n }\n if (adapter.isAfter(date, maxDate)) {\n if (backward) {\n backward = maxDate;\n }\n forward = null;\n }\n while (forward || backward) {\n if (forward && adapter.isAfter(forward, maxDate)) {\n forward = null;\n }\n if (backward && adapter.isBefore(backward, minDate)) {\n backward = null;\n }\n if (forward) {\n if (!isDateDisabled(forward)) {\n return forward;\n }\n forward = adapter.addDays(forward, 1);\n }\n if (backward) {\n if (!isDateDisabled(backward)) {\n return backward;\n }\n backward = adapter.addDays(backward, -1);\n }\n }\n return null;\n};\nexport const replaceInvalidDateByNull = (adapter, value) => !adapter.isValid(value) ? null : value;\nexport const applyDefaultDate = (adapter, value, defaultValue) => {\n if (value == null || !adapter.isValid(value)) {\n return defaultValue;\n }\n return value;\n};\nexport const areDatesEqual = (adapter, a, b) => {\n if (!adapter.isValid(a) && a != null && !adapter.isValid(b) && b != null) {\n return true;\n }\n return adapter.isEqual(a, b);\n};\nexport const getMonthsInYear = (adapter, year) => {\n const firstMonth = adapter.startOfYear(year);\n const months = [firstMonth];\n while (months.length < 12) {\n const prevMonth = months[months.length - 1];\n months.push(adapter.addMonths(prevMonth, 1));\n }\n return months;\n};\nexport const getTodayDate = (adapter, timezone, valueType) => valueType === 'date' ? adapter.startOfDay(adapter.date(undefined, timezone)) : adapter.date(undefined, timezone);\nexport const formatMeridiem = (adapter, meridiem) => {\n const date = adapter.setHours(adapter.date(), meridiem === 'am' ? 2 : 14);\n return adapter.format(date, 'meridiem');\n};\nexport const DATE_VIEWS = ['year', 'month', 'day'];\nexport const isDatePickerView = view => DATE_VIEWS.includes(view);\nexport const resolveDateFormat = (adapter, {\n format,\n views\n}, isInToolbar) => {\n if (format != null) {\n return format;\n }\n const formats = adapter.formats;\n if (areViewsEqual(views, ['year'])) {\n return formats.year;\n }\n if (areViewsEqual(views, ['month'])) {\n return formats.month;\n }\n if (areViewsEqual(views, ['day'])) {\n return formats.dayOfMonth;\n }\n if (areViewsEqual(views, ['month', 'year'])) {\n return `${formats.month} ${formats.year}`;\n }\n if (areViewsEqual(views, ['day', 'month'])) {\n return `${formats.month} ${formats.dayOfMonth}`;\n }\n if (isInToolbar) {\n // Little localization hack (Google is doing the same for android native pickers):\n // For english localization it is convenient to include weekday into the date \"Mon, Jun 1\".\n // For other locales using strings like \"June 1\", without weekday.\n return /en/.test(adapter.getCurrentLocaleCode()) ? formats.normalDateWithWeekday : formats.normalDate;\n }\n return formats.keyboardDate;\n};\nexport const getWeekdays = (adapter, date) => {\n const start = adapter.startOfWeek(date);\n return [0, 1, 2, 3, 4, 5, 6].map(diff => adapter.addDays(start, diff));\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport IconButton from '@mui/material/IconButton';\nimport Typography from '@mui/material/Typography';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { ClockPointer } from \"./ClockPointer.js\";\nimport { usePickerAdapter, usePickerTranslations } from \"../hooks/index.js\";\nimport { CLOCK_HOUR_WIDTH, getHours, getMinutes } from \"./shared.js\";\nimport { getClockUtilityClass } from \"./clockClasses.js\";\nimport { formatMeridiem } from \"../internals/utils/date-utils.js\";\nimport { usePickerPrivateContext } from \"../internals/hooks/usePickerPrivateContext.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = (classes, ownerState) => {\n const slots = {\n root: ['root'],\n clock: ['clock'],\n wrapper: ['wrapper'],\n squareMask: ['squareMask'],\n pin: ['pin'],\n amButton: ['amButton', ownerState.clockMeridiemMode === 'am' && 'selected'],\n pmButton: ['pmButton', ownerState.clockMeridiemMode === 'pm' && 'selected'],\n meridiemText: ['meridiemText']\n };\n return composeClasses(slots, getClockUtilityClass, classes);\n};\nconst ClockRoot = styled('div', {\n name: 'MuiClock',\n slot: 'Root'\n})(({\n theme\n}) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n margin: theme.spacing(2)\n}));\nconst ClockClock = styled('div', {\n name: 'MuiClock',\n slot: 'Clock'\n})({\n backgroundColor: 'rgba(0,0,0,.07)',\n borderRadius: '50%',\n height: 220,\n width: 220,\n flexShrink: 0,\n position: 'relative',\n pointerEvents: 'none'\n});\nconst ClockWrapper = styled('div', {\n name: 'MuiClock',\n slot: 'Wrapper'\n})({\n '&:focus': {\n outline: 'none'\n }\n});\nconst ClockSquareMask = styled('div', {\n name: 'MuiClock',\n slot: 'SquareMask'\n})({\n width: '100%',\n height: '100%',\n position: 'absolute',\n pointerEvents: 'auto',\n outline: 0,\n // Disable scroll capabilities.\n touchAction: 'none',\n userSelect: 'none',\n variants: [{\n props: {\n isClockDisabled: false\n },\n style: {\n '@media (pointer: fine)': {\n cursor: 'pointer',\n borderRadius: '50%'\n },\n '&:active': {\n cursor: 'move'\n }\n }\n }]\n});\nconst ClockPin = styled('div', {\n name: 'MuiClock',\n slot: 'Pin'\n})(({\n theme\n}) => ({\n width: 6,\n height: 6,\n borderRadius: '50%',\n backgroundColor: (theme.vars || theme).palette.primary.main,\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)'\n}));\nconst meridiemButtonCommonStyles = (theme, clockMeridiemMode) => ({\n zIndex: 1,\n bottom: 8,\n paddingLeft: 4,\n paddingRight: 4,\n width: CLOCK_HOUR_WIDTH,\n variants: [{\n props: {\n clockMeridiemMode\n },\n style: {\n backgroundColor: (theme.vars || theme).palette.primary.main,\n color: (theme.vars || theme).palette.primary.contrastText,\n '&:hover': {\n backgroundColor: (theme.vars || theme).palette.primary.light\n }\n }\n }]\n});\nconst ClockAmButton = styled(IconButton, {\n name: 'MuiClock',\n slot: 'AmButton'\n})(({\n theme\n}) => _extends({}, meridiemButtonCommonStyles(theme, 'am'), {\n // keeping it here to make TS happy\n position: 'absolute',\n left: 8\n}));\nconst ClockPmButton = styled(IconButton, {\n name: 'MuiClock',\n slot: 'PmButton'\n})(({\n theme\n}) => _extends({}, meridiemButtonCommonStyles(theme, 'pm'), {\n // keeping it here to make TS happy\n position: 'absolute',\n right: 8\n}));\nconst ClockMeridiemText = styled(Typography, {\n name: 'MuiClock',\n slot: 'MeridiemText'\n})({\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis'\n});\n\n/**\n * @ignore - internal component.\n */\nexport function Clock(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiClock'\n });\n const {\n ampm,\n ampmInClock,\n autoFocus,\n children,\n value,\n handleMeridiemChange,\n isTimeDisabled,\n meridiemMode,\n minutesStep = 1,\n onChange,\n selectedId,\n type,\n viewValue,\n viewRange: [minViewValue, maxViewValue],\n disabled = false,\n readOnly,\n className,\n classes: classesProp\n } = props;\n const adapter = usePickerAdapter();\n const translations = usePickerTranslations();\n const {\n ownerState: pickerOwnerState\n } = usePickerPrivateContext();\n const ownerState = _extends({}, pickerOwnerState, {\n isClockDisabled: disabled,\n clockMeridiemMode: meridiemMode\n });\n const isMoving = React.useRef(false);\n const classes = useUtilityClasses(classesProp, ownerState);\n const isSelectedTimeDisabled = isTimeDisabled(viewValue, type);\n const isPointerInner = !ampm && type === 'hours' && (viewValue < 1 || viewValue > 12);\n const handleValueChange = (newValue, isFinish) => {\n if (disabled || readOnly) {\n return;\n }\n if (isTimeDisabled(newValue, type)) {\n return;\n }\n onChange(newValue, isFinish);\n };\n const setTime = (event, isFinish) => {\n let {\n offsetX,\n offsetY\n } = event;\n if (offsetX === undefined) {\n const rect = event.target.getBoundingClientRect();\n offsetX = event.changedTouches[0].clientX - rect.left;\n offsetY = event.changedTouches[0].clientY - rect.top;\n }\n const newSelectedValue = type === 'seconds' || type === 'minutes' ? getMinutes(offsetX, offsetY, minutesStep) : getHours(offsetX, offsetY, Boolean(ampm));\n handleValueChange(newSelectedValue, isFinish);\n };\n const handleTouchSelection = event => {\n isMoving.current = true;\n setTime(event, 'shallow');\n };\n const handleTouchEnd = event => {\n if (isMoving.current) {\n setTime(event, 'finish');\n isMoving.current = false;\n }\n event.preventDefault();\n };\n const handleMouseMove = event => {\n // event.buttons & PRIMARY_MOUSE_BUTTON\n if (event.buttons > 0) {\n setTime(event.nativeEvent, 'shallow');\n }\n };\n const handleMouseUp = event => {\n if (isMoving.current) {\n isMoving.current = false;\n }\n setTime(event.nativeEvent, 'finish');\n };\n const isPointerBetweenTwoClockValues = type === 'hours' ? false : viewValue % 5 !== 0;\n const keyboardControlStep = type === 'minutes' ? minutesStep : 1;\n const listboxRef = React.useRef(null);\n // Since this is rendered when a Popper is opened we can't use passive effects.\n // Focusing in passive effects in Popper causes scroll jump.\n useEnhancedEffect(() => {\n if (autoFocus) {\n // The ref not being resolved would be a bug in MUI.\n listboxRef.current.focus();\n }\n }, [autoFocus]);\n const clampValue = newValue => Math.max(minViewValue, Math.min(maxViewValue, newValue));\n const circleValue = newValue => (newValue + (maxViewValue + 1)) % (maxViewValue + 1);\n const handleKeyDown = event => {\n // TODO: Why this early exit?\n if (isMoving.current) {\n return;\n }\n switch (event.key) {\n case 'Home':\n // reset both hours and minutes\n handleValueChange(minViewValue, 'partial');\n event.preventDefault();\n break;\n case 'End':\n handleValueChange(maxViewValue, 'partial');\n event.preventDefault();\n break;\n case 'ArrowUp':\n handleValueChange(circleValue(viewValue + keyboardControlStep), 'partial');\n event.preventDefault();\n break;\n case 'ArrowDown':\n handleValueChange(circleValue(viewValue - keyboardControlStep), 'partial');\n event.preventDefault();\n break;\n case 'PageUp':\n handleValueChange(clampValue(viewValue + 5), 'partial');\n event.preventDefault();\n break;\n case 'PageDown':\n handleValueChange(clampValue(viewValue - 5), 'partial');\n event.preventDefault();\n break;\n case 'Enter':\n case ' ':\n handleValueChange(viewValue, 'finish');\n event.preventDefault();\n break;\n default:\n // do nothing\n }\n };\n return /*#__PURE__*/_jsxs(ClockRoot, {\n className: clsx(classes.root, className),\n children: [/*#__PURE__*/_jsxs(ClockClock, {\n className: classes.clock,\n children: [/*#__PURE__*/_jsx(ClockSquareMask, {\n onTouchMove: handleTouchSelection,\n onTouchStart: handleTouchSelection,\n onTouchEnd: handleTouchEnd,\n onMouseUp: handleMouseUp,\n onMouseMove: handleMouseMove,\n ownerState: ownerState,\n className: classes.squareMask\n }), !isSelectedTimeDisabled && /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(ClockPin, {\n className: classes.pin\n }), value != null && /*#__PURE__*/_jsx(ClockPointer, {\n type: type,\n viewValue: viewValue,\n isInner: isPointerInner,\n isBetweenTwoClockValues: isPointerBetweenTwoClockValues\n })]\n }), /*#__PURE__*/_jsx(ClockWrapper, {\n \"aria-activedescendant\": selectedId,\n \"aria-label\": translations.clockLabelText(type, value == null ? null : adapter.format(value, ampm ? 'fullTime12h' : 'fullTime24h')),\n ref: listboxRef,\n role: \"listbox\",\n onKeyDown: handleKeyDown,\n tabIndex: 0,\n className: classes.wrapper,\n children: children\n })]\n }), ampm && ampmInClock && /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(ClockAmButton, {\n onClick: readOnly ? undefined : () => handleMeridiemChange('am'),\n disabled: disabled || meridiemMode === null,\n ownerState: ownerState,\n className: classes.amButton,\n title: formatMeridiem(adapter, 'am'),\n children: /*#__PURE__*/_jsx(ClockMeridiemText, {\n variant: \"caption\",\n className: classes.meridiemText,\n children: formatMeridiem(adapter, 'am')\n })\n }), /*#__PURE__*/_jsx(ClockPmButton, {\n disabled: disabled || meridiemMode === null,\n onClick: readOnly ? undefined : () => handleMeridiemChange('pm'),\n ownerState: ownerState,\n className: classes.pmButton,\n title: formatMeridiem(adapter, 'pm'),\n children: /*#__PURE__*/_jsx(ClockMeridiemText, {\n variant: \"caption\",\n className: classes.meridiemText,\n children: formatMeridiem(adapter, 'pm')\n })\n })]\n })]\n });\n}","import generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nexport function getClockNumberUtilityClass(slot) {\n return generateUtilityClass('MuiClockNumber', slot);\n}\nexport const clockNumberClasses = generateUtilityClasses('MuiClockNumber', ['root', 'selected', 'disabled']);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"classes\", \"disabled\", \"index\", \"inner\", \"label\", \"selected\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { CLOCK_WIDTH, CLOCK_HOUR_WIDTH } from \"./shared.js\";\nimport { getClockNumberUtilityClass, clockNumberClasses } from \"./clockNumberClasses.js\";\nimport { usePickerPrivateContext } from \"../internals/hooks/usePickerPrivateContext.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = (classes, ownerState) => {\n const slots = {\n root: ['root', ownerState.isClockNumberSelected && 'selected', ownerState.isClockNumberDisabled && 'disabled']\n };\n return composeClasses(slots, getClockNumberUtilityClass, classes);\n};\nconst ClockNumberRoot = styled('span', {\n name: 'MuiClockNumber',\n slot: 'Root',\n overridesResolver: (_, styles) => [styles.root, {\n [`&.${clockNumberClasses.disabled}`]: styles.disabled\n }, {\n [`&.${clockNumberClasses.selected}`]: styles.selected\n }]\n})(({\n theme\n}) => ({\n height: CLOCK_HOUR_WIDTH,\n width: CLOCK_HOUR_WIDTH,\n position: 'absolute',\n left: `calc((100% - ${CLOCK_HOUR_WIDTH}px) / 2)`,\n display: 'inline-flex',\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: '50%',\n color: (theme.vars || theme).palette.text.primary,\n fontFamily: theme.typography.fontFamily,\n '&:focused': {\n backgroundColor: (theme.vars || theme).palette.background.paper\n },\n [`&.${clockNumberClasses.selected}`]: {\n color: (theme.vars || theme).palette.primary.contrastText\n },\n [`&.${clockNumberClasses.disabled}`]: {\n pointerEvents: 'none',\n color: (theme.vars || theme).palette.text.disabled\n },\n variants: [{\n props: {\n isClockNumberInInnerRing: true\n },\n style: _extends({}, theme.typography.body2, {\n color: (theme.vars || theme).palette.text.secondary\n })\n }]\n}));\n\n/**\n * @ignore - internal component.\n */\nexport function ClockNumber(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiClockNumber'\n });\n const {\n className,\n classes: classesProp,\n disabled,\n index,\n inner,\n label,\n selected\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n ownerState: pickerOwnerState\n } = usePickerPrivateContext();\n const ownerState = _extends({}, pickerOwnerState, {\n isClockNumberInInnerRing: inner,\n isClockNumberSelected: selected,\n isClockNumberDisabled: disabled\n });\n const classes = useUtilityClasses(classesProp, ownerState);\n const angle = index % 12 / 12 * Math.PI * 2 - Math.PI / 2;\n const length = (CLOCK_WIDTH - CLOCK_HOUR_WIDTH - 2) / 2 * (inner ? 0.65 : 1);\n const x = Math.round(Math.cos(angle) * length);\n const y = Math.round(Math.sin(angle) * length);\n return /*#__PURE__*/_jsx(ClockNumberRoot, _extends({\n className: clsx(classes.root, className),\n \"aria-disabled\": disabled ? true : undefined,\n \"aria-selected\": selected ? true : undefined,\n role: \"option\",\n style: {\n transform: `translate(${x}px, ${y + (CLOCK_WIDTH - CLOCK_HOUR_WIDTH) / 2}px`\n },\n ownerState: ownerState\n }, other, {\n children: label\n }));\n}","import * as React from 'react';\nimport { ClockNumber } from \"./ClockNumber.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * @ignore - internal component.\n */\nexport const getHourNumbers = ({\n ampm,\n value,\n getClockNumberText,\n isDisabled,\n selectedId,\n adapter\n}) => {\n const currentHours = value ? adapter.getHours(value) : null;\n const hourNumbers = [];\n const startHour = ampm ? 1 : 0;\n const endHour = ampm ? 12 : 23;\n const isSelected = hour => {\n if (currentHours === null) {\n return false;\n }\n if (ampm) {\n if (hour === 12) {\n return currentHours === 12 || currentHours === 0;\n }\n return currentHours === hour || currentHours - 12 === hour;\n }\n return currentHours === hour;\n };\n for (let hour = startHour; hour <= endHour; hour += 1) {\n let label = hour.toString();\n if (hour === 0) {\n label = '00';\n }\n const inner = !ampm && (hour === 0 || hour > 12);\n label = adapter.formatNumber(label);\n const selected = isSelected(hour);\n hourNumbers.push(/*#__PURE__*/_jsx(ClockNumber, {\n id: selected ? selectedId : undefined,\n index: hour,\n inner: inner,\n selected: selected,\n disabled: isDisabled(hour),\n label: label,\n \"aria-label\": getClockNumberText(label)\n }, hour));\n }\n return hourNumbers;\n};\nexport const getMinutesNumbers = ({\n adapter,\n value,\n isDisabled,\n getClockNumberText,\n selectedId\n}) => {\n const f = adapter.formatNumber;\n return [[5, f('05')], [10, f('10')], [15, f('15')], [20, f('20')], [25, f('25')], [30, f('30')], [35, f('35')], [40, f('40')], [45, f('45')], [50, f('50')], [55, f('55')], [0, f('00')]].map(([numberValue, label], index) => {\n const selected = numberValue === value;\n return /*#__PURE__*/_jsx(ClockNumber, {\n label: label,\n id: selected ? selectedId : undefined,\n index: index + 1,\n inner: false,\n disabled: isDisabled(numberValue),\n selected: selected,\n \"aria-label\": getClockNumberText(label)\n }, numberValue);\n });\n};","import { createIsAfterIgnoreDatePart } from \"./time-utils.js\";\nimport { mergeDateAndTime, getTodayDate } from \"./date-utils.js\";\nexport const SECTION_TYPE_GRANULARITY = {\n year: 1,\n month: 2,\n day: 3,\n hours: 4,\n minutes: 5,\n seconds: 6,\n milliseconds: 7\n};\nexport const getSectionTypeGranularity = sections => Math.max(...sections.map(section => SECTION_TYPE_GRANULARITY[section.type] ?? 1));\nconst roundDate = (adapter, granularity, date) => {\n if (granularity === SECTION_TYPE_GRANULARITY.year) {\n return adapter.startOfYear(date);\n }\n if (granularity === SECTION_TYPE_GRANULARITY.month) {\n return adapter.startOfMonth(date);\n }\n if (granularity === SECTION_TYPE_GRANULARITY.day) {\n return adapter.startOfDay(date);\n }\n\n // We don't have startOfHour / startOfMinute / startOfSecond\n let roundedDate = date;\n if (granularity < SECTION_TYPE_GRANULARITY.minutes) {\n roundedDate = adapter.setMinutes(roundedDate, 0);\n }\n if (granularity < SECTION_TYPE_GRANULARITY.seconds) {\n roundedDate = adapter.setSeconds(roundedDate, 0);\n }\n if (granularity < SECTION_TYPE_GRANULARITY.milliseconds) {\n roundedDate = adapter.setMilliseconds(roundedDate, 0);\n }\n return roundedDate;\n};\nexport const getDefaultReferenceDate = ({\n props,\n adapter,\n granularity,\n timezone,\n getTodayDate: inGetTodayDate\n}) => {\n let referenceDate = inGetTodayDate ? inGetTodayDate() : roundDate(adapter, granularity, getTodayDate(adapter, timezone));\n if (props.minDate != null && adapter.isAfterDay(props.minDate, referenceDate)) {\n referenceDate = roundDate(adapter, granularity, props.minDate);\n }\n if (props.maxDate != null && adapter.isBeforeDay(props.maxDate, referenceDate)) {\n referenceDate = roundDate(adapter, granularity, props.maxDate);\n }\n const isAfter = createIsAfterIgnoreDatePart(props.disableIgnoringDatePartForTimeValidation ?? false, adapter);\n if (props.minTime != null && isAfter(props.minTime, referenceDate)) {\n referenceDate = roundDate(adapter, granularity, props.disableIgnoringDatePartForTimeValidation ? props.minTime : mergeDateAndTime(adapter, referenceDate, props.minTime));\n }\n if (props.maxTime != null && isAfter(referenceDate, props.maxTime)) {\n referenceDate = roundDate(adapter, granularity, props.disableIgnoringDatePartForTimeValidation ? props.maxTime : mergeDateAndTime(adapter, referenceDate, props.maxTime));\n }\n return referenceDate;\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"value\", \"referenceDate\"];\nimport { areDatesEqual, getTodayDate, replaceInvalidDateByNull } from \"./date-utils.js\";\nimport { getDefaultReferenceDate } from \"./getDefaultReferenceDate.js\";\nimport { createDateStrForV7HiddenInputFromSections, createDateStrForV6InputFromSections } from \"../hooks/useField/useField.utils.js\";\nexport const singleItemValueManager = {\n emptyValue: null,\n getTodayValue: getTodayDate,\n getInitialReferenceValue: _ref => {\n let {\n value,\n referenceDate\n } = _ref,\n params = _objectWithoutPropertiesLoose(_ref, _excluded);\n if (params.adapter.isValid(value)) {\n return value;\n }\n if (referenceDate != null) {\n return referenceDate;\n }\n return getDefaultReferenceDate(params);\n },\n cleanValue: replaceInvalidDateByNull,\n areValuesEqual: areDatesEqual,\n isSameError: (a, b) => a === b,\n hasError: error => error != null,\n defaultErrorState: null,\n getTimezone: (adapter, value) => adapter.isValid(value) ? adapter.getTimezone(value) : null,\n setTimezone: (adapter, timezone, value) => value == null ? null : adapter.setTimezone(value, timezone)\n};\nexport const singleItemFieldValueManager = {\n updateReferenceValue: (adapter, value, prevReferenceValue) => adapter.isValid(value) ? value : prevReferenceValue,\n getSectionsFromValue: (date, getSectionsFromDate) => getSectionsFromDate(date),\n getV7HiddenInputValueFromSections: createDateStrForV7HiddenInputFromSections,\n getV6InputValueFromSections: createDateStrForV6InputFromSections,\n parseValueStr: (valueStr, referenceValue, parseDate) => parseDate(valueStr.trim(), referenceValue),\n getDateFromSection: value => value,\n getDateSectionsFromValue: sections => sections,\n updateDateInValue: (value, activeSection, activeDate) => activeDate,\n clearDateSections: sections => sections.map(section => _extends({}, section, {\n value: ''\n }))\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"ampm\", \"ampmInClock\", \"autoFocus\", \"slots\", \"slotProps\", \"value\", \"defaultValue\", \"referenceDate\", \"disableIgnoringDatePartForTimeValidation\", \"maxTime\", \"minTime\", \"disableFuture\", \"disablePast\", \"minutesStep\", \"shouldDisableTime\", \"showViewSwitcher\", \"onChange\", \"view\", \"views\", \"openTo\", \"onViewChange\", \"focusedView\", \"onFocusedViewChange\", \"className\", \"classes\", \"disabled\", \"readOnly\", \"timezone\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useId from '@mui/utils/useId';\nimport { usePickerAdapter, usePickerTranslations } from \"../hooks/index.js\";\nimport { useNow } from \"../internals/hooks/useUtils.js\";\nimport { PickersArrowSwitcher } from \"../internals/components/PickersArrowSwitcher/index.js\";\nimport { convertValueToMeridiem, createIsAfterIgnoreDatePart } from \"../internals/utils/time-utils.js\";\nimport { useViews } from \"../internals/hooks/useViews.js\";\nimport { useMeridiemMode } from \"../internals/hooks/date-helpers-hooks.js\";\nimport { PickerViewRoot } from \"../internals/components/PickerViewRoot/index.js\";\nimport { getTimeClockUtilityClass } from \"./timeClockClasses.js\";\nimport { Clock } from \"./Clock.js\";\nimport { getHourNumbers, getMinutesNumbers } from \"./ClockNumbers.js\";\nimport { useControlledValue } from \"../internals/hooks/useControlledValue.js\";\nimport { singleItemValueManager } from \"../internals/utils/valueManagers.js\";\nimport { useClockReferenceDate } from \"../internals/hooks/useClockReferenceDate.js\";\nimport { usePickerPrivateContext } from \"../internals/hooks/usePickerPrivateContext.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = classes => {\n const slots = {\n root: ['root'],\n arrowSwitcher: ['arrowSwitcher']\n };\n return composeClasses(slots, getTimeClockUtilityClass, classes);\n};\nconst TimeClockRoot = styled(PickerViewRoot, {\n name: 'MuiTimeClock',\n slot: 'Root'\n})({\n display: 'flex',\n flexDirection: 'column',\n position: 'relative'\n});\nconst TimeClockArrowSwitcher = styled(PickersArrowSwitcher, {\n name: 'MuiTimeClock',\n slot: 'ArrowSwitcher'\n})({\n position: 'absolute',\n right: 12,\n top: 15\n});\nconst TIME_CLOCK_DEFAULT_VIEWS = ['hours', 'minutes'];\n\n/**\n * Demos:\n *\n * - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)\n * - [TimeClock](https://mui.com/x/react-date-pickers/time-clock/)\n *\n * API:\n *\n * - [TimeClock API](https://mui.com/x/api/date-pickers/time-clock/)\n */\nexport const TimeClock = /*#__PURE__*/React.forwardRef(function TimeClock(inProps, ref) {\n const adapter = usePickerAdapter();\n const props = useThemeProps({\n props: inProps,\n name: 'MuiTimeClock'\n });\n const {\n ampm = adapter.is12HourCycleInCurrentLocale(),\n ampmInClock = false,\n autoFocus,\n slots,\n slotProps,\n value: valueProp,\n defaultValue,\n referenceDate: referenceDateProp,\n disableIgnoringDatePartForTimeValidation = false,\n maxTime,\n minTime,\n disableFuture,\n disablePast,\n minutesStep = 1,\n shouldDisableTime,\n showViewSwitcher,\n onChange,\n view: inView,\n views = TIME_CLOCK_DEFAULT_VIEWS,\n openTo,\n onViewChange,\n focusedView,\n onFocusedViewChange,\n className,\n classes: classesProp,\n disabled,\n readOnly,\n timezone: timezoneProp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n value,\n handleValueChange,\n timezone\n } = useControlledValue({\n name: 'TimeClock',\n timezone: timezoneProp,\n value: valueProp,\n defaultValue,\n referenceDate: referenceDateProp,\n onChange,\n valueManager: singleItemValueManager\n });\n const valueOrReferenceDate = useClockReferenceDate({\n value,\n referenceDate: referenceDateProp,\n adapter,\n props,\n timezone\n });\n const translations = usePickerTranslations();\n const now = useNow(timezone);\n const selectedId = useId();\n const {\n ownerState\n } = usePickerPrivateContext();\n const {\n view,\n setView,\n previousView,\n nextView,\n setValueAndGoToNextView\n } = useViews({\n view: inView,\n views,\n openTo,\n onViewChange,\n onChange: handleValueChange,\n focusedView,\n onFocusedViewChange\n });\n const {\n meridiemMode,\n handleMeridiemChange\n } = useMeridiemMode(valueOrReferenceDate, ampm, setValueAndGoToNextView);\n const isTimeDisabled = React.useCallback((rawValue, viewType) => {\n const isAfter = createIsAfterIgnoreDatePart(disableIgnoringDatePartForTimeValidation, adapter);\n const shouldCheckPastEnd = viewType === 'hours' || viewType === 'minutes' && views.includes('seconds');\n const containsValidTime = ({\n start,\n end\n }) => {\n if (minTime && isAfter(minTime, end)) {\n return false;\n }\n if (maxTime && isAfter(start, maxTime)) {\n return false;\n }\n if (disableFuture && isAfter(start, now)) {\n return false;\n }\n if (disablePast && isAfter(now, shouldCheckPastEnd ? end : start)) {\n return false;\n }\n return true;\n };\n const isValidValue = (timeValue, step = 1) => {\n if (timeValue % step !== 0) {\n return false;\n }\n if (shouldDisableTime) {\n switch (viewType) {\n case 'hours':\n return !shouldDisableTime(adapter.setHours(valueOrReferenceDate, timeValue), 'hours');\n case 'minutes':\n return !shouldDisableTime(adapter.setMinutes(valueOrReferenceDate, timeValue), 'minutes');\n case 'seconds':\n return !shouldDisableTime(adapter.setSeconds(valueOrReferenceDate, timeValue), 'seconds');\n default:\n return false;\n }\n }\n return true;\n };\n switch (viewType) {\n case 'hours':\n {\n const valueWithMeridiem = convertValueToMeridiem(rawValue, meridiemMode, ampm);\n const dateWithNewHours = adapter.setHours(valueOrReferenceDate, valueWithMeridiem);\n if (adapter.getHours(dateWithNewHours) !== valueWithMeridiem) {\n return true;\n }\n const start = adapter.setSeconds(adapter.setMinutes(dateWithNewHours, 0), 0);\n const end = adapter.setSeconds(adapter.setMinutes(dateWithNewHours, 59), 59);\n return !containsValidTime({\n start,\n end\n }) || !isValidValue(valueWithMeridiem);\n }\n case 'minutes':\n {\n const dateWithNewMinutes = adapter.setMinutes(valueOrReferenceDate, rawValue);\n const start = adapter.setSeconds(dateWithNewMinutes, 0);\n const end = adapter.setSeconds(dateWithNewMinutes, 59);\n return !containsValidTime({\n start,\n end\n }) || !isValidValue(rawValue, minutesStep);\n }\n case 'seconds':\n {\n const dateWithNewSeconds = adapter.setSeconds(valueOrReferenceDate, rawValue);\n const start = dateWithNewSeconds;\n const end = dateWithNewSeconds;\n return !containsValidTime({\n start,\n end\n }) || !isValidValue(rawValue);\n }\n default:\n throw new Error('not supported');\n }\n }, [ampm, valueOrReferenceDate, disableIgnoringDatePartForTimeValidation, maxTime, meridiemMode, minTime, minutesStep, shouldDisableTime, adapter, disableFuture, disablePast, now, views]);\n const viewProps = React.useMemo(() => {\n switch (view) {\n case 'hours':\n {\n const handleHoursChange = (hourValue, isFinish) => {\n const valueWithMeridiem = convertValueToMeridiem(hourValue, meridiemMode, ampm);\n setValueAndGoToNextView(adapter.setHours(valueOrReferenceDate, valueWithMeridiem), isFinish, 'hours');\n };\n const viewValue = adapter.getHours(valueOrReferenceDate);\n let viewRange;\n if (ampm) {\n if (viewValue > 12) {\n viewRange = [12, 23];\n } else {\n viewRange = [0, 11];\n }\n } else {\n viewRange = [0, 23];\n }\n return {\n onChange: handleHoursChange,\n viewValue,\n children: getHourNumbers({\n value,\n adapter,\n ampm,\n onChange: handleHoursChange,\n getClockNumberText: translations.hoursClockNumberText,\n isDisabled: hourValue => disabled || isTimeDisabled(hourValue, 'hours'),\n selectedId\n }),\n viewRange\n };\n }\n case 'minutes':\n {\n const minutesValue = adapter.getMinutes(valueOrReferenceDate);\n const handleMinutesChange = (minuteValue, isFinish) => {\n setValueAndGoToNextView(adapter.setMinutes(valueOrReferenceDate, minuteValue), isFinish, 'minutes');\n };\n return {\n viewValue: minutesValue,\n onChange: handleMinutesChange,\n children: getMinutesNumbers({\n adapter,\n value: minutesValue,\n onChange: handleMinutesChange,\n getClockNumberText: translations.minutesClockNumberText,\n isDisabled: minuteValue => disabled || isTimeDisabled(minuteValue, 'minutes'),\n selectedId\n }),\n viewRange: [0, 59]\n };\n }\n case 'seconds':\n {\n const secondsValue = adapter.getSeconds(valueOrReferenceDate);\n const handleSecondsChange = (secondValue, isFinish) => {\n setValueAndGoToNextView(adapter.setSeconds(valueOrReferenceDate, secondValue), isFinish, 'seconds');\n };\n return {\n viewValue: secondsValue,\n onChange: handleSecondsChange,\n children: getMinutesNumbers({\n adapter,\n value: secondsValue,\n onChange: handleSecondsChange,\n getClockNumberText: translations.secondsClockNumberText,\n isDisabled: secondValue => disabled || isTimeDisabled(secondValue, 'seconds'),\n selectedId\n }),\n viewRange: [0, 59]\n };\n }\n default:\n throw new Error('You must provide the type for ClockView');\n }\n }, [view, adapter, value, ampm, translations.hoursClockNumberText, translations.minutesClockNumberText, translations.secondsClockNumberText, meridiemMode, setValueAndGoToNextView, valueOrReferenceDate, isTimeDisabled, selectedId, disabled]);\n const classes = useUtilityClasses(classesProp);\n return /*#__PURE__*/_jsxs(TimeClockRoot, _extends({\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n children: [/*#__PURE__*/_jsx(Clock, _extends({\n autoFocus: autoFocus ?? !!focusedView,\n ampmInClock: ampmInClock && views.includes('hours'),\n value: value,\n type: view,\n ampm: ampm,\n minutesStep: minutesStep,\n isTimeDisabled: isTimeDisabled,\n meridiemMode: meridiemMode,\n handleMeridiemChange: handleMeridiemChange,\n selectedId: selectedId,\n disabled: disabled,\n readOnly: readOnly\n }, viewProps)), showViewSwitcher && /*#__PURE__*/_jsx(TimeClockArrowSwitcher, {\n className: classes.arrowSwitcher,\n slots: slots,\n slotProps: slotProps,\n onGoToPrevious: () => setView(previousView),\n isPreviousDisabled: !previousView,\n previousLabel: translations.openPreviousView,\n onGoToNext: () => setView(nextView),\n isNextDisabled: !nextView,\n nextLabel: translations.openNextView,\n ownerState: ownerState\n })]\n }));\n});\nif (process.env.NODE_ENV !== \"production\") TimeClock.displayName = \"TimeClock\";\nprocess.env.NODE_ENV !== \"production\" ? TimeClock.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * 12h/24h view for hour selection clock.\n * @default adapter.is12HourCycleInCurrentLocale()\n */\n ampm: PropTypes.bool,\n /**\n * Display ampm controls under the clock (instead of in the toolbar).\n * @default false\n */\n ampmInClock: PropTypes.bool,\n /**\n * If `true`, the main element is focused during the first mount.\n * This main element is:\n * - the element chosen by the visible view if any (i.e: the selected day on the `day` view).\n * - the `input` element if there is a field rendered.\n */\n autoFocus: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n className: PropTypes.string,\n /**\n * The default selected value.\n * Used when the component is not controlled.\n */\n defaultValue: PropTypes.object,\n /**\n * If `true`, the component is disabled.\n * When disabled, the value cannot be changed and no interaction is possible.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, disable values after the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disableFuture: PropTypes.bool,\n /**\n * Do not ignore date part when validating min/max time.\n * @default false\n */\n disableIgnoringDatePartForTimeValidation: PropTypes.bool,\n /**\n * If `true`, disable values before the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disablePast: PropTypes.bool,\n /**\n * Controlled focused view.\n */\n focusedView: PropTypes.oneOf(['hours', 'minutes', 'seconds']),\n /**\n * Maximal selectable time.\n * The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.\n */\n maxTime: PropTypes.object,\n /**\n * Minimal selectable time.\n * The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.\n */\n minTime: PropTypes.object,\n /**\n * Step over minutes.\n * @default 1\n */\n minutesStep: PropTypes.number,\n /**\n * Callback fired when the value changes.\n * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.\n * @template TView The view type. Will be one of date or time views.\n * @param {TValue} value The new value.\n * @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete.\n * @param {TView | undefined} selectedView Indicates the view in which the selection has been made.\n */\n onChange: PropTypes.func,\n /**\n * Callback fired on focused view change.\n * @template TView Type of the view. It will vary based on the Picker type and the `views` it uses.\n * @param {TView} view The new view to focus or not.\n * @param {boolean} hasFocus `true` if the view should be focused.\n */\n onFocusedViewChange: PropTypes.func,\n /**\n * Callback fired on view change.\n * @template TView Type of the view. It will vary based on the Picker type and the `views` it uses.\n * @param {TView} view The new view.\n */\n onViewChange: PropTypes.func,\n /**\n * The default visible view.\n * Used when the component view is not controlled.\n * Must be a valid option from `views` list.\n */\n openTo: PropTypes.oneOf(['hours', 'minutes', 'seconds']),\n /**\n * If `true`, the component is read-only.\n * When read-only, the value cannot be changed but the user can interact with the interface.\n * @default false\n */\n readOnly: PropTypes.bool,\n /**\n * The date used to generate the new value when both `value` and `defaultValue` are empty.\n * @default The closest valid time using the validation props, except callbacks such as `shouldDisableTime`.\n */\n referenceDate: PropTypes.object,\n /**\n * Disable specific time.\n * @param {PickerValidDate} value The value to check.\n * @param {TimeView} view The clock type of the timeValue.\n * @returns {boolean} If `true` the time will be disabled.\n */\n shouldDisableTime: PropTypes.func,\n showViewSwitcher: PropTypes.bool,\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n * @default {}\n */\n slots: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Choose which timezone to use for the value.\n * Example: \"default\", \"system\", \"UTC\", \"America/New_York\".\n * If you pass values from other timezones to some props, they will be converted to this timezone before being used.\n * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.\n * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.\n */\n timezone: PropTypes.string,\n /**\n * The selected value.\n * Used when the component is controlled.\n */\n value: PropTypes.object,\n /**\n * The visible view.\n * Used when the component view is controlled.\n * Must be a valid option from `views` list.\n */\n view: PropTypes.oneOf(['hours', 'minutes', 'seconds']),\n /**\n * Available views.\n * @default ['hours', 'minutes']\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['hours', 'minutes', 'seconds']).isRequired)\n} : void 0;","import * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport useControlled from '@mui/utils/useControlled';\nimport { usePickerAdapter } from \"../../hooks/usePickerAdapter.js\";\n\n/**\n * Hooks controlling the value while making sure that:\n * - The value returned by `onChange` always have the timezone of `props.value` or `props.defaultValue` if defined\n * - The value rendered is always the one from `props.timezone` if defined\n */\nexport const useControlledValue = ({\n name,\n timezone: timezoneProp,\n value: valueProp,\n defaultValue,\n referenceDate,\n onChange: onChangeProp,\n valueManager\n}) => {\n const adapter = usePickerAdapter();\n const [valueWithInputTimezone, setValue] = useControlled({\n name,\n state: 'value',\n controlled: valueProp,\n default: defaultValue ?? valueManager.emptyValue\n });\n const inputTimezone = React.useMemo(() => valueManager.getTimezone(adapter, valueWithInputTimezone), [adapter, valueManager, valueWithInputTimezone]);\n const setInputTimezone = useEventCallback(newValue => {\n if (inputTimezone == null) {\n return newValue;\n }\n return valueManager.setTimezone(adapter, inputTimezone, newValue);\n });\n const timezoneToRender = React.useMemo(() => {\n if (timezoneProp) {\n return timezoneProp;\n }\n if (inputTimezone) {\n return inputTimezone;\n }\n if (referenceDate) {\n return adapter.getTimezone(Array.isArray(referenceDate) ? referenceDate[0] : referenceDate);\n }\n return 'default';\n }, [timezoneProp, inputTimezone, referenceDate, adapter]);\n const valueWithTimezoneToRender = React.useMemo(() => valueManager.setTimezone(adapter, timezoneToRender, valueWithInputTimezone), [valueManager, adapter, timezoneToRender, valueWithInputTimezone]);\n const handleValueChange = useEventCallback((newValue, ...otherParams) => {\n const newValueWithInputTimezone = setInputTimezone(newValue);\n setValue(newValueWithInputTimezone);\n onChangeProp?.(newValueWithInputTimezone, ...otherParams);\n });\n return {\n value: valueWithTimezoneToRender,\n handleValueChange,\n timezone: timezoneToRender\n };\n};","import * as React from 'react';\nimport { singleItemValueManager } from \"../utils/valueManagers.js\";\nimport { getTodayDate } from \"../utils/date-utils.js\";\nimport { SECTION_TYPE_GRANULARITY } from \"../utils/getDefaultReferenceDate.js\";\nexport const useClockReferenceDate = ({\n value,\n referenceDate: referenceDateProp,\n adapter,\n props,\n timezone\n}) => {\n const referenceDate = React.useMemo(() => singleItemValueManager.getInitialReferenceValue({\n value,\n adapter,\n props,\n referenceDate: referenceDateProp,\n granularity: SECTION_TYPE_GRANULARITY.day,\n timezone,\n getTodayDate: () => getTodayDate(adapter, timezone, 'date')\n }),\n // We want the `referenceDate` to update on prop and `timezone` change (https://github.com/mui/mui-x/issues/10804)\n [referenceDateProp, timezone] // eslint-disable-line react-hooks/exhaustive-deps\n );\n return value ?? referenceDate;\n};","import * as React from 'react';\nimport { useLocalizationContext, usePickerAdapter } from \"../../hooks/usePickerAdapter.js\";\nexport const useDefaultDates = () => useLocalizationContext().defaultDates;\nexport const useNow = timezone => {\n const adapter = usePickerAdapter();\n const now = React.useRef(undefined);\n if (now.current === undefined) {\n now.current = adapter.date(undefined, timezone);\n }\n return now.current;\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport useControlled from '@mui/utils/useControlled';\nimport { DEFAULT_STEP_NAVIGATION } from \"../utils/createStepNavigation.js\";\nlet warnedOnceNotValidView = false;\nexport function useViews({\n onChange,\n onViewChange,\n openTo,\n view: inView,\n views,\n autoFocus,\n focusedView: inFocusedView,\n onFocusedViewChange,\n getStepNavigation\n}) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnceNotValidView) {\n if (inView != null && !views.includes(inView)) {\n console.warn(`MUI X: \\`view=\"${inView}\"\\` is not a valid prop.`, `It must be an element of \\`views=[\"${views.join('\", \"')}\"]\\`.`);\n warnedOnceNotValidView = true;\n }\n if (inView == null && openTo != null && !views.includes(openTo)) {\n console.warn(`MUI X: \\`openTo=\"${openTo}\"\\` is not a valid prop.`, `It must be an element of \\`views=[\"${views.join('\", \"')}\"]\\`.`);\n warnedOnceNotValidView = true;\n }\n }\n }\n const previousOpenTo = React.useRef(openTo);\n const previousViews = React.useRef(views);\n const defaultView = React.useRef(views.includes(openTo) ? openTo : views[0]);\n const [view, setView] = useControlled({\n name: 'useViews',\n state: 'view',\n controlled: inView,\n default: defaultView.current\n });\n const defaultFocusedView = React.useRef(autoFocus ? view : null);\n const [focusedView, setFocusedView] = useControlled({\n name: 'useViews',\n state: 'focusedView',\n controlled: inFocusedView,\n default: defaultFocusedView.current\n });\n const stepNavigation = getStepNavigation ? getStepNavigation({\n setView,\n view,\n defaultView: defaultView.current,\n views\n }) : DEFAULT_STEP_NAVIGATION;\n React.useEffect(() => {\n // Update the current view when `openTo` or `views` props change\n if (previousOpenTo.current && previousOpenTo.current !== openTo || previousViews.current && previousViews.current.some(previousView => !views.includes(previousView))) {\n setView(views.includes(openTo) ? openTo : views[0]);\n previousViews.current = views;\n previousOpenTo.current = openTo;\n }\n }, [openTo, setView, view, views]);\n const viewIndex = views.indexOf(view);\n const previousView = views[viewIndex - 1] ?? null;\n const nextView = views[viewIndex + 1] ?? null;\n const handleFocusedViewChange = useEventCallback((viewToFocus, hasFocus) => {\n if (hasFocus) {\n // Focus event\n setFocusedView(viewToFocus);\n } else {\n // Blur event\n setFocusedView(prevFocusedView => viewToFocus === prevFocusedView ? null : prevFocusedView // If false the blur is due to view switching\n );\n }\n onFocusedViewChange?.(viewToFocus, hasFocus);\n });\n const handleChangeView = useEventCallback(newView => {\n // always keep the focused view in sync\n handleFocusedViewChange(newView, true);\n if (newView === view) {\n return;\n }\n setView(newView);\n if (onViewChange) {\n onViewChange(newView);\n }\n });\n const goToNextView = useEventCallback(() => {\n if (nextView) {\n handleChangeView(nextView);\n }\n });\n const setValueAndGoToNextView = useEventCallback((value, currentViewSelectionState, selectedView) => {\n const isSelectionFinishedOnCurrentView = currentViewSelectionState === 'finish';\n const hasMoreViews = selectedView ?\n // handles case like `DateTimePicker`, where a view might return a `finish` selection state\n // but when it's not the final view given all `views` -> overall selection state should be `partial`.\n views.indexOf(selectedView) < views.length - 1 : Boolean(nextView);\n const globalSelectionState = isSelectionFinishedOnCurrentView && hasMoreViews ? 'partial' : currentViewSelectionState;\n onChange(value, globalSelectionState, selectedView);\n\n // The selected view can be different from the active view,\n // This can happen if multiple views are displayed, like in `DesktopDateTimePicker` or `MultiSectionDigitalClock`.\n let currentView = null;\n if (selectedView != null && selectedView !== view) {\n currentView = selectedView;\n } else if (isSelectionFinishedOnCurrentView) {\n currentView = view;\n }\n if (currentView == null) {\n return;\n }\n const viewToNavigateTo = views[views.indexOf(currentView) + 1];\n if (viewToNavigateTo == null || !stepNavigation.areViewsInSameStep(currentView, viewToNavigateTo)) {\n return;\n }\n handleChangeView(viewToNavigateTo);\n });\n return _extends({}, stepNavigation, {\n view,\n setView: handleChangeView,\n focusedView,\n setFocusedView: handleFocusedViewChange,\n nextView,\n previousView,\n // Always return up-to-date default view instead of the initial one (i.e. defaultView.current)\n defaultView: views.includes(openTo) ? openTo : views[0],\n goToNextView,\n setValueAndGoToNextView\n });\n}","import * as React from 'react';\nimport { getMeridiem, convertToMeridiem } from \"../utils/time-utils.js\";\nimport { usePickerAdapter } from \"../../hooks/usePickerAdapter.js\";\nexport function useNextMonthDisabled(month, {\n disableFuture,\n maxDate,\n timezone\n}) {\n const adapter = usePickerAdapter();\n return React.useMemo(() => {\n const now = adapter.date(undefined, timezone);\n const lastEnabledMonth = adapter.startOfMonth(disableFuture && adapter.isBefore(now, maxDate) ? now : maxDate);\n return !adapter.isAfter(lastEnabledMonth, month);\n }, [disableFuture, maxDate, month, adapter, timezone]);\n}\nexport function usePreviousMonthDisabled(month, {\n disablePast,\n minDate,\n timezone\n}) {\n const adapter = usePickerAdapter();\n return React.useMemo(() => {\n const now = adapter.date(undefined, timezone);\n const firstEnabledMonth = adapter.startOfMonth(disablePast && adapter.isAfter(now, minDate) ? now : minDate);\n return !adapter.isBefore(firstEnabledMonth, month);\n }, [disablePast, minDate, month, adapter, timezone]);\n}\nexport function useMeridiemMode(date, ampm, onChange, selectionState) {\n const adapter = usePickerAdapter();\n const cleanDate = React.useMemo(() => !adapter.isValid(date) ? null : date, [adapter, date]);\n const meridiemMode = getMeridiem(cleanDate, adapter);\n const handleMeridiemChange = React.useCallback(mode => {\n const timeWithMeridiem = cleanDate == null ? null : convertToMeridiem(cleanDate, mode, Boolean(ampm), adapter);\n onChange(timeWithMeridiem, selectionState ?? 'partial');\n }, [ampm, cleanDate, onChange, selectionState, adapter]);\n return {\n meridiemMode,\n handleMeridiemChange\n };\n}","/**\n * TimeClock — Dash wrapper for MUI X TimeClock (@mui/x-date-pickers, Community)\n *\n * An inline time selector (no input / popper / modal). The user drags the clock\n * hand or clicks the numbers to pick hours, minutes, and optionally seconds.\n *\n * Dash boundary contract\n * ----------------------\n * dayjs objects cannot cross the Dash <-> Python boundary, so `value` and\n * `defaultValue` are exchanged as plain strings:\n * - Full wall-time ISO : \"2022-04-17T15:30:00\"\n * - Time-only : \"15:30\" or \"15:30:45\"\n * On every change the component pushes back `value` (full wall-time ISO string),\n * the current `view`, and a convenience `timeData` object — so a callback can use\n * the parsed parts without re-parsing the string.\n *\n * MUI components inside this wrapper follow the Mantine color scheme on ,\n * so the clock re-skins automatically in dark mode (same approach as TreeViewPro).\n */\nimport React, {useCallback, useEffect, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport dayjs from 'dayjs';\nimport {LocalizationProvider} from '@mui/x-date-pickers/LocalizationProvider';\nimport {AdapterDayjs} from '@mui/x-date-pickers/AdapterDayjs';\nimport {TimeClock as MuiTimeClock} from '@mui/x-date-pickers/TimeClock';\nimport {ThemeProvider, createTheme} from '@mui/material/styles';\n\n// --- Color scheme: watch ---------------\nconst readMantineScheme = () => {\n if (typeof document === 'undefined') return 'light';\n const v = document.documentElement.getAttribute('data-mantine-color-scheme');\n return v === 'dark' ? 'dark' : 'light';\n};\n\nconst useMantineColorScheme = () => {\n const [scheme, setScheme] = useState(readMantineScheme);\n useEffect(() => {\n if (typeof document === 'undefined') return undefined;\n const html = document.documentElement;\n const sync = () => setScheme(readMantineScheme());\n const obs = new MutationObserver(sync);\n obs.observe(html, {\n attributes: true,\n attributeFilter: ['data-mantine-color-scheme'],\n });\n sync();\n return () => obs.disconnect();\n }, []);\n return scheme;\n};\n\nconst lightTheme = createTheme({palette: {mode: 'light'}});\nconst darkTheme = createTheme({palette: {mode: 'dark'}});\n\n// --- String <-> dayjs at the Dash boundary ----------------------------------\nconst TIME_ONLY_RE = /^(\\d{1,2}):(\\d{2})(:(\\d{2}))?$/;\n\n/** Parse a Dash string value into a dayjs object (or null). */\nconst parseToDayjs = (val) => {\n if (val === null || val === undefined || val === '') return null;\n if (typeof val !== 'string') return null;\n const m = val.match(TIME_ONLY_RE);\n if (m) {\n // Time-only string: anchor it to today's date so the clock has a date part.\n const base = dayjs().startOf('day');\n const withTime = base\n .hour(parseInt(m[1], 10))\n .minute(parseInt(m[2], 10))\n .second(m[4] ? parseInt(m[4], 10) : 0);\n return withTime.isValid() ? withTime : null;\n }\n const d = dayjs(val);\n return d.isValid() ? d : null;\n};\n\n/**\n * TimeClock lets the user pick a time on an inline clock face (hours, minutes,\n * and optionally seconds) without any input, popper, or modal. Values are\n * exchanged with Dash as strings; on change it emits `value` (wall-time ISO),\n * the current `view`, and a parsed `timeData` convenience object.\n */\nconst TimeClock = (props) => {\n const {\n id,\n value,\n defaultValue,\n views,\n view,\n openTo,\n ampm,\n disabled,\n readOnly,\n autoFocus,\n minutesStep,\n minTime,\n maxTime,\n disableFuture,\n disablePast,\n disableIgnoringDatePartForTimeValidation,\n showViewSwitcher,\n className,\n sx,\n setProps,\n } = props;\n\n const scheme = useMantineColorScheme();\n const theme = scheme === 'dark' ? darkTheme : lightTheme;\n\n // --- Parse incoming string props to dayjs -------------------------------\n const dValue = useMemo(() => parseToDayjs(value), [value]);\n const dDefault = useMemo(() => parseToDayjs(defaultValue), [defaultValue]);\n const dMinTime = useMemo(() => parseToDayjs(minTime), [minTime]);\n const dMaxTime = useMemo(() => parseToDayjs(maxTime), [maxTime]);\n\n // --- Change handlers -> Dash outputs ------------------------------------\n const handleChange = useCallback(\n (newVal) => {\n if (!setProps) return;\n if (!newVal || typeof newVal.isValid !== 'function' || !newVal.isValid()) {\n setProps({\n value: null,\n timeData: {\n hours: null,\n minutes: null,\n seconds: null,\n formatted: null,\n event_timestamp: Date.now(),\n },\n });\n return;\n }\n setProps({\n value: newVal.format('YYYY-MM-DDTHH:mm:ss'),\n timeData: {\n hours: newVal.hour(),\n minutes: newVal.minute(),\n seconds: newVal.second(),\n formatted: newVal.format('HH:mm:ss'),\n event_timestamp: Date.now(),\n },\n });\n },\n [setProps]\n );\n\n const handleViewChange = useCallback(\n (newView) => {\n if (setProps) setProps({view: newView});\n },\n [setProps]\n );\n\n // --- Assemble the controlled/uncontrolled value -------------------------\n const clockProps = {};\n if (value !== undefined && value !== null) {\n clockProps.value = dValue; // controlled\n } else if (defaultValue !== undefined && defaultValue !== null) {\n clockProps.defaultValue = dDefault; // uncontrolled initial\n }\n if (view !== undefined && view !== null) clockProps.view = view;\n\n return (\n
\n \n \n \n \n \n
\n );\n};\n\nTimeClock.defaultProps = {\n views: ['hours', 'minutes'],\n disabled: false,\n readOnly: false,\n autoFocus: false,\n disableFuture: false,\n disablePast: false,\n disableIgnoringDatePartForTimeValidation: false,\n showViewSwitcher: false,\n};\n\nTimeClock.propTypes = {\n /** Dash component id */\n id: PropTypes.string,\n\n // --- Value (string <-> dayjs at the boundary) ---------------------------\n /**\n * Controlled value. Full wall-time ISO (\"2022-04-17T15:30:00\") or time-only\n * (\"15:30\" / \"15:30:45\"). Also an OUTPUT: updated on every change with a\n * full wall-time ISO string.\n */\n value: PropTypes.string,\n\n /** Uncontrolled initial value (same string formats as `value`). */\n defaultValue: PropTypes.string,\n\n // --- Views --------------------------------------------------------------\n /** Which views to render, in order. Default [\"hours\", \"minutes\"]. */\n views: PropTypes.arrayOf(PropTypes.oneOf(['hours', 'minutes', 'seconds'])),\n\n /** Controlled visible view. Also an OUTPUT — updated when the view changes. */\n view: PropTypes.oneOf(['hours', 'minutes', 'seconds']),\n\n /** Which view to open first (uncontrolled). */\n openTo: PropTypes.oneOf(['hours', 'minutes', 'seconds']),\n\n // --- Format -------------------------------------------------------------\n /** Force 12h (true) or 24h (false). Omit to use the locale default. */\n ampm: PropTypes.bool,\n\n // --- Form props ---------------------------------------------------------\n /** Disable the whole clock. */\n disabled: PropTypes.bool,\n\n /** Make the clock read-only (no editing). */\n readOnly: PropTypes.bool,\n\n /** Auto-focus the clock on mount. */\n autoFocus: PropTypes.bool,\n\n // --- Constraints --------------------------------------------------------\n /** Step (in minutes) between selectable minute values. */\n minutesStep: PropTypes.number,\n\n /** Minimum selectable time (ISO or time-only string). */\n minTime: PropTypes.string,\n\n /** Maximum selectable time (ISO or time-only string). */\n maxTime: PropTypes.string,\n\n /** Disable times in the future (relative to now). */\n disableFuture: PropTypes.bool,\n\n /** Disable times in the past (relative to now). */\n disablePast: PropTypes.bool,\n\n /**\n * When true, min/max time comparisons include the date part. When false\n * (default), only the time-of-day is compared.\n */\n disableIgnoringDatePartForTimeValidation: PropTypes.bool,\n\n /** Show the hours/minutes/seconds view-switch arrow buttons. */\n showViewSwitcher: PropTypes.bool,\n\n // --- Appearance ---------------------------------------------------------\n /** CSS class applied to the wrapping div. */\n className: PropTypes.string,\n\n /** MUI sx styling object applied to the TimeClock. */\n sx: PropTypes.object,\n\n // --- Output props -------------------------------------------------------\n /**\n * Parsed convenience output, updated on every change:\n * { hours, minutes, seconds, formatted (\"HH:mm:ss\"), event_timestamp }.\n */\n timeData: PropTypes.exact({\n hours: PropTypes.number,\n minutes: PropTypes.number,\n seconds: PropTypes.number,\n formatted: PropTypes.string,\n event_timestamp: PropTypes.number,\n }),\n\n /** Dash setProps callback */\n setProps: PropTypes.func,\n};\n\nexport default TimeClock;\n"],"names":["leafPrototypes","getProto","inProgress","dataWebpackPrefix","module","exports","e","LTS","LT","L","LL","LLL","LLLL","t","n","r","i","o","s","a","f","this","h","zone","offset","match","u","indexOf","concat","d","meridiem","c","A","afternoon","Q","month","S","milliseconds","SS","SSS","ss","m","mm","H","HH","hh","D","DD","Do","ordinal","day","replace","w","ww","M","MM","MMM","map","slice","Error","MMMM","Y","YY","year","YYYY","Z","ZZ","l","formats","toUpperCase","length","regex","parser","exec","call","hours","p","customParseFormat","parseTwoDigitYear","prototype","parse","date","utc","args","$u","$locale","Ls","$d","Date","minutes","seconds","week","getDate","getFullYear","v","getMonth","g","y","UTC","toDate","init","$L","locale","format","Array","apply","isValid","k","Symbol","for","Object","hasOwnProperty","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","key","ref","__self","__source","q","b","defaultProps","$$typeof","type","props","_owner","current","jsx","jsxs","window","React","shim","objectIs","is","x","useSyncExternalStore","useRef","useEffect","useMemo","useDebugValue","useSyncExternalStoreWithSelector","subscribe","getSnapshot","getServerSnapshot","selector","isEqual","instRef","inst","hasValue","value","memoizedSelector","nextSnapshot","hasMemo","memoizedSnapshot","currentSelection","memoizedSelection","nextSelection","maybeGetServerSnapshot","z","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","ForwardRef","Fragment","Lazy","Memo","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","reactIs","REACT_STATICS","childContextTypes","contextType","contextTypes","displayName","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","mixins","propTypes","KNOWN_STATICS","name","caller","callee","arguments","arity","MEMO_STATICS","compare","TYPE_STATICS","getStatics","component","render","defineProperty","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","keys","targetStatics","sourceStatics","descriptor","$","weekdays","split","months","String","join","utcOffset","Math","abs","floor","clone","add","ceil","ms","toLowerCase","_","O","$x","$offset","NaN","test","substring","$y","$M","$D","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","toString","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","getTime","weekStart","$set","min","daysInMonth","get","Number","round","subtract","invalidDate","monthsShort","weekdaysMin","weekdaysShort","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","forEach","extend","$i","isDayjs","en","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_CONSUMER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_CLIENT_REFERENCE","getModuleId","bind","weekYear","isoWeekYear","isoWeek","offsetName","isBetween","yearStart","weeks","useState","useLayoutEffect","checkIfSnapshotChanged","latestGetSnapshot","nextValue","error","document","createElement","_useState","forceUpdate","kSampleStepSize","float32ArraySupported","Float32Array","aA1","aA2","B","C","calcBezier","aT","getSlope","LinearEasing","mX1","mY1","mX2","mY2","sampleValues","aX","intervalStart","currentSample","kSplineTableSize","guessForT","initialSlope","aGuessT","currentSlope","newtonRaphsonIterate","aA","aB","currentX","currentT","binarySubdivide","getTForX","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","id","loaded","__webpack_modules__","getter","__esModule","obj","mode","then","ns","create","def","definition","enumerable","chunkId","Promise","all","reduce","promises","globalThis","Function","prop","url","done","push","script","needAttach","scripts","getElementsByTagName","getAttribute","charset","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","timeout","doneFns","parentNode","removeChild","fn","setTimeout","target","head","appendChild","toStringTag","nmd","paths","children","scriptUrl","importScripts","location","currentScript","tagName","getCurrentScript","doc_scripts","filter","async","text","textContent","jsonpScriptSrc","__jsonpScriptSrc__","isLocal","srcFragments","fileFragments","splice","installedChunks","j","installedChunkData","promise","resolve","reject","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","data","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","self","ponyfillGlobal","__MUI_LICENSE_INFO__","LicenseInfo","getLicenseInfo","getLicenseKey","setLicenseKey","assign","fastObjectShallowCompare","aLength","bLength","sendMuiXTelemetryEvent","licenseVerification","_keyStr","base64Decode","input","chr1","chr2","chr3","enc1","enc2","enc3","enc4","output","charAt","fromCharCode","sin","PI","LICENSE_STATUS","PLAN_SCOPES","LICENSE_MODELS","expiryReg","orderReg","PRO_PACKAGES_AVAILABLE_IN_INITIAL_PRO_PLAN","verifyLicense","releaseInfo","licenseKey","packageName","status","NotFound","hash","substr","encoded","words","unescape","encodeURI","charCodeAt","md5","Invalid","license","encodedLicense","includes","expiryTimestamp","orderId","parseInt","isNaN","err","version","licenseModel","planScope","planVersion","expiryDate","decodeLicenseVersion1","licenseInfo","token","el","orderNum","decodeLicenseVersion2","decodeLicense","console","pkgTimestamp","ExpiredVersion","acceptedScopes","isPlanScopeSufficient","Valid","NotAvailableInInitialProPlan","OutOfScope","isCodeSandbox","hostname","endsWith","showError","log","sharedLicenseStatuses","useLicenseVerifier","contextKey","licenseVerifier","plan","licenseStatus","fullPackageName","packageReleaseInfo","rootPackageName","showLicenseKeyPlanMismatchError","showMissingLicenseKeyError","ExpiredAnnualGrace","showExpiredAnnualGraceLicenseKeyError","meta","ExpiredAnnual","showExpiredAnnualLicenseKeyError","showExpiredPackageVersionError","getLicenseErrorMessage","MemoizedWatermark","style","position","pointerEvents","color","zIndex","width","textAlign","bottom","right","letterSpacing","fontSize","globalId","maybeReactUseId","useId","idOverride","reactId","defaultId","setDefaultId","useGlobalId","useStoreImplementation","reactMajor","store","a1","a2","a3","getSelection","state","Store","constructor","listeners","Set","updateTick","delete","setState","newState","currentTick","it","values","result","next","listener","update","changes","use","useChartAnimation","params","animation","skip","skipAnimation","disableAnimation","disableCalled","skipAnimationRequests","matchMedia","disableAnimationCleanup","handleMediaChange","matches","mql","addEventListener","removeEventListener","instance","useEffectAfterFirstRender","effect","deps","isFirstRender","getDefaultizedParams","getInitialState","DEFAULT_X_AXIS_KEY","DEFAULT_Y_AXIS_KEY","DEFAULT_MARGINS","top","left","NOT_FOUND","ensureIsArray","item","isArray","referenceEqualityCheck","lruMemoize","func","equalityCheckOrOptions","providedOptions","equalityCheck","maxSize","resultEqualityCheck","comparator","createCacheKeyComparator","resultsCount","cache","equals","entry","put","getEntries","clear","createSingletonCache","entries","cacheIndex","findIndex","unshift","pop","createLruCache","memoized","matchingEntry","find","clearCache","resetResultsCount","Ref","WeakRef","deref","createCacheNode","weakMapMemoize","options","fnNode","lastResult","cacheNode","arg","objectCache","WeakMap","objectNode","primitiveCache","Map","primitiveNode","terminatedNode","lastResultValue","createSelectorCreator","memoizeOrOptions","memoizeOptionsFromArgs","createSelectorCreatorOptions","memoize","memoizeOptions","createSelector2","createSelectorArgs","recomputations","dependencyRecomputations","directlyPassedOptions","resultFunc","errorMessage","TypeError","assertIsFunction","combinedOptions","argsMemoize","argsMemoizeOptions","devModeChecks","finalMemoizeOptions","finalArgsMemoizeOptions","dependencies","array","every","itemTypes","assertIsArrayOfFunctions","getDependencies","memoizedResultFunc","inputSelectorResults","inputSelectorArgs","collectInputSelectorResults","resetDependencyRecomputations","resetRecomputations","withTypes","createSelector","createStructuredSelector","inputSelectorsObject","selectorCreator","object","assertIsObject","inputSelectorKeys","structuredSelector","composition","index","reselectCreateSelector","other","va","vb","vc","vd","ve","vf","vg","createSelectorMemoizedWithOptions","inputs","nextCacheId","combiner","nSelectors","argsLength","max","cacheKey","__cacheKey__","selectors","reselectArgs","selectorArgs","createSelectorMemoized","selectorChartRawXAxis","cartesianAxis","selectorChartRawYAxis","selectorChartAxisSizes","yAxis","acc","axis","zoom","slider","enabled","size","xAxis","height","selectorChartDimensionsState","dimensions","selectorChartDrawingArea","margin","marginTop","marginRight","marginBottom","marginLeft","axisSizeLeft","axisSizeRight","axisSizeTop","axisSizeBottom","selectorChartSvgWidth","dimensionsState","selectorChartSvgHeight","selectorChartPropsWidth","propsWidth","selectorChartPropsHeight","propsHeight","defaultizeMargin","defaultMargin","useChartDimensions","svgRef","hasInSize","stateRef","displayError","initialCompute","computeRun","innerWidth","setInnerWidth","innerHeight","setInnerHeight","computeSize","mainEl","computedStyle","node","doc","ownerDocument","defaultView","ownerWindow","getComputedStyle","newHeight","parseFloat","newWidth","computedSize","elementToObserve","ResizeObserver","animationFrame","observer","requestAnimationFrame","observe","cancelAnimationFrame","unobserve","drawingArea","isXInside","isYInside","isPointInside","targetElement","closest","useChartExperimentalFeatures","experimentalFeatures","globalChartDefaultId","useChartId","providedChartId","chartId","rainbowSurgePaletteLight","rainbowSurgePaletteDark","rainbowSurgePalette","defaultizeSeries","series","colors","seriesConfig","seriesGroups","seriesData","seriesIndex","seriesWithDefaultValues","getSeriesWithDefaultValues","seriesOrder","identifier","serializer","identifierSerializer","useChartSeries","dataset","theme","defaultizedSeries","serializeIdentifier","EMPTY_ARRAY","ActiveGesturesRegistry","activeGestures","registerActiveGesture","element","gesture","has","unregisterActiveGesture","elementGestures","getActiveGestures","from","isGestureActive","destroy","unregisterElement","KeyboardManager","pressedKeys","initialize","handleKeyDown","handleKeyUp","clearKeys","areKeysPressed","navigator","platform","PointerManager","preventEventInterruption","pointers","gestureHandlers","root","getRootNode","composed","body","touchAction","passive","setupEventListeners","registerGestureHandler","handler","getPointers","handlePointerEvent","handleInterruptEvents","pointerType","preventDefault","cancelEvent","PointerEvent","bubbles","cancelable","firstPointer","defineProperties","clientX","clientY","pointerId","pointer","updatedPointer","notifyHandlers","createPointerData","pageX","pageY","timeStamp","isPrimary","pressure","srcEvent","GestureManager","gestureTemplates","elementGestureMap","activeGesturesRegistry","keyboardManager","pointerManager","gestures","addGestureTemplate","warn","setGestureOptions","gestureName","CustomEvent","detail","dispatchEvent","setGestureState","registerElement","gestureNames","gestureOptions","registerSingleGesture","gestureTemplate","gestureInstance","unregisterAllGestures","eventList","abort","animationcancel","animationend","animationiteration","animationstart","auxclick","beforeinput","beforetoggle","blur","cancel","canplay","canplaythrough","change","click","close","compositionend","compositionstart","compositionupdate","contextlost","contextmenu","contextrestored","copy","cuechange","cut","dblclick","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","ended","focus","focusin","focusout","formdata","gotpointercapture","invalid","keydown","keypress","keyup","load","loadeddata","loadedmetadata","loadstart","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","paste","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointermove","pointerout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","scrollend","securitypolicyviolation","seeked","seeking","select","selectionchange","selectstart","slotchange","stalled","submit","suspend","timeupdate","toggle","touchcancel","touchend","touchmove","touchstart","transitioncancel","transitionend","transitionrun","transitionstart","volumechange","waiting","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend","wheel","beforematch","pointerrawupdate","Gesture","customData","stopPropagation","preventIf","requiredKeys","pointerMode","pointerOptions","gestureRegistry","gesturesRegistry","changeOptionsEventName","handleOptionsChange","changeStateEventName","handleStateChange","updateOptions","getBaseConfig","getEffectiveConfig","baseConfig","pointerModeOverrides","updateState","stateChanges","getTargetElement","isActive","contains","ShadowRoot","composedPath","shouldPreventGesture","effectiveConfig","isPointerTypeAllowed","PointerGesture","unregisterHandler","originalTarget","super","minPointers","maxPointers","Infinity","isWithinPointerCount","config","getRelevantPointers","calculatedTarget","calculateCentroid","sum","MAIN_THRESHOLD","createEventName","phase","PanGesture","startPointers","startCentroid","lastCentroid","movementThresholdReached","totalDeltaX","totalDeltaY","activeDeltaX","activeDeltaY","lastDirection","vertical","horizontal","mainAxis","lastDeltas","direction","threshold","overrides","structuredClone","resetState","pointersArray","relevantPointers","oldCentroid","newCentroid","offsetX","offsetY","currentCentroid","distanceDeltaX","distanceDeltaY","distance","sqrt","moveDirection","previous","deltaX","deltaY","isDiagonal","angle","atan2","isDiagonalMovement","mainMovement","horizontalThreshold","verticalThreshold","getDirection","lastDeltaX","lastDeltaY","allowedDirections","verticalAllowed","horizontalAllowed","isDirectionAllowed","emitPanEvent","remainingPointers","removedPointerId","timeElapsed","velocityX","velocityY","velocity","customEventData","initialCentroid","centroid","eventName","domEvent","MoveGesture","lastPosition","handleElementEnter","handleElementLeave","currentPosition","emitMoveEvent","TapGesture","currentTapCount","lastTapTime","maxDistance","taps","cancelTap","fireTapEvent","tapCount","PressGesture","timerId","startTime","pressThresholdReached","duration","clearPressTimer","cancelPress","emitPressEvent","currentDuration","getDistance","pointA","pointB","calculateAverageDistance","totalDistance","pairCount","PinchGesture","startDistance","lastDistance","lastScale","lastTime","totalScale","deltaScale","emitPinchEvent","initialDistance","newDistance","currentDistance","distanceChange","scale","scaleChange","deltaTime","TurnWheelGesture","totalDeltaZ","sensitivity","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","initialDelta","invert","handleWheelEvent","deltaZ","emitWheelEvent","deltaMode","TapAndDragGesture","dragTimeoutId","tapMaxDistance","dragTimeout","dragThreshold","dragDirection","tapGesture","panGesture","tapHandler","dragStartHandler","dragMoveHandler","dragEndHandler","restoreTouchAction","setTouchAction","PressAndDragGesture","pressDuration","pressMaxDistance","pressGesture","pressHandler","useChartInteractionListener","gestureManagerRef","svg","gestureManager","addInteractionListener","interaction","callback","cleanup","updateZoomInteractionListeners","CHART_CORE_PLUGINS","_objectWithoutPropertiesLoose","_excluded","extractPluginParamsFromProps","_ref","plugins","paramsLookup","plugin","pluginParams","propName","ChartContext","UNINITIALIZED","useLazyRef","initArg","EMPTY","previousState","dispose","nextState","onMount","selectorChartSeriesState","selectorChartDefaultizedSeries","seriesState","selectorChartSeriesConfig","selectorChartDataset","selectorChartSeriesProcessed","processedSeries","group","seriesProcessor","applySeriesProcessors","selectorChartSeriesLayout","processingDetected","seriesLayout","processor","thisSeries","newValue","applySeriesLayout","ZOOM_SLIDER_MARGIN","ZOOM_SLIDER_PREVIEW_SIZE","DEFAULT_ZOOM_SLIDER_SIZE","DEFAULT_ZOOM_SLIDER_PREVIEW_SIZE","DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP","DEFAULT_PIE_CHART_MARGIN","defaultZoomOptions","minStart","maxEnd","step","minSpan","maxSpan","panning","filterMode","reverse","preview","showTooltip","defaultizeZoom","axisId","axisDirection","defaultizeXAxis","inAxes","offsets","none","parsedAxes","scaleType","axisConfig","dataKey","defaultPosition","defaultHeight","label","sharedConfig","defaultizeYAxis","defaultWidth","createScalarFormatter","tickNumber","zoomScale","context","domain","tickFormat","isBandScaleConfig","scaleConfig","isPointScaleConfig","ascending","descending","bisector","compare1","compare2","delta","lo","hi","mid","zero","center","ascendingBisect","bisectRight","initRange","range","interpolator","unknown","bisect","invertExtent","factory","parent","Color","darker","brighter","reI","reN","reP","reHex","reRgbInteger","RegExp","reRgbPercent","reRgbaInteger","reRgbaPercent","reHslPercent","reHslaPercent","named","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","color_formatHex","rgb","formatHex","color_formatRgb","formatRgb","trim","rgbn","Rgb","rgba","hsla","opacity","rgb_formatHex","hex","rgb_formatRgb","clampa","clampi","Hsl","hslConvert","clamph","clampt","hsl2rgb","m1","m2","basis","t1","v0","v1","v2","v3","t2","t3","channels","displayable","formatHex8","formatHsl","pow","clamp","nogamma","linear","rgbGamma","exponential","gamma","start","end","rgbSpline","spline","rgbBasis","genericArray","nb","na","setTime","reA","reB","source","am","bm","bs","bi","lastIndex","one","string","ArrayBuffer","isView","DataView","unit","identity","normalize","bimap","interpolate","d0","d1","r0","r1","polymap","transformer","transform","untransform","piecewise","rescale","clamper","rangeRound","continuous","e10","e5","e2","tickSpec","stop","count","power","log10","factor","i1","i2","inc","ticks","tickIncrement","tickStep","prefixExponent","re","formatSpecifier","specifier","FormatSpecifier","fill","align","sign","symbol","comma","precision","formatDecimalParts","toExponential","coefficient","exponent","toFixed","toLocaleString","toPrecision","formatRounded","formatPrefix","prefixes","linearish","precisionPrefix","precisionRound","precisionFixed","nice","prestep","i0","maxIter","sequential","t0","k10","x0","x1","grouping","thousands","currencyPrefix","currency","currencySuffix","decimal","numerals","formatNumerals","percent","minus","nan","newFormat","formatTypes","prefix","suffix","formatType","maybeSuffix","valuePrefix","valueSuffix","valueNegative","out","formatTrim","padding","InternMap","keyof","_intern","_key","intern_get","intern_set","intern_delete","implicit","getSequentialColorScale","thresholds","getOrdinalColorScale","unknownColor","getColorScale","getTickNumber","defaultTickNumber","tickMaxStep","tickMinStep","maxTicks","minTicks","defaultizedTickNumber","scaleTickNumberByRange","getDefaultTickNumber","dimension","interval","transformLog","transformExp","exp","transformLogn","transformExpn","pow10","isFinite","reflect","logs","pows","base","E","log2","logp","powp","transformPow","transformSqrt","transformSquare","durationSecond","durationMinute","durationHour","durationDay","durationWeek","durationYear","timeInterval","floori","offseti","field","millisecond","second","getUTCSeconds","timeMinute","utcMinute","setUTCSeconds","getUTCMinutes","timeHour","utcHour","setUTCMinutes","getUTCHours","timeDay","setHours","setDate","utcDay","setUTCHours","setUTCDate","getUTCDate","unixDay","timeWeekday","timeSunday","timeMonday","timeTuesday","timeWednesday","timeThursday","timeFriday","timeSaturday","utcWeekday","getUTCDay","utcSunday","utcMonday","utcTuesday","utcWednesday","utcThursday","utcFriday","utcSaturday","timeMonth","setMonth","utcMonth","setUTCMonth","getUTCMonth","getUTCFullYear","timeYear","setFullYear","utcYear","setUTCFullYear","ticker","hour","minute","tickIntervals","tickInterval","utcTicks","utcTickInterval","timeTicks","timeTickInterval","localDate","utcDate","newDate","timeFormat","utcFormat","pads","numberRe","percentRe","requoteRe","pad","requote","formatRe","names","formatLookup","parseWeekdayNumberSunday","parseWeekdayNumberMonday","parseWeekNumberSunday","U","parseWeekNumberISO","V","parseWeekNumberMonday","W","parseFullYear","parseYear","parseZone","parseQuarter","parseMonthNumber","parseDayOfMonth","parseDayOfYear","parseHour24","parseMinutes","parseSeconds","parseMilliseconds","parseMicroseconds","parseLiteralPercent","parseUnixTimestamp","parseUnixTimestampSeconds","formatDayOfMonth","formatHour24","formatHour12","formatDayOfYear","formatMilliseconds","formatMicroseconds","formatMonthNumber","formatMinutes","formatSeconds","formatWeekdayNumberMonday","formatWeekNumberSunday","dISO","formatWeekNumberISO","formatWeekdayNumberSunday","formatWeekNumberMonday","formatYear","formatYearISO","formatFullYear","formatFullYearISO","formatZone","formatUTCDayOfMonth","formatUTCHour24","formatUTCHour12","formatUTCDayOfYear","formatUTCMilliseconds","getUTCMilliseconds","formatUTCMicroseconds","formatUTCMonthNumber","formatUTCMinutes","formatUTCSeconds","formatUTCWeekdayNumberMonday","dow","formatUTCWeekNumberSunday","UTCdISO","formatUTCWeekNumberISO","formatUTCWeekdayNumberSunday","formatUTCWeekNumberMonday","formatUTCYear","formatUTCYearISO","formatUTCFullYear","formatUTCFullYearISO","formatUTCZone","formatLiteralPercent","formatUnixTimestamp","formatUnixTimestampSeconds","calendar","formatMillisecond","formatSecond","formatMinute","formatHour","formatDay","formatWeek","formatMonth","time","transformSymlog","log1p","transformSymexp","expm1","symlog","constant","scaleSymlog","originalTicks","negativeScale","linearScale","positiveScale","generateScales","negativeLogTickCount","linearTickCount","positiveLogTickCount","tick","finalTicks","linearTicks","at","positiveTicks","extent","negativeScaleDomain","negativeScaleExtent","negativeScaleTickCount","linearScaleDomain","linearScaleExtent","linearScaleTickCount","positiveScaleDomain","positiveScaleExtent","positiveScaleTickCount","negativeTickFormat","linearTickFormat","positiveTickFormat","getScale","locale_dateTime","dateTime","locale_date","locale_time","locale_periods","periods","locale_weekdays","days","locale_shortWeekdays","shortDays","locale_months","locale_shortMonths","shortMonths","periodRe","periodLookup","weekdayRe","weekdayLookup","shortWeekdayRe","shortWeekdayLookup","monthRe","monthLookup","shortMonthRe","shortMonthLookup","utcFormats","parses","parseSpecifier","newParse","X","utcParse","formatLocale","isDateData","createDateFormatter","timeScale","cartesianInstance","polarInstance","cartesianSeriesTypes","types","addType","getTypes","polarSeriesTypes","isCartesianSeriesType","seriesType","isCartesianSeries","isOrdinalScale","bandwidth","isBandScale","paddingOuter","computeAxisValue","scales","formattedSeries","allAxis","zoomMap","domains","axisIds","axisIdsTriggeringTooltip","defaultAxisId","tooltipAxesIds","chartType","tooltipAxes","axisTooltipGetter","getAxisTriggerTooltip","completeAxis","eachAxis","zoomRange","getRange","rawTickNumber","triggerTooltip","ignoreTooltip","scaleRange","desiredCategoryGapRatio","categoryGapRatio","ignoreGapRatios","shouldIgnoreGapRatios","barGapRatio","colorScale","colorMap","dateFormatter","valueFormatter","continuousAxis","isDefined","createDiscreteScaleGetAxisFilter","axisData","zoomStart","zoomEnd","maxIndex","minVal","maxVal","dataIndex","createContinuousScaleGetAxisFilter","val","createZoomLookup","axes","defaultizedZoom","selectorPreferStrictDomainInLineCharts","features","Boolean","preferStrictDomainInLineCharts","JSON","stringify","scaleBand","ordinalRange","isRound","paddingInner","adjustedStart","finalStart","finalBandwidth","arg0","arg1","scalePoint","originalCopy","copied","getNormalizedAxisScale","zoomScaleRange","rangeGap","zoomGap","axisExtremumCallback","axisIndex","getFilters","xExtremumGetter","yExtremumGetter","isDefaultAxis","getAxisExtrema","cartesianChartTypes","extrema","niceDomain","calculateInitialDomainAndTickNumber","minData","maxData","domainLimit","getDomainLimit","axisExtrema","getActualAxisExtrema","calculateFinalDomain","seriesId","line","xAxisId","getAxisDomainLimit","FlatQueue","ids","priority","pos","parentValue","last","halfLen","child","peek","peekValue","shrink","ARRAY_TYPES","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float64Array","Flatbush","byteOffset","byteLength","buffer","magic","versionAndType","ArrayType","nodeSize","numItems","ArrayBufferType","numNodes","_levelBounds","IndexArrayType","arrayTypeIndex","nodesByteSize","BYTES_PER_ELEMENT","_boxes","_indices","_pos","minX","minY","maxX","maxY","_queue","boxes","finish","hilbertValues","hilbert","sort","nodeIndex","nodeMinX","nodeMinY","nodeMaxX","nodeMaxY","search","filterFn","queue","results","upperBound","neighbors","maxResults","maxDistSq","sqDistFn","sqDist","outer","dist","dx","dy","arr","indices","pivot","swap","temp","selectorChartZoomState","selectorChartHasZoom","xAxes","yAxes","selectorChartZoomIsInteracting","isInteracting","selectorChartZoomMap","zoomData","zoomItemMap","zoomItem","createZoomMap","selectorChartAxisZoomData","selectorChartZoomOptionsLookup","selectorChartAxisZoomOptionsLookup","axisLookup","selectorDefaultXAxisTickNumber","selectorDefaultYAxisTickNumber","selectorChartXAxisWithDomains","ordinalTimeTicks","findLast","selectorChartYAxisWithDomains","selectorChartZoomAxisFilters","zoomOptions","xDomains","yDomains","hasFilter","filters","currentAxisId","seriesXAxisId","seriesYAxisId","createGetAxisFilters","selectorChartFilteredXDomains","filteredDomains","zoomOption","selectorChartFilteredYDomains","selectorChartNormalizedXScales","selectorChartNormalizedYScales","selectorChartXScales","normalizedScales","zoomedRange","selectorChartYScales","selectorChartXAxis","selectorChartYAxis","selectorChartAxis","selectorChartRawAxis","selectorChartDefaultXAxisId","selectorChartDefaultYAxisId","EMPTY_MAP","selectorChartSeriesEmptyFlatbushMap","selectorChartSeriesFlatbushMap","allSeries","xAxesScaleMap","yAxesScaleMap","defaultXAxisId","defaultYAxisId","validSeries","scatter","flatbushMap","yAxisId","flatbush","originalXScale","originalYScale","datum","getAsANumber","getAxisIndex","pointerValue","valueAsNumber","closestIndex","pointValue","getAxisValue","invertedValue","getSVGPoint","pt","createSVGPoint","matrixTransform","getScreenCTM","inverse","selectInteraction","selectorChartsInteractionIsInitialized","selectorChartsInteractionPointer","selectorChartsInteractionPointerX","selectorChartsInteractionPointerY","selectorChartsLastInteraction","lastUpdate","isDeepEqual","entriesA","entryA","flags","indexGetter","selectChartsInteractionAxisIndex","selectorChartsInteractionXAxisIndex","selectorChartsInteractionYAxisIndex","selectorChartAxisInteraction","valueGetter","indexes","selectorChartsInteractionXAxisValue","xIndex","selectorChartsInteractionYAxisValue","yIndex","selectorChartsInteractionTooltipXAxes","selectorChartsInteractionTooltipYAxes","selectorChartsInteractionAxisTooltip","xTooltip","yTooltip","checkHasInteractionPlugin","setPointerCoordinate","AXIS_CLICK_SERIES_TYPES","useChartCartesianAxis","onHighlightedAxisChange","isInteractionEnabled","xAxisWithScale","xAxisIds","yAxisWithScale","yAxisIds","highlightedAxis","usedXAxis","usedYAxis","useStoreEffect","prevAxisInteraction","nextAxisInteraction","itemIndex","hasInteractionPlugin","disableAxisListener","moveEndHandler","pan","cleanInteraction","panEndHandler","move","pressEndHandler","gestureHandler","srvEvent","svgPoint","buttons","hasPointerCapture","releasePointerCapture","moveHandler","panHandler","onAxisClick","axisClickHandler","isXAxis","USED_AXIS_ID","axisValue","seriesValues","seriesTypeConfig","seriesItem","providedXAxisId","providedYAxisId","axisKey","defaultizedXAxis","defaultizedYAxis","controlledCartesianAxisHighlight","useChartTooltip","removeTooltipItem","itemToRemove","prevItem","tooltip","setTooltipItem","newItem","useChartInteraction","setLastUpdateSource","coordinate","addDefaultId","processColorMap","getZAxisState","zAxis","zAxisLookup","defaultizedId","useChartZAxis","useChartHighlight","highlightedItem","highlight","clearHighlight","onHighlightChange","prevHighlight","isControlled","setHighlight","findMinMax","createResult","getBaseExtremum","getValueExtremum","stackedData","seriesMin","seriesMax","seriesAcc","order","s0","s1","stackValue","stackSeries","stack","oz","sz","peaks","peak","vi","vj","sums","StackOrder","appearance","insideOut","tops","bottoms","StackOffset","expand","diverging","seriesCount","numericOrder","pointCount","pointIndex","positiveSum","negativeSum","currentSeries","dataPoint","difference","silhouette","wiggle","s2","si","sij0","s3","sk","getStackingGroups","defaultStrategy","stackingGroups","stackIndex","stackOrder","stackOffset","stackingOrder","stackingOffset","barValueFormatter","getLabel","getSeriesColorFn","colorGetter","verticalLayout","layout","bandColorScale","valueColorScale","bandValues","getSeriesColor","getNonEmptySeriesArray","availableSeriesTypes","flatMap","seriesOfType","getPreviousNonEmptySeries","nonEmptySeries","currentSeriesIndex","getMaxSeriesLength","maxLengths","getNextNonEmptySeries","seriesHasData","createGetNextIndexFocusedItem","compatibleSeriesTypes","currentItem","nextSeries","maxLength","createGetPreviousIndexFocusedItem","previousSeries","createGetNextSeriesFocusedItem","createGetPreviousSeriesFocusedItem","outSeriesTypes","getBandSize","bandWidth","groupCount","gapRatio","barWidth","getBarDimensions","xAxisConfig","yAxisConfig","numberOfGroups","groupIndex","baseScaleConfig","barOffset","xScale","yScale","baseValue","seriesValue","valueCoordinates","minValueCoord","maxValueCoord","barSize","minBarSize","startCoordinate","invertStartCoordinate","shouldInvertStartCoordinate","identifierSerializerSeriesIdDataIndex","barSeriesConfig","d3Dataset","completedSeries","stackingGroup","stackedSeries","labelMarkType","colorProcessor","legendGetter","formattedLabel","markType","tooltipGetter","getColor","formattedValue","tooltipItemPositionGetter","axesConfig","placement","itemSeries","bar","keyboardFocusHandler","scatterSeriesConfig","fromEntries","datasetKeys","missingKeys","markerSize","zColorScale","yColorScale","xColorScale","xValue","yValue","hasOwn","lineSeriesConfig","area","isArea","seriesExtremums","getValues","stackedValue","getSeriesExtremums","baseline","cos","epsilon","pi","halfPi","tau","asin","deg2rad","defaultRad","getPercentageValue","refValue","percentage","getPieCoordinates","drawing","cx","cxParam","cy","cyParam","availableRadius","defaultSeriesConfig","pie","arcs","sortValues","startAngle","endAngle","padAngle","a0","da","pa","paddingAngle","getSortingComparator","sortingValues","piePoint","seriesLayoutRecord","innerRadius","outerRadius","arcLabelRadius","inner","radius","available","itemId","point","dataItem","points","y0","y1","defaultPlugins","ChartProvider","contextValue","inPlugins","publicAPI","inputApiRef","fallbackPublicApiRef","initializeInputApiRef","useChartApiInitialization","apiRef","innerChartRootRef","innerSvgRef","storeRef","initialState","pluginResponse","chartRootRef","useCharts","Provider","ChartsSlotsContext","useChartsSlots","ChartsSlotsProvider","slots","slotProps","defaultSlots","resolveProps","defaultSlotProps","slotKey","slotPropName","getThemeProps","components","isPlainObject","iterator","deepClone","createBreakpoints","breakpoints","xs","sm","md","lg","xl","sortedValues","breakpointsAsArray","breakpoint1","breakpoint2","sortBreakpointsValues","up","down","between","endIndex","only","not","keyIndex","sortContainerQueries","css","containerQueries","sorted","startsWith","borderRadius","defaultBreakpoints","defaultContainerQueries","containerName","handleBreakpoints","propValue","styleFromPropValue","themeBreakpoints","breakpoint","breakpointKeys","isCqShorthand","containerKey","shorthand","containerQuery","getContainerQuery","cssKey","removeUnusedBreakpoints","breakpointOutput","formatMuiErrorMessage","code","URL","searchParams","append","getPath","path","checkVars","vars","getStyleValue","themeMapping","propValueFinal","userValue","cssProperty","themeKey","filterProps","properties","directions","aliases","marginX","marginY","paddingX","paddingY","getCssProperties","property","dir","marginKeys","paddingKeys","spacingKeys","createUnaryUnit","defaultValue","themeSpacing","transformed","createUnarySpacing","cssProperties","getStyleFromPropValue","resolveCssProperty","spacing","createSpacing","spacingInput","mui","argsInput","argument","styles","handlers","borderTransform","createBorderStyle","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outline","outlineColor","gap","columnGap","rowGap","paletteTransform","sizingTransform","maxWidth","minWidth","maxHeight","minHeight","defaultSxConfig","bgcolor","backgroundColor","pr","pb","pl","px","py","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd","mt","mr","mb","ml","mx","my","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd","displayPrint","display","overflow","textOverflow","visibility","whiteSpace","flexBasis","flexDirection","flexWrap","justifyContent","alignItems","alignContent","flex","flexGrow","flexShrink","alignSelf","justifyItems","justifySelf","gridColumn","gridRow","gridAutoFlow","gridAutoColumns","gridAutoRows","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","gridArea","boxShadow","boxSizing","font","fontFamily","fontStyle","fontWeight","textTransform","lineHeight","typography","styleFunctionSx","getThemeValue","sx","nested","unstable_sxConfig","traverse","sxInput","sxObject","emptyBreakpoints","breakpointsInput","breakpointsInOrder","createEmptyBreakpointObject","breakpointsKeys","styleKey","maybeFn","callIfFn","breakpointsValues","objects","allKeys","union","objectsHaveSameKeys","modularCssLayers","unstable_createStyleFunctionSx","applyStyles","colorSchemes","getColorSchemeSelector","palette","paletteInput","shape","shapeInput","muiTheme","themeInput","toContainerQuery","mediaQuery","attachCq","cssContainerQueries","unstable_sx","StyleSheet","_this","_insertTag","tag","before","tags","insertionPoint","nextSibling","prepend","container","firstChild","insertBefore","isSpeedy","speedy","ctr","nonce","_proto","hydrate","nodes","insert","rule","createTextNode","createStyleElement","sheet","styleSheets","ownerNode","sheetForTag","insertRule","cssRules","flush","_tag$parentNode","pattern","replacement","indexof","begin","column","character","characters","return","caret","alloc","dealloc","delimit","delimiter","whitespace","escaping","commenter","COMMENT","compile","rules","rulesets","pseudo","declarations","atrule","variable","scanning","ampersand","reference","comment","declaration","ruleset","post","identifierWithPointTracking","fixedElements","compat","isImplicitRule","parsed","toRules","getRules","parentRules","removeLabel","defaultStylisPlugins","ssrStyles","querySelectorAll","_insert","stylisPlugins","inserted","nodesToHydrate","attrib","currentSheet","collection","finalizingPlugins","serialized","shouldCache","stylis","registered","registeredStyles","classNames","rawClassName","className","isStringTag","unitlessKeys","animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flexPositive","flexNegative","flexOrder","gridRowEnd","gridRowSpan","gridRowStart","gridColumnEnd","gridColumnSpan","gridColumnStart","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","orphans","tabSize","widows","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","hyphenateRegex","animationRegex","isCustomProperty","isProcessableValue","processStyleName","styleName","processStyleValue","p1","p2","cursor","handleInterpolation","mergedProps","interpolation","componentSelector","__emotion_styles","keyframes","anim","serializedStyles","asString","interpolated","_i","createStringFromObject","previousCursor","cached","labelPattern","stringMode","strings","raw","identifierName","str","len","useInsertionEffect","useInsertionEffectWithLayoutFallback","EmotionCacheContext","HTMLElement","forwardRef","useContext","typePropName","Insertion","Emotion$1","cssProp","WrappedComponent","newProps","_key2","defaultTheme","contextTheme","systemDefaultTheme","useThemeWithoutDefault","clampWrapper","decomposeColor","hexToRgb","marker","colorSpace","shift","private_safeColorChannel","warning","decomposedColor","idx","colorChannel","recomposeColor","hslToRgb","getLuminance","alpha","private_safeAlpha","darken","private_safeDarken","lighten","private_safeLighten","private_safeEmphasize","emphasize","A100","A200","A400","A700","getLight","primary","secondary","disabled","divider","background","paper","default","action","active","hover","hoverOpacity","selected","selectedOpacity","disabledBackground","disabledOpacity","focusOpacity","activatedOpacity","light","getDark","icon","dark","addLightOrDark","intent","shade","tonalOffset","tonalOffsetLight","tonalOffsetDark","main","createPalette","contrastThreshold","getDefaultPrimary","getDefaultSecondary","getDefaultError","info","getDefaultInfo","success","getDefaultSuccess","getDefaultWarning","getContrastText","contrastText","foreground","lumA","lumB","getContrastRatio","augmentColor","mainShade","lightShade","darkShade","modeHydrated","common","createGetCssVar","appendVar","fallbacks","prepareTypographyVars","fontVariant","fontStretch","assignNestedKeys","arrayKeys","cssVarsParser","shouldSkipGeneratingVar","varsWithDefaults","shouldSkipPaths","cssVar","resolvedValue","getCssValue","recurse","parentKeys","caseAllCaps","defaultFontFamily","createTypography","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem","pxToRem2","coef","buildVariant","casing","variants","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","button","caption","overline","inherit","createShadow","easing","easeInOut","easeOut","easeIn","sharp","shortest","shorter","short","standard","complex","enteringScreen","leavingScreen","formatMs","getAutoHeightDuration","createTransitions","inputTransitions","mergedEasing","mergedDuration","durationOption","easingOption","delay","animatedProp","mobileStepper","fab","speedDial","appBar","drawer","modal","snackbar","isSerializable","stringifyTheme","baseTheme","serializableTheme","serializeTheme","mixinsInput","transitions","transitionsInput","typographyInput","generateThemeVars","systemTheme","toolbar","shadows","toRuntimeSource","getOverlayAlpha","elevation","alphaValue","defaultDarkOverlays","overlay","getOpacity","inputPlaceholder","inputUnderline","switchTrackDisabled","switchTrack","getOverlays","colorScheme","rootSelector","colorSchemeSelector","defaultColorScheme","excludedVariables","cssVarPrefix","setColor","toRgb","setColorChannel","silent","attachColorScheme","scheme","restTheme","overlays","rest","createColorScheme","createThemeWithVars","colorSchemesInput","defaultColorSchemeInput","disableCssColorScheme","firstColorScheme","getCssVar","defaultSchemeInput","builtInLight","builtInDark","customColorSchemes","defaultScheme","setCssVarColor","tokens","colorToken","Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","snackbarContentBackground","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip","parserConfig","getSelector","generateStyleSheets","defaultGetSelector","otherTheme","rootVars","rootCss","rootVarsWithDefaults","themeVars","colorSchemesMap","otherColorSchemes","cssObject","schemeVars","stylesheets","insertStyleSheet","defaultSchemeVal","cssColorSheme","finalCss","generateSpacing","createGetColorSchemeSelector","cssVariables","initialColorSchemes","initialDefaultColorScheme","paletteOptions","themeId","imageMimeTypes","enUSLocaleText","loading","noData","zoomIn","zoomOut","toolbarExport","toolbarExportPrint","toolbarExportImage","mimeType","chartTypeBar","chartTypeColumn","chartTypeLine","chartTypeArea","chartTypePie","chartPaletteLabel","chartPaletteNameRainbowSurge","chartPaletteNameBlueberryTwilight","chartPaletteNameMangoFusion","chartPaletteNameCheerfulFiesta","chartPaletteNameStrawberrySky","chartPaletteNameBlue","chartPaletteNameGreen","chartPaletteNamePurple","chartPaletteNameRed","chartPaletteNameOrange","chartPaletteNameYellow","chartPaletteNameCyan","chartPaletteNamePink","chartConfigurationSectionChart","chartConfigurationSectionColumns","chartConfigurationSectionBars","chartConfigurationSectionAxes","chartConfigurationGrid","chartConfigurationBorderRadius","chartConfigurationCategoryGapRatio","chartConfigurationBarGapRatio","chartConfigurationStacked","chartConfigurationShowToolbar","chartConfigurationSkipAnimation","chartConfigurationInnerRadius","chartConfigurationOuterRadius","chartConfigurationColors","chartConfigurationHideLegend","chartConfigurationShowMark","chartConfigurationHeight","chartConfigurationWidth","chartConfigurationSeriesGap","chartConfigurationTickPlacement","chartConfigurationTickLabelPlacement","chartConfigurationCategoriesAxisLabel","chartConfigurationSeriesAxisLabel","chartConfigurationXAxisPosition","chartConfigurationYAxisPosition","chartConfigurationSeriesAxisReverse","chartConfigurationTooltipPlacement","chartConfigurationTooltipTrigger","chartConfigurationLegendPosition","chartConfigurationLegendDirection","chartConfigurationBarLabels","chartConfigurationColumnLabels","chartConfigurationInterpolation","chartConfigurationSectionTooltip","chartConfigurationSectionLegend","chartConfigurationSectionLines","chartConfigurationSectionAreas","chartConfigurationSectionArcs","chartConfigurationPaddingAngle","chartConfigurationCornerRadius","chartConfigurationArcLabels","chartConfigurationStartAngle","chartConfigurationEndAngle","chartConfigurationPieTooltipTrigger","chartConfigurationPieLegendPosition","chartConfigurationPieLegendDirection","chartConfigurationOptionNone","chartConfigurationOptionValue","chartConfigurationOptionAuto","chartConfigurationOptionTop","chartConfigurationOptionTopLeft","chartConfigurationOptionTopRight","chartConfigurationOptionBottom","chartConfigurationOptionBottomLeft","chartConfigurationOptionBottomRight","chartConfigurationOptionLeft","chartConfigurationOptionRight","chartConfigurationOptionAxis","chartConfigurationOptionItem","chartConfigurationOptionHorizontal","chartConfigurationOptionVertical","chartConfigurationOptionBoth","chartConfigurationOptionStart","chartConfigurationOptionMiddle","chartConfigurationOptionEnd","chartConfigurationOptionExtremities","chartConfigurationOptionTick","chartConfigurationOptionMonotoneX","chartConfigurationOptionMonotoneY","chartConfigurationOptionCatmullRom","chartConfigurationOptionLinear","chartConfigurationOptionNatural","chartConfigurationOptionStep","chartConfigurationOptionStepBefore","chartConfigurationOptionStepAfter","chartConfigurationOptionBumpX","chartConfigurationOptionBumpY","DEFAULT_LOCALE","ChartsLocalizationContext","ChartsLocalizationProvider","inProps","localeText","inLocaleText","parentLocaleText","themeLocaleText","Timeout","currentId","disposeEffect","useTimeout","composeClasses","getUtilityClass","classes","slotName","slot","RtlContext","useRtl","isFocusVisible","getReactElementRef","reactPropsRegex","testOmitPropsOnStringTag","testOmitPropsOnComponent","getDefaultShouldForwardProp","composeShouldForwardProps","isReal","shouldForwardProp","optionsShouldForwardProp","__emotion_forwardProp","styled","createStyled","targetClassName","__emotion_real","baseTag","__emotion_base","defaultShouldForwardProp","shouldUseAs","templateStringsArr","Styled","FinalTag","as","classInterpolations","finalShouldForwardProp","withComponent","nextTag","nextOptions","wrapper","internal_serializeStyles","preprocessStyles","isProcessed","variant","shallowLayer","layerName","defaultOverridesResolver","_props","processStyle","resolvedStyle","subStyle","rootStyle","otherStyles","processStyleVariants","mergedState","variantLoop","ownerState","lowercaseFirstLetter","rootShouldForwardProp","slotShouldForwardProp","styleAttachTheme","attachTheme","inputOptions","componentName","componentSlot","skipVariantsResolver","inputSkipVariantsResolver","skipSx","inputSkipSx","overridesResolver","shouldForwardPropOption","defaultStyledResolver","generateStyledLabel","transformStyle","muiStyledResolver","expressionsInput","expressionsHead","expressionsBody","expressionsTail","styleOverrides","resolvedStyleOverrides","themeVariants","inputStrings","placeholdersHead","placeholdersTail","outputStrings","expressions","Component","muiName","withConfig","styleFn","lastValue","lastTheme","PropsContext","_setPrototypeOf","setPrototypeOf","__proto__","_inheritsLoose","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","Transition","_React$Component","initialStatus","appear","isMounting","enter","appearStatus","in","unmountOnExit","mountOnEnter","nextCallback","prevState","componentDidMount","updateStatus","componentDidUpdate","prevProps","nextStatus","componentWillUnmount","cancelNextCallback","getTimeouts","exit","mounting","nodeRef","scrollTop","forceReflow","performEnter","performExit","_this2","appearing","_ref2","maybeNode","maybeAppearing","timeouts","enterTimeout","onEnter","safeSetState","onEntering","onTransitionEnd","onEntered","_this3","onExit","onExiting","onExited","setNextCallback","_this4","doesNotHaveTimeoutOrListener","addEndListener","_ref3","maybeNextCallback","_this$props","childProps","TransitionGroupContext","reflow","getTransitionProps","transitionDuration","transitionTimingFunction","transitionDelay","useForkRef","refs","cleanupRef","refEffect","cleanups","refCallback","refCleanup","entering","entered","isWebKit154","userAgent","Grow","inProp","TransitionComponent","timer","autoTimeout","handleRef","normalizedTransitionCallback","maybeIsAppearing","handleEntering","handleEnter","isAppearing","clientHeight","transition","handleEntered","handleExiting","handleExit","handleExited","restChildProps","muiSupportAuto","getWindow","isHTMLElement","isShadowRoot","getUAString","uaData","userAgentData","brands","brand","isLayoutViewport","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","offsetWidth","offsetHeight","visualViewport","addVisualOffsets","offsetLeft","offsetTop","getWindowScroll","win","scrollLeft","pageXOffset","pageYOffset","getNodeName","nodeName","getDocumentElement","documentElement","getWindowScrollBarX","isScrollParent","_getComputedStyle","overflowX","overflowY","getCompositeRect","elementOrVirtualElement","offsetParent","isFixed","isOffsetParentAnElement","offsetParentIsScaled","rect","isElementScaled","getNodeScroll","clientLeft","clientTop","getLayoutRect","getParentNode","assignedSlot","host","getScrollParent","listScrollParents","list","_element$ownerDocumen","scrollParent","isBody","updatedList","isTableElement","getTrueOffsetParent","getOffsetParent","isFirefox","currentNode","perspective","contain","willChange","getContainingBlock","auto","basePlacements","viewport","popper","variationPlacements","modifierPhases","modifiers","visited","modifier","requires","requiresIfExists","dep","depModifier","DEFAULT_OPTIONS","strategy","areValidElements","_len","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","pending","orderedModifiers","modifiersData","elements","attributes","effectCleanupFns","isDestroyed","setOptions","setOptionsAction","cleanupModifierEffects","scrollParents","contextElement","merged","orderModifiers","existing","_ref$options","cleanupFn","_state$elements","rects","_state$orderedModifie","_state$orderedModifie2","_options","onFirstUpdate","getBasePlacement","getVariation","getMainAxisFromPlacement","computeOffsets","basePlacement","variation","commonX","commonY","unsetSides","mapToStyles","_Object$assign2","popperRect","gpuAcceleration","adaptive","roundOffsets","_offsets$x","_offsets$y","hasX","hasY","sideX","sideY","heightProp","widthProp","_Object$assign","commonStyles","_ref4","dpr","devicePixelRatio","roundOffsetsByDPR","removeAttribute","initialStyles","arrow","attribute","getOppositePlacement","matched","getOppositeVariationPlacement","rootNode","isSameNode","rectToClientRect","getClientRectFromMixedType","clippingParent","html","clientWidth","layoutViewport","getViewportRect","getInnerBoundingClientRect","winScroll","scrollWidth","scrollHeight","getDocumentRect","mergePaddingObject","paddingObject","expandToHashMap","hashMap","detectOverflow","_options$placement","_options$strategy","_options$boundary","boundary","_options$rootBoundary","rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","mainClippingParents","clippingParents","clipperElement","getClippingParents","firstClippingParent","clippingRect","accRect","getClippingRect","referenceClientRect","popperOffsets","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","flipVariations","allowedAutoPlacements","preferredPlacement","oppositePlacement","getExpandedFallbackPlacements","placements","_options$allowedAutoP","allowedPlacements","overflows","computeAutoPlacement","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","check","_loop","fittingPlacement","within","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowElement","arrowRect","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","arrowOffsetParent","clientOffset","offsetModifierValue","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","withinMaxClamp","_state$modifiersData$","toPaddingObject","minProp","maxProp","endDiff","startDiff","clientSize","centerToReference","axisProp","centerOffset","_options$element","querySelector","getSideOffsets","preventedOffsets","isAnySideFullyClipped","side","_options$scroll","_options$resize","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","_options$offset","invertDistance","skidding","distanceAndSkiddingToXY","_data$state$placement","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","elementType","otherProps","excludeKeys","parameters","getSlotProps","additionalProps","externalSlotProps","externalForwardedProps","joinedClasses","mergedStyle","internalRef","eventHandlers","componentsPropsWithoutEventHandlers","otherPropsWithoutEventHandlers","internalSlotProps","componentProps","slotState","skipResolvingSlotProps","resolvedComponentsProps","setRef","forwardedRef","disablePortal","mountNode","setMountNode","getContainer","defaultGenerator","generate","configure","generator","createClassNameGenerator","globalStateClasses","checked","completed","expanded","focused","focusVisible","open","readOnly","required","globalStatePrefix","globalStateClass","generateUtilityClasses","getPopperUtilityClass","resolveAnchorEl","anchorEl","defaultPopperOptions","PopperTooltip","initialPlacement","popperOptions","popperRef","popperRefProp","TransitionProps","ownerStateProp","tooltipRef","ownRef","handlePopperRef","handlePopperRefRef","rtlPlacement","flipPlacement","setPlacement","resolvedAnchorElement","setResolvedAnchorElement","popperModifiers","useUtilityClasses","Root","rootProps","role","PopperRoot","containerProp","keepMounted","exited","setExited","resolvedAnchorEl","nodeType","transitionProps","isRtl","componentsProps","RootComponent","useControlled","controlled","defaultProp","valueState","setValue","useSlot","initialElementType","internalForwardedProps","shouldForwardComponentProp","useSlotPropsParams","rootComponent","slotComponent","LeafComponent","getTooltipUtilityClass","TooltipPopper","disableInteractive","popperInteractive","popperArrow","popperClose","transformOrigin","TooltipTooltip","touch","tooltipArrow","bg","wordWrap","TooltipArrow","content","hystersisOpen","hystersisTimer","cursorPosition","composeEventHandler","eventHandler","childrenProp","classesProp","describeChild","disableFocusListener","disableHoverListener","disableInteractiveProp","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","idProp","leaveDelay","leaveTouchDelay","onClose","onOpen","openProp","PopperComponent","PopperComponentProp","PopperProps","title","TransitionComponentProp","childNode","setChildNode","arrowRef","setArrowRef","ignoreNonTouchEvents","closeTimer","enterTimer","leaveTimer","touchTimer","openState","setOpenState","prevUserSelect","stopTouchInteraction","WebkitUserSelect","handleOpen","handleClose","handleMouseOver","handleMouseLeave","setChildIsFocusVisible","handleBlur","handleFocus","currentTarget","detectTouchStart","childrenProps","onTouchStart","nativeEvent","nameOrDescProps","titleIsString","onMouseMove","interactiveWrapperListeners","onTouchEnd","onMouseOver","onMouseLeave","onFocus","onBlur","resolvedPopperProps","tooltipModifiers","resolvedTransitionProps","Popper","Arrow","PopperSlot","popperSlotProps","TransitionSlot","transitionSlotProps","TooltipSlot","tooltipSlotProps","ArrowSlot","arrowSlotProps","TransitionPropsInner","getListUtilityClass","ListRoot","disablePadding","dense","subheader","listStyle","List","getScrollbarSize","documentWidth","nextItem","disableListWrap","nextElementSibling","previousItem","lastChild","previousElementSibling","textCriteriaMatches","nextFocus","textCriteria","innerText","repeating","moveFocus","currentFocus","disabledItemsFocusable","traversalFunction","wrappedOnce","nextFocusDisabled","hasAttribute","actions","autoFocus","autoFocusItem","onKeyDown","listRef","textCriteriaRef","previousKeyMatched","adjustStyleForScrollbar","containerElement","noExplicitWidth","scrollbarSize","activeItemIndex","muiSkipListHighlight","items","newChildProps","tabIndex","ctrlKey","metaKey","altKey","activeElement","criteria","lowerKey","currTime","performance","now","keepFocusOnCurrent","getDividerUtilityClass","DividerRoot","absolute","orientation","flexItem","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","borderWidth","borderStyle","borderBottomWidth","dividerChannel","borderRightWidth","borderTopStyle","borderLeftStyle","DividerWrapper","wrapperVertical","Divider","createSimplePaletteValueFilter","additionalPropertiesToCheck","hasCorrectMainProperty","checkSimplePaletteColorValues","LazyRipple","ripple","shouldMount","setShouldMount","mountEffect","mounted","didMount","mount","resolveFn","rejectFn","createControlledPromise","pulsate","getChildMapping","mapFn","Children","isValidElement","mapper","getProp","getNextChildMapping","nextProps","prevChildMapping","nextChildMapping","getValueForKey","nextKeysPending","pendingKeys","prevKey","childMapping","nextKey","pendingNextKey","mergeChildMappings","hasPrev","hasNext","prevChild","isLeaving","cloneElement","TransitionGroup","ReferenceError","_assertThisInitialized","firstRender","currentChildMapping","childFactory","_jsx","JSX","createElementArgArray","createEmotionProps","Global","sheetRef","rehydrating","sheetRefCurrent","insertable","enterKeyframe","exitKeyframe","pulsateKeyframe","TouchRippleRoot","TouchRippleRipple","rippleX","rippleY","rippleSize","leaving","setLeaving","rippleClassName","rippleVisible","ripplePulsate","rippleStyles","childClassName","childLeaving","childPulsate","timeoutId","TouchRipple","centerProp","ripples","setRipples","rippleCallback","ignoringMouseDown","startTimer","startTimerCommit","startCommit","cb","oldRipples","fakeElement","touches","sizeX","sizeY","getButtonBaseUtilityClass","ButtonBaseRoot","WebkitTapHighlightColor","userSelect","verticalAlign","MozAppearance","WebkitAppearance","textDecoration","colorAdjust","ButtonBase","centerRipple","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onClick","onContextMenu","onDragLeave","onFocusVisible","onKeyUp","onMouseDown","onMouseUp","onTouchMove","TouchRippleProps","touchRippleRef","buttonRef","handleRippleRef","setFocusVisible","enableTouchRipple","handleMouseDown","useRippleHandler","handleContextMenu","handleDragLeave","handleMouseUp","handleTouchStart","handleTouchEnd","handleTouchMove","isNonNativeButton","href","repeat","defaultPrevented","ComponentProp","to","buttonProps","composedClasses","rippleAction","eventCallback","skipRippleAction","getCircularProgressUtilityClass","circularRotateKeyframe","circularDashKeyframe","rotateAnimation","dashAnimation","CircularProgressRoot","CircularProgressSVG","CircularProgressCircle","circle","disableShrink","circleDisableShrink","stroke","CircularProgress","thickness","circleStyle","circumference","viewBox","getIconButtonUtilityClass","IconButtonRoot","edge","activeChannel","mainChannel","IconButtonLoadingIndicator","loadingIndicator","IconButton","disableFocusRipple","loadingIndicatorProp","loadingId","loadingWrapper","getButtonUtilityClass","commonIconStyles","ButtonRoot","colorInherit","disableElevation","fullWidth","inheritContainedBackgroundColor","inheritContainedHoverBackgroundColor","inheritContainedBg","inheritContainedHoverBg","primaryChannel","loadingPosition","ButtonStartIcon","startIcon","startIconLoadingStart","ButtonEndIcon","endIcon","endIconLoadingEnd","ButtonLoadingIndicator","ButtonLoadingIconPlaceholder","loadingIconPlaceholder","contextProps","buttonGroupButtonContextPositionClassName","endIconProp","startIconProp","positionClassName","loader","defaultSlotsMaterial","baseButton","baseIconButton","getListItemIconUtilityClass","getListItemTextUtilityClass","getMenuItemUtilityClass","MenuItemRoot","disableGutters","gutters","inset","backgroundClip","MenuItem","tabIndexProp","childContext","menuItemRef","ListItemIconRoot","alignItemsFlexStart","getTypographyUtilityClass","v6Colors","textPrimary","textSecondary","textDisabled","inSx","systemProps","splitProps","finalSx","TypographyRoot","noWrap","gutterBottom","paragraph","defaultVariantMapping","Typography","themeProps","variantMapping","ListItemTextRoot","multiline","disableTypography","primaryProp","primaryTypographyProps","secondaryProp","secondaryTypographyProps","RootSlot","rootSlotProps","PrimarySlot","primarySlotProps","SecondarySlot","secondarySlotProps","candidatesSelector","defaultGetTabbable","regularTabNodes","orderedTabNodes","nodeTabIndex","tabindexAttr","contentEditable","getTabIndex","getRadio","roving","isNonTabbableRadio","isNodeMatchingSelectorFocusable","documentOrder","defaultIsEnabled","disableAutoFocus","disableEnforceFocus","disableRestoreFocus","getTabbable","isEnabled","ignoreNextEnforceFocus","sentinelStart","sentinelEnd","nodeToRestore","reactFocusEventTarget","activated","rootRef","lastKeydown","loopFocus","shiftKey","rootElement","hasFocus","tabbable","isShiftTab","focusNext","focusPrevious","setInterval","clearInterval","handleFocusSentinel","relatedTarget","childrenPropsHandler","mapEventPropToEvent","eventProp","ClickAwayListener","disableReactTree","mouseEvent","onClickAway","touchEvent","movedRef","activatedRef","syntheticEventRef","handleClickAway","insideReactTree","clickedRootScrollbar","insideDOM","createHandleSynthetic","handlerName","mappedTouchEvent","mappedMouseEvent","getPaperUtilityClass","PaperRoot","square","rounded","backgroundImage","Paper","wrappers","focusTrap","focusTrapWrapper","clickAwayTouchEvent","clickAwayMouseEvent","clickAwayWrapper","getSvgIconUtilityClass","SvgIconRoot","hasSvgAsChild","SvgIcon","htmlColor","inheritViewBox","titleAccess","instanceFontSize","more","focusable","createSvgIcon","ChartsZoomInIcon","ChartsZoomOutIcon","ChartsExportIcon","baseTooltip","basePopper","flip","onDidShow","onDidHide","popperOnExited","baseMenuList","baseMenuItem","inert","iconStart","iconEnd","baseDivider","zoomInIcon","zoomOutIcon","exportIcon","selectorBrush","brush","selectorBrushStartX","selectorBrushStartY","selectorBrushCurrentX","selectorBrushCurrentY","selectorBrushState","startX","startY","currentY","selectorBrushConfigNoZoom","hasHorizontal","isBothDirections","selectorBrushConfigZoom","optionsLookup","selectorBrushConfig","configNoZoom","configZoom","selectorIsBrushEnabled","isZoomBrushEnabled","selectorIsBrushSelectionActive","isBrushEnabled","selectorBrushShouldPreventAxisHighlight","isBrushSelectionActive","preventHighlight","selectorBrushShouldPreventTooltip","preventTooltip","useChartBrush","brushConfig","setBrushCoordinates","clearBrush","setZoomBrushEnabled","brushStartHandler","brushHandler","currentPoint","brushCancelHandler","brushEndHandler","defaultizeAxis","inAxis","axisName","DEFAULT_AXIS_KEY","isPolarSeriesType","angles","extremums","charType","rotationExtremumGetter","radiusExtremumGetter","minChartTypeData","maxChartTypeData","getAxisExtremum","axisExtremums","finalScale","minDomain","maxDomain","selectorChartPolarAxisState","polarAxis","selectorChartRawRotationAxis","rotation","selectorChartRawRadiusAxis","selectorChartRotationAxis","selectorChartPolarCenter","generateSvg2rotation","clampAngle","TWO_PI","angleGap","useChartPolarAxis","rotationAxis","radiusAxis","rotationAxisWithScale","rotationAxisIds","radiusAxisWithScale","radiusAxisIds","svg2rotation","svg2polar","generateSvg2polar","polar2svg","generatePolar2svg","usedRotationAxisId","usedRadiusAxisId","mousePosition","isInChart","svgRect","isRotationAxis","rotationIndex","EMPTY_VISIBILITY_MAP","visibilityParamToMap","visibilityManager","visibilityMap","uniqueId","isIdentifierVisible","hiddenItems","useChartVisibilityManager","hideItem","newVisibilityMap","onHiddenItemsChange","showItem","toggleItem","toggleItemVisibility","loadStyleSheets","stylesheetLoadPromises","headStyleElements","newHeadStyleElement","styleCSS","cssText","attr","nodeValue","createExportIframe","iframeEl","previousStyles","getPropertyValue","setProperty","chartsToolbarClasses","defaultOnBeforeExport","iframe","chartsToolbarEl","contentDocument","remove","waitForAnimationFrame","res","useChartProExport","exportAsPrint","chartRoot","enableAnimation","fileName","onBeforeExport","copyStyles","printWindow","printDoc","elementClone","cloneNode","replaceChildren","rootCandidate","contentWindow","print","printChart","exportAsImage","quality","drawDocumentPromise","drawDocument","cause","getDrawDocument","iframeLoadPromise","exportDoc","exportDocBodySize","canvas","ratio","resolveBlobPromise","blobPromise","blob","toBlob","createObjectURL","download","triggerDownload","revokeObjectURL","exportImage","rafThrottle","lastArgs","rafRef","later","throttled","export","zoomAtPoint","centerRatio","scaleRatio","currentZoomData","MIN_RANGE","MAX_RANGE","MIN_ALLOWED_SPAN","minRange","maxRange","newMinRange","newMaxRange","minSpillover","maxSpillover","isSpanValid","isZoomIn","option","newSpanPercent","getHorizontalCenterRatio","getVerticalCenterRatio","translateZoom","initialZoomData","movement","span","MIN_PERCENT","MAX_PERCENT","rawDisplacement","displacement","newMinPercent","newMaxPercent","selectorChartZoomIsEnabled","selectorChartCanZoomOut","zoomState","selectorChartCanZoomIn","selectorZoomInteractionConfig","interactionName","zoomInteractionConfig","selectorPanInteractionConfig","useZoomOnWheel","setZoomDataCallback","startedOutsideRef","startedOutsideTimeoutRef","isZoomOnWheelEnabled","rafThrottledSetZoomData","zoomOnWheelHandler","multiplier","ctrlMultiplier","getMultiplier","scaledStep","getWheelScaleRatio","initializeZoomInteractionConfig","defaultizedConfig","initializeFor","mouse","pinch","hasXZoom","hasYZoom","allowedDirection","interactionType","aggregation","lastEmpty","lastMouse","lastTouch","initializeZoomData","zoomDataMap","useChartProZoom","pluginData","paramsZoomData","onZoomChange","onZoomChangeProp","removeIsInteracting","wait","debounced","newZoomData","setAxisZoomData","prevZoom","moveZoomRange","by","prevZoomData","isPanOnDragEnabled","accumulatedChange","throttledCallback","panStartHandler","usePanOnDrag","isPanOnPressAndDragEnabled","pressAndDragHandler","pressAndDragStartHandler","pressAndDragEndHandler","usePanOnPressAndDrag","isPanOnWheelEnabled","wheelHandler","movementX","movementY","usePanOnWheel","isZoomOnPinchEnabled","rafThrottledCallback","zoomHandler","useZoomOnPinch","isZoomOnTapAndDragEnabled","useZoomOnTapAndDrag","isZoomOnBrushEnabled","startPoint","endPoint","startRatio","endRatio","minRatio","maxRatio","currentStart","currentSpan","newStart","newEnd","clampedStart","clampedEnd","useZoomOnBrush","isZoomOnDoubleTapResetEnabled","doubleTapResetHandler","useZoomOnDoubleTapReset","calculateZoom","setZoomData","initialZoom","DEFAULT_PLUGINS","useChartKeyboardNavigation","removeFocus","keyboardNavigation","enableKeyboardNavigation","keyboardHandler","newFocusedItem","calculateFocusedItem","findClosestPoints","xZoomStart","xZoomEnd","yZoomStart","yZoomEnd","svgPointX","svgPointY","maxRadius","fx","fy","fxSq","fySq","pointX","invertScale","pointY","getDataPoint","useChartClosestPoint","disableVoronoi","voronoiMaxRadius","onItemClick","zoomIsInteracting","isVoronoiEnabled","getClosestPoint","closestPoint","aSeries","xAxisZoom","yAxisZoom","closestPointIndex","scaledX","scaledY","distSq","distanceSq","enableVoronoi","voronoi","useChartDataProviderProps","chartProviderProps","useChartDataProviderProProps","packageIdentifier","defaultSeriesConfigPro","ChartDataProviderPro","useDrawingArea","useXAxes","useYAxes","useRotationAxes","ChartsPiecewiseGradient","isReversed","gradientId","x2","y2","gradientUnits","stopColor","ChartsContinuousGradient","extremumValues","extremumPositions","numberOfPoints","keyPrefix","ChartsContinuousGradientObjectBound","selectorChartZAxis","useZAxes","zAxisIds","selectorChartId","idState","useChartGradientIdBuilder","useChartGradientIdObjectBoundBuilder","ChartsAxesGradients","svgHeight","svgWidth","getGradientId","getObjectBoundGradientId","filteredYAxisIds","filteredXAxisIds","filteredZAxisIds","objectBoundGradientId","useSvgRef","selectKeyboardNavigation","selectorChartsItemIsFocused","keyboardNavigationState","selectorChartsHasFocusedItem","selectorChartsFocusedItem","selectorChartsIsKeyboardNavigationEnabled","createSelectAxisHighlight","selectorChartsKeyboardXAxisIndex","selectorChartsKeyboardYAxisIndex","selectorChartsKeyboardItem","keyboardState","getSurfaceUtilityClass","ChartsSurfaceStyles","hasZoom","ChartsSurface","isKeyboardNavigationEnabled","hasFocusedItem","desc","hasIntrinsicSize","onPointerDown","useInteractionItemProps","interactionActive","onPointerEnter","onPointerLeave","alwaysFalse","createIsHighlighted","highlightScope","createIsFaded","fade","isSeriesHighlighted","scope","getSeriesHighlightedItem","selectorChartsHighlightScopePerSeriesId","selectorChartsHighlightedItem","keyboardItem","selectorChartsHighlightScope","seriesIdToHighlightScope","selectorChartsIsHighlightedCallback","selectorChartsIsFadedCallback","selectorChartsIsHighlighted","selectorChartIsSeriesHighlighted","selectorChartIsSeriesFaded","selectorChartSeriesUnfadedItem","selectorChartSeriesHighlightedItem","selectorChartsIsFaded","useItemHighlighted","isHighlighted","isFaded","ANIMATION_DURATION_MS","ANIMATION_TIMING_FUNCTION","ANIMATION_TIMING_FUNCTION_JS","taskHead","taskTail","clockLast","clockNow","clockSkew","clock","setFrame","clearNow","Timer","_call","_time","_next","restart","wake","timerFlush","sleep","nap","poke","elapsed","easingFn","onTick","onTickCallback","resume","running","timerCallback","easedT","useAnimate","createInterpolator","transformProps","applyProps","initialProps","animateRef","lastInterpolatedProps","lastInterpolatedPropsRef","transitionRef","elementRef","lastPropsRef","animate","interpolatedProps","lastElement","objA","objB","keysA","keysB","currentKey","shallowEqual","useAnimateInternal","animatedProps","cleanId","appearingMaskClasses","AnimatedRect","animationName","animationTimingFunction","animationDuration","AppearingMask","clipId","clipPath","AnimatedArea","lastProps","useAnimateArea","getAreaElementUtilityClass","areaElementClasses","AreaElement","innerClasses","interactionProps","Area","areaProps","selectorChartSkipAnimation","useSkipAnimation","storeSkipAnimation","useInternalIsZoomInteracting","Linear","_context","areaStart","_line","areaEnd","lineStart","_point","lineEnd","closePath","lineTo","moveTo","tauEpsilon","Path","digits","_x0","_y0","_x1","_y1","_append","appendRound","quadraticCurveTo","bezierCurveTo","arcTo","x21","y21","x01","y01","l01_2","x20","y20","l21_2","l20_2","l21","l01","acos","t01","t21","arc","ccw","cw","withPath","RangeError","defined","curve","defined0","x0z","y0z","arealine","lineX0","lineY0","lineY1","lineX1","that","_k","_x2","_y2","Cardinal","tension","CatmullRom","_alpha","custom","cardinal","_l01_a","_l12_a","_l23_a","_l01_2a","_l12_2a","_l23_2a","x23","y23","catmullRom","slope3","h0","slope2","MonotoneX","MonotoneY","ReflectContext","monotoneX","monotoneY","Natural","controlPoints","Step","_t","stepBefore","stepAfter","_t0","_x","_y","Bump","bumpX","bumpY","getCurveFactory","curveType","selectorAllSeriesOfType","selectorSeriesOfType","failedIds","useAllSeriesOfType","useLineSeriesContext","getValueToPositionMapper","useXScale","useYScale","useAreaPlotData","allData","areaPlotData","groupIds","connectNulls","strictStepCurve","xPosition","xData","shouldExpand","formattedData","nullData","rep","isExtension","d3Data","areaPath","AreaPlotRoot","transitionProperty","useAggregatedData","AreaPlot","inSkipAnimation","completedData","AnimatedLine","animateProps","useAnimateLine","fadedOpacity","strokeLinejoin","hidden","getLineElementUtilityClass","lineElementClasses","LineElement","Line","lineProps","useLinePlotData","linePlotData","linePath","LinePlotRoot","LinePlot","getMarkElementUtilityClass","markElementClasses","Circle","CircleMarkElement","draw","tan30","tan30_2","kr","kx","ky","symbolsFill","cross","diamond","star","triangle","wye","getSymbol","MarkElementPath","MarkElement","useItemHighlightedGetter","selectorChartControlledCartesianAxisHighlight","selectAxisHighlight","computedIndex","axisItems","selectorChartsHighlightXAxisIndex","selectAxisHighlightWithValue","computedValue","controlledAxisItems","keyboardAxisItem","lastInteractionUpdate","pointerHighlight","keyboardValue","keyboardHighlight","selectorChartsHighlightXAxisValue","selectorChartsHighlightYAxisValue","selectAxis","MarkPlot","xAxisHighlightIndexes","highlightedItems","markPlotData","showMark","marks","xPos","useMarkPlotData","Mark","mark","isSeriesFaded","useIsHydrated","isHydrated","setIsHydrated","isInfinity","monthNumber","dayNumber","tickFrequencies","years","isTick","quarterly","Intl","DateTimeFormat","biweekly","offsetRatio","extremities","middle","getTickPosition","useTicks","tickPlacement","tickLabelPlacement","tickSpacing","isInside","tickPlacementProp","tickLabelPlacementProp","ticksIndexes","ticksFrequencies","startIndex","findLastIndex","startFrequencyIndex","endFrequencyIndex","prevTickCount","nextTickCount","tickIndex","prevDate","currentDate","formatter","getTimeTicks","tickDef","labelOffset","filteredDomain","rangeSpan","applyTickSpacing","defaultTickLabel","getDefaultTicks","visibleTicks","getTicks","segmenter","Segmenter","granularity","getGraphemeCount","segments","segment","_unused","sliceUntil","newText","ELLIPSIS","doesTextFitInRect","measureText","textSize","angledWidth","angledHeight","ellipsize","doesTextFit","shortenedText","graphemeCount","newLength","lastLength","longestFittingText","isSsr","stringCache","MAX_CACHE_NUM","PIXEL_STYLES","convertPixelValue","AZ","camelCaseToDashCase","getStyleString","getStringSize","measurementSpanContainer","getMeasurementContainer","measurementElem","createElementNS","measureSVGTextElement","getBBox","measurementContainer","ANGLE_APPROX","getAxisUtilityClass","axisClasses","tickContainer","tickLabel","TICK_LABEL_GAP","AXIS_LABEL_TICK_LABEL_GAP","disableLine","disableTicks","tickSize","tickLabelMinGap","_excluded2","ChartsText","styleProps","textProps","textAnchor","dominantBaseline","wordsByLines","needsComputation","subText","getWordsByLines","startDy","getDefaultTextAnchor","adjustedAngle","getDefaultBaseline","invertTextAnchor","useAxisTicksProps","_xAxis","themedProps","defaultizedProps","tickLabelStyle","positionSign","Tick","axisTick","TickLabel","axisTickLabel","defaultTextAnchor","defaultDominantBaseline","axisTickLabelProps","ChartsSingleXAxisTicks","axisLabelHeight","isMounted","defer","mountedState","setMountedState","useMounted","tickSizeProp","tickLabelInterval","axisHeight","xTicks","visibleLabels","previousTextLimit","candidateTickLabels","sizeMap","texts","textToMeasure","styleString","measurementSpanStyle","measurementElements","batchMeasureStrings","measureTickLabels","labelIndex","textPosition","lineSize","getTickLabelSize","standardAngle","radAngle","getMinXTranslation","getVisibleLabels","tickLabelsMaxHeight","tickLabels","shortenedLabels","leftBoundFactor","rightBoundFactor","shortenLabels","tickOffset","xTickLabel","yTickLabel","showTick","showTickLabel","useTicksGrouped","groups","mapToGrouping","ignoreTick","tickValues","allTickItems","dataIndexToTickIndex","currentValueCount","tickValue","groupValue","getValue","lastItem","tickIndexes","previousIndex","DEFAULT_GROUPING_CONFIG","getGroupingConfig","defaultTickSize","calculatedTickSize","ChartsGroupedXAxisTicks","groupConfig","tickYSize","labelPositionY","AxisRoot","shapeRendering","XAxisRoot","ChartsXAxisImpl","labelStyle","axisLine","Label","axisLabel","axisLabelProps","labelHeight","labelRefPoint","ChartsXAxis","_yAxis","tickFontSize","ChartsSingleYAxisTicks","axisWidth","yTicks","tickLabelsMaxWidth","topBoundFactor","bottomBoundFactor","skipLabel","showLabel","ChartsGroupedYAxisTicks","tickXSize","labelPositionX","YAxisRoot","ChartsYAxisImpl","settings","strokeLinecap","ChartsYAxis","getChartsGridUtilityClass","chartsGridClasses","GridRoot","verticalLine","horizontalLine","GridLine","ChartsGridVertical","ChartsGridHorizontal","ChartsGrid","horizontalAxis","verticalAxis","getChartsTooltipUtilityClass","chartsTooltipClasses","table","row","cell","markContainer","labelCell","valueCell","axisValueCell","useSeries","selectorChartsTooltipPointerItem","selectorChartsTooltipPointerItemIsDefined","selectorChartsTooltipItem","lastInteraction","pointerItem","selectorChartsTooltipItemIsDefined","pointerItemIsDefined","keyboardItemIsDefined","selectorChartsTooltipAxisConfig","rotationAxes","radiusAxes","selectorChartsTooltipItemPosition","useInternalItemTooltip","zAxisId","rotationAxisId","ChartsTooltipPaper","ChartsTooltipTable","borderSpacing","ChartsTooltipRow","ChartsTooltipCell","getLabelMarkUtilityClass","labelMarkClasses","mergeClassNameAndStyle","consumeThemeProps","InComponent","outProps","classesResolver","OutComponent","mask","ChartsLabelMark","preserveAspectRatio","ChartsItemTooltipContent","propClasses","tooltipData","seriesLabel","useMediaQueryOld","query","defaultMatches","ssrMatchMedia","noSsr","setMatch","queryList","updateMatch","maybeReactUseSyncExternalStore","useMediaQueryNew","getDefaultSnapshot","mediaQueryList","notify","unstable_createUseMediaQuery","queryInput","supportMatchMedia","useIsFineMainPointer","optionalGetAxisId","optionalGetAxisIds","selectorChartsInteractionRotationAngle","selectorChartsInteractionRotationAxisIndex","selectorChartsInteractionRotationAxisIndexes","selectorChartsInteractionTooltipRotationAxes","rotationIndexes","selectorChartsInteractionPolarAxisTooltip","rotationTooltip","defaultAxisTooltipConfig","axisFormattedValue","utcFormatter","seriesItems","useAxesTooltip","multipleAxes","defaultXAxis","defaultYAxis","defaultRotationAxis","tooltipXAxes","tooltipYAxes","tooltipRotationAxes","colorProcessors","seriesT","useColorProcessor","seriesToAdd","tooltipItemIndex","providedRotationAxisId","useAxisTooltip","ChartsAxisTooltipContent","hideTooltip","fallback","selectorReturnFalse","selectorReturnNull","ChartsTooltipRoot","ChartsTooltipContainer","trigger","anchor","anchorRef","setPointerType","handleOut","usePointerType","isFineMainPointer","positionRef","axisSystem","rawRotationAxis","rawXAxis","useAxisSystem","shouldPreventBecauseOfBrush","isOpen","getIsOpenSelector","computedAnchor","itemPosition","svgElement","pointerUpdate","pointerAnchorEl","isMouse","isTouch","ChartsTooltip","getAxisHighlightUtilityClass","ChartsAxisHighlightPath","axisHighlight","ChartsYHighlight","axisYValues","getYPosition","isYScaleOrdinal","ChartsXHighlight","axisXValues","getXPosition","isXScaleOrdinal","ChartsAxisHighlight","xAxisHighlight","yAxisHighlight","getSeriesToDisplay","getLegendUtilityClass","legendClasses","getLabelUtilityClass","ChartsLabel","RootElement","listStyleType","li","ChartsLegend","ConsumeSlotsInternal","propagateSlots","_useSlotProps","omitProps","consumeSlots","ChartsClipPath","offsetProps","createPreviewDrawingArea","mainChartDrawingArea","selectorChartPreviewXScales","chartDrawingArea","normalizedXScales","hasAxis","selectorChartPreviewComputedXAxis","computedAxes","selectorChartPreviewYScales","normalizedYScales","selectorChartPreviewComputedYAxis","getAxisMessage","useBarSeriesContext","useBarPlotData","masks","seriesIds","xMin","xMax","yMin","yMax","lastNegativePerIndex","lastPositivePerIndex","seriesDataLength","discreteAxisConfig","continuousAxisConfig","discreteAxisId","continuousAxisId","discreteAxisDirection","continuousAxisDirection","checkBarChartScaleErrors","xOrigin","yOrigin","seriesDataPoints","barDimensions","stackId","maskId","lastNegative","lastPositive","borderRadiusSide","hasNegative","hasPositive","barLabel","barLabelPlacement","masksData","getBarElementUtilityClass","barElementClasses","barPropsInterpolator","interpolateX","interpolateY","interpolateWidth","interpolateHeight","AnimatedBarElement","useAnimateBar","BarElement","itemIdentifier","isFocused","Bar","barProps","useScatterPlotData","scatterPoint","useScatterSeriesContext","ScatterMarker","ScatterPreviewItems","scatterPlotData","AreaPreviewPlot","useAreaPreviewData","PreviewAreaElement","LinePreviewPlot","useLinePreviewData","PreviewLineElement","seriesPreviewPlotMap","useBarPreviewData","zAxes","defaultZAxisId","ChartAxisZoomSliderPreviewContent","PreviewBackgroundRect","rx","ry","ChartAxisZoomSliderPreview","PreviewRectangles","ZOOM_SLIDER_TRACK_SIZE","ZOOM_SLIDER_ACTIVE_TRACK_SIZE","ZOOM_SLIDER_THUMB_HEIGHT","ZOOM_SLIDER_THUMB_WIDTH","ZOOM_SLIDER_SIZE","calculateZoomFromPoint","pointerZoom","calculateZoomFromPointImpl","calculateZoomStart","currentZoom","calculateZoomEnd","getAxisZoomSliderTrackUtilityClass","ZoomSliderTrack","isSelecting","ChartAxisZoomSliderTrack","onSelectStart","onSelectEnd","setIsSelecting","pointerDownPoint","zoomFromPointerDown","onPointerMove","pointerMoveEvent","pointerMovePoint","zoomFromPointerMove","setPointerCapture","onPointerUp","pointerUpEvent","getDataIndexForOrdinalScaleValue","chartAxisZoomSliderThumbClasses","getAxisZoomSliderThumbUtilityClass","Rect","ChartAxisZoomSliderThumb","onMove","thumbRef","onMoveEvent","thumb","onPointerEnd","ChartsZoomSliderTooltipRoot","MODIFIERS","ChartsTooltipZoomSliderValue","ZoomSliderActiveTrackRect","ChartAxisZoomSliderActiveTrack","axisPosition","activePreviewRectRef","startThumbEl","setStartThumbEl","endThumbEl","setEndThumbEl","tooltipStart","tooltipEnd","formatValue","startValue","endValue","getZoomSliderTooltipsText","previewThumbWidth","previewThumbHeight","previewX","previewY","previewWidth","previewHeight","startThumbX","startThumbY","endThumbX","endThumbY","activePreviewRect","prevPointerZoom","deltaZoom","axisZoomData","pointerDownZoom","previewOffset","ChartAxisZoomSlider","setShowTooltip","showPreview","tooltipConditions","sliderSize","axisSize","backgroundRectOffset","track","ChartZoomSlider","getReferenceLineUtilityClass","referenceLineClasses","ReferenceLineRoot","getTextParams","labelAlign","defaultSpacingOtherAxis","spacingX","spacingY","ChartsXReferenceLine","inClasses","lineStyle","xAxisScale","getXReferenceLineClasses","textParams","ChartsYReferenceLine","yPosition","yAxisScale","getYReferenceLineClasses","ChartsReferenceLine","brushOverlayClasses","BrushRect","ChartsBrushOverlay","brushStartX","brushStartY","brushCurrentX","brushCurrentY","clampX","clampY","rectColor","rectWidth","rectHeight","useComponentRenderer","defaultElement","otherClassName","ToolbarContext","ToolbarContextProvider","focusableItemId","setFocusableItemId","focusableItemIdRef","setItems","getSortedItems","sortByDocumentPosition","findEnabledItem","wrap","sortedItems","itemCount","ariaDisabled","registerItem","itemRef","prevItems","unregisterItem","onItemKeyDown","focusableItemIndex","newIndex","onItemFocus","onItemDisabled","currentIndex","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_CONTAINED_BY","DOCUMENT_POSITION_PRECEDING","DOCUMENT_POSITION_CONTAINS","ToolbarButton","_useRegisterToolbarBu","useToolbarContext","previousDisabled","previousAriaDisabled","useRegisterToolbarButton","toolbarButtonProps","ToolbarRoot","Toolbar","useChartsLocalization","localization","ChartsToolbarDivider","ChartsMenu","savedFocusRef","ChartsToolbarZoomInTrigger","ChartsToolbarZoomOutTrigger","useChartProApiContext","useChartApiContext","ChartsToolbarPrintExportTrigger","ChartsToolbarImageExportTrigger","DEFAULT_IMAGE_EXPORT_OPTIONS","ChartsToolbarPro","printOptions","imageExportOptions","rawImageExportOptions","exportMenuOpen","setExportMenuOpen","exportMenuTriggerRef","exportMenuId","exportMenuTriggerId","isZoomEnabled","imageExportOptionList","showExportMenu","disableToolbarButton","ZoomOutIcon","ZoomInIcon","MenuList","ExportIcon","closeExportMenu","handleListKeyDown","licenseKeySet","MONTHS_SHORT","pad2","CustomBrushOverlay","_ref$primaryColor","primaryColor","_ref$positiveColor","positiveColor","_ref$negativeColor","negativeColor","clampedStartX","clampedCurrentX","getIndex","_toConsumableArray","currentValue","percentChange","startLabel","currentLabel","diffColor","LineChart","_series$","_props$series","_props$height","grid","_props$hideLegend","hideLegend","_props$skipAnimation","_props$loading","_props$showSlider","showSlider","_props$referenceLines","referenceLines","_props$brushOverlay","brushOverlay","brushSeriesId","_props$axisHighlight","tooltipItem","_props$showToolbar","showToolbar","_props$n_clicks","brushData","clickData","n_clicks","setProps","clipPathId","_useState2","_slicedToArray","controlledZoom","setControlledZoom","lastKnownZoomRef","_useState4","chartKey","setChartKey","currentZoomStr","lastKnownHighlightedAxisRef","_useState6","controlledHighlightedAxis","setControlledHighlightedAxis","currentStr","lastKnownHighlightedItemRef","_useState8","controlledHighlightedItem","setControlledHighlightedItem","lastKnownTooltipItemRef","_useState0","controlledTooltipItem","setControlledTooltipItem","hasAreaSeries","hasMarks","_objectSpread","hasSliderInAxisConfig","checkAxes","_typeof","processedXAxis","dateFormat","tf","formatDateStr","dateTickFormat","resolved","registry","dashMuiChartsFunctions","resolveFunctionProp","existingZoom","zoomConfig","providerProps","resolvedZoomData","onTooltipItemChange","AXIS_RENDER_PROPS","extractRenderProps","renderProps","_AXIS_RENDER_PROPS","xAxisConfigs","resolvedXAxis","yAxisConfigs","_extends","timestamp","refLine","getBarLabelUtilityClass","PropTypes","function","isRequired","barLabelClasses","barLabelPropsInterpolator","LABEL_OFFSET","BarLabelComponent","faded","highlighted","BarLabel","initialX","initialY","getOutsidePlacement","getCenterPlacement","useAnimateBarLabel","getTextAnchor","getDominantBaseline","BarLabelItem","barLabelOwnerState","barLabelProps","formattedLabelText","getBarLabel","BarLabelPlot","getBarUtilityClass","seriesLabels","barClipPathPropsInterpolator","interpolateBorderRadius","BarClipPath","generateClipPath","useAnimateBarClipPath","bR","IndividualBarPlot","withoutBorderRadius","barElement","selectorBarItemAtPosition","bandAxis","bandScale","svgPointBandCoordinate","bandValue","bandStart","bandBarStart","bandBarEnd","bandBarMin","bandBarMax","svgPointContinuousCoordinate","continuousMin","continuousMax","appendAtKey","bucket","createPath","barData","topLeftBorderRadius","topRightBorderRadius","bottomRightBorderRadius","bottomLeftBorderRadius","tLBR","tRBR","bRBR","bLBR","generateBarPath","PathGroup","BarGroup","AnimatedGroup","animationFillMode","animateChildren","BatchBarPlot","prevCursorRef","getItemAtPosition","onItemEnter","onItemLeave","lastItemRef","onItemEnterRef","onItemLeaveRef","useRegisterPointerInteractions","lastPointerUp","useRegisterItemClickHandlers","SeriesBatchPlot","MemoFadedHighlightedBars","FadedHighlightedBars","BatchBarSeriesPlot","temporaryPaths","pathString","tempPath","useCreateBarPaths","dArray","seriesHighlightedDataIndex","seriesUnfadedDataIndex","seriesHighlightedItem","seriesUnfadedItem","siblings","BarPlotRoot","BarPlot","renderer","batchSkipAnimation","BarElementPlot","getHighlightElementUtilityClass","LineHighlightElement","LineHighlightPlot","highlightedIndexes","lineHighlight","highlightedIndex","highlightedAxisId","disableHighlight","ChartDataProvider","useFocusedItem","FocusedLineMark","focusedItem","lineSeries","SPARK_LINE_DEFAULT_MARGIN","SparkLineChart","xAxisProps","yAxisProps","showHighlight","inAxisHighlight","plotType","disableClipping","clipAreaOffset","clipPathOffset","defaultXHighlight","SparklineChart","_props$data","_props$plotType","_props$area","_props$curve","_props$showTooltip","_props$showHighlight","_props$disableClippin","_props$n_hovers","hoverIndex","hoverValue","n_hovers","internalHighlightIndex","setInternalHighlightIndex","lastHighlightPropRef","sparklineProps","mergedSlotProps","_axisItems$0$dataInde","_axisItems$","MuiSparkLineChart","ChartsAxis","getJustifyItems","getAlignItems","horizontalPosition","drawingAreaColumn","getTemplateColumns","legendDirection","legendPosition","verticalPosition","drawingAreaRow","getTemplateRows","getGridTemplateAreas","extendVertically","ChartsWrapper","StyledText","ChartsLoadingOverlay","ChartsNoDataOverlay","ChartsOverlay","seriesPerType","seriesOfGivenType","links","useNoData","LoadingOverlay","loadingOverlay","NoDataOverlay","noDataOverlay","getLabelGradientUtilityClass","labelGradientClasses","rotate","getRotation","ChartsLabelGradient","continuousColorLegendClasses","templateAreas","endLabel","extremes","maxLabel","minLabel","gradient","getText","ContinuousColorLegend","labelPosition","rotateGradient","generateGradientId","axisItem","useAxis","minValue","maxValue","formattedMin","formattedMax","minText","maxText","minComponent","maxComponent","useHeatmapSeriesContext","getHeatmapUtilityClass","HeatmapCell","HeatmapItem","Cell","cellProps","HeatmapPlot","useZAxis","useZColorScale","xDomain","yDomain","seriesToDisplay","heatmapSeriesConfig","heatmap","HeatmapTooltipAxesValue","HeatmapTooltipContent","heatmapSeries","formattedX","formattedY","HeatmapTooltip","HEATMAP_PLUGINS","defaultColorMap","getDefaultDataForAxis","getDefaultDataForXAxis","getDefaultDataForYAxis","Heatmap","xAxisWithDefault","yAxisWithDefault","zAxisWithDefault","chartsWrapperProps","legend","DefaultCell","onCellClick","_objectWithoutProperties","RoundedCell","cellConfig","_ref$gap","_ref$borderRadius","_ref$showValue","showValue","_ref$fontSize","_ref$fontWeight","_ref$textColor","textColor","cellStyle","zAxisConfig","_colorScale$min","_colorScale$max","handleCellClick","_params$dataIndex","_params$dataIndex2","heatmapProps","MuiHeatmap","arcInnerRadius","arcOuterRadius","arcStartAngle","arcEndAngle","arcPadAngle","cornerTangents","rc","ox","oy","x11","y11","x10","y10","x00","y00","d2","cx0","cy0","cx1","cy1","dx0","dy0","dx1","dy1","cornerRadius","padRadius","a01","a11","a00","a10","da0","da1","ap","rp","rc0","rc1","p0","oc","x3","y3","x32","y32","intersect","ax","ay","bx","kc","lc","pieArcPropsInterpolator","interpolateStartAngle","interpolateEndAngle","interpolateInnerRadius","interpolateOuterRadius","interpolatePaddingAngle","interpolateCornerRadius","getPieArcUtilityClass","pieArcClasses","PieArcRoot","PieArc","strokeProp","skipInteraction","useAnimatePieArc","getModifiedArcProperties","seriesDef","basePaddingAngle","baseCornerRadius","baseInnerRadius","baseArcLabelRadius","baseOuterRadius","attributesOverride","additionalRadius","useTransformData","isItemFaded","isItemHighlighted","isItemFocused","useIsItemFocusedGetter","arcSizes","PieArcPlot","transformedData","Arc","pieArc","pieArcLabelPropsInterpolator","getPieArcLabelUtilityClass","pieArcLabelClasses","PieArcLabelRoot","PieArcLabel","formattedArcLabel","useAnimatePieArcLabel","RATIO","getItemLabel","arcLabel","arcLabelMinAngle","PieArcLabelPlot","ArcLabel","pieArcLabel","usePieSeriesContext","usePieSeriesLayout","getPieUtilityClass","PiePlot","useChartContainerProps","chartsSurfaceProps","chartDataProviderProps","PIE_CHART_PLUGINS","FocusedPieArc","pieSeriesLayout","pieSeries","focusIndicator","PieChart","marginProps","chartSeries","seriesProp","_props$paddingAngle","_props$cornerRadius","_props$startAngle","_props$endAngle","chartProps","_clickedItem","_clickedItem2","_clickedItem3","clickedItem","_seriesProp$seriesInd","MuiPieChart","selectorChartsIsVoronoiEnabled","getScatterUtilityClass","Scatter","skipInteractionHandlers","disableHover","Marker","markerProps","getInteractionItemProps","ALMOST_ZERO","BatchScatterPaths","useCreatePaths","MemoBatchScatterPaths","Group","BatchScatter","ScatterPlot","DefaultScatterItems","ScatterItems","SCATTER_CHART_PLUGINS","FocusedScatterMark","scatterSeries","ScatterChart","chartContainerProps","chartsAxisProps","gridProps","scatterPlotProps","overlayProps","legendProps","axisHighlightProps","seriesWithDefault","useVoronoiOnItemClick","useScatterChartProps","_props$disableVoronoi","_seriesConfig$data","MuiScatterChart","CrosshairTracker","_useDrawingArea","lastReportedRef","ownerSVGElement","svgPt","xVal","yVal","rawX","crosshairPosition","_unused2","crosshairClick","CompositeAxisTooltipContent","proximity","displayAxisValue","scatterSeriesIds","lineEntries","scatterEntries","_step","numericValue","_iterator","_createForOfIteratorHelper","_step2","_iterator2","maximumFractionDigits","allEntries","rowStyle","dotStyle","ExternalAxisTooltip","xAxisObj","useXAxis","xPixel","_unused3","_unused4","_s$data","_step3","_iterator3","_step4","_iterator4","tooltipLeft","chartMidpoint","showOnLeft","ForecastOverlay","forecast","_ref4$color","_ref4$opacity","pts","yUp","upper","yLo","lower","CompositeChart","_axisHighlight$x","_axisHighlight$y","syncedTooltipIndex","_props$forecastColor","forecastColor","_props$forecastOpacit","forecastOpacity","_props$enableCrosshai","enableCrosshair","lastZoomPropRef","hasScatter","hasLine","hasArea","scatterSeriesData","handleLineClick","scatterProximity","_resolvedXAxis$","minStep","tooltipTrigger","useCustomTooltip","_i4","newZoom","createSeededRng","seed","imul","nextGaussian","u1","u2","CandlestickPlot","candles","upColor","downColor","totalSlots","drawWidth","slotWidth","bodyWidth","wickWidth","yHigh","high","yLow","low","yOpen","yClose","bodyTop","bodyHeight","VolumeBars","volumeHeightPct","_useDrawingArea2","drawHeight","maxVol","volume","volZoneHeight","volZoneTop","isUp","barH","PriceLabels","labelInterval","forecastData","lowerBound","AlertMarks","alerts","alertUpColor","alertDownColor","formatterFn","alert","displayIndex","price","bgColor","labelText","pctChange","labelWidth","ShadedBackground","_ref6","_useDrawingArea3","LiveTradingChart","_grid$horizontal","_grid$vertical","_props$windowSize","windowSize","_props$forecastSize","forecastSize","_props$running","_props$intervalMs","intervalMs","_props$seed","_props$resetTrigger","resetTrigger","_props$initialPrice","initialPrice","_props$volatility","volatility","_props$drift","drift","_props$forecastVolati","forecastVolatility","_props$alertProbabili","alertProbability","_props$alertThreshold","alertThresholdPct","_props$alertLookback","alertLookback","_props$alertMinDistan","alertMinDistance","_props$maxVisibleAler","maxVisibleAlerts","alertFilter","alertFormatter","_props$candleUpColor","candleUpColor","_props$candleDownColo","candleDownColor","_props$alertUpColor","_props$alertDownColor","_props$uncertaintyOpa","uncertaintyOpacity","_props$showVolume","showVolume","_props$showLabels","showLabels","_props$volumeHeightPc","_props$showGrid","showGrid","_props$xAxisLabel","xAxisLabel","_props$yAxisLabel","yAxisLabel","alertHistory","currentPrice","tickCount","rngRef","candleBufferRef","alertBufferRef","intervalRef","lastResetRef","forecastStartIndex","displayData","setDisplayData","generateForecast","useCallback","lastClose","rng","numPoints","cumUncertainty","shock","prevClose","vol","dft","r2","r3","buf","candle","candidateIdx","candidate","alertFilterFn","alertType","lookback","rangeStart","rangeEnd","isSwingHigh","isSwingLow","lastAlertTick","windowStart","windowed","_generateForecast","visibleAlerts","_useMemo","totalLen","closeData","allValues","xAxisData","forecastStartIdx","BAR_CHART_PLUGINS","useBarChartProps","hasHorizontalSeries","defaultBandXAxis","defaultBandYAxis","processedYAxis","barPlotProps","clipPathGroupProps","clipPathProps","FocusedBar","barSeries","BarChart","BAR_CHART_PRO_PLUGINS","BarChartPro","chartDataProviderProProps","baseProps","useChartContainerProProps","_props$layout","axisClickData","usePro","handleHighlightChange","handleZoomChange","handleItemClick","barItemIdentifier","handleAxisClick","refLineChildren","ChartComponent","MuiBarChart","CandlePlot","ohlcData","labels","bodyWidthRatio","onCandleClick","xBase","bodyBottom","wickTop","wickBottom","VolumePlot","volumeData","maxHeightRatio","volumeHeight","baseY","CandleTooltip","tooltipEnabled","setHoverIndex","CandlestickChart","volumeHeightRatio","hoverData","cats","vols","volumeKey","computedYDomain","allLows","allHighs","dataMin","dataMax","handleCandleClick","ohlc","baseAxis","useMergedRefs","forkRef","createForkRef","didChange","cleanupCallbacks","cleanupCallback","getAlertUtilityClass","AlertRoot","severity","getBackgroundColor","colorSeverity","AlertIcon","AlertMessage","AlertAction","defaultIconMapping","SuccessOutlined","ReportProblemOutlined","ErrorOutline","InfoOutlined","closeText","iconMapping","closeButton","CloseButton","closeIcon","CloseIcon","IconSlot","iconSlotProps","MessageSlot","messageSlotProps","ActionSlot","actionSlotProps","CloseButtonSlot","closeButtonProps","CloseIconSlot","closeIconProps","Close","getRichTreeViewUtilityClass","createUseThemeProps","freeze","EMPTY_OBJECT","TreeViewContext","useTreeViewContext","TreeViewStyleContext","useTreeViewStyleContext","TreeViewProvider","buildPublicAPI","runItemPlugins","itemPluginProps","finalRootRef","finalContentRef","pluginPropEnhancers","pluginPropEnhancersNames","itemPluginManager","listPlugins","itemPlugin","itemPluginResponse","contentRef","propsEnhancers","propsEnhancerName","propEnhancerName","currentSlotName","currentSlotParams","enhancedProps","propsEnhancersForCurrentPlugin","propsEnhancerForCurrentPluginAndSlot","wrapItem","idAttribute","finalChildren","itemsWrapper","listWrappers","itemWrapper","useTreeViewBuildContext","styleContextValue","collapseIcon","expandIcon","getCollapseUtilityClass","CollapseRoot","collapsedSize","CollapseWrapper","CollapseWrapperInner","wrapperInner","Collapse","collapsedSizeProp","wrapperRef","autoTransitionDuration","isHorizontal","getWrapperSize","wrapperSize","duration2","incomingOwnerState","getSwitchBaseUtilityClass","SwitchBaseRoot","SwitchBaseInput","SwitchBase","checkedProp","checkedIcon","defaultChecked","disabledProp","inputProps","inputRef","onChange","setCheckedState","muiFormControl","hasLabelFor","InputSlot","inputSlotProps","newChecked","handleInputChange","getCheckboxUtilityClass","defaultSlotPropsValue","externalSlotPropsValue","typedDefaultSlotProps","CheckboxRoot","indeterminate","defaultCheckedIcon","CheckBox","defaultIcon","CheckBoxOutlineBlank","defaultIndeterminateIcon","IndeterminateCheckBox","Checkbox","iconProp","indeterminateIcon","indeterminateIconProp","externalInputProps","TREE_VIEW_ROOT_PARENT_ID","buildSiblingIndexes","siblingsIndexLookup","childId","isItemDisabled","itemMetaLookup","itemMeta","parentId","buildItemsLookups","storeParameters","depth","isItemExpandable","otherItemsMetaLookup","metaLookup","modelLookup","orderedChildrenIds","itemsChildren","processItem","getItemId","siblingsMetaLookup","checkId","getItemChildren","expandable","selectable","isItemSelectionDisabled","childrenIndexes","EMPTY_CHILDREN","itemsSelectors","domStructure","disabledItemFocusable","itemOrderedChildrenIdsLookup","itemOrderedChildrenIds","itemModel","itemModelLookup","itemChildrenIndexesLookup","itemParentId","itemDepth","canItemBeFocused","itemChildrenIndentation","expandedItemMapSelector","expandedItems","expandedItemsMap","expansionSelectors","expandedItemsRaw","flatList","appendChildren","itemsWithDescendants","triggerSlot","expansionTrigger","isItemExpanded","_itemId","selectedItemsSelector","selectedItems","selectedItemsRaw","selectedItemsMapSelector","selectedItemsMap","isItemSelectableSelector","selectionSelectors","disableSelection","isMultiSelectEnabled","multiSelect","isCheckboxSelectionEnabled","checkboxSelection","propagationRules","selectionPropagation","isItemSelected","isFeatureEnabledForItem","isItemSelectable","isSelectionEnabled","canItemBeSelected","defaultFocusableItemIdSelector","orderedRootItemIds","firstSelectedItem","firstNavigableItem","focusSelectors","defaultFocusableItemId","isItemTheDefaultFocusableItem","focusedItemId","lazyLoadingSelectors","isEmpty","lazyLoadedItems","errors","isItemLoading","itemHasError","itemError","labelSelectors","isItemEditable","isItemBeingEdited","editedItemId","isAnyItemBeingEdited","itemHasChildren","reactChildren","TreeViewItemDepthContext","getLastNavigableItemInArray","getPreviousNavigableItem","previousNavigableSiblingIndex","currentItemId","lastNavigableChild","getNextNavigableItem","firstNavigableChild","currentItemIndex","nextItemIndex","getLastNavigableItem","getFirstNavigableItem","findOrderInTremauxTree","itemAId","itemBId","itemMetaA","itemMetaB","aFamily","bFamily","aAncestor","bAncestor","aAncestorIsCommon","bAncestorIsCommon","continueA","continueB","commonAncestor","ancestorFamily","aSide","bSide","isTargetInDescendants","itemRoot","treeIdSelector","providedTreeId","treeId","idSelectors","treeItemIdAttribute","providedIdAttribute","depthSelector","depthContext","getTreeItemUtilityClass","TreeViewExpandIcon","TreeViewCollapseIcon","pickIcon","treeItemIcon","treeViewIcon","TreeItemIcon","slotsFromTreeItem","slotPropsFromTreeItem","slotsFromTreeView","slotPropsFromTreeView","iconName","Icon","iconProps","tempOwnerState","TreeItemDragAndDropOverlayRoot","darkChannel","TreeItemDragAndDropOverlay","TreeItemProvider","TreeItemLabelInput","TreeItemRoot","TreeItemContent","TreeItemLabel","editable","TreeItemIconContainer","TreeItemGroupTransition","groupTransition","TreeItemErrorContainer","TreeItemLoadingContainer","TreeItemCheckbox","visible","TreeItem","getContextProviderProps","getRootProps","getContentProps","getIconContainerProps","getCheckboxProps","getLabelProps","getGroupTransitionProps","getLabelInputProps","getDragAndDropOverlayProps","getErrorContainerProps","getLoadingContainerProps","pluginRootRef","interactions","isLoading","hasError","isExpandable","isExpanded","isSelected","isDisabled","isEditing","isEditable","editing","toggleItemEditing","labelEditing","setEditedItem","handleExpansion","focusItem","multiple","expansion","setItemExpansion","handleSelection","selection","expandSelectionRange","setItemSelection","keepExistingSelection","shouldBeSelected","handleCheckboxSelection","hasShift","handleSaveItemLabel","newLabel","updateItemLabel","handleCancelItemLabelEditing","useTreeItemUtils","rootRefObject","contentRefObject","handleRootRef","handleContentRef","checkboxRef","shouldBeAccessibleWithTab","sharedPropsEnhancerParams","createRootHandleBlur","otherHandlers","defaultMuiPrevented","getItemDOMElement","removeFocusedItem","createRootHandleKeyDown","handleItemKeyDown","createContentHandleMouseDown","externalProps","externalEventHandlers","enhancedRootProps","enhancedContentProps","enhancedCheckboxProps","checkbox","onDoubleClick","enhancedLabelProps","enhancedLabelInputProps","labelInput","enhancedDragAndDropOverlayProps","dragAndDropOverlay","useTreeItem","classesFromTreeView","iconContainer","errorIcon","loadingIcon","itemContent","itemIconContainer","itemCheckbox","itemLabel","itemGroupTransition","itemLabelInput","itemDragAndDropOverlay","itemErrorIcon","itemLoadingIcon","Content","contentProps","IconContainer","iconContainerProps","labelProps","checkboxProps","GroupTransition","groupTransitionProps","LabelInput","labelInputProps","DragAndDropOverlay","dragAndDropOverlayProps","ErrorIcon","errorContainerProps","LoadingIcon","loadingContainerProps","RichTreeViewItemsContext","selectorNoChildren","selectorChildrenIdsNull","WrappedTreeItem","itemSlot","itemSlotProps","skipChildren","renderItemForRichTreeView","Item","itemProps","RichTreeViewItems","renderItem","useTreeViewRootProps","forwardedProps","handleRootFocus","handleRootBlur","useIsoLayoutEffect","useTreeViewStore","StoreClass","updateStateFromParameters","useLabelEditingItemPlugin","labelInputValue","setLabelInputValue","TreeViewLabelEditingPlugin","register","onItemLabelChange","EventManager","maxListeners","warnOnce","events","on","highPriority","regular","isFirst","removeListener","removeAllListeners","emit","highPriorityListeners","regularListeners","once","oneTimeListener","getExpansionTrigger","TreeViewItemsPlugin","static","newParameters","previousParameters","typedKey","processSiblings","parentIdWithDefault","getItem","getItemTree","getItemFromItemId","itemToMutate","newChildren","getItemOrderedChildrenIds","getParentId","setIsItemDisabled","shouldBeDisabled","getElementById","setItemChildren","getChildrenCount","parentDepth","removeChildren","newMetaMap","newItemOrderedChildrenIdsLookup","newItemChildrenIndexesLookup","deriveStateFromParameters","applyModelInitialValue","controlledValue","globalTreeViewDefaultId","TimeoutManager","timeoutIds","intervalIds","startTimeout","startInterval","clearAll","TreeViewKeyboardNavigationPlugin","typeaheadQuery","labelMap","createLabelMapFromItemMetaLookup","registerStoreEffect","shouldIgnoreItemsStateUpdate","canToggleItemSelection","canToggleItemExpansion","getFirstItemMatchingTypeaheadQuery","newKey","getNextItem","itemIdToCheck","nextItemId","getNextMatchingItemId","matchingItemId","checkedItems","cleanNewKey","concatenatedQuery","concatenatedQueryMatchingItemId","newKeyMatchingItemId","updateLabelMap","ctrlPressed","selectItemFromArrowNavigation","selectRangeFromStartToItem","selectRangeFromItemToEnd","expandAllSiblings","keyCode","selectAllNavigableItems","isPrintableKey","timeoutManager","matchingItem","TreeViewFocusPlugin","checkItemInNewTree","itemToFocusId","setFocusedItemId","applyItemFocus","itemElement","selectorCheckboxSelectionStatus","hasSelectedDescendant","hasUnSelectedDescendant","traverseDescendants","itemToTraverseId","parents","useSelectionItemPlugin","selectionStatus","ariaChecked","TreeViewSelectionPlugin","lastSelectedItem","lastSelectedRange","setSelectedItems","newModel","additionalItemsToPropagate","onItemSelectionToggle","onSelectedItemsChange","oldModel","cleanModel","descendants","shouldRegenerateModel","newModelLookup","getLookupFromArray","getAddedAndRemovedItems","added","removed","addedItemId","selectDescendants","checkAllDescendantsSelected","selectParents","removedItemId","deSelectDescendants","propagateSelection","selectRange","newSelectedItems","selectedItemsLookup","first","getNonDisabledItemsInRange","itemsToAddToModel","newSelected","oldSelected","isSelectedBefore","navigableItems","getAllNavigableItems","newModelMap","lookup","TreeViewExpansionPlugin","setExpandedItems","onExpandedItemsChange","shouldBeExpanded","isExpandedBefore","cleanShouldBeExpanded","eventParameters","isExpansionPrevented","publishEvent","applyItemExpansion","oldExpanded","newExpanded","onItemExpansionToggle","newlyExpandedItemId","addExpandableItems","newItemMetaLookup","TreeViewItemPluginManager","itemPlugins","itemWrappers","MinimalTreeViewStore","initialParameters","eventManager","instanceName","minimalInitialState","buildItemsStateIfNeeded","defaultExpandedItems","defaultSelectedItems","createMinimalInitialState","updateModel","mutableNewState","controlledProp","newMinimalState","shouldRebuildItemsState","previousValue","isPropagationStopped","isSyntheticEvent","subscribeEvent","parametersToStateMapper","ExtendableRichTreeViewStore","RichTreeViewStore","RichTreeViewRoot","RichTreeView","useExtractRichTreeViewParameters","ICON_MAP","ExpandMore","ExpandMoreIcon","ChevronRight","ChevronRightIcon","Folder","FolderIcon","FolderOpen","FolderOpenIcon","InsertDriveFile","InsertDriveFileIcon","Remove","RemoveIcon","Add","AddIcon","ArrowDropDown","ArrowDropDownIcon","ArrowRight","ArrowRightIcon","AccountTree","AccountTreeIcon","Description","DescriptionIcon","Code","CodeIcon","Image","ImageIcon","Settings","SettingsIcon","Home","HomeIcon","Star","StarIcon","Delete","DeleteIcon","Edit","EditIcon","Visibility","VisibilityIcon","Lock","LockIcon","ShowChart","ShowChartIcon","BarChartIcon","PieChartIcon","ScatterPlotIcon","GridOn","GridOnIcon","Timeline","TimelineIcon","CandlestickChartIcon","Speed","SpeedIcon","Layers","LayersIcon","TrendingUp","TrendingUpIcon","History","HistoryIcon","PlayArrow","PlayArrowIcon","Tune","TuneIcon","Brush","BrushIcon","Highlight","HighlightIcon","Sync","SyncIcon","ZoomIn","TouchApp","TouchAppIcon","TableChart","TableChartIcon","StackedBarChart","StackedBarChartIcon","Palette","PaletteIcon","Rule","RuleIcon","Mouse","MouseIcon","CheckBoxIcon","UnfoldMore","UnfoldMoreIcon","Block","BlockIcon","Diamond","DiamondIcon","AutoGraph","AutoGraphIcon","ViewList","ViewListIcon","GpsFixed","GpsFixedIcon","ContentCopy","ContentCopyIcon","PersonAdd","PersonAddIcon","CheckCircle","CheckCircleIcon","Archive","ArchiveIcon","MoreVert","MoreVertIcon","resolveIcon","TreeView","getItemIdProp","getItemLabelProp","getItemChildrenProp","editableItems","disabledItems","ariaLabel","ariaLabelledBy","isItemDisabledFn","disabledSet","isItemEditableFn","editableSet","handleSelectedItemsChange","itemIds","handleExpandedItemsChange","event_timestamp","handleItemFocus","handleItemLabelChange","editedItemLabel","containerStyle","getSimpleTreeViewUtilityClass","TreeViewChildrenItemContext","TreeViewChildrenItemProvider","childrenIdAttrToIdRef","previousChildrenIds","escapedIdAttr","childrenElements","childrenIds","jsxItems","setJSXItemsOrderedChildrenIds","registerChild","childIdAttribute","childItemId","unregisterChild","useJSXItemsItemPlugin","parentContext","pluginContentRef","isMountedRef","ownerTokenRef","upsertJSXItem","mapLabelFromJSX","jsxItemsitemWrapper","TreeViewJSXItemsPlugin","itemOwners","ownerToken","currentOwner","existingMeta","hasChanges","newItemModelLookup","newMap","SimpleTreeViewStore","SimpleTreeViewRoot","useExtractSimpleTreeViewParameters","renderItems","IconComponent","SimpleTreeView","_ref$items","_ref$multiSelect","_ref$checkboxSelectio","_ref$disableSelection","_ref$expansionTrigger","_ref$disabledItemsFoc","_ref$itemChildrenInde","MuiSimpleTreeView","getRichTreeViewProUtilityClass","DataSourceCacheDefault","ttl","expiry","RequestStatus","NestedDataManager","pendingRequests","queuedRequests","settledRequests","lazyLoadingPlugin","maxConcurrentRequests","MAX_CONCURRENT_REQUESTS","processQueue","loopLength","fetchQueue","fetchPromises","fetchItemChildren","loadingIds","setRequestSettled","clearPendingRequest","getRequestStatus","PENDING","QUEUED","SETTLED","UNKNOWN","getActiveRequestsCount","TREE_VIEW_LAZY_LOADED_ITEMS_INITIAL_STATE","TreeViewLazyLoadingPlugin","nestedDataManager","dataSourceCache","dataSource","handleBeforeItemToggleExpansion","newlyExpandableItems","getExpandableItemsFromDataSource","fetchChildrenIfExpanded","parentIds","itemsToLazyLoad","fetchItems","fetchAllExpandedItems","setItemLoading","itemIdWithDefault","setItemError","updateItemChildren","forceRefresh","getTreeItems","cachedData","response","childrenFetchError","itemsReorderingSelectors","currentReorder","draggedItemProperties","targetItemId","targetDepth","newPosition","isDragging","draggedItemId","canItemBeReordered","isItemReorderable","isAncestor","itemIdA","itemIdB","useTreeViewItemsReorderingItemPlugin","validActionsRef","draggable","onDragStart","dataTransfer","effectAllowed","setDragImage","setData","itemsReordering","startDraggingItem","onDragOver","onDragEnd","dropEffect","completeDraggingItem","cancelDraggingItem","onDragEnter","getDroppingTargetValidActions","setDragTargetItem","validActions","targetHeight","cursorY","cursorX","contentElement","TreeViewItemsReorderingPlugin","canMoveItemToNewPosition","targetItemMeta","targetItemIndex","draggedItemMeta","draggedItemIndex","isTargetLastSibling","oldPosition","positionsAfterAction","positionAfterAction","checkIfPositionIsValid","itemToMoveId","itemToMoveMeta","oldParentId","newParentId","updatedChildren","updatedOldParentChildren","updatedNewParentChildren","itemChildrenIndexes","updateExpandable","itemToMoveDepth","updateItemDepth","moveItemInTree","onItemPositionChange","prevItemReorder","itemChildrenIndentationPx","pixelExec","tempElement","parseItemChildrenIndentation","chooseActionToApply","DEFAULT_IS_ITEM_REORDERABLE_WHEN_ENABLED","DEFAULT_IS_ITEM_REORDERABLE_WHEN_DISABLED","rawMapper","RichTreeViewProStore","lazyLoading","RichTreeViewProRoot","RichTreeViewPro","useExtractRichTreeViewProParameters","localTheme","outerTheme","mergeOuterLocalTheme","globalStyles","wrapGlobalLayer","upperTheme","resolvedTheme","styleArg","EMPTY_THEME","useThemeScoping","isPrivate","mergedTheme","upperPrivateTheme","engineTheme","privateTheme","rtlValue","layerOrder","styleElement","useLayerOrder","ThemeProviderNoVars","scopedTheme","DEFAULT_MODE_STORAGE_KEY","DEFAULT_COLOR_SCHEME_STORAGE_KEY","DEFAULT_ATTRIBUTE","storageWindow","localStorage","setItem","getSystemMode","processState","systemMode","defaultConfig","CssVarsProvider","InternalCssVarsProvider","useColorScheme","getInitColorSchemeScript","deprecatedGetInitColorSchemeScript","modeStorageKey","defaultModeStorageKey","colorSchemeStorageKey","defaultColorSchemeStorageKey","disableTransitionOnChange","designSystemTransitionOnChange","resolveTheme","defaultContext","allColorSchemes","darkColorScheme","lightColorScheme","setColorScheme","setMode","ColorSchemeContext","defaultColorSchemes","defaultComponents","defaultLightColorScheme","defaultDarkColorScheme","themeProp","storageManager","documentNode","colorSchemeNode","disableNestedContext","disableStyleSheetGeneration","defaultMode","initialMode","hasMounted","ctx","initialTheme","restThemeProp","joinedColorSchemes","stateMode","stateColorScheme","supportedColorSchemes","isMultiSchemes","modeStorage","lightStorage","darkStorage","isClient","setIsClient","getColorScheme","currentState","newMode","newLightColorScheme","newDarkColorScheme","handleMediaQuery","mediaListener","media","addListener","unsubscribeMode","unsubscribeLight","unsubscribeDark","useCurrentColorScheme","memoTheme","calculatedColorScheme","schemeKey","classList","shouldGenerateStyleSheet","initialAttribute","setter","suppressHydrationWarning","dangerouslySetInnerHTML","__html","InitColorSchemeScript","createCssVarsProvider","newTheme","noVarsTheme","clip","getNewValue","asc","findClosest","trackFinger","touchId","changedTouches","valueToPercent","setValueIndex","focusThumb","sliderRef","activeIndex","setActive","areValuesEqual","oldValue","array1","array2","itemComparer","axisProps","leap","Identity","cachedSupportsTouchActionNone","doesSupportTouchActionNone","CSS","supports","useSlider","ariaLabelledby","disableSwap","marksProp","onChangeCommitted","shiftStep","valueProp","setOpen","dragging","setDragging","moveCount","lastChangedValue","valueDerived","setValueState","handleChange","thumbIndex","clonedEvent","writable","marksValues","focusedThumbIndex","setFocusedThumbIndex","createHandleHiddenInputFocus","createHandleHiddenInputBlur","changeValue","valueInput","marksIndex","maxMarksValue","createHandleHiddenInputKeyDown","stepSize","currentMarkIndex","incrementKeys","getFingerNewValue","finger","percentToValue","nearest","num","parts","matissaDecimalPart","decimalPart","getDecimalPrecision","roundValueToStep","stopListening","trackOffset","trackLeap","createHandleMouseLeave","cssWritingMode","getHiddenInputProps","externalHandlers","ownEventHandlers","mergedEventHandlers","writingMode","getThumbProps","getThumbStyle","getSliderUtilityClass","SliderRoot","marked","trackInverted","trackFalse","SliderRail","rail","SliderTrack","SliderThumb","valueLabelOpen","valueLabelCircle","valueLabelLabel","useValueLabelClasses","valueLabel","SliderMark","markActive","SliderMarkLabel","markLabel","markLabelActive","Forward","ariaValuetext","getAriaLabel","getAriaValueText","valueLabelDisplay","valueLabelFormat","RailSlot","Rail","TrackSlot","Track","ThumbSlot","Thumb","ValueLabelSlot","ValueLabel","MarkSlot","MarkLabelSlot","MarkLabel","Input","railSlotProps","trackSlotProps","thumbSlotProps","valueLabelSlotProps","markSlotProps","markLabelSlotProps","Slot","railProps","trackProps","thumbProps","valueLabelProps","markProps","markLabelProps","inputSliderProps","ValueLabelComponent","Fade","defaultTimeout","webkitTransition","getBackdropUtilityClass","BackdropRoot","invisible","Backdrop","createChainedFunction","funcs","ariaHidden","hide","getPaddingRight","ariaHiddenSiblings","mountElement","currentElement","elementsToExclude","isNotExcludedElement","isNotForbiddenElement","isForbiddenTagName","isInputHidden","isAriaHiddenForbiddenOnElement","findIndexOf","manager","modals","containers","modalIndex","modalRef","hiddenSiblings","getHiddenSiblings","containerIndex","restore","containerInfo","restoreStyle","disableScrollLock","isOverflowing","scrollContainer","DocumentFragment","parentElement","containerWindow","removeProperty","handleContainer","ariaHiddenState","nextTop","isTopModal","getModalUtilityClass","ModalRoot","ModalBackdrop","backdrop","Modal","BackdropComponent","BackdropProps","closeAfterTransition","disableEscapeKeyDown","hideBackdrop","onBackdropClick","onTransitionEnter","onTransitionExited","propsWithDefaults","getBackdropProps","portalRef","hasTransition","mountNodeRef","getHasTransition","ariaHiddenProp","getModal","handleMounted","resolvedContainer","handlePortalRef","createHandleKeyDown","which","createHandleBackdropClick","propsEventHandlers","BackdropSlot","backdropProps","getPopoverUtilityClass","getOffsetTop","getOffsetLeft","getTransformOriginValue","PopoverRoot","PopoverPaper","Popover","anchorOrigin","anchorPosition","anchorReference","marginThreshold","PaperProps","PaperPropsProp","transitionDurationProp","paperRef","getAnchorOffset","anchorRect","getTransformOrigin","elemRect","getPositioningStyle","elemTransformOrigin","anchorOffset","heightThreshold","widthThreshold","isPositioned","setIsPositioned","setPositioningStyles","positioning","updatePosition","handleResize","rootSlotsProp","rootSlotPropsProp","PaperSlot","paperProps","getMenuUtilityClass","RTL_ORIGIN","LTR_ORIGIN","MenuRoot","MenuPaper","WebkitOverflowScrolling","MenuMenuList","disableAutoFocusItem","MenuListProps","PopoverClasses","menuListActionsRef","paperSlotProps","ListSlot","listSlotProps","readMantineScheme","lightTheme","createTheme","darkTheme","MANTINE_NAME_RE","ItemControlsContext","ItemLabelWithControls","_ctx$sliderValues","menuAnchor","setMenuAnchor","externalValue","sliderValues","initial","localValue","setLocalValue","isDraggingRef","controlsItemSet","sliderMin","sliderMax","sliderStep","sliderColor","onSliderChange","kebabMenuItems","onKebabAction","stopReact","blockNativeDrag","Menu","IconComp","ListItemIcon","ListItemText","EditableLabelInput","innerRef","restoreRef","setRefs","stopOnly","CustomTreeItem","TreeViewPro","setScheme","_ref2$items","itemsProp","_ref2$licenseKey","_ref2$getItemId","_ref2$getItemLabel","_ref2$getItemChildren","_ref2$multiSelect","_ref2$checkboxSelecti","_ref2$disableSelectio","_ref2$expansionTrigge","_ref2$isItemEditable","_ref2$disabledItemsFo","_ref2$itemChildrenInd","_ref2$itemsReordering","reorderableItems","_ref2$lazyLoading","lazyLoadedChildren","_ref2$showItemControl","showItemControls","controlsItems","_ref2$sliderMin","_ref2$sliderMax","_ref2$sliderStep","sync","obs","MutationObserver","attributeFilter","disconnect","mergeChildren","nodeList","nodeId","loadedKids","existingChildren","mergedChildren","_defineProperty","isItemReorderableFn","sliderValuesRef","handleSliderChange","committed","sliderChange","handleKebabAction","kebabAction","resolvedSliderColor","resolveSliderColor","controlsContextValue","findItem","targetId","found","lazyLoadRequest","orderedRef","handleItemPositionChange","updated","idField","childrenField","idK","childK","moved","removeFrom","kids","insertTo","applyReorder","itemPositionChanged","orderedItems","ThemeProvider","PickerAdapterContext","otherInProps","adapter","parentAdapter","utils","dateAdapter","DateAdapter","dateFormats","dateLibInstance","adapterLocale","isMUIAdapter","defaultDates","minDate","maxDate","localizedFormat","weekOfYear","advancedFormat","formatTokenMap","sectionType","contentType","dd","ddd","dddd","defaultFormats","monthShort","dayOfMonth","dayOfMonthFull","weekday","weekdayShort","hours24h","hours12h","fullDate","keyboardDate","shortDate","normalDate","normalDateWithWeekday","fullTime12h","fullTime24h","keyboardDateTime12h","keyboardDateTime24h","MISSING_UTC_PLUGIN","MISSING_TIMEZONE_PLUGIN","AdapterDayjs","isTimezoneCompatible","lib","escapedCharacters","setLocaleToValue","expectedLocale","getCurrentLocaleCode","hasUTCPlugin","hasTimezonePlugin","comparing","comparisonTemplate","comparingInValueTimezone","setTimezone","getTimezone","cleanTimezone","timezone","guess","createSystemDate","createUTCDate","createTZDate","keepLocalTime","tz","getLocaleFormats","locales","localeObject","adjustOffset","fixedValue","getInvalidDate","$timezone","isUTC","local","toJsDate","is12HourCycleInCurrentLocale","expandFormat","localeFormats","formatKey","formatByString","formatString","formatNumber","numberToFormat","isSameYear","isSameMonth","isSameDay","isSameHour","isAfterYear","isAfterDay","isBeforeYear","isBeforeDay","isWithinRange","startOfYear","startOfMonth","startOfWeek","startOfDay","endOfYear","endOfMonth","endOfWeek","endOfDay","addYears","amount","addMonths","addWeeks","addDays","addHours","addMinutes","addSeconds","getYear","setYear","setMinutes","setSeconds","setMilliseconds","getDaysInMonth","getWeekArray","nestedWeeks","weekNumber","getWeekNumber","getDayOfWeek","getYearRange","startDate","endDate","enUSPickers","previousMonth","nextMonth","openPreviousView","openNextView","calendarViewSwitchingButtonAriaLabel","view","endTime","cancelButtonLabel","clearButtonLabel","okButtonLabel","todayButtonLabel","nextStepButtonLabel","datePickerToolbarTitle","dateTimePickerToolbarTitle","timePickerToolbarTitle","dateRangePickerToolbarTitle","timeRangePickerToolbarTitle","clockLabelText","formattedTime","hoursClockNumberText","minutesClockNumberText","secondsClockNumberText","selectViewText","calendarWeekNumberHeaderLabel","calendarWeekNumberHeaderText","calendarWeekNumberAriaLabelText","calendarWeekNumberText","openDatePickerDialogue","formattedDate","openTimePickerDialogue","openRangePickerDialogue","formattedRange","fieldClearLabel","timeTableLabel","dateTableLabel","fieldYearPlaceholder","digitAmount","fieldMonthPlaceholder","fieldDayPlaceholder","fieldWeekDayPlaceholder","fieldHoursPlaceholder","fieldMinutesPlaceholder","fieldSecondsPlaceholder","fieldMeridiemPlaceholder","weekDay","empty","usePickerTranslations","ArrowLeftIcon","getPickersArrowSwitcherUtilityClass","PickerPrivateContext","isPickerDisabled","isPickerReadOnly","isPickerValueEmpty","isPickerOpen","pickerVariant","pickerOrientation","labelId","dismissViews","hasUIView","getCurrentViewMode","triggerElement","viewContainerRole","defaultActionBarActions","onPopperExited","usePickerPrivateContext","_excluded3","PickersArrowSwitcherRoot","PickersArrowSwitcherSpacer","PickersArrowSwitcherButton","isButtonHidden","PickersArrowSwitcher","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","spacer","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon","isHidden","goTo","previousProps","PreviousIconButton","previousIconButtonProps","NextIconButton","nextIconButtonProps","LeftArrowIcon","leftArrowIconProps","RightArrowIcon","rightArrowIconProps","convertValueToMeridiem","ampm","getSecondsInDay","createIsAfterIgnoreDatePart","disableIgnoringDatePartForTimeValidation","dateLeft","dateRight","DEFAULT_STEP_NAVIGATION","hasNextStep","hasSeveralSteps","goToNextStep","areViewsInSameStep","PickerViewRoot","getTimeClockUtilityClass","clockCenter","CLOCK_WIDTH","getAngleValue","deg","getClockPointerUtilityClass","ClockPointerRoot","isClockPointerAnimated","ClockPointerThumb","isClockPointerBetweenTwoValues","ClockPointer","isBetweenTwoClockValues","isInner","viewValue","previousType","pickerOwnerState","getAngleStyle","getClockUtilityClass","mergeDateAndTime","dateParam","timeParam","mergedDate","getTodayDate","valueType","formatMeridiem","ClockRoot","ClockClock","ClockWrapper","ClockSquareMask","isClockDisabled","ClockPin","meridiemButtonCommonStyles","clockMeridiemMode","ClockAmButton","ClockPmButton","ClockMeridiemText","Clock","ampmInClock","handleMeridiemChange","isTimeDisabled","meridiemMode","minutesStep","selectedId","viewRange","minViewValue","maxViewValue","translations","isMoving","squareMask","pin","amButton","pmButton","meridiemText","isSelectedTimeDisabled","isPointerInner","handleValueChange","isFinish","newSelectedValue","angleStep","handleTouchSelection","isPointerBetweenTwoClockValues","keyboardControlStep","listboxRef","clampValue","circleValue","getClockNumberUtilityClass","clockNumberClasses","ClockNumberRoot","isClockNumberInInnerRing","ClockNumber","isClockNumberSelected","isClockNumberDisabled","getHourNumbers","getClockNumberText","currentHours","hourNumbers","endHour","getMinutesNumbers","numberValue","SECTION_TYPE_GRANULARITY","roundDate","roundedDate","singleItemValueManager","emptyValue","getTodayValue","getInitialReferenceValue","referenceDate","inGetTodayDate","minTime","maxTime","getDefaultReferenceDate","cleanValue","isSameError","defaultErrorState","TimeClockRoot","TimeClockArrowSwitcher","TIME_CLOCK_DEFAULT_VIEWS","referenceDateProp","disableFuture","disablePast","shouldDisableTime","showViewSwitcher","inView","views","openTo","onViewChange","focusedView","onFocusedViewChange","timezoneProp","onChangeProp","valueManager","valueWithInputTimezone","inputTimezone","setInputTimezone","timezoneToRender","otherParams","newValueWithInputTimezone","useControlledValue","valueOrReferenceDate","useClockReferenceDate","useNow","setView","previousView","nextView","setValueAndGoToNextView","inFocusedView","getStepNavigation","previousOpenTo","previousViews","defaultFocusedView","setFocusedView","stepNavigation","viewIndex","handleFocusedViewChange","viewToFocus","prevFocusedView","handleChangeView","newView","goToNextView","currentViewSelectionState","selectedView","isSelectionFinishedOnCurrentView","hasMoreViews","currentView","viewToNavigateTo","useViews","selectionState","cleanDate","getMeridiem","timeWithMeridiem","newHoursAmount","convertToMeridiem","useMeridiemMode","rawValue","viewType","shouldCheckPastEnd","containsValidTime","isValidValue","timeValue","valueWithMeridiem","dateWithNewHours","dateWithNewMinutes","dateWithNewSeconds","viewProps","handleHoursChange","hourValue","minutesValue","handleMinutesChange","minuteValue","secondsValue","handleSecondsChange","secondValue","arrowSwitcher","TIME_ONLY_RE","parseToDayjs","withTime","dayjs","TimeClock","dValue","dDefault","dMinTime","dMaxTime","newVal","timeData","formatted","handleViewChange","clockProps","LocalizationProvider","MuiTimeClock"],"ignoreList":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"dash_mui_charts.min.js","mappings":";UACIA,EADAC,ECAAC,EACAC,E,UCDgEC,EAAOC,QAA2J,WAAY,aAAa,IAAIC,EAAE,CAACC,IAAI,YAAYC,GAAG,SAASC,EAAE,aAAaC,GAAG,eAAeC,IAAI,sBAAsBC,KAAK,6BAA6BC,EAAE,gGAAgGC,EAAE,KAAKC,EAAE,OAAOC,EAAE,QAAQC,EAAE,qBAAqBC,EAAE,CAAC,EAAEC,EAAE,SAASb,GAAG,OAAOA,GAAGA,IAAIA,EAAE,GAAG,KAAK,IAAI,EAAMc,EAAE,SAASd,GAAG,OAAO,SAASO,GAAGQ,KAAKf,IAAIO,CAAC,CAAC,EAAES,EAAE,CAAC,s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w6D,IAAAA,KAGV5vD,UAAW4vD,IAAAA,KAIX4vE,YAAa5vE,IAAAA,OAGb2yE,QAAS3yE,IAAAA,OAGT4yE,QAAS5yE,IAAAA,OAGTqzE,cAAerzE,IAAAA,KAGfszE,YAAatzE,IAAAA,KAMb0sE,yCAA0C1sE,IAAAA,KAG1CwzE,iBAAkBxzE,IAAAA,KAIlB33F,UAAW23F,IAAAA,OAGXv/F,GAAIu/F,IAAAA,OAOJ04E,SAAU14E,IAAAA,MAAgB,CACtBjgL,MAAOigL,IAAAA,OACPn/K,QAASm/K,IAAAA,OACTl/K,QAASk/K,IAAAA,OACT24E,UAAW34E,IAAAA,OACX49C,gBAAiB59C,IAAAA,SAIrBvD,SAAUuD,IAAAA,MAGd,W","sources":["webpack:///webpack/runtime/create fake namespace object","webpack:///webpack/runtime/load script","webpack:///./node_modules/dayjs/plugin/customParseFormat.js","webpack:///./node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack:///external window \"React\"","webpack:///./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js","webpack:///./node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js","webpack:///./node_modules/hoist-non-react-statics/node_modules/react-is/index.js","webpack:///./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack:///./node_modules/dayjs/dayjs.min.js","webpack:///./node_modules/react-is/cjs/react-is.production.js","webpack:///./node_modules/react/jsx-runtime.js","webpack:///./node_modules/dayjs/plugin/localizedFormat.js","webpack:///./node_modules/dayjs/plugin/advancedFormat.js","webpack:///./node_modules/dayjs/plugin/isBetween.js","webpack:///./node_modules/dayjs/plugin/weekOfYear.js","webpack:///./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","webpack:///./node_modules/use-sync-external-store/shim/with-selector.js","webpack:///./node_modules/bezier-easing/src/index.js","webpack:///./node_modules/use-sync-external-store/shim/index.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/ensure chunk","webpack:///webpack/runtime/get javascript chunk filename","webpack:///webpack/runtime/global","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///webpack/runtime/node module decorator","webpack:///webpack/runtime/publicPath","webpack:///webpack/runtime/compat","webpack:///webpack/runtime/jsonp chunk loading","webpack:///external window \"PropTypes\"","webpack:///./node_modules/@mui/utils/esm/ponyfillGlobal/ponyfillGlobal.js","webpack:///./node_modules/@mui/x-license/utils/licenseInfo.js","webpack:///./node_modules/@babel/runtime/helpers/esm/extends.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-internals/esm/fastObjectShallowCompare/fastObjectShallowCompare.js","webpack:///./node_modules/@mui/x-telemetry/esm/index.js","webpack:///./node_modules/@mui/x-telemetry/esm/runtime/events.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-license/esm/encoding/base64.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-license/esm/encoding/md5.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-license/esm/utils/licenseStatus.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-license/esm/utils/plan.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-license/esm/utils/licenseModel.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-license/esm/verifyLicense/verifyLicense.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-license/esm/utils/licenseInfo.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-license/esm/utils/licenseErrorMessageUtils.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-license/esm/Unstable_LicenseInfoProvider/MuiLicenseInfoContext.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-license/esm/useLicenseVerifier/useLicenseVerifier.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-license/esm/Watermark/Watermark.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-internals/esm/fastMemo/fastMemo.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/useId/useId.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/x-internals/esm/reactMajor/index.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/x-internals/esm/store/useStore.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/x-internals/esm/store/Store.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/x-internals/esm/useEffectAfterFirstRender/useEffectAfterFirstRender.js","webpack:///./node_modules/@mui/x-charts/esm/constants/index.js","webpack:///./node_modules/reselect/dist/reselect.mjs","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/x-internals/esm/store/createSelector.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/internals/defaultizeMargin.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/ownerWindow/ownerWindow.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/ownerDocument/ownerDocument.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/corePlugins/useChartId/useChartId.utils.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/corePlugins/useChartId/useChartId.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js","webpack:///./node_modules/@mui/x-charts/esm/colorPalettes/categorical/rainbowSurge.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/corePlugins/useChartSeries/processSeries.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/corePlugins/useChartSeries/serializeIdentifier.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/ActiveGesturesRegistry.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/KeyboardManager.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/PointerManager.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/GestureManager.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/utils/eventList.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/Gesture.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/PointerGesture.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/utils/calculateCentroid.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/utils/getDirection.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/utils/createEventName.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/gestures/PanGesture.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/utils/isDirectionAllowed.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/gestures/MoveGesture.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/gestures/TapGesture.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/gestures/PressGesture.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/utils/getDistance.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/utils/calculateAverageDistance.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/gestures/PinchGesture.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/utils/getPinchDirection.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/gestures/TurnWheelGesture.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/utils/preventDefault.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/gestures/TapAndDragGesture.js","webpack:///./node_modules/@mui/x-internal-gestures/esm/core/gestures/PressAndDragGesture.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/corePlugins/corePlugins.js","webpack:///./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack:///./node_modules/@mui/x-charts/esm/internals/store/extractPluginParamsFromProps.js","webpack:///./node_modules/@mui/x-charts/esm/internals/store/useCharts.js","webpack:///./node_modules/@mui/x-charts/esm/context/ChartProvider/ChartContext.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/useLazyRef/useLazyRef.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/useOnMount/useOnMount.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/x-internals/esm/store/useStoreEffect.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/x-internals/esm/useAssertModelConsistency/useAssertModelConsistency.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/internals/constants.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js","webpack:///./node_modules/@mui/x-charts/esm/internals/defaultValueFormatters.js","webpack:///./node_modules/@mui/x-charts/esm/models/axis.js","webpack:///./node_modules/d3-array/src/ascending.js","webpack:///./node_modules/d3-array/src/descending.js","webpack:///./node_modules/d3-array/src/bisector.js","webpack:///./node_modules/d3-array/src/bisect.js","webpack:///./node_modules/d3-array/src/number.js","webpack:///./node_modules/d3-scale/src/init.js","webpack:///./node_modules/d3-scale/src/threshold.js","webpack:///./node_modules/d3-color/src/define.js","webpack:///./node_modules/d3-color/src/color.js","webpack:///./node_modules/d3-interpolate/src/basis.js","webpack:///./node_modules/d3-interpolate/src/constant.js","webpack:///./node_modules/d3-interpolate/src/color.js","webpack:///./node_modules/d3-interpolate/src/rgb.js","webpack:///./node_modules/d3-interpolate/src/array.js","webpack:///./node_modules/d3-interpolate/src/date.js","webpack:///./node_modules/d3-interpolate/src/number.js","webpack:///./node_modules/d3-interpolate/src/object.js","webpack:///./node_modules/d3-interpolate/src/basisClosed.js","webpack:///./node_modules/d3-interpolate/src/string.js","webpack:///./node_modules/d3-interpolate/src/numberArray.js","webpack:///./node_modules/d3-interpolate/src/value.js","webpack:///./node_modules/d3-interpolate/src/round.js","webpack:///./node_modules/d3-scale/src/number.js","webpack:///./node_modules/d3-scale/src/continuous.js","webpack:///./node_modules/d3-scale/src/constant.js","webpack:///./node_modules/d3-array/src/ticks.js","webpack:///./node_modules/d3-format/src/formatSpecifier.js","webpack:///./node_modules/d3-format/src/formatPrefixAuto.js","webpack:///./node_modules/d3-format/src/formatDecimal.js","webpack:///./node_modules/d3-format/src/exponent.js","webpack:///./node_modules/d3-format/src/formatRounded.js","webpack:///./node_modules/d3-format/src/formatTypes.js","webpack:///./node_modules/d3-format/src/identity.js","webpack:///./node_modules/d3-format/src/locale.js","webpack:///./node_modules/d3-format/src/defaultLocale.js","webpack:///./node_modules/d3-scale/src/linear.js","webpack:///./node_modules/d3-scale/src/tickFormat.js","webpack:///./node_modules/d3-format/src/precisionPrefix.js","webpack:///./node_modules/d3-format/src/precisionRound.js","webpack:///./node_modules/d3-format/src/precisionFixed.js","webpack:///./node_modules/d3-scale/src/sequential.js","webpack:///./node_modules/d3-format/src/formatGroup.js","webpack:///./node_modules/d3-format/src/formatNumerals.js","webpack:///./node_modules/d3-format/src/formatTrim.js","webpack:///./node_modules/internmap/src/index.js","webpack:///./node_modules/d3-scale/src/ordinal.js","webpack:///./node_modules/@mui/x-charts/esm/internals/colorScale.js","webpack:///./node_modules/@mui/x-charts/esm/internals/ticks.js","webpack:///./node_modules/d3-scale/src/nice.js","webpack:///./node_modules/d3-scale/src/log.js","webpack:///./node_modules/d3-scale/src/pow.js","webpack:///./node_modules/d3-time/src/duration.js","webpack:///./node_modules/d3-time/src/interval.js","webpack:///./node_modules/d3-time/src/millisecond.js","webpack:///./node_modules/d3-time/src/second.js","webpack:///./node_modules/d3-time/src/minute.js","webpack:///./node_modules/d3-time/src/hour.js","webpack:///./node_modules/d3-time/src/day.js","webpack:///./node_modules/d3-time/src/week.js","webpack:///./node_modules/d3-time/src/month.js","webpack:///./node_modules/d3-time/src/year.js","webpack:///./node_modules/d3-time/src/ticks.js","webpack:///./node_modules/d3-time-format/src/locale.js","webpack:///./node_modules/d3-time-format/src/defaultLocale.js","webpack:///./node_modules/d3-scale/src/time.js","webpack:///./node_modules/d3-scale/src/symlog.js","webpack:///./node_modules/@mui/x-charts/esm/internals/scales/scaleSymlog.js","webpack:///./node_modules/@mui/x-charts/esm/internals/getScale.js","webpack:///./node_modules/d3-scale/src/utcTime.js","webpack:///./node_modules/@mui/x-charts/esm/internals/dateHelpers.js","webpack:///./node_modules/@mui/x-charts/esm/internals/configInit.js","webpack:///./node_modules/@mui/x-charts/esm/internals/isCartesian.js","webpack:///./node_modules/@mui/x-charts/esm/internals/scaleGuards.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.js","webpack:///./node_modules/@mui/x-charts/esm/internals/isDefined.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/internals/scales/scaleBand.js","webpack:///./node_modules/d3-array/src/range.js","webpack:///./node_modules/@mui/x-charts/esm/internals/scales/scalePoint.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/zoom.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.js","webpack:///./node_modules/flatqueue/index.js","webpack:///./node_modules/@mui/x-charts/esm/internals/Flatbush.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js","webpack:///./node_modules/@mui/x-charts/esm/internals/getSVGPoint.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/x-internals/esm/isDeepEqual/isDeepEqual.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartInteraction/checkHasInteractionPlugin.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/x-internals/esm/fastObjectShallowCompare/fastObjectShallowCompare.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js","webpack:///./node_modules/@mui/x-charts/esm/internals/findMinMax.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/seriesConfig/bar/extremums.js","webpack:///./node_modules/d3-shape/src/array.js","webpack:///./node_modules/d3-shape/src/constant.js","webpack:///./node_modules/d3-shape/src/offset/none.js","webpack:///./node_modules/d3-shape/src/order/none.js","webpack:///./node_modules/d3-shape/src/stack.js","webpack:///./node_modules/d3-shape/src/order/appearance.js","webpack:///./node_modules/d3-shape/src/order/ascending.js","webpack:///./node_modules/@mui/x-charts/esm/internals/stacking/stackSeries.js","webpack:///./node_modules/d3-shape/src/order/descending.js","webpack:///./node_modules/d3-shape/src/order/insideOut.js","webpack:///./node_modules/d3-shape/src/order/reverse.js","webpack:///./node_modules/d3-shape/src/offset/expand.js","webpack:///./node_modules/@mui/x-charts/esm/internals/stacking/offset/offsetDiverging.js","webpack:///./node_modules/d3-shape/src/offset/silhouette.js","webpack:///./node_modules/d3-shape/src/offset/wiggle.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/seriesConfig/bar/seriesProcessor.js","webpack:///./node_modules/@mui/x-charts/esm/internals/getLabel.js","webpack:///./node_modules/@mui/x-charts/esm/internals/getSeriesColorFn.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/seriesConfig/bar/getColor.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNonEmptySeriesArray.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getPreviousNonEmptySeries.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNextNonEmptySeries.js","webpack:///./node_modules/@mui/x-charts/esm/internals/seriesHasData.js","webpack:///./node_modules/@mui/x-charts/esm/internals/commonNextFocusItem.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/seriesConfig/bar/keyboardFocusHandler.js","webpack:///./node_modules/@mui/x-charts/esm/internals/getBandSize.js","webpack:///./node_modules/@mui/x-charts/esm/internals/getBarDimensions.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/seriesConfig/bar/tooltipPosition.js","webpack:///./node_modules/@mui/x-charts/esm/internals/identifierSerializer.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/seriesConfig/index.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/seriesConfig/bar/legend.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/seriesConfig/bar/tooltip.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/seriesConfig/keyboardFocusHandler.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/seriesConfig/index.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/seriesConfig/seriesProcessor.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/seriesConfig/getColor.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/seriesConfig/legend.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/seriesConfig/tooltip.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/seriesConfig/tooltipPosition.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/seriesConfig/extremums.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/seriesConfig/getSeriesWithDefaultValues.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/seriesConfig/getColor.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/seriesConfig/keyboardFocusHandler.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/seriesConfig/index.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/seriesConfig/seriesProcessor.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/seriesConfig/legend.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/seriesConfig/tooltip.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/seriesConfig/tooltipPosition.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/seriesConfig/extremums.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/seriesConfig/getSeriesWithDefaultValues.js","webpack:///./node_modules/d3-shape/src/descending.js","webpack:///./node_modules/d3-shape/src/identity.js","webpack:///./node_modules/d3-shape/src/math.js","webpack:///./node_modules/@mui/x-charts/esm/internals/angleConversion.js","webpack:///./node_modules/@mui/x-charts/esm/internals/getPercentageValue.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/getPieCoordinates.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/seriesConfig/seriesLayout.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/seriesConfig/keyboardFocusHandler.js","webpack:///./node_modules/@mui/x-charts/esm/context/ChartProvider/ChartProvider.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/seriesConfig/index.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/seriesConfig/getColor.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/seriesConfig/seriesProcessor.js","webpack:///./node_modules/d3-shape/src/pie.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/seriesConfig/legend.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/seriesConfig/tooltip.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/seriesConfig/tooltipPosition.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/seriesConfig/getSeriesWithDefaultValues.js","webpack:///./node_modules/@mui/x-charts/esm/context/ChartsSlotsContext.js","webpack:///./node_modules/@mui/utils/esm/resolveProps/resolveProps.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/useThemeProps/getThemeProps.js","webpack:///./node_modules/@mui/utils/esm/deepmerge/deepmerge.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/createBreakpoints/createBreakpoints.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/cssContainerQueries/cssContainerQueries.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/createTheme/shape.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/breakpoints/breakpoints.js","webpack:///./node_modules/@mui/utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js","webpack:///./node_modules/@mui/utils/esm/capitalize/capitalize.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/style/style.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/merge/merge.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/spacing/spacing.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/memoize/memoize.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/createTheme/createSpacing.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/compose/compose.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/borders/borders.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/cssGrid/cssGrid.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/palette/palette.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/sizing/sizing.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/createTheme/applyStyles.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/createTheme/createTheme.js","webpack:///./node_modules/@emotion/sheet/dist/emotion-sheet.esm.js","webpack:///./node_modules/stylis/src/Utility.js","webpack:///./node_modules/stylis/src/Tokenizer.js","webpack:///./node_modules/stylis/src/Enum.js","webpack:///./node_modules/stylis/src/Serializer.js","webpack:///./node_modules/stylis/src/Parser.js","webpack:///./node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js","webpack:///./node_modules/stylis/src/Middleware.js","webpack:///./node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js","webpack:///./node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","webpack:///./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","webpack:///./node_modules/@emotion/serialize/dist/emotion-serialize.esm.js","webpack:///./node_modules/@emotion/hash/dist/emotion-hash.esm.js","webpack:///./node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js","webpack:///./node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/useTheme/useTheme.js","webpack:///./node_modules/@mui/utils/esm/clamp/clamp.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/colorManipulator/colorManipulator.js","webpack:///./node_modules/@mui/material/colors/common.js","webpack:///./node_modules/@mui/material/colors/grey.js","webpack:///./node_modules/@mui/material/colors/purple.js","webpack:///./node_modules/@mui/material/colors/red.js","webpack:///./node_modules/@mui/material/colors/orange.js","webpack:///./node_modules/@mui/material/colors/blue.js","webpack:///./node_modules/@mui/material/colors/lightBlue.js","webpack:///./node_modules/@mui/material/colors/green.js","webpack:///./node_modules/@mui/material/styles/createPalette.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/cssVars/createGetCssVar.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/cssVars/prepareTypographyVars.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/cssVars/cssVarsParser.js","webpack:///./node_modules/@mui/material/styles/createTypography.js","webpack:///./node_modules/@mui/material/styles/shadows.js","webpack:///./node_modules/@mui/material/styles/createTransitions.js","webpack:///./node_modules/@mui/material/styles/zIndex.js","webpack:///./node_modules/@mui/material/styles/stringifyTheme.js","webpack:///./node_modules/@mui/material/styles/createThemeNoVars.js","webpack:///./node_modules/@mui/material/styles/createMixins.js","webpack:///./node_modules/@mui/material/styles/getOverlayAlpha.js","webpack:///./node_modules/@mui/material/styles/createColorScheme.js","webpack:///./node_modules/@mui/material/styles/shouldSkipGeneratingVar.js","webpack:///./node_modules/@mui/material/styles/excludeVariablesFromRoot.js","webpack:///./node_modules/@mui/material/styles/createGetSelector.js","webpack:///./node_modules/@mui/material/styles/createThemeWithVars.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/cssVars/prepareCssVars.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/cssVars/getColorSchemeSelector.js","webpack:///./node_modules/@mui/material/styles/createTheme.js","webpack:///./node_modules/@mui/material/styles/defaultTheme.js","webpack:///./node_modules/@mui/material/styles/identifier.js","webpack:///./node_modules/@mui/material/styles/useThemeProps.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/useThemeProps/useThemeProps.js","webpack:///./node_modules/@mui/x-charts/esm/locales/utils/imageMimeTypes.js","webpack:///./node_modules/@mui/x-charts/esm/locales/enUS.js","webpack:///./node_modules/@mui/x-charts/esm/locales/utils/getChartsLocalization.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsLocalizationProvider/ChartsLocalizationProvider.js","webpack:///./node_modules/clsx/dist/clsx.mjs","webpack:///./node_modules/@mui/utils/esm/useLazyRef/useLazyRef.js","webpack:///./node_modules/@mui/utils/esm/useOnMount/useOnMount.js","webpack:///./node_modules/@mui/utils/esm/useTimeout/useTimeout.js","webpack:///./node_modules/@mui/utils/esm/composeClasses/composeClasses.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/RtlProvider/index.js","webpack:///./node_modules/@mui/utils/esm/isFocusVisible/isFocusVisible.js","webpack:///./node_modules/@mui/utils/esm/getReactElementRef/getReactElementRef.js","webpack:///./node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js","webpack:///./node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js","webpack:///./node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js","webpack:///./node_modules/@mui/material/node_modules/@mui/styled-engine/index.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/preprocessStyles.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/createStyled/createStyled.js","webpack:///./node_modules/@mui/material/styles/slotShouldForwardProp.js","webpack:///./node_modules/@mui/material/styles/rootShouldForwardProp.js","webpack:///./node_modules/@mui/material/styles/styled.js","webpack:///./node_modules/@mui/material/styles/useTheme.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/memoTheme.js","webpack:///./node_modules/@mui/material/utils/memoTheme.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/DefaultPropsProvider/DefaultPropsProvider.js","webpack:///./node_modules/@mui/material/DefaultPropsProvider/DefaultPropsProvider.js","webpack:///./node_modules/@mui/material/utils/capitalize.js","webpack:///./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack:///external window \"ReactDOM\"","webpack:///./node_modules/react-transition-group/esm/config.js","webpack:///./node_modules/react-transition-group/esm/TransitionGroupContext.js","webpack:///./node_modules/react-transition-group/esm/utils/reflow.js","webpack:///./node_modules/react-transition-group/esm/Transition.js","webpack:///./node_modules/@mui/material/transitions/utils.js","webpack:///./node_modules/@mui/utils/esm/useForkRef/useForkRef.js","webpack:///./node_modules/@mui/material/utils/useForkRef.js","webpack:///./node_modules/@mui/material/Grow/Grow.js","webpack:///./node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js","webpack:///./node_modules/@mui/utils/esm/ownerDocument/ownerDocument.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindow.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","webpack:///./node_modules/@popperjs/core/lib/utils/math.js","webpack:///./node_modules/@popperjs/core/lib/utils/userAgent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","webpack:///./node_modules/@popperjs/core/lib/enums.js","webpack:///./node_modules/@popperjs/core/lib/utils/orderModifiers.js","webpack:///./node_modules/@popperjs/core/lib/createPopper.js","webpack:///./node_modules/@popperjs/core/lib/utils/debounce.js","webpack:///./node_modules/@popperjs/core/lib/utils/mergeByName.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/eventListeners.js","webpack:///./node_modules/@popperjs/core/lib/utils/getBasePlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/getVariation.js","webpack:///./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/computeOffsets.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/computeStyles.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/applyStyles.js","webpack:///./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/contains.js","webpack:///./node_modules/@popperjs/core/lib/utils/rectToClientRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","webpack:///./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","webpack:///./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","webpack:///./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","webpack:///./node_modules/@popperjs/core/lib/utils/expandToHashMap.js","webpack:///./node_modules/@popperjs/core/lib/utils/detectOverflow.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/flip.js","webpack:///./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","webpack:///./node_modules/@popperjs/core/lib/utils/within.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","webpack:///./node_modules/@popperjs/core/lib/utils/getAltAxis.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/arrow.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/hide.js","webpack:///./node_modules/@popperjs/core/lib/popper.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","webpack:///./node_modules/@popperjs/core/lib/modifiers/offset.js","webpack:///./node_modules/@mui/utils/esm/isHostComponent/isHostComponent.js","webpack:///./node_modules/@mui/utils/esm/appendOwnerState/appendOwnerState.js","webpack:///./node_modules/@mui/utils/esm/extractEventHandlers/extractEventHandlers.js","webpack:///./node_modules/@mui/utils/esm/omitEventHandlers/omitEventHandlers.js","webpack:///./node_modules/@mui/utils/esm/mergeSlotProps/mergeSlotProps.js","webpack:///./node_modules/@mui/utils/esm/resolveComponentProps/resolveComponentProps.js","webpack:///./node_modules/@mui/utils/esm/useSlotProps/useSlotProps.js","webpack:///./node_modules/@mui/utils/esm/setRef/setRef.js","webpack:///./node_modules/@mui/material/Portal/Portal.js","webpack:///./node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js","webpack:///./node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js","webpack:///./node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js","webpack:///./node_modules/@mui/material/Popper/popperClasses.js","webpack:///./node_modules/@mui/material/Popper/BasePopper.js","webpack:///./node_modules/@mui/material/Popper/Popper.js","webpack:///./node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js","webpack:///./node_modules/@mui/material/utils/useEventCallback.js","webpack:///./node_modules/@mui/utils/esm/useId/useId.js","webpack:///./node_modules/@mui/material/utils/useId.js","webpack:///./node_modules/@mui/utils/esm/useControlled/useControlled.js","webpack:///./node_modules/@mui/material/utils/useControlled.js","webpack:///./node_modules/@mui/material/utils/useSlot.js","webpack:///./node_modules/@mui/material/Tooltip/tooltipClasses.js","webpack:///./node_modules/@mui/material/Tooltip/Tooltip.js","webpack:///./node_modules/@mui/material/utils/ownerDocument.js","webpack:///./node_modules/@mui/material/List/ListContext.js","webpack:///./node_modules/@mui/material/List/listClasses.js","webpack:///./node_modules/@mui/material/List/List.js","webpack:///./node_modules/@mui/utils/esm/getScrollbarSize/getScrollbarSize.js","webpack:///./node_modules/@mui/material/utils/getScrollbarSize.js","webpack:///./node_modules/@mui/material/utils/useEnhancedEffect.js","webpack:///./node_modules/@mui/utils/esm/ownerWindow/ownerWindow.js","webpack:///./node_modules/@mui/material/utils/ownerWindow.js","webpack:///./node_modules/@mui/material/MenuList/MenuList.js","webpack:///./node_modules/@mui/material/Divider/dividerClasses.js","webpack:///./node_modules/@mui/material/Divider/Divider.js","webpack:///./node_modules/@mui/material/utils/createSimplePaletteValueFilter.js","webpack:///./node_modules/@mui/material/useLazyRipple/useLazyRipple.js","webpack:///./node_modules/react-transition-group/esm/utils/ChildMapping.js","webpack:///./node_modules/react-transition-group/esm/TransitionGroup.js","webpack:///./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack:///./node_modules/@emotion/react/dist/emotion-react.browser.esm.js","webpack:///./node_modules/@mui/material/ButtonBase/Ripple.js","webpack:///./node_modules/@mui/material/ButtonBase/touchRippleClasses.js","webpack:///./node_modules/@mui/material/ButtonBase/TouchRipple.js","webpack:///./node_modules/@mui/material/ButtonBase/buttonBaseClasses.js","webpack:///./node_modules/@mui/material/ButtonBase/ButtonBase.js","webpack:///./node_modules/@mui/material/CircularProgress/circularProgressClasses.js","webpack:///./node_modules/@mui/material/CircularProgress/CircularProgress.js","webpack:///./node_modules/@mui/material/IconButton/iconButtonClasses.js","webpack:///./node_modules/@mui/material/IconButton/IconButton.js","webpack:///./node_modules/@mui/material/Button/buttonClasses.js","webpack:///./node_modules/@mui/material/ButtonGroup/ButtonGroupContext.js","webpack:///./node_modules/@mui/material/ButtonGroup/ButtonGroupButtonContext.js","webpack:///./node_modules/@mui/material/Button/Button.js","webpack:///./node_modules/@mui/x-charts/esm/internals/material/index.js","webpack:///./node_modules/@mui/material/ListItemIcon/listItemIconClasses.js","webpack:///./node_modules/@mui/material/ListItemText/listItemTextClasses.js","webpack:///./node_modules/@mui/material/MenuItem/menuItemClasses.js","webpack:///./node_modules/@mui/material/MenuItem/MenuItem.js","webpack:///./node_modules/@mui/material/ListItemIcon/ListItemIcon.js","webpack:///./node_modules/@mui/material/Typography/typographyClasses.js","webpack:///./node_modules/@mui/material/Typography/Typography.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/styleFunctionSx/extendSxProp.js","webpack:///./node_modules/@mui/material/ListItemText/ListItemText.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/material/components/BaseMenuItem.js","webpack:///./node_modules/@mui/material/Unstable_TrapFocus/FocusTrap.js","webpack:///./node_modules/@mui/material/ClickAwayListener/ClickAwayListener.js","webpack:///./node_modules/@mui/material/Paper/paperClasses.js","webpack:///./node_modules/@mui/material/Paper/Paper.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/material/components/BasePopper.js","webpack:///./node_modules/@mui/material/SvgIcon/svgIconClasses.js","webpack:///./node_modules/@mui/material/SvgIcon/SvgIcon.js","webpack:///./node_modules/@mui/material/utils/createSvgIcon.js","webpack:///./node_modules/@mui/x-charts/esm/internals/createSvgIcon.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/material/icons.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/material/index.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.js","webpack:///./node_modules/@mui/x-charts/esm/internals/isPolar.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.js","webpack:///./node_modules/@mui/x-charts/esm/internals/clampAngle.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartVisibilityManager/isIdentifierVisible.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/utils/esm/ownerDocument/ownerDocument.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-internals/esm/export/loadStyleSheets.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProExport/common.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js","webpack:///./node_modules/@mui/x-charts/esm/Toolbar/chartToolbarClasses.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProExport/defaults.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProExport/useChartProExport.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProExport/print.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProExport/exportImage.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-internals/esm/isDeepEqual/isDeepEqual.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-internals/esm/rafThrottle/rafThrottle.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-internals/esm/store/createSelector.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProZoom/initializeZoomInteractionConfig.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProZoom/initializeZoomData.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProZoom/useChartProZoom.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-internals/esm/useEffectAfterFirstRender/useEffectAfterFirstRender.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/utils/esm/debounce/debounce.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/useChartProZoom/calculateZoom.js","webpack:///./node_modules/@mui/x-charts-pro/esm/internals/plugins/allPlugins.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/allPlugins.js","webpack:///./node_modules/@mui/x-charts/esm/ChartDataProvider/useChartDataProviderProps.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartDataProviderPro/useChartDataProviderProProps.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartDataProviderPro/ChartDataProviderPro.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/useForkRef/useForkRef.js","webpack:///./node_modules/@mui/x-charts/esm/context/ChartProvider/useChartContext.js","webpack:///./node_modules/@mui/x-charts/esm/internals/store/useStore.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useDrawingArea.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useAxis.js","webpack:///./node_modules/@mui/x-charts/esm/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.js","webpack:///./node_modules/@mui/x-charts/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js","webpack:///./node_modules/@mui/x-charts/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useZAxis.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/corePlugins/useChartId/useChartId.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useChartId.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useChartGradientId.js","webpack:///./node_modules/@mui/x-charts/esm/internals/components/ChartsAxesGradients/ChartsAxesGradients.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useSvgRef.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/composeClasses/composeClasses.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsSurface/chartsSurfaceClasses.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsSurface/ChartsSurface.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/omitEventHandlers/omitEventHandlers.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/mergeSlotProps/mergeSlotProps.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/extractEventHandlers/extractEventHandlers.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/useSlotProps/useSlotProps.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/resolveComponentProps/resolveComponentProps.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/appendOwnerState/appendOwnerState.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/isHostComponent/isHostComponent.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useInteractionItemProps.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartHighlight/createIsHighlighted.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartHighlight/createIsFaded.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartHighlight/highlightStates.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useItemHighlighted.js","webpack:///./node_modules/@mui/x-charts/esm/internals/animation/animation.js","webpack:///./node_modules/d3-timer/src/timer.js","webpack:///./node_modules/@mui/x-charts/esm/internals/animation/Transition.js","webpack:///./node_modules/d3-timer/src/timeout.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/animation/useAnimate.js","webpack:///./node_modules/@mui/x-charts/esm/internals/animation/useAnimateInternal.js","webpack:///./node_modules/@mui/x-charts/esm/internals/shallowEqual.js","webpack:///./node_modules/@mui/x-charts/esm/internals/cleanId.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/AppearingMask.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/AnimatedArea.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/animation/useAnimateArea.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/AreaElement.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useSkipAnimation.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting.js","webpack:///./node_modules/d3-shape/src/curve/linear.js","webpack:///./node_modules/d3-path/src/path.js","webpack:///./node_modules/d3-shape/src/path.js","webpack:///./node_modules/d3-shape/src/point.js","webpack:///./node_modules/d3-shape/src/line.js","webpack:///./node_modules/d3-shape/src/area.js","webpack:///./node_modules/d3-shape/src/curve/cardinal.js","webpack:///./node_modules/d3-shape/src/curve/catmullRom.js","webpack:///./node_modules/d3-shape/src/curve/monotone.js","webpack:///./node_modules/d3-shape/src/curve/natural.js","webpack:///./node_modules/d3-shape/src/curve/step.js","webpack:///./node_modules/d3-shape/src/curve/bump.js","webpack:///./node_modules/@mui/x-charts/esm/internals/getCurve.js","webpack:///./node_modules/@mui/x-charts/esm/internals/seriesSelectorOfType.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useLineSeries.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useScale.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/useAreaPlotData.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/AreaPlot.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/AnimatedLine.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/animation/useAnimateLine.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/LineElement.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/useLinePlotData.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/LinePlot.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/markElementClasses.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/CircleMarkElement.js","webpack:///./node_modules/d3-shape/src/symbol/asterisk.js","webpack:///./node_modules/d3-shape/src/symbol/circle.js","webpack:///./node_modules/d3-shape/src/symbol/cross.js","webpack:///./node_modules/d3-shape/src/symbol/diamond.js","webpack:///./node_modules/d3-shape/src/symbol/square.js","webpack:///./node_modules/d3-shape/src/symbol/star.js","webpack:///./node_modules/d3-shape/src/symbol/triangle.js","webpack:///./node_modules/d3-shape/src/symbol/wye.js","webpack:///./node_modules/d3-shape/src/symbol/triangle2.js","webpack:///./node_modules/d3-shape/src/symbol.js","webpack:///./node_modules/@mui/x-charts/esm/internals/getSymbol.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/MarkElement.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useItemHighlightedGetter.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/MarkPlot.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/useMarkPlotData.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/x-internals/esm/warning/warning.js","webpack:///./node_modules/@mui/system/esm/RtlProvider/index.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useIsHydrated.js","webpack:///./node_modules/@mui/x-charts/esm/internals/isInfinity.js","webpack:///./node_modules/@mui/x-charts/esm/utils/timeTicks.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useTicks.js","webpack:///./node_modules/@mui/x-charts/esm/internals/getGraphemeCount.js","webpack:///./node_modules/@mui/x-charts/esm/internals/sliceUntil.js","webpack:///./node_modules/@mui/x-charts/esm/internals/ellipsize.js","webpack:///./node_modules/@mui/x-charts/esm/internals/degToRad.js","webpack:///./node_modules/@mui/x-charts/esm/internals/domUtils.js","webpack:///./node_modules/@mui/x-charts/esm/internals/geometry.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsAxis/axisClasses.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsXAxis/utilities.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsText/ChartsText.js","webpack:///./node_modules/@mui/x-charts/esm/internals/getWordsByLines.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsText/defaultTextPlacement.js","webpack:///./node_modules/@mui/x-charts/esm/internals/invertTextAnchor.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsXAxis/useAxisTicksProps.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsXAxis/ChartsSingleXAxisTicks.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useMounted.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsXAxis/getVisibleLabels.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsXAxis/shortenLabels.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useTicksGrouped.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsXAxis/ChartsGroupedXAxisTicks.js","webpack:///./node_modules/@mui/x-charts/esm/internals/components/AxisSharedComponents.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsXAxis/ChartsXAxisImpl.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsXAxis/ChartsXAxis.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsYAxis/utilities.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsYAxis/useAxisTicksProps.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsYAxis/ChartsSingleYAxisTicks.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsYAxis/shortenLabels.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsYAxis/ChartsGroupedYAxisTicks.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsYAxis/ChartsYAxisImpl.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsYAxis/ChartsYAxis.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsGrid/chartsGridClasses.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsGrid/styledComponents.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsGrid/ChartsVerticalGrid.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsGrid/ChartsHorizontalGrid.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsGrid/ChartsGrid.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsTooltip/chartsTooltipClasses.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useSeries.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsTooltip/useItemTooltip.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsTooltip/ChartsTooltipTable.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsLabel/labelMarkClasses.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/utils/esm/resolveProps/resolveProps.js","webpack:///./node_modules/@mui/x-charts/esm/internals/consumeThemeProps.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsLabel/ChartsLabelMark.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsTooltip/ChartsItemTooltipContent.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/useMediaQuery/useMediaQuery.js","webpack:///./node_modules/@mui/material/useMediaQuery/index.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsTooltip/utils.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsTooltip/useAxisTooltip.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsTooltip/useAxesTooltip.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/corePlugins/useChartSeries/useColorProcessor.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsTooltip/ChartsAxisTooltipContent.js","webpack:///./node_modules/@mui/material/NoSsr/NoSsr.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsTooltip/ChartsTooltipContainer.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useAxisSystem.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/x-internals/esm/rafThrottle/rafThrottle.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsTooltip/ChartsTooltip.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsAxisHighlight/chartsAxisHighlightClasses.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsAxisHighlight/ChartsAxisHighlightPath.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsAxisHighlight/ChartsYAxisHighlight.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsAxisHighlight/ChartsXAxisHighlight.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsAxisHighlight/ChartsAxisHighlight.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useLegend.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsLegend/chartsLegendClasses.js","webpack:///./node_modules/@mui/x-charts/esm/internals/consumeSlots.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsLabel/labelClasses.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsLabel/ChartsLabel.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsLegend/ChartsLegend.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsLegend/onClickContextBuilder.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsClipPath/ChartsClipPath.js","webpack:///./node_modules/@mui/system/node_modules/@mui/utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js","webpack:///./node_modules/@mui/system/esm/colorManipulator/colorManipulator.js","webpack:///./node_modules/@mui/system/node_modules/@mui/utils/esm/clamp/clamp.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/utils/esm/useId/useId.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/checkBarChartScaleErrors.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useBarSeries.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/useBarPlotData.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/barElementClasses.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/animation/useAnimateBar.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/AnimatedBarElement.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/BarElement.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useIsItemFocused.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/useScatterPlotData.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useScatterSeries.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/ScatterMarker.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/internals/previews/ScatterPreviewPlot.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/internals/seriesPreviewPlotMap.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/internals/previews/LineAreaPreviewPlot.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/internals/constants.js","webpack:///./node_modules/@mui/styled-engine/esm/index.js","webpack:///./node_modules/@mui/system/node_modules/@mui/utils/esm/deepmerge/deepmerge.js","webpack:///./node_modules/@mui/system/esm/cssContainerQueries/cssContainerQueries.js","webpack:///./node_modules/@mui/system/esm/createTheme/shape.js","webpack:///./node_modules/@mui/system/esm/breakpoints/breakpoints.js","webpack:///./node_modules/@mui/system/node_modules/@mui/utils/esm/capitalize/capitalize.js","webpack:///./node_modules/@mui/system/esm/style/style.js","webpack:///./node_modules/@mui/system/esm/merge/merge.js","webpack:///./node_modules/@mui/system/esm/spacing/spacing.js","webpack:///./node_modules/@mui/system/esm/memoize/memoize.js","webpack:///./node_modules/@mui/system/esm/compose/compose.js","webpack:///./node_modules/@mui/system/esm/borders/borders.js","webpack:///./node_modules/@mui/system/esm/cssGrid/cssGrid.js","webpack:///./node_modules/@mui/system/esm/palette/palette.js","webpack:///./node_modules/@mui/system/esm/sizing/sizing.js","webpack:///./node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js","webpack:///./node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js","webpack:///./node_modules/@mui/system/esm/createTheme/applyStyles.js","webpack:///./node_modules/@mui/system/esm/createTheme/createTheme.js","webpack:///./node_modules/@mui/system/esm/createStyled/createStyled.js","webpack:///./node_modules/@mui/system/esm/createBreakpoints/createBreakpoints.js","webpack:///./node_modules/@mui/system/esm/createTheme/createSpacing.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/internals/zoom-utils.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/utils/esm/composeClasses/composeClasses.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/internals/chartAxisZoomSliderTrackClasses.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js","webpack:///./node_modules/@mui/x-charts/esm/internals/invertScale.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/utils/esm/useForkRef/useForkRef.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/internals/chartAxisZoomSliderThumbClasses.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartZoomSlider/ChartZoomSlider.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsReferenceLine/chartsReferenceLineClasses.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsReferenceLine/common.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsReferenceLine/ChartsXReferenceLine.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsReferenceLine/ChartsYReferenceLine.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsReferenceLine/ChartsReferenceLine.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsBrushOverlay/ChartsBrushOverlay.classes.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsBrushOverlay/ChartsBrushOverlay.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/x-internals/esm/useComponentRenderer/useComponentRenderer.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/x-internals/esm/ToolbarContext/ToolbarContext.js","webpack:///./node_modules/@mui/x-charts/esm/Toolbar/ToolbarButton.js","webpack:///./node_modules/@mui/x-charts/node_modules/@mui/x-internals/esm/ToolbarContext/useRegisterToolbarButton.js","webpack:///./node_modules/@mui/x-charts/esm/Toolbar/Toolbar.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useChartsLocalization.js","webpack:///./node_modules/@mui/system/esm/styled/styled.js","webpack:///./node_modules/@mui/system/esm/preprocessStyles.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartsToolbarPro/internals/ChartsToolbarDivider.js","webpack:///./node_modules/@mui/x-charts/esm/internals/components/NotRendered.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartsToolbarPro/internals/ChartsMenu.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-internals/esm/useComponentRenderer/useComponentRenderer.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-internals/esm/reactMajor/index.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/x-internals/esm/forwardRef/forwardRef.js","webpack:///./node_modules/@mui/x-charts-pro/esm/context/useChartProApiContext.js","webpack:///./node_modules/@mui/x-charts/esm/context/useChartApiContext.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartsToolbarPro/ChartsToolbarPrintExportTrigger.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartsToolbarPro/ChartsToolbarImageExportTrigger.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartsToolbarPro/ChartsToolbarPro.js","webpack:///./src/lib/components/LineChart.react.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useBrush.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/BarLabel/barLabelClasses.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/animation/useAnimateBarLabel.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/BarLabel/BarLabel.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/BarLabel/BarLabelItem.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/BarLabel/getBarLabel.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/BarLabel/BarLabelPlot.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/barClasses.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/BarClipPath.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/IndividualBarPlot.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/internals/appendAtKey.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/BatchBarPlot/useCreateBarPaths.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/BatchBarPlot/BarGroup.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/BatchBarPlot/BatchBarPlot.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/useRegisterItemClickHandlers.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/BarPlot.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/LineHighlightElement.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/LineHighlightPlot.js","webpack:///./node_modules/@mui/x-charts/esm/ChartDataProvider/ChartDataProvider.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useFocusedItem.js","webpack:///./node_modules/@mui/x-charts/esm/LineChart/FocusedLineMark.js","webpack:///./node_modules/@mui/x-charts/esm/SparkLineChart/SparkLineChart.js","webpack:///./src/lib/components/SparklineChart.react.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsAxis/ChartsAxis.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsWrapper/ChartsWrapper.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useChartRootRef.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsOverlay/ChartsLoadingOverlay.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsOverlay/ChartsNoDataOverlay.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsOverlay/ChartsOverlay.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsLabel/labelGradientClasses.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsLabel/ChartsLabelGradient.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsLegend/continuousColorLegendClasses.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsLegend/ContinuousColorLegend.js","webpack:///./node_modules/@mui/x-charts/esm/ChartsLegend/useAxis.js","webpack:///./node_modules/@mui/x-charts-pro/esm/hooks/useHeatmapSeries.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/utils/esm/isHostComponent/isHostComponent.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/utils/esm/omitEventHandlers/omitEventHandlers.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/utils/esm/mergeSlotProps/mergeSlotProps.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/utils/esm/extractEventHandlers/extractEventHandlers.js","webpack:///./node_modules/@mui/x-charts-pro/esm/Heatmap/heatmapClasses.js","webpack:///./node_modules/@mui/x-charts-pro/esm/Heatmap/HeatmapItem.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/utils/esm/useSlotProps/useSlotProps.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/utils/esm/resolveComponentProps/resolveComponentProps.js","webpack:///./node_modules/@mui/x-charts-pro/node_modules/@mui/utils/esm/appendOwnerState/appendOwnerState.js","webpack:///./node_modules/@mui/x-charts-pro/esm/Heatmap/HeatmapPlot.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useColorScale.js","webpack:///./node_modules/@mui/x-charts-pro/esm/Heatmap/seriesConfig/extremums.js","webpack:///./node_modules/@mui/x-charts-pro/esm/Heatmap/seriesConfig/index.js","webpack:///./node_modules/@mui/x-charts-pro/esm/Heatmap/seriesConfig/seriesProcessor.js","webpack:///./node_modules/@mui/x-charts-pro/esm/Heatmap/seriesConfig/getColor.js","webpack:///./node_modules/@mui/x-charts-pro/esm/Heatmap/seriesConfig/tooltip.js","webpack:///./node_modules/@mui/x-charts-pro/esm/Heatmap/seriesConfig/tooltipPosition.js","webpack:///./node_modules/@mui/x-charts-pro/esm/Heatmap/seriesConfig/getSeriesWithDefaultValues.js","webpack:///./node_modules/@mui/x-charts-pro/esm/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.js","webpack:///./node_modules/@mui/x-charts-pro/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.js","webpack:///./node_modules/@mui/x-charts-pro/esm/Heatmap/HeatmapTooltip/HeatmapTooltipContent.js","webpack:///./node_modules/@mui/x-charts-pro/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.js","webpack:///./node_modules/@mui/x-charts-pro/esm/Heatmap/Heatmap.plugins.js","webpack:///./node_modules/@mui/x-charts-pro/esm/Heatmap/Heatmap.js","webpack:///./src/lib/components/Heatmap.react.js","webpack:///./node_modules/d3-shape/src/arc.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/animation/useAnimatePieArc.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/PieArc.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/dataTransform/getModifiedArcProperties.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/dataTransform/useTransformData.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/useIsItemFocusedGetter.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/PieArcPlot.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/animation/useAnimatePieArcLabel.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/PieArcLabel.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/PieArcLabelPlot.js","webpack:///./node_modules/@mui/x-charts/esm/hooks/usePieSeries.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/pieClasses.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/PiePlot.js","webpack:///./node_modules/@mui/x-charts/esm/ChartContainer/useChartContainerProps.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/PieChart.plugins.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/FocusedPieArc.js","webpack:///./node_modules/@mui/x-charts/esm/PieChart/PieChart.js","webpack:///./src/lib/components/PieChart.react.js","webpack:///./node_modules/@mui/x-charts/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/scatterClasses.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/Scatter.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/BatchScatter.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/ScatterPlot.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/ScatterChart.plugins.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/useScatterChartProps.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/FocusedScatterMark.js","webpack:///./node_modules/@mui/x-charts/esm/ScatterChart/ScatterChart.js","webpack:///./src/lib/components/ScatterChart.react.js","webpack:///./src/lib/components/CompositeChart.react.js","webpack:///./src/lib/components/LiveTradingChart.react.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/BarChart.plugins.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/useBarChartProps.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/FocusedBar.js","webpack:///./node_modules/@mui/x-charts/esm/BarChart/BarChart.js","webpack:///./node_modules/@mui/x-charts-pro/esm/ChartContainerPro/useChartContainerProProps.js","webpack:///./node_modules/@mui/x-charts-pro/esm/BarChartPro/BarChartPro.plugins.js","webpack:///./node_modules/@mui/x-charts-pro/esm/BarChartPro/BarChartPro.js","webpack:///./src/lib/components/BarChart.react.js","webpack:///./src/lib/components/CandlestickChart.react.js","webpack:///./node_modules/@base-ui/utils/esm/useRefWithInit.js","webpack:///./node_modules/@base-ui/utils/esm/useMergedRefs.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/x-internals/esm/reactMajor/index.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/x-internals/esm/store/useStore.js","webpack:///./node_modules/@mui/material/Alert/alertClasses.js","webpack:///./node_modules/@mui/material/internal/svg-icons/SuccessOutlined.js","webpack:///./node_modules/@mui/material/internal/svg-icons/ReportProblemOutlined.js","webpack:///./node_modules/@mui/material/internal/svg-icons/ErrorOutline.js","webpack:///./node_modules/@mui/material/internal/svg-icons/InfoOutlined.js","webpack:///./node_modules/@mui/material/internal/svg-icons/Close.js","webpack:///./node_modules/@mui/material/Alert/Alert.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/utils/esm/composeClasses/composeClasses.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/utils/esm/isHostComponent/isHostComponent.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/utils/esm/extractEventHandlers/extractEventHandlers.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/utils/esm/omitEventHandlers/omitEventHandlers.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/utils/esm/resolveComponentProps/resolveComponentProps.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/utils/esm/useSlotProps/useSlotProps.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/utils/esm/mergeSlotProps/mergeSlotProps.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/utils/esm/useForkRef/useForkRef.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/utils/esm/appendOwnerState/appendOwnerState.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js","webpack:///./node_modules/@mui/x-tree-view/esm/RichTreeView/richTreeViewClasses.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/zero-styled/index.js","webpack:///./node_modules/@base-ui/utils/esm/empty.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/TreeViewProvider/TreeViewContext.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/TreeViewProvider/TreeViewStyleContext.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/TreeViewProvider/TreeViewProvider.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/TreeViewProvider/useTreeViewBuildContext.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/x-internals/esm/fastObjectShallowCompare/fastObjectShallowCompare.js","webpack:///./node_modules/@mui/material/Collapse/collapseClasses.js","webpack:///./node_modules/@mui/material/Collapse/Collapse.js","webpack:///./node_modules/@mui/material/FormControl/FormControlContext.js","webpack:///./node_modules/@mui/material/internal/switchBaseClasses.js","webpack:///./node_modules/@mui/material/internal/SwitchBase.js","webpack:///./node_modules/@mui/material/FormControl/useFormControl.js","webpack:///./node_modules/@mui/material/internal/svg-icons/CheckBoxOutlineBlank.js","webpack:///./node_modules/@mui/material/internal/svg-icons/CheckBox.js","webpack:///./node_modules/@mui/material/internal/svg-icons/IndeterminateCheckBox.js","webpack:///./node_modules/@mui/material/Checkbox/checkboxClasses.js","webpack:///./node_modules/@mui/material/utils/mergeSlotProps.js","webpack:///./node_modules/@mui/material/Checkbox/Checkbox.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/x-internals/esm/store/createSelector.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/items/utils.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/items/selectors.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/expansion/selectors.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/selection/selectors.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/focus/selectors.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/lazyLoading/selectors.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/labelEditing/selectors.js","webpack:///./node_modules/@mui/x-tree-view/esm/hooks/useTreeItemUtils/useTreeItemUtils.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/TreeViewItemDepthContext/TreeViewItemDepthContext.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/utils/tree.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/id/selectors.js","webpack:///./node_modules/@mui/x-tree-view/esm/useTreeItem/useTreeItem.js","webpack:///./node_modules/@mui/x-tree-view/esm/TreeItem/treeItemClasses.js","webpack:///./node_modules/@mui/x-tree-view/esm/icons/icons.js","webpack:///./node_modules/@mui/x-tree-view/esm/TreeItemIcon/TreeItemIcon.js","webpack:///./node_modules/@mui/x-tree-view/esm/TreeItemDragAndDropOverlay/TreeItemDragAndDropOverlay.js","webpack:///./node_modules/@mui/x-tree-view/esm/TreeItemProvider/TreeItemProvider.js","webpack:///./node_modules/@mui/x-tree-view/esm/TreeItemLabelInput/TreeItemLabelInput.js","webpack:///./node_modules/@mui/x-tree-view/esm/TreeItem/TreeItem.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/components/RichTreeViewItems.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/hooks/useTreeViewRootProps.js","webpack:///./node_modules/@mui/x-tree-view/esm/RichTreeView/useExtractRichTreeViewParameters.js","webpack:///./node_modules/@base-ui/utils/esm/useIsoLayoutEffect.js","webpack:///./node_modules/@base-ui/utils/esm/useOnMount.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/hooks/useTreeViewStore.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/labelEditing/itemPlugin.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/labelEditing/TreeViewLabelEditingPlugin.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/x-internals/esm/store/Store.js","webpack:///./node_modules/@mui/x-tree-view/node_modules/@mui/x-internals/esm/EventManager/EventManager.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/expansion/utils.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/items/TreeViewItemsPlugin.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/MinimalTreeViewStore/MinimalTreeViewStore.utils.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/MinimalTreeViewStore/TimeoutManager.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/keyboardNavigation/TreeViewKeyboardNavigationPlugin.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/focus/TreeViewFocusPlugin.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/selection/itemPlugin.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/selection/TreeViewSelectionPlugin.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/expansion/TreeViewExpansionPlugin.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/MinimalTreeViewStore/TreeViewItemPluginManager.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/MinimalTreeViewStore/MinimalTreeViewStore.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/RichTreeViewStore/RichTreeViewStore.utils.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/RichTreeViewStore/RichTreeViewStore.js","webpack:///./node_modules/@mui/x-tree-view/esm/RichTreeView/RichTreeView.js","webpack:///./node_modules/@mui/material/node_modules/@mui/private-theming/useTheme/ThemeContext.js","webpack:///./node_modules/@mui/material/node_modules/@mui/private-theming/useTheme/useTheme.js","webpack:///./node_modules/@mui/material/node_modules/@mui/private-theming/ThemeProvider/nested.js","webpack:///./node_modules/@mui/material/node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.js","webpack:///./node_modules/@mui/material/node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/GlobalStyles/GlobalStyles.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/ThemeProvider/useLayerOrder.js","webpack:///./node_modules/@mui/material/styles/ThemeProviderNoVars.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/InitColorSchemeScript/InitColorSchemeScript.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/cssVars/localStorageManager.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/cssVars/useCurrentColorScheme.js","webpack:///./node_modules/@mui/material/InitColorSchemeScript/InitColorSchemeScript.js","webpack:///./node_modules/@mui/material/styles/ThemeProviderWithVars.js","webpack:///./node_modules/@mui/material/node_modules/@mui/system/esm/cssVars/createCssVarsProvider.js","webpack:///./node_modules/@mui/material/styles/ThemeProvider.js","webpack:///./node_modules/@mui/icons-material/esm/ExpandMore.js","webpack:///./node_modules/@mui/icons-material/esm/ChevronRight.js","webpack:///./node_modules/@mui/icons-material/esm/Folder.js","webpack:///./node_modules/@mui/icons-material/esm/FolderOpen.js","webpack:///./node_modules/@mui/icons-material/esm/InsertDriveFile.js","webpack:///./node_modules/@mui/icons-material/esm/Remove.js","webpack:///./node_modules/@mui/icons-material/esm/Add.js","webpack:///./node_modules/@mui/icons-material/esm/ArrowDropDown.js","webpack:///./node_modules/@mui/icons-material/esm/ArrowRight.js","webpack:///./node_modules/@mui/icons-material/esm/AccountTree.js","webpack:///./node_modules/@mui/icons-material/esm/Description.js","webpack:///./node_modules/@mui/icons-material/esm/Code.js","webpack:///./node_modules/@mui/icons-material/esm/Image.js","webpack:///./node_modules/@mui/icons-material/esm/Settings.js","webpack:///./node_modules/@mui/icons-material/esm/Home.js","webpack:///./node_modules/@mui/icons-material/esm/Star.js","webpack:///./node_modules/@mui/icons-material/esm/Delete.js","webpack:///./node_modules/@mui/icons-material/esm/Edit.js","webpack:///./node_modules/@mui/icons-material/esm/Visibility.js","webpack:///./node_modules/@mui/icons-material/esm/Lock.js","webpack:///./node_modules/@mui/icons-material/esm/ShowChart.js","webpack:///./node_modules/@mui/icons-material/esm/BarChart.js","webpack:///./node_modules/@mui/icons-material/esm/PieChart.js","webpack:///./node_modules/@mui/icons-material/esm/ScatterPlot.js","webpack:///./node_modules/@mui/icons-material/esm/GridOn.js","webpack:///./node_modules/@mui/icons-material/esm/Timeline.js","webpack:///./node_modules/@mui/icons-material/esm/CandlestickChart.js","webpack:///./node_modules/@mui/icons-material/esm/Speed.js","webpack:///./node_modules/@mui/icons-material/esm/Layers.js","webpack:///./node_modules/@mui/icons-material/esm/TrendingUp.js","webpack:///./node_modules/@mui/icons-material/esm/History.js","webpack:///./node_modules/@mui/icons-material/esm/PlayArrow.js","webpack:///./node_modules/@mui/icons-material/esm/Tune.js","webpack:///./node_modules/@mui/icons-material/esm/Brush.js","webpack:///./node_modules/@mui/icons-material/esm/Highlight.js","webpack:///./node_modules/@mui/icons-material/esm/Sync.js","webpack:///./node_modules/@mui/icons-material/esm/ZoomIn.js","webpack:///./node_modules/@mui/icons-material/esm/TouchApp.js","webpack:///./node_modules/@mui/icons-material/esm/TableChart.js","webpack:///./node_modules/@mui/icons-material/esm/StackedBarChart.js","webpack:///./node_modules/@mui/icons-material/esm/Palette.js","webpack:///./node_modules/@mui/icons-material/esm/Rule.js","webpack:///./node_modules/@mui/icons-material/esm/Mouse.js","webpack:///./node_modules/@mui/icons-material/esm/CheckBox.js","webpack:///./node_modules/@mui/icons-material/esm/UnfoldMore.js","webpack:///./node_modules/@mui/icons-material/esm/Block.js","webpack:///./node_modules/@mui/icons-material/esm/Diamond.js","webpack:///./node_modules/@mui/icons-material/esm/AutoGraph.js","webpack:///./node_modules/@mui/icons-material/esm/ViewList.js","webpack:///./node_modules/@mui/icons-material/esm/GpsFixed.js","webpack:///./node_modules/@mui/icons-material/esm/ContentCopy.js","webpack:///./node_modules/@mui/icons-material/esm/PersonAdd.js","webpack:///./node_modules/@mui/icons-material/esm/CheckCircle.js","webpack:///./node_modules/@mui/icons-material/esm/Archive.js","webpack:///./node_modules/@mui/icons-material/esm/MoreVert.js","webpack:///./src/lib/fragments/iconResolver.js","webpack:///./src/lib/components/TreeView.react.js","webpack:///./node_modules/@mui/x-tree-view/esm/SimpleTreeView/simpleTreeViewClasses.js","webpack:///./node_modules/@mui/x-tree-view/esm/SimpleTreeView/useExtractSimpleTreeViewParameters.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/TreeViewProvider/TreeViewChildrenItemProvider.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/utils/utils.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/jsxItems/itemPlugin.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/plugins/jsxItems/TreeViewJSXItemsPlugin.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/SimpleTreeViewStore/SimpleTreeViewStore.utils.js","webpack:///./node_modules/@mui/x-tree-view/esm/internals/SimpleTreeViewStore/SimpleTreeViewStore.js","webpack:///./node_modules/@mui/x-tree-view/esm/SimpleTreeView/SimpleTreeView.js","webpack:///./src/lib/components/SimpleTreeView.react.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/x-license/esm/encoding/base64.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/x-license/esm/encoding/md5.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/x-license/esm/utils/licenseStatus.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/x-license/esm/utils/plan.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/x-license/esm/utils/licenseModel.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/x-license/esm/verifyLicense/verifyLicense.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/x-license/esm/utils/licenseInfo.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/x-license/esm/utils/licenseErrorMessageUtils.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/x-license/esm/Unstable_LicenseInfoProvider/MuiLicenseInfoContext.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/x-license/esm/useLicenseVerifier/useLicenseVerifier.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/x-internals/esm/fastObjectShallowCompare/fastObjectShallowCompare.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/x-license/esm/Watermark/Watermark.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/x-internals/esm/fastMemo/fastMemo.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/utils/esm/omitEventHandlers/omitEventHandlers.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/utils/esm/mergeSlotProps/mergeSlotProps.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/utils/esm/extractEventHandlers/extractEventHandlers.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js","webpack:///./node_modules/@mui/x-tree-view-pro/esm/RichTreeViewPro/richTreeViewProClasses.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js","webpack:///./node_modules/@mui/x-tree-view-pro/esm/RichTreeViewPro/useExtractRichTreeViewProParameters.js","webpack:///./node_modules/@mui/x-tree-view/esm/utils/cache.js","webpack:///./node_modules/@mui/x-tree-view-pro/esm/internals/plugins/lazyLoading/utils.js","webpack:///./node_modules/@mui/x-tree-view-pro/esm/internals/plugins/lazyLoading/TreeViewLazyLoadingPlugin.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/x-internals/esm/store/createSelector.js","webpack:///./node_modules/@mui/x-tree-view-pro/esm/internals/plugins/itemsReordering/selectors.js","webpack:///./node_modules/@mui/x-tree-view-pro/esm/internals/plugins/itemsReordering/utils.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/x-internals/esm/store/useStore.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/x-internals/esm/reactMajor/index.js","webpack:///./node_modules/@mui/x-tree-view-pro/esm/internals/plugins/itemsReordering/itemPlugin.js","webpack:///./node_modules/@mui/x-tree-view-pro/esm/internals/plugins/itemsReordering/TreeViewItemsReorderingPlugin.js","webpack:///./node_modules/@mui/x-tree-view-pro/esm/internals/RichTreeViewProStore/RichTreeViewProStore.utils.js","webpack:///./node_modules/@mui/x-tree-view-pro/esm/internals/RichTreeViewProStore/RichTreeViewProStore.js","webpack:///./node_modules/@mui/x-tree-view-pro/esm/RichTreeViewPro/RichTreeViewPro.js","webpack:///./node_modules/@mui/x-tree-view-pro/esm/internals/zero-styled/index.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/utils/esm/composeClasses/composeClasses.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/utils/esm/useSlotProps/useSlotProps.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/utils/esm/resolveComponentProps/resolveComponentProps.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/utils/esm/useForkRef/useForkRef.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/utils/esm/appendOwnerState/appendOwnerState.js","webpack:///./node_modules/@mui/x-tree-view-pro/node_modules/@mui/utils/esm/isHostComponent/isHostComponent.js","webpack:///./node_modules/@mui/utils/esm/visuallyHidden/visuallyHidden.js","webpack:///./node_modules/@mui/material/Slider/useSlider.js","webpack:///./node_modules/@mui/material/utils/areArraysEqual.js","webpack:///./node_modules/@mui/material/utils/isHostComponent.js","webpack:///./node_modules/@mui/material/Slider/sliderClasses.js","webpack:///./node_modules/@mui/material/Slider/Slider.js","webpack:///./node_modules/@mui/material/Slider/SliderValueLabel.js","webpack:///./node_modules/@mui/material/utils/shouldSpreadAdditionalProps.js","webpack:///./node_modules/@mui/material/Fade/Fade.js","webpack:///./node_modules/@mui/material/Backdrop/backdropClasses.js","webpack:///./node_modules/@mui/material/Backdrop/Backdrop.js","webpack:///./node_modules/@mui/utils/esm/createChainedFunction/createChainedFunction.js","webpack:///./node_modules/@mui/material/Modal/ModalManager.js","webpack:///./node_modules/@mui/material/Modal/useModal.js","webpack:///./node_modules/@mui/material/Modal/modalClasses.js","webpack:///./node_modules/@mui/material/Modal/Modal.js","webpack:///./node_modules/@mui/material/Popover/popoverClasses.js","webpack:///./node_modules/@mui/material/Popover/Popover.js","webpack:///./node_modules/@mui/utils/esm/debounce/debounce.js","webpack:///./node_modules/@mui/material/Menu/menuClasses.js","webpack:///./node_modules/@mui/material/Menu/Menu.js","webpack:///./src/lib/components/TreeViewPro.react.js","webpack:///./node_modules/@mui/x-date-pickers/esm/LocalizationProvider/LocalizationProvider.js","webpack:///./node_modules/@mui/x-date-pickers/esm/AdapterDayjs/AdapterDayjs.js","webpack:///./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/composeClasses/composeClasses.js","webpack:///./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/useId/useId.js","webpack:///./node_modules/@mui/x-date-pickers/esm/locales/utils/getPickersLocalization.js","webpack:///./node_modules/@mui/x-date-pickers/esm/locales/enUS.js","webpack:///./node_modules/@mui/x-date-pickers/esm/hooks/usePickerAdapter.js","webpack:///./node_modules/@mui/x-date-pickers/esm/hooks/usePickerTranslations.js","webpack:///./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/omitEventHandlers/omitEventHandlers.js","webpack:///./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/mergeSlotProps/mergeSlotProps.js","webpack:///./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/extractEventHandlers/extractEventHandlers.js","webpack:///./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/useSlotProps/useSlotProps.js","webpack:///./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/resolveComponentProps/resolveComponentProps.js","webpack:///./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/useForkRef/useForkRef.js","webpack:///./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/appendOwnerState/appendOwnerState.js","webpack:///./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/isHostComponent/isHostComponent.js","webpack:///./node_modules/@mui/x-date-pickers/esm/icons/index.js","webpack:///./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js","webpack:///./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js","webpack:///./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js","webpack:///./node_modules/@mui/x-date-pickers/esm/internals/components/PickersArrowSwitcher/pickersArrowSwitcherClasses.js","webpack:///./node_modules/@mui/x-date-pickers/esm/internals/components/PickerProvider.js","webpack:///./node_modules/@mui/x-date-pickers/esm/internals/hooks/usePickerPrivateContext.js","webpack:///./node_modules/@mui/x-date-pickers/esm/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js","webpack:///./node_modules/@mui/x-date-pickers/esm/internals/utils/time-utils.js","webpack:///./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js","webpack:///./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js","webpack:///./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/useControlled/useControlled.js","webpack:///./node_modules/@mui/x-date-pickers/esm/internals/utils/createStepNavigation.js","webpack:///./node_modules/@mui/x-date-pickers/esm/internals/constants/dimensions.js","webpack:///./node_modules/@mui/x-date-pickers/esm/internals/components/PickerViewRoot/PickerViewRoot.js","webpack:///./node_modules/@mui/x-date-pickers/esm/TimeClock/timeClockClasses.js","webpack:///./node_modules/@mui/x-date-pickers/esm/TimeClock/shared.js","webpack:///./node_modules/@mui/x-date-pickers/esm/TimeClock/clockPointerClasses.js","webpack:///./node_modules/@mui/x-date-pickers/esm/TimeClock/ClockPointer.js","webpack:///./node_modules/@mui/x-date-pickers/esm/TimeClock/clockClasses.js","webpack:///./node_modules/@mui/x-date-pickers/esm/internals/utils/date-utils.js","webpack:///./node_modules/@mui/x-date-pickers/esm/TimeClock/Clock.js","webpack:///./node_modules/@mui/x-date-pickers/esm/TimeClock/clockNumberClasses.js","webpack:///./node_modules/@mui/x-date-pickers/esm/TimeClock/ClockNumber.js","webpack:///./node_modules/@mui/x-date-pickers/esm/TimeClock/ClockNumbers.js","webpack:///./node_modules/@mui/x-date-pickers/esm/internals/utils/getDefaultReferenceDate.js","webpack:///./node_modules/@mui/x-date-pickers/esm/internals/utils/valueManagers.js","webpack:///./node_modules/@mui/x-date-pickers/esm/TimeClock/TimeClock.js","webpack:///./node_modules/@mui/x-date-pickers/esm/internals/hooks/useControlledValue.js","webpack:///./node_modules/@mui/x-date-pickers/esm/internals/hooks/useClockReferenceDate.js","webpack:///./node_modules/@mui/x-date-pickers/esm/internals/hooks/useUtils.js","webpack:///./node_modules/@mui/x-date-pickers/esm/internals/hooks/useViews.js","webpack:///./node_modules/@mui/x-date-pickers/esm/internals/hooks/date-helpers-hooks.js","webpack:///./src/lib/components/TimeClock.react.js"],"sourcesContent":["var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"dash_mui_charts:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},t=/(\\[[^[]*\\])|([-_:/.,()\\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\\d/,r=/\\d\\d/,i=/\\d\\d?/,o=/\\d*[^-_:/,()\\s\\d]+/,s={},a=function(e){return(e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t}},h=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if(\"Z\"===e)return 0;var t=e.match(/([+-]|\\d\\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:\"+\"===t[0]?-n:n}(e)}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?\"pm\":\"PM\");return n},c={A:[o,function(e){this.afternoon=d(e,!1)}],a:[o,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\\d{3}/,function(e){this.milliseconds=+e}],s:[i,f(\"seconds\")],ss:[i,f(\"seconds\")],m:[i,f(\"minutes\")],mm:[i,f(\"minutes\")],H:[i,f(\"hours\")],h:[i,f(\"hours\")],HH:[i,f(\"hours\")],hh:[i,f(\"hours\")],D:[i,f(\"day\")],DD:[r,f(\"day\")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\\[|\\]/g,\"\")===e&&(this.day=r)}],w:[i,f(\"week\")],ww:[r,f(\"week\")],M:[i,f(\"month\")],MM:[r,f(\"month\")],MMM:[o,function(e){var t=u(\"months\"),n=(u(\"monthsShort\")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=u(\"months\").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\\d+/,f(\"year\")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\\d{4}/,f(\"year\")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f-1)return new Date((\"X\"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date(\"\")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date(\"\")),s={}}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(\"\"))}else i.call(this,e)}}}));","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","module.exports = window[\"React\"];","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\nexports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n};\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)25){var f=r(this).startOf(t).add(1,t).date(n),s=r(this).endOf(e);if(f.isBefore(s))return 1}var a=r(this).startOf(t).date(n).startOf(e).subtract(1,\"millisecond\"),o=this.diff(a,e,!0);return o<0?r(this).startOf(\"week\").week():Math.ceil(o)},f.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}));","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n","/**\n * https://github.com/gre/bezier-easing\n * BezierEasing - use bezier curve for transition easing function\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\n */\n\n// These values are established by empiricism with tests (tradeoff: performance VS precision)\nvar NEWTON_ITERATIONS = 4;\nvar NEWTON_MIN_SLOPE = 0.001;\nvar SUBDIVISION_PRECISION = 0.0000001;\nvar SUBDIVISION_MAX_ITERATIONS = 10;\n\nvar kSplineTableSize = 11;\nvar kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\nvar float32ArraySupported = typeof Float32Array === 'function';\n\nfunction A (aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }\nfunction B (aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }\nfunction C (aA1) { return 3.0 * aA1; }\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nfunction calcBezier (aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; }\n\n// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\nfunction getSlope (aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); }\n\nfunction binarySubdivide (aX, aA, aB, mX1, mX2) {\n var currentX, currentT, i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if (currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n return currentT;\n}\n\nfunction newtonRaphsonIterate (aX, aGuessT, mX1, mX2) {\n for (var i = 0; i < NEWTON_ITERATIONS; ++i) {\n var currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) {\n return aGuessT;\n }\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\n\nfunction LinearEasing (x) {\n return x;\n}\n\nmodule.exports = function bezier (mX1, mY1, mX2, mY2) {\n if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) {\n throw new Error('bezier x values must be in [0, 1] range');\n }\n\n if (mX1 === mY1 && mX2 === mY2) {\n return LinearEasing;\n }\n\n // Precompute samples table\n var sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n for (var i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n\n function getTForX (aX) {\n var intervalStart = 0.0;\n var currentSample = 1;\n var lastSample = kSplineTableSize - 1;\n\n for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n\n // Interpolate to provide an initial guess for t\n var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n var guessForT = intervalStart + dist * kSampleStepSize;\n\n var initialSlope = getSlope(guessForT, mX1, mX2);\n if (initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if (initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n\n return function BezierEasing (x) {\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n if (x === 0) {\n return 0;\n }\n if (x === 1) {\n return 1;\n }\n return calcBezier(getTForX(x), mY1, mY2);\n };\n};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".dash_mui_charts.min.js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","var getCurrentScript = function() {\n var script = document.currentScript;\n if (!script) {\n /* Shim for IE11 and below */\n /* Do not take into account async scripts and inline scripts */\n\n var doc_scripts = document.getElementsByTagName('script');\n var scripts = [];\n\n for (var i = 0; i < doc_scripts.length; i++) {\n scripts.push(doc_scripts[i]);\n }\n\n scripts = scripts.filter(function(s) { return !s.async && !s.text && !s.textContent; });\n script = scripts.slice(-1)[0];\n }\n\n return script;\n};\n\nvar isLocalScript = function(script) {\n return /\\/_dash-component-suites\\//.test(script.src);\n};\n\nObject.defineProperty(__webpack_require__, 'p', {\n get: (function () {\n var script = getCurrentScript();\n\n var url = script.src.split('/').slice(0, -1).join('/') + '/';\n\n return function() {\n return url;\n };\n })()\n});\n\nif (typeof jsonpScriptSrc !== 'undefined') {\n var __jsonpScriptSrc__ = jsonpScriptSrc;\n jsonpScriptSrc = function(chunkId) {\n var script = getCurrentScript();\n var isLocal = isLocalScript(script);\n\n var src = __jsonpScriptSrc__(chunkId);\n\n if(!isLocal) {\n return src;\n }\n\n var srcFragments = src.split('/');\n var fileFragments = srcFragments.slice(-1)[0].split('.');\n\n fileFragments.splice(1, 0, \"v1_4_0m1785715216\");\n srcFragments.splice(-1, 1, fileFragments.join('.'))\n\n return srcFragments.join('/');\n };\n}\n","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t57: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkdash_mui_charts\"] = self[\"webpackChunkdash_mui_charts\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"PropTypes\"];","/* eslint-disable */\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nexport default typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();","import { ponyfillGlobal } from '@mui/utils';\n\n/**\n * @ignore - do not document.\n */\n\n// Store the license information in a global, so it can be shared\n// when module duplication occurs. The duplication of the modules can happen\n// if using multiple version of MUI X at the same time of the bundler\n// decide to duplicate to improve the size of the chunks.\n// eslint-disable-next-line no-underscore-dangle\nponyfillGlobal.__MUI_LICENSE_INFO__ = ponyfillGlobal.__MUI_LICENSE_INFO__ || {\n key: undefined\n};\nexport class LicenseInfo {\n static getLicenseInfo() {\n // eslint-disable-next-line no-underscore-dangle\n return ponyfillGlobal.__MUI_LICENSE_INFO__;\n }\n static getLicenseKey() {\n return LicenseInfo.getLicenseInfo().key;\n }\n static setLicenseKey(key) {\n const licenseInfo = LicenseInfo.getLicenseInfo();\n licenseInfo.key = key;\n }\n}","function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","const is = Object.is;\n\n/**\n * Fast shallow compare for objects.\n * @returns true if objects are equal.\n */\nexport function fastObjectShallowCompare(a, b) {\n if (a === b) {\n return true;\n }\n if (!(a instanceof Object) || !(b instanceof Object)) {\n return false;\n }\n let aLength = 0;\n let bLength = 0;\n\n /* eslint-disable guard-for-in */\n for (const key in a) {\n aLength += 1;\n if (!is(a[key], b[key])) {\n return false;\n }\n if (!(key in b)) {\n return false;\n }\n }\n\n /* eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unused-vars */\n for (const _ in b) {\n bLength += 1;\n }\n return aLength === bLength;\n}","/**\n * @mui/x-telemetry v8.20.0\n *\n * @license SEE LICENSE IN LICENSE\n * This source code is licensed under the SEE LICENSE IN LICENSE license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport muiXTelemetryEvents from \"./runtime/events.js\";\nimport sendMuiXTelemetryEventOriginal from \"./runtime/sender.js\";\nimport muiXTelemetrySettingsOriginal from \"./runtime/settings.js\";\nconst noop = () => {};\n\n// To cut unused imports in production as early as possible\nconst sendMuiXTelemetryEvent = process.env.NODE_ENV === 'production' ? noop : sendMuiXTelemetryEventOriginal;\n\n// To cut unused imports in production as early as possible\nconst muiXTelemetrySettings = process.env.NODE_ENV === 'production' ? {\n enableDebug: noop,\n enableTelemetry: noop,\n disableTelemetry: noop\n} : muiXTelemetrySettingsOriginal;\nexport { muiXTelemetryEvents, sendMuiXTelemetryEvent, muiXTelemetrySettings };","const noop = () => null;\nconst muiXTelemetryEvents = {\n licenseVerification: process.env.NODE_ENV === 'production' ? noop : (context, payload) => ({\n eventName: 'licenseVerification',\n payload,\n context\n })\n};\nexport default muiXTelemetryEvents;","/* eslint-disable */\nconst _keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nfunction utf8Encode(str) {\n for (let n = 0; n < str.length; n++) {\n const c = str.charCodeAt(n);\n if (c >= 128) {\n throw new Error('ASCII only support');\n }\n }\n return str;\n}\nexport const base64Decode = input => {\n let output = '';\n let chr1, chr2, chr3;\n let enc1, enc2, enc3, enc4;\n let i = 0;\n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, '');\n while (i < input.length) {\n enc1 = _keyStr.indexOf(input.charAt(i++));\n enc2 = _keyStr.indexOf(input.charAt(i++));\n enc3 = _keyStr.indexOf(input.charAt(i++));\n enc4 = _keyStr.indexOf(input.charAt(i++));\n chr1 = enc1 << 2 | enc2 >> 4;\n chr2 = (enc2 & 15) << 4 | enc3 >> 2;\n chr3 = (enc3 & 3) << 6 | enc4;\n output = output + String.fromCharCode(chr1);\n if (enc3 != 64) {\n output = output + String.fromCharCode(chr2);\n }\n if (enc4 != 64) {\n output = output + String.fromCharCode(chr3);\n }\n }\n return output;\n};\nexport const base64Encode = input => {\n let output = '';\n let chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n let i = 0;\n input = utf8Encode(input);\n while (i < input.length) {\n chr1 = input.charCodeAt(i++);\n chr2 = input.charCodeAt(i++);\n chr3 = input.charCodeAt(i++);\n enc1 = chr1 >> 2;\n enc2 = (chr1 & 3) << 4 | chr2 >> 4;\n enc3 = (chr2 & 15) << 2 | chr3 >> 6;\n enc4 = chr3 & 63;\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n output = output + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4);\n }\n return output;\n};","/* eslint-disable */\n// See \"precomputation\" in notes\nconst k = [];\nlet i = 0;\nfor (; i < 64;) {\n k[i] = 0 | Math.sin(++i % Math.PI) * 4294967296;\n // k[i] = 0 | (Math.abs(Math.sin(++i)) * 4294967296);\n}\nexport function md5(s) {\n const words = [];\n let b,\n c,\n d,\n j = unescape(encodeURI(s)) + '\\x80',\n a = j.length;\n const h = [b = 0x67452301, c = 0xefcdab89, ~b, ~c];\n s = --a / 4 + 2 | 15;\n\n // See \"Length bits\" in notes\n words[--s] = a * 8;\n for (; ~a;) {\n // a !== -1\n words[a >> 2] |= j.charCodeAt(a) << 8 * a--;\n }\n for (i = j = 0; i < s; i += 16) {\n a = h;\n for (; j < 64; a = [d = a[3], b + ((d = a[0] + [b & c | ~b & d, d & b | ~d & c, b ^ c ^ d, c ^ (b | ~d)][a = j >> 4] + k[j] + ~~words[i | [j, 5 * j + 1, 3 * j + 5, 7 * j][a] & 15]) << (a = [7, 12, 17, 22, 5, 9, 14, 20, 4, 11, 16, 23, 6, 10, 15, 21][4 * a + j++ % 4]) | d >>> -a), b, c]) {\n b = a[1] | 0;\n c = a[2];\n }\n\n // See \"Integer safety\" in notes\n for (j = 4; j;) h[--j] += a[j];\n\n // j === 0\n }\n for (s = ''; j < 32;) {\n s += (h[j >> 3] >> (1 ^ j++) * 4 & 15).toString(16);\n // s += ((h[j >> 3] >> (4 ^ 4 * j++)) & 15).toString(16);\n }\n return s;\n}","// eslint-disable-next-line @typescript-eslint/naming-convention\nexport let LICENSE_STATUS = /*#__PURE__*/function (LICENSE_STATUS) {\n LICENSE_STATUS[\"NotFound\"] = \"NotFound\";\n LICENSE_STATUS[\"Invalid\"] = \"Invalid\";\n LICENSE_STATUS[\"ExpiredAnnual\"] = \"ExpiredAnnual\";\n LICENSE_STATUS[\"ExpiredAnnualGrace\"] = \"ExpiredAnnualGrace\";\n LICENSE_STATUS[\"ExpiredVersion\"] = \"ExpiredVersion\";\n LICENSE_STATUS[\"Valid\"] = \"Valid\";\n LICENSE_STATUS[\"OutOfScope\"] = \"OutOfScope\";\n LICENSE_STATUS[\"NotAvailableInInitialProPlan\"] = \"NotAvailableInInitialProPlan\";\n return LICENSE_STATUS;\n}({});","export const PLAN_SCOPES = ['pro', 'premium'];\nexport const PLAN_VERSIONS = ['initial', 'Q3-2024'];","export const LICENSE_MODELS = [\n/**\n * A license is outdated if the current version of the software was released after the expiry date of the license.\n * But the license can be used indefinitely with an older version of the software.\n */\n'perpetual',\n/**\n * On development, a license is outdated if the expiry date has been reached\n * On production, a license is outdated if the current version of the software was released after the expiry date of the license (see \"perpetual\")\n */\n'annual',\n/**\n * Legacy. The previous name for 'annual'.\n * Can be removed once old license keys generated with 'subscription' are no longer supported.\n * To support for a while. We need more years of backward support and we sell multi year licenses.\n */\n'subscription'];","import { base64Decode, base64Encode } from \"../encoding/base64.js\";\nimport { md5 } from \"../encoding/md5.js\";\nimport { LICENSE_STATUS } from \"../utils/licenseStatus.js\";\nimport { PLAN_SCOPES } from \"../utils/plan.js\";\nimport { LICENSE_MODELS } from \"../utils/licenseModel.js\";\nconst getDefaultReleaseDate = () => {\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n return today;\n};\nexport function generateReleaseInfo(releaseDate = getDefaultReleaseDate()) {\n return base64Encode(releaseDate.getTime().toString());\n}\nfunction isPlanScopeSufficient(packageName, planScope) {\n let acceptedScopes;\n if (packageName.includes('-pro')) {\n acceptedScopes = ['pro', 'premium'];\n } else if (packageName.includes('-premium')) {\n acceptedScopes = ['premium'];\n } else {\n acceptedScopes = [];\n }\n return acceptedScopes.includes(planScope);\n}\nconst expiryReg = /^.*EXPIRY=([0-9]+),.*$/;\nconst orderReg = /^.*ORDER:([0-9]+),.*$/;\nconst PRO_PACKAGES_AVAILABLE_IN_INITIAL_PRO_PLAN = ['x-data-grid-pro', 'x-date-pickers-pro'];\n\n/**\n * Format: ORDER:${orderNumber},EXPIRY=${expiryTimestamp},KEYVERSION=1\n */\nfunction decodeLicenseVersion1(license) {\n let expiryTimestamp;\n let orderId;\n try {\n expiryTimestamp = parseInt(license.match(expiryReg)[1], 10);\n if (!expiryTimestamp || Number.isNaN(expiryTimestamp)) {\n expiryTimestamp = null;\n }\n orderId = parseInt(license.match(orderReg)[1], 10);\n if (!orderId || Number.isNaN(orderId)) {\n orderId = null;\n }\n } catch (err) {\n expiryTimestamp = null;\n orderId = null;\n }\n return {\n version: 1,\n licenseModel: 'perpetual',\n planScope: 'pro',\n planVersion: 'initial',\n expiryTimestamp,\n expiryDate: expiryTimestamp ? new Date(expiryTimestamp) : null,\n orderId\n };\n}\n\n/**\n * Format: O=${orderNumber},E=${expiryTimestamp},S=${planScope},LM=${licenseModel},PV=${planVersion},KV=2`;\n */\nfunction decodeLicenseVersion2(license) {\n const licenseInfo = {\n version: 2,\n licenseModel: null,\n planScope: null,\n planVersion: 'initial',\n expiryTimestamp: null,\n expiryDate: null,\n orderId: null\n };\n license.split(',').map(token => token.split('=')).filter(el => el.length === 2).forEach(([key, value]) => {\n if (key === 'S') {\n licenseInfo.planScope = value;\n }\n if (key === 'LM') {\n licenseInfo.licenseModel = value;\n }\n if (key === 'E') {\n const expiryTimestamp = parseInt(value, 10);\n if (expiryTimestamp && !Number.isNaN(expiryTimestamp)) {\n licenseInfo.expiryTimestamp = expiryTimestamp;\n licenseInfo.expiryDate = new Date(expiryTimestamp);\n }\n }\n if (key === 'PV') {\n licenseInfo.planVersion = value;\n }\n if (key === 'O') {\n const orderNum = parseInt(value, 10);\n if (orderNum && !Number.isNaN(orderNum)) {\n licenseInfo.orderId = orderNum;\n }\n }\n });\n return licenseInfo;\n}\n\n/**\n * Decode the license based on its key version and return a version-agnostic `MuiLicense` object.\n */\nfunction decodeLicense(encodedLicense) {\n const license = base64Decode(encodedLicense);\n if (license.includes('KEYVERSION=1')) {\n return decodeLicenseVersion1(license);\n }\n if (license.includes('KV=2')) {\n return decodeLicenseVersion2(license);\n }\n return null;\n}\nexport function verifyLicense({\n releaseInfo,\n licenseKey,\n packageName\n}) {\n // Gets replaced at build time\n // @ts-ignore\n if (false) {\n return {\n status: LICENSE_STATUS.Valid\n };\n }\n if (!releaseInfo) {\n throw new Error('MUI X: The release information is missing. Not able to validate license.');\n }\n if (!licenseKey) {\n return {\n status: LICENSE_STATUS.NotFound\n };\n }\n const hash = licenseKey.substr(0, 32);\n const encoded = licenseKey.substr(32);\n if (hash !== md5(encoded)) {\n return {\n status: LICENSE_STATUS.Invalid\n };\n }\n const license = decodeLicense(encoded);\n if (license == null) {\n console.error('MUI X: Error checking license. Key version not found!');\n return {\n status: LICENSE_STATUS.Invalid\n };\n }\n if (license.licenseModel == null || !LICENSE_MODELS.includes(license.licenseModel)) {\n console.error('MUI X: Error checking license. License model not found or invalid!');\n return {\n status: LICENSE_STATUS.Invalid\n };\n }\n if (license.expiryTimestamp == null) {\n console.error('MUI X: Error checking license. Expiry timestamp not found or invalid!');\n return {\n status: LICENSE_STATUS.Invalid\n };\n }\n if (license.licenseModel === 'perpetual' || process.env.NODE_ENV === 'production') {\n const pkgTimestamp = parseInt(base64Decode(releaseInfo), 10);\n if (Number.isNaN(pkgTimestamp)) {\n throw new Error('MUI X: The release information is invalid. Not able to validate license.');\n }\n if (license.expiryTimestamp < pkgTimestamp) {\n return {\n status: LICENSE_STATUS.ExpiredVersion\n };\n }\n } else if (license.licenseModel === 'subscription' || license.licenseModel === 'annual') {\n if (new Date().getTime() > license.expiryTimestamp) {\n if (\n // 30 days grace\n new Date().getTime() < license.expiryTimestamp + 1000 * 3600 * 24 * 30 || process.env.NODE_ENV !== 'development') {\n return {\n status: LICENSE_STATUS.ExpiredAnnualGrace,\n meta: {\n expiryTimestamp: license.expiryTimestamp,\n licenseKey\n }\n };\n }\n return {\n status: LICENSE_STATUS.ExpiredAnnual,\n meta: {\n expiryTimestamp: license.expiryTimestamp,\n licenseKey\n }\n };\n }\n }\n if (license.planScope == null || !PLAN_SCOPES.includes(license.planScope)) {\n console.error('MUI X: Error checking license. planScope not found or invalid!');\n return {\n status: LICENSE_STATUS.Invalid\n };\n }\n if (!isPlanScopeSufficient(packageName, license.planScope)) {\n return {\n status: LICENSE_STATUS.OutOfScope\n };\n }\n\n // 'charts-pro' or 'tree-view-pro' can only be used with a newer Pro license\n if (license.planVersion === 'initial' && license.planScope === 'pro' && !PRO_PACKAGES_AVAILABLE_IN_INITIAL_PRO_PLAN.includes(packageName)) {\n return {\n status: LICENSE_STATUS.NotAvailableInInitialProPlan\n };\n }\n return {\n status: LICENSE_STATUS.Valid\n };\n}","/**\n * @ignore - do not document.\n */\n\n// Store the license information in a global, so it can be shared\n// when module duplication occurs. The duplication of the modules can happen\n// if using multiple version of MUI X at the same time of the bundler\n// decide to duplicate to improve the size of the chunks.\n// eslint-disable-next-line no-underscore-dangle\nglobalThis.__MUI_LICENSE_INFO__ = globalThis.__MUI_LICENSE_INFO__ || {\n key: undefined\n};\nexport class LicenseInfo {\n static getLicenseInfo() {\n // eslint-disable-next-line no-underscore-dangle\n return globalThis.__MUI_LICENSE_INFO__;\n }\n static getLicenseKey() {\n return LicenseInfo.getLicenseInfo().key;\n }\n static setLicenseKey(key) {\n const licenseInfo = LicenseInfo.getLicenseInfo();\n licenseInfo.key = key;\n }\n}","/**\n * Workaround for the codesadbox preview error.\n *\n * Once these issues are resolved\n * https://github.com/mui/mui-x/issues/15765\n * https://github.com/codesandbox/codesandbox-client/issues/8673\n *\n * `showError` can simply use `console.error` again.\n */\nconst isCodeSandbox = typeof window !== 'undefined' && window.location.hostname.endsWith('.csb.app');\nfunction showError(message) {\n // eslint-disable-next-line no-console\n const logger = isCodeSandbox ? console.log : console.error;\n logger(['*************************************************************', '', ...message, '', '*************************************************************'].join('\\n'));\n}\nexport function showInvalidLicenseKeyError() {\n showError(['MUI X: Invalid license key.', '', \"Your MUI X license key format isn't valid. It could be because the license key is missing a character or has a typo.\", '', 'To solve the issue, you need to double check that `setLicenseKey()` is called with the right argument', 'Please check the license key installation https://mui.com/r/x-license-key-installation.']);\n}\nexport function showLicenseKeyPlanMismatchError({\n packageName\n}) {\n const rootPackageName = packageName.replace(/-(premium|pro)$/, '');\n showError(['MUI X: License key plan mismatch.', '', 'Your use of MUI X is not compatible with the plan of your license key. The feature you are trying to use is not included in the plan of your license key. This happens if you try to use Data Grid Premium with a license key for the Pro plan.', '', 'To solve the issue, you can upgrade your plan from Pro to Premium at https://mui.com/r/x-get-license?scope=premium.', `Or if you didn't intend to use Premium features, you can replace the import of \\`${rootPackageName}-premium\\` with \\`${rootPackageName}-pro\\`.`]);\n}\nexport function showNotAvailableInInitialProPlanError() {\n showError(['MUI X: Component not included in your license.', '', 'The component you are trying to use is not included in the Pro Plan you purchased.', '', 'Your license is from an old version of the Pro Plan that is only compatible with the `@mui/x-data-grid-pro` and `@mui/x-date-pickers-pro` commercial packages.', '', 'To start using another Pro package, please consider reaching to our sales team to upgrade your license or visit https://mui.com/r/x-get-license to get a new license key.']);\n}\nexport function showMissingLicenseKeyError({\n plan,\n packageName\n}) {\n showError(['MUI X: Missing license key.', '', `The license key is missing. You might not be allowed to use \\`${packageName}\\` which is part of MUI X ${plan}.`, '', 'To solve the issue, you can check the free trial conditions: https://mui.com/r/x-license-trial.', 'If you are eligible no actions are required. If you are not eligible to the free trial, you need to purchase a license https://mui.com/r/x-get-license or stop using the software immediately.']);\n}\nexport function showExpiredPackageVersionError({\n packageName\n}) {\n showError(['MUI X: Expired package version.', '', `You have installed a version of \\`${packageName}\\` that is outside of the maintenance plan of your license key. By default, commercial licenses provide access to new versions released during the first year after the purchase.`, '', 'To solve the issue, you can renew your license https://mui.com/r/x-get-license or install an older version of the npm package that is compatible with your license key.']);\n}\nexport function showExpiredAnnualGraceLicenseKeyError({\n plan,\n licenseKey,\n expiryTimestamp\n}) {\n showError(['MUI X: Expired license key.', '', `Your annual license key to use MUI X ${plan} in non-production environments has expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${plan} component (more details in https://mui.com/r/x-license-annual).`, '', 'To solve the problem you can either:', '', '- Renew your license https://mui.com/r/x-get-license and use the new key', `- Stop making changes to code depending directly or indirectly on MUI X ${plan}'s APIs`, '', 'Note that your license is perpetual in production environments with any version released before your license term ends.', '', `- License key expiry timestamp: ${new Date(expiryTimestamp)}`, `- Installed license key: ${licenseKey}`, '']);\n}\nexport function showExpiredAnnualLicenseKeyError({\n plan,\n licenseKey,\n expiryTimestamp\n}) {\n throw new Error(['MUI X: Expired license key.', '', `Your annual license key to use MUI X ${plan} in non-production environments has expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${plan} component (more details in https://mui.com/r/x-license-annual).`, '', 'To solve the problem you can either:', '', '- Renew your license https://mui.com/r/x-get-license and use the new key', `- Stop making changes to code depending directly or indirectly on MUI X ${plan}'s APIs`, '', 'Note that your license is perpetual in production environments with any version released before your license term ends.', '', `- License key expiry timestamp: ${new Date(expiryTimestamp)}`, `- Installed license key: ${licenseKey}`, ''].join('\\n'));\n}","'use client';\n\nimport * as React from 'react';\nconst MuiLicenseInfoContext = /*#__PURE__*/React.createContext({\n key: undefined\n});\nif (process.env.NODE_ENV !== \"production\") MuiLicenseInfoContext.displayName = \"MuiLicenseInfoContext\";\nexport default MuiLicenseInfoContext;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { sendMuiXTelemetryEvent, muiXTelemetryEvents } from '@mui/x-telemetry';\nimport { verifyLicense } from \"../verifyLicense/verifyLicense.js\";\nimport { LicenseInfo } from \"../utils/licenseInfo.js\";\nimport { showExpiredAnnualGraceLicenseKeyError, showExpiredAnnualLicenseKeyError, showInvalidLicenseKeyError, showMissingLicenseKeyError, showLicenseKeyPlanMismatchError, showExpiredPackageVersionError, showNotAvailableInInitialProPlanError } from \"../utils/licenseErrorMessageUtils.js\";\nimport { LICENSE_STATUS } from \"../utils/licenseStatus.js\";\nimport MuiLicenseInfoContext from \"../Unstable_LicenseInfoProvider/MuiLicenseInfoContext.js\";\nexport const sharedLicenseStatuses = {};\n\n/**\n * Clears the license status cache for all packages.\n * This should not be used in production code, but can be useful for testing purposes.\n */\nexport function clearLicenseStatusCache() {\n for (const packageName in sharedLicenseStatuses) {\n if (Object.prototype.hasOwnProperty.call(sharedLicenseStatuses, packageName)) {\n delete sharedLicenseStatuses[packageName];\n }\n }\n}\nexport function useLicenseVerifier(packageName, releaseInfo) {\n const {\n key: contextKey\n } = React.useContext(MuiLicenseInfoContext);\n return React.useMemo(() => {\n const licenseKey = contextKey ?? LicenseInfo.getLicenseKey();\n\n // Cache the response to not trigger the error twice.\n if (sharedLicenseStatuses[packageName] && sharedLicenseStatuses[packageName].key === licenseKey) {\n return sharedLicenseStatuses[packageName].licenseVerifier;\n }\n const plan = packageName.includes('premium') ? 'Premium' : 'Pro';\n const licenseStatus = verifyLicense({\n releaseInfo,\n licenseKey,\n packageName\n });\n const fullPackageName = `@mui/${packageName}`;\n sendMuiXTelemetryEvent(muiXTelemetryEvents.licenseVerification({\n licenseKey\n }, {\n packageName,\n packageReleaseInfo: releaseInfo,\n licenseStatus: licenseStatus?.status\n }));\n if (licenseStatus.status === LICENSE_STATUS.Valid) {\n // Skip\n } else if (licenseStatus.status === LICENSE_STATUS.Invalid) {\n showInvalidLicenseKeyError();\n } else if (licenseStatus.status === LICENSE_STATUS.NotAvailableInInitialProPlan) {\n showNotAvailableInInitialProPlanError();\n } else if (licenseStatus.status === LICENSE_STATUS.OutOfScope) {\n showLicenseKeyPlanMismatchError({\n packageName: fullPackageName\n });\n } else if (licenseStatus.status === LICENSE_STATUS.NotFound) {\n showMissingLicenseKeyError({\n plan,\n packageName: fullPackageName\n });\n } else if (licenseStatus.status === LICENSE_STATUS.ExpiredAnnualGrace) {\n showExpiredAnnualGraceLicenseKeyError(_extends({\n plan\n }, licenseStatus.meta));\n } else if (licenseStatus.status === LICENSE_STATUS.ExpiredAnnual) {\n showExpiredAnnualLicenseKeyError(_extends({\n plan\n }, licenseStatus.meta));\n } else if (licenseStatus.status === LICENSE_STATUS.ExpiredVersion) {\n showExpiredPackageVersionError({\n packageName: fullPackageName\n });\n } else if (process.env.NODE_ENV !== 'production') {\n throw new Error('missing status handler');\n }\n sharedLicenseStatuses[packageName] = {\n key: licenseKey,\n licenseVerifier: licenseStatus\n };\n return licenseStatus;\n }, [packageName, releaseInfo, contextKey]);\n}","import { fastMemo } from '@mui/x-internals/fastMemo';\nimport { useLicenseVerifier } from \"../useLicenseVerifier/index.js\";\nimport { LICENSE_STATUS } from \"../utils/licenseStatus.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getLicenseErrorMessage(licenseStatus) {\n switch (licenseStatus) {\n case LICENSE_STATUS.ExpiredAnnualGrace:\n case LICENSE_STATUS.ExpiredAnnual:\n return 'MUI X Expired license key';\n case LICENSE_STATUS.ExpiredVersion:\n return 'MUI X Expired package version';\n case LICENSE_STATUS.Invalid:\n return 'MUI X Invalid license key';\n case LICENSE_STATUS.OutOfScope:\n return 'MUI X License key plan mismatch';\n case LICENSE_STATUS.NotAvailableInInitialProPlan:\n return 'MUI X Product not covered by plan';\n case LICENSE_STATUS.NotFound:\n return 'MUI X Missing license key';\n default:\n throw new Error('Unhandled MUI X license status.');\n }\n}\nfunction Watermark(props) {\n const {\n packageName,\n releaseInfo\n } = props;\n const licenseStatus = useLicenseVerifier(packageName, releaseInfo);\n if (licenseStatus.status === LICENSE_STATUS.Valid) {\n return null;\n }\n return /*#__PURE__*/_jsx(\"div\", {\n style: {\n position: 'absolute',\n pointerEvents: 'none',\n color: '#8282829e',\n zIndex: 100000,\n width: '100%',\n textAlign: 'center',\n bottom: '50%',\n right: 0,\n letterSpacing: 5,\n fontSize: 24\n },\n children: getLicenseErrorMessage(licenseStatus.status)\n });\n}\nconst MemoizedWatermark = fastMemo(Watermark);\nexport { MemoizedWatermark as Watermark };","import * as React from 'react';\nimport { fastObjectShallowCompare } from \"../fastObjectShallowCompare/index.js\";\nexport function fastMemo(component) {\n return /*#__PURE__*/React.memo(component, fastObjectShallowCompare);\n}","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why\nconst safeReact = {\n ...React\n};\nconst maybeReactUseId = safeReact.useId;\n\n/**\n *\n * @example
\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n // React.useId() is only available from React 17.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? reactId;\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","import * as React from 'react';\nexport default parseInt(React.version, 10);","import * as React from 'react';\n/* We need to import the shim because React 17 does not support the `useSyncExternalStore` API.\n * More info: https://github.com/mui/mui-x/issues/18303#issuecomment-2958392341 */\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\nimport { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector';\nimport reactMajor from \"../reactMajor/index.js\";\n/* Some tests fail in R18 with the raw useSyncExternalStore. It may be possible to make it work\n * but for now we only enable it for R19+. */\nconst canUseRawUseSyncExternalStore = reactMajor >= 19;\nconst useStoreImplementation = canUseRawUseSyncExternalStore ? useStoreR19 : useStoreLegacy;\nexport function useStore(store, selector, a1, a2, a3) {\n return useStoreImplementation(store, selector, a1, a2, a3);\n}\nfunction useStoreR19(store, selector, a1, a2, a3) {\n const getSelection = React.useCallback(() => selector(store.getSnapshot(), a1, a2, a3), [store, selector, a1, a2, a3]);\n return useSyncExternalStore(store.subscribe, getSelection, getSelection);\n}\nfunction useStoreLegacy(store, selector, a1, a2, a3) {\n return useSyncExternalStoreWithSelector(store.subscribe, store.getSnapshot, store.getSnapshot, state => selector(state, a1, a2, a3));\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { useStore } from \"./useStore.js\";\n/* eslint-disable no-cond-assign */\n\nexport class Store {\n // HACK: `any` fixes adding listeners that accept partial state.\n\n // Internal state to handle recursive `setState()` calls\n\n static create(state) {\n return new Store(state);\n }\n constructor(state) {\n this.state = state;\n this.listeners = new Set();\n this.updateTick = 0;\n }\n subscribe = fn => {\n this.listeners.add(fn);\n return () => {\n this.listeners.delete(fn);\n };\n };\n\n /**\n * Returns the current state snapshot. Meant for usage with `useSyncExternalStore`.\n * If you want to access the state, use the `state` property instead.\n */\n getSnapshot = () => {\n return this.state;\n };\n setState(newState) {\n this.state = newState;\n this.updateTick += 1;\n const currentTick = this.updateTick;\n const it = this.listeners.values();\n let result;\n while (result = it.next(), !result.done) {\n if (currentTick !== this.updateTick) {\n // If the tick has changed, a recursive `setState` call has been made,\n // and it has already notified all listeners.\n return;\n }\n const listener = result.value;\n listener(newState);\n }\n }\n update(changes) {\n for (const key in changes) {\n if (!Object.is(this.state[key], changes[key])) {\n this.setState(_extends({}, this.state, changes));\n return;\n }\n }\n }\n set(key, value) {\n if (!Object.is(this.state[key], value)) {\n this.setState(_extends({}, this.state, {\n [key]: value\n }));\n }\n }\n use = (() => (selector, a1, a2, a3) => {\n return useStore(this, selector, a1, a2, a3);\n })();\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nexport const useChartAnimation = ({\n params,\n store\n}) => {\n React.useEffect(() => {\n store.set('animation', _extends({}, store.state.animation, {\n skip: params.skipAnimation\n }));\n }, [store, params.skipAnimation]);\n const disableAnimation = React.useCallback(() => {\n let disableCalled = false;\n store.set('animation', _extends({}, store.state.animation, {\n skipAnimationRequests: store.state.animation.skipAnimationRequests + 1\n }));\n return () => {\n if (disableCalled) {\n return;\n }\n disableCalled = true;\n store.set('animation', _extends({}, store.state.animation, {\n skipAnimationRequests: store.state.animation.skipAnimationRequests - 1\n }));\n };\n }, [store]);\n useEnhancedEffect(() => {\n // Skip animation test/jsdom\n const isAnimationDisabledEnvironment = typeof window === 'undefined' || !window?.matchMedia;\n if (isAnimationDisabledEnvironment) {\n return undefined;\n }\n let disableAnimationCleanup;\n const handleMediaChange = event => {\n if (event.matches) {\n disableAnimationCleanup = disableAnimation();\n } else {\n disableAnimationCleanup?.();\n }\n };\n const mql = window.matchMedia('(prefers-reduced-motion)');\n handleMediaChange(mql);\n mql.addEventListener('change', handleMediaChange);\n return () => {\n mql.removeEventListener('change', handleMediaChange);\n };\n }, [disableAnimation, store]);\n return {\n instance: {\n disableAnimation\n }\n };\n};\nuseChartAnimation.params = {\n skipAnimation: true\n};\nuseChartAnimation.getDefaultizedParams = ({\n params\n}) => _extends({}, params, {\n skipAnimation: params.skipAnimation ?? false\n});\nuseChartAnimation.getInitialState = ({\n skipAnimation\n}) => {\n const isAnimationDisabledEnvironment = typeof window === 'undefined' || !window?.matchMedia;\n\n // We use the value of `isAnimationDisabledEnvironment` as the initial value of `skipAnimation` to avoid\n // re-rendering the component on environments where matchMedia is not supported, hence skipAnimation will always be true.\n const disableAnimations = process.env.NODE_ENV === 'test' ? isAnimationDisabledEnvironment : false;\n return {\n animation: {\n skip: skipAnimation,\n // By initializing the skipAnimationRequests to 1, we ensure that the animation is always skipped\n skipAnimationRequests: disableAnimations ? 1 : 0\n }\n };\n};","'use client';\n\nimport * as React from 'react';\n\n/**\n * Run an effect only after the first render.\n *\n * @param effect The effect to run after the first render\n * @param deps The dependencies for the effect\n */\nexport function useEffectAfterFirstRender(effect, deps) {\n const isFirstRender = React.useRef(true);\n React.useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return undefined;\n }\n return effect();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n}","export const DEFAULT_X_AXIS_KEY = 'DEFAULT_X_AXIS_KEY';\nexport const DEFAULT_Y_AXIS_KEY = 'DEFAULT_Y_AXIS_KEY';\nexport const DEFAULT_ROTATION_AXIS_KEY = 'DEFAULT_ROTATION_AXIS_KEY';\nexport const DEFAULT_RADIUS_AXIS_KEY = 'DEFAULT_RADIUS_AXIS_KEY';\nexport const DEFAULT_MARGINS = {\n top: 20,\n bottom: 20,\n left: 20,\n right: 20\n};\nexport const DEFAULT_AXIS_SIZE_WIDTH = 45;\nexport const DEFAULT_AXIS_SIZE_HEIGHT = 25;\n\n// How many pixels to add to the default axis size if that axis has a label\nexport const AXIS_LABEL_DEFAULT_HEIGHT = 20;","// src/devModeChecks/identityFunctionCheck.ts\nvar runIdentityFunctionCheck = (resultFunc, inputSelectorsResults, outputSelectorResult) => {\n if (inputSelectorsResults.length === 1 && inputSelectorsResults[0] === outputSelectorResult) {\n let isInputSameAsOutput = false;\n try {\n const emptyObject = {};\n if (resultFunc(emptyObject) === emptyObject)\n isInputSameAsOutput = true;\n } catch {\n }\n if (isInputSameAsOutput) {\n let stack = void 0;\n try {\n throw new Error();\n } catch (e) {\n ;\n ({ stack } = e);\n }\n console.warn(\n \"The result function returned its own inputs without modification. e.g\\n`createSelector([state => state.todos], todos => todos)`\\nThis could lead to inefficient memoization and unnecessary re-renders.\\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.\",\n { stack }\n );\n }\n }\n};\n\n// src/devModeChecks/inputStabilityCheck.ts\nvar runInputStabilityCheck = (inputSelectorResultsObject, options, inputSelectorArgs) => {\n const { memoize, memoizeOptions } = options;\n const { inputSelectorResults, inputSelectorResultsCopy } = inputSelectorResultsObject;\n const createAnEmptyObject = memoize(() => ({}), ...memoizeOptions);\n const areInputSelectorResultsEqual = createAnEmptyObject.apply(null, inputSelectorResults) === createAnEmptyObject.apply(null, inputSelectorResultsCopy);\n if (!areInputSelectorResultsEqual) {\n let stack = void 0;\n try {\n throw new Error();\n } catch (e) {\n ;\n ({ stack } = e);\n }\n console.warn(\n \"An input selector returned a different result when passed same arguments.\\nThis means your output selector will likely run more frequently than intended.\\nAvoid returning a new reference inside your input selector, e.g.\\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`\",\n {\n arguments: inputSelectorArgs,\n firstInputs: inputSelectorResults,\n secondInputs: inputSelectorResultsCopy,\n stack\n }\n );\n }\n};\n\n// src/devModeChecks/setGlobalDevModeChecks.ts\nvar globalDevModeChecks = {\n inputStabilityCheck: \"once\",\n identityFunctionCheck: \"once\"\n};\nvar setGlobalDevModeChecks = (devModeChecks) => {\n Object.assign(globalDevModeChecks, devModeChecks);\n};\n\n// src/utils.ts\nvar NOT_FOUND = /* @__PURE__ */ Symbol(\"NOT_FOUND\");\nfunction assertIsFunction(func, errorMessage = `expected a function, instead received ${typeof func}`) {\n if (typeof func !== \"function\") {\n throw new TypeError(errorMessage);\n }\n}\nfunction assertIsObject(object, errorMessage = `expected an object, instead received ${typeof object}`) {\n if (typeof object !== \"object\") {\n throw new TypeError(errorMessage);\n }\n}\nfunction assertIsArrayOfFunctions(array, errorMessage = `expected all items to be functions, instead received the following types: `) {\n if (!array.every((item) => typeof item === \"function\")) {\n const itemTypes = array.map(\n (item) => typeof item === \"function\" ? `function ${item.name || \"unnamed\"}()` : typeof item\n ).join(\", \");\n throw new TypeError(`${errorMessage}[${itemTypes}]`);\n }\n}\nvar ensureIsArray = (item) => {\n return Array.isArray(item) ? item : [item];\n};\nfunction getDependencies(createSelectorArgs) {\n const dependencies = Array.isArray(createSelectorArgs[0]) ? createSelectorArgs[0] : createSelectorArgs;\n assertIsArrayOfFunctions(\n dependencies,\n `createSelector expects all input-selectors to be functions, but received the following types: `\n );\n return dependencies;\n}\nfunction collectInputSelectorResults(dependencies, inputSelectorArgs) {\n const inputSelectorResults = [];\n const { length } = dependencies;\n for (let i = 0; i < length; i++) {\n inputSelectorResults.push(dependencies[i].apply(null, inputSelectorArgs));\n }\n return inputSelectorResults;\n}\nvar getDevModeChecksExecutionInfo = (firstRun, devModeChecks) => {\n const { identityFunctionCheck, inputStabilityCheck } = {\n ...globalDevModeChecks,\n ...devModeChecks\n };\n return {\n identityFunctionCheck: {\n shouldRun: identityFunctionCheck === \"always\" || identityFunctionCheck === \"once\" && firstRun,\n run: runIdentityFunctionCheck\n },\n inputStabilityCheck: {\n shouldRun: inputStabilityCheck === \"always\" || inputStabilityCheck === \"once\" && firstRun,\n run: runInputStabilityCheck\n }\n };\n};\n\n// src/autotrackMemoize/autotracking.ts\nvar $REVISION = 0;\nvar CURRENT_TRACKER = null;\nvar Cell = class {\n revision = $REVISION;\n _value;\n _lastValue;\n _isEqual = tripleEq;\n constructor(initialValue, isEqual = tripleEq) {\n this._value = this._lastValue = initialValue;\n this._isEqual = isEqual;\n }\n // Whenever a storage value is read, it'll add itself to the current tracker if\n // one exists, entangling its state with that cache.\n get value() {\n CURRENT_TRACKER?.add(this);\n return this._value;\n }\n // Whenever a storage value is updated, we bump the global revision clock,\n // assign the revision for this storage to the new value, _and_ we schedule a\n // rerender. This is important, and it's what makes autotracking _pull_\n // based. We don't actively tell the caches which depend on the storage that\n // anything has happened. Instead, we recompute the caches when needed.\n set value(newValue) {\n if (this.value === newValue)\n return;\n this._value = newValue;\n this.revision = ++$REVISION;\n }\n};\nfunction tripleEq(a, b) {\n return a === b;\n}\nvar TrackingCache = class {\n _cachedValue;\n _cachedRevision = -1;\n _deps = [];\n hits = 0;\n fn;\n constructor(fn) {\n this.fn = fn;\n }\n clear() {\n this._cachedValue = void 0;\n this._cachedRevision = -1;\n this._deps = [];\n this.hits = 0;\n }\n get value() {\n if (this.revision > this._cachedRevision) {\n const { fn } = this;\n const currentTracker = /* @__PURE__ */ new Set();\n const prevTracker = CURRENT_TRACKER;\n CURRENT_TRACKER = currentTracker;\n this._cachedValue = fn();\n CURRENT_TRACKER = prevTracker;\n this.hits++;\n this._deps = Array.from(currentTracker);\n this._cachedRevision = this.revision;\n }\n CURRENT_TRACKER?.add(this);\n return this._cachedValue;\n }\n get revision() {\n return Math.max(...this._deps.map((d) => d.revision), 0);\n }\n};\nfunction getValue(cell) {\n if (!(cell instanceof Cell)) {\n console.warn(\"Not a valid cell! \", cell);\n }\n return cell.value;\n}\nfunction setValue(storage, value) {\n if (!(storage instanceof Cell)) {\n throw new TypeError(\n \"setValue must be passed a tracked store created with `createStorage`.\"\n );\n }\n storage.value = storage._lastValue = value;\n}\nfunction createCell(initialValue, isEqual = tripleEq) {\n return new Cell(initialValue, isEqual);\n}\nfunction createCache(fn) {\n assertIsFunction(\n fn,\n \"the first parameter to `createCache` must be a function\"\n );\n return new TrackingCache(fn);\n}\n\n// src/autotrackMemoize/tracking.ts\nvar neverEq = (a, b) => false;\nfunction createTag() {\n return createCell(null, neverEq);\n}\nfunction dirtyTag(tag, value) {\n setValue(tag, value);\n}\nvar consumeCollection = (node) => {\n let tag = node.collectionTag;\n if (tag === null) {\n tag = node.collectionTag = createTag();\n }\n getValue(tag);\n};\nvar dirtyCollection = (node) => {\n const tag = node.collectionTag;\n if (tag !== null) {\n dirtyTag(tag, null);\n }\n};\n\n// src/autotrackMemoize/proxy.ts\nvar REDUX_PROXY_LABEL = Symbol();\nvar nextId = 0;\nvar proto = Object.getPrototypeOf({});\nvar ObjectTreeNode = class {\n constructor(value) {\n this.value = value;\n this.value = value;\n this.tag.value = value;\n }\n proxy = new Proxy(this, objectProxyHandler);\n tag = createTag();\n tags = {};\n children = {};\n collectionTag = null;\n id = nextId++;\n};\nvar objectProxyHandler = {\n get(node, key) {\n function calculateResult() {\n const { value } = node;\n const childValue = Reflect.get(value, key);\n if (typeof key === \"symbol\") {\n return childValue;\n }\n if (key in proto) {\n return childValue;\n }\n if (typeof childValue === \"object\" && childValue !== null) {\n let childNode = node.children[key];\n if (childNode === void 0) {\n childNode = node.children[key] = createNode(childValue);\n }\n if (childNode.tag) {\n getValue(childNode.tag);\n }\n return childNode.proxy;\n } else {\n let tag = node.tags[key];\n if (tag === void 0) {\n tag = node.tags[key] = createTag();\n tag.value = childValue;\n }\n getValue(tag);\n return childValue;\n }\n }\n const res = calculateResult();\n return res;\n },\n ownKeys(node) {\n consumeCollection(node);\n return Reflect.ownKeys(node.value);\n },\n getOwnPropertyDescriptor(node, prop) {\n return Reflect.getOwnPropertyDescriptor(node.value, prop);\n },\n has(node, prop) {\n return Reflect.has(node.value, prop);\n }\n};\nvar ArrayTreeNode = class {\n constructor(value) {\n this.value = value;\n this.value = value;\n this.tag.value = value;\n }\n proxy = new Proxy([this], arrayProxyHandler);\n tag = createTag();\n tags = {};\n children = {};\n collectionTag = null;\n id = nextId++;\n};\nvar arrayProxyHandler = {\n get([node], key) {\n if (key === \"length\") {\n consumeCollection(node);\n }\n return objectProxyHandler.get(node, key);\n },\n ownKeys([node]) {\n return objectProxyHandler.ownKeys(node);\n },\n getOwnPropertyDescriptor([node], prop) {\n return objectProxyHandler.getOwnPropertyDescriptor(node, prop);\n },\n has([node], prop) {\n return objectProxyHandler.has(node, prop);\n }\n};\nfunction createNode(value) {\n if (Array.isArray(value)) {\n return new ArrayTreeNode(value);\n }\n return new ObjectTreeNode(value);\n}\nfunction updateNode(node, newValue) {\n const { value, tags, children } = node;\n node.value = newValue;\n if (Array.isArray(value) && Array.isArray(newValue) && value.length !== newValue.length) {\n dirtyCollection(node);\n } else {\n if (value !== newValue) {\n let oldKeysSize = 0;\n let newKeysSize = 0;\n let anyKeysAdded = false;\n for (const _key in value) {\n oldKeysSize++;\n }\n for (const key in newValue) {\n newKeysSize++;\n if (!(key in value)) {\n anyKeysAdded = true;\n break;\n }\n }\n const isDifferent = anyKeysAdded || oldKeysSize !== newKeysSize;\n if (isDifferent) {\n dirtyCollection(node);\n }\n }\n }\n for (const key in tags) {\n const childValue = value[key];\n const newChildValue = newValue[key];\n if (childValue !== newChildValue) {\n dirtyCollection(node);\n dirtyTag(tags[key], newChildValue);\n }\n if (typeof newChildValue === \"object\" && newChildValue !== null) {\n delete tags[key];\n }\n }\n for (const key in children) {\n const childNode = children[key];\n const newChildValue = newValue[key];\n const childValue = childNode.value;\n if (childValue === newChildValue) {\n continue;\n } else if (typeof newChildValue === \"object\" && newChildValue !== null) {\n updateNode(childNode, newChildValue);\n } else {\n deleteNode(childNode);\n delete children[key];\n }\n }\n}\nfunction deleteNode(node) {\n if (node.tag) {\n dirtyTag(node.tag, null);\n }\n dirtyCollection(node);\n for (const key in node.tags) {\n dirtyTag(node.tags[key], null);\n }\n for (const key in node.children) {\n deleteNode(node.children[key]);\n }\n}\n\n// src/lruMemoize.ts\nfunction createSingletonCache(equals) {\n let entry;\n return {\n get(key) {\n if (entry && equals(entry.key, key)) {\n return entry.value;\n }\n return NOT_FOUND;\n },\n put(key, value) {\n entry = { key, value };\n },\n getEntries() {\n return entry ? [entry] : [];\n },\n clear() {\n entry = void 0;\n }\n };\n}\nfunction createLruCache(maxSize, equals) {\n let entries = [];\n function get(key) {\n const cacheIndex = entries.findIndex((entry) => equals(key, entry.key));\n if (cacheIndex > -1) {\n const entry = entries[cacheIndex];\n if (cacheIndex > 0) {\n entries.splice(cacheIndex, 1);\n entries.unshift(entry);\n }\n return entry.value;\n }\n return NOT_FOUND;\n }\n function put(key, value) {\n if (get(key) === NOT_FOUND) {\n entries.unshift({ key, value });\n if (entries.length > maxSize) {\n entries.pop();\n }\n }\n }\n function getEntries() {\n return entries;\n }\n function clear() {\n entries = [];\n }\n return { get, put, getEntries, clear };\n}\nvar referenceEqualityCheck = (a, b) => a === b;\nfunction createCacheKeyComparator(equalityCheck) {\n return function areArgumentsShallowlyEqual(prev, next) {\n if (prev === null || next === null || prev.length !== next.length) {\n return false;\n }\n const { length } = prev;\n for (let i = 0; i < length; i++) {\n if (!equalityCheck(prev[i], next[i])) {\n return false;\n }\n }\n return true;\n };\n}\nfunction lruMemoize(func, equalityCheckOrOptions) {\n const providedOptions = typeof equalityCheckOrOptions === \"object\" ? equalityCheckOrOptions : { equalityCheck: equalityCheckOrOptions };\n const {\n equalityCheck = referenceEqualityCheck,\n maxSize = 1,\n resultEqualityCheck\n } = providedOptions;\n const comparator = createCacheKeyComparator(equalityCheck);\n let resultsCount = 0;\n const cache = maxSize <= 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator);\n function memoized() {\n let value = cache.get(arguments);\n if (value === NOT_FOUND) {\n value = func.apply(null, arguments);\n resultsCount++;\n if (resultEqualityCheck) {\n const entries = cache.getEntries();\n const matchingEntry = entries.find(\n (entry) => resultEqualityCheck(entry.value, value)\n );\n if (matchingEntry) {\n value = matchingEntry.value;\n resultsCount !== 0 && resultsCount--;\n }\n }\n cache.put(arguments, value);\n }\n return value;\n }\n memoized.clearCache = () => {\n cache.clear();\n memoized.resetResultsCount();\n };\n memoized.resultsCount = () => resultsCount;\n memoized.resetResultsCount = () => {\n resultsCount = 0;\n };\n return memoized;\n}\n\n// src/autotrackMemoize/autotrackMemoize.ts\nfunction autotrackMemoize(func) {\n const node = createNode(\n []\n );\n let lastArgs = null;\n const shallowEqual = createCacheKeyComparator(referenceEqualityCheck);\n const cache = createCache(() => {\n const res = func.apply(null, node.proxy);\n return res;\n });\n function memoized() {\n if (!shallowEqual(lastArgs, arguments)) {\n updateNode(node, arguments);\n lastArgs = arguments;\n }\n return cache.value;\n }\n memoized.clearCache = () => {\n return cache.clear();\n };\n return memoized;\n}\n\n// src/weakMapMemoize.ts\nvar StrongRef = class {\n constructor(value) {\n this.value = value;\n }\n deref() {\n return this.value;\n }\n};\nvar Ref = typeof WeakRef !== \"undefined\" ? WeakRef : StrongRef;\nvar UNTERMINATED = 0;\nvar TERMINATED = 1;\nfunction createCacheNode() {\n return {\n s: UNTERMINATED,\n v: void 0,\n o: null,\n p: null\n };\n}\nfunction weakMapMemoize(func, options = {}) {\n let fnNode = createCacheNode();\n const { resultEqualityCheck } = options;\n let lastResult;\n let resultsCount = 0;\n function memoized() {\n let cacheNode = fnNode;\n const { length } = arguments;\n for (let i = 0, l = length; i < l; i++) {\n const arg = arguments[i];\n if (typeof arg === \"function\" || typeof arg === \"object\" && arg !== null) {\n let objectCache = cacheNode.o;\n if (objectCache === null) {\n cacheNode.o = objectCache = /* @__PURE__ */ new WeakMap();\n }\n const objectNode = objectCache.get(arg);\n if (objectNode === void 0) {\n cacheNode = createCacheNode();\n objectCache.set(arg, cacheNode);\n } else {\n cacheNode = objectNode;\n }\n } else {\n let primitiveCache = cacheNode.p;\n if (primitiveCache === null) {\n cacheNode.p = primitiveCache = /* @__PURE__ */ new Map();\n }\n const primitiveNode = primitiveCache.get(arg);\n if (primitiveNode === void 0) {\n cacheNode = createCacheNode();\n primitiveCache.set(arg, cacheNode);\n } else {\n cacheNode = primitiveNode;\n }\n }\n }\n const terminatedNode = cacheNode;\n let result;\n if (cacheNode.s === TERMINATED) {\n result = cacheNode.v;\n } else {\n result = func.apply(null, arguments);\n resultsCount++;\n if (resultEqualityCheck) {\n const lastResultValue = lastResult?.deref?.() ?? lastResult;\n if (lastResultValue != null && resultEqualityCheck(lastResultValue, result)) {\n result = lastResultValue;\n resultsCount !== 0 && resultsCount--;\n }\n const needsWeakRef = typeof result === \"object\" && result !== null || typeof result === \"function\";\n lastResult = needsWeakRef ? new Ref(result) : result;\n }\n }\n terminatedNode.s = TERMINATED;\n terminatedNode.v = result;\n return result;\n }\n memoized.clearCache = () => {\n fnNode = createCacheNode();\n memoized.resetResultsCount();\n };\n memoized.resultsCount = () => resultsCount;\n memoized.resetResultsCount = () => {\n resultsCount = 0;\n };\n return memoized;\n}\n\n// src/createSelectorCreator.ts\nfunction createSelectorCreator(memoizeOrOptions, ...memoizeOptionsFromArgs) {\n const createSelectorCreatorOptions = typeof memoizeOrOptions === \"function\" ? {\n memoize: memoizeOrOptions,\n memoizeOptions: memoizeOptionsFromArgs\n } : memoizeOrOptions;\n const createSelector2 = (...createSelectorArgs) => {\n let recomputations = 0;\n let dependencyRecomputations = 0;\n let lastResult;\n let directlyPassedOptions = {};\n let resultFunc = createSelectorArgs.pop();\n if (typeof resultFunc === \"object\") {\n directlyPassedOptions = resultFunc;\n resultFunc = createSelectorArgs.pop();\n }\n assertIsFunction(\n resultFunc,\n `createSelector expects an output function after the inputs, but received: [${typeof resultFunc}]`\n );\n const combinedOptions = {\n ...createSelectorCreatorOptions,\n ...directlyPassedOptions\n };\n const {\n memoize,\n memoizeOptions = [],\n argsMemoize = weakMapMemoize,\n argsMemoizeOptions = [],\n devModeChecks = {}\n } = combinedOptions;\n const finalMemoizeOptions = ensureIsArray(memoizeOptions);\n const finalArgsMemoizeOptions = ensureIsArray(argsMemoizeOptions);\n const dependencies = getDependencies(createSelectorArgs);\n const memoizedResultFunc = memoize(function recomputationWrapper() {\n recomputations++;\n return resultFunc.apply(\n null,\n arguments\n );\n }, ...finalMemoizeOptions);\n let firstRun = true;\n const selector = argsMemoize(function dependenciesChecker() {\n dependencyRecomputations++;\n const inputSelectorResults = collectInputSelectorResults(\n dependencies,\n arguments\n );\n lastResult = memoizedResultFunc.apply(null, inputSelectorResults);\n if (process.env.NODE_ENV !== \"production\") {\n const { identityFunctionCheck, inputStabilityCheck } = getDevModeChecksExecutionInfo(firstRun, devModeChecks);\n if (identityFunctionCheck.shouldRun) {\n identityFunctionCheck.run(\n resultFunc,\n inputSelectorResults,\n lastResult\n );\n }\n if (inputStabilityCheck.shouldRun) {\n const inputSelectorResultsCopy = collectInputSelectorResults(\n dependencies,\n arguments\n );\n inputStabilityCheck.run(\n { inputSelectorResults, inputSelectorResultsCopy },\n { memoize, memoizeOptions: finalMemoizeOptions },\n arguments\n );\n }\n if (firstRun)\n firstRun = false;\n }\n return lastResult;\n }, ...finalArgsMemoizeOptions);\n return Object.assign(selector, {\n resultFunc,\n memoizedResultFunc,\n dependencies,\n dependencyRecomputations: () => dependencyRecomputations,\n resetDependencyRecomputations: () => {\n dependencyRecomputations = 0;\n },\n lastResult: () => lastResult,\n recomputations: () => recomputations,\n resetRecomputations: () => {\n recomputations = 0;\n },\n memoize,\n argsMemoize\n });\n };\n Object.assign(createSelector2, {\n withTypes: () => createSelector2\n });\n return createSelector2;\n}\nvar createSelector = /* @__PURE__ */ createSelectorCreator(weakMapMemoize);\n\n// src/createStructuredSelector.ts\nvar createStructuredSelector = Object.assign(\n (inputSelectorsObject, selectorCreator = createSelector) => {\n assertIsObject(\n inputSelectorsObject,\n `createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof inputSelectorsObject}`\n );\n const inputSelectorKeys = Object.keys(inputSelectorsObject);\n const dependencies = inputSelectorKeys.map(\n (key) => inputSelectorsObject[key]\n );\n const structuredSelector = selectorCreator(\n dependencies,\n (...inputSelectorResults) => {\n return inputSelectorResults.reduce((composition, value, index) => {\n composition[inputSelectorKeys[index]] = value;\n return composition;\n }, {});\n }\n );\n return structuredSelector;\n },\n { withTypes: () => createStructuredSelector }\n);\nexport {\n createSelector,\n createSelectorCreator,\n createStructuredSelector,\n lruMemoize,\n referenceEqualityCheck,\n setGlobalDevModeChecks,\n autotrackMemoize as unstable_autotrackMemoize,\n weakMapMemoize\n};\n//# sourceMappingURL=reselect.mjs.map","import { lruMemoize, createSelectorCreator } from 'reselect';\n/* eslint-disable no-underscore-dangle */ // __cacheKey__\n\nconst reselectCreateSelector = createSelectorCreator({\n memoize: lruMemoize,\n memoizeOptions: {\n maxSize: 1,\n equalityCheck: Object.is\n }\n});\n/* eslint-disable id-denylist */\nexport const createSelector = (a, b, c, d, e, f, g, h, ...other) => {\n if (other.length > 0) {\n throw new Error('Unsupported number of selectors');\n }\n let selector;\n if (a && b && c && d && e && f && g && h) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n const vc = c(state, a1, a2, a3);\n const vd = d(state, a1, a2, a3);\n const ve = e(state, a1, a2, a3);\n const vf = f(state, a1, a2, a3);\n const vg = g(state, a1, a2, a3);\n return h(va, vb, vc, vd, ve, vf, vg, a1, a2, a3);\n };\n } else if (a && b && c && d && e && f && g) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n const vc = c(state, a1, a2, a3);\n const vd = d(state, a1, a2, a3);\n const ve = e(state, a1, a2, a3);\n const vf = f(state, a1, a2, a3);\n return g(va, vb, vc, vd, ve, vf, a1, a2, a3);\n };\n } else if (a && b && c && d && e && f) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n const vc = c(state, a1, a2, a3);\n const vd = d(state, a1, a2, a3);\n const ve = e(state, a1, a2, a3);\n return f(va, vb, vc, vd, ve, a1, a2, a3);\n };\n } else if (a && b && c && d && e) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n const vc = c(state, a1, a2, a3);\n const vd = d(state, a1, a2, a3);\n return e(va, vb, vc, vd, a1, a2, a3);\n };\n } else if (a && b && c && d) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n const vc = c(state, a1, a2, a3);\n return d(va, vb, vc, a1, a2, a3);\n };\n } else if (a && b && c) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n return c(va, vb, a1, a2, a3);\n };\n } else if (a && b) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n return b(va, a1, a2, a3);\n };\n } else if (a) {\n selector = a;\n } else {\n throw new Error('Missing arguments');\n }\n return selector;\n};\n/* eslint-enable id-denylist */\n\nexport const createSelectorMemoizedWithOptions = options => (...inputs) => {\n const cache = new WeakMap();\n let nextCacheId = 1;\n const combiner = inputs[inputs.length - 1];\n const nSelectors = inputs.length - 1 || 1;\n // (s1, s2, ..., sN, a1, a2, a3) => { ... }\n const argsLength = Math.max(combiner.length - nSelectors, 0);\n if (argsLength > 3) {\n throw new Error('Unsupported number of arguments');\n }\n\n // prettier-ignore\n const selector = (state, a1, a2, a3) => {\n let cacheKey = state.__cacheKey__;\n if (!cacheKey) {\n cacheKey = {\n id: nextCacheId\n };\n state.__cacheKey__ = cacheKey;\n nextCacheId += 1;\n }\n let fn = cache.get(cacheKey);\n if (!fn) {\n const selectors = inputs.length === 1 ? [x => x, combiner] : inputs;\n let reselectArgs = inputs;\n const selectorArgs = [undefined, undefined, undefined];\n switch (argsLength) {\n case 0:\n break;\n case 1:\n {\n reselectArgs = [...selectors.slice(0, -1), () => selectorArgs[0], combiner];\n break;\n }\n case 2:\n {\n reselectArgs = [...selectors.slice(0, -1), () => selectorArgs[0], () => selectorArgs[1], combiner];\n break;\n }\n case 3:\n {\n reselectArgs = [...selectors.slice(0, -1), () => selectorArgs[0], () => selectorArgs[1], () => selectorArgs[2], combiner];\n break;\n }\n default:\n throw new Error('Unsupported number of arguments');\n }\n if (options) {\n reselectArgs = [...reselectArgs, options];\n }\n fn = reselectCreateSelector(...reselectArgs);\n fn.selectorArgs = selectorArgs;\n cache.set(cacheKey, fn);\n }\n\n /* eslint-disable no-fallthrough */\n\n switch (argsLength) {\n case 3:\n fn.selectorArgs[2] = a3;\n case 2:\n fn.selectorArgs[1] = a2;\n case 1:\n fn.selectorArgs[0] = a1;\n case 0:\n default:\n }\n switch (argsLength) {\n case 0:\n return fn(state);\n case 1:\n return fn(state, a1);\n case 2:\n return fn(state, a1, a2);\n case 3:\n return fn(state, a1, a2, a3);\n default:\n throw new Error('unreachable');\n }\n };\n return selector;\n};\nexport const createSelectorMemoized = createSelectorMemoizedWithOptions();","export const selectorChartCartesianAxisState = state => state.cartesianAxis;\nexport const selectorChartRawXAxis = state => state.cartesianAxis?.x;\nexport const selectorChartRawYAxis = state => state.cartesianAxis?.y;","import { createSelector, createSelectorMemoized } from '@mui/x-internals/store';\nimport { selectorChartRawXAxis, selectorChartRawYAxis } from \"./useChartCartesianAxisLayout.selectors.js\";\nexport const selectorChartLeftAxisSize = createSelector(selectorChartRawYAxis, function selectorChartLeftAxisSize(yAxis) {\n return (yAxis ?? []).reduce((acc, axis) => axis.position === 'left' ? acc + (axis.width || 0) + (axis.zoom?.slider.enabled ? axis.zoom.slider.size : 0) : acc, 0);\n});\nexport const selectorChartRightAxisSize = createSelector(selectorChartRawYAxis, function selectorChartRightAxisSize(yAxis) {\n return (yAxis ?? []).reduce((acc, axis) => axis.position === 'right' ? acc + (axis.width || 0) + (axis.zoom?.slider.enabled ? axis.zoom.slider.size : 0) : acc, 0);\n});\nexport const selectorChartTopAxisSize = createSelector(selectorChartRawXAxis, function selectorChartTopAxisSize(xAxis) {\n return (xAxis ?? []).reduce((acc, axis) => axis.position === 'top' ? acc + (axis.height || 0) + (axis.zoom?.slider.enabled ? axis.zoom.slider.size : 0) : acc, 0);\n});\nexport const selectorChartBottomAxisSize = createSelector(selectorChartRawXAxis, function selectorChartBottomAxisSize(xAxis) {\n return (xAxis ?? []).reduce((acc, axis) => axis.position === 'bottom' ? acc + (axis.height || 0) + (axis.zoom?.slider.enabled ? axis.zoom.slider.size : 0) : acc, 0);\n});\nexport const selectorChartAxisSizes = createSelectorMemoized(selectorChartLeftAxisSize, selectorChartRightAxisSize, selectorChartTopAxisSize, selectorChartBottomAxisSize, function selectorChartAxisSizes(left, right, top, bottom) {\n return {\n left,\n right,\n top,\n bottom\n };\n});","import { createSelector, createSelectorMemoized } from '@mui/x-internals/store';\nimport { selectorChartAxisSizes } from \"../../featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js\";\nexport const selectorChartDimensionsState = state => state.dimensions;\nexport const selectorChartMargin = state => state.dimensions.margin;\nexport const selectorChartDrawingArea = createSelectorMemoized(selectorChartDimensionsState, selectorChartMargin, selectorChartAxisSizes, function selectorChartDrawingArea({\n width,\n height\n}, {\n top: marginTop,\n right: marginRight,\n bottom: marginBottom,\n left: marginLeft\n}, {\n left: axisSizeLeft,\n right: axisSizeRight,\n top: axisSizeTop,\n bottom: axisSizeBottom\n}) {\n return {\n width: width - marginLeft - marginRight - axisSizeLeft - axisSizeRight,\n left: marginLeft + axisSizeLeft,\n right: marginRight + axisSizeRight,\n height: height - marginTop - marginBottom - axisSizeTop - axisSizeBottom,\n top: marginTop + axisSizeTop,\n bottom: marginBottom + axisSizeBottom\n };\n});\nexport const selectorChartSvgWidth = createSelector(selectorChartDimensionsState, dimensionsState => dimensionsState.width);\nexport const selectorChartSvgHeight = createSelector(selectorChartDimensionsState, dimensionsState => dimensionsState.height);\nexport const selectorChartPropsWidth = createSelector(selectorChartDimensionsState, dimensionsState => dimensionsState.propsWidth);\nexport const selectorChartPropsHeight = createSelector(selectorChartDimensionsState, dimensionsState => dimensionsState.propsHeight);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport function defaultizeMargin(input, defaultMargin) {\n if (typeof input === 'number') {\n return {\n top: input,\n bottom: input,\n left: input,\n right: input\n };\n }\n if (defaultMargin) {\n return _extends({}, defaultMargin, input);\n }\n return input;\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useEffectAfterFirstRender } from '@mui/x-internals/useEffectAfterFirstRender';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport ownerWindow from '@mui/utils/ownerWindow';\nimport { DEFAULT_MARGINS } from \"../../../../constants/index.js\";\nimport { selectorChartDrawingArea } from \"./useChartDimensions.selectors.js\";\nimport { defaultizeMargin } from \"../../../defaultizeMargin.js\";\nconst MAX_COMPUTE_RUN = 10;\nexport const useChartDimensions = ({\n params,\n store,\n svgRef\n}) => {\n const hasInSize = params.width !== undefined && params.height !== undefined;\n const stateRef = React.useRef({\n displayError: false,\n initialCompute: true,\n computeRun: 0\n });\n // States only used for the initialization of the size.\n const [innerWidth, setInnerWidth] = React.useState(0);\n const [innerHeight, setInnerHeight] = React.useState(0);\n const computeSize = React.useCallback(() => {\n const mainEl = svgRef?.current;\n if (!mainEl) {\n return {};\n }\n const win = ownerWindow(mainEl);\n const computedStyle = win.getComputedStyle(mainEl);\n const newHeight = Math.floor(parseFloat(computedStyle.height)) || 0;\n const newWidth = Math.floor(parseFloat(computedStyle.width)) || 0;\n if (store.state.dimensions.width !== newWidth || store.state.dimensions.height !== newHeight) {\n store.set('dimensions', {\n margin: {\n top: params.margin.top,\n right: params.margin.right,\n bottom: params.margin.bottom,\n left: params.margin.left\n },\n width: params.width ?? newWidth,\n height: params.height ?? newHeight,\n propsWidth: params.width,\n propsHeight: params.height\n });\n }\n return {\n height: newHeight,\n width: newWidth\n };\n }, [store, svgRef, params.height, params.width,\n // Margin is an object, so we need to include all the properties to prevent infinite loops.\n params.margin.left, params.margin.right, params.margin.top, params.margin.bottom]);\n useEffectAfterFirstRender(() => {\n const width = params.width ?? store.state.dimensions.width;\n const height = params.height ?? store.state.dimensions.height;\n store.set('dimensions', {\n margin: {\n top: params.margin.top,\n right: params.margin.right,\n bottom: params.margin.bottom,\n left: params.margin.left\n },\n width,\n height,\n propsHeight: params.height,\n propsWidth: params.width\n });\n }, [store, params.height, params.width,\n // Margin is an object, so we need to include all the properties to prevent infinite loops.\n params.margin.left, params.margin.right, params.margin.top, params.margin.bottom]);\n React.useEffect(() => {\n // Ensure the error detection occurs after the first rendering.\n stateRef.current.displayError = true;\n }, []);\n\n // This effect is used to compute the size of the container on the initial render.\n // It is not bound to the raf loop to avoid an unwanted \"resize\" event.\n // https://github.com/mui/mui-x/issues/13477#issuecomment-2336634785\n useEnhancedEffect(() => {\n // computeRun is used to avoid infinite loops.\n if (hasInSize || !stateRef.current.initialCompute || stateRef.current.computeRun > MAX_COMPUTE_RUN) {\n return;\n }\n const computedSize = computeSize();\n if (computedSize.width !== innerWidth || computedSize.height !== innerHeight) {\n stateRef.current.computeRun += 1;\n if (computedSize.width !== undefined) {\n setInnerWidth(computedSize.width);\n }\n if (computedSize.height !== undefined) {\n setInnerHeight(computedSize.height);\n }\n } else if (stateRef.current.initialCompute) {\n stateRef.current.initialCompute = false;\n }\n }, [innerHeight, innerWidth, computeSize, hasInSize]);\n useEnhancedEffect(() => {\n if (hasInSize) {\n return () => {};\n }\n computeSize();\n const elementToObserve = svgRef.current;\n if (typeof ResizeObserver === 'undefined') {\n return () => {};\n }\n let animationFrame;\n const observer = new ResizeObserver(() => {\n // See https://github.com/mui/mui-x/issues/8733\n animationFrame = requestAnimationFrame(() => {\n computeSize();\n });\n });\n if (elementToObserve) {\n observer.observe(elementToObserve);\n }\n return () => {\n if (animationFrame) {\n cancelAnimationFrame(animationFrame);\n }\n if (elementToObserve) {\n observer.unobserve(elementToObserve);\n }\n };\n }, [computeSize, hasInSize, svgRef]);\n if (process.env.NODE_ENV !== 'production') {\n if (stateRef.current.displayError && params.width === undefined && innerWidth === 0) {\n console.error(`MUI X Charts: ChartContainer does not have \\`width\\` prop, and its container has no \\`width\\` defined.`);\n stateRef.current.displayError = false;\n }\n if (stateRef.current.displayError && params.height === undefined && innerHeight === 0) {\n console.error(`MUI X Charts: ChartContainer does not have \\`height\\` prop, and its container has no \\`height\\` defined.`);\n stateRef.current.displayError = false;\n }\n }\n const drawingArea = store.use(selectorChartDrawingArea);\n const isXInside = React.useCallback(x => x >= drawingArea.left - 1 && x <= drawingArea.left + drawingArea.width, [drawingArea.left, drawingArea.width]);\n const isYInside = React.useCallback(y => y >= drawingArea.top - 1 && y <= drawingArea.top + drawingArea.height, [drawingArea.height, drawingArea.top]);\n const isPointInside = React.useCallback((x, y, targetElement) => {\n // For element allowed to overflow, wrapping them in make them fully part of the drawing area.\n if (targetElement && 'closest' in targetElement && targetElement.closest('[data-drawing-container]')) {\n return true;\n }\n return isXInside(x) && isYInside(y);\n }, [isXInside, isYInside]);\n return {\n instance: {\n isPointInside,\n isXInside,\n isYInside\n }\n };\n};\nuseChartDimensions.params = {\n width: true,\n height: true,\n margin: true\n};\nuseChartDimensions.getDefaultizedParams = ({\n params\n}) => _extends({}, params, {\n margin: defaultizeMargin(params.margin, DEFAULT_MARGINS)\n});\nuseChartDimensions.getInitialState = ({\n width,\n height,\n margin\n}) => {\n return {\n dimensions: {\n margin,\n width: width ?? 0,\n height: height ?? 0,\n propsWidth: width,\n propsHeight: height\n }\n };\n};","import ownerDocument from \"../ownerDocument/index.js\";\nexport default function ownerWindow(node) {\n const doc = ownerDocument(node);\n return doc.defaultView || window;\n}","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","'use client';\n\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nexport const useChartExperimentalFeatures = ({\n params,\n store\n}) => {\n useEnhancedEffect(() => {\n store.set('experimentalFeatures', params.experimentalFeatures);\n }, [store, params.experimentalFeatures]);\n return {};\n};\nuseChartExperimentalFeatures.params = {\n experimentalFeatures: true\n};\nuseChartExperimentalFeatures.getInitialState = ({\n experimentalFeatures\n}) => {\n return {\n experimentalFeatures\n };\n};","let globalChartDefaultId = 0;\nexport const createChartDefaultId = () => {\n globalChartDefaultId += 1;\n return `mui-chart-${globalChartDefaultId}`;\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { createChartDefaultId } from \"./useChartId.utils.js\";\nexport const useChartId = ({\n params,\n store\n}) => {\n React.useEffect(() => {\n if (params.id === undefined || params.id === store.state.id.providedChartId && store.state.id.chartId !== undefined) {\n return;\n }\n store.set('id', _extends({}, store.state.id, {\n chartId: params.id ?? createChartDefaultId()\n }));\n }, [store, params.id]);\n return {};\n};\nuseChartId.params = {\n id: true\n};\nuseChartId.getInitialState = ({\n id\n}) => ({\n id: {\n chartId: id,\n providedChartId: id\n }\n});","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from \"../useEnhancedEffect/index.js\";\n\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nexport default useEventCallback;","export const rainbowSurgePaletteLight = ['#4254FB', '#FFB422', '#FA4F58', '#0DBEFF', '#22BF75', '#FA83B4', '#FF7511'];\nexport const rainbowSurgePaletteDark = ['#495AFB', '#FFC758', '#F35865', '#30C8FF', '#44CE8D', '#F286B3', '#FF8C39'];\nexport const rainbowSurgePalette = mode => mode === 'dark' ? rainbowSurgePaletteDark : rainbowSurgePaletteLight;","/**\n * This method groups series by type and adds defaultized values such as the ids and colors.\n * It does NOT apply the series processors - that happens in a selector.\n * @param series The array of series provided by the developer\n * @param colors The color palette used to defaultize series colors\n * @returns An object structuring all the series by type with default values.\n */\nexport const defaultizeSeries = ({\n series,\n colors,\n seriesConfig\n}) => {\n // Group series by type\n const seriesGroups = {};\n series.forEach((seriesData, seriesIndex) => {\n const seriesWithDefaultValues = seriesConfig[seriesData.type].getSeriesWithDefaultValues(seriesData, seriesIndex, colors);\n const id = seriesWithDefaultValues.id;\n if (seriesGroups[seriesData.type] === undefined) {\n seriesGroups[seriesData.type] = {\n series: {},\n seriesOrder: []\n };\n }\n if (seriesGroups[seriesData.type]?.series[id] !== undefined) {\n throw new Error(`MUI X Charts: series' id \"${id}\" is not unique.`);\n }\n seriesGroups[seriesData.type].series[id] = seriesWithDefaultValues;\n seriesGroups[seriesData.type].seriesOrder.push(id);\n });\n return seriesGroups;\n};\n\n/**\n * Applies series processors to the defaultized series groups.\n * This should be called in a selector to compute processed series on-demand.\n * @param defaultizedSeries The defaultized series groups\n * @param seriesConfig The series configuration\n * @param dataset The optional dataset\n * @returns Processed series with all transformations applied\n */\nexport const applySeriesProcessors = (defaultizedSeries, seriesConfig, dataset) => {\n const processedSeries = {};\n\n // Apply formatter on a type group\n Object.keys(seriesConfig).forEach(type => {\n const group = defaultizedSeries[type];\n if (group !== undefined) {\n processedSeries[type] = seriesConfig[type]?.seriesProcessor?.(group, dataset) ?? group;\n }\n });\n return processedSeries;\n};\n\n/**\n * Applies series processors with drawing area to series if defined.\n * @param processedSeries The processed series groups\n * @param seriesConfig The series configuration\n * @param drawingArea The drawing area\n * @returns Processed series with all transformations applied\n */\nexport const applySeriesLayout = (processedSeries, seriesConfig, drawingArea) => {\n let processingDetected = false;\n const seriesLayout = {};\n\n // Apply processors on series type per group\n Object.keys(processedSeries).forEach(type => {\n const processor = seriesConfig[type]?.seriesLayout;\n const thisSeries = processedSeries[type];\n if (processor !== undefined && thisSeries !== undefined) {\n const newValue = processor(thisSeries, drawingArea);\n if (newValue && newValue !== processedSeries[type]) {\n processingDetected = true;\n seriesLayout[type] = newValue;\n }\n }\n });\n if (!processingDetected) {\n return {};\n }\n return seriesLayout;\n};","/**\n * Serializes a series item identifier into a unique string using the appropriate serializer\n * from the provided series configuration.\n *\n * @param {ChartSeriesConfig} seriesConfig - The configuration object for chart series.\n * @param {SeriesItemIdentifier} identifier - The series item identifier to serialize.\n * @returns {string} A unique string representation of the identifier.\n * @throws Will throw an error if no serializer is found for the given series type.\n */\nexport const serializeIdentifier = (seriesConfig, identifier) => {\n const serializer = seriesConfig[identifier.type]?.identifierSerializer;\n if (!serializer) {\n throw new Error(`MUI X Charts: No identifier serializer found for series type \"${identifier.type}\".`);\n }\n // @ts-expect-error identifierSerializer expects the full object,\n // but this function accepts a partial one in order be able to serialize all identifiers.\n return serializer(identifier);\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { useEffectAfterFirstRender } from '@mui/x-internals/useEffectAfterFirstRender';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { rainbowSurgePalette } from \"../../../../colorPalettes/index.js\";\nimport { defaultizeSeries } from \"./processSeries.js\";\nimport { serializeIdentifier as serializeIdentifierFn } from \"./serializeIdentifier.js\";\nexport const useChartSeries = ({\n params,\n store,\n seriesConfig\n}) => {\n const {\n series,\n dataset,\n theme,\n colors\n } = params;\n\n // The effect do not track any value defined synchronously during the 1st render by hooks called after `useChartSeries`\n // As a consequence, the state generated by the 1st run of this useEffect will always be equal to the initialization one\n useEffectAfterFirstRender(() => {\n store.set('series', _extends({}, store.state.series, {\n defaultizedSeries: defaultizeSeries({\n series,\n colors: typeof colors === 'function' ? colors(theme) : colors,\n seriesConfig\n }),\n dataset\n }));\n }, [colors, dataset, series, theme, seriesConfig, store]);\n const serializeIdentifier = useEventCallback(identifier => serializeIdentifierFn(seriesConfig, identifier));\n return {\n instance: {\n serializeIdentifier\n }\n };\n};\nuseChartSeries.params = {\n dataset: true,\n series: true,\n colors: true,\n theme: true\n};\nconst EMPTY_ARRAY = [];\nuseChartSeries.getDefaultizedParams = ({\n params\n}) => _extends({}, params, {\n series: params.series?.length ? params.series : EMPTY_ARRAY,\n colors: params.colors ?? rainbowSurgePalette,\n theme: params.theme ?? 'light'\n});\nuseChartSeries.getInitialState = ({\n series = [],\n colors,\n theme,\n dataset\n}, _, seriesConfig) => {\n return {\n series: {\n seriesConfig,\n defaultizedSeries: defaultizeSeries({\n series,\n colors: typeof colors === 'function' ? colors(theme) : colors,\n seriesConfig\n }),\n dataset\n }\n };\n};","/**\n * ActiveGesturesRegistry - Centralized registry for tracking which gestures are active on elements\n *\n * This singleton class keeps track of all gesture instances that are currently in their active state,\n * allowing both the system and applications to query which gestures are active on specific elements.\n */\n\n/**\n * Type for entries in the active gestures registry\n */\n\n/**\n * Registry that maintains a record of all currently active gestures across elements\n */\nexport class ActiveGesturesRegistry {\n /** Map of elements to their active gestures */\n activeGestures = (() => new Map())();\n\n /**\n * Register a gesture as active on an element\n *\n * @param element - The DOM element on which the gesture is active\n * @param gesture - The gesture instance that is active\n */\n registerActiveGesture(element, gesture) {\n if (!this.activeGestures.has(element)) {\n this.activeGestures.set(element, new Set());\n }\n const elementGestures = this.activeGestures.get(element);\n const entry = {\n gesture,\n element\n };\n elementGestures.add(entry);\n }\n\n /**\n * Remove a gesture from the active registry\n *\n * @param element - The DOM element on which the gesture was active\n * @param gesture - The gesture instance to deactivate\n */\n unregisterActiveGesture(element, gesture) {\n const elementGestures = this.activeGestures.get(element);\n if (!elementGestures) {\n return;\n }\n\n // Find and remove the specific gesture entry\n elementGestures.forEach(entry => {\n if (entry.gesture === gesture) {\n elementGestures.delete(entry);\n }\n });\n\n // Remove the element from the map if it no longer has any active gestures\n if (elementGestures.size === 0) {\n this.activeGestures.delete(element);\n }\n }\n\n /**\n * Get all active gestures for a specific element\n *\n * @param element - The DOM element to query\n * @returns Array of active gesture names\n */\n getActiveGestures(element) {\n const elementGestures = this.activeGestures.get(element);\n if (!elementGestures) {\n return {};\n }\n return Array.from(elementGestures).reduce((acc, entry) => {\n acc[entry.gesture.name] = true;\n return acc;\n }, {});\n }\n\n /**\n * Check if a specific gesture is active on an element\n *\n * @param element - The DOM element to check\n * @param gesture - The gesture instance to check\n * @returns True if the gesture is active on the element, false otherwise\n */\n isGestureActive(element, gesture) {\n const elementGestures = this.activeGestures.get(element);\n if (!elementGestures) {\n return false;\n }\n return Array.from(elementGestures).some(entry => entry.gesture === gesture);\n }\n\n /**\n * Clear all active gestures from the registry\n */\n destroy() {\n this.activeGestures.clear();\n }\n\n /**\n * Clear all active gestures for a specific element\n *\n * @param element - The DOM element to clear\n */\n unregisterElement(element) {\n this.activeGestures.delete(element);\n }\n}","/**\n * KeyboardManager - Manager for keyboard events in the gesture recognition system\n *\n * This class tracks keyboard state:\n * 1. Capturing and tracking all pressed keys\n * 2. Providing methods to check if specific keys are pressed\n */\n\n/**\n * Type definition for keyboard keys\n */\n\n/**\n * Class responsible for tracking keyboard state\n */\nexport class KeyboardManager {\n pressedKeys = (() => new Set())();\n\n /**\n * Create a new KeyboardManager instance\n */\n constructor() {\n this.initialize();\n }\n\n /**\n * Initialize the keyboard event listeners\n */\n initialize() {\n if (typeof window === 'undefined') {\n return;\n }\n\n // Add keyboard event listeners\n window.addEventListener('keydown', this.handleKeyDown);\n window.addEventListener('keyup', this.handleKeyUp);\n // Reset keys when window loses focus\n window.addEventListener('blur', this.clearKeys);\n }\n\n /**\n * Handle keydown events\n */\n handleKeyDown = event => {\n this.pressedKeys.add(event.key);\n };\n\n /**\n * Handle keyup events\n */\n handleKeyUp = event => {\n this.pressedKeys.delete(event.key);\n };\n\n /**\n * Clear all pressed keys\n */\n clearKeys = () => {\n this.pressedKeys.clear();\n };\n\n /**\n * Check if a set of keys are all currently pressed\n * @param keys The keys to check\n * @returns True if all specified keys are pressed, false otherwise\n */\n areKeysPressed(keys) {\n if (!keys || keys.length === 0) {\n return true; // No keys required means the condition is satisfied\n }\n return keys.every(key => {\n if (key === 'ControlOrMeta') {\n // May be \"deprecated\" on types, but it is still the best option for cross-platform detection\n // https://stackoverflow.com/a/71785253/24269134\n return navigator.platform.includes('Mac') ? this.pressedKeys.has('Meta') : this.pressedKeys.has('Control');\n }\n return this.pressedKeys.has(key);\n });\n }\n\n /**\n * Cleanup method to remove event listeners\n */\n destroy() {\n if (typeof window !== 'undefined') {\n window.removeEventListener('keydown', this.handleKeyDown);\n window.removeEventListener('keyup', this.handleKeyUp);\n window.removeEventListener('blur', this.clearKeys);\n }\n this.clearKeys();\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * PointerManager - Centralized manager for pointer events in the gesture recognition system\n *\n * This singleton class abstracts the complexity of working with pointer events by:\n * 1. Capturing and tracking all active pointers (touch, mouse, pen)\n * 2. Normalizing pointer data into a consistent format\n * 3. Managing pointer capture for proper tracking across elements\n * 4. Distributing events to registered gesture recognizers\n */\n\n/**\n * Normalized representation of a pointer, containing all relevant information\n * from the original PointerEvent plus additional tracking data.\n *\n * This data structure encapsulates everything gesture recognizers need to know\n * about a pointer's current state.\n */\n\n/**\n * Configuration options for initializing the PointerManager.\n */\n\n/**\n * Manager for handling pointer events across the application.\n *\n * PointerManager serves as the foundational layer for gesture recognition,\n * providing a centralized system for tracking active pointers and distributing\n * pointer events to gesture recognizers.\n *\n * It normalizes browser pointer events into a consistent format and simplifies\n * multi-touch handling by managing pointer capture and tracking multiple\n * simultaneous pointers.\n */\nexport class PointerManager {\n /** Root element where pointer events are captured */\n\n /** CSS touch-action property value applied to the root element */\n\n /** Whether to use passive event listeners */\n\n /** Whether to prevent interrupt events like blur or contextmenu */\n preventEventInterruption = true;\n\n /** Map of all currently active pointers by their pointerId */\n pointers = (() => new Map())();\n\n /** Set of registered gesture handlers that receive pointer events */\n gestureHandlers = (() => new Set())();\n constructor(options) {\n this.root =\n // User provided root element\n options.root ??\n // Fallback to document root or body, this fixes shadow DOM scenarios\n document.getRootNode({\n composed: true\n }) ??\n // Fallback to document body, for some testing environments\n document.body;\n this.touchAction = options.touchAction || 'auto';\n this.passive = options.passive ?? false;\n this.preventEventInterruption = options.preventEventInterruption ?? true;\n this.setupEventListeners();\n }\n\n /**\n * Register a handler function to receive pointer events.\n *\n * The handler will be called whenever pointer events occur within the root element.\n * It receives the current map of all active pointers and the original event.\n *\n * @param {Function} handler - Function to receive pointer events and current pointer state\n * @returns {Function} An unregister function that removes this handler when called\n */\n registerGestureHandler(handler) {\n this.gestureHandlers.add(handler);\n\n // Return unregister function\n return () => {\n this.gestureHandlers.delete(handler);\n };\n }\n\n /**\n * Get a copy of the current active pointers map.\n *\n * Returns a new Map containing all currently active pointers.\n * Modifying the returned map will not affect the internal pointers state.\n *\n * @returns A new Map containing all active pointers\n */\n getPointers() {\n return new Map(this.pointers);\n }\n\n /**\n * Set up event listeners for pointer events on the root element.\n *\n * This method attaches all necessary event listeners and configures\n * the CSS touch-action property on the root element.\n */\n setupEventListeners() {\n // Set touch-action CSS property\n if (this.touchAction !== 'auto') {\n this.root.style.touchAction = this.touchAction;\n }\n\n // Add event listeners\n this.root.addEventListener('pointerdown', this.handlePointerEvent, {\n passive: this.passive\n });\n this.root.addEventListener('pointermove', this.handlePointerEvent, {\n passive: this.passive\n });\n this.root.addEventListener('pointerup', this.handlePointerEvent, {\n passive: this.passive\n });\n this.root.addEventListener('pointercancel', this.handlePointerEvent, {\n passive: this.passive\n });\n // @ts-expect-error, forceCancel is not a standard event, but used for custom handling\n this.root.addEventListener('forceCancel', this.handlePointerEvent, {\n passive: this.passive\n });\n\n // Add blur and contextmenu event listeners to interrupt all gestures\n this.root.addEventListener('blur', this.handleInterruptEvents);\n this.root.addEventListener('contextmenu', this.handleInterruptEvents);\n }\n\n /**\n * Handle events that should interrupt all gestures.\n * This clears all active pointers and notifies handlers with a pointercancel-like event.\n *\n * @param event - The event that triggered the interruption (blur or contextmenu)\n */\n handleInterruptEvents = event => {\n if (this.preventEventInterruption && 'pointerType' in event && event.pointerType === 'touch') {\n event.preventDefault();\n return;\n }\n\n // Create a synthetic pointer cancel event\n const cancelEvent = new PointerEvent('forceCancel', {\n bubbles: false,\n cancelable: false\n });\n const firstPointer = this.pointers.values().next().value;\n if (this.pointers.size > 0 && firstPointer) {\n // If there are active pointers, use the first one as a template for coordinates\n\n // Update the synthetic event with the pointer's coordinates\n Object.defineProperties(cancelEvent, {\n clientX: {\n value: firstPointer.clientX\n },\n clientY: {\n value: firstPointer.clientY\n },\n pointerId: {\n value: firstPointer.pointerId\n },\n pointerType: {\n value: firstPointer.pointerType\n }\n });\n\n // Force update of all pointers to have type 'forceCancel'\n for (const [pointerId, pointer] of this.pointers.entries()) {\n const updatedPointer = _extends({}, pointer, {\n type: 'forceCancel'\n });\n this.pointers.set(pointerId, updatedPointer);\n }\n }\n\n // Notify all handlers about the interruption\n this.notifyHandlers(cancelEvent);\n\n // Clear all pointers\n this.pointers.clear();\n };\n\n /**\n * Event handler for all pointer events.\n *\n * This method:\n * 1. Updates the internal pointers map based on the event type\n * 2. Manages pointer capture for tracking pointers outside the root element\n * 3. Notifies all registered handlers with the current state\n *\n * @param event - The original pointer event from the browser\n */\n handlePointerEvent = event => {\n const {\n type,\n pointerId\n } = event;\n\n // Create or update pointer data\n if (type === 'pointerdown' || type === 'pointermove') {\n this.pointers.set(pointerId, this.createPointerData(event));\n }\n // Remove pointer data on up or cancel\n else if (type === 'pointerup' || type === 'pointercancel' || type === 'forceCancel') {\n // Update one last time before removing\n this.pointers.set(pointerId, this.createPointerData(event));\n\n // Notify handlers with current state\n this.notifyHandlers(event);\n\n // Then remove the pointer\n this.pointers.delete(pointerId);\n return;\n }\n this.notifyHandlers(event);\n };\n\n /**\n * Notify all registered gesture handlers about a pointer event.\n *\n * Each handler receives the current map of active pointers and the original event.\n *\n * @param event - The original pointer event that triggered this notification\n */\n notifyHandlers(event) {\n this.gestureHandlers.forEach(handler => handler(this.pointers, event));\n }\n\n /**\n * Create a normalized PointerData object from a browser PointerEvent.\n *\n * This method extracts all relevant information from the original event\n * and formats it in a consistent way for gesture recognizers to use.\n *\n * @param event - The original browser pointer event\n * @returns A new PointerData object representing this pointer\n */\n createPointerData(event) {\n return {\n pointerId: event.pointerId,\n clientX: event.clientX,\n clientY: event.clientY,\n pageX: event.pageX,\n pageY: event.pageY,\n target: event.target,\n timeStamp: event.timeStamp,\n type: event.type,\n isPrimary: event.isPrimary,\n pressure: event.pressure,\n width: event.width,\n height: event.height,\n pointerType: event.pointerType,\n srcEvent: event\n };\n }\n\n /**\n * Clean up all event listeners and reset the PointerManager state.\n *\n * This method should be called when the PointerManager is no longer needed\n * to prevent memory leaks. It removes all event listeners, clears the\n * internal state, and resets the singleton instance.\n */\n destroy() {\n this.root.removeEventListener('pointerdown', this.handlePointerEvent);\n this.root.removeEventListener('pointermove', this.handlePointerEvent);\n this.root.removeEventListener('pointerup', this.handlePointerEvent);\n this.root.removeEventListener('pointercancel', this.handlePointerEvent);\n // @ts-expect-error, forceCancel is not a standard event, but used for custom handling\n this.root.removeEventListener('forceCancel', this.handlePointerEvent);\n this.root.removeEventListener('blur', this.handleInterruptEvents);\n this.root.removeEventListener('contextmenu', this.handleInterruptEvents);\n this.pointers.clear();\n this.gestureHandlers.clear();\n }\n}","import { ActiveGesturesRegistry } from \"./ActiveGesturesRegistry.js\";\nimport { KeyboardManager } from \"./KeyboardManager.js\";\nimport { PointerManager } from \"./PointerManager.js\";\n\n/**\n * Configuration options for initializing the GestureManager\n */\n\n/**\n * The primary class responsible for setting up and managing gestures across multiple elements.\n *\n * GestureManager maintains a collection of gesture templates that can be instantiated for\n * specific DOM elements. It handles lifecycle management, event dispatching, and cleanup.\n *\n * @example\n * ```typescript\n * // Basic setup with default gestures\n * const manager = new GestureManager({\n * root: document.body,\n * touchAction: 'none',\n * gestures: [\n * new PanGesture({ name: 'pan' }),\n * ],\n * });\n *\n * // Register pan gestures on an element\n * const element = manager.registerElement('pan', document.querySelector('.draggable'));\n *\n * // Add event listeners with proper typing\n * element.addEventListener('panStart', (event) => {\n * console.log('Pan started');\n * });\n *\n * element.addEventListener('pan', (event) => {\n * console.log(`Pan delta: ${event.deltaX}, ${event.deltaY}`);\n * });\n *\n * // Custom gesture types\n * interface MyGestureEvents {\n * custom: { x: number, y: number }\n * }\n * const customManager = new GestureManager({\n * root: document.body\n * gestures: [\n * new CustomGesture({ name: 'custom' }),\n * ],\n * });\n * ```\n */\nexport class GestureManager {\n /** Repository of gesture templates that can be cloned for specific elements */\n gestureTemplates = (() => new Map())();\n\n /** Maps DOM elements to their active gesture instances */\n elementGestureMap = (() => new Map())();\n activeGesturesRegistry = (() => new ActiveGesturesRegistry())();\n keyboardManager = (() => new KeyboardManager())();\n\n /**\n * Create a new GestureManager instance to coordinate gesture recognition\n *\n * @param options - Configuration options for the gesture manager\n */\n constructor(options) {\n // Initialize the PointerManager\n this.pointerManager = new PointerManager({\n root: options.root,\n touchAction: options.touchAction,\n passive: options.passive\n });\n\n // Add initial gestures as templates if provided\n if (options.gestures && options.gestures.length > 0) {\n options.gestures.forEach(gesture => {\n this.addGestureTemplate(gesture);\n });\n }\n }\n\n /**\n * Add a gesture template to the manager's template registry.\n * Templates serve as prototypes that can be cloned for individual elements.\n *\n * @param gesture - The gesture instance to use as a template\n */\n addGestureTemplate(gesture) {\n if (this.gestureTemplates.has(gesture.name)) {\n console.warn(`Gesture template with name \"${gesture.name}\" already exists. It will be overwritten.`);\n }\n this.gestureTemplates.set(gesture.name, gesture);\n }\n\n /**\n * Updates the options for a specific gesture on a given element and emits a change event.\n *\n * @param gestureName - Name of the gesture whose options should be updated\n * @param element - The DOM element where the gesture is attached\n * @param options - New options to apply to the gesture\n * @returns True if the options were successfully updated, false if the gesture wasn't found\n *\n * @example\n * ```typescript\n * // Update pan gesture sensitivity on the fly\n * manager.setGestureOptions('pan', element, { threshold: 5 });\n * ```\n */\n setGestureOptions(gestureName, element, options) {\n const elementGestures = this.elementGestureMap.get(element);\n if (!elementGestures || !elementGestures.has(gestureName)) {\n console.error(`Gesture \"${gestureName}\" not found on the provided element.`);\n return;\n }\n const event = new CustomEvent(`${gestureName}ChangeOptions`, {\n detail: options,\n bubbles: false,\n cancelable: false,\n composed: false\n });\n element.dispatchEvent(event);\n }\n\n /**\n * Updates the state for a specific gesture on a given element and emits a change event.\n *\n * @param gestureName - Name of the gesture whose state should be updated\n * @param element - The DOM element where the gesture is attached\n * @param state - New state to apply to the gesture\n * @returns True if the state was successfully updated, false if the gesture wasn't found\n *\n * @example\n * ```typescript\n * // Update total delta for a turnWheel gesture\n * manager.setGestureState('turnWheel', element, { totalDeltaX: 10 });\n * ```\n */\n setGestureState(gestureName, element, state) {\n const elementGestures = this.elementGestureMap.get(element);\n if (!elementGestures || !elementGestures.has(gestureName)) {\n console.error(`Gesture \"${gestureName}\" not found on the provided element.`);\n return;\n }\n const event = new CustomEvent(`${gestureName}ChangeState`, {\n detail: state,\n bubbles: false,\n cancelable: false,\n composed: false\n });\n element.dispatchEvent(event);\n }\n\n /**\n * Register an element to recognize one or more gestures.\n *\n * This method clones the specified gesture template(s) and creates\n * gesture recognizer instance(s) specifically for the provided element.\n * The element is returned with enhanced TypeScript typing for gesture events.\n *\n * @param gestureNames - Name(s) of the gesture(s) to register (must match template names)\n * @param element - The DOM element to attach the gesture(s) to\n * @param options - Optional map of gesture-specific options to override when registering\n * @returns The same element with properly typed event listeners\n *\n * @example\n * ```typescript\n * // Register multiple gestures\n * const element = manager.registerElement(['pan', 'pinch'], myDiv);\n *\n * // Register a single gesture\n * const draggable = manager.registerElement('pan', dragHandle);\n *\n * // Register with customized options for each gesture\n * const customElement = manager.registerElement(\n * ['pan', 'pinch', 'rotate'],\n * myElement,\n * {\n * pan: { threshold: 20, direction: ['left', 'right'] },\n * pinch: { threshold: 0.1 }\n * }\n * );\n * ```\n */\n registerElement(gestureNames, element, options) {\n // Handle array of gesture names\n if (!Array.isArray(gestureNames)) {\n gestureNames = [gestureNames];\n }\n gestureNames.forEach(name => {\n const gestureOptions = options?.[name];\n this.registerSingleGesture(name, element, gestureOptions);\n });\n return element;\n }\n\n /**\n * Internal method to register a single gesture on an element.\n *\n * @param gestureName - Name of the gesture to register\n * @param element - DOM element to attach the gesture to\n * @param options - Optional options to override the gesture template configuration\n * @returns True if the registration was successful, false otherwise\n */\n registerSingleGesture(gestureName, element, options) {\n // Find the gesture template\n const gestureTemplate = this.gestureTemplates.get(gestureName);\n if (!gestureTemplate) {\n console.error(`Gesture template \"${gestureName}\" not found.`);\n return false;\n }\n\n // Create element's gesture map if it doesn't exist\n if (!this.elementGestureMap.has(element)) {\n this.elementGestureMap.set(element, new Map());\n }\n\n // Check if this element already has this gesture registered\n const elementGestures = this.elementGestureMap.get(element);\n if (elementGestures.has(gestureName)) {\n console.warn(`Element already has gesture \"${gestureName}\" registered. It will be replaced.`);\n // Unregister the existing gesture first\n this.unregisterElement(gestureName, element);\n }\n\n // Clone the gesture template and create a new instance with optional overrides\n // This allows each element to have its own state, event listeners, and configuration\n const gestureInstance = gestureTemplate.clone(options);\n gestureInstance.init(element, this.pointerManager, this.activeGesturesRegistry, this.keyboardManager);\n\n // Store the gesture in the element's gesture map\n elementGestures.set(gestureName, gestureInstance);\n return true;\n }\n\n /**\n * Unregister a specific gesture from an element.\n * This removes the gesture recognizer and stops event emission for that gesture.\n *\n * @param gestureName - Name of the gesture to unregister\n * @param element - The DOM element to remove the gesture from\n * @returns True if the gesture was found and removed, false otherwise\n */\n unregisterElement(gestureName, element) {\n const elementGestures = this.elementGestureMap.get(element);\n if (!elementGestures || !elementGestures.has(gestureName)) {\n return false;\n }\n\n // Destroy the gesture instance\n const gesture = elementGestures.get(gestureName);\n gesture.destroy();\n\n // Remove from the map\n elementGestures.delete(gestureName);\n this.activeGesturesRegistry.unregisterElement(element);\n\n // Remove the element from the map if it no longer has any gestures\n if (elementGestures.size === 0) {\n this.elementGestureMap.delete(element);\n }\n return true;\n }\n\n /**\n * Unregister all gestures from an element.\n * Completely removes the element from the gesture system.\n *\n * @param element - The DOM element to remove all gestures from\n */\n unregisterAllGestures(element) {\n const elementGestures = this.elementGestureMap.get(element);\n if (elementGestures) {\n // Unregister all gestures for this element\n for (const [, gesture] of elementGestures) {\n gesture.destroy();\n this.activeGesturesRegistry.unregisterElement(element);\n }\n\n // Clear the map\n this.elementGestureMap.delete(element);\n }\n }\n\n /**\n * Clean up all gestures and event listeners.\n * Call this method when the GestureManager is no longer needed to prevent memory leaks.\n */\n destroy() {\n // Unregister all element gestures\n for (const [element] of this.elementGestureMap) {\n this.unregisterAllGestures(element);\n }\n\n // Clear all templates\n this.gestureTemplates.clear();\n this.elementGestureMap.clear();\n this.activeGesturesRegistry.destroy();\n this.keyboardManager.destroy();\n this.pointerManager.destroy();\n }\n}","export const eventList = {\n abort: true,\n animationcancel: true,\n animationend: true,\n animationiteration: true,\n animationstart: true,\n auxclick: true,\n beforeinput: true,\n beforetoggle: true,\n blur: true,\n cancel: true,\n canplay: true,\n canplaythrough: true,\n change: true,\n click: true,\n close: true,\n compositionend: true,\n compositionstart: true,\n compositionupdate: true,\n contextlost: true,\n contextmenu: true,\n contextrestored: true,\n copy: true,\n cuechange: true,\n cut: true,\n dblclick: true,\n drag: true,\n dragend: true,\n dragenter: true,\n dragleave: true,\n dragover: true,\n dragstart: true,\n drop: true,\n durationchange: true,\n emptied: true,\n ended: true,\n error: true,\n focus: true,\n focusin: true,\n focusout: true,\n formdata: true,\n gotpointercapture: true,\n input: true,\n invalid: true,\n keydown: true,\n keypress: true,\n keyup: true,\n load: true,\n loadeddata: true,\n loadedmetadata: true,\n loadstart: true,\n lostpointercapture: true,\n mousedown: true,\n mouseenter: true,\n mouseleave: true,\n mousemove: true,\n mouseout: true,\n mouseover: true,\n mouseup: true,\n paste: true,\n pause: true,\n play: true,\n playing: true,\n pointercancel: true,\n pointerdown: true,\n pointerenter: true,\n pointerleave: true,\n pointermove: true,\n pointerout: true,\n pointerover: true,\n pointerup: true,\n progress: true,\n ratechange: true,\n reset: true,\n resize: true,\n scroll: true,\n scrollend: true,\n securitypolicyviolation: true,\n seeked: true,\n seeking: true,\n select: true,\n selectionchange: true,\n selectstart: true,\n slotchange: true,\n stalled: true,\n submit: true,\n suspend: true,\n timeupdate: true,\n toggle: true,\n touchcancel: true,\n touchend: true,\n touchmove: true,\n touchstart: true,\n transitioncancel: true,\n transitionend: true,\n transitionrun: true,\n transitionstart: true,\n volumechange: true,\n waiting: true,\n webkitanimationend: true,\n webkitanimationiteration: true,\n webkitanimationstart: true,\n webkittransitionend: true,\n wheel: true,\n beforematch: true,\n pointerrawupdate: true\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * Base Gesture module that provides common functionality for all gesture implementations\n */\n\nimport { eventList } from \"./utils/eventList.js\";\n\n/**\n * The possible phases of a gesture during its lifecycle.\n *\n * - 'start': The gesture has been recognized and is beginning\n * - 'ongoing': The gesture is in progress (e.g., a finger is moving)\n * - 'end': The gesture has completed successfully\n * - 'cancel': The gesture was interrupted or terminated abnormally\n */\n\n/**\n * Core data structure passed to gesture event handlers.\n * Contains all relevant information about a gesture event.\n */\n\n/**\n * Defines the types of pointers that can trigger a gesture.\n */\n\n/**\n * Base configuration options that can be overridden per pointer mode.\n */\n\n/**\n * Configuration options for creating a gesture instance.\n */\n\n// eslint-disable-next-line no-underscore-dangle, @typescript-eslint/naming-convention\n\n/**\n * Type for the state of a gesture recognizer.\n */\n\n/**\n * Base abstract class for all gestures. This class provides the fundamental structure\n * and functionality for handling gestures, including registering and unregistering\n * gesture handlers, creating emitters, and managing gesture state.\n *\n * Gesture is designed as an extensible base for implementing specific gesture recognizers.\n * Concrete gesture implementations should extend this class or one of its subclasses.\n *\n * To implement:\n * - Non-pointer gestures (like wheel events): extend this Gesture class directly\n * - Pointer-based gestures: extend the PointerGesture class instead\n *\n * @example\n * ```ts\n * import { Gesture } from './Gesture';\n *\n * class CustomGesture extends Gesture {\n * constructor(options) {\n * super(options);\n * }\n *\n * clone(overrides) {\n * return new CustomGesture({\n * name: this.name,\n * // ... other options\n * ...overrides,\n * });\n * }\n * }\n * ```\n */\nexport class Gesture {\n /** Unique name identifying this gesture type */\n\n /** Whether to prevent default browser action for gesture events */\n\n /** Whether to stop propagation of gesture events */\n\n /**\n * List of gesture names that should prevent this gesture from activating when they are active.\n */\n\n /**\n * Array of keyboard keys that must be pressed for the gesture to be recognized.\n */\n\n /**\n * KeyboardManager instance for tracking key presses\n */\n\n /**\n * List of pointer types that can trigger this gesture.\n * If undefined, all pointer types are allowed.\n */\n\n /**\n * Pointer mode-specific configuration overrides.\n */\n\n /**\n * User-mutable data object for sharing state between gesture events\n * This object is included in all events emitted by this gesture\n */\n customData = {};\n\n /** Reference to the singleton PointerManager instance */\n\n /** Reference to the singleton ActiveGesturesRegistry instance */\n\n /** The DOM element this gesture is attached to */\n\n /** Stores the active gesture state */\n\n /** @internal For types. If false enables phases (xStart, x, xEnd) */\n\n /** @internal For types. The event type this gesture is associated with */\n\n /** @internal For types. The options type for this gesture */\n\n /** @internal For types. The options that can be changed at runtime */\n\n /** @internal For types. The state that can be changed at runtime */\n\n /**\n * Create a new gesture instance with the specified options\n *\n * @param options - Configuration options for this gesture\n */\n constructor(options) {\n if (!options || !options.name) {\n throw new Error('Gesture must be initialized with a valid name.');\n }\n if (options.name in eventList) {\n throw new Error(`Gesture can't be created with a native event name. Tried to use \"${options.name}\". Please use a custom name instead.`);\n }\n this.name = options.name;\n this.preventDefault = options.preventDefault ?? false;\n this.stopPropagation = options.stopPropagation ?? false;\n this.preventIf = options.preventIf ?? [];\n this.requiredKeys = options.requiredKeys ?? [];\n this.pointerMode = options.pointerMode ?? [];\n this.pointerOptions = options.pointerOptions ?? {};\n }\n\n /**\n * Initialize the gesture by acquiring the pointer manager and gestures registry\n * Must be called before the gesture can be used\n */\n init(element, pointerManager, gestureRegistry, keyboardManager) {\n this.element = element;\n this.pointerManager = pointerManager;\n this.gesturesRegistry = gestureRegistry;\n this.keyboardManager = keyboardManager;\n const changeOptionsEventName = `${this.name}ChangeOptions`;\n this.element.addEventListener(changeOptionsEventName, this.handleOptionsChange);\n const changeStateEventName = `${this.name}ChangeState`;\n this.element.addEventListener(changeStateEventName, this.handleStateChange);\n }\n\n /**\n * Handle option change events\n * @param event Custom event with new options in the detail property\n */\n handleOptionsChange = event => {\n if (event && event.detail) {\n this.updateOptions(event.detail);\n }\n };\n\n /**\n * Update the gesture options with new values\n * @param options Object containing properties to update\n */\n updateOptions(options) {\n // Update common options\n this.preventDefault = options.preventDefault ?? this.preventDefault;\n this.stopPropagation = options.stopPropagation ?? this.stopPropagation;\n this.preventIf = options.preventIf ?? this.preventIf;\n this.requiredKeys = options.requiredKeys ?? this.requiredKeys;\n this.pointerMode = options.pointerMode ?? this.pointerMode;\n this.pointerOptions = options.pointerOptions ?? this.pointerOptions;\n }\n\n /**\n * Get the default configuration for the pointer specific options.\n * Change this function in child classes to provide different defaults.\n */\n getBaseConfig() {\n return {\n requiredKeys: this.requiredKeys\n };\n }\n\n /**\n * Get the effective configuration for a specific pointer mode.\n * This merges the base configuration with pointer mode-specific overrides.\n *\n * @param pointerType - The pointer type to get configuration for\n * @returns The effective configuration object\n */\n getEffectiveConfig(pointerType, baseConfig) {\n if (pointerType !== 'mouse' && pointerType !== 'touch' && pointerType !== 'pen') {\n // Unknown pointer type, return base config\n return baseConfig;\n }\n\n // Apply pointer mode-specific overrides\n const pointerModeOverrides = this.pointerOptions[pointerType];\n if (pointerModeOverrides) {\n return _extends({}, baseConfig, pointerModeOverrides);\n }\n return baseConfig;\n }\n\n /**\n * Handle state change events\n * @param event Custom event with new state values in the detail property\n */\n handleStateChange = event => {\n if (event && event.detail) {\n this.updateState(event.detail);\n }\n };\n\n /**\n * Update the gesture state with new values\n * @param stateChanges Object containing state properties to update\n */\n updateState(stateChanges) {\n // This is a base implementation - concrete gesture classes should override\n // to handle specific state updates based on their state structure\n Object.assign(this.state, stateChanges);\n }\n\n /**\n * Create a deep clone of this gesture for a new element\n *\n * @param overrides - Optional configuration options that override the defaults\n * @returns A new instance of this gesture with the same configuration and any overrides applied\n */\n\n /**\n * Check if the event's target is or is contained within any of our registered elements\n *\n * @param event - The browser event to check\n * @returns The matching element or null if no match is found\n */\n getTargetElement(event) {\n if (this.isActive || this.element === event.target || 'contains' in this.element && this.element.contains(event.target) || 'getRootNode' in this.element && this.element.getRootNode() instanceof ShadowRoot && event.composedPath().includes(this.element)) {\n return this.element;\n }\n return null;\n }\n\n /** Whether the gesture is currently active */\n set isActive(isActive) {\n if (isActive) {\n this.gesturesRegistry.registerActiveGesture(this.element, this);\n } else {\n this.gesturesRegistry.unregisterActiveGesture(this.element, this);\n }\n }\n\n /** Whether the gesture is currently active */\n get isActive() {\n return this.gesturesRegistry.isGestureActive(this.element, this) ?? false;\n }\n\n /**\n * Checks if this gesture should be prevented from activating.\n *\n * @param element - The DOM element to check against\n * @param pointerType - The type of pointer triggering the gesture\n * @returns true if the gesture should be prevented, false otherwise\n */\n shouldPreventGesture(element, pointerType) {\n // Get effective configuration for this pointer type\n const effectiveConfig = this.getEffectiveConfig(pointerType, this.getBaseConfig());\n\n // First check if required keyboard keys are pressed\n if (!this.keyboardManager.areKeysPressed(effectiveConfig.requiredKeys)) {\n return true; // Prevent the gesture if required keys are not pressed\n }\n if (this.preventIf.length === 0) {\n return false; // No prevention rules, allow the gesture\n }\n const activeGestures = this.gesturesRegistry.getActiveGestures(element);\n\n // Check if any of the gestures that would prevent this one are active\n return this.preventIf.some(gestureName => activeGestures[gestureName]);\n }\n\n /**\n * Checks if the given pointer type is allowed for this gesture based on the pointerMode setting.\n *\n * @param pointerType - The type of pointer to check.\n * @returns true if the pointer type is allowed, false otherwise.\n */\n isPointerTypeAllowed(pointerType) {\n // If no pointer mode is specified, all pointer types are allowed\n if (!this.pointerMode || this.pointerMode.length === 0) {\n return true;\n }\n\n // Check if the pointer type is in the allowed types list\n return this.pointerMode.includes(pointerType);\n }\n\n /**\n * Clean up the gesture and unregister any listeners\n * Call this method when the gesture is no longer needed to prevent memory leaks\n */\n destroy() {\n const changeOptionsEventName = `${this.name}ChangeOptions`;\n this.element.removeEventListener(changeOptionsEventName, this.handleOptionsChange);\n const changeStateEventName = `${this.name}ChangeState`;\n this.element.removeEventListener(changeStateEventName, this.handleStateChange);\n }\n\n /**\n * Reset the gesture state to its initial values\n */\n}","import { Gesture } from \"./Gesture.js\";\n\n/**\n * Base configuration options that can be overridden per pointer mode.\n */\n\n/**\n * Configuration options for pointer-based gestures, extending the base GestureOptions.\n *\n * These options provide fine-grained control over how pointer events are interpreted\n * and when the gesture should be recognized.\n */\n\n/**\n * Base class for all pointer-based gestures.\n *\n * This class extends the base Gesture class with specialized functionality for\n * handling pointer events via the PointerManager. It provides common logic for\n * determining when a gesture should activate, tracking pointer movements, and\n * managing pointer thresholds.\n *\n * All pointer-based gesture implementations should extend this class rather than\n * the base Gesture class.\n *\n * @example\n * ```ts\n * import { PointerGesture } from './PointerGesture';\n *\n * class CustomGesture extends PointerGesture {\n * constructor(options) {\n * super(options);\n * }\n *\n * clone(overrides) {\n * return new CustomGesture({\n * name: this.name,\n * // ... other options\n * ...overrides,\n * });\n * }\n *\n * handlePointerEvent = (pointers, event) => {\n * // Handle pointer events here\n * }\n * }\n * ```\n */\nexport class PointerGesture extends Gesture {\n /** Function to unregister from the PointerManager when destroying this gesture */\n unregisterHandler = null;\n\n /** The original target element when the gesture began, used to prevent limbo state if target is removed */\n originalTarget = null;\n\n /**\n * Minimum number of simultaneous pointers required to activate the gesture.\n * The gesture will not start until at least this many pointers are active.\n */\n\n /**\n * Maximum number of simultaneous pointers allowed for this gesture.\n * If more than this many pointers are detected, the gesture may be canceled.\n */\n\n constructor(options) {\n super(options);\n this.minPointers = options.minPointers ?? 1;\n this.maxPointers = options.maxPointers ?? Infinity;\n }\n init(element, pointerManager, gestureRegistry, keyboardManager) {\n super.init(element, pointerManager, gestureRegistry, keyboardManager);\n this.unregisterHandler = this.pointerManager.registerGestureHandler(this.handlePointerEvent);\n }\n updateOptions(options) {\n super.updateOptions(options);\n this.minPointers = options.minPointers ?? this.minPointers;\n this.maxPointers = options.maxPointers ?? this.maxPointers;\n }\n getBaseConfig() {\n return {\n requiredKeys: this.requiredKeys,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers\n };\n }\n isWithinPointerCount(pointers, pointerMode) {\n const config = this.getEffectiveConfig(pointerMode, this.getBaseConfig());\n return pointers.length >= config.minPointers && pointers.length <= config.maxPointers;\n }\n\n /**\n * Handler for pointer events from the PointerManager.\n * Concrete gesture implementations must override this method to provide\n * gesture-specific logic for recognizing and tracking the gesture.\n *\n * @param pointers - Map of active pointers by pointer ID\n * @param event - The original pointer event from the browser\n */\n\n /**\n * Calculate the target element for the gesture based on the active pointers.\n *\n * It takes into account the original target element.\n *\n * @param pointers - Map of active pointers by pointer ID\n * @param calculatedTarget - The target element calculated from getTargetElement\n * @returns A list of relevant pointers for this gesture\n */\n getRelevantPointers(pointers, calculatedTarget) {\n return pointers.filter(pointer => this.isPointerTypeAllowed(pointer.pointerType) && (calculatedTarget === pointer.target || pointer.target === this.originalTarget || calculatedTarget === this.originalTarget || 'contains' in calculatedTarget && calculatedTarget.contains(pointer.target)) || 'getRootNode' in calculatedTarget && calculatedTarget.getRootNode() instanceof ShadowRoot && pointer.srcEvent.composedPath().includes(calculatedTarget));\n }\n destroy() {\n if (this.unregisterHandler) {\n this.unregisterHandler();\n this.unregisterHandler = null;\n }\n super.destroy();\n }\n}","/**\n * Calculate the centroid (average position) of multiple pointers\n */\nexport function calculateCentroid(pointers) {\n if (pointers.length === 0) {\n return {\n x: 0,\n y: 0\n };\n }\n const sum = pointers.reduce((acc, pointer) => {\n acc.x += pointer.clientX;\n acc.y += pointer.clientY;\n return acc;\n }, {\n x: 0,\n y: 0\n });\n return {\n x: sum.x / pointers.length,\n y: sum.y / pointers.length\n };\n}","const MAIN_THRESHOLD = 0.00001;\nconst ANGLE_THRESHOLD = 0.00001;\nconst SECONDARY_THRESHOLD = 0.15;\n\n/**\n * Get the direction of movement based on the current and previous positions\n */\nexport function getDirection(previous, current) {\n const deltaX = current.x - previous.x;\n const deltaY = current.y - previous.y;\n const direction = {\n vertical: null,\n horizontal: null,\n mainAxis: null\n };\n const isDiagonal = isDiagonalMovement(current, previous);\n const mainMovement = Math.abs(deltaX) > Math.abs(deltaY) ? 'horizontal' : 'vertical';\n\n // eslint-disable-next-line no-nested-ternary\n const horizontalThreshold = isDiagonal ? MAIN_THRESHOLD : mainMovement === 'horizontal' ? MAIN_THRESHOLD : SECONDARY_THRESHOLD;\n // eslint-disable-next-line no-nested-ternary\n const verticalThreshold = isDiagonal ? MAIN_THRESHOLD : mainMovement === 'horizontal' ? SECONDARY_THRESHOLD : MAIN_THRESHOLD;\n\n // Set horizontal direction if there's a significant movement horizontally\n if (Math.abs(deltaX) > horizontalThreshold) {\n // Small threshold to avoid noise\n direction.horizontal = deltaX > 0 ? 'right' : 'left';\n }\n\n // Set vertical direction if there's a significant movement vertically\n if (Math.abs(deltaY) > verticalThreshold) {\n // Small threshold to avoid noise\n direction.vertical = deltaY > 0 ? 'down' : 'up';\n }\n direction.mainAxis = isDiagonal ? 'diagonal' : mainMovement;\n return direction;\n}\nfunction isDiagonalMovement(previous, current) {\n const deltaX = current.x - previous.x;\n const deltaY = current.y - previous.y;\n\n // Calculate the angle of movement\n const angle = Math.atan2(deltaY, deltaX) * 180 / Math.PI;\n\n // Check if the angle is within the diagonal range\n return angle >= -45 + ANGLE_THRESHOLD && angle <= -22.5 + ANGLE_THRESHOLD || angle >= 22.5 + ANGLE_THRESHOLD && angle <= 45 + ANGLE_THRESHOLD || angle >= 135 + ANGLE_THRESHOLD && angle <= 157.5 + ANGLE_THRESHOLD || angle >= -157.5 + ANGLE_THRESHOLD && angle <= -135 + ANGLE_THRESHOLD;\n}","/**\n * Creates the event name for a specific gesture and phase\n */\nexport function createEventName(gesture, phase) {\n return `${gesture}${phase === 'ongoing' ? '' : phase.charAt(0).toUpperCase() + phase.slice(1)}`;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * PanGesture - Detects panning (dragging) movements\n *\n * This gesture tracks pointer dragging movements across elements, firing events when:\n * - The drag movement begins and passes the threshold distance (start)\n * - The drag movement continues (ongoing)\n * - The drag movement ends (end)\n *\n * The gesture can be configured to recognize movement only in specific directions.\n */\n\nimport { PointerGesture } from \"../PointerGesture.js\";\nimport { calculateCentroid, createEventName, getDirection, isDirectionAllowed } from \"../utils/index.js\";\n\n/**\n * Configuration options for PanGesture\n * Extends PointerGestureOptions with direction constraints\n */\n\n/**\n * Event data specific to pan gesture events\n * Contains information about movement distance, direction, and velocity\n */\n\n/**\n * Type definition for the CustomEvent created by PanGesture\n */\n\n/**\n * State tracking for the PanGesture\n */\n\n/**\n * PanGesture class for handling panning/dragging interactions\n *\n * This gesture detects when users drag across elements with one or more pointers,\n * and dispatches directional movement events with delta and velocity information.\n */\nexport class PanGesture extends PointerGesture {\n state = (() => ({\n startPointers: new Map(),\n startCentroid: null,\n lastCentroid: null,\n movementThresholdReached: false,\n totalDeltaX: 0,\n totalDeltaY: 0,\n activeDeltaX: 0,\n activeDeltaY: 0,\n lastDirection: {\n vertical: null,\n horizontal: null,\n mainAxis: null\n },\n lastDeltas: null\n }))();\n\n /**\n * Movement threshold in pixels that must be exceeded before the gesture activates.\n * Higher values reduce false positive gesture detection for small movements.\n */\n\n /**\n * Allowed directions for the pan gesture\n * Default allows all directions\n */\n\n constructor(options) {\n super(options);\n this.direction = options.direction || ['up', 'down', 'left', 'right'];\n this.threshold = options.threshold || 0;\n }\n clone(overrides) {\n return new PanGesture(_extends({\n name: this.name,\n preventDefault: this.preventDefault,\n stopPropagation: this.stopPropagation,\n threshold: this.threshold,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n direction: [...this.direction],\n requiredKeys: [...this.requiredKeys],\n pointerMode: [...this.pointerMode],\n preventIf: [...this.preventIf],\n pointerOptions: structuredClone(this.pointerOptions)\n }, overrides));\n }\n destroy() {\n this.resetState();\n super.destroy();\n }\n updateOptions(options) {\n super.updateOptions(options);\n this.direction = options.direction || this.direction;\n this.threshold = options.threshold ?? this.threshold;\n }\n resetState() {\n this.isActive = false;\n this.state = _extends({}, this.state, {\n startPointers: new Map(),\n startCentroid: null,\n lastCentroid: null,\n lastDeltas: null,\n activeDeltaX: 0,\n activeDeltaY: 0,\n movementThresholdReached: false,\n lastDirection: {\n vertical: null,\n horizontal: null,\n mainAxis: null\n }\n });\n }\n\n /**\n * Handle pointer events for the pan gesture\n */\n handlePointerEvent = (pointers, event) => {\n const pointersArray = Array.from(pointers.values());\n\n // Check for our forceCancel event to handle interrupted gestures (from contextmenu, blur)\n if (event.type === 'forceCancel') {\n // Reset all active pan gestures when we get a force reset event\n this.cancel(event.target, pointersArray, event);\n return;\n }\n\n // Find which element (if any) is being targeted\n const targetElement = this.getTargetElement(event);\n if (!targetElement) {\n return;\n }\n\n // Check if this gesture should be prevented by active gestures\n if (this.shouldPreventGesture(targetElement, event.pointerType)) {\n // If the gesture was active but now should be prevented, cancel it gracefully\n this.cancel(targetElement, pointersArray, event);\n return;\n }\n\n // Filter pointers to only include those targeting our element or its children\n const relevantPointers = this.getRelevantPointers(pointersArray, targetElement);\n if (!this.isWithinPointerCount(relevantPointers, event.pointerType)) {\n // Cancel or end the gesture if it was active\n this.cancel(targetElement, relevantPointers, event);\n return;\n }\n switch (event.type) {\n case 'pointerdown':\n if (!this.isActive && !this.state.startCentroid) {\n // Store initial pointers\n relevantPointers.forEach(pointer => {\n this.state.startPointers.set(pointer.pointerId, pointer);\n });\n\n // Store the original target element\n this.originalTarget = targetElement;\n\n // Calculate and store the starting centroid\n this.state.startCentroid = calculateCentroid(relevantPointers);\n this.state.lastCentroid = _extends({}, this.state.startCentroid);\n } else if (this.state.startCentroid && this.state.lastCentroid) {\n // A new pointer was added during an active gesture\n // Adjust the start centroid to prevent jumping\n const oldCentroid = this.state.lastCentroid;\n const newCentroid = calculateCentroid(relevantPointers);\n\n // Calculate the offset that the new pointer would cause\n const offsetX = newCentroid.x - oldCentroid.x;\n const offsetY = newCentroid.y - oldCentroid.y;\n\n // Adjust start centroid to compensate for the new pointer\n this.state.startCentroid = {\n x: this.state.startCentroid.x + offsetX,\n y: this.state.startCentroid.y + offsetY\n };\n this.state.lastCentroid = newCentroid;\n\n // Add the new pointer to tracked pointers\n relevantPointers.forEach(pointer => {\n if (!this.state.startPointers.has(pointer.pointerId)) {\n this.state.startPointers.set(pointer.pointerId, pointer);\n }\n });\n }\n break;\n case 'pointermove':\n if (this.state.startCentroid && this.isWithinPointerCount(pointersArray, event.pointerType)) {\n // Calculate current centroid\n const currentCentroid = calculateCentroid(relevantPointers);\n\n // Calculate delta from start\n const distanceDeltaX = currentCentroid.x - this.state.startCentroid.x;\n const distanceDeltaY = currentCentroid.y - this.state.startCentroid.y;\n\n // Calculate movement distance\n const distance = Math.sqrt(distanceDeltaX * distanceDeltaX + distanceDeltaY * distanceDeltaY);\n\n // Determine movement direction\n const moveDirection = getDirection(this.state.lastCentroid ?? this.state.startCentroid, currentCentroid);\n\n // Calculate change in position since last move\n const lastDeltaX = this.state.lastCentroid ? currentCentroid.x - this.state.lastCentroid.x : 0;\n const lastDeltaY = this.state.lastCentroid ? currentCentroid.y - this.state.lastCentroid.y : 0;\n\n // Check if movement passes the threshold and is in an allowed direction\n if (!this.state.movementThresholdReached && distance >= this.threshold && isDirectionAllowed(moveDirection, this.direction)) {\n this.state.movementThresholdReached = true;\n this.isActive = true;\n\n // Update total accumulated delta\n this.state.lastDeltas = {\n x: lastDeltaX,\n y: lastDeltaY\n };\n this.state.totalDeltaX += lastDeltaX;\n this.state.totalDeltaY += lastDeltaY;\n this.state.activeDeltaX += lastDeltaX;\n this.state.activeDeltaY += lastDeltaY;\n\n // Emit start event\n this.emitPanEvent(targetElement, 'start', relevantPointers, event, currentCentroid);\n this.emitPanEvent(targetElement, 'ongoing', relevantPointers, event, currentCentroid);\n }\n // If we've already crossed the threshold, continue tracking\n else if (this.state.movementThresholdReached && this.isActive) {\n // Update total accumulated delta\n this.state.lastDeltas = {\n x: lastDeltaX,\n y: lastDeltaY\n };\n this.state.totalDeltaX += lastDeltaX;\n this.state.totalDeltaY += lastDeltaY;\n this.state.activeDeltaX += lastDeltaX;\n this.state.activeDeltaY += lastDeltaY;\n\n // Emit ongoing event\n this.emitPanEvent(targetElement, 'ongoing', relevantPointers, event, currentCentroid);\n }\n\n // Update last centroid\n this.state.lastCentroid = currentCentroid;\n this.state.lastDirection = moveDirection;\n }\n break;\n case 'pointerup':\n case 'pointercancel':\n case 'forceCancel':\n // If the gesture was active (threshold was reached), emit end event\n if (this.isActive && this.state.movementThresholdReached) {\n const remainingPointers = relevantPointers.filter(p => p.type !== 'pointerup' && p.type !== 'pointercancel');\n\n // If we no longer meet the pointer count requirements, end the gesture\n if (!this.isWithinPointerCount(remainingPointers, event.pointerType)) {\n // End the gesture\n const currentCentroid = this.state.lastCentroid || this.state.startCentroid;\n if (event.type === 'pointercancel') {\n this.emitPanEvent(targetElement, 'cancel', relevantPointers, event, currentCentroid);\n }\n this.emitPanEvent(targetElement, 'end', relevantPointers, event, currentCentroid);\n this.resetState();\n } else if (remainingPointers.length >= 1 && this.state.lastCentroid) {\n // If we still have enough pointers, adjust the centroid\n // to prevent jumping when a finger is lifted\n const newCentroid = calculateCentroid(remainingPointers);\n\n // Calculate the offset that removing the pointer would cause\n const offsetX = newCentroid.x - this.state.lastCentroid.x;\n const offsetY = newCentroid.y - this.state.lastCentroid.y;\n\n // Adjust start centroid to compensate\n this.state.startCentroid = {\n x: this.state.startCentroid.x + offsetX,\n y: this.state.startCentroid.y + offsetY\n };\n this.state.lastCentroid = newCentroid;\n\n // Remove the pointer from tracked pointers\n const removedPointerId = relevantPointers.find(p => p.type === 'pointerup' || p.type === 'pointercancel')?.pointerId;\n if (removedPointerId !== undefined) {\n this.state.startPointers.delete(removedPointerId);\n }\n }\n } else {\n this.resetState();\n }\n break;\n default:\n break;\n }\n };\n\n /**\n * Emit pan-specific events with additional data\n */\n emitPanEvent(element, phase, pointers, event, currentCentroid) {\n if (!this.state.startCentroid) {\n return;\n }\n const deltaX = this.state.lastDeltas?.x ?? 0;\n const deltaY = this.state.lastDeltas?.y ?? 0;\n\n // Calculate velocity - time difference in seconds\n const firstPointer = this.state.startPointers.values().next().value;\n const timeElapsed = firstPointer ? (event.timeStamp - firstPointer.timeStamp) / 1000 : 0;\n const velocityX = timeElapsed > 0 ? deltaX / timeElapsed : 0;\n const velocityY = timeElapsed > 0 ? deltaY / timeElapsed : 0;\n const velocity = Math.sqrt(velocityX * velocityX + velocityY * velocityY);\n\n // Get list of active gestures\n const activeGestures = this.gesturesRegistry.getActiveGestures(element);\n\n // Create custom event data\n const customEventData = {\n gestureName: this.name,\n initialCentroid: this.state.startCentroid,\n centroid: currentCentroid,\n target: event.target,\n srcEvent: event,\n phase,\n pointers,\n timeStamp: event.timeStamp,\n deltaX,\n deltaY,\n direction: this.state.lastDirection,\n velocityX,\n velocityY,\n velocity,\n totalDeltaX: this.state.totalDeltaX,\n totalDeltaY: this.state.totalDeltaY,\n activeDeltaX: this.state.activeDeltaX,\n activeDeltaY: this.state.activeDeltaY,\n activeGestures,\n customData: this.customData\n };\n\n // Event names to trigger\n const eventName = createEventName(this.name, phase);\n\n // Dispatch custom events on the element\n const domEvent = new CustomEvent(eventName, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: customEventData\n });\n element.dispatchEvent(domEvent);\n\n // Apply preventDefault/stopPropagation if configured\n if (this.preventDefault) {\n event.preventDefault();\n }\n if (this.stopPropagation) {\n event.stopPropagation();\n }\n }\n\n /**\n * Cancel the current gesture\n */\n cancel(element, pointers, event) {\n if (this.isActive) {\n const el = element ?? this.element;\n this.emitPanEvent(el, 'cancel', pointers, event, this.state.lastCentroid);\n this.emitPanEvent(el, 'end', pointers, event, this.state.lastCentroid);\n }\n this.resetState();\n }\n}","/**\n * Check if a direction matches one of the allowed directions\n */\nexport function isDirectionAllowed(direction, allowedDirections) {\n if (!direction.vertical && !direction.horizontal) {\n return false;\n }\n if (allowedDirections.length === 0) {\n return true;\n }\n\n // Check if the vertical direction is allowed (if it exists)\n const verticalAllowed = direction.vertical === null || allowedDirections.includes(direction.vertical);\n\n // Check if the horizontal direction is allowed (if it exists)\n const horizontalAllowed = direction.horizontal === null || allowedDirections.includes(direction.horizontal);\n\n // Both directions must be allowed\n return verticalAllowed && horizontalAllowed;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * MoveGesture - Detects when a pointer enters, moves within, and leaves an element\n *\n * This gesture tracks pointer movements over an element, firing events when:\n * - A pointer enters the element (start)\n * - A pointer moves within the element (ongoing)\n * - A pointer leaves the element (end)\n *\n * Unlike other gestures which often require specific actions to trigger,\n * the move gesture fires automatically when pointers interact with the target element.\n *\n * This gesture only works with mouse pointers, not touch or pen.\n */\n\nimport { PointerGesture } from \"../PointerGesture.js\";\nimport { calculateCentroid, createEventName } from \"../utils/index.js\";\n\n/**\n * Configuration options for the MoveGesture\n * Extends the base PointerGestureOptions\n */\n\n/**\n * Event data specific to move gesture events\n * Includes the source pointer event and standard gesture data\n */\n\n/**\n * Type definition for the CustomEvent created by MoveGesture\n */\n\n/**\n * State tracking for the MoveGesture\n */\n\n/**\n * MoveGesture class for handling pointer movement over elements\n *\n * This gesture detects when pointers enter, move within, or leave target elements,\n * and dispatches corresponding custom events.\n *\n * This gesture only works with hovering mouse pointers, not touch.\n */\nexport class MoveGesture extends PointerGesture {\n state = {\n lastPosition: null\n };\n\n /**\n * Movement threshold in pixels that must be exceeded before the gesture activates.\n * Higher values reduce false positive gesture detection for small movements.\n */\n\n constructor(options) {\n super(options);\n this.threshold = options.threshold || 0;\n }\n clone(overrides) {\n return new MoveGesture(_extends({\n name: this.name,\n preventDefault: this.preventDefault,\n stopPropagation: this.stopPropagation,\n threshold: this.threshold,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n requiredKeys: [...this.requiredKeys],\n pointerMode: [...this.pointerMode],\n preventIf: [...this.preventIf],\n pointerOptions: structuredClone(this.pointerOptions)\n }, overrides));\n }\n init(element, pointerManager, gestureRegistry, keyboardManager) {\n super.init(element, pointerManager, gestureRegistry, keyboardManager);\n\n // Add event listeners for entering and leaving elements\n // These are different from pointer events handled by PointerManager\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener('pointerenter', this.handleElementEnter);\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener('pointerleave', this.handleElementLeave);\n }\n destroy() {\n // Remove event listeners using the same function references\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener('pointerenter', this.handleElementEnter);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener('pointerleave', this.handleElementLeave);\n this.resetState();\n super.destroy();\n }\n updateOptions(options) {\n // Call parent method to handle common options\n super.updateOptions(options);\n }\n resetState() {\n this.isActive = false;\n this.state = {\n lastPosition: null\n };\n }\n\n /**\n * Handle pointer enter events for a specific element\n * @param event The original pointer event\n */\n handleElementEnter = event => {\n if (event.pointerType !== 'mouse' && event.pointerType !== 'pen') {\n return;\n }\n\n // Get pointers from the PointerManager\n const pointers = this.pointerManager.getPointers() || new Map();\n const pointersArray = Array.from(pointers.values());\n\n // Only activate if we're within pointer count constraints\n if (this.isWithinPointerCount(pointersArray, event.pointerType)) {\n this.isActive = true;\n const currentPosition = {\n x: event.clientX,\n y: event.clientY\n };\n this.state.lastPosition = currentPosition;\n\n // Emit start event\n this.emitMoveEvent(this.element, 'start', pointersArray, event);\n this.emitMoveEvent(this.element, 'ongoing', pointersArray, event);\n }\n };\n\n /**\n * Handle pointer leave events for a specific element\n * @param event The original pointer event\n */\n handleElementLeave = event => {\n if (event.pointerType !== 'mouse' && event.pointerType !== 'pen') {\n return;\n }\n if (!this.isActive) {\n return;\n }\n\n // Get pointers from the PointerManager\n const pointers = this.pointerManager.getPointers() || new Map();\n const pointersArray = Array.from(pointers.values());\n\n // Emit end event and reset state\n this.emitMoveEvent(this.element, 'end', pointersArray, event);\n this.resetState();\n };\n\n /**\n * Handle pointer events for the move gesture (only handles move events now)\n * @param pointers Map of active pointers\n * @param event The original pointer event\n */\n handlePointerEvent = (pointers, event) => {\n if (event.type !== 'pointermove' || event.pointerType !== 'mouse' && event.pointerType !== 'pen') {\n return;\n }\n if (this.preventDefault) {\n event.preventDefault();\n }\n if (this.stopPropagation) {\n event.stopPropagation();\n }\n const pointersArray = Array.from(pointers.values());\n\n // Find which element (if any) is being targeted\n const targetElement = this.getTargetElement(event);\n if (!targetElement) {\n return;\n }\n if (!this.isWithinPointerCount(pointersArray, event.pointerType)) {\n return;\n }\n if (this.shouldPreventGesture(targetElement, event.pointerType)) {\n if (!this.isActive) {\n return;\n }\n this.resetState();\n this.emitMoveEvent(targetElement, 'end', pointersArray, event);\n return;\n }\n\n // Update position\n const currentPosition = {\n x: event.clientX,\n y: event.clientY\n };\n this.state.lastPosition = currentPosition;\n if (!this.isActive) {\n this.isActive = true;\n this.emitMoveEvent(targetElement, 'start', pointersArray, event);\n }\n // Emit ongoing event\n this.emitMoveEvent(targetElement, 'ongoing', pointersArray, event);\n };\n\n /**\n * Emit move-specific events\n * @param element The DOM element the event is related to\n * @param phase The current phase of the gesture (start, ongoing, end)\n * @param pointers Array of active pointers\n * @param event The original pointer event\n */\n emitMoveEvent(element, phase, pointers, event) {\n const currentPosition = this.state.lastPosition || calculateCentroid(pointers);\n\n // Get list of active gestures\n const activeGestures = this.gesturesRegistry.getActiveGestures(element);\n\n // Create custom event data\n const customEventData = {\n gestureName: this.name,\n centroid: currentPosition,\n target: event.target,\n srcEvent: event,\n phase,\n pointers,\n timeStamp: event.timeStamp,\n activeGestures,\n customData: this.customData\n };\n\n // Event names to trigger\n const eventName = createEventName(this.name, phase);\n\n // Dispatch custom events on the element\n const domEvent = new CustomEvent(eventName, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: customEventData\n });\n element.dispatchEvent(domEvent);\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * TapGesture - Detects tap (quick touch without movement) gestures\n *\n * This gesture tracks simple tap interactions on elements, firing a single event when:\n * - A complete tap is detected (pointerup after brief touch without excessive movement)\n * - The tap is canceled (event.g., moved too far or held too long)\n */\n\nimport { PointerGesture } from \"../PointerGesture.js\";\nimport { calculateCentroid, createEventName } from \"../utils/index.js\";\n\n/**\n * Configuration options for TapGesture\n * Extends PointerGestureOptions with tap-specific settings\n */\n\n/**\n * Event data specific to tap gesture events\n * Contains information about the tap location and counts\n */\n\n/**\n * Type definition for the CustomEvent created by TapGesture\n */\n\n/**\n * State tracking for the TapGesture\n */\n\n/**\n * TapGesture class for handling tap interactions\n *\n * This gesture detects when users tap on elements without significant movement,\n * and can recognize single taps, double taps, or other multi-tap sequences.\n */\nexport class TapGesture extends PointerGesture {\n state = {\n startCentroid: null,\n currentTapCount: 0,\n lastTapTime: 0,\n lastPosition: null\n };\n\n /**\n * Maximum distance a pointer can move for a gesture to still be considered a tap\n */\n\n /**\n * Number of consecutive taps to detect\n */\n\n constructor(options) {\n super(options);\n this.maxDistance = options.maxDistance ?? 10;\n this.taps = options.taps ?? 1;\n }\n clone(overrides) {\n return new TapGesture(_extends({\n name: this.name,\n preventDefault: this.preventDefault,\n stopPropagation: this.stopPropagation,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n maxDistance: this.maxDistance,\n taps: this.taps,\n requiredKeys: [...this.requiredKeys],\n pointerMode: [...this.pointerMode],\n preventIf: [...this.preventIf],\n pointerOptions: structuredClone(this.pointerOptions)\n }, overrides));\n }\n destroy() {\n this.resetState();\n super.destroy();\n }\n updateOptions(options) {\n super.updateOptions(options);\n this.maxDistance = options.maxDistance ?? this.maxDistance;\n this.taps = options.taps ?? this.taps;\n }\n resetState() {\n this.isActive = false;\n this.state = {\n startCentroid: null,\n currentTapCount: 0,\n lastTapTime: 0,\n lastPosition: null\n };\n }\n\n /**\n * Handle pointer events for the tap gesture\n */\n handlePointerEvent = (pointers, event) => {\n const pointersArray = Array.from(pointers.values());\n\n // Find which element (if any) is being targeted\n const targetElement = this.getTargetElement(event);\n if (!targetElement) {\n return;\n }\n\n // Filter pointers to only include those targeting our element or its children\n const relevantPointers = this.getRelevantPointers(pointersArray, targetElement);\n if (this.shouldPreventGesture(targetElement, event.pointerType) || !this.isWithinPointerCount(relevantPointers, event.pointerType)) {\n if (this.isActive) {\n // Cancel the gesture if it was active\n this.cancelTap(targetElement, relevantPointers, event);\n }\n return;\n }\n switch (event.type) {\n case 'pointerdown':\n if (!this.isActive) {\n // Calculate and store the starting centroid\n this.state.startCentroid = calculateCentroid(relevantPointers);\n this.state.lastPosition = _extends({}, this.state.startCentroid);\n this.isActive = true;\n\n // Store the original target element\n this.originalTarget = targetElement;\n }\n break;\n case 'pointermove':\n if (this.isActive && this.state.startCentroid) {\n // Calculate current position\n const currentPosition = calculateCentroid(relevantPointers);\n this.state.lastPosition = currentPosition;\n\n // Calculate distance from start position\n const deltaX = currentPosition.x - this.state.startCentroid.x;\n const deltaY = currentPosition.y - this.state.startCentroid.y;\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n\n // If moved too far, cancel the tap gesture\n if (distance > this.maxDistance) {\n this.cancelTap(targetElement, relevantPointers, event);\n }\n }\n break;\n case 'pointerup':\n if (this.isActive) {\n // For valid tap: increment tap count\n this.state.currentTapCount += 1;\n\n // Make sure we have a valid position before firing the tap event\n const position = this.state.lastPosition || this.state.startCentroid;\n if (!position) {\n this.cancelTap(targetElement, relevantPointers, event);\n return;\n }\n\n // Check if we've reached the desired number of taps\n if (this.state.currentTapCount >= this.taps) {\n // The complete tap sequence has been detected - fire the tap event\n this.fireTapEvent(targetElement, relevantPointers, event, position);\n\n // Reset state after successful tap\n this.resetState();\n } else {\n // Store the time of this tap for multi-tap detection\n this.state.lastTapTime = event.timeStamp;\n\n // Reset active state but keep the tap count for multi-tap detection\n this.isActive = false;\n\n // For multi-tap detection: keep track of the last tap position\n // but clear the start centroid to prepare for next tap\n this.state.startCentroid = null;\n\n // Start a timeout to reset the tap count if the next tap doesn't come soon enough\n setTimeout(() => {\n if (this.state && this.state.currentTapCount > 0 && this.state.currentTapCount < this.taps) {\n this.state.currentTapCount = 0;\n }\n }, 300); // 300ms is a typical double-tap detection window\n }\n }\n break;\n case 'pointercancel':\n case 'forceCancel':\n // Cancel the gesture\n this.cancelTap(targetElement, relevantPointers, event);\n break;\n default:\n break;\n }\n };\n\n /**\n * Fire the main tap event when a valid tap is detected\n */\n fireTapEvent(element, pointers, event, position) {\n // Get list of active gestures\n const activeGestures = this.gesturesRegistry.getActiveGestures(element);\n\n // Create custom event data for the tap event\n const customEventData = {\n gestureName: this.name,\n centroid: position,\n target: event.target,\n srcEvent: event,\n phase: 'end',\n // The tap is complete, so we use 'end' state for the event data\n pointers,\n timeStamp: event.timeStamp,\n x: position.x,\n y: position.y,\n tapCount: this.state.currentTapCount,\n activeGestures,\n customData: this.customData\n };\n\n // Dispatch a single 'tap' event (not 'tapStart', 'tapEnd', etc.)\n const domEvent = new CustomEvent(this.name, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: customEventData\n });\n element.dispatchEvent(domEvent);\n\n // Apply preventDefault/stopPropagation if configured\n if (this.preventDefault) {\n event.preventDefault();\n }\n if (this.stopPropagation) {\n event.stopPropagation();\n }\n }\n\n /**\n * Cancel the current tap gesture\n */\n cancelTap(element, pointers, event) {\n if (this.state.startCentroid || this.state.lastPosition) {\n const position = this.state.lastPosition || this.state.startCentroid;\n\n // Get list of active gestures\n const activeGestures = this.gesturesRegistry.getActiveGestures(element);\n\n // Create custom event data for the cancel event\n const customEventData = {\n gestureName: this.name,\n centroid: position,\n target: event.target,\n srcEvent: event,\n phase: 'cancel',\n pointers,\n timeStamp: event.timeStamp,\n x: position.x,\n y: position.y,\n tapCount: this.state.currentTapCount,\n activeGestures,\n customData: this.customData\n };\n\n // Dispatch a 'tapCancel' event\n const eventName = createEventName(this.name, 'cancel');\n const domEvent = new CustomEvent(eventName, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: customEventData\n });\n element.dispatchEvent(domEvent);\n }\n this.resetState();\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * PressGesture - Detects press and hold interactions\n *\n * This gesture tracks when users press and hold on an element for a specified duration, firing events when:\n * - The press begins and passes the holding threshold time (start, ongoing)\n * - The press ends (end)\n * - The press is canceled by movement beyond threshold (cancel)\n *\n * This gesture is commonly used for contextual menus, revealing additional options, or alternate actions.\n */\n\nimport { PointerGesture } from \"../PointerGesture.js\";\nimport { calculateCentroid, createEventName } from \"../utils/index.js\";\n\n/**\n * Configuration options for PressGesture\n * Extends PointerGestureOptions with press-specific options\n */\n\n/**\n * Event data specific to press gesture events\n * Contains information about the press location and duration\n */\n\n/**\n * Type definition for the CustomEvent created by PressGesture\n */\n\n/**\n * State tracking for the PressGesture\n */\n\n/**\n * PressGesture class for handling press/hold interactions\n *\n * This gesture detects when users press and hold on an element for a specified duration,\n * and dispatches press-related events when the user holds long enough.\n *\n * The `start` and `ongoing` events are dispatched at the same time once the press threshold is reached.\n * If the press is canceled (event.g., by moving too far), a `cancel` event is dispatched before the `end` event.\n */\nexport class PressGesture extends PointerGesture {\n state = {\n startCentroid: null,\n lastPosition: null,\n timerId: null,\n startTime: 0,\n pressThresholdReached: false\n };\n\n /**\n * Duration in milliseconds required to hold before the press gesture is recognized\n */\n\n /**\n * Maximum distance a pointer can move for a gesture to still be considered a press\n */\n\n constructor(options) {\n super(options);\n this.duration = options.duration ?? 500;\n this.maxDistance = options.maxDistance ?? 10;\n }\n clone(overrides) {\n return new PressGesture(_extends({\n name: this.name,\n preventDefault: this.preventDefault,\n stopPropagation: this.stopPropagation,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n duration: this.duration,\n maxDistance: this.maxDistance,\n requiredKeys: [...this.requiredKeys],\n pointerMode: [...this.pointerMode],\n preventIf: [...this.preventIf],\n pointerOptions: structuredClone(this.pointerOptions)\n }, overrides));\n }\n destroy() {\n this.clearPressTimer();\n this.resetState();\n super.destroy();\n }\n updateOptions(options) {\n super.updateOptions(options);\n this.duration = options.duration ?? this.duration;\n this.maxDistance = options.maxDistance ?? this.maxDistance;\n }\n resetState() {\n this.clearPressTimer();\n this.isActive = false;\n this.state = _extends({}, this.state, {\n startCentroid: null,\n lastPosition: null,\n timerId: null,\n startTime: 0,\n pressThresholdReached: false\n });\n }\n\n /**\n * Clear the press timer if it's active\n */\n clearPressTimer() {\n if (this.state.timerId !== null) {\n clearTimeout(this.state.timerId);\n this.state.timerId = null;\n }\n }\n\n /**\n * Handle pointer events for the press gesture\n */\n handlePointerEvent = (pointers, event) => {\n const pointersArray = Array.from(pointers.values());\n\n // Check for our forceCancel event to handle interrupted gestures (from contextmenu, blur)\n if (event.type === 'forceCancel') {\n // Reset all active press gestures when we get a force reset event\n this.cancelPress(event.target, pointersArray, event);\n return;\n }\n\n // Find which element (if any) is being targeted\n const targetElement = this.getTargetElement(event);\n if (!targetElement) {\n return;\n }\n\n // Check if this gesture should be prevented by active gestures\n if (this.shouldPreventGesture(targetElement, event.pointerType)) {\n if (this.isActive) {\n // If the gesture was active but now should be prevented, cancel it gracefully\n this.cancelPress(targetElement, pointersArray, event);\n }\n return;\n }\n\n // Filter pointers to only include those targeting our element or its children\n const relevantPointers = this.getRelevantPointers(pointersArray, targetElement);\n if (!this.isWithinPointerCount(relevantPointers, event.pointerType)) {\n if (this.isActive) {\n // Cancel or end the gesture if it was active\n this.cancelPress(targetElement, relevantPointers, event);\n }\n return;\n }\n switch (event.type) {\n case 'pointerdown':\n if (!this.isActive && !this.state.startCentroid) {\n // Calculate and store the starting centroid\n this.state.startCentroid = calculateCentroid(relevantPointers);\n this.state.lastPosition = _extends({}, this.state.startCentroid);\n this.state.startTime = event.timeStamp;\n this.isActive = true;\n\n // Store the original target element\n this.originalTarget = targetElement;\n\n // Start the timer for press recognition\n this.clearPressTimer(); // Clear any existing timer first\n this.state.timerId = setTimeout(() => {\n if (this.isActive && this.state.startCentroid) {\n this.state.pressThresholdReached = true;\n const lastPosition = this.state.lastPosition;\n\n // Emit press start event\n this.emitPressEvent(targetElement, 'start', relevantPointers, event, lastPosition);\n this.emitPressEvent(targetElement, 'ongoing', relevantPointers, event, lastPosition);\n }\n }, this.duration);\n }\n break;\n case 'pointermove':\n if (this.isActive && this.state.startCentroid) {\n // Calculate current position\n const currentPosition = calculateCentroid(relevantPointers);\n this.state.lastPosition = currentPosition;\n\n // Calculate distance from start position\n const deltaX = currentPosition.x - this.state.startCentroid.x;\n const deltaY = currentPosition.y - this.state.startCentroid.y;\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n\n // If moved too far, cancel the press gesture\n if (distance > this.maxDistance) {\n this.cancelPress(targetElement, relevantPointers, event);\n }\n }\n break;\n case 'pointerup':\n if (this.isActive) {\n if (this.state.pressThresholdReached) {\n // Complete the press gesture if we've held long enough\n const position = this.state.lastPosition || this.state.startCentroid;\n this.emitPressEvent(targetElement, 'end', relevantPointers, event, position);\n }\n\n // Reset state\n this.resetState();\n }\n break;\n case 'pointercancel':\n case 'forceCancel':\n // Cancel the gesture\n this.cancelPress(targetElement, relevantPointers, event);\n break;\n default:\n break;\n }\n };\n\n /**\n * Emit press-specific events with additional data\n */\n emitPressEvent(element, phase, pointers, event, position) {\n // Get list of active gestures\n const activeGestures = this.gesturesRegistry.getActiveGestures(element);\n\n // Calculate current duration of the press\n const currentDuration = event.timeStamp - this.state.startTime;\n\n // Create custom event data\n const customEventData = {\n gestureName: this.name,\n centroid: position,\n target: event.target,\n srcEvent: event,\n phase,\n pointers,\n timeStamp: event.timeStamp,\n x: position.x,\n y: position.y,\n duration: currentDuration,\n activeGestures,\n customData: this.customData\n };\n\n // Event names to trigger\n const eventName = createEventName(this.name, phase);\n\n // Dispatch custom events on the element\n const domEvent = new CustomEvent(eventName, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: customEventData\n });\n element.dispatchEvent(domEvent);\n\n // Apply preventDefault/stopPropagation if configured\n if (this.preventDefault) {\n event.preventDefault();\n }\n if (this.stopPropagation) {\n event.stopPropagation();\n }\n }\n\n /**\n * Cancel the current press gesture\n */\n cancelPress(element, pointers, event) {\n if (this.isActive && this.state.pressThresholdReached) {\n const position = this.state.lastPosition || this.state.startCentroid;\n this.emitPressEvent(element ?? this.element, 'cancel', pointers, event, position);\n this.emitPressEvent(element ?? this.element, 'end', pointers, event, position);\n }\n this.resetState();\n }\n}","/**\n * Calculate the distance between two points\n */\nexport function getDistance(pointA, pointB) {\n const deltaX = pointB.x - pointA.x;\n const deltaY = pointB.y - pointA.y;\n return Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n}","import { getDistance } from \"./getDistance.js\";\n\n/**\n * Calculate the average distance between all pairs of pointers\n */\nexport function calculateAverageDistance(pointers) {\n if (pointers.length < 2) {\n return 0;\n }\n let totalDistance = 0;\n let pairCount = 0;\n\n // Calculate distance between each pair of pointers\n for (let i = 0; i < pointers.length; i += 1) {\n for (let j = i + 1; j < pointers.length; j += 1) {\n totalDistance += getDistance({\n x: pointers[i].clientX,\n y: pointers[i].clientY\n }, {\n x: pointers[j].clientX,\n y: pointers[j].clientY\n });\n pairCount += 1;\n }\n }\n\n // Return average distance\n return pairCount > 0 ? totalDistance / pairCount : 0;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * PinchGesture - Detects pinch (zoom) movements with two or more pointers\n *\n * This gesture tracks when multiple pointers move toward or away from each other, firing events when:\n * - Two or more pointers begin moving (start)\n * - The pointers continue changing distance (ongoing)\n * - One or more pointers are released or lifted (end)\n *\n * This gesture is commonly used to implement zoom functionality in touch interfaces.\n */\n\nimport { PointerGesture } from \"../PointerGesture.js\";\nimport { calculateAverageDistance, calculateCentroid, createEventName, getPinchDirection } from \"../utils/index.js\";\n\n/**\n * Configuration options for the PinchGesture\n * Uses the same options as the base PointerGesture\n */\n\n/**\n * Event data specific to pinch gesture events\n * Contains information about scale, distance, and velocity\n */\n\n/**\n * Type definition for the CustomEvent created by PinchGesture\n */\n\n/**\n * State tracking for the PinchGesture\n */\n\n/**\n * PinchGesture class for handling pinch/zoom interactions\n *\n * This gesture detects when users move multiple pointers toward or away from each other,\n * and dispatches scale-related events with distance and velocity information.\n */\nexport class PinchGesture extends PointerGesture {\n state = {\n startDistance: 0,\n lastDistance: 0,\n lastScale: 1,\n lastTime: 0,\n velocity: 0,\n totalScale: 1,\n deltaScale: 0\n };\n\n /**\n * Movement threshold in pixels that must be exceeded before the gesture activates.\n * Higher values reduce false positive gesture detection for small movements.\n */\n\n constructor(options) {\n super(_extends({}, options, {\n minPointers: options.minPointers ?? 2\n }));\n this.threshold = options.threshold ?? 0;\n }\n clone(overrides) {\n return new PinchGesture(_extends({\n name: this.name,\n preventDefault: this.preventDefault,\n stopPropagation: this.stopPropagation,\n threshold: this.threshold,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n requiredKeys: [...this.requiredKeys],\n pointerMode: [...this.pointerMode],\n preventIf: [...this.preventIf],\n pointerOptions: structuredClone(this.pointerOptions)\n }, overrides));\n }\n destroy() {\n this.resetState();\n super.destroy();\n }\n updateOptions(options) {\n super.updateOptions(options);\n }\n resetState() {\n this.isActive = false;\n this.state = _extends({}, this.state, {\n startDistance: 0,\n lastDistance: 0,\n lastScale: 1,\n lastTime: 0,\n velocity: 0,\n deltaScale: 0\n });\n }\n\n /**\n * Handle pointer events for the pinch gesture\n */\n handlePointerEvent = (pointers, event) => {\n const pointersArray = Array.from(pointers.values());\n\n // Find which element (if any) is being targeted\n const targetElement = this.getTargetElement(event);\n if (!targetElement) {\n return;\n }\n\n // Check if this gesture should be prevented by active gestures\n if (this.shouldPreventGesture(targetElement, event.pointerType)) {\n if (this.isActive) {\n // If the gesture was active but now should be prevented, end it gracefully\n this.emitPinchEvent(targetElement, 'cancel', pointersArray, event);\n this.resetState();\n }\n return;\n }\n\n // Filter pointers to only include those targeting our element or its children\n const relevantPointers = this.getRelevantPointers(pointersArray, targetElement);\n switch (event.type) {\n case 'pointerdown':\n if (relevantPointers.length >= 2 && !this.isActive) {\n // Calculate and store the starting distance between pointers\n const initialDistance = calculateAverageDistance(relevantPointers);\n this.state.startDistance = initialDistance;\n this.state.lastDistance = initialDistance;\n this.state.lastTime = event.timeStamp;\n\n // Store the original target element\n this.originalTarget = targetElement;\n } else if (this.isActive && relevantPointers.length >= 2) {\n // A new pointer was added during an active gesture\n // Adjust the start distance to prevent jumping (similar to pointer removal logic)\n const newDistance = calculateAverageDistance(relevantPointers);\n // Adjust startDistance so that the current scale is preserved\n this.state.startDistance = newDistance / this.state.lastScale;\n this.state.lastDistance = newDistance;\n this.state.lastTime = event.timeStamp;\n }\n break;\n case 'pointermove':\n if (this.state.startDistance && this.isWithinPointerCount(relevantPointers, event.pointerType)) {\n // Calculate current distance between pointers\n const currentDistance = calculateAverageDistance(relevantPointers);\n\n // Calculate absolute distance change\n const distanceChange = Math.abs(currentDistance - this.state.lastDistance);\n\n // Only proceed if the distance between pointers has changed enough\n if (distanceChange !== 0 && distanceChange >= this.threshold) {\n // Calculate scale relative to starting distance\n const scale = this.state.startDistance ? currentDistance / this.state.startDistance : 1;\n\n // Calculate the relative scale change since last event\n const scaleChange = scale / this.state.lastScale;\n // Apply this change to the total accumulated scale\n this.state.totalScale *= scaleChange;\n // Calculate velocity (change in scale over time)\n const deltaTime = (event.timeStamp - this.state.lastTime) / 1000; // convert to seconds\n if (this.state.lastDistance) {\n const deltaDistance = currentDistance - this.state.lastDistance;\n const result = deltaDistance / deltaTime;\n this.state.velocity = Number.isNaN(result) ? 0 : result;\n }\n\n // Update state\n this.state.lastDistance = currentDistance;\n this.state.deltaScale = scale - this.state.lastScale;\n this.state.lastScale = scale;\n this.state.lastTime = event.timeStamp;\n if (!this.isActive) {\n // Mark gesture as active\n this.isActive = true;\n\n // Emit start event\n this.emitPinchEvent(targetElement, 'start', relevantPointers, event);\n this.emitPinchEvent(targetElement, 'ongoing', relevantPointers, event);\n } else {\n // Emit ongoing event\n this.emitPinchEvent(targetElement, 'ongoing', relevantPointers, event);\n }\n }\n }\n break;\n case 'pointerup':\n case 'pointercancel':\n case 'forceCancel':\n if (this.isActive) {\n const remainingPointers = relevantPointers.filter(p => p.type !== 'pointerup' && p.type !== 'pointercancel');\n\n // If we no longer meet the pointer count requirements, end the gesture\n if (!this.isWithinPointerCount(remainingPointers, event.pointerType)) {\n if (event.type === 'pointercancel') {\n this.emitPinchEvent(targetElement, 'cancel', relevantPointers, event);\n }\n this.emitPinchEvent(targetElement, 'end', relevantPointers, event);\n\n // Reset state\n this.resetState();\n } else if (remainingPointers.length >= 2) {\n // If we still have enough pointers, update the start distance\n // to prevent jumping when a finger is lifted\n const newDistance = calculateAverageDistance(remainingPointers);\n this.state.startDistance = newDistance / this.state.lastScale;\n this.state.lastDistance = newDistance;\n this.state.lastTime = event.timeStamp;\n }\n }\n break;\n default:\n break;\n }\n };\n\n /**\n * Emit pinch-specific events with additional data\n */\n emitPinchEvent(element, phase, pointers, event) {\n // Calculate current centroid\n const centroid = calculateCentroid(pointers);\n\n // Create custom event data\n const distance = this.state.lastDistance;\n const scale = this.state.lastScale;\n\n // Get list of active gestures\n const activeGestures = this.gesturesRegistry.getActiveGestures(element);\n const customEventData = {\n gestureName: this.name,\n centroid,\n target: event.target,\n srcEvent: event,\n phase,\n pointers,\n timeStamp: event.timeStamp,\n scale,\n deltaScale: this.state.deltaScale,\n totalScale: this.state.totalScale,\n distance,\n velocity: this.state.velocity,\n activeGestures,\n direction: getPinchDirection(this.state.velocity),\n customData: this.customData\n };\n\n // Handle default event behavior\n if (this.preventDefault) {\n event.preventDefault();\n }\n if (this.stopPropagation) {\n event.stopPropagation();\n }\n\n // Event names to trigger\n const eventName = createEventName(this.name, phase);\n\n // Dispatch custom events on the element\n const domEvent = new CustomEvent(eventName, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: customEventData\n });\n element.dispatchEvent(domEvent);\n }\n}","const DIRECTION_THRESHOLD = 0;\nexport const getPinchDirection = velocity => {\n if (velocity > DIRECTION_THRESHOLD) {\n return 1; // Zooming in\n }\n if (velocity < -DIRECTION_THRESHOLD) {\n return -1; // Zooming out\n }\n return 0; // No significant movement\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * TurnWheelGesture - Detects wheel events on an element\n *\n * This gesture tracks mouse wheel or touchpad scroll events on elements, firing events when:\n * - The user scrolls/wheels on the element (ongoing)\n *\n * Unlike other gestures which may have start/ongoing/end states,\n * wheel gestures are always considered \"ongoing\" since they are discrete events.\n */\n\nimport { Gesture } from \"../Gesture.js\";\nimport { calculateCentroid, createEventName } from \"../utils/index.js\";\n\n/**\n * Configuration options for the TurnWheelGesture\n * Uses the base gesture options with additional wheel-specific options\n */\n\n/**\n * Event data specific to wheel gesture events\n * Contains information about scroll delta amounts and mode\n */\n\n/**\n * Type definition for the CustomEvent created by TurnWheelGesture\n */\n\n/**\n * State tracking for the TurnWheelGesture\n */\n\n/**\n * TurnWheelGesture class for handling wheel/scroll interactions\n *\n * This gesture detects when users scroll or use the mouse wheel on elements,\n * and dispatches corresponding scroll events with delta information.\n * Unlike most gestures, it extends directly from Gesture rather than PointerGesture.\n */\nexport class TurnWheelGesture extends Gesture {\n state = {\n totalDeltaX: 0,\n totalDeltaY: 0,\n totalDeltaZ: 0\n };\n\n /**\n * Scaling factor for delta values\n * Values > 1 increase sensitivity, values < 1 decrease sensitivity\n */\n\n /**\n * Maximum value for totalDelta values\n * Limits how large the accumulated wheel deltas can be\n */\n\n /**\n * Minimum value for totalDelta values\n * Sets a lower bound for accumulated wheel deltas\n */\n\n /**\n * Initial value for totalDelta values\n * Sets the starting value for delta trackers\n */\n\n /**\n * Whether to invert the direction of delta changes\n * When true, reverses the sign of deltaX, deltaY, and deltaZ values\n */\n\n constructor(options) {\n super(options);\n this.sensitivity = options.sensitivity ?? 1;\n this.max = options.max ?? Number.MAX_SAFE_INTEGER;\n this.min = options.min ?? Number.MIN_SAFE_INTEGER;\n this.initialDelta = options.initialDelta ?? 0;\n this.invert = options.invert ?? false;\n this.state.totalDeltaX = this.initialDelta;\n this.state.totalDeltaY = this.initialDelta;\n this.state.totalDeltaZ = this.initialDelta;\n }\n clone(overrides) {\n return new TurnWheelGesture(_extends({\n name: this.name,\n preventDefault: this.preventDefault,\n stopPropagation: this.stopPropagation,\n sensitivity: this.sensitivity,\n max: this.max,\n min: this.min,\n initialDelta: this.initialDelta,\n invert: this.invert,\n requiredKeys: [...this.requiredKeys],\n preventIf: [...this.preventIf]\n }, overrides));\n }\n init(element, pointerManager, gestureRegistry, keyboardManager) {\n super.init(element, pointerManager, gestureRegistry, keyboardManager);\n\n // Add event listener directly to the element\n // @ts-expect-error, WheelEvent is correct.\n this.element.addEventListener('wheel', this.handleWheelEvent);\n }\n destroy() {\n // Remove the element-specific event listener\n // @ts-expect-error, WheelEvent is correct.\n this.element.removeEventListener('wheel', this.handleWheelEvent);\n this.resetState();\n super.destroy();\n }\n resetState() {\n this.isActive = false;\n this.state = {\n totalDeltaX: 0,\n totalDeltaY: 0,\n totalDeltaZ: 0\n };\n }\n updateOptions(options) {\n super.updateOptions(options);\n this.sensitivity = options.sensitivity ?? this.sensitivity;\n this.max = options.max ?? this.max;\n this.min = options.min ?? this.min;\n this.initialDelta = options.initialDelta ?? this.initialDelta;\n this.invert = options.invert ?? this.invert;\n }\n\n /**\n * Handle wheel events for a specific element\n * @param element The element that received the wheel event\n * @param event The original wheel event\n */\n handleWheelEvent = event => {\n // Check if this gesture should be prevented by active gestures\n if (this.shouldPreventGesture(this.element, 'mouse')) {\n return;\n }\n\n // Get pointers from the PointerManager to use for centroid calculation\n const pointers = this.pointerManager.getPointers() || new Map();\n const pointersArray = Array.from(pointers.values());\n\n // Update total deltas with scaled values\n this.state.totalDeltaX += event.deltaX * this.sensitivity * (this.invert ? -1 : 1);\n this.state.totalDeltaY += event.deltaY * this.sensitivity * (this.invert ? -1 : 1);\n this.state.totalDeltaZ += event.deltaZ * this.sensitivity * (this.invert ? -1 : 1);\n\n // Apply proper min/max clamping for each axis\n // Ensure values stay between min and max bounds\n ['totalDeltaX', 'totalDeltaY', 'totalDeltaZ'].forEach(axis => {\n // First clamp at the minimum bound\n if (this.state[axis] < this.min) {\n this.state[axis] = this.min;\n }\n\n // Then clamp at the maximum bound\n if (this.state[axis] > this.max) {\n this.state[axis] = this.max;\n }\n });\n\n // Emit the wheel event\n this.emitWheelEvent(pointersArray, event);\n };\n\n /**\n * Emit wheel-specific events\n * @param pointers The current pointers on the element\n * @param event The original wheel event\n */\n emitWheelEvent(pointers, event) {\n // Calculate centroid - either from existing pointers or from the wheel event position\n const centroid = pointers.length > 0 ? calculateCentroid(pointers) : {\n x: event.clientX,\n y: event.clientY\n };\n\n // Get list of active gestures\n const activeGestures = this.gesturesRegistry.getActiveGestures(this.element);\n\n // Create custom event data\n const customEventData = {\n gestureName: this.name,\n centroid,\n target: event.target,\n srcEvent: event,\n phase: 'ongoing',\n // Wheel events are always in \"ongoing\" state\n pointers,\n timeStamp: event.timeStamp,\n deltaX: event.deltaX * this.sensitivity * (this.invert ? -1 : 1),\n deltaY: event.deltaY * this.sensitivity * (this.invert ? -1 : 1),\n deltaZ: event.deltaZ * this.sensitivity * (this.invert ? -1 : 1),\n deltaMode: event.deltaMode,\n totalDeltaX: this.state.totalDeltaX,\n totalDeltaY: this.state.totalDeltaY,\n totalDeltaZ: this.state.totalDeltaZ,\n activeGestures,\n customData: this.customData\n };\n\n // Apply default event behavior if configured\n if (this.preventDefault) {\n event.preventDefault();\n }\n if (this.stopPropagation) {\n event.stopPropagation();\n }\n\n // Event names to trigger\n const eventName = createEventName(this.name, 'ongoing');\n\n // Dispatch custom events on the element\n const domEvent = new CustomEvent(eventName, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: customEventData\n });\n this.element.dispatchEvent(domEvent);\n }\n}","export const preventDefault = event => {\n if (event.cancelable) {\n event.preventDefault();\n }\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * TapAndDragGesture - Detects tap followed by drag gestures using composition\n *\n * This gesture uses internal TapGesture and PanGesture instances to:\n * 1. First, detect a tap (quick touch without movement)\n * 2. Then, track drag movements on the next pointer down\n *\n * The gesture fires events when:\n * - A tap is completed (tap phase)\n * - Drag movement begins and passes threshold (dragStart)\n * - Drag movement continues (drag)\n * - Drag movement ends (dragEnd)\n * - The gesture is canceled at any point\n */\n\nimport { PointerGesture } from \"../PointerGesture.js\";\nimport { createEventName, preventDefault } from \"../utils/index.js\";\nimport { PanGesture } from \"./PanGesture.js\";\nimport { TapGesture } from \"./TapGesture.js\";\n\n/**\n * Configuration options for TapAndDragGesture\n * Extends PointerGestureOptions with tap and drag specific settings\n */\n\n/**\n * Event data specific to tap and drag gesture events\n * Contains information about the gesture state, position, and movement\n */\n\n/**\n * Type definition for the CustomEvent created by TapAndDragGesture\n */\n\n/**\n * Represents the current phase of the TapAndDrag gesture\n */\n\n/**\n * State tracking for the TapAndDragGesture\n */\n\n/**\n * TapAndDragGesture class for handling tap followed by drag interactions\n *\n * This gesture composes tap and drag logic patterns from TapGesture and PanGesture\n * into a single coordinated gesture that handles tap-then-drag interactions.\n */\nexport class TapAndDragGesture extends PointerGesture {\n state = {\n phase: 'waitingForTap',\n dragTimeoutId: null\n };\n\n /**\n * Maximum distance a pointer can move during tap for it to still be considered a tap\n * (Following TapGesture pattern)\n */\n\n /**\n * Maximum time between tap completion and drag start\n */\n\n /**\n * Movement threshold for drag activation\n */\n\n /**\n * Allowed directions for the drag gesture\n */\n\n constructor(options) {\n super(options);\n this.tapMaxDistance = options.tapMaxDistance ?? 10;\n this.dragTimeout = options.dragTimeout ?? 1000;\n this.dragThreshold = options.dragThreshold ?? 0;\n this.dragDirection = options.dragDirection || ['up', 'down', 'left', 'right'];\n this.tapGesture = new TapGesture({\n name: `${this.name}-tap`,\n maxDistance: this.tapMaxDistance,\n maxPointers: this.maxPointers,\n pointerMode: this.pointerMode,\n requiredKeys: this.requiredKeys,\n preventIf: this.preventIf,\n pointerOptions: structuredClone(this.pointerOptions)\n });\n this.panGesture = new PanGesture({\n name: `${this.name}-pan`,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n threshold: this.dragThreshold,\n direction: this.dragDirection,\n pointerMode: this.pointerMode,\n requiredKeys: this.requiredKeys,\n preventIf: this.preventIf,\n pointerOptions: structuredClone(this.pointerOptions)\n });\n }\n clone(overrides) {\n return new TapAndDragGesture(_extends({\n name: this.name,\n preventDefault: this.preventDefault,\n stopPropagation: this.stopPropagation,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n tapMaxDistance: this.tapMaxDistance,\n dragTimeout: this.dragTimeout,\n dragThreshold: this.dragThreshold,\n dragDirection: [...this.dragDirection],\n requiredKeys: [...this.requiredKeys],\n pointerMode: [...this.pointerMode],\n preventIf: [...this.preventIf],\n pointerOptions: structuredClone(this.pointerOptions)\n }, overrides));\n }\n init(element, pointerManager, gestureRegistry, keyboardManager) {\n super.init(element, pointerManager, gestureRegistry, keyboardManager);\n this.tapGesture.init(element, pointerManager, gestureRegistry, keyboardManager);\n this.panGesture.init(element, pointerManager, gestureRegistry, keyboardManager);\n this.element.addEventListener(this.tapGesture.name, this.tapHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener(`${this.panGesture.name}Start`, this.dragStartHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener(this.panGesture.name, this.dragMoveHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener(`${this.panGesture.name}End`, this.dragEndHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener(`${this.panGesture.name}Cancel`, this.dragEndHandler);\n }\n destroy() {\n this.resetState();\n this.tapGesture.destroy();\n this.panGesture.destroy();\n this.element.removeEventListener(this.tapGesture.name, this.tapHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener(`${this.panGesture.name}Start`, this.dragStartHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener(this.panGesture.name, this.dragMoveHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener(`${this.panGesture.name}End`, this.dragEndHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener(`${this.panGesture.name}Cancel`, this.dragEndHandler);\n super.destroy();\n }\n updateOptions(options) {\n super.updateOptions(options);\n this.tapMaxDistance = options.tapMaxDistance ?? this.tapMaxDistance;\n this.dragTimeout = options.dragTimeout ?? this.dragTimeout;\n this.dragThreshold = options.dragThreshold ?? this.dragThreshold;\n this.dragDirection = options.dragDirection || this.dragDirection;\n this.element.dispatchEvent(new CustomEvent(`${this.panGesture.name}ChangeOptions`, {\n detail: {\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n threshold: this.dragThreshold,\n direction: this.dragDirection,\n pointerMode: this.pointerMode,\n requiredKeys: this.requiredKeys,\n preventIf: this.preventIf,\n pointerOptions: structuredClone(this.pointerOptions)\n }\n }));\n this.element.dispatchEvent(new CustomEvent(`${this.tapGesture.name}ChangeOptions`, {\n detail: {\n maxDistance: this.tapMaxDistance,\n maxPointers: this.maxPointers,\n pointerMode: this.pointerMode,\n requiredKeys: this.requiredKeys,\n preventIf: this.preventIf,\n pointerOptions: structuredClone(this.pointerOptions)\n }\n }));\n }\n resetState() {\n if (this.state.dragTimeoutId !== null) {\n clearTimeout(this.state.dragTimeoutId);\n }\n this.restoreTouchAction();\n this.isActive = false;\n this.state = {\n phase: 'waitingForTap',\n dragTimeoutId: null\n };\n }\n\n /**\n * This can be empty because the TapAndDragGesture relies on TapGesture and PanGesture to handle pointer events\n * The internal gestures will manage their own state and events, while this class coordinates between them\n */\n handlePointerEvent() {}\n tapHandler = () => {\n if (this.state.phase !== 'waitingForTap') {\n return;\n }\n this.state.phase = 'tapDetected';\n this.setTouchAction();\n\n // Start timeout to wait for drag start\n this.state.dragTimeoutId = setTimeout(() => {\n // Timeout expired, reset gesture\n this.resetState();\n }, this.dragTimeout);\n };\n dragStartHandler = event => {\n if (this.state.phase !== 'tapDetected') {\n return;\n }\n\n // Clear the drag timeout as drag has started\n if (this.state.dragTimeoutId !== null) {\n clearTimeout(this.state.dragTimeoutId);\n this.state.dragTimeoutId = null;\n }\n this.restoreTouchAction();\n this.state.phase = 'dragging';\n this.isActive = true;\n\n // Fire start event\n this.element.dispatchEvent(new CustomEvent(createEventName(this.name, event.detail.phase), event));\n };\n dragMoveHandler = event => {\n if (this.state.phase !== 'dragging') {\n return;\n }\n\n // Fire move event\n this.element.dispatchEvent(new CustomEvent(createEventName(this.name, event.detail.phase), event));\n };\n dragEndHandler = event => {\n if (this.state.phase !== 'dragging') {\n return;\n }\n this.resetState();\n\n // Fire end event\n this.element.dispatchEvent(new CustomEvent(createEventName(this.name, event.detail.phase), event));\n };\n setTouchAction() {\n this.element.addEventListener('touchstart', preventDefault, {\n passive: false\n });\n }\n restoreTouchAction() {\n this.element.removeEventListener('touchstart', preventDefault);\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * PressAndDragGesture - Detects press followed by drag gestures using composition\n *\n * This gesture uses internal PressGesture and PanGesture instances to:\n * 1. First, detect a press (hold for specified duration without movement)\n * 2. Then, track drag movements from the press position\n *\n * The gesture fires events when:\n * - A press is completed (press phase)\n * - Drag movement begins and passes threshold (dragStart)\n * - Drag movement continues (drag)\n * - Drag movement ends (dragEnd)\n * - The gesture is canceled at any point\n *\n * This is ideal for panning operations where you want to hold first, then drag.\n */\n\nimport { PointerGesture } from \"../PointerGesture.js\";\nimport { createEventName, preventDefault } from \"../utils/index.js\";\nimport { PanGesture } from \"./PanGesture.js\";\nimport { PressGesture } from \"./PressGesture.js\";\n\n/**\n * Configuration options for PressAndDragGesture\n * Extends PointerGestureOptions with press and drag specific settings\n */\n\n/**\n * Event data specific to press and drag gesture events\n * Contains information about the gesture state, position, and movement\n */\n\n/**\n * Type definition for the CustomEvent created by PressAndDragGesture\n */\n\n/**\n * Represents the current phase of the PressAndDrag gesture\n */\n\n/**\n * State tracking for the PressAndDragGesture\n */\n\n/**\n * PressAndDragGesture class for handling press followed by drag interactions\n *\n * This gesture composes press and drag logic patterns from PressGesture and PanGesture\n * into a single coordinated gesture that handles press-then-drag interactions.\n */\nexport class PressAndDragGesture extends PointerGesture {\n state = {\n phase: 'waitingForPress',\n dragTimeoutId: null\n };\n\n /**\n * Duration required for press recognition\n */\n\n /**\n * Maximum distance a pointer can move during press for it to still be considered a press\n */\n\n /**\n * Maximum time between press completion and drag start\n */\n\n /**\n * Movement threshold for drag activation\n */\n\n /**\n * Allowed directions for the drag gesture\n */\n\n constructor(options) {\n super(options);\n this.pressDuration = options.pressDuration ?? 500;\n this.pressMaxDistance = options.pressMaxDistance ?? 10;\n this.dragTimeout = options.dragTimeout ?? 1000;\n this.dragThreshold = options.dragThreshold ?? 0;\n this.dragDirection = options.dragDirection || ['up', 'down', 'left', 'right'];\n this.pressGesture = new PressGesture({\n name: `${this.name}-press`,\n duration: this.pressDuration,\n maxDistance: this.pressMaxDistance,\n maxPointers: this.maxPointers,\n pointerMode: this.pointerMode,\n requiredKeys: this.requiredKeys,\n preventIf: this.preventIf,\n pointerOptions: structuredClone(this.pointerOptions)\n });\n this.panGesture = new PanGesture({\n name: `${this.name}-pan`,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n threshold: this.dragThreshold,\n direction: this.dragDirection,\n pointerMode: this.pointerMode,\n requiredKeys: this.requiredKeys,\n preventIf: this.preventIf,\n pointerOptions: structuredClone(this.pointerOptions)\n });\n }\n clone(overrides) {\n return new PressAndDragGesture(_extends({\n name: this.name,\n preventDefault: this.preventDefault,\n stopPropagation: this.stopPropagation,\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n pressDuration: this.pressDuration,\n pressMaxDistance: this.pressMaxDistance,\n dragTimeout: this.dragTimeout,\n dragThreshold: this.dragThreshold,\n dragDirection: [...this.dragDirection],\n requiredKeys: [...this.requiredKeys],\n pointerMode: [...this.pointerMode],\n preventIf: [...this.preventIf],\n pointerOptions: structuredClone(this.pointerOptions)\n }, overrides));\n }\n init(element, pointerManager, gestureRegistry, keyboardManager) {\n super.init(element, pointerManager, gestureRegistry, keyboardManager);\n this.pressGesture.init(element, pointerManager, gestureRegistry, keyboardManager);\n this.panGesture.init(element, pointerManager, gestureRegistry, keyboardManager);\n\n // Listen to press gesture events\n this.element.addEventListener(this.pressGesture.name, this.pressHandler);\n\n // Listen to pan gesture events for dragging\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener(`${this.panGesture.name}Start`, this.dragStartHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener(this.panGesture.name, this.dragMoveHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener(`${this.panGesture.name}End`, this.dragEndHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.addEventListener(`${this.panGesture.name}Cancel`, this.dragEndHandler);\n }\n destroy() {\n this.resetState();\n this.pressGesture.destroy();\n this.panGesture.destroy();\n this.element.removeEventListener(this.pressGesture.name, this.pressHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener(`${this.panGesture.name}Start`, this.dragStartHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener(this.panGesture.name, this.dragMoveHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener(`${this.panGesture.name}End`, this.dragEndHandler);\n // @ts-expect-error, PointerEvent is correct.\n this.element.removeEventListener(`${this.panGesture.name}Cancel`, this.dragEndHandler);\n super.destroy();\n }\n updateOptions(options) {\n super.updateOptions(options);\n this.pressDuration = options.pressDuration ?? this.pressDuration;\n this.pressMaxDistance = options.pressMaxDistance ?? this.pressMaxDistance;\n this.dragTimeout = options.dragTimeout ?? this.dragTimeout;\n this.dragThreshold = options.dragThreshold ?? this.dragThreshold;\n this.dragDirection = options.dragDirection || this.dragDirection;\n\n // Update internal gesture options\n this.element.dispatchEvent(new CustomEvent(`${this.panGesture.name}ChangeOptions`, {\n detail: {\n minPointers: this.minPointers,\n maxPointers: this.maxPointers,\n threshold: this.dragThreshold,\n direction: this.dragDirection,\n pointerMode: this.pointerMode,\n requiredKeys: this.requiredKeys,\n preventIf: this.preventIf,\n pointerOptions: structuredClone(this.pointerOptions)\n }\n }));\n this.element.dispatchEvent(new CustomEvent(`${this.pressGesture.name}ChangeOptions`, {\n detail: {\n duration: this.pressDuration,\n maxDistance: this.pressMaxDistance,\n maxPointers: this.maxPointers,\n pointerMode: this.pointerMode,\n requiredKeys: this.requiredKeys,\n preventIf: this.preventIf,\n pointerOptions: structuredClone(this.pointerOptions)\n }\n }));\n }\n resetState() {\n if (this.state.dragTimeoutId !== null) {\n clearTimeout(this.state.dragTimeoutId);\n }\n this.restoreTouchAction();\n this.isActive = false;\n this.state = {\n phase: 'waitingForPress',\n dragTimeoutId: null\n };\n }\n\n /**\n * This can be empty because the PressAndDragGesture relies on PressGesture and PanGesture to handle pointer events\n * The internal gestures will manage their own state and events, while this class coordinates between them\n */\n handlePointerEvent() {}\n pressHandler = () => {\n if (this.state.phase !== 'waitingForPress') {\n return;\n }\n this.state.phase = 'pressDetected';\n this.setTouchAction();\n\n // Start timeout to wait for drag start\n this.state.dragTimeoutId = setTimeout(() => {\n // Timeout expired, reset gesture\n this.resetState();\n }, this.dragTimeout);\n };\n dragStartHandler = event => {\n if (this.state.phase !== 'pressDetected') {\n return;\n }\n\n // Clear the drag timeout as drag has started\n if (this.state.dragTimeoutId !== null) {\n clearTimeout(this.state.dragTimeoutId);\n this.state.dragTimeoutId = null;\n }\n\n // Restore touch action since we're now dragging\n this.restoreTouchAction();\n this.state.phase = 'dragging';\n this.isActive = true;\n\n // Fire start event\n this.element.dispatchEvent(new CustomEvent(createEventName(this.name, event.detail.phase), event));\n };\n dragMoveHandler = event => {\n if (this.state.phase !== 'dragging') {\n return;\n }\n\n // Fire move event\n this.element.dispatchEvent(new CustomEvent(createEventName(this.name, event.detail.phase), event));\n };\n dragEndHandler = event => {\n if (this.state.phase !== 'dragging') {\n return;\n }\n this.resetState();\n\n // Fire end event\n this.element.dispatchEvent(new CustomEvent(createEventName(this.name, event.detail.phase), event));\n };\n setTouchAction() {\n this.element.addEventListener('touchstart', preventDefault, {\n passive: false\n });\n this.element.addEventListener('touchmove', preventDefault, {\n passive: false\n });\n this.element.addEventListener('touchend', preventDefault, {\n passive: false\n });\n }\n restoreTouchAction() {\n this.element.removeEventListener('touchstart', preventDefault);\n this.element.removeEventListener('touchmove', preventDefault);\n this.element.removeEventListener('touchend', preventDefault);\n }\n}","'use client';\n\nimport * as React from 'react';\nimport { GestureManager, MoveGesture, PanGesture, PinchGesture, PressAndDragGesture, PressGesture, TapAndDragGesture, TapGesture, TurnWheelGesture } from '@mui/x-internal-gestures/core';\nconst preventDefault = event => event.preventDefault();\nexport const useChartInteractionListener = ({\n svgRef\n}) => {\n const gestureManagerRef = React.useRef(null);\n React.useEffect(() => {\n const svg = svgRef.current;\n if (!gestureManagerRef.current) {\n gestureManagerRef.current = new GestureManager({\n gestures: [\n // We separate the zoom gestures from the gestures that are not zoom related\n // This allows us to configure the zoom gestures based on the zoom configuration.\n new PanGesture({\n name: 'pan',\n threshold: 0,\n maxPointers: 1\n }), new MoveGesture({\n name: 'move',\n preventIf: ['pan', 'zoomPinch', 'zoomPan']\n }), new TapGesture({\n name: 'tap',\n preventIf: ['pan', 'zoomPinch', 'zoomPan']\n }), new PressGesture({\n name: 'quickPress',\n duration: 50\n }), new PanGesture({\n name: 'brush',\n threshold: 0,\n maxPointers: 1\n }),\n // Zoom gestures\n new PanGesture({\n name: 'zoomPan',\n threshold: 0,\n preventIf: ['zoomTapAndDrag', 'zoomPressAndDrag']\n }), new PinchGesture({\n name: 'zoomPinch',\n threshold: 5\n }), new TurnWheelGesture({\n name: 'zoomTurnWheel',\n sensitivity: 0.01,\n initialDelta: 1\n }), new TurnWheelGesture({\n name: 'panTurnWheel',\n sensitivity: 0.5\n }), new TapAndDragGesture({\n name: 'zoomTapAndDrag',\n dragThreshold: 10\n }), new PressAndDragGesture({\n name: 'zoomPressAndDrag',\n dragThreshold: 10,\n preventIf: ['zoomPinch']\n }), new TapGesture({\n name: 'zoomDoubleTapReset',\n taps: 2\n })]\n });\n }\n\n // Assign gesture manager after initialization\n const gestureManager = gestureManagerRef.current;\n if (!svg || !gestureManager) {\n return undefined;\n }\n gestureManager.registerElement(['pan', 'move', 'zoomPinch', 'zoomPan', 'zoomTurnWheel', 'panTurnWheel', 'tap', 'quickPress', 'zoomTapAndDrag', 'zoomPressAndDrag', 'zoomDoubleTapReset', 'brush'], svg);\n return () => {\n // Cleanup gesture manager\n gestureManager.unregisterAllGestures(svg);\n };\n }, [svgRef, gestureManagerRef]);\n const addInteractionListener = React.useCallback((interaction, callback, options) => {\n // Forcefully cast the svgRef to any, it is annoying to fix the types.\n const svg = svgRef.current;\n svg?.addEventListener(interaction, callback, options);\n return {\n cleanup: () => svg?.removeEventListener(interaction, callback)\n };\n }, [svgRef]);\n const updateZoomInteractionListeners = React.useCallback((interaction, options) => {\n const svg = svgRef.current;\n const gestureManager = gestureManagerRef.current;\n if (!gestureManager || !svg) {\n return;\n }\n gestureManager.setGestureOptions(interaction, svg, options ?? {});\n }, [svgRef, gestureManagerRef]);\n React.useEffect(() => {\n const svg = svgRef.current;\n\n // Disable gesture on safari\n // https://use-gesture.netlify.app/docs/gestures/#about-the-pinch-gesture\n svg?.addEventListener('gesturestart', preventDefault);\n svg?.addEventListener('gesturechange', preventDefault);\n svg?.addEventListener('gestureend', preventDefault);\n return () => {\n svg?.removeEventListener('gesturestart', preventDefault);\n svg?.removeEventListener('gesturechange', preventDefault);\n svg?.removeEventListener('gestureend', preventDefault);\n };\n }, [svgRef]);\n return {\n instance: {\n addInteractionListener,\n updateZoomInteractionListeners\n }\n };\n};\nuseChartInteractionListener.params = {};\nuseChartInteractionListener.getInitialState = () => {\n return {};\n};","import { useChartAnimation } from \"./useChartAnimation/index.js\";\nimport { useChartDimensions } from \"./useChartDimensions/index.js\";\nimport { useChartExperimentalFeatures } from \"./useChartExperimentalFeature/index.js\";\nimport { useChartId } from \"./useChartId/index.js\";\nimport { useChartSeries } from \"./useChartSeries/index.js\";\nimport { useChartInteractionListener } from \"./useChartInteractionListener/index.js\";\n\n/**\n * Internal plugins that create the tools used by the other plugins.\n * These plugins are used by the Charts components.\n */\nexport const CHART_CORE_PLUGINS = [useChartId, useChartExperimentalFeatures, useChartDimensions, useChartSeries, useChartInteractionListener, useChartAnimation];","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"apiRef\"];\nexport const extractPluginParamsFromProps = _ref => {\n let {\n plugins\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref.props, _excluded);\n const paramsLookup = {};\n plugins.forEach(plugin => {\n Object.assign(paramsLookup, plugin.params);\n });\n const pluginParams = {};\n Object.keys(props).forEach(propName => {\n const prop = props[propName];\n if (paramsLookup[propName]) {\n pluginParams[propName] = prop;\n }\n });\n const defaultizedPluginParams = plugins.reduce((acc, plugin) => {\n if (plugin.getDefaultizedParams) {\n return plugin.getDefaultizedParams({\n params: acc\n });\n }\n return acc;\n }, pluginParams);\n return defaultizedPluginParams;\n};","import * as React from 'react';\nimport useId from '@mui/utils/useId';\nimport { Store } from '@mui/x-internals/store';\nimport { CHART_CORE_PLUGINS } from \"../plugins/corePlugins/index.js\";\nimport { extractPluginParamsFromProps } from \"./extractPluginParamsFromProps.js\";\nlet globalId = 0;\n\n/**\n * This is the main hook that setups the plugin system for the chart.\n *\n * It manages the data used to create the charts.\n *\n * @param inPlugins All the plugins that will be used in the chart.\n * @param props The props passed to the chart.\n * @param seriesConfig The set of helpers used for series-specific computation.\n */\nexport function useCharts(inPlugins, props, seriesConfig) {\n const chartId = useId();\n const plugins = React.useMemo(() => [...CHART_CORE_PLUGINS, ...inPlugins], [inPlugins]);\n const pluginParams = extractPluginParamsFromProps({\n plugins,\n props\n });\n pluginParams.id = pluginParams.id ?? chartId;\n const instanceRef = React.useRef({});\n const instance = instanceRef.current;\n const publicAPI = useChartApiInitialization(props.apiRef);\n const innerChartRootRef = React.useRef(null);\n const innerSvgRef = React.useRef(null);\n const storeRef = React.useRef(null);\n if (storeRef.current == null) {\n // eslint-disable-next-line react-compiler/react-compiler\n globalId += 1;\n const initialState = {\n cacheKey: {\n id: globalId\n }\n };\n plugins.forEach(plugin => {\n if (plugin.getInitialState) {\n Object.assign(initialState, plugin.getInitialState(pluginParams, initialState, seriesConfig));\n }\n });\n storeRef.current = new Store(initialState);\n }\n const runPlugin = plugin => {\n const pluginResponse = plugin({\n instance,\n params: pluginParams,\n plugins: plugins,\n store: storeRef.current,\n svgRef: innerSvgRef,\n chartRootRef: innerChartRootRef,\n seriesConfig\n });\n if (pluginResponse.publicAPI) {\n Object.assign(publicAPI.current, pluginResponse.publicAPI);\n }\n if (pluginResponse.instance) {\n Object.assign(instance, pluginResponse.instance);\n }\n };\n plugins.forEach(runPlugin);\n const contextValue = React.useMemo(() => ({\n store: storeRef.current,\n publicAPI: publicAPI.current,\n instance,\n svgRef: innerSvgRef,\n chartRootRef: innerChartRootRef\n }), [instance, publicAPI]);\n return {\n contextValue\n };\n}\nfunction initializeInputApiRef(inputApiRef) {\n if (inputApiRef.current == null) {\n inputApiRef.current = {};\n }\n return inputApiRef;\n}\nexport function useChartApiInitialization(inputApiRef) {\n const fallbackPublicApiRef = React.useRef({});\n if (inputApiRef) {\n return initializeInputApiRef(inputApiRef);\n }\n return fallbackPublicApiRef;\n}","'use client';\n\nimport * as React from 'react';\n/**\n * @ignore - internal component.\n */\nexport const ChartContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") ChartContext.displayName = \"ChartContext\";","'use client';\n\nimport * as React from 'react';\nconst UNINITIALIZED = {};\n\n/**\n * A React.useRef() that is initialized lazily with a function. Note that it accepts an optional\n * initialization argument, so the initialization function doesn't need to be an inline closure.\n *\n * @usage\n * const ref = useLazyRef(sortColumns, columns)\n */\nexport default function useLazyRef(init, initArg) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = init(initArg);\n }\n return ref;\n}","'use client';\n\nimport * as React from 'react';\nconst EMPTY = [];\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport default function useOnMount(fn) {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- no need to put `fn` in the dependency array\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","import useLazyRef from '@mui/utils/useLazyRef';\nimport useOnMount from '@mui/utils/useOnMount';\nconst noop = () => {};\n\n/**\n * An Effect implementation for the Store. This should be used for side-effects only. To\n * compute and store derived state, use `createSelectorMemoized` instead.\n */\nexport function useStoreEffect(store, selector, effect) {\n const instance = useLazyRef(initialize, {\n store,\n selector\n }).current;\n instance.effect = effect;\n useOnMount(instance.onMount);\n}\n\n// `useLazyRef` typings are incorrect, `params` should not be optional\nfunction initialize(params) {\n const {\n store,\n selector\n } = params;\n let previousState = selector(store.state);\n const instance = {\n effect: noop,\n dispose: null,\n // We want a single subscription done right away and cleared on unmount only,\n // but React triggers `useOnMount` multiple times in dev, so we need to manage\n // the subscription anyway.\n subscribe: () => {\n instance.dispose ??= store.subscribe(state => {\n const nextState = selector(state);\n if (!Object.is(previousState, nextState)) {\n const prev = previousState;\n previousState = nextState;\n instance.effect(prev, nextState);\n }\n });\n },\n onMount: () => {\n instance.subscribe();\n return () => {\n instance.dispose?.();\n instance.dispose = null;\n };\n }\n };\n instance.subscribe();\n return instance;\n}","'use client';\n\nimport * as React from 'react';\nimport { warnOnce } from \"../warning/index.js\";\n\n/**\n * Make sure a controlled prop is used correctly.\n * Logs errors if the prop either:\n *\n * - switch between controlled and uncontrolled\n * - modify it's default value\n * @param parameters\n */\nfunction useAssertModelConsistencyOutsideOfProduction(parameters) {\n const {\n componentName,\n propName,\n controlled,\n defaultValue,\n warningPrefix = 'MUI X'\n } = parameters;\n const [{\n initialDefaultValue,\n isControlled\n }] = React.useState({\n initialDefaultValue: defaultValue,\n isControlled: controlled !== undefined\n });\n if (isControlled !== (controlled !== undefined)) {\n warnOnce([`${warningPrefix}: A component is changing the ${isControlled ? '' : 'un'}controlled ${propName} state of ${componentName} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${propName} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'], 'error');\n }\n if (JSON.stringify(initialDefaultValue) !== JSON.stringify(defaultValue)) {\n warnOnce([`${warningPrefix}: A component is changing the default ${propName} state of an uncontrolled ${componentName} after being initialized. ` + `To suppress this warning opt to use a controlled ${componentName}.`], 'error');\n }\n}\nexport const useAssertModelConsistency = process.env.NODE_ENV === 'production' ? () => {} : useAssertModelConsistencyOutsideOfProduction;","import { createSelectorMemoized, createSelector } from '@mui/x-internals/store';\nimport { applySeriesLayout, applySeriesProcessors } from \"./processSeries.js\";\nimport { selectorChartDrawingArea } from \"../useChartDimensions/useChartDimensions.selectors.js\";\nexport const selectorChartSeriesState = state => state.series;\nexport const selectorChartDefaultizedSeries = createSelector(selectorChartSeriesState, seriesState => seriesState.defaultizedSeries);\nexport const selectorChartSeriesConfig = createSelector(selectorChartSeriesState, seriesState => seriesState.seriesConfig);\n\n/**\n * Get the dataset from the series state.\n * @returns {DatasetType | undefined} The dataset.\n */\nexport const selectorChartDataset = createSelector(selectorChartSeriesState, seriesState => seriesState.dataset);\n\n/**\n * Get the processed series after applying series processors.\n * This selector computes the processed series on-demand from the defaultized series.\n * @returns {ProcessedSeries} The processed series.\n */\nexport const selectorChartSeriesProcessed = createSelectorMemoized(selectorChartDefaultizedSeries, selectorChartSeriesConfig, selectorChartDataset, function selectorChartSeriesProcessed(defaultizedSeries, seriesConfig, dataset) {\n return applySeriesProcessors(defaultizedSeries, seriesConfig, dataset);\n});\n\n/**\n * Get the processed series after applying series processors.\n * This selector computes the processed series on-demand from the defaultized series.\n * @returns {ProcessedSeries} The processed series.\n */\nexport const selectorChartSeriesLayout = createSelectorMemoized(selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartDrawingArea, function selectorChartSeriesLayout(processedSeries, seriesConfig, drawingArea) {\n return applySeriesLayout(processedSeries, seriesConfig, drawingArea);\n});","/** Margin in the opposite direction of the axis, i.e., horizontal if the axis is vertical and vice versa. */\nexport const ZOOM_SLIDER_MARGIN = 4;\n\n/** Size of the zoom slider preview. */\nexport const ZOOM_SLIDER_PREVIEW_SIZE = 40;\n\n/** Size reserved for the zoom slider. The actual size of the slider might be smaller. */\nexport const DEFAULT_ZOOM_SLIDER_SIZE = 20 + 2 * ZOOM_SLIDER_MARGIN;\nexport const DEFAULT_ZOOM_SLIDER_PREVIEW_SIZE = 40 + 2 * ZOOM_SLIDER_MARGIN;\nexport const DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP = 'hover';\n\n/** Default margin for pie charts. */\nexport const DEFAULT_PIE_CHART_MARGIN = {\n top: 5,\n bottom: 5,\n left: 5,\n right: 5\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { DEFAULT_ZOOM_SLIDER_PREVIEW_SIZE, DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP, DEFAULT_ZOOM_SLIDER_SIZE } from \"../../../constants.js\";\nexport const defaultZoomOptions = {\n minStart: 0,\n maxEnd: 100,\n step: 5,\n minSpan: 10,\n maxSpan: 100,\n panning: true,\n filterMode: 'keep',\n reverse: false,\n slider: {\n enabled: false,\n preview: false,\n size: DEFAULT_ZOOM_SLIDER_SIZE,\n showTooltip: DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP\n }\n};\nexport const defaultizeZoom = (zoom, axisId, axisDirection, reverse) => {\n if (!zoom) {\n return undefined;\n }\n if (zoom === true) {\n return _extends({\n axisId,\n axisDirection\n }, defaultZoomOptions, {\n reverse: reverse ?? false\n });\n }\n return _extends({\n axisId,\n axisDirection\n }, defaultZoomOptions, {\n reverse: reverse ?? false\n }, zoom, {\n slider: _extends({}, defaultZoomOptions.slider, {\n size: zoom.slider?.preview ?? defaultZoomOptions.slider.preview ? DEFAULT_ZOOM_SLIDER_PREVIEW_SIZE : DEFAULT_ZOOM_SLIDER_SIZE\n }, zoom.slider)\n });\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { defaultizeZoom } from \"./defaultizeZoom.js\";\nimport { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY, DEFAULT_AXIS_SIZE_HEIGHT, DEFAULT_AXIS_SIZE_WIDTH, AXIS_LABEL_DEFAULT_HEIGHT } from \"../../../../constants/index.js\";\nexport function defaultizeXAxis(inAxes, dataset) {\n const offsets = {\n top: 0,\n bottom: 0,\n none: 0\n };\n const inputAxes = inAxes && inAxes.length > 0 ? inAxes : [{\n id: DEFAULT_X_AXIS_KEY,\n scaleType: 'linear'\n }];\n const parsedAxes = inputAxes.map((axisConfig, index) => {\n const dataKey = axisConfig.dataKey;\n\n // The first x-axis is defaultized to the bottom\n const defaultPosition = index === 0 ? 'bottom' : 'none';\n const position = axisConfig.position ?? defaultPosition;\n const defaultHeight = DEFAULT_AXIS_SIZE_HEIGHT + (axisConfig.label ? AXIS_LABEL_DEFAULT_HEIGHT : 0);\n const id = axisConfig.id ?? `defaultized-x-axis-${index}`;\n const sharedConfig = _extends({\n offset: offsets[position]\n }, axisConfig, {\n id,\n position,\n height: axisConfig.height ?? defaultHeight,\n zoom: defaultizeZoom(axisConfig.zoom, id, 'x', axisConfig.reverse)\n });\n\n // Increment the offset for the next axis\n if (position !== 'none') {\n offsets[position] += sharedConfig.height;\n if (sharedConfig.zoom?.slider.enabled) {\n offsets[position] += sharedConfig.zoom.slider.size;\n }\n }\n\n // If `dataKey` is NOT provided\n if (dataKey === undefined || axisConfig.data !== undefined) {\n return sharedConfig;\n }\n if (dataset === undefined) {\n throw new Error(`MUI X Charts: x-axis uses \\`dataKey\\` but no \\`dataset\\` is provided.`);\n }\n\n // If `dataKey` is provided\n return _extends({}, sharedConfig, {\n data: dataset.map(d => d[dataKey])\n });\n });\n return parsedAxes;\n}\nexport function defaultizeYAxis(inAxes, dataset) {\n const offsets = {\n right: 0,\n left: 0,\n none: 0\n };\n const inputAxes = inAxes && inAxes.length > 0 ? inAxes : [{\n id: DEFAULT_Y_AXIS_KEY,\n scaleType: 'linear'\n }];\n const parsedAxes = inputAxes.map((axisConfig, index) => {\n const dataKey = axisConfig.dataKey;\n\n // The first y-axis is defaultized to the left\n const defaultPosition = index === 0 ? 'left' : 'none';\n const position = axisConfig.position ?? defaultPosition;\n const defaultWidth = DEFAULT_AXIS_SIZE_WIDTH + (axisConfig.label ? AXIS_LABEL_DEFAULT_HEIGHT : 0);\n const id = axisConfig.id ?? `defaultized-y-axis-${index}`;\n const sharedConfig = _extends({\n offset: offsets[position]\n }, axisConfig, {\n id,\n position,\n width: axisConfig.width ?? defaultWidth,\n zoom: defaultizeZoom(axisConfig.zoom, id, 'y', axisConfig.reverse)\n });\n\n // Increment the offset for the next axis\n if (position !== 'none') {\n offsets[position] += sharedConfig.width;\n if (sharedConfig.zoom?.slider.enabled) {\n offsets[position] += sharedConfig.zoom.slider.size;\n }\n }\n\n // If `dataKey` is NOT provided\n if (dataKey === undefined || axisConfig.data !== undefined) {\n return sharedConfig;\n }\n if (dataset === undefined) {\n throw new Error(`MUI X Charts: y-axis uses \\`dataKey\\` but no \\`dataset\\` is provided.`);\n }\n\n // If `dataKey` is provided\n return _extends({}, sharedConfig, {\n data: dataset.map(d => d[dataKey])\n });\n });\n return parsedAxes;\n}","/**\n * Creates a default formatter function for continuous scales (e.g., linear, sqrt, log).\n * @returns A formatter function for continuous values.\n */\nexport function createScalarFormatter(tickNumber, zoomScale) {\n return function defaultScalarValueFormatter(value, context) {\n if (context.location === 'tick') {\n const domain = context.scale.domain();\n const zeroSizeDomain = domain[0] === domain[1];\n if (zeroSizeDomain) {\n return context.scale.tickFormat(1)(value);\n }\n return context.scale.tickFormat(tickNumber)(value);\n }\n if (context.location === 'zoom-slider-tooltip') {\n return zoomScale.tickFormat(2)(value);\n }\n return `${value}`;\n };\n}","/**\n * Use this type instead of `AxisScaleConfig` when the values\n * shouldn't be provided by the user.\n */\n\n/**\n * Config that is shared between cartesian and polar axes.\n */\n\n/**\n * Use this type for advanced typing. For basic usage, use `XAxis`, `YAxis`, `RotationAxis` or `RadiusAxis`.\n */\n\nexport function isBandScaleConfig(scaleConfig) {\n return scaleConfig.scaleType === 'band';\n}\nexport function isPointScaleConfig(scaleConfig) {\n return scaleConfig.scaleType === 'point';\n}\nexport function isContinuousScaleConfig(scaleConfig) {\n return scaleConfig.scaleType !== 'point' && scaleConfig.scaleType !== 'band';\n}\nexport function isSymlogScaleConfig(scaleConfig) {\n return scaleConfig.scaleType === 'symlog';\n}\n\n/**\n * The data format returned by onAxisClick.\n */\n\n/**\n * Identifies a data point within an axis.\n */\n\n/**\n * The axis configuration with missing values filled with default values.\n */\n\n/**\n * The x-axis configuration with missing values filled with default values.\n */\n\n/**\n * The y-axis configuration with missing values filled with default values.\n */","export default function ascending(a, b) {\n return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","export default function descending(a, b) {\n return a == null || b == null ? NaN\n : b < a ? -1\n : b > a ? 1\n : b >= a ? 0\n : NaN;\n}\n","import ascending from \"./ascending.js\";\nimport descending from \"./descending.js\";\n\nexport default function bisector(f) {\n let compare1, compare2, delta;\n\n // If an accessor is specified, promote it to a comparator. In this case we\n // can test whether the search value is (self-) comparable. We can’t do this\n // for a comparator (except for specific, known comparators) because we can’t\n // tell if the comparator is symmetric, and an asymmetric comparator can’t be\n // used to test whether a single value is comparable.\n if (f.length !== 2) {\n compare1 = ascending;\n compare2 = (d, x) => ascending(f(d), x);\n delta = (d, x) => f(d) - x;\n } else {\n compare1 = f === ascending || f === descending ? f : zero;\n compare2 = f;\n delta = f;\n }\n\n function left(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = (lo + hi) >>> 1;\n if (compare2(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n\n function right(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = (lo + hi) >>> 1;\n if (compare2(a[mid], x) <= 0) lo = mid + 1;\n else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n\n function center(a, x, lo = 0, hi = a.length) {\n const i = left(a, x, lo, hi - 1);\n return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n }\n\n return {left, center, right};\n}\n\nfunction zero() {\n return 0;\n}\n","import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\n\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;\n","export default function number(x) {\n return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n yield value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n yield value;\n }\n }\n }\n}\n","export function initRange(domain, range) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.range(domain); break;\n default: this.range(range).domain(domain); break;\n }\n return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n switch (arguments.length) {\n case 0: break;\n case 1: {\n if (typeof domain === \"function\") this.interpolator(domain);\n else this.range(domain);\n break;\n }\n default: {\n this.domain(domain);\n if (typeof interpolator === \"function\") this.interpolator(interpolator);\n else this.range(interpolator);\n break;\n }\n }\n return this;\n}\n","import {bisect} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function threshold() {\n var domain = [0.5],\n range = [0, 1],\n unknown,\n n = 1;\n\n function scale(x) {\n return x != null && x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n }\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n };\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return [domain[i - 1], domain[i]];\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return threshold()\n .domain(domain)\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(scale, arguments);\n}\n","export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n","import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`),\n reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`),\n reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`),\n reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`),\n reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`),\n reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHex8: color_formatHex8,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHex8() {\n return this.rgb().formatHex8();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n },\n displayable() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatHex8: rgb_formatHex8,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\n\nfunction rgb_formatHex8() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\n\nfunction rgb_formatRgb() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\n\nfunction clampa(opacity) {\n return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\n\nfunction clampi(value) {\n return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\n\nfunction hex(value) {\n value = clampi(value);\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n clamp() {\n return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n }\n}));\n\nfunction clamph(value) {\n value = (value || 0) % 360;\n return value < 0 ? value + 360 : value;\n}\n\nfunction clampt(value) {\n return Math.max(0, Math.min(1, value || 0));\n}\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\nexport default function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","export default x => () => x;\n","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n","import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n","import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n","export default function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n","import value from \"./value.js\";\n\nexport default function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n","import {basis} from \"./basis.js\";\n\nexport default function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n","export default function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\n\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n","import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? number\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n : b instanceof color ? rgb\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : number)(a, b);\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\n };\n}\n","export default function number(x) {\n return +x;\n}\n","import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport constant from \"./constant.js\";\nimport number from \"./number.js\";\n\nvar unit = [0, 1];\n\nexport function identity(x) {\n return x;\n}\n\nfunction normalize(a, b) {\n return (b -= (a = +a))\n ? function(x) { return (x - a) / b; }\n : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n var t;\n if (a > b) t = a, a = b, b = t;\n return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n var j = Math.min(domain.length, range.length) - 1,\n d = new Array(j),\n r = new Array(j),\n i = -1;\n\n // Reverse descending domains.\n if (domain[j] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n\n while (++i < j) {\n d[i] = normalize(domain[i], domain[i + 1]);\n r[i] = interpolate(range[i], range[i + 1]);\n }\n\n return function(x) {\n var i = bisect(domain, x, 1, j) - 1;\n return r[i](d[i](x));\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .range(source.range())\n .interpolate(source.interpolate())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport function transformer() {\n var domain = unit,\n range = unit,\n interpolate = interpolateValue,\n transform,\n untransform,\n unknown,\n clamp = identity,\n piecewise,\n output,\n input;\n\n function rescale() {\n var n = Math.min(domain.length, range.length);\n if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n piecewise = n > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n }\n\n scale.invert = function(y) {\n return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = Array.from(_), interpolate = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t, u) {\n transform = t, untransform = u;\n return rescale();\n };\n}\n\nexport default function continuous() {\n return transformer()(identity, identity);\n}\n","export default function constants(x) {\n return function() {\n return x;\n };\n}\n","const e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\nfunction tickSpec(start, stop, count) {\n const step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log10(step)),\n error = step / Math.pow(10, power),\n factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;\n let i1, i2, inc;\n if (power < 0) {\n inc = Math.pow(10, -power) / factor;\n i1 = Math.round(start * inc);\n i2 = Math.round(stop * inc);\n if (i1 / inc < start) ++i1;\n if (i2 / inc > stop) --i2;\n inc = -inc;\n } else {\n inc = Math.pow(10, power) * factor;\n i1 = Math.round(start / inc);\n i2 = Math.round(stop / inc);\n if (i1 * inc < start) ++i1;\n if (i2 * inc > stop) --i2;\n }\n if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);\n return [i1, i2, inc];\n}\n\nexport default function ticks(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n if (!(count > 0)) return [];\n if (start === stop) return [start];\n const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);\n if (!(i2 >= i1)) return [];\n const n = i2 - i1 + 1, ticks = new Array(n);\n if (reverse) {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;\n else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;\n } else {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;\n else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;\n }\n return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n return tickSpec(start, stop, count)[2];\n}\n\nexport function tickStep(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n const reverse = stop < start, inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);\n return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);\n}\n","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + (this.trim ? \"~\" : \"\")\n + this.type;\n};\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n","export default function(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n","import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n \"%\": (x, p) => (x * 100).toFixed(p),\n \"b\": (x) => Math.round(x).toString(2),\n \"c\": (x) => x + \"\",\n \"d\": formatDecimal,\n \"e\": (x, p) => x.toExponential(p),\n \"f\": (x, p) => x.toFixed(p),\n \"g\": (x, p) => x.toPrecision(p),\n \"o\": (x) => Math.round(x).toString(8),\n \"p\": (x, p) => formatRounded(x * 100, p),\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n \"x\": (x) => Math.round(x).toString(16)\n};\n","export default function(x) {\n return x;\n}\n","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"−\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type;\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision === undefined ? 6\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i, n, c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n // Trim insignificant zeros.\n if (trim) value = formatTrim(value);\n\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n i = -1, n = value.length;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n default: value = padding + valuePrefix + value + valueSuffix; break;\n }\n\n return numerals(value);\n }\n\n format.toString = function() {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}\n","import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\n\nexport function linearish(scale) {\n var domain = scale.domain;\n\n scale.ticks = function(count) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n };\n\n scale.tickFormat = function(count, specifier) {\n var d = domain();\n return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n };\n\n scale.nice = function(count) {\n if (count == null) count = 10;\n\n var d = domain();\n var i0 = 0;\n var i1 = d.length - 1;\n var start = d[i0];\n var stop = d[i1];\n var prestep;\n var step;\n var maxIter = 10;\n\n if (stop < start) {\n step = start, start = stop, stop = step;\n step = i0, i0 = i1, i1 = step;\n }\n \n while (maxIter-- > 0) {\n step = tickIncrement(start, stop, count);\n if (step === prestep) {\n d[i0] = start\n d[i1] = stop\n return domain(d);\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n } else {\n break;\n }\n prestep = step;\n }\n\n return scale;\n };\n\n return scale;\n}\n\nexport default function linear() {\n var scale = continuous();\n\n scale.copy = function() {\n return copy(scale, linear());\n };\n\n initRange.apply(scale, arguments);\n\n return linearish(scale);\n}\n","import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function tickFormat(start, stop, count, specifier) {\n var step = tickStep(start, stop, count),\n precision;\n specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n switch (specifier.type) {\n case \"s\": {\n var value = Math.max(Math.abs(start), Math.abs(stop));\n if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n return formatPrefix(specifier, value);\n }\n case \"\":\n case \"e\":\n case \"g\":\n case \"p\":\n case \"r\": {\n if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n break;\n }\n case \"f\":\n case \"%\": {\n if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n break;\n }\n }\n return format(specifier);\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step, max) {\n step = Math.abs(step), max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}\n","import {interpolate, interpolateRound} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n var x0 = 0,\n x1 = 1,\n t0,\n t1,\n k10,\n transform,\n interpolator = identity,\n clamp = false,\n unknown;\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));\n }\n\n scale.domain = function(_) {\n return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, scale) : clamp;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n function range(interpolate) {\n return function(_) {\n var r0, r1;\n return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)];\n };\n }\n\n scale.range = range(interpolate);\n\n scale.rangeRound = range(interpolateRound);\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t) {\n transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);\n return scale;\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .interpolator(source.interpolator())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport default function sequential() {\n var scale = linearish(transformer()(identity));\n\n scale.copy = function() {\n return copy(scale, sequential());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialLog() {\n var scale = loggish(transformer()).domain([1, 10]);\n\n scale.copy = function() {\n return copy(scale, sequentialLog()).base(scale.base());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSymlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, sequentialSymlog()).constant(scale.constant());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialPow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, sequentialPow()).exponent(scale.exponent());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSqrt() {\n return sequentialPow.apply(null, arguments).exponent(0.5);\n}\n","export default function(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}\n","export default function(numerals) {\n return function(value) {\n return value.replace(/[0-9]/g, function(i) {\n return numerals[+i];\n });\n };\n}\n","// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n","export class InternMap extends Map {\n constructor(entries, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (entries != null) for (const [key, value] of entries) this.set(key, value);\n }\n get(key) {\n return super.get(intern_get(this, key));\n }\n has(key) {\n return super.has(intern_get(this, key));\n }\n set(key, value) {\n return super.set(intern_set(this, key), value);\n }\n delete(key) {\n return super.delete(intern_delete(this, key));\n }\n}\n\nexport class InternSet extends Set {\n constructor(values, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (values != null) for (const value of values) this.add(value);\n }\n has(value) {\n return super.has(intern_get(this, value));\n }\n add(value) {\n return super.add(intern_set(this, value));\n }\n delete(value) {\n return super.delete(intern_delete(this, value));\n }\n}\n\nfunction intern_get({_intern, _key}, value) {\n const key = _key(value);\n return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) return _intern.get(key);\n _intern.set(key, value);\n return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) {\n value = _intern.get(key);\n _intern.delete(key);\n }\n return value;\n}\n\nfunction keyof(value) {\n return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n","import {InternMap} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n var index = new InternMap(),\n domain = [],\n range = [],\n unknown = implicit;\n\n function scale(d) {\n let i = index.get(d);\n if (i === undefined) {\n if (unknown !== implicit) return unknown;\n index.set(d, i = domain.push(d) - 1);\n }\n return range[i % range.length];\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [], index = new InternMap();\n for (const value of _) {\n if (index.has(value)) continue;\n index.set(value, domain.push(value) - 1);\n }\n return scale;\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), scale) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return ordinal(domain, range).unknown(unknown);\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n","import { scaleOrdinal, scaleThreshold, scaleSequential } from '@mui/x-charts-vendor/d3-scale';\nexport function getSequentialColorScale(config) {\n if (config.type === 'piecewise') {\n return scaleThreshold(config.thresholds, config.colors);\n }\n return scaleSequential([config.min ?? 0, config.max ?? 100], config.color);\n}\nexport function getOrdinalColorScale(config) {\n if (config.values) {\n return scaleOrdinal(config.values, config.colors).unknown(config.unknownColor ?? null);\n }\n return scaleOrdinal(config.colors.map((_, index) => index), config.colors).unknown(config.unknownColor ?? null);\n}\nexport function getColorScale(config) {\n return config.type === 'ordinal' ? getOrdinalColorScale(config) : getSequentialColorScale(config);\n}","export function getTickNumber(params, domain, defaultTickNumber) {\n const {\n tickMaxStep,\n tickMinStep,\n tickNumber\n } = params;\n const maxTicks = tickMinStep === undefined ? 999 : Math.floor(Math.abs(domain[1] - domain[0]) / tickMinStep);\n const minTicks = tickMaxStep === undefined ? 2 : Math.ceil(Math.abs(domain[1] - domain[0]) / tickMaxStep);\n const defaultizedTickNumber = tickNumber ?? defaultTickNumber;\n return Math.min(maxTicks, Math.max(minTicks, defaultizedTickNumber));\n}\nexport function scaleTickNumberByRange(tickNumber, range) {\n const rangeGap = range[1] - range[0];\n\n /* If the range start and end are the same, `tickNumber` will become infinity, so we default to 1. */\n if (rangeGap === 0) {\n return 1;\n }\n return tickNumber / ((range[1] - range[0]) / 100);\n}\nexport function getDefaultTickNumber(dimension) {\n return Math.floor(Math.abs(dimension) / 50);\n}","export default function nice(domain, interval) {\n domain = domain.slice();\n\n var i0 = 0,\n i1 = domain.length - 1,\n x0 = domain[i0],\n x1 = domain[i1],\n t;\n\n if (x1 < x0) {\n t = i0, i0 = i1, i1 = t;\n t = x0, x0 = x1, x1 = t;\n }\n\n domain[i0] = interval.floor(x0);\n domain[i1] = interval.ceil(x1);\n return domain;\n}\n","import {ticks} from \"d3-array\";\nimport {format, formatSpecifier} from \"d3-format\";\nimport nice from \"./nice.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformLog(x) {\n return Math.log(x);\n}\n\nfunction transformExp(x) {\n return Math.exp(x);\n}\n\nfunction transformLogn(x) {\n return -Math.log(-x);\n}\n\nfunction transformExpn(x) {\n return -Math.exp(-x);\n}\n\nfunction pow10(x) {\n return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n return base === 10 ? pow10\n : base === Math.E ? Math.exp\n : x => Math.pow(base, x);\n}\n\nfunction logp(base) {\n return base === Math.E ? Math.log\n : base === 10 && Math.log10\n || base === 2 && Math.log2\n || (base = Math.log(base), x => Math.log(x) / base);\n}\n\nfunction reflect(f) {\n return (x, k) => -f(-x, k);\n}\n\nexport function loggish(transform) {\n const scale = transform(transformLog, transformExp);\n const domain = scale.domain;\n let base = 10;\n let logs;\n let pows;\n\n function rescale() {\n logs = logp(base), pows = powp(base);\n if (domain()[0] < 0) {\n logs = reflect(logs), pows = reflect(pows);\n transform(transformLogn, transformExpn);\n } else {\n transform(transformLog, transformExp);\n }\n return scale;\n }\n\n scale.base = function(_) {\n return arguments.length ? (base = +_, rescale()) : base;\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.ticks = count => {\n const d = domain();\n let u = d[0];\n let v = d[d.length - 1];\n const r = v < u;\n\n if (r) ([u, v] = [v, u]);\n\n let i = logs(u);\n let j = logs(v);\n let k;\n let t;\n const n = count == null ? 10 : +count;\n let z = [];\n\n if (!(base % 1) && j - i < n) {\n i = Math.floor(i), j = Math.ceil(j);\n if (u > 0) for (; i <= j; ++i) {\n for (k = 1; k < base; ++k) {\n t = i < 0 ? k / pows(-i) : k * pows(i);\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n } else for (; i <= j; ++i) {\n for (k = base - 1; k >= 1; --k) {\n t = i > 0 ? k / pows(-i) : k * pows(i);\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n }\n if (z.length * 2 < n) z = ticks(u, v, n);\n } else {\n z = ticks(i, j, Math.min(j - i, n)).map(pows);\n }\n return r ? z.reverse() : z;\n };\n\n scale.tickFormat = (count, specifier) => {\n if (count == null) count = 10;\n if (specifier == null) specifier = base === 10 ? \"s\" : \",\";\n if (typeof specifier !== \"function\") {\n if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null) specifier.trim = true;\n specifier = format(specifier);\n }\n if (count === Infinity) return specifier;\n const k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n return d => {\n let i = d / pows(Math.round(logs(d)));\n if (i * base < base - 0.5) i *= base;\n return i <= k ? specifier(d) : \"\";\n };\n };\n\n scale.nice = () => {\n return domain(nice(domain(), {\n floor: x => pows(Math.floor(logs(x))),\n ceil: x => pows(Math.ceil(logs(x)))\n }));\n };\n\n return scale;\n}\n\nexport default function log() {\n const scale = loggish(transformer()).domain([1, 10]);\n scale.copy = () => copy(scale, log()).base(scale.base());\n initRange.apply(scale, arguments);\n return scale;\n}\n","import {linearish} from \"./linear.js\";\nimport {copy, identity, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformPow(exponent) {\n return function(x) {\n return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n };\n}\n\nfunction transformSqrt(x) {\n return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);\n}\n\nfunction transformSquare(x) {\n return x < 0 ? -x * x : x * x;\n}\n\nexport function powish(transform) {\n var scale = transform(identity, identity),\n exponent = 1;\n\n function rescale() {\n return exponent === 1 ? transform(identity, identity)\n : exponent === 0.5 ? transform(transformSqrt, transformSquare)\n : transform(transformPow(exponent), transformPow(1 / exponent));\n }\n\n scale.exponent = function(_) {\n return arguments.length ? (exponent = +_, rescale()) : exponent;\n };\n\n return linearish(scale);\n}\n\nexport default function pow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, pow()).exponent(scale.exponent());\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n\nexport function sqrt() {\n return pow.apply(null, arguments).exponent(0.5);\n}\n","export const durationSecond = 1000;\nexport const durationMinute = durationSecond * 60;\nexport const durationHour = durationMinute * 60;\nexport const durationDay = durationHour * 24;\nexport const durationWeek = durationDay * 7;\nexport const durationMonth = durationDay * 30;\nexport const durationYear = durationDay * 365;\n","const t0 = new Date, t1 = new Date;\n\nexport function timeInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = (date) => {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = (date) => {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = (date) => {\n const d0 = interval(date), d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = (date, step) => {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = (start, stop, step) => {\n const range = [];\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n let previous;\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n while (previous < start && start < stop);\n return range;\n };\n\n interval.filter = (test) => {\n return timeInterval((date) => {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, (date, step) => {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n\n if (count) {\n interval.count = (start, end) => {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = (step) => {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? (d) => field(d) % step === 0\n : (d) => interval.count(0, d) % step === 0);\n };\n }\n\n return interval;\n}\n","import {timeInterval} from \"./interval.js\";\n\nexport const millisecond = timeInterval(() => {\n // noop\n}, (date, step) => {\n date.setTime(+date + step);\n}, (start, end) => {\n return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = (k) => {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return timeInterval((date) => {\n date.setTime(Math.floor(date / k) * k);\n }, (date, step) => {\n date.setTime(+date + step * k);\n }, (start, end) => {\n return (end - start) / k;\n });\n};\n\nexport const milliseconds = millisecond.range;\n","import {timeInterval} from \"./interval.js\";\nimport {durationSecond} from \"./duration.js\";\n\nexport const second = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds());\n}, (date, step) => {\n date.setTime(+date + step * durationSecond);\n}, (start, end) => {\n return (end - start) / durationSecond;\n}, (date) => {\n return date.getUTCSeconds();\n});\n\nexport const seconds = second.range;\n","import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeMinute = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, (date, step) => {\n date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n return (end - start) / durationMinute;\n}, (date) => {\n return date.getMinutes();\n});\n\nexport const timeMinutes = timeMinute.range;\n\nexport const utcMinute = timeInterval((date) => {\n date.setUTCSeconds(0, 0);\n}, (date, step) => {\n date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n return (end - start) / durationMinute;\n}, (date) => {\n return date.getUTCMinutes();\n});\n\nexport const utcMinutes = utcMinute.range;\n","import {timeInterval} from \"./interval.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeHour = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, (date, step) => {\n date.setTime(+date + step * durationHour);\n}, (start, end) => {\n return (end - start) / durationHour;\n}, (date) => {\n return date.getHours();\n});\n\nexport const timeHours = timeHour.range;\n\nexport const utcHour = timeInterval((date) => {\n date.setUTCMinutes(0, 0, 0);\n}, (date, step) => {\n date.setTime(+date + step * durationHour);\n}, (start, end) => {\n return (end - start) / durationHour;\n}, (date) => {\n return date.getUTCHours();\n});\n\nexport const utcHours = utcHour.range;\n","import {timeInterval} from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nexport const timeDay = timeInterval(\n date => date.setHours(0, 0, 0, 0),\n (date, step) => date.setDate(date.getDate() + step),\n (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n date => date.getDate() - 1\n);\n\nexport const timeDays = timeDay.range;\n\nexport const utcDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return date.getUTCDate() - 1;\n});\n\nexport const utcDays = utcDay.range;\n\nexport const unixDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return Math.floor(date / durationDay);\n});\n\nexport const unixDays = unixDay.range;\n","import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction timeWeekday(i) {\n return timeInterval((date) => {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setDate(date.getDate() + step * 7);\n }, (start, end) => {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport const timeSunday = timeWeekday(0);\nexport const timeMonday = timeWeekday(1);\nexport const timeTuesday = timeWeekday(2);\nexport const timeWednesday = timeWeekday(3);\nexport const timeThursday = timeWeekday(4);\nexport const timeFriday = timeWeekday(5);\nexport const timeSaturday = timeWeekday(6);\n\nexport const timeSundays = timeSunday.range;\nexport const timeMondays = timeMonday.range;\nexport const timeTuesdays = timeTuesday.range;\nexport const timeWednesdays = timeWednesday.range;\nexport const timeThursdays = timeThursday.range;\nexport const timeFridays = timeFriday.range;\nexport const timeSaturdays = timeSaturday.range;\n\nfunction utcWeekday(i) {\n return timeInterval((date) => {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, (start, end) => {\n return (end - start) / durationWeek;\n });\n}\n\nexport const utcSunday = utcWeekday(0);\nexport const utcMonday = utcWeekday(1);\nexport const utcTuesday = utcWeekday(2);\nexport const utcWednesday = utcWeekday(3);\nexport const utcThursday = utcWeekday(4);\nexport const utcFriday = utcWeekday(5);\nexport const utcSaturday = utcWeekday(6);\n\nexport const utcSundays = utcSunday.range;\nexport const utcMondays = utcMonday.range;\nexport const utcTuesdays = utcTuesday.range;\nexport const utcWednesdays = utcWednesday.range;\nexport const utcThursdays = utcThursday.range;\nexport const utcFridays = utcFriday.range;\nexport const utcSaturdays = utcSaturday.range;\n","import {timeInterval} from \"./interval.js\";\n\nexport const timeMonth = timeInterval((date) => {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setMonth(date.getMonth() + step);\n}, (start, end) => {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, (date) => {\n return date.getMonth();\n});\n\nexport const timeMonths = timeMonth.range;\n\nexport const utcMonth = timeInterval((date) => {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCMonth(date.getUTCMonth() + step);\n}, (start, end) => {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, (date) => {\n return date.getUTCMonth();\n});\n\nexport const utcMonths = utcMonth.range;\n","import {timeInterval} from \"./interval.js\";\n\nexport const timeYear = timeInterval((date) => {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setFullYear(date.getFullYear() + step);\n}, (start, end) => {\n return end.getFullYear() - start.getFullYear();\n}, (date) => {\n return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\ntimeYear.every = (k) => {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport const timeYears = timeYear.range;\n\nexport const utcYear = timeInterval((date) => {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, (start, end) => {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, (date) => {\n return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = (k) => {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport const utcYears = utcYear.range;\n","import {bisector, tickStep} from \"d3-array\";\nimport {durationDay, durationHour, durationMinute, durationMonth, durationSecond, durationWeek, durationYear} from \"./duration.js\";\nimport {millisecond} from \"./millisecond.js\";\nimport {second} from \"./second.js\";\nimport {timeMinute, utcMinute} from \"./minute.js\";\nimport {timeHour, utcHour} from \"./hour.js\";\nimport {timeDay, unixDay} from \"./day.js\";\nimport {timeSunday, utcSunday} from \"./week.js\";\nimport {timeMonth, utcMonth} from \"./month.js\";\nimport {timeYear, utcYear} from \"./year.js\";\n\nfunction ticker(year, month, week, day, hour, minute) {\n\n const tickIntervals = [\n [second, 1, durationSecond],\n [second, 5, 5 * durationSecond],\n [second, 15, 15 * durationSecond],\n [second, 30, 30 * durationSecond],\n [minute, 1, durationMinute],\n [minute, 5, 5 * durationMinute],\n [minute, 15, 15 * durationMinute],\n [minute, 30, 30 * durationMinute],\n [ hour, 1, durationHour ],\n [ hour, 3, 3 * durationHour ],\n [ hour, 6, 6 * durationHour ],\n [ hour, 12, 12 * durationHour ],\n [ day, 1, durationDay ],\n [ day, 2, 2 * durationDay ],\n [ week, 1, durationWeek ],\n [ month, 1, durationMonth ],\n [ month, 3, 3 * durationMonth ],\n [ year, 1, durationYear ]\n ];\n\n function ticks(start, stop, count) {\n const reverse = stop < start;\n if (reverse) [start, stop] = [stop, start];\n const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n return reverse ? ticks.reverse() : ticks;\n }\n\n function tickInterval(start, stop, count) {\n const target = Math.abs(stop - start) / count;\n const i = bisector(([,, step]) => step).right(tickIntervals, target);\n if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));\n if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));\n const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n return t.every(step);\n }\n\n return [ticks, tickInterval];\n}\n\nconst [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute);\nconst [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute);\n\nexport {utcTicks, utcTickInterval, timeTicks, timeTickInterval};\n","import {\n timeDay,\n timeSunday,\n timeMonday,\n timeThursday,\n timeYear,\n utcDay,\n utcSunday,\n utcMonday,\n utcThursday,\n utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function(string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week, day;\n if (i != string.length) return null;\n\n // If a UNIX timestamp is specified, return it.\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n // If this is utcParse, never use the local timezone.\n if (Z && !(\"Z\" in d)) d.Z = 0;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If the month was not specified, inherit from the quarter.\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n // Convert day-of-week and week-of-year to day-of-year.\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n }\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.toString = function() { return specifier; };\n return f;\n },\n parse: function(specifier) {\n var p = newParse(specifier += \"\", false);\n p.toString = function() { return specifier; };\n return p;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.toString = function() { return specifier; };\n return f;\n },\n utcParse: function(specifier) {\n var p = newParse(specifier += \"\", true);\n p.toString = function() { return specifier; };\n return p;\n }\n };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n numberRe = /^\\s*\\d+/, // note: ignores next directive\n percentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n return new Map(names.map((name, i) => [name.toLowerCase(), i]));\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n var day = d.getDay();\n return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n d = dISO(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n d = dISO(d);\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n var day = d.getDay();\n d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}\n","import {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeTicks, timeTickInterval} from \"d3-time\";\nimport {timeFormat} from \"d3-time-format\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport nice from \"./nice.js\";\n\nfunction date(t) {\n return new Date(t);\n}\n\nfunction number(t) {\n return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) {\n var scale = continuous(),\n invert = scale.invert,\n domain = scale.domain;\n\n var formatMillisecond = format(\".%L\"),\n formatSecond = format(\":%S\"),\n formatMinute = format(\"%I:%M\"),\n formatHour = format(\"%I %p\"),\n formatDay = format(\"%a %d\"),\n formatWeek = format(\"%b %d\"),\n formatMonth = format(\"%B\"),\n formatYear = format(\"%Y\");\n\n function tickFormat(date) {\n return (second(date) < date ? formatMillisecond\n : minute(date) < date ? formatSecond\n : hour(date) < date ? formatMinute\n : day(date) < date ? formatHour\n : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n : year(date) < date ? formatMonth\n : formatYear)(date);\n }\n\n scale.invert = function(y) {\n return new Date(invert(y));\n };\n\n scale.domain = function(_) {\n return arguments.length ? domain(Array.from(_, number)) : domain().map(date);\n };\n\n scale.ticks = function(interval) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);\n };\n\n scale.tickFormat = function(count, specifier) {\n return specifier == null ? tickFormat : format(specifier);\n };\n\n scale.nice = function(interval) {\n var d = domain();\n if (!interval || typeof interval.range !== \"function\") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);\n return interval ? domain(nice(d, interval)) : scale;\n };\n\n scale.copy = function() {\n return copy(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));\n };\n\n return scale;\n}\n\nexport default function time() {\n return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n","import {linearish} from \"./linear.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformSymlog(c) {\n return function(x) {\n return Math.sign(x) * Math.log1p(Math.abs(x / c));\n };\n}\n\nfunction transformSymexp(c) {\n return function(x) {\n return Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n };\n}\n\nexport function symlogish(transform) {\n var c = 1, scale = transform(transformSymlog(c), transformSymexp(c));\n\n scale.constant = function(_) {\n return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;\n };\n\n return linearish(scale);\n}\n\nexport default function symlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, symlog()).constant(scale.constant());\n };\n\n return initRange.apply(scale, arguments);\n}\n","import { scaleSymlog as originalScaleSymlog, scaleLog, scaleLinear } from '@mui/x-charts-vendor/d3-scale';\n\n/**\n * Constructs a new continuous scale with the specified range, the constant 1, the default interpolator and clamping disabled.\n * The domain defaults to [0, 1].\n * If range is not specified, it defaults to [0, 1].\n *\n * The first generic corresponds to the data type of the range elements.\n * The second generic corresponds to the data type of the output elements generated by the scale.\n * The third generic corresponds to the data type of the unknown value.\n *\n * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and\n * convert the interpolated range element to a corresponding output element.\n *\n * The range must be set in accordance with the range element type.\n *\n * The interpolator factory may be set using the interpolate(...) method of the scale.\n *\n * @param range Array of range values.\n */\n\n/**\n * Constructs a new continuous scale with the specified domain and range, the constant 1, the default interpolator and clamping disabled.\n *\n * The first generic corresponds to the data type of the range elements.\n * The second generic corresponds to the data type of the output elements generated by the scale.\n * The third generic corresponds to the data type of the unknown value.\n *\n * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and\n * convert the interpolated range element to a corresponding output element.\n *\n * The range must be set in accordance with the range element type.\n *\n * The interpolator factory may be set using the interpolate(...) method of the scale.\n *\n * @param domain Array of numeric domain values.\n * @param range Array of range values.\n */\n\nexport function scaleSymlog(...args) {\n const scale = originalScaleSymlog(...args);\n const originalTicks = scale.ticks;\n const {\n negativeScale,\n linearScale,\n positiveScale\n } = generateScales(scale);\n\n // Workaround for https://github.com/d3/d3-scale/issues/162\n scale.ticks = count => {\n const ticks = originalTicks(count);\n const constant = scale.constant();\n let negativeLogTickCount = 0;\n let linearTickCount = 0;\n let positiveLogTickCount = 0;\n ticks.forEach(tick => {\n if (tick > -constant && tick < constant) {\n linearTickCount += 1;\n }\n if (tick <= -constant) {\n negativeLogTickCount += 1;\n }\n if (tick >= constant) {\n positiveLogTickCount += 1;\n }\n });\n const finalTicks = [];\n if (negativeLogTickCount > 0) {\n finalTicks.push(...negativeScale.ticks(negativeLogTickCount));\n }\n if (linearTickCount > 0) {\n const linearTicks = linearScale.ticks(linearTickCount);\n if (finalTicks.at(-1) === linearTicks[0]) {\n finalTicks.push(...linearTicks.slice(1));\n } else {\n finalTicks.push(...linearTicks);\n }\n }\n if (positiveLogTickCount > 0) {\n const positiveTicks = positiveScale.ticks(positiveLogTickCount);\n if (finalTicks.at(-1) === positiveTicks[0]) {\n finalTicks.push(...positiveTicks.slice(1));\n } else {\n finalTicks.push(...positiveTicks);\n }\n }\n return finalTicks;\n };\n scale.tickFormat = (count = 10, specifier) => {\n // Calculates the proportion of the domain that each scale occupies, and use that ratio to determine the number of ticks for each scale.\n const constant = scale.constant();\n const [start, end] = scale.domain();\n const extent = end - start;\n const negativeScaleDomain = negativeScale.domain();\n const negativeScaleExtent = negativeScaleDomain[1] - negativeScaleDomain[0];\n const negativeScaleRatio = extent === 0 ? 0 : negativeScaleExtent / extent;\n const negativeScaleTickCount = negativeScaleRatio * count;\n const linearScaleDomain = linearScale.domain();\n const linearScaleExtent = linearScaleDomain[1] - linearScaleDomain[0];\n const linearScaleRatio = extent === 0 ? 0 : linearScaleExtent / extent;\n const linearScaleTickCount = linearScaleRatio * count;\n const positiveScaleDomain = positiveScale.domain();\n const positiveScaleExtent = positiveScaleDomain[1] - positiveScaleDomain[0];\n const positiveScaleRatio = extent === 0 ? 0 : positiveScaleExtent / extent;\n const positiveScaleTickCount = positiveScaleRatio * count;\n const negativeTickFormat = negativeScale.tickFormat(negativeScaleTickCount, specifier);\n const linearTickFormat = linearScale.tickFormat(linearScaleTickCount, specifier);\n const positiveTickFormat = positiveScale.tickFormat(positiveScaleTickCount, specifier);\n return tick => {\n const tickFormat =\n // eslint-disable-next-line no-nested-ternary\n tick.valueOf() <= -constant ? negativeTickFormat : tick.valueOf() >= constant ? positiveTickFormat : linearTickFormat;\n return tickFormat(tick);\n };\n };\n\n /* Adaptation of https://github.com/d3/d3-scale/blob/d6904a4bde09e16005e0ad8ca3e25b10ce54fa0d/src/symlog.js#L30 */\n scale.copy = () => {\n return scaleSymlog(scale.domain(), scale.range()).constant(scale.constant());\n };\n return scale;\n}\nfunction generateScales(scale) {\n const constant = scale.constant();\n const domain = scale.domain();\n const negativeDomain = [domain[0], Math.min(domain[1], -constant)];\n const negativeLogScale = scaleLog(negativeDomain, scale.range());\n const linearDomain = [Math.max(domain[0], -constant), Math.min(domain[1], constant)];\n const linearScale = scaleLinear(linearDomain, scale.range());\n const positiveDomain = [Math.max(domain[0], constant), domain[1]];\n const positiveLogScale = scaleLog(positiveDomain, scale.range());\n return {\n negativeScale: negativeLogScale,\n linearScale,\n positiveScale: positiveLogScale\n };\n}","import { scaleLog, scalePow, scaleSqrt, scaleTime, scaleUtc, scaleLinear } from '@mui/x-charts-vendor/d3-scale';\nimport { scaleSymlog } from \"./scales/index.js\";\nexport function getScale(scaleType, domain, range) {\n switch (scaleType) {\n case 'log':\n return scaleLog(domain, range);\n case 'pow':\n return scalePow(domain, range);\n case 'sqrt':\n return scaleSqrt(domain, range);\n case 'time':\n return scaleTime(domain, range);\n case 'utc':\n return scaleUtc(domain, range);\n case 'symlog':\n return scaleSymlog(domain, range);\n default:\n return scaleLinear(domain, range);\n }\n}","import {utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcTicks, utcTickInterval} from \"d3-time\";\nimport {utcFormat} from \"d3-time-format\";\nimport {calendar} from \"./time.js\";\nimport {initRange} from \"./init.js\";\n\nexport default function utcTime() {\n return initRange.apply(calendar(utcTicks, utcTickInterval, utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);\n}\n","import { scaleTime } from '@mui/x-charts-vendor/d3-scale';\n/**\n * Checks if the provided data array contains Date objects.\n * @param data The data array to check.\n * @returns A type predicate indicating if the data is an array of Date objects.\n */\nexport const isDateData = data => data?.[0] instanceof Date;\n\n/**\n * Creates a formatter function for date values.\n * @param data The data array containing Date or NumberValue objects.\n * @param range The range for the time scale.\n * @param tickNumber (Optional) The number of ticks for formatting.\n * @returns A formatter function for date values.\n */\nexport function createDateFormatter(data, range, tickNumber) {\n const timeScale = scaleTime(data, range);\n return (v, {\n location\n }) => location === 'tick' ? timeScale.tickFormat(tickNumber)(v) : `${v.toLocaleString()}`;\n}","let cartesianInstance;\nlet polarInstance;\nclass CartesianSeriesTypes {\n types = (() => new Set())();\n constructor() {\n if (cartesianInstance) {\n throw new Error('You can only create one instance!');\n }\n cartesianInstance = this.types;\n }\n addType(value) {\n this.types.add(value);\n }\n getTypes() {\n return this.types;\n }\n}\nclass PolarSeriesTypes {\n types = (() => new Set())();\n constructor() {\n if (polarInstance) {\n throw new Error('You can only create one instance!');\n }\n polarInstance = this.types;\n }\n addType(value) {\n this.types.add(value);\n }\n getTypes() {\n return this.types;\n }\n}\nexport const cartesianSeriesTypes = new CartesianSeriesTypes();\ncartesianSeriesTypes.addType('bar');\ncartesianSeriesTypes.addType('line');\ncartesianSeriesTypes.addType('scatter');\nexport const polarSeriesTypes = new PolarSeriesTypes();\npolarSeriesTypes.addType('radar');","import { cartesianSeriesTypes } from \"./configInit.js\";\nexport function isCartesianSeriesType(seriesType) {\n return cartesianSeriesTypes.getTypes().has(seriesType);\n}\nexport function isCartesianSeries(series) {\n return isCartesianSeriesType(series.type);\n}","export function isOrdinalScale(scale) {\n return scale.bandwidth !== undefined;\n}\nexport function isBandScale(scale) {\n return isOrdinalScale(scale) && scale.paddingOuter !== undefined;\n}\nexport function isPointScale(scale) {\n return isOrdinalScale(scale) && !('paddingOuter' in scale);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { createScalarFormatter } from \"../../../defaultValueFormatters.js\";\nimport { isBandScaleConfig, isPointScaleConfig } from \"../../../../models/axis.js\";\nimport { getColorScale, getOrdinalColorScale, getSequentialColorScale } from \"../../../colorScale.js\";\nimport { scaleTickNumberByRange } from \"../../../ticks.js\";\nimport { getScale } from \"../../../getScale.js\";\nimport { isDateData, createDateFormatter } from \"../../../dateHelpers.js\";\nimport { getAxisTriggerTooltip } from \"./getAxisTriggerTooltip.js\";\nimport { isBandScale, isOrdinalScale } from \"../../../scaleGuards.js\";\nfunction getRange(drawingArea, axisDirection,\n// | 'rotation' | 'radius',\nreverse) {\n const range = axisDirection === 'x' ? [drawingArea.left, drawingArea.left + drawingArea.width] : [drawingArea.top + drawingArea.height, drawingArea.top];\n return reverse ? [range[1], range[0]] : range;\n}\nfunction shouldIgnoreGapRatios(scale, categoryGapRatio) {\n const step = scale.step();\n const paddingPx = step * categoryGapRatio;\n\n /* If the padding is less than 0.1px, we consider it negligible and ignore it.\n * This prevents issues where very small gaps cause rendering artifacts or unexpected layouts.\n * A threshold of 0.1px is chosen as it's generally below the perceptible limit for most displays.\n */\n return paddingPx < 0.1;\n}\nconst DEFAULT_CATEGORY_GAP_RATIO = 0.2;\nconst DEFAULT_BAR_GAP_RATIO = 0.1;\nexport function computeAxisValue({\n scales,\n drawingArea,\n formattedSeries,\n axis: allAxis,\n seriesConfig,\n axisDirection,\n zoomMap,\n domains\n}) {\n if (allAxis === undefined) {\n return {\n axis: {},\n axisIds: []\n };\n }\n const axisIdsTriggeringTooltip = getAxisTriggerTooltip(axisDirection, seriesConfig, formattedSeries, allAxis[0].id);\n const completeAxis = {};\n allAxis.forEach(eachAxis => {\n const axis = eachAxis;\n const scale = scales[axis.id];\n const zoom = zoomMap?.get(axis.id);\n const zoomRange = zoom ? [zoom.start, zoom.end] : [0, 100];\n const range = getRange(drawingArea, axisDirection, axis.reverse ?? false);\n const rawTickNumber = domains[axis.id].tickNumber;\n const triggerTooltip = !axis.ignoreTooltip && axisIdsTriggeringTooltip.has(axis.id);\n const tickNumber = scaleTickNumberByRange(rawTickNumber, zoomRange);\n const data = axis.data ?? [];\n if (isOrdinalScale(scale)) {\n // Reverse range because ordinal scales are presented from top to bottom on y-axis\n const scaleRange = axisDirection === 'y' ? [range[1], range[0]] : range;\n if (isBandScale(scale) && isBandScaleConfig(axis)) {\n const desiredCategoryGapRatio = axis.categoryGapRatio ?? DEFAULT_CATEGORY_GAP_RATIO;\n const ignoreGapRatios = shouldIgnoreGapRatios(scale, desiredCategoryGapRatio);\n const categoryGapRatio = ignoreGapRatios ? 0 : desiredCategoryGapRatio;\n const barGapRatio = ignoreGapRatios ? 0 : axis.barGapRatio ?? DEFAULT_BAR_GAP_RATIO;\n completeAxis[axis.id] = _extends({\n offset: 0,\n height: 0,\n categoryGapRatio,\n barGapRatio,\n triggerTooltip\n }, axis, {\n data,\n /* Doing this here is technically wrong, but acceptable in practice.\n * In theory, this should be done in the normalized scale selector, but then we'd need that selector to depend\n * on the zoom range, which would void its goal (which is to be independent of zoom).\n * Since we only ignore gap ratios when they're practically invisible, the small errors caused by this\n * discrepancy will hopefully not be noticeable. */\n scale: ignoreGapRatios ? scale.copy().padding(0) : scale,\n tickNumber,\n colorScale: axis.colorMap && (axis.colorMap.type === 'ordinal' ? getOrdinalColorScale(_extends({\n values: axis.data\n }, axis.colorMap)) : getColorScale(axis.colorMap))\n });\n }\n if (isPointScaleConfig(axis)) {\n completeAxis[axis.id] = _extends({\n offset: 0,\n height: 0,\n triggerTooltip\n }, axis, {\n data,\n scale,\n tickNumber,\n colorScale: axis.colorMap && (axis.colorMap.type === 'ordinal' ? getOrdinalColorScale(_extends({\n values: axis.data\n }, axis.colorMap)) : getColorScale(axis.colorMap))\n });\n }\n if (isDateData(axis.data)) {\n const dateFormatter = createDateFormatter(axis.data, scaleRange, axis.tickNumber);\n completeAxis[axis.id].valueFormatter = axis.valueFormatter ?? dateFormatter;\n }\n return;\n }\n if (axis.scaleType === 'band' || axis.scaleType === 'point') {\n // Could be merged with the two previous \"if conditions\" but then TS does not get that `axis.scaleType` can't be `band` or `point`.\n return;\n }\n const continuousAxis = axis;\n const scaleType = continuousAxis.scaleType ?? 'linear';\n completeAxis[axis.id] = _extends({\n offset: 0,\n height: 0,\n triggerTooltip\n }, continuousAxis, {\n data,\n scaleType,\n scale,\n tickNumber,\n colorScale: continuousAxis.colorMap && getSequentialColorScale(continuousAxis.colorMap),\n valueFormatter: axis.valueFormatter ?? createScalarFormatter(tickNumber, getScale(scaleType, range.map(v => scale.invert(v)), range))\n });\n });\n return {\n axis: completeAxis,\n axisIds: allAxis.map(({\n id\n }) => id)\n };\n}","import { isCartesianSeriesType } from \"../../../isCartesian.js\";\nexport const getAxisTriggerTooltip = (axisDirection, seriesConfig, formattedSeries, defaultAxisId) => {\n const tooltipAxesIds = new Set();\n const chartTypes = Object.keys(seriesConfig).filter(isCartesianSeriesType);\n chartTypes.forEach(chartType => {\n const series = formattedSeries[chartType]?.series ?? {};\n const tooltipAxes = seriesConfig[chartType].axisTooltipGetter?.(series);\n if (tooltipAxes === undefined) {\n return;\n }\n tooltipAxes.forEach(({\n axisId,\n direction\n }) => {\n if (direction === axisDirection) {\n tooltipAxesIds.add(axisId ?? defaultAxisId);\n }\n });\n });\n return tooltipAxesIds;\n};","export function isDefined(value) {\n return value !== null && value !== undefined;\n}","import { isDefined } from \"../../../isDefined.js\";\nexport function createDiscreteScaleGetAxisFilter(axisData, zoomStart, zoomEnd, direction) {\n const maxIndex = axisData?.length ?? 0;\n const minVal = Math.floor(zoomStart * maxIndex / 100);\n const maxVal = Math.ceil(zoomEnd * maxIndex / 100);\n return function filterAxis(value, dataIndex) {\n const val = value[direction] ?? axisData?.[dataIndex];\n if (val == null) {\n // If the value does not exist because of missing data point, or out of range index, we just ignore.\n return true;\n }\n return dataIndex >= minVal && dataIndex < maxVal;\n };\n}\nexport function createContinuousScaleGetAxisFilter(domain, zoomStart, zoomEnd, direction, axisData) {\n const min = domain[0].valueOf();\n const max = domain[1].valueOf();\n const minVal = min + zoomStart * (max - min) / 100;\n const maxVal = min + zoomEnd * (max - min) / 100;\n return function filterAxis(value, dataIndex) {\n const val = value[direction] ?? axisData?.[dataIndex];\n if (val == null) {\n // If the value does not exist because of missing data point, or out of range index, we just ignore.\n return true;\n }\n return val >= minVal && val <= maxVal;\n };\n}\nexport const createGetAxisFilters = filters => ({\n currentAxisId,\n seriesXAxisId,\n seriesYAxisId,\n isDefaultAxis\n}) => {\n return (value, dataIndex) => {\n const axisId = currentAxisId === seriesXAxisId ? seriesYAxisId : seriesXAxisId;\n if (!axisId || isDefaultAxis) {\n return Object.values(filters ?? {})[0]?.(value, dataIndex) ?? true;\n }\n const data = [seriesYAxisId, seriesXAxisId].filter(id => id !== currentAxisId).map(id => filters[id ?? '']).filter(isDefined);\n return data.every(f => f(value, dataIndex));\n };\n};","import { defaultizeZoom } from \"./defaultizeZoom.js\";\nexport const createZoomLookup = axisDirection => (axes = []) => axes.reduce((acc, v) => {\n // @ts-ignore\n const {\n zoom,\n id: axisId,\n reverse\n } = v;\n const defaultizedZoom = defaultizeZoom(zoom, axisId, axisDirection, reverse);\n if (defaultizedZoom) {\n acc[axisId] = defaultizedZoom;\n }\n return acc;\n}, {});","import { createSelector } from '@mui/x-internals/store';\nexport const selectorChartExperimentalFeaturesState = state => state.experimentalFeatures;\nexport const selectorPreferStrictDomainInLineCharts = createSelector(selectorChartExperimentalFeaturesState, features => Boolean(features?.preferStrictDomainInLineCharts));","/* eslint-disable func-names */\n// Adapted from d3-scale v4.0.2\n// https://github.com/d3/d3-scale/blob/d6904a4bde09e16005e0ad8ca3e25b10ce54fa0d/src/band.js\nimport { InternMap, range as sequence } from '@mui/x-charts-vendor/d3-array';\nexport function keyof(value) {\n if (Array.isArray(value)) {\n return JSON.stringify(value);\n }\n if (typeof value === 'object' && value !== null) {\n return value.valueOf();\n }\n return value;\n}\n\n/**\n * Constructs a new band scale with the specified range, no padding, no rounding and center alignment.\n * The domain defaults to the empty domain.\n * If range is not specified, it defaults to the unit range [0, 1].\n *\n * The generic corresponds to the data type of domain elements.\n *\n * @param range A two-element array of numeric values.\n */\n\n/**\n * Constructs a new band scale with the specified domain and range, no padding, no rounding and center alignment.\n *\n * The generic corresponds to the data type of domain elements.\n *\n * @param domain Array of domain values.\n * @param range A two-element array of numeric values.\n */\n\nexport function scaleBand(...args) {\n // @ts-expect-error, InternMap accepts two arguments, but its types are set as Map, which doesn't.\n let index = new InternMap(undefined, keyof);\n let domain = [];\n let ordinalRange = [];\n let r0 = 0;\n let r1 = 1;\n let step;\n let bandwidth;\n let isRound = false;\n let paddingInner = 0;\n let paddingOuter = 0;\n let align = 0.5;\n const scale = d => {\n const i = index.get(d);\n if (i === undefined) {\n return undefined;\n }\n return ordinalRange[i % ordinalRange.length];\n };\n const rescale = () => {\n const n = domain.length;\n const reverse = r1 < r0;\n const start = reverse ? r1 : r0;\n const stop = reverse ? r0 : r1;\n step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n if (isRound) {\n step = Math.floor(step);\n }\n const adjustedStart = start + (stop - start - step * (n - paddingInner)) * align;\n bandwidth = step * (1 - paddingInner);\n const finalStart = isRound ? Math.round(adjustedStart) : adjustedStart;\n const finalBandwidth = isRound ? Math.round(bandwidth) : bandwidth;\n bandwidth = finalBandwidth;\n const values = sequence(n).map(i => finalStart + step * i);\n ordinalRange = reverse ? values.reverse() : values;\n return scale;\n };\n scale.domain = function (_) {\n if (!arguments.length) {\n return domain.slice();\n }\n domain = [];\n // @ts-expect-error, InternMap accepts two arguments.\n index = new InternMap(undefined, keyof);\n for (const value of _) {\n if (index.has(value)) {\n continue;\n }\n index.set(value, domain.push(value) - 1);\n }\n return rescale();\n };\n scale.range = function (_) {\n if (!arguments.length) {\n return [r0, r1];\n }\n const [v0, v1] = _;\n r0 = +v0;\n r1 = +v1;\n return rescale();\n };\n scale.rangeRound = function (_) {\n const [v0, v1] = _;\n r0 = +v0;\n r1 = +v1;\n isRound = true;\n return rescale();\n };\n scale.bandwidth = function () {\n return bandwidth;\n };\n scale.step = function () {\n return step;\n };\n scale.round = function (_) {\n if (!arguments.length) {\n return isRound;\n }\n isRound = !!_;\n return rescale();\n };\n scale.padding = function (_) {\n if (!arguments.length) {\n return paddingInner;\n }\n paddingInner = Math.min(1, paddingOuter = +_);\n return rescale();\n };\n scale.paddingInner = function (_) {\n if (!arguments.length) {\n return paddingInner;\n }\n paddingInner = Math.min(1, _);\n return rescale();\n };\n scale.paddingOuter = function (_) {\n if (!arguments.length) {\n return paddingOuter;\n }\n paddingOuter = +_;\n return rescale();\n };\n scale.align = function (_) {\n if (!arguments.length) {\n return align;\n }\n align = Math.max(0, Math.min(1, _));\n return rescale();\n };\n scale.copy = () => {\n return scaleBand(domain, [r0, r1]).round(isRound).paddingInner(paddingInner).paddingOuter(paddingOuter).align(align);\n };\n\n // Initialize from arguments\n const [arg0, arg1] = args;\n if (args.length > 1) {\n scale.domain(arg0);\n scale.range(arg1);\n } else if (arg0) {\n scale.range(arg0);\n } else {\n rescale();\n }\n return scale;\n}","export default function range(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n}\n","import { scaleBand } from \"./scaleBand.js\";\n\n/**\n * Constructs a new point scale with the specified range, no padding, no rounding and center alignment.\n * The domain defaults to the empty domain.\n * If range is not specified, it defaults to the unit range [0, 1].\n *\n * The generic corresponds to the data type of domain elements.\n *\n * @param range A two-element array of numeric values.\n */\n\n/**\n * Constructs a new point scale with the specified domain and range, no padding, no rounding and center alignment.\n * The domain defaults to the empty domain.\n *\n * The generic corresponds to the data type of domain elements.\n *\n * @param domain Array of domain values.\n * @param range A two-element array of numeric values.\n */\n\nexport function scalePoint(...args) {\n // ScalePoint is essentially ScaleBand with paddingInner(1)\n const scale = scaleBand(...args).paddingInner(1);\n\n // Remove paddingInner method and make padding alias to paddingOuter\n const originalCopy = scale.copy;\n scale.padding = scale.paddingOuter;\n delete scale.paddingInner;\n delete scale.paddingOuter;\n scale.copy = () => {\n const copied = originalCopy();\n copied.padding = copied.paddingOuter;\n delete copied.paddingInner;\n delete copied.paddingOuter;\n copied.copy = scale.copy;\n return copied;\n };\n return scale;\n}","import { isBandScaleConfig, isPointScaleConfig, isSymlogScaleConfig } from \"../../../../models/axis.js\";\nimport { getScale } from \"../../../getScale.js\";\nimport { scaleBand, scalePoint } from \"../../../scales/index.js\";\nconst DEFAULT_CATEGORY_GAP_RATIO = 0.2;\nexport function getRange(drawingArea, axisDirection, axis) {\n const range = axisDirection === 'x' ? [drawingArea.left, drawingArea.left + drawingArea.width] : [drawingArea.top + drawingArea.height, drawingArea.top];\n return axis.reverse ? [range[1], range[0]] : range;\n}\nexport function getNormalizedAxisScale(axis, domain) {\n const range = [0, 1];\n if (isBandScaleConfig(axis)) {\n const categoryGapRatio = axis.categoryGapRatio ?? DEFAULT_CATEGORY_GAP_RATIO;\n return scaleBand(domain, range).paddingInner(categoryGapRatio).paddingOuter(categoryGapRatio / 2);\n }\n if (isPointScaleConfig(axis)) {\n return scalePoint(domain, range);\n }\n const scaleType = axis.scaleType ?? 'linear';\n const scale = getScale(scaleType, domain, range);\n if (isSymlogScaleConfig(axis) && axis.constant != null) {\n scale.constant(axis.constant);\n }\n return scale;\n}","/**\n * Applies the zoom into the scale range.\n * It changes the screen coordinates that the scale covers.\n * Not the data that is displayed.\n *\n * @param scaleRange the original range in real screen coordinates.\n * @param zoomRange the zoom range in percentage.\n * @returns zoomed range in real screen coordinates.\n */\nexport const zoomScaleRange = (scaleRange, zoomRange) => {\n const rangeGap = scaleRange[1] - scaleRange[0];\n const zoomGap = zoomRange[1] - zoomRange[0];\n\n // If current zoom show the scale between p1 and p2 percents\n // The range should be extended by adding [0, p1] and [p2, 100] segments\n const min = scaleRange[0] - zoomRange[0] * rangeGap / zoomGap;\n const max = scaleRange[1] + (100 - zoomRange[1]) * rangeGap / zoomGap;\n return [min, max];\n};","import { isCartesianSeriesType } from \"../../../isCartesian.js\";\nconst axisExtremumCallback = (chartType, axis, axisDirection, seriesConfig, axisIndex, formattedSeries, getFilters) => {\n const getter = axisDirection === 'x' ? seriesConfig[chartType].xExtremumGetter : seriesConfig[chartType].yExtremumGetter;\n const series = formattedSeries[chartType]?.series ?? {};\n return getter?.({\n series,\n axis,\n axisIndex,\n isDefaultAxis: axisIndex === 0,\n getFilters\n }) ?? [Infinity, -Infinity];\n};\nexport function getAxisExtrema(axis, axisDirection, seriesConfig, axisIndex, formattedSeries, getFilters) {\n const cartesianChartTypes = Object.keys(seriesConfig).filter(isCartesianSeriesType);\n let extrema = [Infinity, -Infinity];\n for (const chartType of cartesianChartTypes) {\n const [min, max] = axisExtremumCallback(chartType, axis, axisDirection, seriesConfig, axisIndex, formattedSeries, getFilters);\n extrema = [Math.min(extrema[0], min), Math.max(extrema[1], max)];\n }\n if (Number.isNaN(extrema[0]) || Number.isNaN(extrema[1])) {\n return [Infinity, -Infinity];\n }\n return extrema;\n}","import { getScale } from \"../../../getScale.js\";\nimport { getAxisDomainLimit } from \"./getAxisDomainLimit.js\";\nimport { getTickNumber } from \"../../../ticks.js\";\nfunction niceDomain(scaleType, domain, tickNumber) {\n return getScale(scaleType ?? 'linear', domain, [0, 1]).nice(tickNumber).domain();\n}\n\n/**\n * Calculates the initial domain and tick number for a given axis.\n * The domain should still run through the zoom filterMode after this step.\n */\nexport function calculateInitialDomainAndTickNumber(axis, axisDirection, axisIndex, formattedSeries, [minData, maxData], defaultTickNumber, preferStrictDomainInLineCharts) {\n const domainLimit = getDomainLimit(axis, axisDirection, axisIndex, formattedSeries, preferStrictDomainInLineCharts);\n let axisExtrema = getActualAxisExtrema(axis, minData, maxData);\n if (typeof domainLimit === 'function') {\n const {\n min,\n max\n } = domainLimit(minData.valueOf(), maxData.valueOf());\n axisExtrema[0] = min;\n axisExtrema[1] = max;\n }\n const tickNumber = getTickNumber(axis, axisExtrema, defaultTickNumber);\n if (domainLimit === 'nice') {\n axisExtrema = niceDomain(axis.scaleType, axisExtrema, tickNumber);\n }\n axisExtrema = ['min' in axis ? axis.min ?? axisExtrema[0] : axisExtrema[0], 'max' in axis ? axis.max ?? axisExtrema[1] : axisExtrema[1]];\n return {\n domain: axisExtrema,\n tickNumber\n };\n}\n\n/**\n * Calculates the final domain for an axis.\n * After this step, the domain can be used to create the axis scale.\n */\nexport function calculateFinalDomain(axis, axisDirection, axisIndex, formattedSeries, [minData, maxData], tickNumber, preferStrictDomainInLineCharts) {\n const domainLimit = getDomainLimit(axis, axisDirection, axisIndex, formattedSeries, preferStrictDomainInLineCharts);\n let axisExtrema = getActualAxisExtrema(axis, minData, maxData);\n if (typeof domainLimit === 'function') {\n const {\n min,\n max\n } = domainLimit(minData.valueOf(), maxData.valueOf());\n axisExtrema[0] = min;\n axisExtrema[1] = max;\n }\n if (domainLimit === 'nice') {\n axisExtrema = niceDomain(axis.scaleType, axisExtrema, tickNumber);\n }\n return [axis.min ?? axisExtrema[0], axis.max ?? axisExtrema[1]];\n}\nfunction getDomainLimit(axis, axisDirection, axisIndex, formattedSeries, preferStrictDomainInLineCharts) {\n return preferStrictDomainInLineCharts ? getAxisDomainLimit(axis, axisDirection, axisIndex, formattedSeries) : axis.domainLimit ?? 'nice';\n}\n\n/**\n * Get the actual axis extrema considering the user defined min and max values.\n * @param axisExtrema User defined axis extrema.\n * @param minData Minimum value from the data.\n * @param maxData Maximum value from the data.\n */\nfunction getActualAxisExtrema(axisExtrema, minData, maxData) {\n let min = minData;\n let max = maxData;\n if ('max' in axisExtrema && axisExtrema.max != null && axisExtrema.max < minData) {\n min = axisExtrema.max;\n }\n if ('min' in axisExtrema && axisExtrema.min != null && axisExtrema.min > minData) {\n max = axisExtrema.min;\n }\n if (!('min' in axisExtrema) && !('max' in axisExtrema)) {\n return [min, max];\n }\n return [axisExtrema.min ?? min, axisExtrema.max ?? max];\n}","export const getAxisDomainLimit = (axis, axisDirection, axisIndex, formattedSeries) => {\n if (axis.domainLimit !== undefined) {\n return axis.domainLimit;\n }\n if (axisDirection === 'x') {\n for (const seriesId of formattedSeries.line?.seriesOrder ?? []) {\n const series = formattedSeries.line.series[seriesId];\n if (series.xAxisId === axis.id || series.xAxisId === undefined && axisIndex === 0) {\n return 'strict';\n }\n }\n }\n return 'nice';\n};","\n/** @template T */\nexport default class FlatQueue {\n\n constructor() {\n /** @type T[] */\n this.ids = [];\n\n /** @type number[] */\n this.values = [];\n\n /** Number of items in the queue. */\n this.length = 0;\n }\n\n /** Removes all items from the queue. */\n clear() {\n this.length = 0;\n }\n\n /**\n * Adds `item` to the queue with the specified `priority`.\n *\n * `priority` must be a number. Items are sorted and returned from low to high priority. Multiple items\n * with the same priority value can be added to the queue, but there is no guaranteed order between these items.\n *\n * @param {T} item\n * @param {number} priority\n */\n push(item, priority) {\n let pos = this.length++;\n\n while (pos > 0) {\n const parent = (pos - 1) >> 1;\n const parentValue = this.values[parent];\n if (priority >= parentValue) break;\n this.ids[pos] = this.ids[parent];\n this.values[pos] = parentValue;\n pos = parent;\n }\n\n this.ids[pos] = item;\n this.values[pos] = priority;\n }\n\n /**\n * Removes and returns the item from the head of this queue, which is one of\n * the items with the lowest priority. If this queue is empty, returns `undefined`.\n */\n pop() {\n if (this.length === 0) return undefined;\n\n const ids = this.ids,\n values = this.values,\n top = ids[0],\n last = --this.length;\n\n if (last > 0) {\n const id = ids[last];\n const value = values[last];\n let pos = 0;\n const halfLen = last >> 1;\n\n while (pos < halfLen) {\n const left = (pos << 1) + 1;\n const right = left + 1;\n const child = left + (+(right < last) & +(values[right] < values[left]));\n if (values[child] >= value) break;\n ids[pos] = ids[child];\n values[pos] = values[child];\n pos = child;\n }\n\n ids[pos] = id;\n values[pos] = value;\n }\n\n return top;\n }\n\n /** Returns the item from the head of this queue without removing it. If this queue is empty, returns `undefined`. */\n peek() {\n return this.length > 0 ? this.ids[0] : undefined;\n }\n\n /**\n * Returns the priority value of the item at the head of this queue without\n * removing it. If this queue is empty, returns `undefined`.\n */\n peekValue() {\n return this.length > 0 ? this.values[0] : undefined;\n }\n\n /**\n * Shrinks the internal arrays to `this.length`.\n *\n * `pop()` and `clear()` calls don't free memory automatically to avoid unnecessary resize operations.\n * This also means that items that have been added to the queue can't be garbage collected until\n * a new item is pushed in their place, or this method is called.\n */\n shrink() {\n this.ids.length = this.values.length = this.length;\n }\n}\n","// @ts-nocheck\n/* eslint-disable */\nimport FlatQueue from '@mui/x-charts-vendor/flatqueue';\nconst ARRAY_TYPES = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array];\nconst VERSION = 3; // serialized format version\n\nexport class Flatbush {\n /**\n * Recreate a Flatbush index from raw `ArrayBuffer` or `SharedArrayBuffer` data.\n * @param {ArrayBufferLike} data\n * @param {number} [byteOffset=0] byte offset to the start of the Flatbush buffer in the referenced ArrayBuffer.\n * @returns {Flatbush} index\n */\n static from(data, byteOffset = 0) {\n if (byteOffset % 8 !== 0) {\n throw new Error('byteOffset must be 8-byte aligned.');\n }\n\n // @ts-expect-error duck typing array buffers\n if (!data || data.byteLength === undefined || data.buffer) {\n throw new Error('Data must be an instance of ArrayBuffer or SharedArrayBuffer.');\n }\n const [magic, versionAndType] = new Uint8Array(data, byteOffset + 0, 2);\n if (magic !== 0xfb) {\n throw new Error('Data does not appear to be in a Flatbush format.');\n }\n const version = versionAndType >> 4;\n if (version !== VERSION) {\n throw new Error(`Got v${version} data when expected v${VERSION}.`);\n }\n const ArrayType = ARRAY_TYPES[versionAndType & 0x0f];\n if (!ArrayType) {\n throw new Error('Unrecognized array type.');\n }\n const [nodeSize] = new Uint16Array(data, byteOffset + 2, 1);\n const [numItems] = new Uint32Array(data, byteOffset + 4, 1);\n return new Flatbush(numItems, nodeSize, ArrayType, undefined, data, byteOffset);\n }\n\n /**\n * Create a Flatbush index that will hold a given number of items.\n * @param {number} numItems\n * @param {number} [nodeSize=16] Size of the tree node (16 by default).\n * @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).\n * @param {ArrayBufferConstructor | SharedArrayBufferConstructor} [ArrayBufferType=ArrayBuffer] The array buffer type used to store data (`ArrayBuffer` by default).\n * @param {ArrayBufferLike} [data] (Only used internally)\n * @param {number} [byteOffset=0] (Only used internally)\n */\n constructor(numItems, nodeSize = 16, ArrayType = Float64Array, ArrayBufferType = ArrayBuffer, data, byteOffset = 0) {\n if (numItems === undefined) {\n throw new Error('Missing required argument: numItems.');\n }\n if (isNaN(numItems) || numItems <= 0) {\n throw new Error(`Unexpected numItems value: ${numItems}.`);\n }\n this.numItems = +numItems;\n this.nodeSize = Math.min(Math.max(+nodeSize, 2), 65535);\n this.byteOffset = byteOffset;\n\n // calculate the total number of nodes in the R-tree to allocate space for\n // and the index of each tree level (used in search later)\n let n = numItems;\n let numNodes = n;\n this._levelBounds = [n * 4];\n do {\n n = Math.ceil(n / this.nodeSize);\n numNodes += n;\n this._levelBounds.push(numNodes * 4);\n } while (n !== 1);\n this.ArrayType = ArrayType;\n this.IndexArrayType = numNodes < 16384 ? Uint16Array : Uint32Array;\n const arrayTypeIndex = ARRAY_TYPES.indexOf(ArrayType);\n const nodesByteSize = numNodes * 4 * ArrayType.BYTES_PER_ELEMENT;\n if (arrayTypeIndex < 0) {\n throw new Error(`Unexpected typed array class: ${ArrayType}.`);\n }\n if (data) {\n this.data = data;\n this._boxes = new ArrayType(data, byteOffset + 8, numNodes * 4);\n this._indices = new this.IndexArrayType(data, byteOffset + 8 + nodesByteSize, numNodes);\n this._pos = numNodes * 4;\n this.minX = this._boxes[this._pos - 4];\n this.minY = this._boxes[this._pos - 3];\n this.maxX = this._boxes[this._pos - 2];\n this.maxY = this._boxes[this._pos - 1];\n } else {\n const data = this.data = new ArrayBufferType(8 + nodesByteSize + numNodes * this.IndexArrayType.BYTES_PER_ELEMENT);\n this._boxes = new ArrayType(data, 8, numNodes * 4);\n this._indices = new this.IndexArrayType(data, 8 + nodesByteSize, numNodes);\n this._pos = 0;\n this.minX = Infinity;\n this.minY = Infinity;\n this.maxX = -Infinity;\n this.maxY = -Infinity;\n new Uint8Array(data, 0, 2).set([0xfb, (VERSION << 4) + arrayTypeIndex]);\n new Uint16Array(data, 2, 1)[0] = nodeSize;\n new Uint32Array(data, 4, 1)[0] = numItems;\n }\n\n // a priority queue for k-nearest-neighbors queries\n /** @type FlatQueue */\n this._queue = new FlatQueue();\n }\n\n /**\n * Add a given rectangle to the index.\n * @param {number} minX\n * @param {number} minY\n * @param {number} maxX\n * @param {number} maxY\n * @returns {number} A zero-based, incremental number that represents the newly added rectangle.\n */\n add(minX, minY, maxX = minX, maxY = minY) {\n const index = this._pos >> 2;\n const boxes = this._boxes;\n this._indices[index] = index;\n boxes[this._pos++] = minX;\n boxes[this._pos++] = minY;\n boxes[this._pos++] = maxX;\n boxes[this._pos++] = maxY;\n if (minX < this.minX) {\n this.minX = minX;\n }\n if (minY < this.minY) {\n this.minY = minY;\n }\n if (maxX > this.maxX) {\n this.maxX = maxX;\n }\n if (maxY > this.maxY) {\n this.maxY = maxY;\n }\n return index;\n }\n\n /** Perform indexing of the added rectangles. */\n finish() {\n if (this._pos >> 2 !== this.numItems) {\n throw new Error(`Added ${this._pos >> 2} items when expected ${this.numItems}.`);\n }\n const boxes = this._boxes;\n if (this.numItems <= this.nodeSize) {\n // only one node, skip sorting and just fill the root box\n boxes[this._pos++] = this.minX;\n boxes[this._pos++] = this.minY;\n boxes[this._pos++] = this.maxX;\n boxes[this._pos++] = this.maxY;\n return;\n }\n const width = this.maxX - this.minX || 1;\n const height = this.maxY - this.minY || 1;\n const hilbertValues = new Uint32Array(this.numItems);\n const hilbertMax = (1 << 16) - 1;\n\n // map item centers into Hilbert coordinate space and calculate Hilbert values\n for (let i = 0, pos = 0; i < this.numItems; i++) {\n const minX = boxes[pos++];\n const minY = boxes[pos++];\n const maxX = boxes[pos++];\n const maxY = boxes[pos++];\n const x = Math.floor(hilbertMax * ((minX + maxX) / 2 - this.minX) / width);\n const y = Math.floor(hilbertMax * ((minY + maxY) / 2 - this.minY) / height);\n hilbertValues[i] = hilbert(x, y);\n }\n\n // sort items by their Hilbert value (for packing later)\n sort(hilbertValues, boxes, this._indices, 0, this.numItems - 1, this.nodeSize);\n\n // generate nodes at each tree level, bottom-up\n for (let i = 0, pos = 0; i < this._levelBounds.length - 1; i++) {\n const end = this._levelBounds[i];\n\n // generate a parent node for each block of consecutive nodes\n while (pos < end) {\n const nodeIndex = pos;\n\n // calculate bbox for the new node\n let nodeMinX = boxes[pos++];\n let nodeMinY = boxes[pos++];\n let nodeMaxX = boxes[pos++];\n let nodeMaxY = boxes[pos++];\n for (let j = 1; j < this.nodeSize && pos < end; j++) {\n nodeMinX = Math.min(nodeMinX, boxes[pos++]);\n nodeMinY = Math.min(nodeMinY, boxes[pos++]);\n nodeMaxX = Math.max(nodeMaxX, boxes[pos++]);\n nodeMaxY = Math.max(nodeMaxY, boxes[pos++]);\n }\n\n // add the new node to the tree data\n this._indices[this._pos >> 2] = nodeIndex;\n boxes[this._pos++] = nodeMinX;\n boxes[this._pos++] = nodeMinY;\n boxes[this._pos++] = nodeMaxX;\n boxes[this._pos++] = nodeMaxY;\n }\n }\n }\n\n /**\n * Search the index by a bounding box.\n * @param {number} minX\n * @param {number} minY\n * @param {number} maxX\n * @param {number} maxY\n * @param {(index: number) => boolean} [filterFn] An optional function for filtering the results.\n * @returns {number[]} An array containing the index, the x coordinate and the y coordinate of the points intersecting or touching the given bounding box.\n */\n search(minX, minY, maxX, maxY, filterFn) {\n if (this._pos !== this._boxes.length) {\n throw new Error('Data not yet indexed - call index.finish().');\n }\n\n /** @type number | undefined */\n let nodeIndex = this._boxes.length - 4;\n const queue = [];\n const results = [];\n while (nodeIndex !== undefined) {\n // find the end index of the node\n const end = Math.min(nodeIndex + this.nodeSize * 4, upperBound(nodeIndex, this._levelBounds));\n\n // search through child nodes\n for (let /** @type number */pos = nodeIndex; pos < end; pos += 4) {\n // check if node bbox intersects with query bbox\n if (maxX < this._boxes[pos]) {\n continue;\n } // maxX < nodeMinX\n if (maxY < this._boxes[pos + 1]) {\n continue;\n } // maxY < nodeMinY\n if (minX > this._boxes[pos + 2]) {\n continue;\n } // minX > nodeMaxX\n if (minY > this._boxes[pos + 3]) {\n continue;\n } // minY > nodeMaxY\n\n const index = this._indices[pos >> 2] | 0;\n if (nodeIndex >= this.numItems * 4) {\n queue.push(index); // node; add it to the search queue\n } else if (filterFn === undefined || filterFn(index)) {\n results.push(index);\n results.push(this._boxes[pos]); // leaf item\n results.push(this._boxes[pos + 1]);\n }\n }\n nodeIndex = queue.pop();\n }\n return results;\n }\n\n /**\n * Search items in order of distance from the given point.\n * @param x\n * @param y\n * @param [maxResults=Infinity]\n * @param maxDistSq\n * @param [filterFn] An optional function for filtering the results.\n * @param [sqDistFn] An optional function to calculate squared distance from the point to the item.\n * @returns {number[]} An array of indices of items found.\n */\n neighbors(x, y, maxResults = Infinity, maxDistSq = Infinity, filterFn, sqDistFn = sqDist) {\n if (this._pos !== this._boxes.length) {\n throw new Error('Data not yet indexed - call index.finish().');\n }\n\n /** @type number | undefined */\n let nodeIndex = this._boxes.length - 4;\n const q = this._queue;\n const results = [];\n\n /* eslint-disable no-labels */\n outer: while (nodeIndex !== undefined) {\n // find the end index of the node\n const end = Math.min(nodeIndex + this.nodeSize * 4, upperBound(nodeIndex, this._levelBounds));\n\n // add child nodes to the queue\n for (let pos = nodeIndex; pos < end; pos += 4) {\n const index = this._indices[pos >> 2] | 0;\n const minX = this._boxes[pos];\n const minY = this._boxes[pos + 1];\n const maxX = this._boxes[pos + 2];\n const maxY = this._boxes[pos + 3];\n const dx = x < minX ? minX - x : x > maxX ? x - maxX : 0;\n const dy = y < minY ? minY - y : y > maxY ? y - maxY : 0;\n const dist = sqDistFn(dx, dy);\n if (dist > maxDistSq) {\n continue;\n }\n if (nodeIndex >= this.numItems * 4) {\n q.push(index << 1, dist); // node (use even id)\n } else if (filterFn === undefined || filterFn(index)) {\n q.push((index << 1) + 1, dist); // leaf item (use odd id)\n }\n }\n\n // pop items from the queue\n // @ts-expect-error q.length check eliminates undefined values\n while (q.length && q.peek() & 1) {\n const dist = q.peekValue();\n\n // @ts-expect-error\n if (dist > maxDistSq) {\n break outer;\n }\n // @ts-expect-error\n results.push(q.pop() >> 1);\n if (results.length === maxResults) {\n break outer;\n }\n }\n\n // @ts-expect-error\n nodeIndex = q.length ? q.pop() >> 1 : undefined;\n }\n q.clear();\n return results;\n }\n}\nfunction sqDist(dx, dy) {\n return dx * dx + dy * dy;\n}\n\n/**\n * Binary search for the first value in the array bigger than the given.\n * @param {number} value\n * @param {number[]} arr\n */\nfunction upperBound(value, arr) {\n let i = 0;\n let j = arr.length - 1;\n while (i < j) {\n const m = i + j >> 1;\n if (arr[m] > value) {\n j = m;\n } else {\n i = m + 1;\n }\n }\n return arr[i];\n}\n\n/**\n * Custom quicksort that partially sorts bbox data alongside the hilbert values.\n * @param {Uint32Array} values\n * @param {InstanceType} boxes\n * @param {Uint16Array | Uint32Array} indices\n * @param {number} left\n * @param {number} right\n * @param {number} nodeSize\n */\nfunction sort(values, boxes, indices, left, right, nodeSize) {\n if (Math.floor(left / nodeSize) >= Math.floor(right / nodeSize)) {\n return;\n }\n\n // apply median of three method\n const start = values[left];\n const mid = values[left + right >> 1];\n const end = values[right];\n let pivot = end;\n const x = Math.max(start, mid);\n if (end > x) {\n pivot = x;\n } else if (x === start) {\n pivot = Math.max(mid, end);\n } else if (x === mid) {\n pivot = Math.max(start, end);\n }\n let i = left - 1;\n let j = right + 1;\n while (true) {\n do {\n i++;\n } while (values[i] < pivot);\n do {\n j--;\n } while (values[j] > pivot);\n if (i >= j) {\n break;\n }\n swap(values, boxes, indices, i, j);\n }\n sort(values, boxes, indices, left, j, nodeSize);\n sort(values, boxes, indices, j + 1, right, nodeSize);\n}\n\n/**\n * Swap two values and two corresponding boxes.\n * @param {Uint32Array} values\n * @param {InstanceType} boxes\n * @param {Uint16Array | Uint32Array} indices\n * @param {number} i\n * @param {number} j\n */\nfunction swap(values, boxes, indices, i, j) {\n const temp = values[i];\n values[i] = values[j];\n values[j] = temp;\n const k = 4 * i;\n const m = 4 * j;\n const a = boxes[k];\n const b = boxes[k + 1];\n const c = boxes[k + 2];\n const d = boxes[k + 3];\n boxes[k] = boxes[m];\n boxes[k + 1] = boxes[m + 1];\n boxes[k + 2] = boxes[m + 2];\n boxes[k + 3] = boxes[m + 3];\n boxes[m] = a;\n boxes[m + 1] = b;\n boxes[m + 2] = c;\n boxes[m + 3] = d;\n const e = indices[i];\n indices[i] = indices[j];\n indices[j] = e;\n}\n\n/**\n * Fast Hilbert curve algorithm by http://threadlocalmutex.com/\n * Ported from C++ https://github.com/rawrunprotected/hilbert_curves (public domain)\n * @param {number} x\n * @param {number} y\n */\nfunction hilbert(x, y) {\n let a = x ^ y;\n let b = 0xffff ^ a;\n let c = 0xffff ^ (x | y);\n let d = x & (y ^ 0xffff);\n let A = a | b >> 1;\n let B = a >> 1 ^ a;\n let C = c >> 1 ^ b & d >> 1 ^ c;\n let D = a & c >> 1 ^ d >> 1 ^ d;\n a = A;\n b = B;\n c = C;\n d = D;\n A = a & a >> 2 ^ b & b >> 2;\n B = a & b >> 2 ^ b & (a ^ b) >> 2;\n C ^= a & c >> 2 ^ b & d >> 2;\n D ^= b & c >> 2 ^ (a ^ b) & d >> 2;\n a = A;\n b = B;\n c = C;\n d = D;\n A = a & a >> 4 ^ b & b >> 4;\n B = a & b >> 4 ^ b & (a ^ b) >> 4;\n C ^= a & c >> 4 ^ b & d >> 4;\n D ^= b & c >> 4 ^ (a ^ b) & d >> 4;\n a = A;\n b = B;\n c = C;\n d = D;\n C ^= a & c >> 8 ^ b & d >> 8;\n D ^= b & c >> 8 ^ (a ^ b) & d >> 8;\n a = C ^ C >> 1;\n b = D ^ D >> 1;\n let i0 = x ^ y;\n let i1 = b | 0xffff ^ (i0 | a);\n i0 = (i0 | i0 << 8) & 0x00ff00ff;\n i0 = (i0 | i0 << 4) & 0x0f0f0f0f;\n i0 = (i0 | i0 << 2) & 0x33333333;\n i0 = (i0 | i0 << 1) & 0x55555555;\n i1 = (i1 | i1 << 8) & 0x00ff00ff;\n i1 = (i1 | i1 << 4) & 0x0f0f0f0f;\n i1 = (i1 | i1 << 2) & 0x33333333;\n i1 = (i1 | i1 << 1) & 0x55555555;\n return (i1 << 1 | i0) >>> 0;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { createSelector, createSelectorMemoized } from '@mui/x-internals/store';\nimport { selectorChartDrawingArea } from \"../../corePlugins/useChartDimensions/index.js\";\nimport { selectorChartSeriesConfig, selectorChartSeriesProcessed } from \"../../corePlugins/useChartSeries/index.js\";\nimport { computeAxisValue } from \"./computeAxisValue.js\";\nimport { createContinuousScaleGetAxisFilter, createDiscreteScaleGetAxisFilter, createGetAxisFilters } from \"./createAxisFilterMapper.js\";\nimport { createZoomLookup } from \"./createZoomLookup.js\";\nimport { isBandScaleConfig, isPointScaleConfig } from \"../../../../models/axis.js\";\nimport { selectorChartRawXAxis, selectorChartRawYAxis } from \"./useChartCartesianAxisLayout.selectors.js\";\nimport { selectorPreferStrictDomainInLineCharts } from \"../../corePlugins/useChartExperimentalFeature/index.js\";\nimport { getDefaultTickNumber, getTickNumber } from \"../../../ticks.js\";\nimport { getNormalizedAxisScale, getRange } from \"./getAxisScale.js\";\nimport { isOrdinalScale } from \"../../../scaleGuards.js\";\nimport { zoomScaleRange } from \"./zoom.js\";\nimport { getAxisExtrema } from \"./getAxisExtrema.js\";\nimport { calculateFinalDomain, calculateInitialDomainAndTickNumber } from \"./domain.js\";\nimport { Flatbush } from \"../../../Flatbush.js\";\nexport const createZoomMap = zoom => {\n const zoomItemMap = new Map();\n zoom.forEach(zoomItem => {\n zoomItemMap.set(zoomItem.axisId, zoomItem);\n });\n return zoomItemMap;\n};\nconst selectorChartZoomState = state => state.zoom;\nexport const selectorChartHasZoom = createSelector(selectorChartRawXAxis, selectorChartRawYAxis, (xAxes, yAxes) => xAxes?.some(axis => Boolean(axis.zoom)) || yAxes?.some(axis => Boolean(axis.zoom)) || false);\n\n/**\n * Following selectors are not exported because they exist in the MIT chart only to ba able to reuse the Zoom state from the pro.\n */\n\nexport const selectorChartZoomIsInteracting = createSelector(selectorChartZoomState, zoom => zoom?.isInteracting);\nexport const selectorChartZoomMap = createSelectorMemoized(selectorChartZoomState, function selectorChartZoomMap(zoom) {\n return zoom?.zoomData && createZoomMap(zoom?.zoomData);\n});\nexport const selectorChartAxisZoomData = createSelector(selectorChartZoomMap, (zoomMap, axisId) => zoomMap?.get(axisId));\nexport const selectorChartZoomOptionsLookup = createSelectorMemoized(selectorChartRawXAxis, selectorChartRawYAxis, function selectorChartZoomOptionsLookup(xAxis, yAxis) {\n return _extends({}, createZoomLookup('x')(xAxis), createZoomLookup('y')(yAxis));\n});\nexport const selectorChartAxisZoomOptionsLookup = createSelector(selectorChartZoomOptionsLookup, (axisLookup, axisId) => axisLookup[axisId]);\nexport const selectorDefaultXAxisTickNumber = createSelector(selectorChartDrawingArea, function selectorDefaultXAxisTickNumber(drawingArea) {\n return getDefaultTickNumber(drawingArea.width);\n});\nexport const selectorDefaultYAxisTickNumber = createSelector(selectorChartDrawingArea, function selectorDefaultYAxisTickNumber(drawingArea) {\n return getDefaultTickNumber(drawingArea.height);\n});\nexport const selectorChartXAxisWithDomains = createSelectorMemoized(selectorChartRawXAxis, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorPreferStrictDomainInLineCharts, selectorDefaultXAxisTickNumber, function selectorChartXAxisWithDomains(axes, formattedSeries, seriesConfig, preferStrictDomainInLineCharts, defaultTickNumber) {\n const axisDirection = 'x';\n const domains = {};\n axes?.forEach((eachAxis, axisIndex) => {\n const axis = eachAxis;\n if (isBandScaleConfig(axis) || isPointScaleConfig(axis)) {\n domains[axis.id] = {\n domain: axis.data\n };\n if (axis.ordinalTimeTicks !== undefined) {\n domains[axis.id].tickNumber = getTickNumber(axis, [axis.data?.find(d => d !== null), axis.data?.findLast(d => d !== null)], defaultTickNumber);\n }\n return;\n }\n const axisExtrema = getAxisExtrema(axis, axisDirection, seriesConfig, axisIndex, formattedSeries);\n domains[axis.id] = calculateInitialDomainAndTickNumber(axis, 'x', axisIndex, formattedSeries, axisExtrema, defaultTickNumber, preferStrictDomainInLineCharts);\n });\n return {\n axes,\n domains\n };\n});\nexport const selectorChartYAxisWithDomains = createSelectorMemoized(selectorChartRawYAxis, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorPreferStrictDomainInLineCharts, selectorDefaultYAxisTickNumber, function selectorChartYAxisWithDomains(axes, formattedSeries, seriesConfig, preferStrictDomainInLineCharts, defaultTickNumber) {\n const axisDirection = 'y';\n const domains = {};\n axes?.forEach((eachAxis, axisIndex) => {\n const axis = eachAxis;\n if (isBandScaleConfig(axis) || isPointScaleConfig(axis)) {\n domains[axis.id] = {\n domain: axis.data\n };\n if (axis.ordinalTimeTicks !== undefined) {\n domains[axis.id].tickNumber = getTickNumber(axis, [axis.data?.find(d => d !== null), axis.data?.findLast(d => d !== null)], defaultTickNumber);\n }\n return;\n }\n const axisExtrema = getAxisExtrema(axis, axisDirection, seriesConfig, axisIndex, formattedSeries);\n domains[axis.id] = calculateInitialDomainAndTickNumber(axis, 'y', axisIndex, formattedSeries, axisExtrema, defaultTickNumber, preferStrictDomainInLineCharts);\n });\n return {\n axes,\n domains\n };\n});\nexport const selectorChartZoomAxisFilters = createSelectorMemoized(selectorChartZoomMap, selectorChartZoomOptionsLookup, selectorChartXAxisWithDomains, selectorChartYAxisWithDomains, function selectorChartZoomAxisFilters(zoomMap, zoomOptions, {\n axes: xAxis,\n domains: xDomains\n}, {\n axes: yAxis,\n domains: yDomains\n}) {\n if (!zoomMap || !zoomOptions) {\n return undefined;\n }\n let hasFilter = false;\n const filters = {};\n const axes = [...(xAxis ?? []), ...(yAxis ?? [])];\n for (let i = 0; i < axes.length; i += 1) {\n const axis = axes[i];\n if (!zoomOptions[axis.id] || zoomOptions[axis.id].filterMode !== 'discard') {\n continue;\n }\n const zoom = zoomMap.get(axis.id);\n if (zoom === undefined || zoom.start <= 0 && zoom.end >= 100) {\n // No zoom, or zoom with all data visible\n continue;\n }\n const axisDirection = i < (xAxis?.length ?? 0) ? 'x' : 'y';\n if (axis.scaleType === 'band' || axis.scaleType === 'point') {\n filters[axis.id] = createDiscreteScaleGetAxisFilter(axis.data, zoom.start, zoom.end, axisDirection);\n } else {\n const {\n domain\n } = axisDirection === 'x' ? xDomains[axis.id] : yDomains[axis.id];\n filters[axis.id] = createContinuousScaleGetAxisFilter(\n // For continuous scales, the domain is always a two-value array.\n domain, zoom.start, zoom.end, axisDirection, axis.data);\n }\n hasFilter = true;\n }\n if (!hasFilter) {\n return undefined;\n }\n return createGetAxisFilters(filters);\n});\nexport const selectorChartFilteredXDomains = createSelectorMemoized(selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomMap, selectorChartZoomOptionsLookup, selectorChartZoomAxisFilters, selectorPreferStrictDomainInLineCharts, selectorChartXAxisWithDomains, function selectorChartFilteredXDomains(formattedSeries, seriesConfig, zoomMap, zoomOptions, getFilters, preferStrictDomainInLineCharts, {\n axes,\n domains\n}) {\n const filteredDomains = {};\n axes?.forEach((axis, axisIndex) => {\n const domain = domains[axis.id].domain;\n if (isBandScaleConfig(axis) || isPointScaleConfig(axis)) {\n filteredDomains[axis.id] = domain;\n return;\n }\n const zoom = zoomMap?.get(axis.id);\n const zoomOption = zoomOptions?.[axis.id];\n const filter = zoom === undefined && !zoomOption ? getFilters : undefined; // Do not apply filtering if zoom is already defined.\n\n if (!filter) {\n filteredDomains[axis.id] = domain;\n return;\n }\n const rawTickNumber = domains[axis.id].tickNumber;\n const axisExtrema = getAxisExtrema(axis, 'x', seriesConfig, axisIndex, formattedSeries, filter);\n filteredDomains[axis.id] = calculateFinalDomain(axis, 'x', axisIndex, formattedSeries, axisExtrema, rawTickNumber, preferStrictDomainInLineCharts);\n });\n return filteredDomains;\n});\nexport const selectorChartFilteredYDomains = createSelectorMemoized(selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomMap, selectorChartZoomOptionsLookup, selectorChartZoomAxisFilters, selectorPreferStrictDomainInLineCharts, selectorChartYAxisWithDomains, function selectorChartFilteredYDomains(formattedSeries, seriesConfig, zoomMap, zoomOptions, getFilters, preferStrictDomainInLineCharts, {\n axes,\n domains\n}) {\n const filteredDomains = {};\n axes?.forEach((axis, axisIndex) => {\n const domain = domains[axis.id].domain;\n if (isBandScaleConfig(axis) || isPointScaleConfig(axis)) {\n filteredDomains[axis.id] = domain;\n return;\n }\n const zoom = zoomMap?.get(axis.id);\n const zoomOption = zoomOptions?.[axis.id];\n const filter = zoom === undefined && !zoomOption ? getFilters : undefined; // Do not apply filtering if zoom is already defined.\n\n if (!filter) {\n filteredDomains[axis.id] = domain;\n return;\n }\n const rawTickNumber = domains[axis.id].tickNumber;\n const axisExtrema = getAxisExtrema(axis, 'y', seriesConfig, axisIndex, formattedSeries, filter);\n filteredDomains[axis.id] = calculateFinalDomain(axis, 'y', axisIndex, formattedSeries, axisExtrema, rawTickNumber, preferStrictDomainInLineCharts);\n });\n return filteredDomains;\n});\nexport const selectorChartNormalizedXScales = createSelectorMemoized(selectorChartRawXAxis, selectorChartFilteredXDomains, function selectorChartNormalizedXScales(axes, filteredDomains) {\n const scales = {};\n axes?.forEach(eachAxis => {\n const axis = eachAxis;\n const domain = filteredDomains[axis.id];\n scales[axis.id] = getNormalizedAxisScale(axis, domain);\n });\n return scales;\n});\nexport const selectorChartNormalizedYScales = createSelectorMemoized(selectorChartRawYAxis, selectorChartFilteredYDomains, function selectorChartNormalizedYScales(axes, filteredDomains) {\n const scales = {};\n axes?.forEach(eachAxis => {\n const axis = eachAxis;\n const domain = filteredDomains[axis.id];\n scales[axis.id] = getNormalizedAxisScale(axis, domain);\n });\n return scales;\n});\nexport const selectorChartXScales = createSelectorMemoized(selectorChartRawXAxis, selectorChartNormalizedXScales, selectorChartDrawingArea, selectorChartZoomMap, function selectorChartXScales(axes, normalizedScales, drawingArea, zoomMap) {\n const scales = {};\n axes?.forEach(eachAxis => {\n const axis = eachAxis;\n const zoom = zoomMap?.get(axis.id);\n const zoomRange = zoom ? [zoom.start, zoom.end] : [0, 100];\n const range = getRange(drawingArea, 'x', axis);\n const scale = normalizedScales[axis.id].copy();\n const zoomedRange = zoomScaleRange(range, zoomRange);\n scale.range(zoomedRange);\n scales[axis.id] = scale;\n });\n return scales;\n});\nexport const selectorChartYScales = createSelectorMemoized(selectorChartRawYAxis, selectorChartNormalizedYScales, selectorChartDrawingArea, selectorChartZoomMap, function selectorChartYScales(axes, normalizedScales, drawingArea, zoomMap) {\n const scales = {};\n axes?.forEach(eachAxis => {\n const axis = eachAxis;\n const zoom = zoomMap?.get(axis.id);\n const zoomRange = zoom ? [zoom.start, zoom.end] : [0, 100];\n const range = getRange(drawingArea, 'y', axis);\n const scale = normalizedScales[axis.id].copy();\n const scaleRange = isOrdinalScale(scale) ? range.reverse() : range;\n const zoomedRange = zoomScaleRange(scaleRange, zoomRange);\n scale.range(zoomedRange);\n scales[axis.id] = scale;\n });\n return scales;\n});\n\n/**\n * The only interesting selectors that merge axis data and zoom if provided.\n */\n\nexport const selectorChartXAxis = createSelectorMemoized(selectorChartDrawingArea, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomMap, selectorChartXAxisWithDomains, selectorChartXScales, function selectorChartXAxis(drawingArea, formattedSeries, seriesConfig, zoomMap, {\n axes,\n domains\n}, scales) {\n return computeAxisValue({\n scales,\n drawingArea,\n formattedSeries,\n axis: axes,\n seriesConfig,\n axisDirection: 'x',\n zoomMap,\n domains\n });\n});\nexport const selectorChartYAxis = createSelectorMemoized(selectorChartDrawingArea, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomMap, selectorChartYAxisWithDomains, selectorChartYScales, function selectorChartYAxis(drawingArea, formattedSeries, seriesConfig, zoomMap, {\n axes,\n domains\n}, scales) {\n return computeAxisValue({\n scales,\n drawingArea,\n formattedSeries,\n axis: axes,\n seriesConfig,\n axisDirection: 'y',\n zoomMap,\n domains\n });\n});\nexport const selectorChartAxis = createSelector(selectorChartXAxis, selectorChartYAxis, (xAxes, yAxes, axisId) => xAxes?.axis[axisId] ?? yAxes?.axis[axisId]);\nexport const selectorChartRawAxis = createSelector(selectorChartRawXAxis, selectorChartRawYAxis, (xAxes, yAxes, axisId) => {\n const axis = xAxes?.find(a => a.id === axisId) ?? yAxes?.find(a => a.id === axisId) ?? null;\n if (!axis) {\n return undefined;\n }\n return axis;\n});\nexport const selectorChartDefaultXAxisId = createSelector(selectorChartRawXAxis, xAxes => xAxes[0].id);\nexport const selectorChartDefaultYAxisId = createSelector(selectorChartRawYAxis, yAxes => yAxes[0].id);\nconst EMPTY_MAP = new Map();\nexport const selectorChartSeriesEmptyFlatbushMap = () => EMPTY_MAP;\nexport const selectorChartSeriesFlatbushMap = createSelectorMemoized(selectorChartSeriesProcessed, selectorChartNormalizedXScales, selectorChartNormalizedYScales, selectorChartDefaultXAxisId, selectorChartDefaultYAxisId, function selectChartSeriesFlatbushMap(allSeries, xAxesScaleMap, yAxesScaleMap, defaultXAxisId, defaultYAxisId) {\n // FIXME: Do we want to support non-scatter series here?\n const validSeries = allSeries.scatter;\n const flatbushMap = new Map();\n if (!validSeries) {\n return flatbushMap;\n }\n validSeries.seriesOrder.forEach(seriesId => {\n const {\n data,\n xAxisId = defaultXAxisId,\n yAxisId = defaultYAxisId\n } = validSeries.series[seriesId];\n const flatbush = new Flatbush(data.length);\n const originalXScale = xAxesScaleMap[xAxisId];\n const originalYScale = yAxesScaleMap[yAxisId];\n for (const datum of data) {\n // Add the points using a [0, 1] range so that we don't need to recreate the Flatbush structure when zooming.\n // This doesn't happen in practice, though, because currently the scales depend on the drawing area.\n flatbush.add(originalXScale(datum.x), originalYScale(datum.y));\n }\n flatbush.finish();\n flatbushMap.set(seriesId, flatbush);\n });\n return flatbushMap;\n});","import { isOrdinalScale } from \"../../../scaleGuards.js\";\nfunction getAsANumber(value) {\n return value instanceof Date ? value.getTime() : value;\n}\n\n/**\n * For a pointer coordinate, this function returns the dataIndex associated.\n * Returns `-1` if no dataIndex matches.\n */\nexport function getAxisIndex(axisConfig, pointerValue) {\n const {\n scale,\n data: axisData,\n reverse\n } = axisConfig;\n if (!isOrdinalScale(scale)) {\n const value = scale.invert(pointerValue);\n if (axisData === undefined) {\n return -1;\n }\n const valueAsNumber = getAsANumber(value);\n const closestIndex = axisData?.findIndex((pointValue, index) => {\n const v = getAsANumber(pointValue);\n if (v > valueAsNumber) {\n if (index === 0 || Math.abs(valueAsNumber - v) <= Math.abs(valueAsNumber - getAsANumber(axisData[index - 1]))) {\n return true;\n }\n }\n if (v <= valueAsNumber) {\n if (index === axisData.length - 1 || Math.abs(getAsANumber(value) - v) < Math.abs(getAsANumber(value) - getAsANumber(axisData[index + 1]))) {\n return true;\n }\n }\n return false;\n });\n return closestIndex;\n }\n const dataIndex = scale.bandwidth() === 0 ? Math.floor((pointerValue - Math.min(...scale.range()) + scale.step() / 2) / scale.step()) : Math.floor((pointerValue - Math.min(...scale.range())) / scale.step());\n if (dataIndex < 0 || dataIndex >= axisData.length) {\n return -1;\n }\n return reverse ? axisData.length - 1 - dataIndex : dataIndex;\n}\n\n/**\n * For a pointer coordinate, this function returns the value associated.\n * Returns `null` if the coordinate has no value associated.\n */\nexport function getAxisValue(scale, axisData, pointerValue, dataIndex) {\n if (!isOrdinalScale(scale)) {\n if (dataIndex === null) {\n const invertedValue = scale.invert(pointerValue);\n return Number.isNaN(invertedValue) ? null : invertedValue;\n }\n return axisData[dataIndex];\n }\n if (dataIndex === null || dataIndex < 0 || dataIndex >= axisData.length) {\n return null;\n }\n return axisData[dataIndex];\n}","/**\n * Transform mouse event position to coordinates inside the SVG.\n * @param svg The SVG element\n * @param event The mouseEvent to transform\n */\nexport function getSVGPoint(svg, event) {\n const pt = svg.createSVGPoint();\n pt.x = event.clientX;\n pt.y = event.clientY;\n return pt.matrixTransform(svg.getScreenCTM().inverse());\n}","import { createSelector } from '@mui/x-internals/store';\nconst selectInteraction = state => state.interaction;\nexport const selectorChartsInteractionIsInitialized = createSelector(selectInteraction, interaction => interaction !== undefined);\nexport const selectorChartsInteractionPointer = createSelector(selectInteraction, interaction => interaction?.pointer ?? null);\nexport const selectorChartsInteractionPointerX = createSelector(selectorChartsInteractionPointer, pointer => pointer && pointer.x);\nexport const selectorChartsInteractionPointerY = createSelector(selectorChartsInteractionPointer, pointer => pointer && pointer.y);\nexport const selectorChartsLastInteraction = createSelector(selectInteraction, interaction => interaction?.lastUpdate);","/**\n * Based on `fast-deep-equal`\n *\n * MIT License\n *\n * Copyright (c) 2017 Evgeny Poberezkin\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/**\n * Check if two values are deeply equal.\n */\n\nexport function isDeepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (a && b && typeof a === 'object' && typeof b === 'object') {\n if (a.constructor !== b.constructor) {\n return false;\n }\n if (Array.isArray(a)) {\n const length = a.length;\n if (length !== b.length) {\n return false;\n }\n for (let i = 0; i < length; i += 1) {\n if (!isDeepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n if (a instanceof Map && b instanceof Map) {\n if (a.size !== b.size) {\n return false;\n }\n const entriesA = Array.from(a.entries());\n for (let i = 0; i < entriesA.length; i += 1) {\n if (!b.has(entriesA[i][0])) {\n return false;\n }\n }\n for (let i = 0; i < entriesA.length; i += 1) {\n const entryA = entriesA[i];\n if (!isDeepEqual(entryA[1], b.get(entryA[0]))) {\n return false;\n }\n }\n return true;\n }\n if (a instanceof Set && b instanceof Set) {\n if (a.size !== b.size) {\n return false;\n }\n const entries = Array.from(a.entries());\n for (let i = 0; i < entries.length; i += 1) {\n if (!b.has(entries[i][0])) {\n return false;\n }\n }\n return true;\n }\n if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n const length = a.length;\n if (length !== b.length) {\n return false;\n }\n for (let i = 0; i < length; i += 1) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n }\n if (a.constructor === RegExp) {\n return a.source === b.source && a.flags === b.flags;\n }\n if (a.valueOf !== Object.prototype.valueOf) {\n return a.valueOf() === b.valueOf();\n }\n if (a.toString !== Object.prototype.toString) {\n return a.toString() === b.toString();\n }\n const keys = Object.keys(a);\n const length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (let i = 0; i < length; i += 1) {\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (let i = 0; i < length; i += 1) {\n const key = keys[i];\n if (!isDeepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n\n // true if both NaN, false otherwise\n // eslint-disable-next-line no-self-compare\n return a !== a && b !== b;\n}","import { isDeepEqual } from '@mui/x-internals/isDeepEqual';\nimport { createSelector, createSelectorMemoizedWithOptions } from '@mui/x-internals/store';\nimport { selectorChartsInteractionPointerX, selectorChartsInteractionPointerY } from \"../useChartInteraction/useChartInteraction.selectors.js\";\nimport { getAxisIndex, getAxisValue } from \"./getAxisValue.js\";\nimport { selectorChartXAxis, selectorChartYAxis } from \"./useChartCartesianAxisRendering.selectors.js\";\n\n/**\n * Get interaction indexes\n */\n\nfunction indexGetter(value, axes, ids = axes.axisIds[0]) {\n return Array.isArray(ids) ? ids.map(id => getAxisIndex(axes.axis[id], value)) : getAxisIndex(axes.axis[ids], value);\n}\nexport const selectChartsInteractionAxisIndex = (value, axes, id) => {\n if (value === null) {\n return null;\n }\n const index = indexGetter(value, axes, id);\n return index === -1 ? null : index;\n};\nexport const selectorChartsInteractionXAxisIndex = createSelector(selectorChartsInteractionPointerX, selectorChartXAxis, selectChartsInteractionAxisIndex);\nexport const selectorChartsInteractionYAxisIndex = createSelector(selectorChartsInteractionPointerY, selectorChartYAxis, selectChartsInteractionAxisIndex);\nexport const selectorChartAxisInteraction = createSelector(selectorChartsInteractionPointerX, selectorChartsInteractionPointerY, selectorChartXAxis, selectorChartYAxis, (x, y, xAxis, yAxis) => [...(x === null ? [] : xAxis.axisIds.map(axisId => ({\n axisId,\n dataIndex: indexGetter(x, xAxis, axisId)\n}))), ...(y === null ? [] : yAxis.axisIds.map(axisId => ({\n axisId,\n dataIndex: indexGetter(y, yAxis, axisId)\n})))].filter(item => item.dataIndex !== null && item.dataIndex >= 0));\n\n/**\n * Get interaction values\n */\n\nfunction valueGetter(value, axes, indexes, ids = axes.axisIds[0]) {\n return Array.isArray(ids) ? ids.map((id, axisIndex) => {\n const axis = axes.axis[id];\n return getAxisValue(axis.scale, axis.data, value, indexes[axisIndex]);\n }) : getAxisValue(axes.axis[ids].scale, axes.axis[ids].data, value, indexes);\n}\nexport const selectorChartsInteractionXAxisValue = createSelector(selectorChartsInteractionPointerX, selectorChartXAxis, selectorChartsInteractionXAxisIndex, (x, xAxes, xIndex, id) => {\n if (x === null || xAxes.axisIds.length === 0) {\n return null;\n }\n return valueGetter(x, xAxes, xIndex, id);\n});\nexport const selectorChartsInteractionYAxisValue = createSelector(selectorChartsInteractionPointerY, selectorChartYAxis, selectorChartsInteractionYAxisIndex, (y, yAxes, yIndex, id) => {\n if (y === null || yAxes.axisIds.length === 0) {\n return null;\n }\n return valueGetter(y, yAxes, yIndex, id);\n});\nconst EMPTY_ARRAY = [];\n\n/**\n * Get x-axis ids and corresponding data index that should be display in the tooltip.\n */\nexport const selectorChartsInteractionTooltipXAxes = createSelectorMemoizedWithOptions({\n memoizeOptions: {\n // Keep the same reference if array content is the same.\n // If possible, avoid this pattern by creating selectors that\n // uses string/number as arguments.\n resultEqualityCheck: isDeepEqual\n }\n})(selectorChartsInteractionPointerX, selectorChartXAxis, (value, axes) => {\n if (value === null) {\n return EMPTY_ARRAY;\n }\n return axes.axisIds.filter(id => axes.axis[id].triggerTooltip).map(axisId => ({\n axisId,\n dataIndex: getAxisIndex(axes.axis[axisId], value)\n })).filter(({\n dataIndex\n }) => dataIndex >= 0);\n});\n\n/**\n * Get y-axis ids and corresponding data index that should be display in the tooltip.\n */\nexport const selectorChartsInteractionTooltipYAxes = createSelectorMemoizedWithOptions({\n memoizeOptions: {\n // Keep the same reference if array content is the same.\n // If possible, avoid this pattern by creating selectors that\n // uses string/number as arguments.\n resultEqualityCheck: isDeepEqual\n }\n})(selectorChartsInteractionPointerY, selectorChartYAxis, (value, axes) => {\n if (value === null) {\n return EMPTY_ARRAY;\n }\n return axes.axisIds.filter(id => axes.axis[id].triggerTooltip).map(axisId => ({\n axisId,\n dataIndex: getAxisIndex(axes.axis[axisId], value)\n })).filter(({\n dataIndex\n }) => dataIndex >= 0);\n});\n\n/**\n * Return `true` if the axis tooltip has something to display.\n */\nexport const selectorChartsInteractionAxisTooltip = createSelector(selectorChartsInteractionTooltipXAxes, selectorChartsInteractionTooltipYAxes, (xTooltip, yTooltip) => xTooltip.length > 0 || yTooltip.length > 0);","export function checkHasInteractionPlugin(instance) {\n return instance.setPointerCoordinate !== undefined;\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { useStoreEffect } from '@mui/x-internals/store';\nimport { useAssertModelConsistency } from '@mui/x-internals/useAssertModelConsistency';\nimport { warnOnce } from '@mui/x-internals/warning';\nimport { rainbowSurgePalette } from \"../../../../colorPalettes/index.js\";\nimport { selectorChartDrawingArea } from \"../../corePlugins/useChartDimensions/useChartDimensions.selectors.js\";\nimport { selectorChartSeriesProcessed } from \"../../corePlugins/useChartSeries/useChartSeries.selectors.js\";\nimport { defaultizeXAxis, defaultizeYAxis } from \"./defaultizeAxis.js\";\nimport { selectorChartXAxis, selectorChartYAxis } from \"./useChartCartesianAxisRendering.selectors.js\";\nimport { getAxisIndex } from \"./getAxisValue.js\";\nimport { getSVGPoint } from \"../../../getSVGPoint.js\";\nimport { selectorChartsInteractionIsInitialized } from \"../useChartInteraction/index.js\";\nimport { selectorChartAxisInteraction } from \"./useChartCartesianInteraction.selectors.js\";\nimport { checkHasInteractionPlugin } from \"../useChartInteraction/checkHasInteractionPlugin.js\";\nconst AXIS_CLICK_SERIES_TYPES = new Set(['bar', 'rangeBar', 'line']);\nexport const useChartCartesianAxis = ({\n params,\n store,\n seriesConfig,\n svgRef,\n instance\n}) => {\n const {\n xAxis,\n yAxis,\n dataset,\n onHighlightedAxisChange\n } = params;\n if (process.env.NODE_ENV !== 'production') {\n const ids = [...(xAxis ?? []), ...(yAxis ?? [])].filter(axis => axis.id).map(axis => axis.id);\n const duplicates = new Set(ids.filter((id, index) => ids.indexOf(id) !== index));\n if (duplicates.size > 0) {\n warnOnce([`MUI X Charts: The following axis ids are duplicated: ${Array.from(duplicates).join(', ')}.`, `Please make sure that each axis has a unique id.`].join('\\n'), 'error');\n }\n }\n const drawingArea = store.use(selectorChartDrawingArea);\n const processedSeries = store.use(selectorChartSeriesProcessed);\n const isInteractionEnabled = store.use(selectorChartsInteractionIsInitialized);\n const {\n axis: xAxisWithScale,\n axisIds: xAxisIds\n } = store.use(selectorChartXAxis);\n const {\n axis: yAxisWithScale,\n axisIds: yAxisIds\n } = store.use(selectorChartYAxis);\n useAssertModelConsistency({\n warningPrefix: 'MUI X Charts',\n componentName: 'Chart',\n propName: 'highlightedAxis',\n controlled: params.highlightedAxis,\n defaultValue: undefined\n });\n useEnhancedEffect(() => {\n if (params.highlightedAxis !== undefined) {\n store.set('controlledCartesianAxisHighlight', params.highlightedAxis);\n }\n }, [store, params.highlightedAxis]);\n\n // The effect do not track any value defined synchronously during the 1st render by hooks called after `useChartCartesianAxis`\n // As a consequence, the state generated by the 1st run of this useEffect will always be equal to the initialization one\n const isFirstRender = React.useRef(true);\n React.useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n store.set('cartesianAxis', {\n x: defaultizeXAxis(xAxis, dataset),\n y: defaultizeYAxis(yAxis, dataset)\n });\n }, [seriesConfig, drawingArea, xAxis, yAxis, dataset, store]);\n const usedXAxis = xAxisIds[0];\n const usedYAxis = yAxisIds[0];\n useStoreEffect(store, selectorChartAxisInteraction, (prevAxisInteraction, nextAxisInteraction) => {\n if (!onHighlightedAxisChange) {\n return;\n }\n if (Object.is(prevAxisInteraction, nextAxisInteraction)) {\n return;\n }\n if (prevAxisInteraction.length !== nextAxisInteraction.length) {\n onHighlightedAxisChange(nextAxisInteraction);\n return;\n }\n if (prevAxisInteraction?.some(({\n axisId,\n dataIndex\n }, itemIndex) => nextAxisInteraction[itemIndex].axisId !== axisId || nextAxisInteraction[itemIndex].dataIndex !== dataIndex)) {\n onHighlightedAxisChange(nextAxisInteraction);\n }\n });\n const hasInteractionPlugin = checkHasInteractionPlugin(instance);\n React.useEffect(() => {\n const element = svgRef.current;\n if (!isInteractionEnabled || !hasInteractionPlugin || !element || params.disableAxisListener) {\n return () => {};\n }\n\n // Clean the interaction when the mouse leaves the chart.\n const moveEndHandler = instance.addInteractionListener('moveEnd', event => {\n if (!event.detail.activeGestures.pan) {\n instance.cleanInteraction();\n }\n });\n const panEndHandler = instance.addInteractionListener('panEnd', event => {\n if (!event.detail.activeGestures.move) {\n instance.cleanInteraction();\n }\n });\n const pressEndHandler = instance.addInteractionListener('quickPressEnd', event => {\n if (!event.detail.activeGestures.move && !event.detail.activeGestures.pan) {\n instance.cleanInteraction();\n }\n });\n const gestureHandler = event => {\n const srvEvent = event.detail.srcEvent;\n const target = event.detail.target;\n const svgPoint = getSVGPoint(element, srvEvent);\n\n // Release the pointer capture if we are panning, as this would cause the tooltip to\n // be locked to the first \"section\" it touches.\n if (event.detail.srcEvent.buttons >= 1 && target?.hasPointerCapture(event.detail.srcEvent.pointerId) && !target?.closest('[data-charts-zoom-slider]')) {\n target?.releasePointerCapture(event.detail.srcEvent.pointerId);\n }\n if (!instance.isPointInside(svgPoint.x, svgPoint.y, target)) {\n instance.cleanInteraction?.();\n return;\n }\n instance.setPointerCoordinate(svgPoint);\n };\n const moveHandler = instance.addInteractionListener('move', gestureHandler);\n const panHandler = instance.addInteractionListener('pan', gestureHandler);\n const pressHandler = instance.addInteractionListener('quickPress', gestureHandler);\n return () => {\n moveHandler.cleanup();\n moveEndHandler.cleanup();\n panHandler.cleanup();\n panEndHandler.cleanup();\n pressHandler.cleanup();\n pressEndHandler.cleanup();\n };\n }, [svgRef, store, xAxisWithScale, usedXAxis, yAxisWithScale, usedYAxis, instance, params.disableAxisListener, isInteractionEnabled, hasInteractionPlugin]);\n React.useEffect(() => {\n const element = svgRef.current;\n const onAxisClick = params.onAxisClick;\n if (element === null || !onAxisClick) {\n return () => {};\n }\n const axisClickHandler = instance.addInteractionListener('tap', event => {\n let dataIndex = null;\n let isXAxis = false;\n const svgPoint = getSVGPoint(element, event.detail.srcEvent);\n const xIndex = getAxisIndex(xAxisWithScale[usedXAxis], svgPoint.x);\n isXAxis = xIndex !== -1;\n dataIndex = isXAxis ? xIndex : getAxisIndex(yAxisWithScale[usedYAxis], svgPoint.y);\n const USED_AXIS_ID = isXAxis ? xAxisIds[0] : yAxisIds[0];\n if (dataIndex == null || dataIndex === -1) {\n return;\n }\n\n // The .data exist because otherwise the dataIndex would be null or -1.\n const axisValue = (isXAxis ? xAxisWithScale : yAxisWithScale)[USED_AXIS_ID].data[dataIndex];\n const seriesValues = {};\n Object.keys(processedSeries).filter(seriesType => AXIS_CLICK_SERIES_TYPES.has(seriesType)).forEach(seriesType => {\n // @ts-ignore\n const seriesTypeConfig = processedSeries[seriesType];\n seriesTypeConfig?.seriesOrder.forEach(seriesId => {\n const seriesItem = seriesTypeConfig.series[seriesId];\n const providedXAxisId = seriesItem.xAxisId;\n const providedYAxisId = seriesItem.yAxisId;\n const axisKey = isXAxis ? providedXAxisId : providedYAxisId;\n if (axisKey === undefined || axisKey === USED_AXIS_ID) {\n // @ts-ignore This is safe because users need to opt in to use range bar series.\n // In that case, they should import the module augmentation from `x-charts-pro/moduleAugmentation/rangeBarOnClick`\n // Which adds the proper type to the series data.\n // TODO(v9): Remove this ts-ignore when we can make the breaking change to ChartsAxisData.\n seriesValues[seriesId] = seriesItem.data[dataIndex];\n }\n });\n });\n onAxisClick(event.detail.srcEvent, {\n dataIndex,\n axisValue,\n seriesValues\n });\n });\n return () => {\n axisClickHandler.cleanup();\n };\n }, [params.onAxisClick, processedSeries, svgRef, xAxisWithScale, xAxisIds, yAxisWithScale, yAxisIds, usedXAxis, usedYAxis, instance]);\n return {};\n};\nuseChartCartesianAxis.params = {\n xAxis: true,\n yAxis: true,\n dataset: true,\n onAxisClick: true,\n disableAxisListener: true,\n onHighlightedAxisChange: true,\n highlightedAxis: true\n};\nuseChartCartesianAxis.getDefaultizedParams = ({\n params\n}) => {\n return _extends({}, params, {\n colors: params.colors ?? rainbowSurgePalette,\n theme: params.theme ?? 'light',\n defaultizedXAxis: defaultizeXAxis(params.xAxis, params.dataset),\n defaultizedYAxis: defaultizeYAxis(params.yAxis, params.dataset)\n });\n};\nuseChartCartesianAxis.getInitialState = params => _extends({\n cartesianAxis: {\n x: params.defaultizedXAxis,\n y: params.defaultizedYAxis\n }\n}, params.highlightedAxis === undefined ? {} : {\n controlledCartesianAxisHighlight: params.highlightedAxis\n});","const is = Object.is;\n\n/**\n * Fast shallow compare for objects.\n * @returns true if objects are equal.\n */\nexport function fastObjectShallowCompare(a, b) {\n if (a === b) {\n return true;\n }\n if (!(a instanceof Object) || !(b instanceof Object)) {\n return false;\n }\n let aLength = 0;\n let bLength = 0;\n\n /* eslint-disable guard-for-in */\n for (const key in a) {\n aLength += 1;\n if (!is(a[key], b[key])) {\n return false;\n }\n if (!(key in b)) {\n return false;\n }\n }\n\n /* eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unused-vars */\n for (const _ in b) {\n bLength += 1;\n }\n return aLength === bLength;\n}","import useEventCallback from '@mui/utils/useEventCallback';\nimport { fastObjectShallowCompare } from '@mui/x-internals/fastObjectShallowCompare';\nexport const useChartTooltip = ({\n store\n}) => {\n const removeTooltipItem = useEventCallback(function removeTooltipItem(itemToRemove) {\n const prevItem = store.state.tooltip.item;\n if (!itemToRemove) {\n // Remove without taking care of the current item\n if (prevItem !== null) {\n store.set('tooltip', {\n item: null\n });\n }\n return;\n }\n if (prevItem === null || !fastObjectShallowCompare(prevItem, itemToRemove)) {\n // The current item is already different from the one to remove. No need to clean it.\n return;\n }\n store.set('tooltip', {\n item: null\n });\n });\n const setTooltipItem = useEventCallback(function setTooltipItem(newItem) {\n if (!fastObjectShallowCompare(store.state.tooltip.item, newItem)) {\n store.set('tooltip', {\n item: newItem\n });\n }\n });\n return {\n instance: {\n setTooltipItem,\n removeTooltipItem\n }\n };\n};\nuseChartTooltip.getInitialState = () => ({\n tooltip: {\n item: null\n }\n});\nuseChartTooltip.params = {};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport useEventCallback from '@mui/utils/useEventCallback';\nexport const useChartInteraction = ({\n store\n}) => {\n const cleanInteraction = useEventCallback(function cleanInteraction() {\n store.update({\n interaction: _extends({}, store.state.interaction, {\n pointer: null\n })\n });\n });\n const setLastUpdateSource = useEventCallback(function setLastUpdateSource(interaction) {\n if (store.state.interaction.lastUpdate !== interaction) {\n store.set('interaction', _extends({}, store.state.interaction, {\n lastUpdate: interaction\n }));\n }\n });\n const setPointerCoordinate = useEventCallback(function setPointerCoordinate(coordinate) {\n store.set('interaction', _extends({}, store.state.interaction, {\n pointer: coordinate,\n lastUpdate: coordinate !== null ? 'pointer' : store.state.interaction.lastUpdate\n }));\n });\n return {\n instance: {\n cleanInteraction,\n setLastUpdateSource,\n setPointerCoordinate\n }\n };\n};\nuseChartInteraction.getInitialState = () => ({\n interaction: {\n item: null,\n pointer: null,\n lastUpdate: 'pointer'\n }\n});\nuseChartInteraction.params = {};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { getColorScale, getOrdinalColorScale } from \"../../../colorScale.js\";\nfunction addDefaultId(axisConfig, defaultId) {\n if (axisConfig.id !== undefined) {\n return axisConfig;\n }\n return _extends({\n id: defaultId\n }, axisConfig);\n}\nfunction processColorMap(axisConfig) {\n if (!axisConfig.colorMap) {\n return axisConfig;\n }\n return _extends({}, axisConfig, {\n colorScale: axisConfig.colorMap.type === 'ordinal' && axisConfig.data ? getOrdinalColorScale(_extends({\n values: axisConfig.data\n }, axisConfig.colorMap)) : getColorScale(axisConfig.colorMap.type === 'continuous' ? _extends({\n min: axisConfig.min,\n max: axisConfig.max\n }, axisConfig.colorMap) : axisConfig.colorMap)\n });\n}\nfunction getZAxisState(zAxis, dataset) {\n if (!zAxis || zAxis.length === 0) {\n return {\n axis: {},\n axisIds: []\n };\n }\n const zAxisLookup = {};\n const axisIds = [];\n zAxis.forEach((axisConfig, index) => {\n const dataKey = axisConfig.dataKey;\n const defaultizedId = axisConfig.id ?? `defaultized-z-axis-${index}`;\n if (dataKey === undefined || axisConfig.data !== undefined) {\n zAxisLookup[defaultizedId] = processColorMap(addDefaultId(axisConfig, defaultizedId));\n axisIds.push(defaultizedId);\n return;\n }\n if (dataset === undefined) {\n throw new Error('MUI X Charts: z-axis uses `dataKey` but no `dataset` is provided.');\n }\n zAxisLookup[defaultizedId] = processColorMap(addDefaultId(_extends({}, axisConfig, {\n data: dataset.map(d => d[dataKey])\n }), defaultizedId));\n axisIds.push(defaultizedId);\n });\n return {\n axis: zAxisLookup,\n axisIds\n };\n}\nexport const useChartZAxis = ({\n params,\n store\n}) => {\n const {\n zAxis,\n dataset\n } = params;\n\n // The effect do not track any value defined synchronously during the 1st render by hooks called after `useChartZAxis`\n // As a consequence, the state generated by the 1st run of this useEffect will always be equal to the initialization one\n const isFirstRender = React.useRef(true);\n React.useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n store.set('zAxis', getZAxisState(zAxis, dataset));\n }, [zAxis, dataset, store]);\n return {};\n};\nuseChartZAxis.params = {\n zAxis: true,\n dataset: true\n};\nuseChartZAxis.getInitialState = params => ({\n zAxis: getZAxisState(params.zAxis, params.dataset)\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { warnOnce } from '@mui/x-internals/warning';\nimport { useAssertModelConsistency } from '@mui/x-internals/useAssertModelConsistency';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { fastObjectShallowCompare } from '@mui/x-internals/fastObjectShallowCompare';\nexport const useChartHighlight = ({\n store,\n params\n}) => {\n useAssertModelConsistency({\n warningPrefix: 'MUI X Charts',\n componentName: 'Chart',\n propName: 'highlightedItem',\n controlled: params.highlightedItem,\n defaultValue: null\n });\n useEnhancedEffect(() => {\n if (store.state.highlight.item !== params.highlightedItem) {\n store.set('highlight', _extends({}, store.state.highlight, {\n item: params.highlightedItem\n }));\n }\n if (process.env.NODE_ENV !== 'production') {\n if (params.highlightedItem !== undefined && !store.state.highlight.isControlled) {\n warnOnce(['MUI X Charts: The `highlightedItem` switched between controlled and uncontrolled state.', 'To remove the highlight when using controlled state, you must provide `null` to the `highlightedItem` prop instead of `undefined`.'].join('\\n'));\n }\n }\n }, [store, params.highlightedItem]);\n const clearHighlight = useEventCallback(() => {\n params.onHighlightChange?.(null);\n const prevHighlight = store.state.highlight;\n if (prevHighlight.item === null || prevHighlight.isControlled) {\n return;\n }\n store.set('highlight', {\n item: null,\n lastUpdate: 'pointer',\n isControlled: false\n });\n });\n const setHighlight = useEventCallback(newItem => {\n const prevHighlight = store.state.highlight;\n if (fastObjectShallowCompare(prevHighlight.item, newItem)) {\n return;\n }\n params.onHighlightChange?.(newItem);\n if (prevHighlight.isControlled) {\n return;\n }\n store.set('highlight', {\n item: newItem,\n lastUpdate: 'pointer',\n isControlled: false\n });\n });\n return {\n instance: {\n clearHighlight,\n setHighlight\n }\n };\n};\nuseChartHighlight.getInitialState = params => ({\n highlight: {\n item: params.highlightedItem,\n lastUpdate: 'pointer',\n isControlled: params.highlightedItem !== undefined\n }\n});\nuseChartHighlight.params = {\n highlightedItem: true,\n onHighlightChange: true\n};","/**\n * Efficiently finds the minimum and maximum values in an array of numbers.\n * This functions helps preventing maximum call stack errors when dealing with large datasets.\n *\n * @param data The array of numbers to evaluate\n * @returns [min, max] as numbers\n */\nexport function findMinMax(data) {\n let min = Infinity;\n let max = -Infinity;\n for (const value of data ?? []) {\n if (value < min) {\n min = value;\n }\n if (value > max) {\n max = value;\n }\n }\n return [min, max];\n}","import { findMinMax } from \"../../../internals/findMinMax.js\";\nconst createResult = (data, direction) => {\n if (direction === 'x') {\n return {\n x: data,\n y: null\n };\n }\n return {\n x: null,\n y: data\n };\n};\nconst getBaseExtremum = params => {\n const {\n axis,\n getFilters,\n isDefaultAxis\n } = params;\n const filter = getFilters?.({\n currentAxisId: axis.id,\n isDefaultAxis\n });\n const data = filter ? axis.data?.filter((_, i) => filter({\n x: null,\n y: null\n }, i)) : axis.data;\n return findMinMax(data ?? []);\n};\nconst getValueExtremum = direction => params => {\n const {\n series,\n axis,\n getFilters,\n isDefaultAxis\n } = params;\n return Object.keys(series).filter(seriesId => {\n const axisId = direction === 'x' ? series[seriesId].xAxisId : series[seriesId].yAxisId;\n return axisId === axis.id || isDefaultAxis && axisId === undefined;\n }).reduce((acc, seriesId) => {\n const {\n stackedData\n } = series[seriesId];\n const filter = getFilters?.({\n currentAxisId: axis.id,\n isDefaultAxis,\n seriesXAxisId: series[seriesId].xAxisId,\n seriesYAxisId: series[seriesId].yAxisId\n });\n const [seriesMin, seriesMax] = stackedData?.reduce((seriesAcc, values, index) => {\n if (filter && (!filter(createResult(values[0], direction), index) || !filter(createResult(values[1], direction), index))) {\n return seriesAcc;\n }\n return [Math.min(...values, seriesAcc[0]), Math.max(...values, seriesAcc[1])];\n }, [Infinity, -Infinity]) ?? [Infinity, -Infinity];\n return [Math.min(seriesMin, acc[0]), Math.max(seriesMax, acc[1])];\n }, [Infinity, -Infinity]);\n};\nexport const getExtremumX = params => {\n // Notice that bar should be all horizontal or all vertical.\n // Don't think it's a problem for now\n const isHorizontal = Object.keys(params.series).some(seriesId => params.series[seriesId].layout === 'horizontal');\n if (isHorizontal) {\n return getValueExtremum('x')(params);\n }\n return getBaseExtremum(params);\n};\nexport const getExtremumY = params => {\n const isHorizontal = Object.keys(params.series).some(seriesId => params.series[seriesId].layout === 'horizontal');\n if (isHorizontal) {\n return getBaseExtremum(params);\n }\n return getValueExtremum('y')(params);\n};","export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","export default function(series, order) {\n if (!((n = series.length) > 1)) return;\n for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {\n s0 = s1, s1 = series[order[i]];\n for (j = 0; j < m; ++j) {\n s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];\n }\n }\n}\n","export default function(series) {\n var n = series.length, o = new Array(n);\n while (--n >= 0) o[n] = n;\n return o;\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport offsetNone from \"./offset/none.js\";\nimport orderNone from \"./order/none.js\";\n\nfunction stackValue(d, key) {\n return d[key];\n}\n\nfunction stackSeries(key) {\n const series = [];\n series.key = key;\n return series;\n}\n\nexport default function() {\n var keys = constant([]),\n order = orderNone,\n offset = offsetNone,\n value = stackValue;\n\n function stack(data) {\n var sz = Array.from(keys.apply(this, arguments), stackSeries),\n i, n = sz.length, j = -1,\n oz;\n\n for (const d of data) {\n for (i = 0, ++j; i < n; ++i) {\n (sz[i][j] = [0, +value(d, sz[i].key, j, data)]).data = d;\n }\n }\n\n for (i = 0, oz = array(order(sz)); i < n; ++i) {\n sz[oz[i]].index = i;\n }\n\n offset(sz, oz);\n return sz;\n }\n\n stack.keys = function(_) {\n return arguments.length ? (keys = typeof _ === \"function\" ? _ : constant(Array.from(_)), stack) : keys;\n };\n\n stack.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), stack) : value;\n };\n\n stack.order = function(_) {\n return arguments.length ? (order = _ == null ? orderNone : typeof _ === \"function\" ? _ : constant(Array.from(_)), stack) : order;\n };\n\n stack.offset = function(_) {\n return arguments.length ? (offset = _ == null ? offsetNone : _, stack) : offset;\n };\n\n return stack;\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n var peaks = series.map(peak);\n return none(series).sort(function(a, b) { return peaks[a] - peaks[b]; });\n}\n\nfunction peak(series) {\n var i = -1, j = 0, n = series.length, vi, vj = -Infinity;\n while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i;\n return j;\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n var sums = series.map(sum);\n return none(series).sort(function(a, b) { return sums[a] - sums[b]; });\n}\n\nexport function sum(series) {\n var s = 0, i = -1, n = series.length, v;\n while (++i < n) if (v = +series[i][1]) s += v;\n return s;\n}\n","import { stackOrderNone as d3StackOrderNone, stackOrderReverse as d3StackOrderReverse, stackOrderAppearance as d3OrderAppearance, stackOrderAscending as d3OrderAscending, stackOrderDescending as d3OrderDescending, stackOrderInsideOut as d3OrderInsideOut, stackOffsetExpand as d3StackOffsetExpand, stackOffsetNone as d3StackOffsetNone, stackOffsetSilhouette as d3StackOffsetSilhouette, stackOffsetWiggle as d3StackOffsetWiggle } from '@mui/x-charts-vendor/d3-shape';\nimport { offsetDiverging } from \"./offset/index.js\";\nexport const StackOrder = {\n /**\n * Series order such that the earliest series (according to the maximum value) is at the bottom.\n * */\n appearance: d3OrderAppearance,\n /**\n * Series order such that the smallest series (according to the sum of values) is at the bottom.\n * */\n ascending: d3OrderAscending,\n /**\n * Series order such that the largest series (according to the sum of values) is at the bottom.\n */\n descending: d3OrderDescending,\n /**\n * Series order such that the earliest series (according to the maximum value) are on the inside and the later series are on the outside. This order is recommended for streamgraphs in conjunction with the wiggle offset. See Stacked Graphs—Geometry & Aesthetics by Byron & Wattenberg for more information.\n */\n insideOut: d3OrderInsideOut,\n /**\n * Given series order [0, 1, … n - 1] where n is the number of elements in series. Thus, the stack order is given by the key accessor.\n */\n none: d3StackOrderNone,\n /**\n * Reverse of the given series order [n - 1, n - 2, … 0] where n is the number of elements in series. Thus, the stack order is given by the reverse of the key accessor.\n */\n reverse: d3StackOrderReverse\n};\nexport const StackOffset = {\n /**\n * Applies a zero baseline and normalizes the values for each point such that the topline is always one.\n * */\n expand: d3StackOffsetExpand,\n /**\n * Positive values are stacked above zero, negative values are stacked below zero, and zero values are stacked at zero.\n * */\n // @ts-expect-error, d3 types are wrong, our custom function implements the correct signature\n diverging: offsetDiverging,\n /**\n * Applies a zero baseline.\n * */\n none: d3StackOffsetNone,\n /**\n * Shifts the baseline down such that the center of the streamgraph is always at zero.\n * */\n silhouette: d3StackOffsetSilhouette,\n /**\n * Shifts the baseline so as to minimize the weighted wiggle of layers. This offset is recommended for streamgraphs in conjunction with the inside-out order. See Stacked Graphs—Geometry & Aesthetics by Bryon & Wattenberg for more information.\n * */\n wiggle: d3StackOffsetWiggle\n};\n\n/**\n * Takes a set of series and groups their ids\n * @param series the object of all bars series\n * @returns an array of groups, including the ids, the stacking order, and the stacking offset.\n */\nexport const getStackingGroups = params => {\n const {\n series,\n seriesOrder,\n defaultStrategy\n } = params;\n const stackingGroups = [];\n const stackIndex = {};\n seriesOrder.forEach(id => {\n const {\n stack,\n stackOrder,\n stackOffset\n } = series[id];\n if (stack === undefined) {\n stackingGroups.push({\n ids: [id],\n stackingOrder: StackOrder.none,\n stackingOffset: StackOffset.none\n });\n } else if (stackIndex[stack] === undefined) {\n stackIndex[stack] = stackingGroups.length;\n stackingGroups.push({\n ids: [id],\n stackingOrder: StackOrder[stackOrder ?? defaultStrategy?.stackOrder ?? 'none'],\n stackingOffset: StackOffset[stackOffset ?? defaultStrategy?.stackOffset ?? 'diverging']\n });\n } else {\n stackingGroups[stackIndex[stack]].ids.push(id);\n if (stackOrder !== undefined) {\n stackingGroups[stackIndex[stack]].stackingOrder = StackOrder[stackOrder];\n }\n if (stackOffset !== undefined) {\n stackingGroups[stackIndex[stack]].stackingOffset = StackOffset[stackOffset];\n }\n }\n });\n return stackingGroups;\n};","import ascending from \"./ascending.js\";\n\nexport default function(series) {\n return ascending(series).reverse();\n}\n","import appearance from \"./appearance.js\";\nimport {sum} from \"./ascending.js\";\n\nexport default function(series) {\n var n = series.length,\n i,\n j,\n sums = series.map(sum),\n order = appearance(series),\n top = 0,\n bottom = 0,\n tops = [],\n bottoms = [];\n\n for (i = 0; i < n; ++i) {\n j = order[i];\n if (top < bottom) {\n top += sums[j];\n tops.push(j);\n } else {\n bottom += sums[j];\n bottoms.push(j);\n }\n }\n\n return bottoms.reverse().concat(tops);\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n return none(series).reverse();\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {\n for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0;\n if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y;\n }\n none(series, order);\n}\n","// Adapted from D3.js's offsetDiverging function https://github.com/d3/d3-shape/blob/main/src/offset/diverging.js\n// Hidden series (with all zero values) affect the stacking in a different way in our implementation compared to the D3 behavior.\n// The D3 stacking keep those values at the 0 \"line\", which creates issues when animating between hidden and visible states.\n// In our modification, we stack them on top/below already stacked items according to the sign of their original value.\n// A hidden negative value will be placed below all the already stacked negative values\n\n/**\n * Positive values are stacked above zero, while negative values are stacked below zero.\n *\n * @param series A series generated by a stack generator.\n * @param order An array of numeric indexes representing the stack order.\n */\nexport function offsetDiverging(series, order) {\n if (series.length === 0) {\n return;\n }\n const seriesCount = series.length;\n const numericOrder = order;\n const pointCount = series[numericOrder[0]].length;\n for (let pointIndex = 0; pointIndex < pointCount; pointIndex += 1) {\n let positiveSum = 0;\n let negativeSum = 0;\n for (let seriesIndex = 0; seriesIndex < seriesCount; seriesIndex += 1) {\n const currentSeries = series[numericOrder[seriesIndex]];\n const dataPoint = currentSeries[pointIndex];\n const difference = dataPoint[1] - dataPoint[0];\n if (difference > 0) {\n dataPoint[0] = positiveSum;\n positiveSum += difference;\n dataPoint[1] = positiveSum;\n } else if (difference < 0) {\n dataPoint[1] = negativeSum;\n negativeSum += difference;\n dataPoint[0] = negativeSum;\n } else if (dataPoint.data[currentSeries.key] > 0) {\n dataPoint[0] = positiveSum;\n dataPoint[1] = positiveSum;\n } else if (dataPoint.data[currentSeries.key] < 0) {\n dataPoint[1] = negativeSum;\n dataPoint[0] = negativeSum;\n } else {\n dataPoint[0] = 0;\n dataPoint[1] = 0;\n }\n }\n }\n}","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {\n for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0;\n s0[j][1] += s0[j][0] = -y / 2;\n }\n none(series, order);\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;\n for (var y = 0, j = 1, s0, m, n; j < m; ++j) {\n for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {\n var si = series[order[i]],\n sij0 = si[j][1] || 0,\n sij1 = si[j - 1][1] || 0,\n s3 = (sij0 - sij1) / 2;\n for (var k = 0; k < i; ++k) {\n var sk = series[order[k]],\n skj0 = sk[j][1] || 0,\n skj1 = sk[j - 1][1] || 0;\n s3 += skj0 - skj1;\n }\n s1 += sij0, s2 += s3 * sij0;\n }\n s0[j - 1][1] += s0[j - 1][0] = y;\n if (s1) y -= s2 / s1;\n }\n s0[j - 1][1] += s0[j - 1][0] = y;\n none(series, order);\n}\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { stack as d3Stack } from '@mui/x-charts-vendor/d3-shape';\nimport { warnOnce } from '@mui/x-internals/warning';\nimport { getStackingGroups } from \"../../../internals/stacking/index.js\";\nconst barValueFormatter = v => v == null ? '' : v.toLocaleString();\nconst seriesProcessor = (params, dataset) => {\n const {\n seriesOrder,\n series\n } = params;\n const stackingGroups = getStackingGroups(params);\n\n // Create a data set with format adapted to d3\n const d3Dataset = dataset ?? [];\n seriesOrder.forEach(id => {\n const data = series[id].data;\n if (data !== undefined) {\n data.forEach((value, index) => {\n if (d3Dataset.length <= index) {\n d3Dataset.push({\n [id]: value\n });\n } else {\n d3Dataset[index][id] = value;\n }\n });\n } else if (dataset === undefined) {\n throw new Error([`MUI X Charts: bar series with id='${id}' has no data.`, 'Either provide a data property to the series or use the dataset prop.'].join('\\n'));\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!data && dataset) {\n const dataKey = series[id].dataKey;\n if (!dataKey) {\n throw new Error([`MUI X Charts: bar series with id='${id}' has no data and no dataKey.`, 'You must provide a dataKey when using the dataset prop.'].join('\\n'));\n }\n dataset.forEach((entry, index) => {\n const value = entry[dataKey];\n if (value != null && typeof value !== 'number') {\n warnOnce([`MUI X Charts: your dataset key \"${dataKey}\" is used for plotting bars, but the dataset contains the non-null non-numerical element \"${value}\" at index ${index}.`, 'Bar plots only support numeric and null values.'].join('\\n'));\n }\n });\n }\n }\n });\n const completedSeries = {};\n stackingGroups.forEach(stackingGroup => {\n const {\n ids,\n stackingOffset,\n stackingOrder\n } = stackingGroup;\n // Get stacked values, and derive the domain\n const stackedSeries = d3Stack().keys(ids.map(id => {\n // Use dataKey if needed and available\n const dataKey = series[id].dataKey;\n return series[id].data === undefined && dataKey !== undefined ? dataKey : id;\n })).value((d, key) => d[key] ?? 0) // defaultize null value to 0\n .order(stackingOrder).offset(stackingOffset)(d3Dataset);\n ids.forEach((id, index) => {\n const dataKey = series[id].dataKey;\n completedSeries[id] = _extends({\n layout: 'vertical',\n labelMarkType: 'square',\n minBarSize: 0,\n valueFormatter: series[id].valueFormatter ?? barValueFormatter\n }, series[id], {\n data: dataKey ? dataset.map(data => {\n const value = data[dataKey];\n return typeof value === 'number' ? value : null;\n }) : series[id].data,\n stackedData: stackedSeries[index].map(([a, b]) => [a, b])\n });\n });\n });\n return {\n seriesOrder,\n stackingGroups,\n series: completedSeries\n };\n};\nexport default seriesProcessor;","export function getLabel(value, location) {\n return typeof value === 'function' ? value(location) : value;\n}","export function getSeriesColorFn(series) {\n return series.colorGetter ? series.colorGetter : () => series.color;\n}","import { getSeriesColorFn } from \"../../../internals/getSeriesColorFn.js\";\nconst getColor = (series, xAxis, yAxis) => {\n const verticalLayout = series.layout === 'vertical';\n const bandColorScale = verticalLayout ? xAxis?.colorScale : yAxis?.colorScale;\n const valueColorScale = verticalLayout ? yAxis?.colorScale : xAxis?.colorScale;\n const bandValues = verticalLayout ? xAxis?.data : yAxis?.data;\n const getSeriesColor = getSeriesColorFn(series);\n if (valueColorScale) {\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = series.data[dataIndex];\n const color = value === null ? getSeriesColor({\n value,\n dataIndex\n }) : valueColorScale(value);\n if (color === null) {\n return getSeriesColor({\n value,\n dataIndex\n });\n }\n return color;\n };\n }\n if (bandColorScale && bandValues) {\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = bandValues[dataIndex];\n const color = value === null ? getSeriesColor({\n value,\n dataIndex\n }) : bandColorScale(value);\n if (color === null) {\n return getSeriesColor({\n value,\n dataIndex\n });\n }\n return color;\n };\n }\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = series.data[dataIndex];\n return getSeriesColor({\n value,\n dataIndex\n });\n };\n};\nexport default getColor;","export function getNonEmptySeriesArray(series, availableSeriesTypes) {\n return Object.keys(series).filter(type => availableSeriesTypes.has(type)).flatMap(type => {\n const seriesOfType = series[type];\n return seriesOfType.seriesOrder.filter(seriesId => seriesOfType.series[seriesId].data.length > 0 && seriesOfType.series[seriesId].data.some(value => value != null)).map(seriesId => ({\n type,\n seriesId\n }));\n });\n}","import { getNonEmptySeriesArray } from \"./getNonEmptySeriesArray.js\";\n\n/**\n * Returns the previous series type and id that contains some data.\n * Returns `null` if no other series have data.\n */\nexport function getPreviousNonEmptySeries(series, availableSeriesTypes, type, seriesId) {\n const nonEmptySeries = getNonEmptySeriesArray(series, availableSeriesTypes);\n if (nonEmptySeries.length === 0) {\n return null;\n }\n const currentSeriesIndex = type !== undefined && seriesId !== undefined ? nonEmptySeries.findIndex(seriesItem => seriesItem.type === type && seriesItem.seriesId === seriesId) : -1;\n if (currentSeriesIndex <= 0) {\n // If no current series, or if it's the first series\n return nonEmptySeries[nonEmptySeries.length - 1];\n }\n return nonEmptySeries[(currentSeriesIndex - 1 + nonEmptySeries.length) % nonEmptySeries.length];\n}","export function getMaxSeriesLength(series, availableSeriesTypes) {\n return Object.keys(series).filter(type => availableSeriesTypes.has(type)).flatMap(type => {\n const seriesOfType = series[type];\n return seriesOfType.seriesOrder.filter(seriesId => seriesOfType.series[seriesId].data.length > 0 && seriesOfType.series[seriesId].data.some(value => value != null)).map(seriesId => seriesOfType.series[seriesId].data.length);\n }).reduce((maxLengths, length) => Math.max(maxLengths, length), 0);\n}","import { getNonEmptySeriesArray } from \"./getNonEmptySeriesArray.js\";\n\n/**\n * Returns the next series type and id that contains some data.\n * Returns `null` if no other series have data.\n * @param series - The processed series from the store.\n * @param availableSeriesTypes - The set of series types that can be focused.\n * @param type - The current series type.\n * @param seriesId - The current series id.\n */\nexport function getNextNonEmptySeries(series, availableSeriesTypes, type, seriesId) {\n const nonEmptySeries = getNonEmptySeriesArray(series, availableSeriesTypes);\n if (nonEmptySeries.length === 0) {\n return null;\n }\n const currentSeriesIndex = type !== undefined && seriesId !== undefined ? nonEmptySeries.findIndex(seriesItem => seriesItem.type === type && seriesItem.seriesId === seriesId) : -1;\n return nonEmptySeries[(currentSeriesIndex + 1) % nonEmptySeries.length];\n}","export function seriesHasData(series, type, seriesId) {\n // @ts-ignore sankey is not in MIT version\n if (type === 'sankey') {\n return false;\n }\n const data = series[type]?.series[seriesId]?.data;\n return data != null && data.length > 0;\n}","import { getPreviousNonEmptySeries } from \"./plugins/featurePlugins/useChartKeyboardNavigation/utils/getPreviousNonEmptySeries.js\";\nimport { getMaxSeriesLength } from \"./plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength.js\";\nimport { selectorChartSeriesProcessed } from \"./plugins/corePlugins/useChartSeries/index.js\";\nimport { getNextNonEmptySeries } from \"./plugins/featurePlugins/useChartKeyboardNavigation/utils/getNextNonEmptySeries.js\";\nimport { seriesHasData } from \"./seriesHasData.js\";\nexport function createGetNextIndexFocusedItem(compatibleSeriesTypes) {\n return function getNextIndexFocusedItem(currentItem, state) {\n const processedSeries = selectorChartSeriesProcessed(state);\n let seriesId = currentItem?.seriesId;\n let type = currentItem?.type;\n if (!type || seriesId == null || !seriesHasData(processedSeries, type, seriesId)) {\n const nextSeries = getNextNonEmptySeries(processedSeries, compatibleSeriesTypes, type, seriesId);\n if (nextSeries === null) {\n return null;\n }\n type = nextSeries.type;\n seriesId = nextSeries.seriesId;\n }\n const maxLength = getMaxSeriesLength(processedSeries, compatibleSeriesTypes);\n const dataIndex = Math.min(maxLength - 1, currentItem?.dataIndex == null ? 0 : currentItem.dataIndex + 1);\n return {\n type,\n seriesId,\n dataIndex\n };\n };\n}\nexport function createGetPreviousIndexFocusedItem(compatibleSeriesTypes) {\n return function getPreviousIndexFocusedItem(currentItem, state) {\n const processedSeries = selectorChartSeriesProcessed(state);\n let seriesId = currentItem?.seriesId;\n let type = currentItem?.type;\n if (!type || seriesId == null || !seriesHasData(processedSeries, type, seriesId)) {\n const previousSeries = getPreviousNonEmptySeries(processedSeries, compatibleSeriesTypes, type, seriesId);\n if (previousSeries === null) {\n return null;\n }\n type = previousSeries.type;\n seriesId = previousSeries.seriesId;\n }\n const maxLength = getMaxSeriesLength(processedSeries, compatibleSeriesTypes);\n const dataIndex = Math.max(0, currentItem?.dataIndex == null ? maxLength - 1 : currentItem.dataIndex - 1);\n return {\n type,\n seriesId,\n dataIndex\n };\n };\n}\nexport function createGetNextSeriesFocusedItem(compatibleSeriesTypes) {\n return function getNextSeriesFocusedItem(currentItem, state) {\n const processedSeries = selectorChartSeriesProcessed(state);\n let seriesId = currentItem?.seriesId;\n let type = currentItem?.type;\n const nextSeries = getNextNonEmptySeries(processedSeries, compatibleSeriesTypes, type, seriesId);\n if (nextSeries === null) {\n return null; // No series to move the focus to.\n }\n type = nextSeries.type;\n seriesId = nextSeries.seriesId;\n const dataIndex = currentItem?.dataIndex == null ? 0 : currentItem.dataIndex;\n return {\n type,\n seriesId,\n dataIndex\n };\n };\n}\nexport function createGetPreviousSeriesFocusedItem(compatibleSeriesTypes) {\n return function getPreviousSeriesFocusedItem(currentItem, state) {\n const processedSeries = selectorChartSeriesProcessed(state);\n let seriesId = currentItem?.seriesId;\n let type = currentItem?.type;\n const previousSeries = getPreviousNonEmptySeries(processedSeries, compatibleSeriesTypes, type, seriesId);\n if (previousSeries === null) {\n return null; // No series to move the focus to.\n }\n type = previousSeries.type;\n seriesId = previousSeries.seriesId;\n const data = processedSeries[type].series[seriesId].data;\n const dataIndex = currentItem?.dataIndex == null ? data.length - 1 : currentItem.dataIndex;\n return {\n type,\n seriesId,\n dataIndex\n };\n };\n}","import { createGetNextIndexFocusedItem, createGetPreviousIndexFocusedItem, createGetNextSeriesFocusedItem, createGetPreviousSeriesFocusedItem } from \"../../../internals/commonNextFocusItem.js\";\nconst outSeriesTypes = new Set(['bar', 'line', 'scatter']);\nconst keyboardFocusHandler = event => {\n switch (event.key) {\n case 'ArrowRight':\n return createGetNextIndexFocusedItem(outSeriesTypes);\n case 'ArrowLeft':\n return createGetPreviousIndexFocusedItem(outSeriesTypes);\n case 'ArrowDown':\n return createGetPreviousSeriesFocusedItem(outSeriesTypes);\n case 'ArrowUp':\n return createGetNextSeriesFocusedItem(outSeriesTypes);\n default:\n return null;\n }\n};\nexport default keyboardFocusHandler;","/**\n * Solution of the equations\n * W = barWidth * N + offset * (N-1)\n * offset / (offset + barWidth) = r\n * @param bandWidth (W) The width available to place bars.\n * @param groupCount (N) The number of bars to place in that space.\n * @param gapRatio (r) The ratio of the gap between bars over the bar width.\n * @returns The bar width and the offset between bars.\n */\nexport function getBandSize(bandWidth, groupCount, gapRatio) {\n if (gapRatio === 0) {\n return {\n barWidth: bandWidth / groupCount,\n offset: 0\n };\n }\n const barWidth = bandWidth / (groupCount + (groupCount - 1) * gapRatio);\n const offset = gapRatio * barWidth;\n return {\n barWidth,\n offset\n };\n}","import { getBandSize } from \"./getBandSize.js\";\nfunction shouldInvertStartCoordinate(verticalLayout, baseValue, reverse) {\n const isVerticalAndPositive = verticalLayout && baseValue > 0;\n const isHorizontalAndNegative = !verticalLayout && baseValue < 0;\n const invertStartCoordinate = isVerticalAndPositive || isHorizontalAndNegative;\n return reverse ? !invertStartCoordinate : invertStartCoordinate;\n}\nexport function getBarDimensions(params) {\n const {\n verticalLayout,\n xAxisConfig,\n yAxisConfig,\n series,\n dataIndex,\n numberOfGroups,\n groupIndex\n } = params;\n const baseScaleConfig = verticalLayout ? xAxisConfig : yAxisConfig;\n const reverse = (verticalLayout ? yAxisConfig.reverse : xAxisConfig.reverse) ?? false;\n const {\n barWidth,\n offset\n } = getBandSize(baseScaleConfig.scale.bandwidth(), numberOfGroups, baseScaleConfig.barGapRatio);\n const barOffset = groupIndex * (barWidth + offset);\n const xScale = xAxisConfig.scale;\n const yScale = yAxisConfig.scale;\n const baseValue = baseScaleConfig.data[dataIndex];\n const seriesValue = series.data[dataIndex];\n if (seriesValue == null) {\n return null;\n }\n const values = series.stackedData[dataIndex];\n const valueCoordinates = values.map(v => verticalLayout ? yScale(v) : xScale(v));\n const minValueCoord = Math.round(Math.min(...valueCoordinates));\n const maxValueCoord = Math.round(Math.max(...valueCoordinates));\n const barSize = seriesValue === 0 ? 0 : Math.max(series.minBarSize, maxValueCoord - minValueCoord);\n const startCoordinate = shouldInvertStartCoordinate(verticalLayout, seriesValue, reverse) ? maxValueCoord - barSize : minValueCoord;\n return {\n x: verticalLayout ? xScale(baseValue) + barOffset : startCoordinate,\n y: verticalLayout ? startCoordinate : yScale(baseValue) + barOffset,\n height: verticalLayout ? barSize : barWidth,\n width: verticalLayout ? barWidth : barSize\n };\n}","import { getBarDimensions } from \"../../../internals/getBarDimensions.js\";\nconst tooltipItemPositionGetter = params => {\n const {\n series,\n identifier,\n axesConfig,\n placement\n } = params;\n if (!identifier || identifier.dataIndex === undefined) {\n return null;\n }\n const itemSeries = series.bar?.series[identifier.seriesId];\n if (series.bar == null || itemSeries == null) {\n return null;\n }\n if (axesConfig.x === undefined || axesConfig.y === undefined) {\n return null;\n }\n const dimensions = getBarDimensions({\n verticalLayout: itemSeries.layout === 'vertical',\n xAxisConfig: axesConfig.x,\n yAxisConfig: axesConfig.y,\n series: itemSeries,\n dataIndex: identifier.dataIndex,\n numberOfGroups: series.bar.stackingGroups.length,\n groupIndex: series.bar.stackingGroups.findIndex(group => group.ids.includes(itemSeries.id))\n });\n if (dimensions == null) {\n return null;\n }\n const {\n x,\n y,\n width,\n height\n } = dimensions;\n switch (placement) {\n case 'right':\n return {\n x: x + width,\n y: y + height / 2\n };\n case 'bottom':\n return {\n x: x + width / 2,\n y: y + height\n };\n case 'left':\n return {\n x,\n y: y + height / 2\n };\n case 'top':\n default:\n return {\n x: x + width / 2,\n y\n };\n }\n};\nexport default tooltipItemPositionGetter;","export const typeSerializer = type => `Type(${type})`;\nexport const seriesIdSerializer = id => `Series(${id})`;\nexport const dataIndexSerializer = dataIndex => dataIndex === undefined ? '' : `Index(${dataIndex})`;\nexport const identifierSerializerSeriesIdDataIndex = identifier => {\n return `${typeSerializer(identifier.type)}${seriesIdSerializer(identifier.seriesId)}${dataIndexSerializer(identifier.dataIndex)}`;\n};","import { getExtremumX, getExtremumY } from \"./bar/extremums.js\";\nimport seriesProcessor from \"./bar/seriesProcessor.js\";\nimport legendGetter from \"./bar/legend.js\";\nimport getColor from \"./bar/getColor.js\";\nimport keyboardFocusHandler from \"./bar/keyboardFocusHandler.js\";\nimport tooltipGetter, { axisTooltipGetter } from \"./bar/tooltip.js\";\nimport tooltipItemPositionGetter from \"./bar/tooltipPosition.js\";\nimport { getSeriesWithDefaultValues } from \"./bar/getSeriesWithDefaultValues.js\";\nimport { identifierSerializerSeriesIdDataIndex } from \"../../internals/identifierSerializer.js\";\nexport const barSeriesConfig = {\n seriesProcessor,\n colorProcessor: getColor,\n legendGetter,\n tooltipGetter,\n tooltipItemPositionGetter,\n axisTooltipGetter,\n xExtremumGetter: getExtremumX,\n yExtremumGetter: getExtremumY,\n getSeriesWithDefaultValues,\n keyboardFocusHandler,\n identifierSerializer: identifierSerializerSeriesIdDataIndex\n};","import { getLabel } from \"../../../internals/getLabel.js\";\nconst legendGetter = params => {\n const {\n seriesOrder,\n series\n } = params;\n return seriesOrder.reduce((acc, seriesId) => {\n const formattedLabel = getLabel(series[seriesId].label, 'legend');\n if (formattedLabel === undefined) {\n return acc;\n }\n acc.push({\n type: 'bar',\n markType: series[seriesId].labelMarkType,\n id: seriesId,\n seriesId,\n color: series[seriesId].color,\n label: formattedLabel\n });\n return acc;\n }, []);\n};\nexport default legendGetter;","import { getLabel } from \"../../../internals/getLabel.js\";\nconst tooltipGetter = params => {\n const {\n series,\n getColor,\n identifier\n } = params;\n if (!identifier || identifier.dataIndex === undefined) {\n return null;\n }\n const label = getLabel(series.label, 'tooltip');\n const value = series.data[identifier.dataIndex];\n if (value == null) {\n return null;\n }\n const formattedValue = series.valueFormatter(value, {\n dataIndex: identifier.dataIndex\n });\n return {\n identifier,\n color: getColor(identifier.dataIndex),\n label,\n value,\n formattedValue,\n markType: series.labelMarkType\n };\n};\nexport const axisTooltipGetter = series => {\n return Object.values(series).map(s => s.layout === 'horizontal' ? {\n direction: 'y',\n axisId: s.yAxisId\n } : {\n direction: 'x',\n axisId: s.xAxisId\n });\n};\nexport default tooltipGetter;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport function getSeriesWithDefaultValues(seriesData, seriesIndex, colors) {\n return _extends({}, seriesData, {\n id: seriesData.id ?? `auto-generated-id-${seriesIndex}`,\n color: seriesData.color ?? colors[seriesIndex % colors.length]\n });\n}","import { createGetNextIndexFocusedItem, createGetPreviousIndexFocusedItem, createGetNextSeriesFocusedItem, createGetPreviousSeriesFocusedItem } from \"../../internals/commonNextFocusItem.js\";\nconst outSeriesTypes = new Set(['bar', 'line', 'scatter']);\nconst keyboardFocusHandler = event => {\n switch (event.key) {\n case 'ArrowRight':\n return createGetNextIndexFocusedItem(outSeriesTypes);\n case 'ArrowLeft':\n return createGetPreviousIndexFocusedItem(outSeriesTypes);\n case 'ArrowDown':\n return createGetPreviousSeriesFocusedItem(outSeriesTypes);\n case 'ArrowUp':\n return createGetNextSeriesFocusedItem(outSeriesTypes);\n default:\n return null;\n }\n};\nexport default keyboardFocusHandler;","import { getExtremumX, getExtremumY } from \"./extremums.js\";\nimport seriesProcessor from \"./seriesProcessor.js\";\nimport getColor from \"./getColor.js\";\nimport legendGetter from \"./legend.js\";\nimport tooltipGetter from \"./tooltip.js\";\nimport getSeriesWithDefaultValues from \"./getSeriesWithDefaultValues.js\";\nimport tooltipItemPositionGetter from \"./tooltipPosition.js\";\nimport keyboardFocusHandler from \"./keyboardFocusHandler.js\";\nimport { identifierSerializerSeriesIdDataIndex } from \"../../internals/identifierSerializer.js\";\nexport const scatterSeriesConfig = {\n seriesProcessor,\n colorProcessor: getColor,\n legendGetter,\n tooltipGetter,\n tooltipItemPositionGetter,\n xExtremumGetter: getExtremumX,\n yExtremumGetter: getExtremumY,\n getSeriesWithDefaultValues,\n keyboardFocusHandler,\n identifierSerializer: identifierSerializerSeriesIdDataIndex\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nconst seriesProcessor = ({\n series,\n seriesOrder\n}, dataset) => {\n const completeSeries = Object.fromEntries(Object.entries(series).map(([seriesId, seriesData]) => {\n const datasetKeys = seriesData?.datasetKeys;\n const missingKeys = ['x', 'y'].filter(key => typeof datasetKeys?.[key] !== 'string');\n if (seriesData?.datasetKeys && missingKeys.length > 0) {\n throw new Error([`MUI X Charts: scatter series with id='${seriesId}' has incomplete datasetKeys.`, `Properties ${missingKeys.map(key => `\"${key}\"`).join(', ')} are missing.`].join('\\n'));\n }\n const data = !datasetKeys ? seriesData.data ?? [] : dataset?.map(d => {\n return {\n x: d[datasetKeys.x] ?? null,\n y: d[datasetKeys.y] ?? null,\n z: datasetKeys.z && d[datasetKeys.z],\n id: datasetKeys.id && d[datasetKeys.id]\n };\n }) ?? [];\n return [seriesId, _extends({\n labelMarkType: 'circle',\n markerSize: 4\n }, seriesData, {\n preview: _extends({\n markerSize: 1\n }, seriesData?.preview),\n data,\n valueFormatter: seriesData.valueFormatter ?? (v => v && `(${v.x}, ${v.y})`)\n })];\n }));\n return {\n series: completeSeries,\n seriesOrder\n };\n};\nexport default seriesProcessor;","import { getSeriesColorFn } from \"../../internals/getSeriesColorFn.js\";\nconst getColor = (series, xAxis, yAxis, zAxis) => {\n const zColorScale = zAxis?.colorScale;\n const yColorScale = yAxis?.colorScale;\n const xColorScale = xAxis?.colorScale;\n const getSeriesColor = getSeriesColorFn(series);\n if (zColorScale) {\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n if (zAxis?.data?.[dataIndex] !== undefined) {\n const color = zColorScale(zAxis?.data?.[dataIndex]);\n if (color !== null) {\n return color;\n }\n }\n const value = series.data[dataIndex];\n const color = value === null ? getSeriesColor({\n value,\n dataIndex\n }) : zColorScale(value.z);\n if (color === null) {\n return getSeriesColor({\n value,\n dataIndex\n });\n }\n return color;\n };\n }\n if (yColorScale) {\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = series.data[dataIndex];\n const color = value === null ? getSeriesColor({\n value,\n dataIndex\n }) : yColorScale(value.y);\n if (color === null) {\n return getSeriesColor({\n value,\n dataIndex\n });\n }\n return color;\n };\n }\n if (xColorScale) {\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = series.data[dataIndex];\n const color = value === null ? getSeriesColor({\n value,\n dataIndex\n }) : xColorScale(value.x);\n if (color === null) {\n return getSeriesColor({\n value,\n dataIndex\n });\n }\n return color;\n };\n }\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = series.data[dataIndex];\n return getSeriesColor({\n value,\n dataIndex\n });\n };\n};\nexport default getColor;","import { getLabel } from \"../../internals/getLabel.js\";\nconst legendGetter = params => {\n const {\n seriesOrder,\n series\n } = params;\n return seriesOrder.reduce((acc, seriesId) => {\n const formattedLabel = getLabel(series[seriesId].label, 'legend');\n if (formattedLabel === undefined) {\n return acc;\n }\n acc.push({\n type: 'scatter',\n markType: series[seriesId].labelMarkType,\n id: seriesId,\n seriesId,\n color: series[seriesId].color,\n label: formattedLabel\n });\n return acc;\n }, []);\n};\nexport default legendGetter;","import { getLabel } from \"../../internals/getLabel.js\";\nconst tooltipGetter = params => {\n const {\n series,\n getColor,\n identifier\n } = params;\n if (!identifier || identifier.dataIndex === undefined) {\n return null;\n }\n const label = getLabel(series.label, 'tooltip');\n const value = series.data[identifier.dataIndex];\n const formattedValue = series.valueFormatter(value, {\n dataIndex: identifier.dataIndex\n });\n return {\n identifier,\n color: getColor(identifier.dataIndex),\n label,\n value,\n formattedValue,\n markType: series.labelMarkType\n };\n};\nexport default tooltipGetter;","const tooltipItemPositionGetter = params => {\n const {\n series,\n identifier,\n axesConfig\n } = params;\n if (!identifier || identifier.dataIndex === undefined) {\n return null;\n }\n const itemSeries = series.scatter?.series[identifier.seriesId];\n if (itemSeries == null) {\n return null;\n }\n if (axesConfig.x === undefined || axesConfig.y === undefined) {\n return null;\n }\n const xValue = itemSeries.data?.[identifier.dataIndex].x;\n const yValue = itemSeries.data?.[identifier.dataIndex].y;\n if (xValue == null || yValue == null) {\n return null;\n }\n return {\n x: axesConfig.x.scale(xValue),\n y: axesConfig.y.scale(yValue)\n };\n};\nexport default tooltipItemPositionGetter;","export const getExtremumX = params => {\n const {\n series,\n axis,\n isDefaultAxis,\n getFilters\n } = params;\n let min = Infinity;\n let max = -Infinity;\n for (const seriesId in series) {\n if (!Object.hasOwn(series, seriesId)) {\n continue;\n }\n const axisId = series[seriesId].xAxisId;\n if (!(axisId === axis.id || axisId === undefined && isDefaultAxis)) {\n continue;\n }\n const filter = getFilters?.({\n currentAxisId: axis.id,\n isDefaultAxis,\n seriesXAxisId: series[seriesId].xAxisId,\n seriesYAxisId: series[seriesId].yAxisId\n });\n const seriesData = series[seriesId].data ?? [];\n for (let i = 0; i < seriesData.length; i += 1) {\n const d = seriesData[i];\n if (filter && !filter(d, i)) {\n continue;\n }\n if (d.x !== null) {\n if (d.x < min) {\n min = d.x;\n }\n if (d.x > max) {\n max = d.x;\n }\n }\n }\n }\n return [min, max];\n};\nexport const getExtremumY = params => {\n const {\n series,\n axis,\n isDefaultAxis,\n getFilters\n } = params;\n let min = Infinity;\n let max = -Infinity;\n for (const seriesId in series) {\n if (!Object.hasOwn(series, seriesId)) {\n continue;\n }\n const axisId = series[seriesId].yAxisId;\n if (!(axisId === axis.id || axisId === undefined && isDefaultAxis)) {\n continue;\n }\n const filter = getFilters?.({\n currentAxisId: axis.id,\n isDefaultAxis,\n seriesXAxisId: series[seriesId].xAxisId,\n seriesYAxisId: series[seriesId].yAxisId\n });\n const seriesData = series[seriesId].data ?? [];\n for (let i = 0; i < seriesData.length; i += 1) {\n const d = seriesData[i];\n if (filter && !filter(d, i)) {\n continue;\n }\n if (d.y !== null) {\n if (d.y < min) {\n min = d.y;\n }\n if (d.y > max) {\n max = d.y;\n }\n }\n }\n }\n return [min, max];\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nconst getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {\n return _extends({}, seriesData, {\n id: seriesData.id ?? `auto-generated-id-${seriesIndex}`,\n color: seriesData.color ?? colors[seriesIndex % colors.length]\n });\n};\nexport default getSeriesWithDefaultValues;","import { getSeriesColorFn } from \"../../internals/getSeriesColorFn.js\";\nconst getColor = (series, xAxis, yAxis) => {\n const yColorScale = yAxis?.colorScale;\n const xColorScale = xAxis?.colorScale;\n const getSeriesColor = getSeriesColorFn(series);\n if (yColorScale) {\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = series.data[dataIndex];\n const color = value === null ? getSeriesColor({\n value,\n dataIndex\n }) : yColorScale(value);\n if (color === null) {\n return getSeriesColor({\n value,\n dataIndex\n });\n }\n return color;\n };\n }\n if (xColorScale) {\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = xAxis.data?.[dataIndex];\n const color = value === null ? getSeriesColor({\n value,\n dataIndex\n }) : xColorScale(value);\n if (color === null) {\n return getSeriesColor({\n value,\n dataIndex\n });\n }\n return color;\n };\n }\n return dataIndex => {\n if (dataIndex === undefined) {\n return series.color;\n }\n const value = series.data[dataIndex];\n return getSeriesColor({\n value,\n dataIndex\n });\n };\n};\nexport default getColor;","import { createGetNextIndexFocusedItem, createGetPreviousIndexFocusedItem, createGetNextSeriesFocusedItem, createGetPreviousSeriesFocusedItem } from \"../../internals/commonNextFocusItem.js\";\nconst outSeriesTypes = new Set(['bar', 'line', 'scatter']);\nconst keyboardFocusHandler = event => {\n switch (event.key) {\n case 'ArrowRight':\n return createGetNextIndexFocusedItem(outSeriesTypes);\n case 'ArrowLeft':\n return createGetPreviousIndexFocusedItem(outSeriesTypes);\n case 'ArrowDown':\n return createGetPreviousSeriesFocusedItem(outSeriesTypes);\n case 'ArrowUp':\n return createGetNextSeriesFocusedItem(outSeriesTypes);\n default:\n return null;\n }\n};\nexport default keyboardFocusHandler;","import { getExtremumX, getExtremumY } from \"./extremums.js\";\nimport seriesProcessor from \"./seriesProcessor.js\";\nimport getColor from \"./getColor.js\";\nimport legendGetter from \"./legend.js\";\nimport tooltipGetter, { axisTooltipGetter } from \"./tooltip.js\";\nimport getSeriesWithDefaultValues from \"./getSeriesWithDefaultValues.js\";\nimport tooltipItemPositionGetter from \"./tooltipPosition.js\";\nimport keyboardFocusHandler from \"./keyboardFocusHandler.js\";\nimport { identifierSerializerSeriesIdDataIndex } from \"../../internals/identifierSerializer.js\";\nexport const lineSeriesConfig = {\n colorProcessor: getColor,\n seriesProcessor,\n legendGetter,\n tooltipGetter,\n tooltipItemPositionGetter,\n axisTooltipGetter,\n xExtremumGetter: getExtremumX,\n yExtremumGetter: getExtremumY,\n getSeriesWithDefaultValues,\n keyboardFocusHandler,\n identifierSerializer: identifierSerializerSeriesIdDataIndex\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { stack as d3Stack } from '@mui/x-charts-vendor/d3-shape';\nimport { warnOnce } from '@mui/x-internals/warning';\nimport { getStackingGroups } from \"../../internals/stacking/index.js\";\nconst seriesProcessor = (params, dataset) => {\n const {\n seriesOrder,\n series\n } = params;\n const stackingGroups = getStackingGroups(_extends({}, params, {\n defaultStrategy: {\n stackOffset: 'none'\n }\n }));\n\n // Create a data set with format adapted to d3\n const d3Dataset = dataset ?? [];\n seriesOrder.forEach(id => {\n const data = series[id].data;\n if (data !== undefined) {\n data.forEach((value, index) => {\n if (d3Dataset.length <= index) {\n d3Dataset.push({\n [id]: value\n });\n } else {\n d3Dataset[index][id] = value;\n }\n });\n } else if (dataset === undefined && process.env.NODE_ENV !== 'production') {\n throw new Error([`MUI X Charts: line series with id='${id}' has no data.`, 'Either provide a data property to the series or use the dataset prop.'].join('\\n'));\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!data && dataset) {\n const dataKey = series[id].dataKey;\n if (!dataKey) {\n throw new Error([`MUI X Charts: line series with id='${id}' has no data and no dataKey.`, 'You must provide a dataKey when using the dataset prop.'].join('\\n'));\n }\n dataset.forEach((entry, index) => {\n const value = entry[dataKey];\n if (value != null && typeof value !== 'number') {\n warnOnce([`MUI X Charts: your dataset key \"${dataKey}\" is used for plotting lines, but the dataset contains the non-null non-numerical element \"${value}\" at index ${index}.`, 'Line plots only support numeric and null values.'].join('\\n'));\n }\n });\n }\n }\n });\n const completedSeries = {};\n stackingGroups.forEach(stackingGroup => {\n // Get stacked values, and derive the domain\n const {\n ids,\n stackingOrder,\n stackingOffset\n } = stackingGroup;\n const stackedSeries = d3Stack().keys(ids.map(id => {\n // Use dataKey if needed and available\n const dataKey = series[id].dataKey;\n return series[id].data === undefined && dataKey !== undefined ? dataKey : id;\n })).value((d, key) => d[key] ?? 0) // defaultize null value to 0\n .order(stackingOrder).offset(stackingOffset)(d3Dataset);\n ids.forEach((id, index) => {\n const dataKey = series[id].dataKey;\n completedSeries[id] = _extends({\n labelMarkType: 'line'\n }, series[id], {\n data: dataKey ? dataset.map(data => {\n const value = data[dataKey];\n return typeof value === 'number' ? value : null;\n }) : series[id].data,\n stackedData: stackedSeries[index].map(([a, b]) => [a, b]),\n valueFormatter: series[id]?.valueFormatter ?? (v => v == null ? '' : v.toLocaleString())\n });\n });\n });\n return {\n seriesOrder,\n stackingGroups,\n series: completedSeries\n };\n};\nexport default seriesProcessor;","import { getLabel } from \"../../internals/getLabel.js\";\nconst legendGetter = params => {\n const {\n seriesOrder,\n series\n } = params;\n return seriesOrder.reduce((acc, seriesId) => {\n const formattedLabel = getLabel(series[seriesId].label, 'legend');\n if (formattedLabel === undefined) {\n return acc;\n }\n acc.push({\n type: 'line',\n markType: series[seriesId].labelMarkType,\n id: seriesId,\n seriesId,\n color: series[seriesId].color,\n label: formattedLabel\n });\n return acc;\n }, []);\n};\nexport default legendGetter;","import { getLabel } from \"../../internals/getLabel.js\";\nconst tooltipGetter = params => {\n const {\n series,\n getColor,\n identifier\n } = params;\n if (!identifier || identifier.dataIndex === undefined) {\n return null;\n }\n const label = getLabel(series.label, 'tooltip');\n const value = series.data[identifier.dataIndex];\n const formattedValue = series.valueFormatter(value, {\n dataIndex: identifier.dataIndex\n });\n return {\n identifier,\n color: getColor(identifier.dataIndex),\n label,\n value,\n formattedValue,\n markType: series.labelMarkType\n };\n};\nexport const axisTooltipGetter = series => {\n return Object.values(series).map(s => ({\n direction: 'x',\n axisId: s.xAxisId\n }));\n};\nexport default tooltipGetter;","const tooltipItemPositionGetter = params => {\n const {\n series,\n identifier,\n axesConfig\n } = params;\n if (!identifier || identifier.dataIndex === undefined) {\n return null;\n }\n const itemSeries = series.line?.series[identifier.seriesId];\n if (itemSeries == null) {\n return null;\n }\n if (axesConfig.x === undefined || axesConfig.y === undefined) {\n return null;\n }\n const xValue = axesConfig.x.data?.[identifier.dataIndex];\n const yValue = itemSeries.data[identifier.dataIndex];\n if (xValue == null || yValue == null) {\n return null;\n }\n return {\n x: axesConfig.x.scale(xValue),\n y: axesConfig.y.scale(yValue)\n };\n};\nexport default tooltipItemPositionGetter;","import { findMinMax } from \"../../internals/findMinMax.js\";\nexport const getExtremumX = params => {\n const {\n axis\n } = params;\n return findMinMax(axis.data ?? []);\n};\nfunction getSeriesExtremums(getValues, data, stackedData, filter) {\n return stackedData.reduce((seriesAcc, stackedValue, index) => {\n if (data[index] === null) {\n return seriesAcc;\n }\n const [base, value] = getValues(stackedValue);\n if (filter && (!filter({\n y: base,\n x: null\n }, index) || !filter({\n y: value,\n x: null\n }, index))) {\n return seriesAcc;\n }\n return [Math.min(base, value, seriesAcc[0]), Math.max(base, value, seriesAcc[1])];\n }, [Infinity, -Infinity]);\n}\nexport const getExtremumY = params => {\n const {\n series,\n axis,\n isDefaultAxis,\n getFilters\n } = params;\n return Object.keys(series).filter(seriesId => {\n const yAxisId = series[seriesId].yAxisId;\n return yAxisId === axis.id || isDefaultAxis && yAxisId === undefined;\n }).reduce((acc, seriesId) => {\n const {\n area,\n stackedData,\n data\n } = series[seriesId];\n const isArea = area !== undefined;\n const filter = getFilters?.({\n currentAxisId: axis.id,\n isDefaultAxis,\n seriesXAxisId: series[seriesId].xAxisId,\n seriesYAxisId: series[seriesId].yAxisId\n });\n\n // Since this series is not used to display an area, we do not consider the base (the d[0]).\n const getValues = isArea && axis.scaleType !== 'log' && typeof series[seriesId].baseline !== 'string' ? d => d : d => [d[1], d[1]];\n const seriesExtremums = getSeriesExtremums(getValues, data, stackedData, filter);\n const [seriesMin, seriesMax] = seriesExtremums;\n return [Math.min(seriesMin, acc[0]), Math.max(seriesMax, acc[1])];\n }, [Infinity, -Infinity]);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nconst getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {\n return _extends({}, seriesData, {\n id: seriesData.id ?? `auto-generated-id-${seriesIndex}`,\n color: seriesData.color ?? colors[seriesIndex % colors.length]\n });\n};\nexport default getSeriesWithDefaultValues;","export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n","export default function(d) {\n return d;\n}\n","export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n","export const deg2rad = (value, defaultRad) => {\n if (value === undefined) {\n return defaultRad;\n }\n return Math.PI * value / 180;\n};\nexport const rad2deg = (value, defaultDeg) => {\n if (value === undefined) {\n return defaultDeg;\n }\n return 180 * value / Math.PI;\n};","/**\n * Helper that converts values and percentages into values.\n * @param value The value provided by the developer. Can either be a number or a string with '%' or 'px'.\n * @param refValue The numerical value associated to 100%.\n * @returns The numerical value associated to the provided value.\n */\nexport function getPercentageValue(value, refValue) {\n if (typeof value === 'number') {\n return value;\n }\n if (value === '100%') {\n // Avoid potential rounding issues\n return refValue;\n }\n if (value.endsWith('%')) {\n const percentage = Number.parseFloat(value.slice(0, value.length - 1));\n if (!Number.isNaN(percentage)) {\n return percentage * refValue / 100;\n }\n }\n if (value.endsWith('px')) {\n const val = Number.parseFloat(value.slice(0, value.length - 2));\n if (!Number.isNaN(val)) {\n return val;\n }\n }\n throw new Error(`MUI X Charts: Received an unknown value \"${value}\". It should be a number, or a string with a percentage value.`);\n}","import { getPercentageValue } from \"../internals/getPercentageValue.js\";\nexport function getPieCoordinates(series, drawing) {\n const {\n height,\n width\n } = drawing;\n const {\n cx: cxParam,\n cy: cyParam\n } = series;\n const availableRadius = Math.min(width, height) / 2;\n const cx = getPercentageValue(cxParam ?? '50%', width);\n const cy = getPercentageValue(cyParam ?? '50%', height);\n return {\n cx,\n cy,\n availableRadius\n };\n}","import { getPercentageValue } from \"../../internals/getPercentageValue.js\";\nimport { getPieCoordinates } from \"../getPieCoordinates.js\";\nconst seriesLayout = (series, drawingArea) => {\n const seriesLayoutRecord = {};\n for (const seriesId of series.seriesOrder) {\n const {\n innerRadius,\n outerRadius,\n arcLabelRadius,\n cx: cxParam,\n cy: cyParam\n } = series.series[seriesId];\n const {\n cx,\n cy,\n availableRadius\n } = getPieCoordinates({\n cx: cxParam,\n cy: cyParam\n }, {\n width: drawingArea.width,\n height: drawingArea.height\n });\n const outer = getPercentageValue(outerRadius ?? availableRadius, availableRadius);\n const inner = getPercentageValue(innerRadius ?? 0, availableRadius);\n const label = arcLabelRadius === undefined ? (inner + outer) / 2 : getPercentageValue(arcLabelRadius, availableRadius);\n seriesLayoutRecord[seriesId] = {\n radius: {\n available: availableRadius,\n inner,\n outer,\n label\n },\n center: {\n x: drawingArea.left + cx,\n y: drawingArea.top + cy\n }\n };\n }\n return seriesLayoutRecord;\n};\nexport default seriesLayout;","import { createGetNextIndexFocusedItem, createGetPreviousIndexFocusedItem, createGetNextSeriesFocusedItem, createGetPreviousSeriesFocusedItem } from \"../../internals/commonNextFocusItem.js\";\nconst outSeriesTypes = new Set(['pie']);\nconst keyboardFocusHandler = event => {\n switch (event.key) {\n case 'ArrowRight':\n return createGetNextIndexFocusedItem(outSeriesTypes);\n case 'ArrowLeft':\n return createGetPreviousIndexFocusedItem(outSeriesTypes);\n case 'ArrowDown':\n return createGetPreviousSeriesFocusedItem(outSeriesTypes);\n case 'ArrowUp':\n return createGetNextSeriesFocusedItem(outSeriesTypes);\n default:\n return null;\n }\n};\nexport default keyboardFocusHandler;","'use client';\n\nimport * as React from 'react';\nimport { useCharts } from \"../../internals/store/useCharts.js\";\nimport { ChartContext } from \"./ChartContext.js\";\nimport { useChartCartesianAxis } from \"../../internals/plugins/featurePlugins/useChartCartesianAxis/index.js\";\nimport { useChartTooltip } from \"../../internals/plugins/featurePlugins/useChartTooltip/index.js\";\nimport { useChartInteraction } from \"../../internals/plugins/featurePlugins/useChartInteraction/index.js\";\nimport { useChartZAxis } from \"../../internals/plugins/featurePlugins/useChartZAxis/index.js\";\nimport { useChartHighlight } from \"../../internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js\";\nimport { barSeriesConfig } from \"../../BarChart/seriesConfig/index.js\";\nimport { scatterSeriesConfig } from \"../../ScatterChart/seriesConfig/index.js\";\nimport { lineSeriesConfig } from \"../../LineChart/seriesConfig/index.js\";\nimport { pieSeriesConfig } from \"../../PieChart/seriesConfig/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const defaultSeriesConfig = {\n bar: barSeriesConfig,\n scatter: scatterSeriesConfig,\n line: lineSeriesConfig,\n pie: pieSeriesConfig\n};\n\n// For consistency with the v7, the cartesian axes are set by default.\n// To remove them, you can provide a `plugins` props.\nconst defaultPlugins = [useChartZAxis, useChartTooltip, useChartInteraction, useChartCartesianAxis, useChartHighlight];\nfunction ChartProvider(props) {\n const {\n children,\n plugins = defaultPlugins,\n pluginParams = {},\n seriesConfig = defaultSeriesConfig\n } = props;\n const {\n contextValue\n } = useCharts(plugins, pluginParams, seriesConfig);\n return /*#__PURE__*/_jsx(ChartContext.Provider, {\n value: contextValue,\n children: children\n });\n}\nexport { ChartProvider };","import seriesProcessor from \"./seriesProcessor.js\";\nimport getColor from \"./getColor.js\";\nimport legendGetter from \"./legend.js\";\nimport tooltipGetter from \"./tooltip.js\";\nimport seriesLayout from \"./seriesLayout.js\";\nimport getSeriesWithDefaultValues from \"./getSeriesWithDefaultValues.js\";\nimport tooltipItemPositionGetter from \"./tooltipPosition.js\";\nimport keyboardFocusHandler from \"./keyboardFocusHandler.js\";\nimport { identifierSerializerSeriesIdDataIndex } from \"../../internals/identifierSerializer.js\";\nexport const pieSeriesConfig = {\n colorProcessor: getColor,\n seriesProcessor,\n seriesLayout,\n legendGetter,\n tooltipGetter,\n tooltipItemPositionGetter,\n getSeriesWithDefaultValues,\n keyboardFocusHandler,\n identifierSerializer: identifierSerializerSeriesIdDataIndex\n};","const getColor = series => {\n return dataIndex => {\n return series.data[dataIndex].color;\n };\n};\nexport default getColor;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { pie as d3Pie } from '@mui/x-charts-vendor/d3-shape';\nimport { getLabel } from \"../../internals/getLabel.js\";\nimport { deg2rad } from \"../../internals/angleConversion.js\";\nconst getSortingComparator = (comparator = 'none') => {\n if (typeof comparator === 'function') {\n return comparator;\n }\n switch (comparator) {\n case 'none':\n return null;\n case 'desc':\n return (a, b) => b - a;\n case 'asc':\n return (a, b) => a - b;\n default:\n return null;\n }\n};\nconst seriesProcessor = params => {\n const {\n seriesOrder,\n series\n } = params;\n const defaultizedSeries = {};\n seriesOrder.forEach(seriesId => {\n const arcs = d3Pie().startAngle(deg2rad(series[seriesId].startAngle ?? 0)).endAngle(deg2rad(series[seriesId].endAngle ?? 360)).padAngle(deg2rad(series[seriesId].paddingAngle ?? 0)).sortValues(getSortingComparator(series[seriesId].sortingValues ?? 'none'))(series[seriesId].data.map(piePoint => piePoint.value));\n defaultizedSeries[seriesId] = _extends({\n labelMarkType: 'circle',\n valueFormatter: item => item.value.toLocaleString()\n }, series[seriesId], {\n data: series[seriesId].data.map((item, index) => _extends({}, item, {\n id: item.id ?? `auto-generated-pie-id-${seriesId}-${index}`\n }, arcs[index])).map((item, index) => _extends({\n labelMarkType: 'circle'\n }, item, {\n formattedValue: series[seriesId].valueFormatter?.(_extends({}, item, {\n label: getLabel(item.label, 'arc')\n }), {\n dataIndex: index\n }) ?? item.value.toLocaleString()\n }))\n });\n });\n return {\n seriesOrder,\n series: defaultizedSeries\n };\n};\nexport default seriesProcessor;","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport {tau} from \"./math.js\";\n\nexport default function() {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = (data = array(data)).length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n }\n\n // Optionally sort the arcs by previously-computed values or by data.\n if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n // Compute the arcs! They are stored in the original data's order.\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function(_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function(_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}\n","import { getLabel } from \"../../internals/getLabel.js\";\nconst legendGetter = params => {\n const {\n seriesOrder,\n series\n } = params;\n return seriesOrder.reduce((acc, seriesId) => {\n series[seriesId].data.forEach((item, dataIndex) => {\n const formattedLabel = getLabel(item.label, 'legend');\n if (formattedLabel === undefined) {\n return;\n }\n const id = item.id ?? dataIndex;\n acc.push({\n type: 'pie',\n markType: item.labelMarkType ?? series[seriesId].labelMarkType,\n seriesId,\n id,\n itemId: id,\n dataIndex,\n color: item.color,\n label: formattedLabel\n });\n });\n return acc;\n }, []);\n};\nexport default legendGetter;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getLabel } from \"../../internals/getLabel.js\";\nconst tooltipGetter = params => {\n const {\n series,\n getColor,\n identifier\n } = params;\n if (!identifier || identifier.dataIndex === undefined) {\n return null;\n }\n const point = series.data[identifier.dataIndex];\n if (point == null) {\n return null;\n }\n const label = getLabel(point.label, 'tooltip');\n const value = _extends({}, point, {\n label\n });\n const formattedValue = series.valueFormatter(value, {\n dataIndex: identifier.dataIndex\n });\n return {\n identifier,\n color: getColor(identifier.dataIndex),\n label,\n value,\n formattedValue,\n markType: point.labelMarkType ?? series.labelMarkType\n };\n};\nexport default tooltipGetter;","import { findMinMax } from \"../../internals/findMinMax.js\";\nconst tooltipItemPositionGetter = params => {\n const {\n series,\n identifier,\n placement,\n seriesLayout\n } = params;\n if (!identifier || identifier.dataIndex === undefined) {\n return null;\n }\n const itemSeries = series.pie?.series[identifier.seriesId];\n const layout = seriesLayout.pie?.[identifier.seriesId];\n if (itemSeries == null || layout == null) {\n return null;\n }\n const {\n center,\n radius\n } = layout;\n const {\n data\n } = itemSeries;\n const dataItem = data[identifier.dataIndex];\n if (!dataItem) {\n return null;\n }\n\n // Compute the 4 corner points of the arc to get the bounding box.\n const points = [[radius.inner, dataItem.startAngle], [radius.inner, dataItem.endAngle], [radius.outer, dataItem.startAngle], [radius.outer, dataItem.endAngle]].map(([r, angle]) => ({\n x: center.x + r * Math.sin(angle),\n y: center.y - r * Math.cos(angle)\n }));\n const [x0, x1] = findMinMax(points.map(p => p.x));\n const [y0, y1] = findMinMax(points.map(p => p.y));\n switch (placement) {\n case 'bottom':\n return {\n x: (x1 + x0) / 2,\n y: y1\n };\n case 'left':\n return {\n x: x0,\n y: (y1 + y0) / 2\n };\n case 'right':\n return {\n x: x1,\n y: (y1 + y0) / 2\n };\n case 'top':\n default:\n return {\n x: (x1 + x0) / 2,\n y: y0\n };\n }\n};\nexport default tooltipItemPositionGetter;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nconst getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {\n return _extends({}, seriesData, {\n id: seriesData.id ?? `auto-generated-id-${seriesIndex}`,\n data: seriesData.data.map((d, index) => _extends({}, d, {\n color: d.color ?? colors[index % colors.length]\n }))\n });\n};\nexport default getSeriesWithDefaultValues;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ChartsSlotsContext = /*#__PURE__*/React.createContext(null);\n\n/**\n * Get the slots and slotProps from the nearest `ChartDataProvider` or `ChartDataProviderPro`.\n * @returns {ChartsSlotsContextValue} The slots and slotProps from the context.\n */\nif (process.env.NODE_ENV !== \"production\") ChartsSlotsContext.displayName = \"ChartsSlotsContext\";\nexport function useChartsSlots() {\n const context = React.useContext(ChartsSlotsContext);\n if (context == null) {\n throw new Error(['MUI X Charts: Could not find the Charts Slots context.', 'It looks like you rendered your component outside of a ChartDataProvider.', 'This can also happen if you are bundling multiple versions of the library.'].join('\\n'));\n }\n return context;\n}\nexport function ChartsSlotsProvider(props) {\n const {\n slots,\n slotProps = {},\n defaultSlots,\n children\n } = props;\n const value = React.useMemo(() => ({\n slots: _extends({}, defaultSlots, slots),\n slotProps\n }), [defaultSlots, slots, slotProps]);\n return /*#__PURE__*/_jsx(ChartsSlotsContext.Provider, {\n value: value,\n children: children\n });\n}","/**\n * Add keys, values of `defaultProps` that does not exist in `props`\n * @param defaultProps\n * @param props\n * @returns resolved props\n */\nexport default function resolveProps(defaultProps, props) {\n const output = {\n ...props\n };\n for (const key in defaultProps) {\n if (Object.prototype.hasOwnProperty.call(defaultProps, key)) {\n const propName = key;\n if (propName === 'components' || propName === 'slots') {\n output[propName] = {\n ...defaultProps[propName],\n ...output[propName]\n };\n } else if (propName === 'componentsProps' || propName === 'slotProps') {\n const defaultSlotProps = defaultProps[propName];\n const slotProps = props[propName];\n if (!slotProps) {\n output[propName] = defaultSlotProps || {};\n } else if (!defaultSlotProps) {\n output[propName] = slotProps;\n } else {\n output[propName] = {\n ...slotProps\n };\n for (const slotKey in defaultSlotProps) {\n if (Object.prototype.hasOwnProperty.call(defaultSlotProps, slotKey)) {\n const slotPropName = slotKey;\n output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);\n }\n }\n }\n } else if (output[propName] === undefined) {\n output[propName] = defaultProps[propName];\n }\n }\n }\n return output;\n}","import resolveProps from '@mui/utils/resolveProps';\nexport default function getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) {\n return props;\n }\n return resolveProps(theme.components[name].defaultProps, props);\n}","import * as React from 'react';\nimport { isValidElementType } from 'react-is';\n\n// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js\nexport function isPlainObject(item) {\n if (typeof item !== 'object' || item === null) {\n return false;\n }\n const prototype = Object.getPrototypeOf(item);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);\n}\nfunction deepClone(source) {\n if (/*#__PURE__*/React.isValidElement(source) || isValidElementType(source) || !isPlainObject(source)) {\n return source;\n }\n const output = {};\n Object.keys(source).forEach(key => {\n output[key] = deepClone(source[key]);\n });\n return output;\n}\n\n/**\n * Merge objects deeply.\n * It will shallow copy React elements.\n *\n * If `options.clone` is set to `false` the source object will be merged directly into the target object.\n *\n * @example\n * ```ts\n * deepmerge({ a: { b: 1 }, d: 2 }, { a: { c: 2 }, d: 4 });\n * // => { a: { b: 1, c: 2 }, d: 4 }\n * ````\n *\n * @param target The target object.\n * @param source The source object.\n * @param options The merge options.\n * @param options.clone Set to `false` to merge the source object directly into the target object.\n * @returns The merged object.\n */\nexport default function deepmerge(target, source, options = {\n clone: true\n}) {\n const output = options.clone ? {\n ...target\n } : target;\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(key => {\n if (/*#__PURE__*/React.isValidElement(source[key]) || isValidElementType(source[key])) {\n output[key] = source[key];\n } else if (isPlainObject(source[key]) &&\n // Avoid prototype pollution\n Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {\n // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.\n output[key] = deepmerge(target[key], source[key], options);\n } else if (options.clone) {\n output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];\n } else {\n output[key] = source[key];\n }\n });\n }\n return output;\n}","// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nexport const breakpointKeys = ['xs', 'sm', 'md', 'lg', 'xl'];\nconst sortBreakpointsValues = values => {\n const breakpointsAsArray = Object.keys(values).map(key => ({\n key,\n val: values[key]\n })) || [];\n // Sort in ascending order\n breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);\n return breakpointsAsArray.reduce((acc, obj) => {\n return {\n ...acc,\n [obj.key]: obj.val\n };\n }, {});\n};\n\n// Keep in mind that @media is inclusive by the CSS specification.\nexport default function createBreakpoints(breakpoints) {\n const {\n // The breakpoint **start** at this value.\n // For instance with the first breakpoint xs: [xs, sm).\n values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n },\n unit = 'px',\n step = 5,\n ...other\n } = breakpoints;\n const sortedValues = sortBreakpointsValues(values);\n const keys = Object.keys(sortedValues);\n function up(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (min-width:${value}${unit})`;\n }\n function down(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (max-width:${value - step / 100}${unit})`;\n }\n function between(start, end) {\n const endIndex = keys.indexOf(end);\n return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;\n }\n function only(key) {\n if (keys.indexOf(key) + 1 < keys.length) {\n return between(key, keys[keys.indexOf(key) + 1]);\n }\n return up(key);\n }\n function not(key) {\n // handle first and last key separately, for better readability\n const keyIndex = keys.indexOf(key);\n if (keyIndex === 0) {\n return up(keys[1]);\n }\n if (keyIndex === keys.length - 1) {\n return down(keys[keyIndex]);\n }\n return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');\n }\n return {\n keys,\n values: sortedValues,\n up,\n down,\n between,\n only,\n not,\n unit,\n ...other\n };\n}","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n/**\n * For using in `sx` prop to sort the breakpoint from low to high.\n * Note: this function does not work and will not support multiple units.\n * e.g. input: { '@container (min-width:300px)': '1rem', '@container (min-width:40rem)': '2rem' }\n * output: { '@container (min-width:40rem)': '2rem', '@container (min-width:300px)': '1rem' } // since 40 < 300 eventhough 40rem > 300px\n */\nexport function sortContainerQueries(theme, css) {\n if (!theme.containerQueries) {\n return css;\n }\n const sorted = Object.keys(css).filter(key => key.startsWith('@container')).sort((a, b) => {\n const regex = /min-width:\\s*([0-9.]+)/;\n return +(a.match(regex)?.[1] || 0) - +(b.match(regex)?.[1] || 0);\n });\n if (!sorted.length) {\n return css;\n }\n return sorted.reduce((acc, key) => {\n const value = css[key];\n delete acc[key];\n acc[key] = value;\n return acc;\n }, {\n ...css\n });\n}\nexport function isCqShorthand(breakpointKeys, value) {\n return value === '@' || value.startsWith('@') && (breakpointKeys.some(key => value.startsWith(`@${key}`)) || !!value.match(/^@\\d/));\n}\nexport function getContainerQuery(theme, shorthand) {\n const matches = shorthand.match(/^@([^/]+)?\\/?(.+)?$/);\n if (!matches) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The provided shorthand ${`(${shorthand})`} is invalid. The format should be \\`@\\` or \\`@/\\`.\\n` + 'For example, `@sm` or `@600` or `@40rem/sidebar`.' : _formatMuiErrorMessage(18, `(${shorthand})`));\n }\n return null;\n }\n const [, containerQuery, containerName] = matches;\n const value = Number.isNaN(+containerQuery) ? containerQuery || 0 : +containerQuery;\n return theme.containerQueries(containerName).up(value);\n}\nexport default function cssContainerQueries(themeInput) {\n const toContainerQuery = (mediaQuery, name) => mediaQuery.replace('@media', name ? `@container ${name}` : '@container');\n function attachCq(node, name) {\n node.up = (...args) => toContainerQuery(themeInput.breakpoints.up(...args), name);\n node.down = (...args) => toContainerQuery(themeInput.breakpoints.down(...args), name);\n node.between = (...args) => toContainerQuery(themeInput.breakpoints.between(...args), name);\n node.only = (...args) => toContainerQuery(themeInput.breakpoints.only(...args), name);\n node.not = (...args) => {\n const result = toContainerQuery(themeInput.breakpoints.not(...args), name);\n if (result.includes('not all and')) {\n // `@container` does not work with `not all and`, so need to invert the logic\n return result.replace('not all and ', '').replace('min-width:', 'width<').replace('max-width:', 'width>').replace('and', 'or');\n }\n return result;\n };\n }\n const node = {};\n const containerQueries = name => {\n attachCq(node, name);\n return node;\n };\n attachCq(containerQueries);\n return {\n ...themeInput,\n containerQueries\n };\n}","const shape = {\n borderRadius: 4\n};\nexport default shape;","import PropTypes from 'prop-types';\nimport deepmerge from '@mui/utils/deepmerge';\nimport merge from \"../merge/index.js\";\nimport { isCqShorthand, getContainerQuery } from \"../cssContainerQueries/index.js\";\n\n// The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\nexport const values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n};\nconst defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: key => `@media (min-width:${values[key]}px)`\n};\nconst defaultContainerQueries = {\n containerQueries: containerName => ({\n up: key => {\n let result = typeof key === 'number' ? key : values[key] || key;\n if (typeof result === 'number') {\n result = `${result}px`;\n }\n return containerName ? `@container ${containerName} (min-width:${result})` : `@container (min-width:${result})`;\n }\n })\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n const theme = props.theme || {};\n if (Array.isArray(propValue)) {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return propValue.reduce((acc, item, index) => {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n if (typeof propValue === 'object') {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return Object.keys(propValue).reduce((acc, breakpoint) => {\n if (isCqShorthand(themeBreakpoints.keys, breakpoint)) {\n const containerKey = getContainerQuery(theme.containerQueries ? theme : defaultContainerQueries, breakpoint);\n if (containerKey) {\n acc[containerKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n }\n }\n // key is breakpoint\n else if (Object.keys(themeBreakpoints.values || values).includes(breakpoint)) {\n const mediaKey = themeBreakpoints.up(breakpoint);\n acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n } else {\n const cssKey = breakpoint;\n acc[cssKey] = propValue[cssKey];\n }\n return acc;\n }, {});\n }\n const output = styleFromPropValue(propValue);\n return output;\n}\nfunction breakpoints(styleFunction) {\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const newStyleFunction = props => {\n const theme = props.theme || {};\n const base = styleFunction(props);\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n const extended = themeBreakpoints.keys.reduce((acc, key) => {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction({\n theme,\n ...props[key]\n });\n }\n return acc;\n }, null);\n return merge(base, extended);\n };\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? {\n ...styleFunction.propTypes,\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n } : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps];\n return newStyleFunction;\n}\nexport function createEmptyBreakpointObject(breakpointsInput = {}) {\n const breakpointsInOrder = breakpointsInput.keys?.reduce((acc, key) => {\n const breakpointStyleKey = breakpointsInput.up(key);\n acc[breakpointStyleKey] = {};\n return acc;\n }, {});\n return breakpointsInOrder || {};\n}\nexport function removeUnusedBreakpoints(breakpointKeys, style) {\n return breakpointKeys.reduce((acc, key) => {\n const breakpointOutput = acc[key];\n const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0;\n if (isBreakpointUnused) {\n delete acc[key];\n }\n return acc;\n }, style);\n}\nexport function mergeBreakpointsInOrder(breakpointsInput, ...styles) {\n const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput);\n const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => deepmerge(prev, next), {});\n return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput);\n}\n\n// compute base for responsive values; e.g.,\n// [1,2,3] => {xs: true, sm: true, md: true}\n// {xs: 1, sm: 2, md: 3} => {xs: true, sm: true, md: true}\nexport function computeBreakpointsBase(breakpointValues, themeBreakpoints) {\n // fixed value\n if (typeof breakpointValues !== 'object') {\n return {};\n }\n const base = {};\n const breakpointsKeys = Object.keys(themeBreakpoints);\n if (Array.isArray(breakpointValues)) {\n breakpointsKeys.forEach((breakpoint, i) => {\n if (i < breakpointValues.length) {\n base[breakpoint] = true;\n }\n });\n } else {\n breakpointsKeys.forEach(breakpoint => {\n if (breakpointValues[breakpoint] != null) {\n base[breakpoint] = true;\n }\n });\n }\n return base;\n}\nexport function resolveBreakpointValues({\n values: breakpointValues,\n breakpoints: themeBreakpoints,\n base: customBase\n}) {\n const base = customBase || computeBreakpointsBase(breakpointValues, themeBreakpoints);\n const keys = Object.keys(base);\n if (keys.length === 0) {\n return breakpointValues;\n }\n let previous;\n return keys.reduce((acc, breakpoint, i) => {\n if (Array.isArray(breakpointValues)) {\n acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];\n previous = i;\n } else if (typeof breakpointValues === 'object') {\n acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];\n previous = breakpoint;\n } else {\n acc[breakpoint] = breakpointValues;\n }\n return acc;\n }, {});\n}\nexport default breakpoints;","/**\n * WARNING: Don't import this directly. It's imported by the code generated by\n * `@mui/interal-babel-plugin-minify-errors`. Make sure to always use string literals in `Error`\n * constructors to ensure the plugin works as expected. Supported patterns include:\n * throw new Error('My message');\n * throw new Error(`My message: ${foo}`);\n * throw new Error(`My message: ${foo}` + 'another string');\n * ...\n * @param {number} code\n */\nexport default function formatMuiErrorMessage(code, ...args) {\n const url = new URL(`https://mui.com/production-error/?code=${code}`);\n args.forEach(arg => url.searchParams.append('args[]', arg));\n return `Minified MUI error #${code}; visit ${url} for the full message.`;\n}","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word in the sentence.\n// We only handle the first word.\nexport default function capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI: `capitalize(string)` expects a string argument.' : _formatMuiErrorMessage(7));\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n}","import capitalize from '@mui/utils/capitalize';\nimport responsivePropType from \"../responsivePropType/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nexport function getPath(obj, path, checkVars = true) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n // Check if CSS variables are used\n if (obj && obj.vars && checkVars) {\n const val = `vars.${path}`.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);\n if (val != null) {\n return val;\n }\n }\n return path.split('.').reduce((acc, item) => {\n if (acc && acc[item] != null) {\n return acc[item];\n }\n return null;\n }, obj);\n}\nexport function getStyleValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {\n let value;\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || userValue;\n } else {\n value = getPath(themeMapping, propValueFinal) || userValue;\n }\n if (transform) {\n value = transform(value, userValue, themeMapping);\n }\n return value;\n}\nfunction style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n if (props[prop] == null) {\n return null;\n }\n const propValue = props[prop];\n const theme = props.theme;\n const themeMapping = getPath(theme, themeKey) || {};\n const styleFromPropValue = propValueFinal => {\n let value = getStyleValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, propValue, styleFromPropValue);\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? {\n [prop]: responsivePropType\n } : {};\n fn.filterProps = [prop];\n return fn;\n}\nexport default style;","import deepmerge from '@mui/utils/deepmerge';\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n return deepmerge(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n });\n}\nexport default merge;","import responsivePropType from \"../responsivePropType/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nimport { getPath } from \"../style/index.js\";\nimport merge from \"../merge/index.js\";\nimport memoize from \"../memoize/index.js\";\nconst properties = {\n m: 'margin',\n p: 'padding'\n};\nconst directions = {\n t: 'Top',\n r: 'Right',\n b: 'Bottom',\n l: 'Left',\n x: ['Left', 'Right'],\n y: ['Top', 'Bottom']\n};\nconst aliases = {\n marginX: 'mx',\n marginY: 'my',\n paddingX: 'px',\n paddingY: 'py'\n};\n\n// memoize() impact:\n// From 300,000 ops/sec\n// To 350,000 ops/sec\nconst getCssProperties = memoize(prop => {\n // It's not a shorthand notation.\n if (prop.length > 2) {\n if (aliases[prop]) {\n prop = aliases[prop];\n } else {\n return [prop];\n }\n }\n const [a, b] = prop.split('');\n const property = properties[a];\n const direction = directions[b] || '';\n return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];\n});\nexport const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];\nexport const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];\nconst spacingKeys = [...marginKeys, ...paddingKeys];\nexport function createUnaryUnit(theme, themeKey, defaultValue, propName) {\n const themeSpacing = getPath(theme, themeKey, true) ?? defaultValue;\n if (typeof themeSpacing === 'number' || typeof themeSpacing === 'string') {\n return val => {\n if (typeof val === 'string') {\n return val;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (typeof val !== 'number') {\n console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${val}.`);\n }\n }\n if (typeof themeSpacing === 'string') {\n return `calc(${val} * ${themeSpacing})`;\n }\n return themeSpacing * val;\n };\n }\n if (Array.isArray(themeSpacing)) {\n return val => {\n if (typeof val === 'string') {\n return val;\n }\n const abs = Math.abs(val);\n if (process.env.NODE_ENV !== 'production') {\n if (!Number.isInteger(abs)) {\n console.error([`MUI: The \\`theme.${themeKey}\\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \\`theme.${themeKey}\\` as a number.`].join('\\n'));\n } else if (abs > themeSpacing.length - 1) {\n console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\\n'));\n }\n }\n const transformed = themeSpacing[abs];\n if (val >= 0) {\n return transformed;\n }\n if (typeof transformed === 'number') {\n return -transformed;\n }\n return `-${transformed}`;\n };\n }\n if (typeof themeSpacing === 'function') {\n return themeSpacing;\n }\n if (process.env.NODE_ENV !== 'production') {\n console.error([`MUI: The \\`theme.${themeKey}\\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\\n'));\n }\n return () => undefined;\n}\nexport function createUnarySpacing(theme) {\n return createUnaryUnit(theme, 'spacing', 8, 'spacing');\n}\nexport function getValue(transformer, propValue) {\n if (typeof propValue === 'string' || propValue == null) {\n return propValue;\n }\n return transformer(propValue);\n}\nexport function getStyleFromPropValue(cssProperties, transformer) {\n return propValue => cssProperties.reduce((acc, cssProperty) => {\n acc[cssProperty] = getValue(transformer, propValue);\n return acc;\n }, {});\n}\nfunction resolveCssProperty(props, keys, prop, transformer) {\n // Using a hash computation over an array iteration could be faster, but with only 28 items,\n // it's doesn't worth the bundle size.\n if (!keys.includes(prop)) {\n return null;\n }\n const cssProperties = getCssProperties(prop);\n const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);\n const propValue = props[prop];\n return handleBreakpoints(props, propValue, styleFromPropValue);\n}\nfunction style(props, keys) {\n const transformer = createUnarySpacing(props.theme);\n return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});\n}\nexport function margin(props) {\n return style(props, marginKeys);\n}\nmargin.propTypes = process.env.NODE_ENV !== 'production' ? marginKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nmargin.filterProps = marginKeys;\nexport function padding(props) {\n return style(props, paddingKeys);\n}\npadding.propTypes = process.env.NODE_ENV !== 'production' ? paddingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\npadding.filterProps = paddingKeys;\nfunction spacing(props) {\n return style(props, spacingKeys);\n}\nspacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nspacing.filterProps = spacingKeys;\nexport default spacing;","export default function memoize(fn) {\n const cache = {};\n return arg => {\n if (cache[arg] === undefined) {\n cache[arg] = fn(arg);\n }\n return cache[arg];\n };\n}","import { createUnarySpacing } from \"../spacing/index.js\";\n\n// The different signatures imply different meaning for their arguments that can't be expressed structurally.\n// We express the difference with variable names.\n\nexport default function createSpacing(spacingInput = 8,\n// Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.\n// Smaller components, such as icons, can align to a 4dp grid.\n// https://m2.material.io/design/layout/understanding-layout.html\ntransform = createUnarySpacing({\n spacing: spacingInput\n})) {\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n }\n const spacing = (...argsInput) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!(argsInput.length <= 4)) {\n console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);\n }\n }\n const args = argsInput.length === 0 ? [1] : argsInput;\n return args.map(argument => {\n const output = transform(argument);\n return typeof output === 'number' ? `${output}px` : output;\n }).join(' ');\n };\n spacing.mui = true;\n return spacing;\n}","import merge from \"../merge/index.js\";\nfunction compose(...styles) {\n const handlers = styles.reduce((acc, style) => {\n style.filterProps.forEach(prop => {\n acc[prop] = style;\n });\n return acc;\n }, {});\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n return Object.keys(props).reduce((acc, prop) => {\n if (handlers[prop]) {\n return merge(acc, handlers[prop](props));\n }\n return acc;\n }, {});\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => Object.assign(acc, style.propTypes), {}) : {};\n fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);\n return fn;\n}\nexport default compose;","import responsivePropType from \"../responsivePropType/index.js\";\nimport style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nimport { createUnaryUnit, getValue } from \"../spacing/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nexport function borderTransform(value) {\n if (typeof value !== 'number') {\n return value;\n }\n return `${value}px solid`;\n}\nfunction createBorderStyle(prop, transform) {\n return style({\n prop,\n themeKey: 'borders',\n transform\n });\n}\nexport const border = createBorderStyle('border', borderTransform);\nexport const borderTop = createBorderStyle('borderTop', borderTransform);\nexport const borderRight = createBorderStyle('borderRight', borderTransform);\nexport const borderBottom = createBorderStyle('borderBottom', borderTransform);\nexport const borderLeft = createBorderStyle('borderLeft', borderTransform);\nexport const borderColor = createBorderStyle('borderColor');\nexport const borderTopColor = createBorderStyle('borderTopColor');\nexport const borderRightColor = createBorderStyle('borderRightColor');\nexport const borderBottomColor = createBorderStyle('borderBottomColor');\nexport const borderLeftColor = createBorderStyle('borderLeftColor');\nexport const outline = createBorderStyle('outline', borderTransform);\nexport const outlineColor = createBorderStyle('outlineColor');\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const borderRadius = props => {\n if (props.borderRadius !== undefined && props.borderRadius !== null) {\n const transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4, 'borderRadius');\n const styleFromPropValue = propValue => ({\n borderRadius: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.borderRadius, styleFromPropValue);\n }\n return null;\n};\nborderRadius.propTypes = process.env.NODE_ENV !== 'production' ? {\n borderRadius: responsivePropType\n} : {};\nborderRadius.filterProps = ['borderRadius'];\nconst borders = compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor);\nexport default borders;","import style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nimport { createUnaryUnit, getValue } from \"../spacing/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nimport responsivePropType from \"../responsivePropType/index.js\";\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const gap = props => {\n if (props.gap !== undefined && props.gap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'gap');\n const styleFromPropValue = propValue => ({\n gap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.gap, styleFromPropValue);\n }\n return null;\n};\ngap.propTypes = process.env.NODE_ENV !== 'production' ? {\n gap: responsivePropType\n} : {};\ngap.filterProps = ['gap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const columnGap = props => {\n if (props.columnGap !== undefined && props.columnGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'columnGap');\n const styleFromPropValue = propValue => ({\n columnGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.columnGap, styleFromPropValue);\n }\n return null;\n};\ncolumnGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n columnGap: responsivePropType\n} : {};\ncolumnGap.filterProps = ['columnGap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const rowGap = props => {\n if (props.rowGap !== undefined && props.rowGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'rowGap');\n const styleFromPropValue = propValue => ({\n rowGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.rowGap, styleFromPropValue);\n }\n return null;\n};\nrowGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n rowGap: responsivePropType\n} : {};\nrowGap.filterProps = ['rowGap'];\nexport const gridColumn = style({\n prop: 'gridColumn'\n});\nexport const gridRow = style({\n prop: 'gridRow'\n});\nexport const gridAutoFlow = style({\n prop: 'gridAutoFlow'\n});\nexport const gridAutoColumns = style({\n prop: 'gridAutoColumns'\n});\nexport const gridAutoRows = style({\n prop: 'gridAutoRows'\n});\nexport const gridTemplateColumns = style({\n prop: 'gridTemplateColumns'\n});\nexport const gridTemplateRows = style({\n prop: 'gridTemplateRows'\n});\nexport const gridTemplateAreas = style({\n prop: 'gridTemplateAreas'\n});\nexport const gridArea = style({\n prop: 'gridArea'\n});\nconst grid = compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);\nexport default grid;","import style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nexport function paletteTransform(value, userValue) {\n if (userValue === 'grey') {\n return userValue;\n }\n return value;\n}\nexport const color = style({\n prop: 'color',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const bgcolor = style({\n prop: 'bgcolor',\n cssProperty: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const backgroundColor = style({\n prop: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nconst palette = compose(color, bgcolor, backgroundColor);\nexport default palette;","import style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nimport { handleBreakpoints, values as breakpointsValues } from \"../breakpoints/index.js\";\nexport function sizingTransform(value) {\n return value <= 1 && value !== 0 ? `${value * 100}%` : value;\n}\nexport const width = style({\n prop: 'width',\n transform: sizingTransform\n});\nexport const maxWidth = props => {\n if (props.maxWidth !== undefined && props.maxWidth !== null) {\n const styleFromPropValue = propValue => {\n const breakpoint = props.theme?.breakpoints?.values?.[propValue] || breakpointsValues[propValue];\n if (!breakpoint) {\n return {\n maxWidth: sizingTransform(propValue)\n };\n }\n if (props.theme?.breakpoints?.unit !== 'px') {\n return {\n maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`\n };\n }\n return {\n maxWidth: breakpoint\n };\n };\n return handleBreakpoints(props, props.maxWidth, styleFromPropValue);\n }\n return null;\n};\nmaxWidth.filterProps = ['maxWidth'];\nexport const minWidth = style({\n prop: 'minWidth',\n transform: sizingTransform\n});\nexport const height = style({\n prop: 'height',\n transform: sizingTransform\n});\nexport const maxHeight = style({\n prop: 'maxHeight',\n transform: sizingTransform\n});\nexport const minHeight = style({\n prop: 'minHeight',\n transform: sizingTransform\n});\nexport const sizeWidth = style({\n prop: 'size',\n cssProperty: 'width',\n transform: sizingTransform\n});\nexport const sizeHeight = style({\n prop: 'size',\n cssProperty: 'height',\n transform: sizingTransform\n});\nexport const boxSizing = style({\n prop: 'boxSizing'\n});\nconst sizing = compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);\nexport default sizing;","import { padding, margin } from \"../spacing/index.js\";\nimport { borderRadius, borderTransform } from \"../borders/index.js\";\nimport { gap, rowGap, columnGap } from \"../cssGrid/index.js\";\nimport { paletteTransform } from \"../palette/index.js\";\nimport { maxWidth, sizingTransform } from \"../sizing/index.js\";\nconst defaultSxConfig = {\n // borders\n border: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderTop: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderRight: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderBottom: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderLeft: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderColor: {\n themeKey: 'palette'\n },\n borderTopColor: {\n themeKey: 'palette'\n },\n borderRightColor: {\n themeKey: 'palette'\n },\n borderBottomColor: {\n themeKey: 'palette'\n },\n borderLeftColor: {\n themeKey: 'palette'\n },\n outline: {\n themeKey: 'borders',\n transform: borderTransform\n },\n outlineColor: {\n themeKey: 'palette'\n },\n borderRadius: {\n themeKey: 'shape.borderRadius',\n style: borderRadius\n },\n // palette\n color: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n bgcolor: {\n themeKey: 'palette',\n cssProperty: 'backgroundColor',\n transform: paletteTransform\n },\n backgroundColor: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n // spacing\n p: {\n style: padding\n },\n pt: {\n style: padding\n },\n pr: {\n style: padding\n },\n pb: {\n style: padding\n },\n pl: {\n style: padding\n },\n px: {\n style: padding\n },\n py: {\n style: padding\n },\n padding: {\n style: padding\n },\n paddingTop: {\n style: padding\n },\n paddingRight: {\n style: padding\n },\n paddingBottom: {\n style: padding\n },\n paddingLeft: {\n style: padding\n },\n paddingX: {\n style: padding\n },\n paddingY: {\n style: padding\n },\n paddingInline: {\n style: padding\n },\n paddingInlineStart: {\n style: padding\n },\n paddingInlineEnd: {\n style: padding\n },\n paddingBlock: {\n style: padding\n },\n paddingBlockStart: {\n style: padding\n },\n paddingBlockEnd: {\n style: padding\n },\n m: {\n style: margin\n },\n mt: {\n style: margin\n },\n mr: {\n style: margin\n },\n mb: {\n style: margin\n },\n ml: {\n style: margin\n },\n mx: {\n style: margin\n },\n my: {\n style: margin\n },\n margin: {\n style: margin\n },\n marginTop: {\n style: margin\n },\n marginRight: {\n style: margin\n },\n marginBottom: {\n style: margin\n },\n marginLeft: {\n style: margin\n },\n marginX: {\n style: margin\n },\n marginY: {\n style: margin\n },\n marginInline: {\n style: margin\n },\n marginInlineStart: {\n style: margin\n },\n marginInlineEnd: {\n style: margin\n },\n marginBlock: {\n style: margin\n },\n marginBlockStart: {\n style: margin\n },\n marginBlockEnd: {\n style: margin\n },\n // display\n displayPrint: {\n cssProperty: false,\n transform: value => ({\n '@media print': {\n display: value\n }\n })\n },\n display: {},\n overflow: {},\n textOverflow: {},\n visibility: {},\n whiteSpace: {},\n // flexbox\n flexBasis: {},\n flexDirection: {},\n flexWrap: {},\n justifyContent: {},\n alignItems: {},\n alignContent: {},\n order: {},\n flex: {},\n flexGrow: {},\n flexShrink: {},\n alignSelf: {},\n justifyItems: {},\n justifySelf: {},\n // grid\n gap: {\n style: gap\n },\n rowGap: {\n style: rowGap\n },\n columnGap: {\n style: columnGap\n },\n gridColumn: {},\n gridRow: {},\n gridAutoFlow: {},\n gridAutoColumns: {},\n gridAutoRows: {},\n gridTemplateColumns: {},\n gridTemplateRows: {},\n gridTemplateAreas: {},\n gridArea: {},\n // positions\n position: {},\n zIndex: {\n themeKey: 'zIndex'\n },\n top: {},\n right: {},\n bottom: {},\n left: {},\n // shadows\n boxShadow: {\n themeKey: 'shadows'\n },\n // sizing\n width: {\n transform: sizingTransform\n },\n maxWidth: {\n style: maxWidth\n },\n minWidth: {\n transform: sizingTransform\n },\n height: {\n transform: sizingTransform\n },\n maxHeight: {\n transform: sizingTransform\n },\n minHeight: {\n transform: sizingTransform\n },\n boxSizing: {},\n // typography\n font: {\n themeKey: 'font'\n },\n fontFamily: {\n themeKey: 'typography'\n },\n fontSize: {\n themeKey: 'typography'\n },\n fontStyle: {\n themeKey: 'typography'\n },\n fontWeight: {\n themeKey: 'typography'\n },\n letterSpacing: {},\n textTransform: {},\n lineHeight: {},\n textAlign: {},\n typography: {\n cssProperty: false,\n themeKey: 'typography'\n }\n};\nexport default defaultSxConfig;","import capitalize from '@mui/utils/capitalize';\nimport merge from \"../merge/index.js\";\nimport { getPath, getStyleValue as getValue } from \"../style/index.js\";\nimport { handleBreakpoints, createEmptyBreakpointObject, removeUnusedBreakpoints } from \"../breakpoints/index.js\";\nimport { sortContainerQueries } from \"../cssContainerQueries/index.js\";\nimport defaultSxConfig from \"./defaultSxConfig.js\";\nfunction objectsHaveSameKeys(...objects) {\n const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);\n const union = new Set(allKeys);\n return objects.every(object => union.size === Object.keys(object).length);\n}\nfunction callIfFn(maybeFn, arg) {\n return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function unstable_createStyleFunctionSx() {\n function getThemeValue(prop, val, theme, config) {\n const props = {\n [prop]: val,\n theme\n };\n const options = config[prop];\n if (!options) {\n return {\n [prop]: val\n };\n }\n const {\n cssProperty = prop,\n themeKey,\n transform,\n style\n } = options;\n if (val == null) {\n return null;\n }\n\n // TODO v6: remove, see https://github.com/mui/material-ui/pull/38123\n if (themeKey === 'typography' && val === 'inherit') {\n return {\n [prop]: val\n };\n }\n const themeMapping = getPath(theme, themeKey) || {};\n if (style) {\n return style(props);\n }\n const styleFromPropValue = propValueFinal => {\n let value = getValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, val, styleFromPropValue);\n }\n function styleFunctionSx(props) {\n const {\n sx,\n theme = {},\n nested\n } = props || {};\n if (!sx) {\n return null; // Emotion & styled-components will neglect null\n }\n const config = theme.unstable_sxConfig ?? defaultSxConfig;\n\n /*\n * Receive `sxInput` as object or callback\n * and then recursively check keys & values to create media query object styles.\n * (the result will be used in `styled`)\n */\n function traverse(sxInput) {\n let sxObject = sxInput;\n if (typeof sxInput === 'function') {\n sxObject = sxInput(theme);\n } else if (typeof sxInput !== 'object') {\n // value\n return sxInput;\n }\n if (!sxObject) {\n return null;\n }\n const emptyBreakpoints = createEmptyBreakpointObject(theme.breakpoints);\n const breakpointsKeys = Object.keys(emptyBreakpoints);\n let css = emptyBreakpoints;\n Object.keys(sxObject).forEach(styleKey => {\n const value = callIfFn(sxObject[styleKey], theme);\n if (value !== null && value !== undefined) {\n if (typeof value === 'object') {\n if (config[styleKey]) {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n } else {\n const breakpointsValues = handleBreakpoints({\n theme\n }, value, x => ({\n [styleKey]: x\n }));\n if (objectsHaveSameKeys(breakpointsValues, value)) {\n css[styleKey] = styleFunctionSx({\n sx: value,\n theme,\n nested: true\n });\n } else {\n css = merge(css, breakpointsValues);\n }\n }\n } else {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n }\n }\n });\n if (!nested && theme.modularCssLayers) {\n return {\n '@layer sx': sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css))\n };\n }\n return sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css));\n }\n return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);\n }\n return styleFunctionSx;\n}\nconst styleFunctionSx = unstable_createStyleFunctionSx();\nstyleFunctionSx.filterProps = ['sx'];\nexport default styleFunctionSx;","/**\n * A universal utility to style components with multiple color modes. Always use it from the theme object.\n * It works with:\n * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)\n * - [CSS theme variables](https://mui.com/material-ui/customization/css-theme-variables/overview/)\n * - Zero-runtime engine\n *\n * Tips: Use an array over object spread and place `theme.applyStyles()` last.\n *\n * With the styled function:\n * ✅ [{ background: '#e5e5e5' }, theme.applyStyles('dark', { background: '#1c1c1c' })]\n * 🚫 { background: '#e5e5e5', ...theme.applyStyles('dark', { background: '#1c1c1c' })}\n *\n * With the sx prop:\n * ✅ [{ background: '#e5e5e5' }, theme => theme.applyStyles('dark', { background: '#1c1c1c' })]\n * 🚫 { background: '#e5e5e5', ...theme => theme.applyStyles('dark', { background: '#1c1c1c' })}\n *\n * @example\n * 1. using with `styled`:\n * ```jsx\n * const Component = styled('div')(({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]);\n * ```\n *\n * @example\n * 2. using with `sx` prop:\n * ```jsx\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]}\n * />\n * ```\n *\n * @example\n * 3. theming a component:\n * ```jsx\n * extendTheme({\n * components: {\n * MuiButton: {\n * styleOverrides: {\n * root: ({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ],\n * },\n * }\n * }\n * })\n *```\n */\nexport default function applyStyles(key, styles) {\n // @ts-expect-error this is 'any' type\n const theme = this;\n if (theme.vars) {\n if (!theme.colorSchemes?.[key] || typeof theme.getColorSchemeSelector !== 'function') {\n return {};\n }\n // If CssVarsProvider is used as a provider, returns '*:where({selector}) &'\n let selector = theme.getColorSchemeSelector(key);\n if (selector === '&') {\n return styles;\n }\n if (selector.includes('data-') || selector.includes('.')) {\n // '*' is required as a workaround for Emotion issue (https://github.com/emotion-js/emotion/issues/2836)\n selector = `*:where(${selector.replace(/\\s*&$/, '')}) &`;\n }\n return {\n [selector]: styles\n };\n }\n if (theme.palette.mode === key) {\n return styles;\n }\n return {};\n}","import deepmerge from '@mui/utils/deepmerge';\nimport createBreakpoints from \"../createBreakpoints/createBreakpoints.js\";\nimport cssContainerQueries from \"../cssContainerQueries/index.js\";\nimport shape from \"./shape.js\";\nimport createSpacing from \"./createSpacing.js\";\nimport styleFunctionSx from \"../styleFunctionSx/styleFunctionSx.js\";\nimport defaultSxConfig from \"../styleFunctionSx/defaultSxConfig.js\";\nimport applyStyles from \"./applyStyles.js\";\nfunction createTheme(options = {}, ...args) {\n const {\n breakpoints: breakpointsInput = {},\n palette: paletteInput = {},\n spacing: spacingInput,\n shape: shapeInput = {},\n ...other\n } = options;\n const breakpoints = createBreakpoints(breakpointsInput);\n const spacing = createSpacing(spacingInput);\n let muiTheme = deepmerge({\n breakpoints,\n direction: 'ltr',\n components: {},\n // Inject component definitions.\n palette: {\n mode: 'light',\n ...paletteInput\n },\n spacing,\n shape: {\n ...shape,\n ...shapeInput\n }\n }, other);\n muiTheme = cssContainerQueries(muiTheme);\n muiTheme.applyStyles = applyStyles;\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n muiTheme.unstable_sxConfig = {\n ...defaultSxConfig,\n ...other?.unstable_sxConfig\n };\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nexport default createTheme;","var isDevelopment = false;\n\n/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n return document.styleSheets[i];\n }\n } // this function should always return with a value\n // TS can't understand it though so we make it stop complaining here\n\n\n return undefined;\n}\n\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n\n tag.appendChild(document.createTextNode(''));\n tag.setAttribute('data-s', '');\n return tag;\n}\n\nvar StyleSheet = /*#__PURE__*/function () {\n // Using Node instead of HTMLElement since container may be a ShadowRoot\n function StyleSheet(options) {\n var _this = this;\n\n this._insertTag = function (tag) {\n var before;\n\n if (_this.tags.length === 0) {\n if (_this.insertionPoint) {\n before = _this.insertionPoint.nextSibling;\n } else if (_this.prepend) {\n before = _this.container.firstChild;\n } else {\n before = _this.before;\n }\n } else {\n before = _this.tags[_this.tags.length - 1].nextSibling;\n }\n\n _this.container.insertBefore(tag, before);\n\n _this.tags.push(tag);\n };\n\n this.isSpeedy = options.speedy === undefined ? !isDevelopment : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.prepend = options.prepend;\n this.insertionPoint = options.insertionPoint;\n this.before = null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.hydrate = function hydrate(nodes) {\n nodes.forEach(this._insertTag);\n };\n\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n this._insertTag(createStyleElement(this));\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n\n try {\n // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n\n this.ctr++;\n };\n\n _proto.flush = function flush() {\n this.tags.forEach(function (tag) {\n var _tag$parentNode;\n\n return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n };\n\n return StyleSheet;\n}();\n\nexport { StyleSheet };\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\n","import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen, sizeof} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\tvar length = sizeof(children)\n\n\tfor (var i = 0; i < length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: element.value = element.props.join(',')\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f') != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @return {object}\n */\nexport function comment (value, root, parent) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @return {object}\n */\nexport function declaration (value, root, parent, length) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)\n}\n","import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, slice, position, RULESET, combine, match, serialize, copy, replace, WEBKIT, MOZ, MS, KEYFRAMES, DECLARATION, hash, charat, strlen, indexof, stringify, rulesheet, middleware, compile } from 'stylis';\nimport '@emotion/weak-memoize';\nimport '@emotion/memoize';\n\nvar identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {\n var previous = 0;\n var character = 0;\n\n while (true) {\n previous = character;\n character = peek(); // &\\f\n\n if (previous === 38 && character === 12) {\n points[index] = 1;\n }\n\n if (token(character)) {\n break;\n }\n\n next();\n }\n\n return slice(begin, position);\n};\n\nvar toRules = function toRules(parsed, points) {\n // pretend we've started with a comma\n var index = -1;\n var character = 44;\n\n do {\n switch (token(character)) {\n case 0:\n // &\\f\n if (character === 38 && peek() === 12) {\n // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n // and when it should just concatenate the outer and inner selectors\n // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n points[index] = 1;\n }\n\n parsed[index] += identifierWithPointTracking(position - 1, points, index);\n break;\n\n case 2:\n parsed[index] += delimit(character);\n break;\n\n case 4:\n // comma\n if (character === 44) {\n // colon\n parsed[++index] = peek() === 58 ? '&\\f' : '';\n points[index] = parsed[index].length;\n break;\n }\n\n // fallthrough\n\n default:\n parsed[index] += from(character);\n }\n } while (character = next());\n\n return parsed;\n};\n\nvar getRules = function getRules(value, points) {\n return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo\n // negative .length indicates that this rule has been already prefixed\n element.length < 1) {\n return;\n }\n\n var value = element.value;\n var parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n\n while (parent.type !== 'rule') {\n parent = parent.parent;\n if (!parent) return;\n } // short-circuit for the simplest case\n\n\n if (element.props.length === 1 && value.charCodeAt(0) !== 58\n /* colon */\n && !fixedElements.get(parent)) {\n return;\n } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n\n if (isImplicitRule) {\n return;\n }\n\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel(element) {\n if (element.type === 'decl') {\n var value = element.value;\n\n if ( // charcode for l\n value.charCodeAt(0) === 108 && // charcode for b\n value.charCodeAt(2) === 98) {\n // this ignores label\n element[\"return\"] = '';\n element.value = '';\n }\n }\n};\n\n/* eslint-disable no-fallthrough */\n\nfunction prefix(value, length) {\n switch (hash(value, length)) {\n // color-adjust\n case 5103:\n return WEBKIT + 'print-' + value + value;\n // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\n case 5737:\n case 4201:\n case 3177:\n case 3433:\n case 1641:\n case 4457:\n case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\n case 5572:\n case 6356:\n case 5844:\n case 3191:\n case 6645:\n case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\n case 4215:\n case 6389:\n case 5109:\n case 5365:\n case 5621:\n case 3829:\n return WEBKIT + value + value;\n // appearance, user-select, transform, hyphens, text-size-adjust\n\n case 5349:\n case 4246:\n case 4810:\n case 6968:\n case 2756:\n return WEBKIT + value + MOZ + value + MS + value + value;\n // flex, flex-direction\n\n case 6828:\n case 4268:\n return WEBKIT + value + MS + value + value;\n // order\n\n case 6165:\n return WEBKIT + value + MS + 'flex-' + value + value;\n // align-items\n\n case 5187:\n return WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;\n // align-self\n\n case 5443:\n return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;\n // align-content\n\n case 4675:\n return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;\n // flex-shrink\n\n case 5548:\n return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;\n // flex-basis\n\n case 5292:\n return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;\n // flex-grow\n\n case 6060:\n return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;\n // transition\n\n case 4554:\n return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;\n // cursor\n\n case 6187:\n return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;\n // background, background-image\n\n case 5495:\n case 3959:\n return replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1');\n // justify-content\n\n case 4968:\n return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;\n // (margin|padding)-inline-(start|end)\n\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;\n // (min|max)?(width|height|inline-size|block-size)\n\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n // stretch, max-content, min-content, fill-available\n if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {\n // (m)ax-content, (m)in-content\n case 109:\n // -\n if (charat(value, length + 4) !== 45) break;\n // (f)ill-available, (f)it-content\n\n case 102:\n return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;\n // (s)tretch\n\n case 115:\n return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;\n }\n break;\n // position: sticky\n\n case 4949:\n // (s)ticky?\n if (charat(value, length + 1) !== 115) break;\n // display: (flex|inline-flex)\n\n case 6444:\n switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n // stic(k)y\n case 107:\n return replace(value, ':', ':' + WEBKIT) + value;\n // (inline-)?fl(e)x\n\n case 101:\n return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;\n }\n\n break;\n // writing-mode\n\n case 5936:\n switch (charat(value, length + 11)) {\n // vertical-l(r)\n case 114:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value;\n // vertical-r(l)\n\n case 108:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value;\n // horizontal(-)tb\n\n case 45:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value;\n }\n\n return WEBKIT + value + MS + value + value;\n }\n\n return value;\n}\n\nvar prefixer = function prefixer(element, index, children, callback) {\n if (element.length > -1) if (!element[\"return\"]) switch (element.type) {\n case DECLARATION:\n element[\"return\"] = prefix(element.value, element.length);\n break;\n\n case KEYFRAMES:\n return serialize([copy(element, {\n value: replace(element.value, '@', '@' + WEBKIT)\n })], callback);\n\n case RULESET:\n if (element.length) return combine(element.props, function (value) {\n switch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n // :read-(only|write)\n case ':read-only':\n case ':read-write':\n return serialize([copy(element, {\n props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]\n })], callback);\n // :placeholder\n\n case '::placeholder':\n return serialize([copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]\n })], callback);\n }\n\n return '';\n });\n }\n};\n\nvar defaultStylisPlugins = [prefixer];\n\nvar createCache = function createCache(options) {\n var key = options.key;\n\n if (key === 'css') {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n // note this very very intentionally targets all style elements regardless of the key to ensure\n // that creating a cache works inside of render of a React component\n\n Array.prototype.forEach.call(ssrStyles, function (node) {\n // we want to only move elements which have a space in the data-emotion attribute value\n // because that indicates that it is an Emotion 11 server-side rendered style elements\n // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n // will not result in the Emotion 10 styles being destroyed\n var dataEmotionAttribute = node.getAttribute('data-emotion');\n\n if (dataEmotionAttribute.indexOf(' ') === -1) {\n return;\n }\n\n document.head.appendChild(node);\n node.setAttribute('data-s', '');\n });\n }\n\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n\n var inserted = {};\n var container;\n var nodesToHydrate = [];\n\n {\n container = options.container || document.head;\n Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node) {\n var attrib = node.getAttribute(\"data-emotion\").split(' ');\n\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n\n nodesToHydrate.push(node);\n });\n }\n\n var _insert;\n\n var omnipresentPlugins = [compat, removeLabel];\n\n {\n var currentSheet;\n var finalizingPlugins = [stringify, rulesheet(function (rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n\n var stylis = function stylis(styles) {\n return serialize(compile(styles), serializer);\n };\n\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n currentSheet = sheet;\n\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n }\n\n var cache = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend,\n insertionPoint: options.insertionPoint\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\n\nexport { createCache as default };\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine} from './Utility.js'\nimport {copy, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\treturn serialize([copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]})], callback)\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\treturn serialize([\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]})\n\t\t\t\t\t\t\t\t\t], callback)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n","var isBrowser = true;\n\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else if (className) {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false ) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles, registerStyles };\n","var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n scale: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport { unitlessKeys as default };\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar isDevelopment = false;\n\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nvar noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n\n var componentSelector = interpolation;\n\n if (componentSelector.__emotion_styles !== undefined) {\n\n return componentSelector;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n var keyframes = interpolation;\n\n if (keyframes.anim === 1) {\n cursor = {\n name: keyframes.name,\n styles: keyframes.styles,\n next: cursor\n };\n return keyframes.name;\n }\n\n var serializedStyles = interpolation;\n\n if (serializedStyles.styles !== undefined) {\n var next = serializedStyles.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = serializedStyles.styles + \";\";\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n }\n\n break;\n }\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n var asString = interpolation;\n\n if (registered == null) {\n return asString;\n }\n\n var cached = registered[asString];\n return cached !== undefined ? cached : asString;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var key in obj) {\n var value = obj[key];\n\n if (typeof value !== 'object') {\n var asString = value;\n\n if (registered != null && registered[asString] !== undefined) {\n string += key + \"{\" + registered[asString] + \"}\";\n } else if (isProcessableValue(asString)) {\n string += processStyleName(key) + \":\" + processStyleValue(key, asString) + \";\";\n }\n } else {\n if (key === 'NO_COMPONENT_SELECTOR' && isDevelopment) {\n throw new Error(noComponentSelectorMessage);\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(key) + \":\" + processStyleValue(key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n\n string += key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;{]+)\\s*(;|$)/g; // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\nvar cursor;\nfunction serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n var asTemplateStringsArr = strings;\n\n styles += asTemplateStringsArr[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n\n if (stringMode) {\n var templateStringsArr = strings;\n\n styles += templateStringsArr[i];\n }\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n}\n\nexport { serializeStyles };\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport { murmur2 as default };\n","import * as React from 'react';\n\nvar syncFallback = function syncFallback(create) {\n return create();\n};\n\nvar useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;\nvar useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;\nvar useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;\n\nexport { useInsertionEffectAlwaysWithSyncFallback, useInsertionEffectWithLayoutFallback };\n","import * as React from 'react';\nimport { useContext, forwardRef } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\n\nvar isDevelopment = false;\n\nvar EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n return /*#__PURE__*/forwardRef(function (props, ref) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nvar ThemeContext = /* #__PURE__ */React.createContext({});\n\nvar useTheme = function useTheme() {\n return React.useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n return mergedTheme;\n }\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = React.useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n var WithTheme = /*#__PURE__*/React.forwardRef(function render(props, ref) {\n var theme = React.useContext(ThemeContext);\n return /*#__PURE__*/React.createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n });\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\n\nvar hasOwn = {}.hasOwnProperty;\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n\n var newProps = {};\n\n for (var _key in props) {\n if (hasOwn.call(props, _key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps[typePropName] = type; // Runtime labeling is an opt-in feature because:\n\n return newProps;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var WrappedComponent = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));\n\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var _key2 in props) {\n if (hasOwn.call(props, _key2) && _key2 !== 'css' && _key2 !== typePropName && (!isDevelopment )) {\n newProps[_key2] = props[_key2];\n }\n }\n\n newProps.className = className;\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof WrappedComponent === 'string'\n }), /*#__PURE__*/React.createElement(WrappedComponent, newProps));\n});\n\nvar Emotion$1 = Emotion;\n\nexport { CacheProvider as C, Emotion$1 as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwn as h, isDevelopment as i, useTheme as u, withEmotionCache as w };\n","'use client';\n\nimport * as React from 'react';\nimport { ThemeContext } from '@mui/styled-engine';\nfunction isObjectEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction useTheme(defaultTheme = null) {\n const contextTheme = React.useContext(ThemeContext);\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\nexport default useTheme;","'use client';\n\nimport createTheme from \"../createTheme/index.js\";\nimport useThemeWithoutDefault from \"../useThemeWithoutDefault/index.js\";\nexport const systemDefaultTheme = createTheme();\nfunction useTheme(defaultTheme = systemDefaultTheme) {\n return useThemeWithoutDefault(defaultTheme);\n}\nexport default useTheme;","function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {\n return Math.max(min, Math.min(val, max));\n}\nexport default clamp;","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport clamp from '@mui/utils/clamp';\n\n/**\n * Returns a number whose value is limited to the given range.\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clampWrapper(value, min = 0, max = 1) {\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);\n }\n }\n return clamp(value, min, max);\n}\n\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\nexport function hexToRgb(color) {\n color = color.slice(1);\n const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');\n let colors = color.match(re);\n if (colors && colors[0].length === 1) {\n colors = colors.map(n => n + n);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (color.length !== color.trim().length) {\n console.error(`MUI: The color: \"${color}\" is invalid. Make sure the color input doesn't contain leading/trailing space.`);\n }\n }\n return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', ')})` : '';\n}\nfunction intToHex(int) {\n const hex = int.toString(16);\n return hex.length === 1 ? `0${hex}` : hex;\n}\n\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\nexport function decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n const marker = color.indexOf('(');\n const type = color.substring(0, marker);\n if (!['rgb', 'rgba', 'hsl', 'hsla', 'color'].includes(type)) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Unsupported \\`${color}\\` color.\\n` + 'The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().' : _formatMuiErrorMessage(9, color));\n }\n let values = color.substring(marker + 1, color.length - 1);\n let colorSpace;\n if (type === 'color') {\n values = values.split(' ');\n colorSpace = values.shift();\n if (values.length === 4 && values[3].charAt(0) === '/') {\n values[3] = values[3].slice(1);\n }\n if (!['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].includes(colorSpace)) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: unsupported \\`${colorSpace}\\` color space.\\n` + 'The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.' : _formatMuiErrorMessage(10, colorSpace));\n }\n } else {\n values = values.split(',');\n }\n values = values.map(value => parseFloat(value));\n return {\n type,\n values,\n colorSpace\n };\n}\n\n/**\n * Returns a channel created from the input color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {string} - The channel for the color, that can be used in rgba or hsla colors\n */\nexport const colorChannel = color => {\n const decomposedColor = decomposeColor(color);\n return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.includes('hsl') && idx !== 0 ? `${val}%` : val).join(' ');\n};\nexport const private_safeColorChannel = (color, warning) => {\n try {\n return colorChannel(color);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n};\n\n/**\n * Converts a color object with type and values to a string.\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\nexport function recomposeColor(color) {\n const {\n type,\n colorSpace\n } = color;\n let {\n values\n } = color;\n if (type.includes('rgb')) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);\n } else if (type.includes('hsl')) {\n values[1] = `${values[1]}%`;\n values[2] = `${values[2]}%`;\n }\n if (type.includes('color')) {\n values = `${colorSpace} ${values.join(' ')}`;\n } else {\n values = `${values.join(', ')}`;\n }\n return `${type}(${values})`;\n}\n\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\nexport function rgbToHex(color) {\n // Idempotent\n if (color.startsWith('#')) {\n return color;\n }\n const {\n values\n } = decomposeColor(color);\n return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;\n}\n\n/**\n * Converts a color from hsl format to rgb format.\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\nexport function hslToRgb(color) {\n color = decomposeColor(color);\n const {\n values\n } = color;\n const h = values[0];\n const s = values[1] / 100;\n const l = values[2] / 100;\n const a = s * Math.min(l, 1 - l);\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n let type = 'rgb';\n const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n return recomposeColor({\n type,\n values: rgb\n });\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\nexport function getLuminance(color) {\n color = decomposeColor(color);\n let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(val => {\n if (color.type !== 'color') {\n val /= 255; // normalized\n }\n return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;\n });\n\n // Truncate at 3 digits\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\nexport function getContrastRatio(foreground, background) {\n const lumA = getLuminance(foreground);\n const lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n\n/**\n * Sets the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} value - value to set the alpha channel to in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function alpha(color, value) {\n color = decomposeColor(color);\n value = clampWrapper(value);\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n if (color.type === 'color') {\n color.values[3] = `/${value}`;\n } else {\n color.values[3] = value;\n }\n return recomposeColor(color);\n}\nexport function private_safeAlpha(color, value, warning) {\n try {\n return alpha(color, value);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darkens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.includes('hsl')) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.includes('rgb') || color.type.includes('color')) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeDarken(color, coefficient, warning) {\n try {\n return darken(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Lightens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.includes('hsl')) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.includes('rgb')) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n } else if (color.type.includes('color')) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (1 - color.values[i]) * coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeLighten(color, coefficient, warning) {\n try {\n return lighten(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function emphasize(color, coefficient = 0.15) {\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\nexport function private_safeEmphasize(color, coefficient, warning) {\n try {\n return emphasize(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Blend a transparent overlay color with a background color, resulting in a single\n * RGB color.\n * @param {string} background - CSS color\n * @param {string} overlay - CSS color\n * @param {number} opacity - Opacity multiplier in the range 0 - 1\n * @param {number} [gamma=1.0] - Gamma correction factor. For gamma-correct blending, 2.2 is usual.\n */\nexport function blend(background, overlay, opacity, gamma = 1.0) {\n const blendChannel = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma);\n const backgroundColor = decomposeColor(background);\n const overlayColor = decomposeColor(overlay);\n const rgb = [blendChannel(backgroundColor.values[0], overlayColor.values[0]), blendChannel(backgroundColor.values[1], overlayColor.values[1]), blendChannel(backgroundColor.values[2], overlayColor.values[2])];\n return recomposeColor({\n type: 'rgb',\n values: rgb\n });\n}","const common = {\n black: '#000',\n white: '#fff'\n};\nexport default common;","const grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#f5f5f5',\n A200: '#eeeeee',\n A400: '#bdbdbd',\n A700: '#616161'\n};\nexport default grey;","const purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\nexport default purple;","const red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nexport default red;","const orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nexport default orange;","const blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nexport default blue;","const lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\nexport default lightBlue;","const green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nexport default green;","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nimport deepmerge from '@mui/utils/deepmerge';\nimport { darken, getContrastRatio, lighten } from '@mui/system/colorManipulator';\nimport common from \"../colors/common.js\";\nimport grey from \"../colors/grey.js\";\nimport purple from \"../colors/purple.js\";\nimport red from \"../colors/red.js\";\nimport orange from \"../colors/orange.js\";\nimport blue from \"../colors/blue.js\";\nimport lightBlue from \"../colors/lightBlue.js\";\nimport green from \"../colors/green.js\";\nfunction getLight() {\n return {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.6)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: common.white,\n default: common.white\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n };\n}\nexport const light = getLight();\nfunction getDark() {\n return {\n text: {\n primary: common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: '#121212',\n default: '#121212'\n },\n action: {\n active: common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n };\n}\nexport const dark = getDark();\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n const tonalOffsetLight = tonalOffset.light || tonalOffset;\n const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = lighten(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = darken(intent.main, tonalOffsetDark);\n }\n }\n}\nfunction getDefaultPrimary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: blue[200],\n light: blue[50],\n dark: blue[400]\n };\n }\n return {\n main: blue[700],\n light: blue[400],\n dark: blue[800]\n };\n}\nfunction getDefaultSecondary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: purple[200],\n light: purple[50],\n dark: purple[400]\n };\n }\n return {\n main: purple[500],\n light: purple[300],\n dark: purple[700]\n };\n}\nfunction getDefaultError(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: red[500],\n light: red[300],\n dark: red[700]\n };\n }\n return {\n main: red[700],\n light: red[400],\n dark: red[800]\n };\n}\nfunction getDefaultInfo(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: lightBlue[400],\n light: lightBlue[300],\n dark: lightBlue[700]\n };\n }\n return {\n main: lightBlue[700],\n light: lightBlue[500],\n dark: lightBlue[900]\n };\n}\nfunction getDefaultSuccess(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: green[400],\n light: green[300],\n dark: green[700]\n };\n }\n return {\n main: green[800],\n light: green[500],\n dark: green[900]\n };\n}\nfunction getDefaultWarning(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: orange[400],\n light: orange[300],\n dark: orange[700]\n };\n }\n return {\n main: '#ed6c02',\n // closest to orange[800] that pass 3:1.\n light: orange[500],\n dark: orange[900]\n };\n}\nexport default function createPalette(palette) {\n const {\n mode = 'light',\n contrastThreshold = 3,\n tonalOffset = 0.2,\n ...other\n } = palette;\n const primary = palette.primary || getDefaultPrimary(mode);\n const secondary = palette.secondary || getDefaultSecondary(mode);\n const error = palette.error || getDefaultError(mode);\n const info = palette.info || getDefaultInfo(mode);\n const success = palette.success || getDefaultSuccess(mode);\n const warning = palette.warning || getDefaultWarning(mode);\n\n // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n function getContrastText(background) {\n const contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n if (process.env.NODE_ENV !== 'production') {\n const contrast = getContrastRatio(background, contrastText);\n if (contrast < 3) {\n console.error([`MUI: The contrast ratio of ${contrast}:1 for ${contrastText} on ${background}`, 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n return contrastText;\n }\n const augmentColor = ({\n color,\n name,\n mainShade = 500,\n lightShade = 300,\n darkShade = 700\n }) => {\n color = {\n ...color\n };\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n if (!color.hasOwnProperty('main')) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\\n` + `The color object needs to have a \\`main\\` property or a \\`${mainShade}\\` property.` : _formatMuiErrorMessage(11, name ? ` (${name})` : '', mainShade));\n }\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\\n` + `\\`color.main\\` should be a string, but \\`${JSON.stringify(color.main)}\\` was provided instead.\\n` + '\\n' + 'Did you intend to use one of the following approaches?\\n' + '\\n' + 'import { green } from \"@mui/material/colors\";\\n' + '\\n' + 'const theme1 = createTheme({ palette: {\\n' + ' primary: green,\\n' + '} });\\n' + '\\n' + 'const theme2 = createTheme({ palette: {\\n' + ' primary: { main: green[500] },\\n' + '} });' : _formatMuiErrorMessage(12, name ? ` (${name})` : '', JSON.stringify(color.main)));\n }\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n return color;\n };\n let modeHydrated;\n if (mode === 'light') {\n modeHydrated = getLight();\n } else if (mode === 'dark') {\n modeHydrated = getDark();\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!modeHydrated) {\n console.error(`MUI: The palette mode \\`${mode}\\` is not supported.`);\n }\n }\n const paletteOutput = deepmerge({\n // A collection of common colors.\n common: {\n ...common\n },\n // prevent mutable object.\n // The palette mode, can be light or dark.\n mode,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor({\n color: primary,\n name: 'primary'\n }),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor({\n color: secondary,\n name: 'secondary',\n mainShade: 'A400',\n lightShade: 'A200',\n darkShade: 'A700'\n }),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor({\n color: error,\n name: 'error'\n }),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor({\n color: warning,\n name: 'warning'\n }),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor({\n color: info,\n name: 'info'\n }),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor({\n color: success,\n name: 'success'\n }),\n // The grey colors.\n grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText,\n // Generate a rich color object.\n augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset,\n // The light and dark mode object.\n ...modeHydrated\n }, other);\n return paletteOutput;\n}","/**\n * The benefit of this function is to help developers get CSS var from theme without specifying the whole variable\n * and they does not need to remember the prefix (defined once).\n */\nexport default function createGetCssVar(prefix = '') {\n function appendVar(...vars) {\n if (!vars.length) {\n return '';\n }\n const value = vars[0];\n if (typeof value === 'string' && !value.match(/(#|\\(|\\)|(-?(\\d*\\.)?\\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\\d*\\.)?\\d+)$|(\\d+ \\d+ \\d+)/)) {\n return `, var(--${prefix ? `${prefix}-` : ''}${value}${appendVar(...vars.slice(1))})`;\n }\n return `, ${value}`;\n }\n\n // AdditionalVars makes `getCssVar` less strict, so it can be use like this `getCssVar('non-mui-variable')` without type error.\n const getCssVar = (field, ...fallbacks) => {\n return `var(--${prefix ? `${prefix}-` : ''}${field}${appendVar(...fallbacks)})`;\n };\n return getCssVar;\n}","export default function prepareTypographyVars(typography) {\n const vars = {};\n const entries = Object.entries(typography);\n entries.forEach(entry => {\n const [key, value] = entry;\n if (typeof value === 'object') {\n vars[key] = `${value.fontStyle ? `${value.fontStyle} ` : ''}${value.fontVariant ? `${value.fontVariant} ` : ''}${value.fontWeight ? `${value.fontWeight} ` : ''}${value.fontStretch ? `${value.fontStretch} ` : ''}${value.fontSize || ''}${value.lineHeight ? `/${value.lineHeight} ` : ''}${value.fontFamily || ''}`;\n }\n });\n return vars;\n}","/**\n * This function create an object from keys, value and then assign to target\n *\n * @param {Object} obj : the target object to be assigned\n * @param {string[]} keys\n * @param {string | number} value\n *\n * @example\n * const source = {}\n * assignNestedKeys(source, ['palette', 'primary'], 'var(--palette-primary)')\n * console.log(source) // { palette: { primary: 'var(--palette-primary)' } }\n *\n * @example\n * const source = { palette: { primary: 'var(--palette-primary)' } }\n * assignNestedKeys(source, ['palette', 'secondary'], 'var(--palette-secondary)')\n * console.log(source) // { palette: { primary: 'var(--palette-primary)', secondary: 'var(--palette-secondary)' } }\n */\nexport const assignNestedKeys = (obj, keys, value, arrayKeys = []) => {\n let temp = obj;\n keys.forEach((k, index) => {\n if (index === keys.length - 1) {\n if (Array.isArray(temp)) {\n temp[Number(k)] = value;\n } else if (temp && typeof temp === 'object') {\n temp[k] = value;\n }\n } else if (temp && typeof temp === 'object') {\n if (!temp[k]) {\n temp[k] = arrayKeys.includes(k) ? [] : {};\n }\n temp = temp[k];\n }\n });\n};\n\n/**\n *\n * @param {Object} obj : source object\n * @param {Function} callback : a function that will be called when\n * - the deepest key in source object is reached\n * - the value of the deepest key is NOT `undefined` | `null`\n *\n * @example\n * walkObjectDeep({ palette: { primary: { main: '#000000' } } }, console.log)\n * // ['palette', 'primary', 'main'] '#000000'\n */\nexport const walkObjectDeep = (obj, callback, shouldSkipPaths) => {\n function recurse(object, parentKeys = [], arrayKeys = []) {\n Object.entries(object).forEach(([key, value]) => {\n if (!shouldSkipPaths || shouldSkipPaths && !shouldSkipPaths([...parentKeys, key])) {\n if (value !== undefined && value !== null) {\n if (typeof value === 'object' && Object.keys(value).length > 0) {\n recurse(value, [...parentKeys, key], Array.isArray(value) ? [...arrayKeys, key] : arrayKeys);\n } else {\n callback([...parentKeys, key], value, arrayKeys);\n }\n }\n }\n });\n }\n recurse(obj);\n};\nconst getCssValue = (keys, value) => {\n if (typeof value === 'number') {\n if (['lineHeight', 'fontWeight', 'opacity', 'zIndex'].some(prop => keys.includes(prop))) {\n // CSS property that are unitless\n return value;\n }\n const lastKey = keys[keys.length - 1];\n if (lastKey.toLowerCase().includes('opacity')) {\n // opacity values are unitless\n return value;\n }\n return `${value}px`;\n }\n return value;\n};\n\n/**\n * a function that parse theme and return { css, vars }\n *\n * @param {Object} theme\n * @param {{\n * prefix?: string,\n * shouldSkipGeneratingVar?: (objectPathKeys: Array, value: string | number) => boolean\n * }} options.\n * `prefix`: The prefix of the generated CSS variables. This function does not change the value.\n *\n * @returns {{ css: Object, vars: Object }} `css` is the stylesheet, `vars` is an object to get css variable (same structure as theme).\n *\n * @example\n * const { css, vars } = parser({\n * fontSize: 12,\n * lineHeight: 1.2,\n * palette: { primary: { 500: 'var(--color)' } }\n * }, { prefix: 'foo' })\n *\n * console.log(css) // { '--foo-fontSize': '12px', '--foo-lineHeight': 1.2, '--foo-palette-primary-500': 'var(--color)' }\n * console.log(vars) // { fontSize: 'var(--foo-fontSize)', lineHeight: 'var(--foo-lineHeight)', palette: { primary: { 500: 'var(--foo-palette-primary-500)' } } }\n */\nexport default function cssVarsParser(theme, options) {\n const {\n prefix,\n shouldSkipGeneratingVar\n } = options || {};\n const css = {};\n const vars = {};\n const varsWithDefaults = {};\n walkObjectDeep(theme, (keys, value, arrayKeys) => {\n if (typeof value === 'string' || typeof value === 'number') {\n if (!shouldSkipGeneratingVar || !shouldSkipGeneratingVar(keys, value)) {\n // only create css & var if `shouldSkipGeneratingVar` return false\n const cssVar = `--${prefix ? `${prefix}-` : ''}${keys.join('-')}`;\n const resolvedValue = getCssValue(keys, value);\n Object.assign(css, {\n [cssVar]: resolvedValue\n });\n assignNestedKeys(vars, keys, `var(${cssVar})`, arrayKeys);\n assignNestedKeys(varsWithDefaults, keys, `var(${cssVar}, ${resolvedValue})`, arrayKeys);\n }\n }\n }, keys => keys[0] === 'vars' // skip 'vars/*' paths\n );\n return {\n css,\n vars,\n varsWithDefaults\n };\n}","import deepmerge from '@mui/utils/deepmerge';\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst caseAllCaps = {\n textTransform: 'uppercase'\n};\nconst defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n\n/**\n * @see @link{https://m2.material.io/design/typography/the-type-system.html}\n * @see @link{https://m2.material.io/design/typography/understanding-typography.html}\n */\nexport default function createTypography(palette, typography) {\n const {\n fontFamily = defaultFontFamily,\n // The default font size of the Material Specification.\n fontSize = 14,\n // px\n fontWeightLight = 300,\n fontWeightRegular = 400,\n fontWeightMedium = 500,\n fontWeightBold = 700,\n // Tell MUI what's the font-size on the html element.\n // 16px is the default font-size used by browsers.\n htmlFontSize = 16,\n // Apply the CSS properties to all the variants.\n allVariants,\n pxToRem: pxToRem2,\n ...other\n } = typeof typography === 'function' ? typography(palette) : typography;\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('MUI: `fontSize` is required to be a number.');\n }\n if (typeof htmlFontSize !== 'number') {\n console.error('MUI: `htmlFontSize` is required to be a number.');\n }\n }\n const coef = fontSize / 14;\n const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);\n const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => ({\n fontFamily,\n fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight,\n // The letter spacing was designed for the Roboto font-family. Using the same letter-spacing\n // across font-families can cause issues with the kerning.\n ...(fontFamily === defaultFontFamily ? {\n letterSpacing: `${round(letterSpacing / size)}em`\n } : {}),\n ...casing,\n ...allVariants\n });\n const variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),\n // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types.\n inherit: {\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n fontSize: 'inherit',\n lineHeight: 'inherit',\n letterSpacing: 'inherit'\n }\n };\n return deepmerge({\n htmlFontSize,\n pxToRem,\n fontFamily,\n fontSize,\n fontWeightLight,\n fontWeightRegular,\n fontWeightMedium,\n fontWeightBold,\n ...variants\n }, other, {\n clone: false // No need to clone deep\n });\n}","const shadowKeyUmbraOpacity = 0.2;\nconst shadowKeyPenumbraOpacity = 0.14;\nconst shadowAmbientShadowOpacity = 0.12;\nfunction createShadow(...px) {\n return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(',');\n}\n\n// Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\nconst shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nexport default shadows;","// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nexport const easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n};\n\n// Follow https://m2.material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\nexport const duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\nfunction formatMs(milliseconds) {\n return `${Math.round(milliseconds)}ms`;\n}\nfunction getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n const constant = height / 36;\n\n // https://www.desmos.com/calculator/vbrp3ggqet\n return Math.min(Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10), 3000);\n}\nexport default function createTransitions(inputTransitions) {\n const mergedEasing = {\n ...easing,\n ...inputTransitions.easing\n };\n const mergedDuration = {\n ...duration,\n ...inputTransitions.duration\n };\n const create = (props = ['all'], options = {}) => {\n const {\n duration: durationOption = mergedDuration.standard,\n easing: easingOption = mergedEasing.easeInOut,\n delay = 0,\n ...other\n } = options;\n if (process.env.NODE_ENV !== 'production') {\n const isString = value => typeof value === 'string';\n const isNumber = value => !Number.isNaN(parseFloat(value));\n if (!isString(props) && !Array.isArray(props)) {\n console.error('MUI: Argument \"props\" must be a string or Array.');\n }\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(`MUI: Argument \"duration\" must be a number or a string but found ${durationOption}.`);\n }\n if (!isString(easingOption)) {\n console.error('MUI: Argument \"easing\" must be a string.');\n }\n if (!isNumber(delay) && !isString(delay)) {\n console.error('MUI: Argument \"delay\" must be a number or a string.');\n }\n if (typeof options !== 'object') {\n console.error(['MUI: Secong argument of transition.create must be an object.', \"Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`\"].join('\\n'));\n }\n if (Object.keys(other).length !== 0) {\n console.error(`MUI: Unrecognized argument(s) [${Object.keys(other).join(',')}].`);\n }\n }\n return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');\n };\n return {\n getAutoHeightDuration,\n create,\n ...inputTransitions,\n easing: mergedEasing,\n duration: mergedDuration\n };\n}","// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nconst zIndex = {\n mobileStepper: 1000,\n fab: 1050,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nexport default zIndex;","/* eslint-disable import/prefer-default-export */\nimport { isPlainObject } from '@mui/utils/deepmerge';\nfunction isSerializable(val) {\n return isPlainObject(val) || typeof val === 'undefined' || typeof val === 'string' || typeof val === 'boolean' || typeof val === 'number' || Array.isArray(val);\n}\n\n/**\n * `baseTheme` usually comes from `createTheme()` or `extendTheme()`.\n *\n * This function is intended to be used with zero-runtime CSS-in-JS like Pigment CSS\n * For example, in a Next.js project:\n *\n * ```js\n * // next.config.js\n * const { extendTheme } = require('@mui/material/styles');\n *\n * const theme = extendTheme();\n * // `.toRuntimeSource` is Pigment CSS specific to create a theme that is available at runtime.\n * theme.toRuntimeSource = stringifyTheme;\n *\n * module.exports = withPigment({\n * theme,\n * });\n * ```\n */\nexport function stringifyTheme(baseTheme = {}) {\n const serializableTheme = {\n ...baseTheme\n };\n function serializeTheme(object) {\n const array = Object.entries(object);\n // eslint-disable-next-line no-plusplus\n for (let index = 0; index < array.length; index++) {\n const [key, value] = array[index];\n if (!isSerializable(value) || key.startsWith('unstable_')) {\n delete object[key];\n } else if (isPlainObject(value)) {\n object[key] = {\n ...value\n };\n serializeTheme(object[key]);\n }\n }\n }\n serializeTheme(serializableTheme);\n return `import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';\n\nconst theme = ${JSON.stringify(serializableTheme, null, 2)};\n\ntheme.breakpoints = createBreakpoints(theme.breakpoints || {});\ntheme.transitions = createTransitions(theme.transitions || {});\n\nexport default theme;`;\n}","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nimport deepmerge from '@mui/utils/deepmerge';\nimport styleFunctionSx, { unstable_defaultSxConfig as defaultSxConfig } from '@mui/system/styleFunctionSx';\nimport systemCreateTheme from '@mui/system/createTheme';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport createMixins from \"./createMixins.js\";\nimport createPalette from \"./createPalette.js\";\nimport createTypography from \"./createTypography.js\";\nimport shadows from \"./shadows.js\";\nimport createTransitions from \"./createTransitions.js\";\nimport zIndex from \"./zIndex.js\";\nimport { stringifyTheme } from \"./stringifyTheme.js\";\nfunction createThemeNoVars(options = {}, ...args) {\n const {\n breakpoints: breakpointsInput,\n mixins: mixinsInput = {},\n spacing: spacingInput,\n palette: paletteInput = {},\n transitions: transitionsInput = {},\n typography: typographyInput = {},\n shape: shapeInput,\n ...other\n } = options;\n if (options.vars &&\n // The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.\n // `generateThemeVars` is the closest identifier for checking that the `options` is a result of `createTheme` with CSS variables so that user can create new theme for nested ThemeProvider.\n options.generateThemeVars === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI: `vars` is a private field used for CSS variables support.\\n' + 'Please use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : _formatMuiErrorMessage(20));\n }\n const palette = createPalette(paletteInput);\n const systemTheme = systemCreateTheme(options);\n let muiTheme = deepmerge(systemTheme, {\n mixins: createMixins(systemTheme.breakpoints, mixinsInput),\n palette,\n // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.\n shadows: shadows.slice(),\n typography: createTypography(palette, typographyInput),\n transitions: createTransitions(transitionsInput),\n zIndex: {\n ...zIndex\n }\n });\n muiTheme = deepmerge(muiTheme, other);\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n if (process.env.NODE_ENV !== 'production') {\n // TODO v6: Refactor to use globalStateClassesMapping from @mui/utils once `readOnly` state class is used in Rating component.\n const stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];\n const traverse = (node, component) => {\n let key;\n\n // eslint-disable-next-line guard-for-in\n for (key in node) {\n const child = node[key];\n if (stateClasses.includes(key) && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n const stateClass = generateUtilityClass('', key);\n console.error([`MUI: The \\`${component}\\` component increases ` + `the CSS specificity of the \\`${key}\\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({\n root: {\n [`&.${stateClass}`]: child\n }\n }, null, 2), '', 'https://mui.com/r/state-classes-guide'].join('\\n'));\n }\n // Remove the style to prevent global conflicts.\n node[key] = {};\n }\n }\n };\n Object.keys(muiTheme.components).forEach(component => {\n const styleOverrides = muiTheme.components[component].styleOverrides;\n if (styleOverrides && component.startsWith('Mui')) {\n traverse(styleOverrides, component);\n }\n });\n }\n muiTheme.unstable_sxConfig = {\n ...defaultSxConfig,\n ...other?.unstable_sxConfig\n };\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n muiTheme.toRuntimeSource = stringifyTheme; // for Pigment CSS integration\n\n return muiTheme;\n}\nlet warnedOnce = false;\nexport function createMuiTheme(...args) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['MUI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@mui/material/styles'`\"].join('\\n'));\n }\n }\n return createThemeNoVars(...args);\n}\nexport default createThemeNoVars;","export default function createMixins(breakpoints, mixins) {\n return {\n toolbar: {\n minHeight: 56,\n [breakpoints.up('xs')]: {\n '@media (orientation: landscape)': {\n minHeight: 48\n }\n },\n [breakpoints.up('sm')]: {\n minHeight: 64\n }\n },\n ...mixins\n };\n}","// Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61\nexport default function getOverlayAlpha(elevation) {\n let alphaValue;\n if (elevation < 1) {\n alphaValue = 5.11916 * elevation ** 2;\n } else {\n alphaValue = 4.5 * Math.log(elevation + 1) + 2;\n }\n return Math.round(alphaValue * 10) / 1000;\n}","import createPalette from \"./createPalette.js\";\nimport getOverlayAlpha from \"./getOverlayAlpha.js\";\nconst defaultDarkOverlays = [...Array(25)].map((_, index) => {\n if (index === 0) {\n return 'none';\n }\n const overlay = getOverlayAlpha(index);\n return `linear-gradient(rgba(255 255 255 / ${overlay}), rgba(255 255 255 / ${overlay}))`;\n});\nexport function getOpacity(mode) {\n return {\n inputPlaceholder: mode === 'dark' ? 0.5 : 0.42,\n inputUnderline: mode === 'dark' ? 0.7 : 0.42,\n switchTrackDisabled: mode === 'dark' ? 0.2 : 0.12,\n switchTrack: mode === 'dark' ? 0.3 : 0.38\n };\n}\nexport function getOverlays(mode) {\n return mode === 'dark' ? defaultDarkOverlays : [];\n}\nexport default function createColorScheme(options) {\n const {\n palette: paletteInput = {\n mode: 'light'\n },\n // need to cast to avoid module augmentation test\n opacity,\n overlays,\n ...rest\n } = options;\n const palette = createPalette(paletteInput);\n return {\n palette,\n opacity: {\n ...getOpacity(palette.mode),\n ...opacity\n },\n overlays: overlays || getOverlays(palette.mode),\n ...rest\n };\n}","export default function shouldSkipGeneratingVar(keys) {\n return !!keys[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||\n // ends with sxConfig\n keys[0] === 'palette' && !!keys[1]?.match(/(mode|contrastThreshold|tonalOffset)/);\n}","/**\n * @internal These variables should not appear in the :root stylesheet when the `defaultColorScheme=\"dark\"`\n */\nconst excludeVariablesFromRoot = cssVarPrefix => [...[...Array(25)].map((_, index) => `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}overlays-${index}`), `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkBg`, `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkColor`];\nexport default excludeVariablesFromRoot;","import excludeVariablesFromRoot from \"./excludeVariablesFromRoot.js\";\nexport default theme => (colorScheme, css) => {\n const root = theme.rootSelector || ':root';\n const selector = theme.colorSchemeSelector;\n let rule = selector;\n if (selector === 'class') {\n rule = '.%s';\n }\n if (selector === 'data') {\n rule = '[data-%s]';\n }\n if (selector?.startsWith('data-') && !selector.includes('%s')) {\n // 'data-mui-color-scheme' -> '[data-mui-color-scheme=\"%s\"]'\n rule = `[${selector}=\"%s\"]`;\n }\n if (theme.defaultColorScheme === colorScheme) {\n if (colorScheme === 'dark') {\n const excludedVariables = {};\n excludeVariablesFromRoot(theme.cssVarPrefix).forEach(cssVar => {\n excludedVariables[cssVar] = css[cssVar];\n delete css[cssVar];\n });\n if (rule === 'media') {\n return {\n [root]: css,\n [`@media (prefers-color-scheme: dark)`]: {\n [root]: excludedVariables\n }\n };\n }\n if (rule) {\n return {\n [rule.replace('%s', colorScheme)]: excludedVariables,\n [`${root}, ${rule.replace('%s', colorScheme)}`]: css\n };\n }\n return {\n [root]: {\n ...css,\n ...excludedVariables\n }\n };\n }\n if (rule && rule !== 'media') {\n return `${root}, ${rule.replace('%s', String(colorScheme))}`;\n }\n } else if (colorScheme) {\n if (rule === 'media') {\n return {\n [`@media (prefers-color-scheme: ${String(colorScheme)})`]: {\n [root]: css\n }\n };\n }\n if (rule) {\n return rule.replace('%s', String(colorScheme));\n }\n }\n return root;\n};","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nimport deepmerge from '@mui/utils/deepmerge';\nimport { unstable_createGetCssVar as systemCreateGetCssVar, createSpacing } from '@mui/system';\nimport { createUnarySpacing } from '@mui/system/spacing';\nimport { prepareCssVars, prepareTypographyVars, createGetColorSchemeSelector } from '@mui/system/cssVars';\nimport styleFunctionSx, { unstable_defaultSxConfig as defaultSxConfig } from '@mui/system/styleFunctionSx';\nimport { private_safeColorChannel as safeColorChannel, private_safeAlpha as safeAlpha, private_safeDarken as safeDarken, private_safeLighten as safeLighten, private_safeEmphasize as safeEmphasize, hslToRgb } from '@mui/system/colorManipulator';\nimport createThemeNoVars from \"./createThemeNoVars.js\";\nimport createColorScheme, { getOpacity, getOverlays } from \"./createColorScheme.js\";\nimport defaultShouldSkipGeneratingVar from \"./shouldSkipGeneratingVar.js\";\nimport defaultGetSelector from \"./createGetSelector.js\";\nimport { stringifyTheme } from \"./stringifyTheme.js\";\nfunction assignNode(obj, keys) {\n keys.forEach(k => {\n if (!obj[k]) {\n obj[k] = {};\n }\n });\n}\nfunction setColor(obj, key, defaultValue) {\n if (!obj[key] && defaultValue) {\n obj[key] = defaultValue;\n }\n}\nfunction toRgb(color) {\n if (typeof color !== 'string' || !color.startsWith('hsl')) {\n return color;\n }\n return hslToRgb(color);\n}\nfunction setColorChannel(obj, key) {\n if (!(`${key}Channel` in obj)) {\n // custom channel token is not provided, generate one.\n // if channel token can't be generated, show a warning.\n obj[`${key}Channel`] = safeColorChannel(toRgb(obj[key]), `MUI: Can't create \\`palette.${key}Channel\\` because \\`palette.${key}\\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` + '\\n' + `To suppress this warning, you need to explicitly provide the \\`palette.${key}Channel\\` as a string (in rgb format, for example \"12 12 12\") or undefined if you want to remove the channel token.`);\n }\n}\nfunction getSpacingVal(spacingInput) {\n if (typeof spacingInput === 'number') {\n return `${spacingInput}px`;\n }\n if (typeof spacingInput === 'string' || typeof spacingInput === 'function' || Array.isArray(spacingInput)) {\n return spacingInput;\n }\n return '8px';\n}\nconst silent = fn => {\n try {\n return fn();\n } catch (error) {\n // ignore error\n }\n return undefined;\n};\nexport const createGetCssVar = (cssVarPrefix = 'mui') => systemCreateGetCssVar(cssVarPrefix);\nfunction attachColorScheme(colorSchemes, scheme, restTheme, colorScheme) {\n if (!scheme) {\n return undefined;\n }\n scheme = scheme === true ? {} : scheme;\n const mode = colorScheme === 'dark' ? 'dark' : 'light';\n if (!restTheme) {\n colorSchemes[colorScheme] = createColorScheme({\n ...scheme,\n palette: {\n mode,\n ...scheme?.palette\n }\n });\n return undefined;\n }\n const {\n palette,\n ...muiTheme\n } = createThemeNoVars({\n ...restTheme,\n palette: {\n mode,\n ...scheme?.palette\n }\n });\n colorSchemes[colorScheme] = {\n ...scheme,\n palette,\n opacity: {\n ...getOpacity(mode),\n ...scheme?.opacity\n },\n overlays: scheme?.overlays || getOverlays(mode)\n };\n return muiTheme;\n}\n\n/**\n * A default `createThemeWithVars` comes with a single color scheme, either `light` or `dark` based on the `defaultColorScheme`.\n * This is better suited for apps that only need a single color scheme.\n *\n * To enable built-in `light` and `dark` color schemes, either:\n * 1. provide a `colorSchemeSelector` to define how the color schemes will change.\n * 2. provide `colorSchemes.dark` will set `colorSchemeSelector: 'media'` by default.\n */\nexport default function createThemeWithVars(options = {}, ...args) {\n const {\n colorSchemes: colorSchemesInput = {\n light: true\n },\n defaultColorScheme: defaultColorSchemeInput,\n disableCssColorScheme = false,\n cssVarPrefix = 'mui',\n shouldSkipGeneratingVar = defaultShouldSkipGeneratingVar,\n colorSchemeSelector: selector = colorSchemesInput.light && colorSchemesInput.dark ? 'media' : undefined,\n rootSelector = ':root',\n ...input\n } = options;\n const firstColorScheme = Object.keys(colorSchemesInput)[0];\n const defaultColorScheme = defaultColorSchemeInput || (colorSchemesInput.light && firstColorScheme !== 'light' ? 'light' : firstColorScheme);\n const getCssVar = createGetCssVar(cssVarPrefix);\n const {\n [defaultColorScheme]: defaultSchemeInput,\n light: builtInLight,\n dark: builtInDark,\n ...customColorSchemes\n } = colorSchemesInput;\n const colorSchemes = {\n ...customColorSchemes\n };\n let defaultScheme = defaultSchemeInput;\n\n // For built-in light and dark color schemes, ensure that the value is valid if they are the default color scheme.\n if (defaultColorScheme === 'dark' && !('dark' in colorSchemesInput) || defaultColorScheme === 'light' && !('light' in colorSchemesInput)) {\n defaultScheme = true;\n }\n if (!defaultScheme) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The \\`colorSchemes.${defaultColorScheme}\\` option is either missing or invalid.` : _formatMuiErrorMessage(21, defaultColorScheme));\n }\n\n // Create the palette for the default color scheme, either `light`, `dark`, or custom color scheme.\n const muiTheme = attachColorScheme(colorSchemes, defaultScheme, input, defaultColorScheme);\n if (builtInLight && !colorSchemes.light) {\n attachColorScheme(colorSchemes, builtInLight, undefined, 'light');\n }\n if (builtInDark && !colorSchemes.dark) {\n attachColorScheme(colorSchemes, builtInDark, undefined, 'dark');\n }\n let theme = {\n defaultColorScheme,\n ...muiTheme,\n cssVarPrefix,\n colorSchemeSelector: selector,\n rootSelector,\n getCssVar,\n colorSchemes,\n font: {\n ...prepareTypographyVars(muiTheme.typography),\n ...muiTheme.font\n },\n spacing: getSpacingVal(input.spacing)\n };\n Object.keys(theme.colorSchemes).forEach(key => {\n const palette = theme.colorSchemes[key].palette;\n const setCssVarColor = cssVar => {\n const tokens = cssVar.split('-');\n const color = tokens[1];\n const colorToken = tokens[2];\n return getCssVar(cssVar, palette[color][colorToken]);\n };\n\n // attach black & white channels to common node\n if (palette.mode === 'light') {\n setColor(palette.common, 'background', '#fff');\n setColor(palette.common, 'onBackground', '#000');\n }\n if (palette.mode === 'dark') {\n setColor(palette.common, 'background', '#000');\n setColor(palette.common, 'onBackground', '#fff');\n }\n\n // assign component variables\n assignNode(palette, ['Alert', 'AppBar', 'Avatar', 'Button', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);\n if (palette.mode === 'light') {\n setColor(palette.Alert, 'errorColor', safeDarken(palette.error.light, 0.6));\n setColor(palette.Alert, 'infoColor', safeDarken(palette.info.light, 0.6));\n setColor(palette.Alert, 'successColor', safeDarken(palette.success.light, 0.6));\n setColor(palette.Alert, 'warningColor', safeDarken(palette.warning.light, 0.6));\n setColor(palette.Alert, 'errorFilledBg', setCssVarColor('palette-error-main'));\n setColor(palette.Alert, 'infoFilledBg', setCssVarColor('palette-info-main'));\n setColor(palette.Alert, 'successFilledBg', setCssVarColor('palette-success-main'));\n setColor(palette.Alert, 'warningFilledBg', setCssVarColor('palette-warning-main'));\n setColor(palette.Alert, 'errorFilledColor', silent(() => palette.getContrastText(palette.error.main)));\n setColor(palette.Alert, 'infoFilledColor', silent(() => palette.getContrastText(palette.info.main)));\n setColor(palette.Alert, 'successFilledColor', silent(() => palette.getContrastText(palette.success.main)));\n setColor(palette.Alert, 'warningFilledColor', silent(() => palette.getContrastText(palette.warning.main)));\n setColor(palette.Alert, 'errorStandardBg', safeLighten(palette.error.light, 0.9));\n setColor(palette.Alert, 'infoStandardBg', safeLighten(palette.info.light, 0.9));\n setColor(palette.Alert, 'successStandardBg', safeLighten(palette.success.light, 0.9));\n setColor(palette.Alert, 'warningStandardBg', safeLighten(palette.warning.light, 0.9));\n setColor(palette.Alert, 'errorIconColor', setCssVarColor('palette-error-main'));\n setColor(palette.Alert, 'infoIconColor', setCssVarColor('palette-info-main'));\n setColor(palette.Alert, 'successIconColor', setCssVarColor('palette-success-main'));\n setColor(palette.Alert, 'warningIconColor', setCssVarColor('palette-warning-main'));\n setColor(palette.AppBar, 'defaultBg', setCssVarColor('palette-grey-100'));\n setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-400'));\n setColor(palette.Button, 'inheritContainedBg', setCssVarColor('palette-grey-300'));\n setColor(palette.Button, 'inheritContainedHoverBg', setCssVarColor('palette-grey-A100'));\n setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-400'));\n setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-700'));\n setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-700'));\n setColor(palette.FilledInput, 'bg', 'rgba(0, 0, 0, 0.06)');\n setColor(palette.FilledInput, 'hoverBg', 'rgba(0, 0, 0, 0.09)');\n setColor(palette.FilledInput, 'disabledBg', 'rgba(0, 0, 0, 0.12)');\n setColor(palette.LinearProgress, 'primaryBg', safeLighten(palette.primary.main, 0.62));\n setColor(palette.LinearProgress, 'secondaryBg', safeLighten(palette.secondary.main, 0.62));\n setColor(palette.LinearProgress, 'errorBg', safeLighten(palette.error.main, 0.62));\n setColor(palette.LinearProgress, 'infoBg', safeLighten(palette.info.main, 0.62));\n setColor(palette.LinearProgress, 'successBg', safeLighten(palette.success.main, 0.62));\n setColor(palette.LinearProgress, 'warningBg', safeLighten(palette.warning.main, 0.62));\n setColor(palette.Skeleton, 'bg', `rgba(${setCssVarColor('palette-text-primaryChannel')} / 0.11)`);\n setColor(palette.Slider, 'primaryTrack', safeLighten(palette.primary.main, 0.62));\n setColor(palette.Slider, 'secondaryTrack', safeLighten(palette.secondary.main, 0.62));\n setColor(palette.Slider, 'errorTrack', safeLighten(palette.error.main, 0.62));\n setColor(palette.Slider, 'infoTrack', safeLighten(palette.info.main, 0.62));\n setColor(palette.Slider, 'successTrack', safeLighten(palette.success.main, 0.62));\n setColor(palette.Slider, 'warningTrack', safeLighten(palette.warning.main, 0.62));\n const snackbarContentBackground = safeEmphasize(palette.background.default, 0.8);\n setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);\n setColor(palette.SnackbarContent, 'color', silent(() => palette.getContrastText(snackbarContentBackground)));\n setColor(palette.SpeedDialAction, 'fabHoverBg', safeEmphasize(palette.background.paper, 0.15));\n setColor(palette.StepConnector, 'border', setCssVarColor('palette-grey-400'));\n setColor(palette.StepContent, 'border', setCssVarColor('palette-grey-400'));\n setColor(palette.Switch, 'defaultColor', setCssVarColor('palette-common-white'));\n setColor(palette.Switch, 'defaultDisabledColor', setCssVarColor('palette-grey-100'));\n setColor(palette.Switch, 'primaryDisabledColor', safeLighten(palette.primary.main, 0.62));\n setColor(palette.Switch, 'secondaryDisabledColor', safeLighten(palette.secondary.main, 0.62));\n setColor(palette.Switch, 'errorDisabledColor', safeLighten(palette.error.main, 0.62));\n setColor(palette.Switch, 'infoDisabledColor', safeLighten(palette.info.main, 0.62));\n setColor(palette.Switch, 'successDisabledColor', safeLighten(palette.success.main, 0.62));\n setColor(palette.Switch, 'warningDisabledColor', safeLighten(palette.warning.main, 0.62));\n setColor(palette.TableCell, 'border', safeLighten(safeAlpha(palette.divider, 1), 0.88));\n setColor(palette.Tooltip, 'bg', safeAlpha(palette.grey[700], 0.92));\n }\n if (palette.mode === 'dark') {\n setColor(palette.Alert, 'errorColor', safeLighten(palette.error.light, 0.6));\n setColor(palette.Alert, 'infoColor', safeLighten(palette.info.light, 0.6));\n setColor(palette.Alert, 'successColor', safeLighten(palette.success.light, 0.6));\n setColor(palette.Alert, 'warningColor', safeLighten(palette.warning.light, 0.6));\n setColor(palette.Alert, 'errorFilledBg', setCssVarColor('palette-error-dark'));\n setColor(palette.Alert, 'infoFilledBg', setCssVarColor('palette-info-dark'));\n setColor(palette.Alert, 'successFilledBg', setCssVarColor('palette-success-dark'));\n setColor(palette.Alert, 'warningFilledBg', setCssVarColor('palette-warning-dark'));\n setColor(palette.Alert, 'errorFilledColor', silent(() => palette.getContrastText(palette.error.dark)));\n setColor(palette.Alert, 'infoFilledColor', silent(() => palette.getContrastText(palette.info.dark)));\n setColor(palette.Alert, 'successFilledColor', silent(() => palette.getContrastText(palette.success.dark)));\n setColor(palette.Alert, 'warningFilledColor', silent(() => palette.getContrastText(palette.warning.dark)));\n setColor(palette.Alert, 'errorStandardBg', safeDarken(palette.error.light, 0.9));\n setColor(palette.Alert, 'infoStandardBg', safeDarken(palette.info.light, 0.9));\n setColor(palette.Alert, 'successStandardBg', safeDarken(palette.success.light, 0.9));\n setColor(palette.Alert, 'warningStandardBg', safeDarken(palette.warning.light, 0.9));\n setColor(palette.Alert, 'errorIconColor', setCssVarColor('palette-error-main'));\n setColor(palette.Alert, 'infoIconColor', setCssVarColor('palette-info-main'));\n setColor(palette.Alert, 'successIconColor', setCssVarColor('palette-success-main'));\n setColor(palette.Alert, 'warningIconColor', setCssVarColor('palette-warning-main'));\n setColor(palette.AppBar, 'defaultBg', setCssVarColor('palette-grey-900'));\n setColor(palette.AppBar, 'darkBg', setCssVarColor('palette-background-paper')); // specific for dark mode\n setColor(palette.AppBar, 'darkColor', setCssVarColor('palette-text-primary')); // specific for dark mode\n setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-600'));\n setColor(palette.Button, 'inheritContainedBg', setCssVarColor('palette-grey-800'));\n setColor(palette.Button, 'inheritContainedHoverBg', setCssVarColor('palette-grey-700'));\n setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-700'));\n setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-300'));\n setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-300'));\n setColor(palette.FilledInput, 'bg', 'rgba(255, 255, 255, 0.09)');\n setColor(palette.FilledInput, 'hoverBg', 'rgba(255, 255, 255, 0.13)');\n setColor(palette.FilledInput, 'disabledBg', 'rgba(255, 255, 255, 0.12)');\n setColor(palette.LinearProgress, 'primaryBg', safeDarken(palette.primary.main, 0.5));\n setColor(palette.LinearProgress, 'secondaryBg', safeDarken(palette.secondary.main, 0.5));\n setColor(palette.LinearProgress, 'errorBg', safeDarken(palette.error.main, 0.5));\n setColor(palette.LinearProgress, 'infoBg', safeDarken(palette.info.main, 0.5));\n setColor(palette.LinearProgress, 'successBg', safeDarken(palette.success.main, 0.5));\n setColor(palette.LinearProgress, 'warningBg', safeDarken(palette.warning.main, 0.5));\n setColor(palette.Skeleton, 'bg', `rgba(${setCssVarColor('palette-text-primaryChannel')} / 0.13)`);\n setColor(palette.Slider, 'primaryTrack', safeDarken(palette.primary.main, 0.5));\n setColor(palette.Slider, 'secondaryTrack', safeDarken(palette.secondary.main, 0.5));\n setColor(palette.Slider, 'errorTrack', safeDarken(palette.error.main, 0.5));\n setColor(palette.Slider, 'infoTrack', safeDarken(palette.info.main, 0.5));\n setColor(palette.Slider, 'successTrack', safeDarken(palette.success.main, 0.5));\n setColor(palette.Slider, 'warningTrack', safeDarken(palette.warning.main, 0.5));\n const snackbarContentBackground = safeEmphasize(palette.background.default, 0.98);\n setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);\n setColor(palette.SnackbarContent, 'color', silent(() => palette.getContrastText(snackbarContentBackground)));\n setColor(palette.SpeedDialAction, 'fabHoverBg', safeEmphasize(palette.background.paper, 0.15));\n setColor(palette.StepConnector, 'border', setCssVarColor('palette-grey-600'));\n setColor(palette.StepContent, 'border', setCssVarColor('palette-grey-600'));\n setColor(palette.Switch, 'defaultColor', setCssVarColor('palette-grey-300'));\n setColor(palette.Switch, 'defaultDisabledColor', setCssVarColor('palette-grey-600'));\n setColor(palette.Switch, 'primaryDisabledColor', safeDarken(palette.primary.main, 0.55));\n setColor(palette.Switch, 'secondaryDisabledColor', safeDarken(palette.secondary.main, 0.55));\n setColor(palette.Switch, 'errorDisabledColor', safeDarken(palette.error.main, 0.55));\n setColor(palette.Switch, 'infoDisabledColor', safeDarken(palette.info.main, 0.55));\n setColor(palette.Switch, 'successDisabledColor', safeDarken(palette.success.main, 0.55));\n setColor(palette.Switch, 'warningDisabledColor', safeDarken(palette.warning.main, 0.55));\n setColor(palette.TableCell, 'border', safeDarken(safeAlpha(palette.divider, 1), 0.68));\n setColor(palette.Tooltip, 'bg', safeAlpha(palette.grey[700], 0.92));\n }\n\n // MUI X - DataGrid needs this token.\n setColorChannel(palette.background, 'default');\n\n // added for consistency with the `background.default` token\n setColorChannel(palette.background, 'paper');\n setColorChannel(palette.common, 'background');\n setColorChannel(palette.common, 'onBackground');\n setColorChannel(palette, 'divider');\n Object.keys(palette).forEach(color => {\n const colors = palette[color];\n\n // The default palettes (primary, secondary, error, info, success, and warning) errors are handled by the above `createTheme(...)`.\n\n if (color !== 'tonalOffset' && colors && typeof colors === 'object') {\n // Silent the error for custom palettes.\n if (colors.main) {\n setColor(palette[color], 'mainChannel', safeColorChannel(toRgb(colors.main)));\n }\n if (colors.light) {\n setColor(palette[color], 'lightChannel', safeColorChannel(toRgb(colors.light)));\n }\n if (colors.dark) {\n setColor(palette[color], 'darkChannel', safeColorChannel(toRgb(colors.dark)));\n }\n if (colors.contrastText) {\n setColor(palette[color], 'contrastTextChannel', safeColorChannel(toRgb(colors.contrastText)));\n }\n if (color === 'text') {\n // Text colors: text.primary, text.secondary\n setColorChannel(palette[color], 'primary');\n setColorChannel(palette[color], 'secondary');\n }\n if (color === 'action') {\n // Action colors: action.active, action.selected\n if (colors.active) {\n setColorChannel(palette[color], 'active');\n }\n if (colors.selected) {\n setColorChannel(palette[color], 'selected');\n }\n }\n }\n });\n });\n theme = args.reduce((acc, argument) => deepmerge(acc, argument), theme);\n const parserConfig = {\n prefix: cssVarPrefix,\n disableCssColorScheme,\n shouldSkipGeneratingVar,\n getSelector: defaultGetSelector(theme)\n };\n const {\n vars,\n generateThemeVars,\n generateStyleSheets\n } = prepareCssVars(theme, parserConfig);\n theme.vars = vars;\n Object.entries(theme.colorSchemes[theme.defaultColorScheme]).forEach(([key, value]) => {\n theme[key] = value;\n });\n theme.generateThemeVars = generateThemeVars;\n theme.generateStyleSheets = generateStyleSheets;\n theme.generateSpacing = function generateSpacing() {\n return createSpacing(input.spacing, createUnarySpacing(this));\n };\n theme.getColorSchemeSelector = createGetColorSchemeSelector(selector);\n theme.spacing = theme.generateSpacing();\n theme.shouldSkipGeneratingVar = shouldSkipGeneratingVar;\n theme.unstable_sxConfig = {\n ...defaultSxConfig,\n ...input?.unstable_sxConfig\n };\n theme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n theme.toRuntimeSource = stringifyTheme; // for Pigment CSS integration\n\n return theme;\n}","import deepmerge from '@mui/utils/deepmerge';\nimport cssVarsParser from \"./cssVarsParser.js\";\nfunction prepareCssVars(theme, parserConfig = {}) {\n const {\n getSelector = defaultGetSelector,\n disableCssColorScheme,\n colorSchemeSelector: selector\n } = parserConfig;\n // @ts-ignore - ignore components do not exist\n const {\n colorSchemes = {},\n components,\n defaultColorScheme = 'light',\n ...otherTheme\n } = theme;\n const {\n vars: rootVars,\n css: rootCss,\n varsWithDefaults: rootVarsWithDefaults\n } = cssVarsParser(otherTheme, parserConfig);\n let themeVars = rootVarsWithDefaults;\n const colorSchemesMap = {};\n const {\n [defaultColorScheme]: defaultScheme,\n ...otherColorSchemes\n } = colorSchemes;\n Object.entries(otherColorSchemes || {}).forEach(([key, scheme]) => {\n const {\n vars,\n css,\n varsWithDefaults\n } = cssVarsParser(scheme, parserConfig);\n themeVars = deepmerge(themeVars, varsWithDefaults);\n colorSchemesMap[key] = {\n css,\n vars\n };\n });\n if (defaultScheme) {\n // default color scheme vars should be merged last to set as default\n const {\n css,\n vars,\n varsWithDefaults\n } = cssVarsParser(defaultScheme, parserConfig);\n themeVars = deepmerge(themeVars, varsWithDefaults);\n colorSchemesMap[defaultColorScheme] = {\n css,\n vars\n };\n }\n function defaultGetSelector(colorScheme, cssObject) {\n let rule = selector;\n if (selector === 'class') {\n rule = '.%s';\n }\n if (selector === 'data') {\n rule = '[data-%s]';\n }\n if (selector?.startsWith('data-') && !selector.includes('%s')) {\n // 'data-joy-color-scheme' -> '[data-joy-color-scheme=\"%s\"]'\n rule = `[${selector}=\"%s\"]`;\n }\n if (colorScheme) {\n if (rule === 'media') {\n if (theme.defaultColorScheme === colorScheme) {\n return ':root';\n }\n const mode = colorSchemes[colorScheme]?.palette?.mode || colorScheme;\n return {\n [`@media (prefers-color-scheme: ${mode})`]: {\n ':root': cssObject\n }\n };\n }\n if (rule) {\n if (theme.defaultColorScheme === colorScheme) {\n return `:root, ${rule.replace('%s', String(colorScheme))}`;\n }\n return rule.replace('%s', String(colorScheme));\n }\n }\n return ':root';\n }\n const generateThemeVars = () => {\n let vars = {\n ...rootVars\n };\n Object.entries(colorSchemesMap).forEach(([, {\n vars: schemeVars\n }]) => {\n vars = deepmerge(vars, schemeVars);\n });\n return vars;\n };\n const generateStyleSheets = () => {\n const stylesheets = [];\n const colorScheme = theme.defaultColorScheme || 'light';\n function insertStyleSheet(key, css) {\n if (Object.keys(css).length) {\n stylesheets.push(typeof key === 'string' ? {\n [key]: {\n ...css\n }\n } : key);\n }\n }\n insertStyleSheet(getSelector(undefined, {\n ...rootCss\n }), rootCss);\n const {\n [colorScheme]: defaultSchemeVal,\n ...other\n } = colorSchemesMap;\n if (defaultSchemeVal) {\n // default color scheme has to come before other color schemes\n const {\n css\n } = defaultSchemeVal;\n const cssColorSheme = colorSchemes[colorScheme]?.palette?.mode;\n const finalCss = !disableCssColorScheme && cssColorSheme ? {\n colorScheme: cssColorSheme,\n ...css\n } : {\n ...css\n };\n insertStyleSheet(getSelector(colorScheme, {\n ...finalCss\n }), finalCss);\n }\n Object.entries(other).forEach(([key, {\n css\n }]) => {\n const cssColorSheme = colorSchemes[key]?.palette?.mode;\n const finalCss = !disableCssColorScheme && cssColorSheme ? {\n colorScheme: cssColorSheme,\n ...css\n } : {\n ...css\n };\n insertStyleSheet(getSelector(key, {\n ...finalCss\n }), finalCss);\n });\n return stylesheets;\n };\n return {\n vars: themeVars,\n generateThemeVars,\n generateStyleSheets\n };\n}\nexport default prepareCssVars;","/* eslint-disable import/prefer-default-export */\nexport function createGetColorSchemeSelector(selector) {\n return function getColorSchemeSelector(colorScheme) {\n if (selector === 'media') {\n if (process.env.NODE_ENV !== 'production') {\n if (colorScheme !== 'light' && colorScheme !== 'dark') {\n console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${colorScheme}'.`);\n }\n }\n return `@media (prefers-color-scheme: ${colorScheme})`;\n }\n if (selector) {\n if (selector.startsWith('data-') && !selector.includes('%s')) {\n return `[${selector}=\"${colorScheme}\"] &`;\n }\n if (selector === 'class') {\n return `.${colorScheme} &`;\n }\n if (selector === 'data') {\n return `[data-${colorScheme}] &`;\n }\n return `${selector.replace('%s', colorScheme)} &`;\n }\n return '&';\n };\n}","import createPalette from \"./createPalette.js\";\nimport createThemeWithVars from \"./createThemeWithVars.js\";\nimport createThemeNoVars from \"./createThemeNoVars.js\";\nexport { createMuiTheme } from \"./createThemeNoVars.js\";\n// eslint-disable-next-line consistent-return\nfunction attachColorScheme(theme, scheme, colorScheme) {\n if (!theme.colorSchemes) {\n return undefined;\n }\n if (colorScheme) {\n theme.colorSchemes[scheme] = {\n ...(colorScheme !== true && colorScheme),\n palette: createPalette({\n ...(colorScheme === true ? {} : colorScheme.palette),\n mode: scheme\n }) // cast type to skip module augmentation test\n };\n }\n}\n\n/**\n * Generate a theme base on the options received.\n * @param options Takes an incomplete theme object and adds the missing parts.\n * @param args Deep merge the arguments with the about to be returned theme.\n * @returns A complete, ready-to-use theme object.\n */\nexport default function createTheme(options = {},\n// cast type to skip module augmentation test\n...args) {\n const {\n palette,\n cssVariables = false,\n colorSchemes: initialColorSchemes = !palette ? {\n light: true\n } : undefined,\n defaultColorScheme: initialDefaultColorScheme = palette?.mode,\n ...rest\n } = options;\n const defaultColorSchemeInput = initialDefaultColorScheme || 'light';\n const defaultScheme = initialColorSchemes?.[defaultColorSchemeInput];\n const colorSchemesInput = {\n ...initialColorSchemes,\n ...(palette ? {\n [defaultColorSchemeInput]: {\n ...(typeof defaultScheme !== 'boolean' && defaultScheme),\n palette\n }\n } : undefined)\n };\n if (cssVariables === false) {\n if (!('colorSchemes' in options)) {\n // Behaves exactly as v5\n return createThemeNoVars(options, ...args);\n }\n let paletteOptions = palette;\n if (!('palette' in options)) {\n if (colorSchemesInput[defaultColorSchemeInput]) {\n if (colorSchemesInput[defaultColorSchemeInput] !== true) {\n paletteOptions = colorSchemesInput[defaultColorSchemeInput].palette;\n } else if (defaultColorSchemeInput === 'dark') {\n // @ts-ignore to prevent the module augmentation test from failing\n paletteOptions = {\n mode: 'dark'\n };\n }\n }\n }\n const theme = createThemeNoVars({\n ...options,\n palette: paletteOptions\n }, ...args);\n theme.defaultColorScheme = defaultColorSchemeInput;\n theme.colorSchemes = colorSchemesInput;\n if (theme.palette.mode === 'light') {\n theme.colorSchemes.light = {\n ...(colorSchemesInput.light !== true && colorSchemesInput.light),\n palette: theme.palette\n };\n attachColorScheme(theme, 'dark', colorSchemesInput.dark);\n }\n if (theme.palette.mode === 'dark') {\n theme.colorSchemes.dark = {\n ...(colorSchemesInput.dark !== true && colorSchemesInput.dark),\n palette: theme.palette\n };\n attachColorScheme(theme, 'light', colorSchemesInput.light);\n }\n return theme;\n }\n if (!palette && !('light' in colorSchemesInput) && defaultColorSchemeInput === 'light') {\n colorSchemesInput.light = true;\n }\n return createThemeWithVars({\n ...rest,\n colorSchemes: colorSchemesInput,\n defaultColorScheme: defaultColorSchemeInput,\n ...(typeof cssVariables !== 'boolean' && cssVariables)\n }, ...args);\n}","'use client';\n\nimport createTheme from \"./createTheme.js\";\nconst defaultTheme = createTheme();\nexport default defaultTheme;","export default '$$material';","'use client';\n\nimport systemUseThemeProps from '@mui/system/useThemeProps';\nimport defaultTheme from \"./defaultTheme.js\";\nimport THEME_ID from \"./identifier.js\";\nexport default function useThemeProps({\n props,\n name\n}) {\n return systemUseThemeProps({\n props,\n name,\n defaultTheme,\n themeId: THEME_ID\n });\n}","'use client';\n\nimport getThemeProps from \"./getThemeProps.js\";\nimport useTheme from \"../useTheme/index.js\";\nexport default function useThemeProps({\n props,\n name,\n defaultTheme,\n themeId\n}) {\n let theme = useTheme(defaultTheme);\n if (themeId) {\n theme = theme[themeId] || theme;\n }\n return getThemeProps({\n theme,\n name,\n props\n });\n}","export const imageMimeTypes = {\n 'image/png': 'PNG',\n 'image/jpeg': 'JPEG',\n 'image/webp': 'WebP'\n};","import { imageMimeTypes } from \"./utils/imageMimeTypes.js\";\nimport { getChartsLocalization } from \"./utils/getChartsLocalization.js\";\n\n// This object is not Partial because it is the default values\n\nexport const enUSLocaleText = {\n // Overlay\n loading: 'Loading data…',\n noData: 'No data to display',\n // Toolbar\n zoomIn: 'Zoom in',\n zoomOut: 'Zoom out',\n toolbarExport: 'Export',\n // Toolbar Export Menu\n toolbarExportPrint: 'Print',\n toolbarExportImage: mimeType => `Export as ${imageMimeTypes[mimeType] ?? mimeType}`,\n // Charts renderer configuration\n chartTypeBar: 'Bar',\n chartTypeColumn: 'Column',\n chartTypeLine: 'Line',\n chartTypeArea: 'Area',\n chartTypePie: 'Pie',\n chartPaletteLabel: 'Color palette',\n chartPaletteNameRainbowSurge: 'Rainbow Surge',\n chartPaletteNameBlueberryTwilight: 'Blueberry Twilight',\n chartPaletteNameMangoFusion: 'Mango Fusion',\n chartPaletteNameCheerfulFiesta: 'Cheerful Fiesta',\n chartPaletteNameStrawberrySky: 'Strawberry Sky',\n chartPaletteNameBlue: 'Blue',\n chartPaletteNameGreen: 'Green',\n chartPaletteNamePurple: 'Purple',\n chartPaletteNameRed: 'Red',\n chartPaletteNameOrange: 'Orange',\n chartPaletteNameYellow: 'Yellow',\n chartPaletteNameCyan: 'Cyan',\n chartPaletteNamePink: 'Pink',\n chartConfigurationSectionChart: 'Chart',\n chartConfigurationSectionColumns: 'Columns',\n chartConfigurationSectionBars: 'Bars',\n chartConfigurationSectionAxes: 'Axes',\n chartConfigurationGrid: 'Grid',\n chartConfigurationBorderRadius: 'Border radius',\n chartConfigurationCategoryGapRatio: 'Category gap ratio',\n chartConfigurationBarGapRatio: 'Series gap ratio',\n chartConfigurationStacked: 'Stacked',\n chartConfigurationShowToolbar: 'Show toolbar',\n chartConfigurationSkipAnimation: 'Skip animation',\n chartConfigurationInnerRadius: 'Inner radius',\n chartConfigurationOuterRadius: 'Outer radius',\n chartConfigurationColors: 'Colors',\n chartConfigurationHideLegend: 'Hide legend',\n chartConfigurationShowMark: 'Show mark',\n chartConfigurationHeight: 'Height',\n chartConfigurationWidth: 'Width',\n chartConfigurationSeriesGap: 'Series gap',\n chartConfigurationTickPlacement: 'Tick placement',\n chartConfigurationTickLabelPlacement: 'Tick label placement',\n chartConfigurationCategoriesAxisLabel: 'Categories axis label',\n chartConfigurationSeriesAxisLabel: 'Series axis label',\n chartConfigurationXAxisPosition: 'X-axis position',\n chartConfigurationYAxisPosition: 'Y-axis position',\n chartConfigurationSeriesAxisReverse: 'Reverse series axis',\n chartConfigurationTooltipPlacement: 'Placement',\n chartConfigurationTooltipTrigger: 'Trigger',\n chartConfigurationLegendPosition: 'Position',\n chartConfigurationLegendDirection: 'Direction',\n chartConfigurationBarLabels: 'Bar labels',\n chartConfigurationColumnLabels: 'Column labels',\n chartConfigurationInterpolation: 'Interpolation',\n chartConfigurationSectionTooltip: 'Tooltip',\n chartConfigurationSectionLegend: 'Legend',\n chartConfigurationSectionLines: 'Lines',\n chartConfigurationSectionAreas: 'Areas',\n chartConfigurationSectionArcs: 'Arcs',\n chartConfigurationPaddingAngle: 'Padding angle',\n chartConfigurationCornerRadius: 'Corner radius',\n chartConfigurationArcLabels: 'Arc labels',\n chartConfigurationStartAngle: 'Start angle',\n chartConfigurationEndAngle: 'End angle',\n chartConfigurationPieTooltipTrigger: 'Trigger',\n chartConfigurationPieLegendPosition: 'Position',\n chartConfigurationPieLegendDirection: 'Direction',\n // Common option labels\n chartConfigurationOptionNone: 'None',\n chartConfigurationOptionValue: 'Value',\n chartConfigurationOptionAuto: 'Auto',\n chartConfigurationOptionTop: 'Top',\n chartConfigurationOptionTopLeft: 'Top Left',\n chartConfigurationOptionTopRight: 'Top Right',\n chartConfigurationOptionBottom: 'Bottom',\n chartConfigurationOptionBottomLeft: 'Bottom Left',\n chartConfigurationOptionBottomRight: 'Bottom Right',\n chartConfigurationOptionLeft: 'Left',\n chartConfigurationOptionRight: 'Right',\n chartConfigurationOptionAxis: 'Axis',\n chartConfigurationOptionItem: 'Item',\n chartConfigurationOptionHorizontal: 'Horizontal',\n chartConfigurationOptionVertical: 'Vertical',\n chartConfigurationOptionBoth: 'Both',\n chartConfigurationOptionStart: 'Start',\n chartConfigurationOptionMiddle: 'Middle',\n chartConfigurationOptionEnd: 'End',\n chartConfigurationOptionExtremities: 'Extremities',\n chartConfigurationOptionTick: 'Tick',\n chartConfigurationOptionMonotoneX: 'Monotone X',\n chartConfigurationOptionMonotoneY: 'Monotone Y',\n chartConfigurationOptionCatmullRom: 'Catmull-Rom',\n chartConfigurationOptionLinear: 'Linear',\n chartConfigurationOptionNatural: 'Natural',\n chartConfigurationOptionStep: 'Step',\n chartConfigurationOptionStepBefore: 'Step Before',\n chartConfigurationOptionStepAfter: 'Step After',\n chartConfigurationOptionBumpX: 'Bump X',\n chartConfigurationOptionBumpY: 'Bump Y'\n};\nexport const DEFAULT_LOCALE = enUSLocaleText;\nexport const enUS = getChartsLocalization(enUSLocaleText);","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * Helper to pass translation to all charts thanks to the MUI theme.\n * @param chartsTranslations The translation object.\n * @returns an object to pass the translation by using the MUI theme default props\n */\nexport const getChartsLocalization = chartsTranslations => {\n return {\n components: {\n MuiChartsLocalizationProvider: {\n defaultProps: {\n localeText: _extends({}, chartsTranslations)\n }\n }\n }\n };\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"localeText\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useThemeProps } from '@mui/material/styles';\nimport { DEFAULT_LOCALE } from \"../locales/enUS.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ChartsLocalizationContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") ChartsLocalizationContext.displayName = \"ChartsLocalizationContext\";\n/**\n * Demos:\n *\n * - [localization](https://mui.com/x/react-charts/localization/)\n *\n * API:\n *\n * - [ChartsLocalizationProvider API](https://mui.com/x/api/charts/charts-localization-provider/)\n */\nfunction ChartsLocalizationProvider(inProps) {\n const {\n localeText: inLocaleText\n } = inProps,\n other = _objectWithoutPropertiesLoose(inProps, _excluded);\n const {\n localeText: parentLocaleText\n } = React.useContext(ChartsLocalizationContext) ?? {\n localeText: undefined\n };\n const props = useThemeProps({\n // We don't want to pass the `localeText` prop to the theme, that way it will always return the theme value,\n // We will then merge this theme value with our value manually\n props: other,\n name: 'MuiChartsLocalizationProvider'\n });\n const {\n children,\n localeText: themeLocaleText\n } = props;\n const localeText = React.useMemo(() => _extends({}, DEFAULT_LOCALE, themeLocaleText, parentLocaleText, inLocaleText), [themeLocaleText, parentLocaleText, inLocaleText]);\n const contextValue = React.useMemo(() => {\n return {\n localeText\n };\n }, [localeText]);\n return /*#__PURE__*/_jsx(ChartsLocalizationContext.Provider, {\n value: contextValue,\n children: children\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? ChartsLocalizationProvider.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n children: PropTypes.node,\n /**\n * Localized text for chart components.\n */\n localeText: PropTypes.object\n} : void 0;\nexport { ChartsLocalizationProvider };","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t {\n this.currentId = null;\n fn();\n }, delay);\n }\n clear = () => {\n if (this.currentId !== null) {\n clearTimeout(this.currentId);\n this.currentId = null;\n }\n };\n disposeEffect = () => {\n return this.clear;\n };\n}\nexport default function useTimeout() {\n const timeout = useLazyRef(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","/* eslint no-restricted-syntax: 0, prefer-template: 0, guard-for-in: 0\n ---\n These rules are preventing the performance optimizations below.\n */\n\n/**\n * Compose classes from multiple sources.\n *\n * @example\n * ```tsx\n * const slots = {\n * root: ['root', 'primary'],\n * label: ['label'],\n * };\n *\n * const getUtilityClass = (slot) => `MuiButton-${slot}`;\n *\n * const classes = {\n * root: 'my-root-class',\n * };\n *\n * const output = composeClasses(slots, getUtilityClass, classes);\n * // {\n * // root: 'MuiButton-root MuiButton-primary my-root-class',\n * // label: 'MuiButton-label',\n * // }\n * ```\n *\n * @param slots a list of classes for each possible slot\n * @param getUtilityClass a function to resolve the class based on the slot name\n * @param classes the input classes from props\n * @returns the resolved classes for all slots\n */\nexport default function composeClasses(slots, getUtilityClass, classes = undefined) {\n const output = {};\n for (const slotName in slots) {\n const slot = slots[slotName];\n let buffer = '';\n let start = true;\n for (let i = 0; i < slot.length; i += 1) {\n const value = slot[i];\n if (value) {\n buffer += (start === true ? '' : ' ') + getUtilityClass(value);\n start = false;\n if (classes && classes[value]) {\n buffer += ' ' + classes[value];\n }\n }\n }\n output[slotName] = buffer;\n }\n return output;\n}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst RtlContext = /*#__PURE__*/React.createContext();\nfunction RtlProvider({\n value,\n ...props\n}) {\n return /*#__PURE__*/_jsx(RtlContext.Provider, {\n value: value ?? true,\n ...props\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? RtlProvider.propTypes = {\n children: PropTypes.node,\n value: PropTypes.bool\n} : void 0;\nexport const useRtl = () => {\n const value = React.useContext(RtlContext);\n return value ?? false;\n};\nexport default RtlProvider;","/**\n * Returns a boolean indicating if the event's target has :focus-visible\n */\nexport default function isFocusVisible(element) {\n try {\n return element.matches(':focus-visible');\n } catch (error) {\n // Do not warn on jsdom tests, otherwise all tests that rely on focus have to be skipped\n // Tests that rely on `:focus-visible` will still have to be skipped in jsdom\n if (process.env.NODE_ENV !== 'production' && !/jsdom/.test(window.navigator.userAgent)) {\n console.warn(['MUI: The `:focus-visible` pseudo class is not supported in this browser.', 'Some components rely on this feature to work properly.'].join('\\n'));\n }\n }\n return false;\n}","import * as React from 'react';\n\n/**\n * Returns the ref of a React element handling differences between React 19 and older versions.\n * It will throw runtime error if the element is not a valid React element.\n *\n * @param element React.ReactElement\n * @returns React.Ref | null\n */\nexport default function getReactElementRef(element) {\n // 'ref' is passed as prop in React 19, whereas 'ref' is directly attached to children in older versions\n if (parseInt(React.version, 10) >= 19) {\n return element?.props?.ref || null;\n }\n // @ts-expect-error element.ref is not included in the ReactElement type\n // https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/70189\n return element?.ref || null;\n}","import memoize from '@emotion/memoize';\n\n// eslint-disable-next-line no-undef\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { withEmotionCache, ThemeContext } from '@emotion/react';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport * as React from 'react';\nimport isPropValid from '@emotion/is-prop-valid';\n\nvar isDevelopment = false;\n\nvar testOmitPropsOnStringTag = isPropValid;\n\nvar testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {\n return key !== 'theme';\n};\n\nvar getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {\n return typeof tag === 'string' && // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;\n};\nvar composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) {\n var shouldForwardProp;\n\n if (options) {\n var optionsShouldForwardProp = options.shouldForwardProp;\n shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) {\n return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);\n } : optionsShouldForwardProp;\n }\n\n if (typeof shouldForwardProp !== 'function' && isReal) {\n shouldForwardProp = tag.__emotion_forwardProp;\n }\n\n return shouldForwardProp;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar createStyled = function createStyled(tag, options) {\n\n var isReal = tag.__emotion_real === tag;\n var baseTag = isReal && tag.__emotion_base || tag;\n var identifierName;\n var targetClassName;\n\n if (options !== undefined) {\n identifierName = options.label;\n targetClassName = options.target;\n }\n\n var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);\n var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);\n var shouldUseAs = !defaultShouldForwardProp('as');\n return function () {\n // eslint-disable-next-line prefer-rest-params\n var args = arguments;\n var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];\n\n if (identifierName !== undefined) {\n styles.push(\"label:\" + identifierName + \";\");\n }\n\n if (args[0] == null || args[0].raw === undefined) {\n // eslint-disable-next-line prefer-spread\n styles.push.apply(styles, args);\n } else {\n var templateStringsArr = args[0];\n\n styles.push(templateStringsArr[0]);\n var len = args.length;\n var i = 1;\n\n for (; i < len; i++) {\n\n styles.push(args[i], templateStringsArr[i]);\n }\n }\n\n var Styled = withEmotionCache(function (props, cache, ref) {\n var FinalTag = shouldUseAs && props.as || baseTag;\n var className = '';\n var classInterpolations = [];\n var mergedProps = props;\n\n if (props.theme == null) {\n mergedProps = {};\n\n for (var key in props) {\n mergedProps[key] = props[key];\n }\n\n mergedProps.theme = React.useContext(ThemeContext);\n }\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, classInterpolations, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);\n className += cache.key + \"-\" + serialized.name;\n\n if (targetClassName !== undefined) {\n className += \" \" + targetClassName;\n }\n\n var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;\n var newProps = {};\n\n for (var _key in props) {\n if (shouldUseAs && _key === 'as') continue;\n\n if (finalShouldForwardProp(_key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps.className = className;\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof FinalTag === 'string'\n }), /*#__PURE__*/React.createElement(FinalTag, newProps));\n });\n Styled.displayName = identifierName !== undefined ? identifierName : \"Styled(\" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + \")\";\n Styled.defaultProps = tag.defaultProps;\n Styled.__emotion_real = Styled;\n Styled.__emotion_base = baseTag;\n Styled.__emotion_styles = styles;\n Styled.__emotion_forwardProp = shouldForwardProp;\n Object.defineProperty(Styled, 'toString', {\n value: function value() {\n if (targetClassName === undefined && isDevelopment) {\n return 'NO_COMPONENT_SELECTOR';\n }\n\n return \".\" + targetClassName;\n }\n });\n\n Styled.withComponent = function (nextTag, nextOptions) {\n var newStyled = createStyled(nextTag, _extends({}, options, nextOptions, {\n shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)\n }));\n return newStyled.apply(void 0, styles);\n };\n\n return Styled;\n };\n};\n\nexport { createStyled as default };\n","import createStyled from '../base/dist/emotion-styled-base.browser.esm.js';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/react';\nimport '@emotion/serialize';\nimport '@emotion/use-insertion-effect-with-fallbacks';\nimport '@emotion/utils';\nimport 'react';\nimport '@emotion/is-prop-valid';\n\nvar tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG\n'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\n// bind it to avoid mutating the original function\nvar styled = createStyled.bind(null);\ntags.forEach(function (tagName) {\n styled[tagName] = styled(tagName);\n});\n\nexport { styled as default };\n","/**\n * @mui/styled-engine v6.5.0\n *\n * @license MIT\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/* eslint-disable no-underscore-dangle */\nimport emStyled from '@emotion/styled';\nimport { serializeStyles as emSerializeStyles } from '@emotion/serialize';\nexport default function styled(tag, options) {\n const stylesFactory = emStyled(tag, options);\n if (process.env.NODE_ENV !== 'production') {\n return (...styles) => {\n const component = typeof tag === 'string' ? `\"${tag}\"` : 'component';\n if (styles.length === 0) {\n console.error([`MUI: Seems like you called \\`styled(${component})()\\` without a \\`style\\` argument.`, 'You must provide a `styles` argument: `styled(\"div\")(styleYouForgotToPass)`.'].join('\\n'));\n } else if (styles.some(style => style === undefined)) {\n console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);\n }\n return stylesFactory(...styles);\n };\n }\n return stylesFactory;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function internal_mutateStyles(tag, processor) {\n // Emotion attaches all the styles as `__emotion_styles`.\n // Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186\n if (Array.isArray(tag.__emotion_styles)) {\n tag.__emotion_styles = processor(tag.__emotion_styles);\n }\n}\n\n// Emotion only accepts an array, but we want to avoid allocations\nconst wrapper = [];\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function internal_serializeStyles(styles) {\n wrapper[0] = styles;\n return emSerializeStyles(wrapper);\n}\nexport { ThemeContext, keyframes, css } from '@emotion/react';\nexport { default as StyledEngineProvider } from \"./StyledEngineProvider/index.js\";\nexport { default as GlobalStyles } from \"./GlobalStyles/index.js\";","import { internal_serializeStyles } from '@mui/styled-engine';\nexport default function preprocessStyles(input) {\n const {\n variants,\n ...style\n } = input;\n const result = {\n variants,\n style: internal_serializeStyles(style),\n isProcessed: true\n };\n\n // Not supported on styled-components\n if (result.style === style) {\n return result;\n }\n if (variants) {\n variants.forEach(variant => {\n if (typeof variant.style !== 'function') {\n variant.style = internal_serializeStyles(variant.style);\n }\n });\n }\n return result;\n}","import styledEngineStyled, { internal_mutateStyles as mutateStyles, internal_serializeStyles as serializeStyles } from '@mui/styled-engine';\nimport { isPlainObject } from '@mui/utils/deepmerge';\nimport capitalize from '@mui/utils/capitalize';\nimport getDisplayName from '@mui/utils/getDisplayName';\nimport createTheme from \"../createTheme/index.js\";\nimport styleFunctionSx from \"../styleFunctionSx/index.js\";\nimport preprocessStyles from \"../preprocessStyles.js\";\n\n/* eslint-disable no-underscore-dangle */\n/* eslint-disable no-labels */\n/* eslint-disable no-lone-blocks */\n\nexport const systemDefaultTheme = createTheme();\n\n// Update /system/styled/#api in case if this changes\nexport function shouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nfunction shallowLayer(serialized, layerName) {\n if (layerName && serialized && typeof serialized === 'object' && serialized.styles && !serialized.styles.startsWith('@layer') // only add the layer if it is not already there.\n ) {\n serialized.styles = `@layer ${layerName}{${String(serialized.styles)}}`;\n }\n return serialized;\n}\nfunction defaultOverridesResolver(slot) {\n if (!slot) {\n return null;\n }\n return (_props, styles) => styles[slot];\n}\nfunction attachTheme(props, themeId, defaultTheme) {\n props.theme = isObjectEmpty(props.theme) ? defaultTheme : props.theme[themeId] || props.theme;\n}\nfunction processStyle(props, style, layerName) {\n /*\n * Style types:\n * - null/undefined\n * - string\n * - CSS style object: { [cssKey]: [cssValue], variants }\n * - Processed style object: { style, variants, isProcessed: true }\n * - Array of any of the above\n */\n\n const resolvedStyle = typeof style === 'function' ? style(props) : style;\n if (Array.isArray(resolvedStyle)) {\n return resolvedStyle.flatMap(subStyle => processStyle(props, subStyle, layerName));\n }\n if (Array.isArray(resolvedStyle?.variants)) {\n let rootStyle;\n if (resolvedStyle.isProcessed) {\n rootStyle = layerName ? shallowLayer(resolvedStyle.style, layerName) : resolvedStyle.style;\n } else {\n const {\n variants,\n ...otherStyles\n } = resolvedStyle;\n rootStyle = layerName ? shallowLayer(serializeStyles(otherStyles), layerName) : otherStyles;\n }\n return processStyleVariants(props, resolvedStyle.variants, [rootStyle], layerName);\n }\n if (resolvedStyle?.isProcessed) {\n return layerName ? shallowLayer(serializeStyles(resolvedStyle.style), layerName) : resolvedStyle.style;\n }\n return layerName ? shallowLayer(serializeStyles(resolvedStyle), layerName) : resolvedStyle;\n}\nfunction processStyleVariants(props, variants, results = [], layerName = undefined) {\n let mergedState; // We might not need it, initialized lazily\n\n variantLoop: for (let i = 0; i < variants.length; i += 1) {\n const variant = variants[i];\n if (typeof variant.props === 'function') {\n mergedState ??= {\n ...props,\n ...props.ownerState,\n ownerState: props.ownerState\n };\n if (!variant.props(mergedState)) {\n continue;\n }\n } else {\n for (const key in variant.props) {\n if (props[key] !== variant.props[key] && props.ownerState?.[key] !== variant.props[key]) {\n continue variantLoop;\n }\n }\n }\n if (typeof variant.style === 'function') {\n mergedState ??= {\n ...props,\n ...props.ownerState,\n ownerState: props.ownerState\n };\n results.push(layerName ? shallowLayer(serializeStyles(variant.style(mergedState)), layerName) : variant.style(mergedState));\n } else {\n results.push(layerName ? shallowLayer(serializeStyles(variant.style), layerName) : variant.style);\n }\n }\n return results;\n}\nexport default function createStyled(input = {}) {\n const {\n themeId,\n defaultTheme = systemDefaultTheme,\n rootShouldForwardProp = shouldForwardProp,\n slotShouldForwardProp = shouldForwardProp\n } = input;\n function styleAttachTheme(props) {\n attachTheme(props, themeId, defaultTheme);\n }\n const styled = (tag, inputOptions = {}) => {\n // If `tag` is already a styled component, filter out the `sx` style function\n // to prevent unnecessary styles generated by the composite components.\n mutateStyles(tag, styles => styles.filter(style => style !== styleFunctionSx));\n const {\n name: componentName,\n slot: componentSlot,\n skipVariantsResolver: inputSkipVariantsResolver,\n skipSx: inputSkipSx,\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot)),\n ...options\n } = inputOptions;\n const layerName = componentName && componentName.startsWith('Mui') || !!componentSlot ? 'components' : 'custom';\n\n // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.\n const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n componentSlot && componentSlot !== 'Root' && componentSlot !== 'root' || false;\n const skipSx = inputSkipSx || false;\n let shouldForwardPropOption = shouldForwardProp;\n\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n if (componentSlot === 'Root' || componentSlot === 'root') {\n shouldForwardPropOption = rootShouldForwardProp;\n } else if (componentSlot) {\n // any other slot specified\n shouldForwardPropOption = slotShouldForwardProp;\n } else if (isStringTag(tag)) {\n // for string (html) tag, preserve the behavior in emotion & styled-components.\n shouldForwardPropOption = undefined;\n }\n const defaultStyledResolver = styledEngineStyled(tag, {\n shouldForwardProp: shouldForwardPropOption,\n label: generateStyledLabel(componentName, componentSlot),\n ...options\n });\n const transformStyle = style => {\n // - On the server Emotion doesn't use React.forwardRef for creating components, so the created\n // component stays as a function. This condition makes sure that we do not interpolate functions\n // which are basically components used as a selectors.\n // - `style` could be a styled component from a babel plugin for component selectors, This condition\n // makes sure that we do not interpolate them.\n if (style.__emotion_real === style) {\n return style;\n }\n if (typeof style === 'function') {\n return function styleFunctionProcessor(props) {\n return processStyle(props, style, props.theme.modularCssLayers ? layerName : undefined);\n };\n }\n if (isPlainObject(style)) {\n const serialized = preprocessStyles(style);\n return function styleObjectProcessor(props) {\n if (!serialized.variants) {\n return props.theme.modularCssLayers ? shallowLayer(serialized.style, layerName) : serialized.style;\n }\n return processStyle(props, serialized, props.theme.modularCssLayers ? layerName : undefined);\n };\n }\n return style;\n };\n const muiStyledResolver = (...expressionsInput) => {\n const expressionsHead = [];\n const expressionsBody = expressionsInput.map(transformStyle);\n const expressionsTail = [];\n\n // Preprocess `props` to set the scoped theme value.\n // This must run before any other expression.\n expressionsHead.push(styleAttachTheme);\n if (componentName && overridesResolver) {\n expressionsTail.push(function styleThemeOverrides(props) {\n const theme = props.theme;\n const styleOverrides = theme.components?.[componentName]?.styleOverrides;\n if (!styleOverrides) {\n return null;\n }\n const resolvedStyleOverrides = {};\n\n // TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly\n // eslint-disable-next-line guard-for-in\n for (const slotKey in styleOverrides) {\n resolvedStyleOverrides[slotKey] = processStyle(props, styleOverrides[slotKey], props.theme.modularCssLayers ? 'theme' : undefined);\n }\n return overridesResolver(props, resolvedStyleOverrides);\n });\n }\n if (componentName && !skipVariantsResolver) {\n expressionsTail.push(function styleThemeVariants(props) {\n const theme = props.theme;\n const themeVariants = theme?.components?.[componentName]?.variants;\n if (!themeVariants) {\n return null;\n }\n return processStyleVariants(props, themeVariants, [], props.theme.modularCssLayers ? 'theme' : undefined);\n });\n }\n if (!skipSx) {\n expressionsTail.push(styleFunctionSx);\n }\n\n // This function can be called as a tagged template, so the first argument would contain\n // CSS `string[]` values.\n if (Array.isArray(expressionsBody[0])) {\n const inputStrings = expressionsBody.shift();\n\n // We need to add placeholders in the tagged template for the custom functions we have\n // possibly added (attachTheme, overrides, variants, and sx).\n const placeholdersHead = new Array(expressionsHead.length).fill('');\n const placeholdersTail = new Array(expressionsTail.length).fill('');\n let outputStrings;\n // prettier-ignore\n {\n outputStrings = [...placeholdersHead, ...inputStrings, ...placeholdersTail];\n outputStrings.raw = [...placeholdersHead, ...inputStrings.raw, ...placeholdersTail];\n }\n\n // The only case where we put something before `attachTheme`\n expressionsHead.unshift(outputStrings);\n }\n const expressions = [...expressionsHead, ...expressionsBody, ...expressionsTail];\n const Component = defaultStyledResolver(...expressions);\n if (tag.muiName) {\n Component.muiName = tag.muiName;\n }\n if (process.env.NODE_ENV !== 'production') {\n Component.displayName = generateDisplayName(componentName, componentSlot, tag);\n }\n return Component;\n };\n if (defaultStyledResolver.withConfig) {\n muiStyledResolver.withConfig = defaultStyledResolver.withConfig;\n }\n return muiStyledResolver;\n };\n return styled;\n}\nfunction generateDisplayName(componentName, componentSlot, tag) {\n if (componentName) {\n return `${componentName}${capitalize(componentSlot || '')}`;\n }\n return `Styled(${getDisplayName(tag)})`;\n}\nfunction generateStyledLabel(componentName, componentSlot) {\n let label;\n if (process.env.NODE_ENV !== 'production') {\n if (componentName) {\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;\n }\n }\n return label;\n}\nfunction isObjectEmpty(object) {\n // eslint-disable-next-line\n for (const _ in object) {\n return false;\n }\n return true;\n}\n\n// https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40\nfunction isStringTag(tag) {\n return typeof tag === 'string' &&\n // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96;\n}\nfunction lowercaseFirstLetter(string) {\n if (!string) {\n return string;\n }\n return string.charAt(0).toLowerCase() + string.slice(1);\n}","// copied from @mui/system/createStyled\nfunction slotShouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nexport default slotShouldForwardProp;","import slotShouldForwardProp from \"./slotShouldForwardProp.js\";\nconst rootShouldForwardProp = prop => slotShouldForwardProp(prop) && prop !== 'classes';\nexport default rootShouldForwardProp;","'use client';\n\nimport createStyled from '@mui/system/createStyled';\nimport defaultTheme from \"./defaultTheme.js\";\nimport THEME_ID from \"./identifier.js\";\nimport rootShouldForwardProp from \"./rootShouldForwardProp.js\";\nexport { default as slotShouldForwardProp } from \"./slotShouldForwardProp.js\";\nexport { default as rootShouldForwardProp } from \"./rootShouldForwardProp.js\";\nconst styled = createStyled({\n themeId: THEME_ID,\n defaultTheme,\n rootShouldForwardProp\n});\nexport default styled;","'use client';\n\nimport * as React from 'react';\nimport { useTheme as useThemeSystem } from '@mui/system';\nimport defaultTheme from \"./defaultTheme.js\";\nimport THEME_ID from \"./identifier.js\";\nexport default function useTheme() {\n const theme = useThemeSystem(defaultTheme);\n if (process.env.NODE_ENV !== 'production') {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(theme);\n }\n return theme[THEME_ID] || theme;\n}","import preprocessStyles from \"./preprocessStyles.js\";\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\n// We need to pass an argument as `{ theme }` for PigmentCSS, but we don't want to\n// allocate more objects.\nconst arg = {\n theme: undefined\n};\n\n/**\n * Memoize style function on theme.\n * Intended to be used in styled() calls that only need access to the theme.\n */\nexport default function unstable_memoTheme(styleFn) {\n let lastValue;\n let lastTheme;\n return function styleMemoized(props) {\n let value = lastValue;\n if (value === undefined || props.theme !== lastTheme) {\n arg.theme = props.theme;\n value = preprocessStyles(styleFn(arg));\n lastValue = value;\n lastTheme = props.theme;\n }\n return value;\n };\n}","import { unstable_memoTheme } from '@mui/system';\nconst memoTheme = unstable_memoTheme;\nexport default memoTheme;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport resolveProps from '@mui/utils/resolveProps';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PropsContext = /*#__PURE__*/React.createContext(undefined);\nfunction DefaultPropsProvider({\n value,\n children\n}) {\n return /*#__PURE__*/_jsx(PropsContext.Provider, {\n value: value,\n children: children\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? DefaultPropsProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n value: PropTypes.object\n} : void 0;\nfunction getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n if (!theme || !theme.components || !theme.components[name]) {\n return props;\n }\n const config = theme.components[name];\n if (config.defaultProps) {\n // compatible with v5 signature\n return resolveProps(config.defaultProps, props);\n }\n if (!config.styleOverrides && !config.variants) {\n // v6 signature, no property 'defaultProps'\n return resolveProps(config, props);\n }\n return props;\n}\nexport function useDefaultProps({\n props,\n name\n}) {\n const ctx = React.useContext(PropsContext);\n return getThemeProps({\n props,\n name,\n theme: {\n components: ctx\n }\n });\n}\nexport default DefaultPropsProvider;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport SystemDefaultPropsProvider, { useDefaultProps as useSystemDefaultProps } from '@mui/system/DefaultPropsProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction DefaultPropsProvider(props) {\n return /*#__PURE__*/_jsx(SystemDefaultPropsProvider, {\n ...props\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? DefaultPropsProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n value: PropTypes.object.isRequired\n} : void 0;\nexport default DefaultPropsProvider;\nexport function useDefaultProps(params) {\n return useSystemDefaultProps(params);\n}","import capitalize from '@mui/utils/capitalize';\nexport default capitalize;","function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"ReactDOM\"];","export default {\n disabled: false\n};","import React from 'react';\nexport default React.createContext(null);","export var forceReflow = function forceReflow(node) {\n return node.scrollTop;\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { forceReflow } from './utils/reflow';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {state => (\n *
\n * I'm a fade Transition!\n *
\n * )}\n *
\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n *
\n * \n * {state => (\n * // ...\n * )}\n * \n * \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n if (this.props.unmountOnExit || this.props.mountOnEnter) {\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749\n // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.\n // To make the animation happen, we have to separate each rendering and avoid being processed as batched.\n\n if (node) forceReflow(node);\n }\n\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","export const reflow = node => node.scrollTop;\nexport function getTransitionProps(props, options) {\n const {\n timeout,\n easing,\n style = {}\n } = props;\n return {\n duration: style.transitionDuration ?? (typeof timeout === 'number' ? timeout : timeout[options.mode] || 0),\n easing: style.transitionTimingFunction ?? (typeof easing === 'object' ? easing[options.mode] : easing),\n delay: style.transitionDelay\n };\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * Merges refs into a single memoized callback ref or `null`.\n *\n * ```tsx\n * const rootRef = React.useRef(null);\n * const refFork = useForkRef(rootRef, props.ref);\n *\n * return (\n * \n * );\n * ```\n *\n * @param {Array | undefined>} refs The ref array.\n * @returns {React.RefCallback | null} The new ref callback.\n */\nexport default function useForkRef(...refs) {\n const cleanupRef = React.useRef(undefined);\n const refEffect = React.useCallback(instance => {\n const cleanups = refs.map(ref => {\n if (ref == null) {\n return null;\n }\n if (typeof ref === 'function') {\n const refCallback = ref;\n const refCleanup = refCallback(instance);\n return typeof refCleanup === 'function' ? refCleanup : () => {\n refCallback(null);\n };\n }\n ref.current = instance;\n return () => {\n ref.current = null;\n };\n });\n return () => {\n cleanups.forEach(refCleanup => refCleanup?.());\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return value => {\n if (cleanupRef.current) {\n cleanupRef.current();\n cleanupRef.current = undefined;\n }\n if (value != null) {\n cleanupRef.current = refEffect(value);\n }\n };\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- intentionally ignoring that the dependency array must be an array literal\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}","'use client';\n\nimport useForkRef from '@mui/utils/useForkRef';\nexport default useForkRef;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useTimeout from '@mui/utils/useTimeout';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport { Transition } from 'react-transition-group';\nimport { useTheme } from \"../zero-styled/index.js\";\nimport { getTransitionProps, reflow } from \"../transitions/utils.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getScale(value) {\n return `scale(${value}, ${value ** 2})`;\n}\nconst styles = {\n entering: {\n opacity: 1,\n transform: getScale(1)\n },\n entered: {\n opacity: 1,\n transform: 'none'\n }\n};\n\n/*\n TODO v6: remove\n Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers.\n */\nconst isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\\/)15(.|_)4/i.test(navigator.userAgent);\n\n/**\n * The Grow transition is used by the [Tooltip](/material-ui/react-tooltip/) and\n * [Popover](/material-ui/react-popover/) components.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {\n const {\n addEndListener,\n appear = true,\n children,\n easing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n style,\n timeout = 'auto',\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition,\n ...other\n } = props;\n const timer = useTimeout();\n const autoTimeout = React.useRef();\n const theme = useTheme();\n const nodeRef = React.useRef(null);\n const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);\n const normalizedTransitionCallback = callback => maybeIsAppearing => {\n if (callback) {\n const node = nodeRef.current;\n\n // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n if (maybeIsAppearing === undefined) {\n callback(node);\n } else {\n callback(node, maybeIsAppearing);\n }\n }\n };\n const handleEntering = normalizedTransitionCallback(onEntering);\n const handleEnter = normalizedTransitionCallback((node, isAppearing) => {\n reflow(node); // So the animation always start from the start.\n\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: isWebKit154 ? duration : duration * 0.666,\n delay,\n easing: transitionTimingFunction\n })].join(',');\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback(onEntered);\n const handleExiting = normalizedTransitionCallback(onExiting);\n const handleExit = normalizedTransitionCallback(node => {\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: isWebKit154 ? duration : duration * 0.666,\n delay: isWebKit154 ? delay : delay || duration * 0.333,\n easing: transitionTimingFunction\n })].join(',');\n node.style.opacity = 0;\n node.style.transform = getScale(0.75);\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n const handleAddEndListener = next => {\n if (timeout === 'auto') {\n timer.start(autoTimeout.current || 0, next);\n }\n if (addEndListener) {\n // Old call signature before `react-transition-group` implemented `nodeRef`\n addEndListener(nodeRef.current, next);\n }\n };\n return /*#__PURE__*/_jsx(TransitionComponent, {\n appear: appear,\n in: inProp,\n nodeRef: nodeRef,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout === 'auto' ? null : timeout,\n ...other,\n children: (state, {\n ownerState,\n ...restChildProps\n }) => {\n return /*#__PURE__*/React.cloneElement(children, {\n style: {\n opacity: 0,\n transform: getScale(0.75),\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined,\n ...styles[state],\n ...style,\n ...children.props.style\n },\n ref: handleRef,\n ...restChildProps\n });\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Grow.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Add a custom transition end trigger. Called with the transitioning DOM\n * node and a done callback. Allows for more fine grained transition end\n * logic. Note: Timeouts are still used as a fallback if provided.\n */\n addEndListener: PropTypes.func,\n /**\n * Perform the enter transition when it first mounts if `in` is also `true`.\n * Set this to `false` to disable this behavior.\n * @default true\n */\n appear: PropTypes.bool,\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nif (Grow) {\n Grow.muiSupportAuto = true;\n}\nexport default Grow;","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nfunction isHostComponent(element) {\n return typeof element === 'string';\n}\nexport default isHostComponent;","import isHostComponent from \"../isHostComponent/index.js\";\n\n/**\n * Type of the ownerState based on the type of an element it applies to.\n * This resolves to the provided OwnerState for React components and `undefined` for host components.\n * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.\n */\n\n/**\n * Appends the ownerState object to the props, merging with the existing one if necessary.\n *\n * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.\n * @param otherProps Props of the element.\n * @param ownerState\n */\nfunction appendOwnerState(elementType, otherProps, ownerState) {\n if (elementType === undefined || isHostComponent(elementType)) {\n return otherProps;\n }\n return {\n ...otherProps,\n ownerState: {\n ...otherProps.ownerState,\n ...ownerState\n }\n };\n}\nexport default appendOwnerState;","/**\n * Extracts event handlers from a given object.\n * A prop is considered an event handler if it is a function and its name starts with `on`.\n *\n * @param object An object to extract event handlers from.\n * @param excludeKeys An array of keys to exclude from the returned object.\n */\nfunction extractEventHandlers(object, excludeKeys = []) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nexport default extractEventHandlers;","/**\n * Removes event handlers from the given object.\n * A field is considered an event handler if it is a function with a name beginning with `on`.\n *\n * @param object Object to remove event handlers from.\n * @returns Object with event handlers removed.\n */\nfunction omitEventHandlers(object) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nexport default omitEventHandlers;","import clsx from 'clsx';\nimport extractEventHandlers from \"../extractEventHandlers/index.js\";\nimport omitEventHandlers from \"../omitEventHandlers/index.js\";\n/**\n * Merges the slot component internal props (usually coming from a hook)\n * with the externally provided ones.\n *\n * The merge order is (the latter overrides the former):\n * 1. The internal props (specified as a getter function to work with get*Props hook result)\n * 2. Additional props (specified internally on a Base UI component)\n * 3. External props specified on the owner component. These should only be used on a root slot.\n * 4. External props specified in the `slotProps.*` prop.\n * 5. The `className` prop - combined from all the above.\n * @param parameters\n * @returns\n */\nfunction mergeSlotProps(parameters) {\n const {\n getSlotProps,\n additionalProps,\n externalSlotProps,\n externalForwardedProps,\n className\n } = parameters;\n if (!getSlotProps) {\n // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,\n // so we can simply merge all the props without having to worry about extracting event handlers.\n const joinedClasses = clsx(additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);\n const mergedStyle = {\n ...additionalProps?.style,\n ...externalForwardedProps?.style,\n ...externalSlotProps?.style\n };\n const props = {\n ...additionalProps,\n ...externalForwardedProps,\n ...externalSlotProps\n };\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: undefined\n };\n }\n\n // In this case, getSlotProps is responsible for calling the external event handlers.\n // We don't need to include them in the merged props because of this.\n\n const eventHandlers = extractEventHandlers({\n ...externalForwardedProps,\n ...externalSlotProps\n });\n const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);\n const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);\n const internalSlotProps = getSlotProps(eventHandlers);\n\n // The order of classes is important here.\n // Emotion (that we use in libraries consuming Base UI) depends on this order\n // to properly override style. It requires the most important classes to be last\n // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.\n const joinedClasses = clsx(internalSlotProps?.className, additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);\n const mergedStyle = {\n ...internalSlotProps?.style,\n ...additionalProps?.style,\n ...externalForwardedProps?.style,\n ...externalSlotProps?.style\n };\n const props = {\n ...internalSlotProps,\n ...additionalProps,\n ...otherPropsWithoutEventHandlers,\n ...componentsPropsWithoutEventHandlers\n };\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: internalSlotProps.ref\n };\n}\nexport default mergeSlotProps;","/**\n * If `componentProps` is a function, calls it with the provided `ownerState`.\n * Otherwise, just returns `componentProps`.\n */\nfunction resolveComponentProps(componentProps, ownerState, slotState) {\n if (typeof componentProps === 'function') {\n return componentProps(ownerState, slotState);\n }\n return componentProps;\n}\nexport default resolveComponentProps;","'use client';\n\nimport useForkRef from \"../useForkRef/index.js\";\nimport appendOwnerState from \"../appendOwnerState/index.js\";\nimport mergeSlotProps from \"../mergeSlotProps/index.js\";\nimport resolveComponentProps from \"../resolveComponentProps/index.js\";\n/**\n * @ignore - do not document.\n * Builds the props to be passed into the slot of an unstyled component.\n * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior.\n * If the slot component is not a host component, it also merges in the `ownerState`.\n *\n * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component.\n */\nfunction useSlotProps(parameters) {\n const {\n elementType,\n externalSlotProps,\n ownerState,\n skipResolvingSlotProps = false,\n ...other\n } = parameters;\n const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);\n const {\n props: mergedProps,\n internalRef\n } = mergeSlotProps({\n ...other,\n externalSlotProps: resolvedComponentsProps\n });\n const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.additionalProps?.ref);\n const props = appendOwnerState(elementType, {\n ...mergedProps,\n ref\n }, ownerState);\n return props;\n}\nexport default useSlotProps;","/**\n * TODO v5: consider making it private\n *\n * passes {value} to {ref}\n *\n * WARNING: Be sure to only call this inside a callback that is passed as a ref.\n * Otherwise, make sure to cleanup the previous {ref} if it changes. See\n * https://github.com/mui/material-ui/issues/13539\n *\n * Useful if you want to expose the ref of an inner component to the public API\n * while still using it inside the component.\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { exactProp, HTMLElementType, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef, unstable_setRef as setRef, unstable_getReactElementRef as getReactElementRef } from '@mui/utils';\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\n\n/**\n * Portals provide a first-class way to render children into a DOM node\n * that exists outside the DOM hierarchy of the parent component.\n *\n * Demos:\n *\n * - [Portal](https://v6.mui.com/material-ui/react-portal/)\n *\n * API:\n *\n * - [Portal API](https://v6.mui.com/material-ui/api/portal/)\n */\nconst Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef) {\n const {\n children,\n container,\n disablePortal = false\n } = props;\n const [mountNode, setMountNode] = React.useState(null);\n const handleRef = useForkRef(/*#__PURE__*/React.isValidElement(children) ? getReactElementRef(children) : null, forwardedRef);\n useEnhancedEffect(() => {\n if (!disablePortal) {\n setMountNode(getContainer(container) || document.body);\n }\n }, [container, disablePortal]);\n useEnhancedEffect(() => {\n if (mountNode && !disablePortal) {\n setRef(forwardedRef, mountNode);\n return () => {\n setRef(forwardedRef, null);\n };\n }\n return undefined;\n }, [forwardedRef, mountNode, disablePortal]);\n if (disablePortal) {\n if (/*#__PURE__*/React.isValidElement(children)) {\n const newProps = {\n ref: handleRef\n };\n return /*#__PURE__*/React.cloneElement(children, newProps);\n }\n return children;\n }\n return mountNode ? /*#__PURE__*/ReactDOM.createPortal(children, mountNode) : mountNode;\n});\nprocess.env.NODE_ENV !== \"production\" ? Portal.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The children to render into the `container`.\n */\n children: PropTypes.node,\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n Portal['propTypes' + ''] = exactProp(Portal.propTypes);\n}\nexport default Portal;","const defaultGenerator = componentName => componentName;\nconst createClassNameGenerator = () => {\n let generate = defaultGenerator;\n return {\n configure(generator) {\n generate = generator;\n },\n generate(componentName) {\n return generate(componentName);\n },\n reset() {\n generate = defaultGenerator;\n }\n };\n};\nconst ClassNameGenerator = createClassNameGenerator();\nexport default ClassNameGenerator;","import ClassNameGenerator from \"../ClassNameGenerator/index.js\";\nexport const globalStateClasses = {\n active: 'active',\n checked: 'checked',\n completed: 'completed',\n disabled: 'disabled',\n error: 'error',\n expanded: 'expanded',\n focused: 'focused',\n focusVisible: 'focusVisible',\n open: 'open',\n readOnly: 'readOnly',\n required: 'required',\n selected: 'selected'\n};\nexport default function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import generateUtilityClass from \"../generateUtilityClass/index.js\";\nexport default function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);\n });\n return result;\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPopperUtilityClass(slot) {\n return generateUtilityClass('MuiPopper', slot);\n}\nconst popperClasses = generateUtilityClasses('MuiPopper', ['root']);\nexport default popperClasses;","'use client';\n\nimport * as React from 'react';\nimport { chainPropTypes, HTMLElementType, refType, unstable_ownerDocument as ownerDocument, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef } from '@mui/utils';\nimport { createPopper } from '@popperjs/core';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport Portal from \"../Portal/index.js\";\nimport { getPopperUtilityClass } from \"./popperClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction flipPlacement(placement, direction) {\n if (direction === 'ltr') {\n return placement;\n }\n switch (placement) {\n case 'bottom-end':\n return 'bottom-start';\n case 'bottom-start':\n return 'bottom-end';\n case 'top-end':\n return 'top-start';\n case 'top-start':\n return 'top-end';\n default:\n return placement;\n }\n}\nfunction resolveAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\nfunction isHTMLElement(element) {\n return element.nodeType !== undefined;\n}\nfunction isVirtualElement(element) {\n return !isHTMLElement(element);\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getPopperUtilityClass, classes);\n};\nconst defaultPopperOptions = {};\nconst PopperTooltip = /*#__PURE__*/React.forwardRef(function PopperTooltip(props, forwardedRef) {\n const {\n anchorEl,\n children,\n direction,\n disablePortal,\n modifiers,\n open,\n placement: initialPlacement,\n popperOptions,\n popperRef: popperRefProp,\n slotProps = {},\n slots = {},\n TransitionProps,\n // @ts-ignore internal logic\n ownerState: ownerStateProp,\n // prevent from spreading to DOM, it can come from the parent component e.g. Select.\n ...other\n } = props;\n const tooltipRef = React.useRef(null);\n const ownRef = useForkRef(tooltipRef, forwardedRef);\n const popperRef = React.useRef(null);\n const handlePopperRef = useForkRef(popperRef, popperRefProp);\n const handlePopperRefRef = React.useRef(handlePopperRef);\n useEnhancedEffect(() => {\n handlePopperRefRef.current = handlePopperRef;\n }, [handlePopperRef]);\n React.useImperativeHandle(popperRefProp, () => popperRef.current, []);\n const rtlPlacement = flipPlacement(initialPlacement, direction);\n /**\n * placement initialized from prop but can change during lifetime if modifiers.flip.\n * modifiers.flip is essentially a flip for controlled/uncontrolled behavior\n */\n const [placement, setPlacement] = React.useState(rtlPlacement);\n const [resolvedAnchorElement, setResolvedAnchorElement] = React.useState(resolveAnchorEl(anchorEl));\n React.useEffect(() => {\n if (popperRef.current) {\n popperRef.current.forceUpdate();\n }\n });\n React.useEffect(() => {\n if (anchorEl) {\n setResolvedAnchorElement(resolveAnchorEl(anchorEl));\n }\n }, [anchorEl]);\n useEnhancedEffect(() => {\n if (!resolvedAnchorElement || !open) {\n return undefined;\n }\n const handlePopperUpdate = data => {\n setPlacement(data.placement);\n };\n if (process.env.NODE_ENV !== 'production') {\n if (resolvedAnchorElement && isHTMLElement(resolvedAnchorElement) && resolvedAnchorElement.nodeType === 1) {\n const box = resolvedAnchorElement.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n console.warn(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n }\n let popperModifiers = [{\n name: 'preventOverflow',\n options: {\n altBoundary: disablePortal\n }\n }, {\n name: 'flip',\n options: {\n altBoundary: disablePortal\n }\n }, {\n name: 'onUpdate',\n enabled: true,\n phase: 'afterWrite',\n fn: ({\n state\n }) => {\n handlePopperUpdate(state);\n }\n }];\n if (modifiers != null) {\n popperModifiers = popperModifiers.concat(modifiers);\n }\n if (popperOptions && popperOptions.modifiers != null) {\n popperModifiers = popperModifiers.concat(popperOptions.modifiers);\n }\n const popper = createPopper(resolvedAnchorElement, tooltipRef.current, {\n placement: rtlPlacement,\n ...popperOptions,\n modifiers: popperModifiers\n });\n handlePopperRefRef.current(popper);\n return () => {\n popper.destroy();\n handlePopperRefRef.current(null);\n };\n }, [resolvedAnchorElement, disablePortal, modifiers, open, popperOptions, rtlPlacement]);\n const childProps = {\n placement: placement\n };\n if (TransitionProps !== null) {\n childProps.TransitionProps = TransitionProps;\n }\n const classes = useUtilityClasses(props);\n const Root = slots.root ?? 'div';\n const rootProps = useSlotProps({\n elementType: Root,\n externalSlotProps: slotProps.root,\n externalForwardedProps: other,\n additionalProps: {\n role: 'tooltip',\n ref: ownRef\n },\n ownerState: props,\n className: classes.root\n });\n return /*#__PURE__*/_jsx(Root, {\n ...rootProps,\n children: typeof children === 'function' ? children(childProps) : children\n });\n});\n\n/**\n * @ignore - internal component.\n */\nconst Popper = /*#__PURE__*/React.forwardRef(function Popper(props, forwardedRef) {\n const {\n anchorEl,\n children,\n container: containerProp,\n direction = 'ltr',\n disablePortal = false,\n keepMounted = false,\n modifiers,\n open,\n placement = 'bottom',\n popperOptions = defaultPopperOptions,\n popperRef,\n style,\n transition = false,\n slotProps = {},\n slots = {},\n ...other\n } = props;\n const [exited, setExited] = React.useState(true);\n const handleEnter = () => {\n setExited(false);\n };\n const handleExited = () => {\n setExited(true);\n };\n if (!keepMounted && !open && (!transition || exited)) {\n return null;\n }\n\n // If the container prop is provided, use that\n // If the anchorEl prop is provided, use its parent body element as the container\n // If neither are provided let the Modal take care of choosing the container\n let container;\n if (containerProp) {\n container = containerProp;\n } else if (anchorEl) {\n const resolvedAnchorEl = resolveAnchorEl(anchorEl);\n container = resolvedAnchorEl && isHTMLElement(resolvedAnchorEl) ? ownerDocument(resolvedAnchorEl).body : ownerDocument(null).body;\n }\n const display = !open && keepMounted && (!transition || exited) ? 'none' : undefined;\n const transitionProps = transition ? {\n in: open,\n onEnter: handleEnter,\n onExited: handleExited\n } : undefined;\n return /*#__PURE__*/_jsx(Portal, {\n disablePortal: disablePortal,\n container: container,\n children: /*#__PURE__*/_jsx(PopperTooltip, {\n anchorEl: anchorEl,\n direction: direction,\n disablePortal: disablePortal,\n modifiers: modifiers,\n ref: forwardedRef,\n open: transition ? !exited : open,\n placement: placement,\n popperOptions: popperOptions,\n popperRef: popperRef,\n slotProps: slotProps,\n slots: slots,\n ...other,\n style: {\n // Prevents scroll issue, waiting for Popper.js to add this style once initiated.\n position: 'fixed',\n // Fix Popper.js display issue\n top: 0,\n left: 0,\n display,\n ...style\n },\n TransitionProps: transitionProps,\n children: children\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Popper.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),\n * or a function that returns either.\n * It's used to set the position of the popper.\n * The return value will passed as the reference object of the Popper instance.\n */\n anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]), props => {\n if (props.open) {\n const resolvedAnchorEl = resolveAnchorEl(props.anchorEl);\n if (resolvedAnchorEl && isHTMLElement(resolvedAnchorEl) && resolvedAnchorEl.nodeType === 1) {\n const box = resolvedAnchorEl.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n } else if (!resolvedAnchorEl || typeof resolvedAnchorEl.getBoundingClientRect !== 'function' || isVirtualElement(resolvedAnchorEl) && resolvedAnchorEl.contextElement != null && resolvedAnchorEl.contextElement.nodeType !== 1) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'It should be an HTML element instance or a virtualElement ', '(https://popper.js.org/docs/v2/virtual-elements/).'].join('\\n'));\n }\n }\n return null;\n }),\n /**\n * Popper render function or node.\n */\n children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * Direction of the text.\n * @default 'ltr'\n */\n direction: PropTypes.oneOf(['ltr', 'rtl']),\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Popper.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Popper.js is based on a \"plugin-like\" architecture,\n * most of its features are fully encapsulated \"modifiers\".\n *\n * A modifier is a function that is called each time Popper.js needs to\n * compute the position of the popper.\n * For this reason, modifiers should be very performant to avoid bottlenecks.\n * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).\n */\n modifiers: PropTypes.arrayOf(PropTypes.shape({\n data: PropTypes.object,\n effect: PropTypes.func,\n enabled: PropTypes.bool,\n fn: PropTypes.func,\n name: PropTypes.any,\n options: PropTypes.object,\n phase: PropTypes.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),\n requires: PropTypes.arrayOf(PropTypes.string),\n requiresIfExists: PropTypes.arrayOf(PropTypes.string)\n })),\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Popper placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.\n * @default {}\n */\n popperOptions: PropTypes.shape({\n modifiers: PropTypes.array,\n onFirstUpdate: PropTypes.func,\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n strategy: PropTypes.oneOf(['absolute', 'fixed'])\n }),\n /**\n * A ref that points to the used popper instance.\n */\n popperRef: refType,\n /**\n * The props used for each slot inside the Popper.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * Help supporting a react-transition-group/Transition component.\n * @default false\n */\n transition: PropTypes.bool\n} : void 0;\nexport default Popper;","'use client';\n\nimport { useRtl } from '@mui/system/RtlProvider';\nimport refType from '@mui/utils/refType';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport BasePopper from \"./BasePopper.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PopperRoot = styled(BasePopper, {\n name: 'MuiPopper',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\n\n/**\n *\n * Demos:\n *\n * - [Autocomplete](https://v6.mui.com/material-ui/react-autocomplete/)\n * - [Menu](https://v6.mui.com/material-ui/react-menu/)\n * - [Popper](https://v6.mui.com/material-ui/react-popper/)\n *\n * API:\n *\n * - [Popper API](https://v6.mui.com/material-ui/api/popper/)\n */\nconst Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {\n const isRtl = useRtl();\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiPopper'\n });\n const {\n anchorEl,\n component,\n components,\n componentsProps,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition,\n slots,\n slotProps,\n ...other\n } = props;\n const RootComponent = slots?.root ?? components?.Root;\n const otherProps = {\n anchorEl,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition,\n ...other\n };\n return /*#__PURE__*/_jsx(PopperRoot, {\n as: component,\n direction: isRtl ? 'rtl' : 'ltr',\n slots: {\n root: RootComponent\n },\n slotProps: slotProps ?? componentsProps,\n ...otherProps,\n ref: ref\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Popper.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),\n * or a function that returns either.\n * It's used to set the position of the popper.\n * The return value will passed as the reference object of the Popper instance.\n */\n anchorEl: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]),\n /**\n * Popper render function or node.\n */\n children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n /**\n * The props used for each slot inside the Popper.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).\n * @default {}\n */\n componentsProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Popper.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Popper.js is based on a \"plugin-like\" architecture,\n * most of its features are fully encapsulated \"modifiers\".\n *\n * A modifier is a function that is called each time Popper.js needs to\n * compute the position of the popper.\n * For this reason, modifiers should be very performant to avoid bottlenecks.\n * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).\n */\n modifiers: PropTypes.arrayOf(PropTypes.shape({\n data: PropTypes.object,\n effect: PropTypes.func,\n enabled: PropTypes.bool,\n fn: PropTypes.func,\n name: PropTypes.any,\n options: PropTypes.object,\n phase: PropTypes.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),\n requires: PropTypes.arrayOf(PropTypes.string),\n requiresIfExists: PropTypes.arrayOf(PropTypes.string)\n })),\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Popper placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.\n * @default {}\n */\n popperOptions: PropTypes.shape({\n modifiers: PropTypes.array,\n onFirstUpdate: PropTypes.func,\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n strategy: PropTypes.oneOf(['absolute', 'fixed'])\n }),\n /**\n * A ref that points to the used popper instance.\n */\n popperRef: refType,\n /**\n * The props used for each slot inside the Popper.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Help supporting a react-transition-group/Transition component.\n * @default false\n */\n transition: PropTypes.bool\n} : void 0;\nexport default Popper;","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from \"../useEnhancedEffect/index.js\";\n\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nexport default useEventCallback;","'use client';\n\nimport useEventCallback from '@mui/utils/useEventCallback';\nexport default useEventCallback;","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why\nconst safeReact = {\n ...React\n};\nconst maybeReactUseId = safeReact.useId;\n\n/**\n *\n * @example
\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n // React.useId() is only available from React 17.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? reactId;\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","'use client';\n\nimport useId from '@mui/utils/useId';\nexport default useId;","'use client';\n\n// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- process.env never changes, dependency arrays are intentionally ignored\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport default function useControlled({\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n}) {\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n // Object.is() is not equivalent to the === operator.\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is for more details.\n if (!isControlled && !Object.is(defaultValue, defaultProp)) {\n console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}","'use client';\n\nimport useControlled from '@mui/utils/useControlled';\nexport default useControlled;","'use client';\n\nimport useForkRef from '@mui/utils/useForkRef';\nimport appendOwnerState from '@mui/utils/appendOwnerState';\nimport resolveComponentProps from '@mui/utils/resolveComponentProps';\nimport mergeSlotProps from '@mui/utils/mergeSlotProps';\n/**\n * An internal function to create a Material UI slot.\n *\n * This is an advanced version of Base UI `useSlotProps` because Material UI allows leaf component to be customized via `component` prop\n * while Base UI does not need to support leaf component customization.\n *\n * @param {string} name: name of the slot\n * @param {object} parameters\n * @returns {[Slot, slotProps]} The slot's React component and the slot's props\n *\n * Note: the returned slot's props\n * - will never contain `component` prop.\n * - might contain `as` prop.\n */\nexport default function useSlot(\n/**\n * The slot's name. All Material UI components should have `root` slot.\n *\n * If the name is `root`, the logic behaves differently from other slots,\n * e.g. the `externalForwardedProps` are spread to `root` slot but not other slots.\n */\nname, parameters) {\n const {\n className,\n elementType: initialElementType,\n ownerState,\n externalForwardedProps,\n internalForwardedProps,\n shouldForwardComponentProp = false,\n ...useSlotPropsParams\n } = parameters;\n const {\n component: rootComponent,\n slots = {\n [name]: undefined\n },\n slotProps = {\n [name]: undefined\n },\n ...other\n } = externalForwardedProps;\n const elementType = slots[name] || initialElementType;\n\n // `slotProps[name]` can be a callback that receives the component's ownerState.\n // `resolvedComponentsProps` is always a plain object.\n const resolvedComponentsProps = resolveComponentProps(slotProps[name], ownerState);\n const {\n props: {\n component: slotComponent,\n ...mergedProps\n },\n internalRef\n } = mergeSlotProps({\n className,\n ...useSlotPropsParams,\n externalForwardedProps: name === 'root' ? other : undefined,\n externalSlotProps: resolvedComponentsProps\n });\n const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.ref);\n const LeafComponent = name === 'root' ? slotComponent || rootComponent : slotComponent;\n const props = appendOwnerState(elementType, {\n ...(name === 'root' && !rootComponent && !slots[name] && internalForwardedProps),\n ...(name !== 'root' && !slots[name] && internalForwardedProps),\n ...mergedProps,\n ...(LeafComponent && !shouldForwardComponentProp && {\n as: LeafComponent\n }),\n ...(LeafComponent && shouldForwardComponentProp && {\n component: LeafComponent\n }),\n ref\n }, ownerState);\n return [elementType, props];\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTooltipUtilityClass(slot) {\n return generateUtilityClass('MuiTooltip', slot);\n}\nconst tooltipClasses = generateUtilityClasses('MuiTooltip', ['popper', 'popperInteractive', 'popperArrow', 'popperClose', 'tooltip', 'tooltipArrow', 'touch', 'tooltipPlacementLeft', 'tooltipPlacementRight', 'tooltipPlacementTop', 'tooltipPlacementBottom', 'arrow']);\nexport default tooltipClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useTimeout, { Timeout } from '@mui/utils/useTimeout';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha } from '@mui/system/colorManipulator';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport isFocusVisible from '@mui/utils/isFocusVisible';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport { styled, useTheme } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport Grow from \"../Grow/index.js\";\nimport Popper from \"../Popper/index.js\";\nimport useEventCallback from \"../utils/useEventCallback.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useId from \"../utils/useId.js\";\nimport useControlled from \"../utils/useControlled.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport tooltipClasses, { getTooltipUtilityClass } from \"./tooltipClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableInteractive,\n arrow,\n touch,\n placement\n } = ownerState;\n const slots = {\n popper: ['popper', !disableInteractive && 'popperInteractive', arrow && 'popperArrow'],\n tooltip: ['tooltip', arrow && 'tooltipArrow', touch && 'touch', `tooltipPlacement${capitalize(placement.split('-')[0])}`],\n arrow: ['arrow']\n };\n return composeClasses(slots, getTooltipUtilityClass, classes);\n};\nconst TooltipPopper = styled(Popper, {\n name: 'MuiTooltip',\n slot: 'Popper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];\n }\n})(memoTheme(({\n theme\n}) => ({\n zIndex: (theme.vars || theme).zIndex.tooltip,\n pointerEvents: 'none',\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disableInteractive,\n style: {\n pointerEvents: 'auto'\n }\n }, {\n props: ({\n open\n }) => !open,\n style: {\n pointerEvents: 'none'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow,\n style: {\n [`&[data-popper-placement*=\"bottom\"] .${tooltipClasses.arrow}`]: {\n top: 0,\n marginTop: '-0.71em',\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n [`&[data-popper-placement*=\"top\"] .${tooltipClasses.arrow}`]: {\n bottom: 0,\n marginBottom: '-0.71em',\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '100% 100%'\n }\n },\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '0 0'\n }\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n left: 0,\n marginLeft: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !!ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n right: 0,\n marginRight: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n right: 0,\n marginRight: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !!ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n left: 0,\n marginLeft: '-0.71em'\n }\n }\n }]\n})));\nconst TooltipTooltip = styled('div', {\n name: 'MuiTooltip',\n slot: 'Tooltip',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles[`tooltipPlacement${capitalize(ownerState.placement.split('-')[0])}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.92),\n borderRadius: (theme.vars || theme).shape.borderRadius,\n color: (theme.vars || theme).palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(11),\n maxWidth: 300,\n margin: 2,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium,\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n transformOrigin: 'right center'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n transformOrigin: 'left center'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: {\n transformOrigin: 'center bottom',\n marginBottom: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: {\n transformOrigin: 'center top',\n marginTop: '14px'\n },\n variants: [{\n props: ({\n ownerState\n }) => ownerState.arrow,\n style: {\n position: 'relative',\n margin: 0\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: `${round(16 / 14)}em`,\n fontWeight: theme.typography.fontWeightRegular\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.isRtl,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginRight: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginLeft: '14px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.isRtl && ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginRight: '24px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginLeft: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.isRtl,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginLeft: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginRight: '14px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.isRtl && ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginLeft: '24px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginRight: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: {\n marginBottom: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: {\n marginTop: '24px'\n }\n }\n }]\n})));\nconst TooltipArrow = styled('span', {\n name: 'MuiTooltip',\n slot: 'Arrow',\n overridesResolver: (props, styles) => styles.arrow\n})(memoTheme(({\n theme\n}) => ({\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em' /* = width / sqrt(2) = (length of the hypotenuse) */,\n boxSizing: 'border-box',\n color: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n})));\nlet hystersisOpen = false;\nconst hystersisTimer = new Timeout();\nlet cursorPosition = {\n x: 0,\n y: 0\n};\nexport function testReset() {\n hystersisOpen = false;\n hystersisTimer.clear();\n}\nfunction composeEventHandler(handler, eventHandler) {\n return (event, ...params) => {\n if (eventHandler) {\n eventHandler(event, ...params);\n }\n handler(event, ...params);\n };\n}\n\n// TODO v6: Remove PopperComponent, PopperProps, TransitionComponent and TransitionProps.\nconst Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTooltip'\n });\n const {\n arrow = false,\n children: childrenProp,\n classes: classesProp,\n components = {},\n componentsProps = {},\n describeChild = false,\n disableFocusListener = false,\n disableHoverListener = false,\n disableInteractive: disableInteractiveProp = false,\n disableTouchListener = false,\n enterDelay = 100,\n enterNextDelay = 0,\n enterTouchDelay = 700,\n followCursor = false,\n id: idProp,\n leaveDelay = 0,\n leaveTouchDelay = 1500,\n onClose,\n onOpen,\n open: openProp,\n placement = 'bottom',\n PopperComponent: PopperComponentProp,\n PopperProps = {},\n slotProps = {},\n slots = {},\n title,\n TransitionComponent: TransitionComponentProp,\n TransitionProps,\n ...other\n } = props;\n\n // to prevent runtime errors, developers will need to provide a child as a React element anyway.\n const children = /*#__PURE__*/React.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/_jsx(\"span\", {\n children: childrenProp\n });\n const theme = useTheme();\n const isRtl = useRtl();\n const [childNode, setChildNode] = React.useState();\n const [arrowRef, setArrowRef] = React.useState(null);\n const ignoreNonTouchEvents = React.useRef(false);\n const disableInteractive = disableInteractiveProp || followCursor;\n const closeTimer = useTimeout();\n const enterTimer = useTimeout();\n const leaveTimer = useTimeout();\n const touchTimer = useTimeout();\n const [openState, setOpenState] = useControlled({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n });\n let open = openState;\n if (process.env.NODE_ENV !== 'production') {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n const {\n current: isControlled\n } = React.useRef(openProp !== undefined);\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n React.useEffect(() => {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.warn(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n const id = useId(idProp);\n const prevUserSelect = React.useRef();\n const stopTouchInteraction = useEventCallback(() => {\n if (prevUserSelect.current !== undefined) {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n prevUserSelect.current = undefined;\n }\n touchTimer.clear();\n });\n React.useEffect(() => stopTouchInteraction, [stopTouchInteraction]);\n const handleOpen = event => {\n hystersisTimer.clear();\n hystersisOpen = true;\n\n // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n setOpenState(true);\n if (onOpen && !open) {\n onOpen(event);\n }\n };\n const handleClose = useEventCallback(\n /**\n * @param {React.SyntheticEvent | Event} event\n */\n event => {\n hystersisTimer.start(800 + leaveDelay, () => {\n hystersisOpen = false;\n });\n setOpenState(false);\n if (onClose && open) {\n onClose(event);\n }\n closeTimer.start(theme.transitions.duration.shortest, () => {\n ignoreNonTouchEvents.current = false;\n });\n });\n const handleMouseOver = event => {\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n }\n\n // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n if (childNode) {\n childNode.removeAttribute('title');\n }\n enterTimer.clear();\n leaveTimer.clear();\n if (enterDelay || hystersisOpen && enterNextDelay) {\n enterTimer.start(hystersisOpen ? enterNextDelay : enterDelay, () => {\n handleOpen(event);\n });\n } else {\n handleOpen(event);\n }\n };\n const handleMouseLeave = event => {\n enterTimer.clear();\n leaveTimer.start(leaveDelay, () => {\n handleClose(event);\n });\n };\n const [, setChildIsFocusVisible] = React.useState(false);\n const handleBlur = event => {\n if (!isFocusVisible(event.target)) {\n setChildIsFocusVisible(false);\n handleMouseLeave(event);\n }\n };\n const handleFocus = event => {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n if (isFocusVisible(event.target)) {\n setChildIsFocusVisible(true);\n handleMouseOver(event);\n }\n };\n const detectTouchStart = event => {\n ignoreNonTouchEvents.current = true;\n const childrenProps = children.props;\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n const handleTouchStart = event => {\n detectTouchStart(event);\n leaveTimer.clear();\n closeTimer.clear();\n stopTouchInteraction();\n prevUserSelect.current = document.body.style.WebkitUserSelect;\n // Prevent iOS text selection on long-tap.\n document.body.style.WebkitUserSelect = 'none';\n touchTimer.start(enterTouchDelay, () => {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n handleMouseOver(event);\n });\n };\n const handleTouchEnd = event => {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n stopTouchInteraction();\n leaveTimer.start(leaveTouchDelay, () => {\n handleClose(event);\n });\n };\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n\n /**\n * @param {KeyboardEvent} nativeEvent\n */\n function handleKeyDown(nativeEvent) {\n if (nativeEvent.key === 'Escape') {\n handleClose(nativeEvent);\n }\n }\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleClose, open]);\n const handleRef = useForkRef(getReactElementRef(children), setChildNode, ref);\n\n // There is no point in displaying an empty tooltip.\n // So we exclude all falsy values, except 0, which is valid.\n if (!title && title !== 0) {\n open = false;\n }\n const popperRef = React.useRef();\n const handleMouseMove = event => {\n const childrenProps = children.props;\n if (childrenProps.onMouseMove) {\n childrenProps.onMouseMove(event);\n }\n cursorPosition = {\n x: event.clientX,\n y: event.clientY\n };\n if (popperRef.current) {\n popperRef.current.update();\n }\n };\n const nameOrDescProps = {};\n const titleIsString = typeof title === 'string';\n if (describeChild) {\n nameOrDescProps.title = !open && titleIsString && !disableHoverListener ? title : null;\n nameOrDescProps['aria-describedby'] = open ? id : null;\n } else {\n nameOrDescProps['aria-label'] = titleIsString ? title : null;\n nameOrDescProps['aria-labelledby'] = open && !titleIsString ? id : null;\n }\n const childrenProps = {\n ...nameOrDescProps,\n ...other,\n ...children.props,\n className: clsx(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef,\n ...(followCursor ? {\n onMouseMove: handleMouseMove\n } : {})\n };\n if (process.env.NODE_ENV !== 'production') {\n childrenProps['data-mui-internal-clone-element'] = true;\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n React.useEffect(() => {\n if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {\n console.error(['MUI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\\n'));\n }\n }, [childNode]);\n }\n const interactiveWrapperListeners = {};\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n if (!disableHoverListener) {\n childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);\n childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);\n if (!disableInteractive) {\n interactiveWrapperListeners.onMouseOver = handleMouseOver;\n interactiveWrapperListeners.onMouseLeave = handleMouseLeave;\n }\n }\n if (!disableFocusListener) {\n childrenProps.onFocus = composeEventHandler(handleFocus, childrenProps.onFocus);\n childrenProps.onBlur = composeEventHandler(handleBlur, childrenProps.onBlur);\n if (!disableInteractive) {\n interactiveWrapperListeners.onFocus = handleFocus;\n interactiveWrapperListeners.onBlur = handleBlur;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (children.props.title) {\n console.error(['MUI: You have provided a `title` prop to the child of .', `Remove this title prop \\`${children.props.title}\\` or the Tooltip component.`].join('\\n'));\n }\n }\n const ownerState = {\n ...props,\n isRtl,\n arrow,\n disableInteractive,\n placement,\n PopperComponentProp,\n touch: ignoreNonTouchEvents.current\n };\n const resolvedPopperProps = typeof slotProps.popper === 'function' ? slotProps.popper(ownerState) : slotProps.popper;\n const popperOptions = React.useMemo(() => {\n let tooltipModifiers = [{\n name: 'arrow',\n enabled: Boolean(arrowRef),\n options: {\n element: arrowRef,\n padding: 4\n }\n }];\n if (PopperProps.popperOptions?.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);\n }\n if (resolvedPopperProps?.popperOptions?.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(resolvedPopperProps.popperOptions.modifiers);\n }\n return {\n ...PopperProps.popperOptions,\n ...resolvedPopperProps?.popperOptions,\n modifiers: tooltipModifiers\n };\n }, [arrowRef, PopperProps.popperOptions, resolvedPopperProps?.popperOptions]);\n const classes = useUtilityClasses(ownerState);\n const resolvedTransitionProps = typeof slotProps.transition === 'function' ? slotProps.transition(ownerState) : slotProps.transition;\n const externalForwardedProps = {\n slots: {\n popper: components.Popper,\n transition: components.Transition ?? TransitionComponentProp,\n tooltip: components.Tooltip,\n arrow: components.Arrow,\n ...slots\n },\n slotProps: {\n arrow: slotProps.arrow ?? componentsProps.arrow,\n popper: {\n ...PopperProps,\n ...(resolvedPopperProps ?? componentsProps.popper)\n },\n // resolvedPopperProps can be spread because it's already an object\n tooltip: slotProps.tooltip ?? componentsProps.tooltip,\n transition: {\n ...TransitionProps,\n ...(resolvedTransitionProps ?? componentsProps.transition)\n }\n }\n };\n const [PopperSlot, popperSlotProps] = useSlot('popper', {\n elementType: TooltipPopper,\n externalForwardedProps,\n ownerState,\n className: clsx(classes.popper, PopperProps?.className)\n });\n const [TransitionSlot, transitionSlotProps] = useSlot('transition', {\n elementType: Grow,\n externalForwardedProps,\n ownerState\n });\n const [TooltipSlot, tooltipSlotProps] = useSlot('tooltip', {\n elementType: TooltipTooltip,\n className: classes.tooltip,\n externalForwardedProps,\n ownerState\n });\n const [ArrowSlot, arrowSlotProps] = useSlot('arrow', {\n elementType: TooltipArrow,\n className: classes.arrow,\n externalForwardedProps,\n ownerState,\n ref: setArrowRef\n });\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/_jsx(PopperSlot, {\n as: PopperComponentProp ?? Popper,\n placement: placement,\n anchorEl: followCursor ? {\n getBoundingClientRect: () => ({\n top: cursorPosition.y,\n left: cursorPosition.x,\n right: cursorPosition.x,\n bottom: cursorPosition.y,\n width: 0,\n height: 0\n })\n } : childNode,\n popperRef: popperRef,\n open: childNode ? open : false,\n id: id,\n transition: true,\n ...interactiveWrapperListeners,\n ...popperSlotProps,\n popperOptions: popperOptions,\n children: ({\n TransitionProps: TransitionPropsInner\n }) => /*#__PURE__*/_jsx(TransitionSlot, {\n timeout: theme.transitions.duration.shorter,\n ...TransitionPropsInner,\n ...transitionSlotProps,\n children: /*#__PURE__*/_jsxs(TooltipSlot, {\n ...tooltipSlotProps,\n children: [title, arrow ? /*#__PURE__*/_jsx(ArrowSlot, {\n ...arrowSlotProps\n }) : null]\n })\n })\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Tooltip.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, adds an arrow to the tooltip.\n * @default false\n */\n arrow: PropTypes.bool,\n /**\n * Tooltip reference element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Arrow: PropTypes.elementType,\n Popper: PropTypes.elementType,\n Tooltip: PropTypes.elementType,\n Transition: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n arrow: PropTypes.object,\n popper: PropTypes.object,\n tooltip: PropTypes.object,\n transition: PropTypes.object\n }),\n /**\n * Set to `true` if the `title` acts as an accessible description.\n * By default the `title` acts as an accessible label for the child.\n * @default false\n */\n describeChild: PropTypes.bool,\n /**\n * Do not respond to focus-visible events.\n * @default false\n */\n disableFocusListener: PropTypes.bool,\n /**\n * Do not respond to hover events.\n * @default false\n */\n disableHoverListener: PropTypes.bool,\n /**\n * Makes a tooltip not interactive, i.e. it will close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n * @default false\n */\n disableInteractive: PropTypes.bool,\n /**\n * Do not respond to long press touch events.\n * @default false\n */\n disableTouchListener: PropTypes.bool,\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n * @default 100\n */\n enterDelay: PropTypes.number,\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n * @default 0\n */\n enterNextDelay: PropTypes.number,\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n * @default 700\n */\n enterTouchDelay: PropTypes.number,\n /**\n * If `true`, the tooltip follow the cursor over the wrapped element.\n * @default false\n */\n followCursor: PropTypes.bool,\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: PropTypes.string,\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n * @default 0\n */\n leaveDelay: PropTypes.number,\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n * @default 1500\n */\n leaveTouchDelay: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool,\n /**\n * Tooltip placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * The component used for the popper.\n * @deprecated use the `slots.popper` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n PopperComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Popper`](https://mui.com/material-ui/api/popper/) element.\n * @deprecated use the `slotProps.popper` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n PopperProps: PropTypes.object,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n arrow: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n popper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n tooltip: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n arrow: PropTypes.elementType,\n popper: PropTypes.elementType,\n tooltip: PropTypes.elementType,\n transition: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.\n */\n title: PropTypes.node,\n /**\n * The component used for the transition.\n * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @deprecated use the `slots.transition` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.\n * @deprecated use the `slotProps.transition` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Tooltip;","import ownerDocument from '@mui/utils/ownerDocument';\nexport default ownerDocument;","'use client';\n\nimport * as React from 'react';\n\n/**\n * @ignore - internal component.\n */\nconst ListContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n ListContext.displayName = 'ListContext';\n}\nexport default ListContext;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListUtilityClass(slot) {\n return generateUtilityClass('MuiList', slot);\n}\nconst listClasses = generateUtilityClasses('MuiList', ['root', 'padding', 'dense', 'subheader']);\nexport default listClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport ListContext from \"./ListContext.js\";\nimport { getListUtilityClass } from \"./listClasses.js\";\nimport { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disablePadding,\n dense,\n subheader\n } = ownerState;\n const slots = {\n root: ['root', !disablePadding && 'padding', dense && 'dense', subheader && 'subheader']\n };\n return composeClasses(slots, getListUtilityClass, classes);\n};\nconst ListRoot = styled('ul', {\n name: 'MuiList',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disablePadding && styles.padding, ownerState.dense && styles.dense, ownerState.subheader && styles.subheader];\n }\n})({\n listStyle: 'none',\n margin: 0,\n padding: 0,\n position: 'relative',\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disablePadding,\n style: {\n paddingTop: 8,\n paddingBottom: 8\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.subheader,\n style: {\n paddingTop: 0\n }\n }]\n});\nconst List = /*#__PURE__*/React.forwardRef(function List(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiList'\n });\n const {\n children,\n className,\n component = 'ul',\n dense = false,\n disablePadding = false,\n subheader,\n ...other\n } = props;\n const context = React.useMemo(() => ({\n dense\n }), [dense]);\n const ownerState = {\n ...props,\n component,\n dense,\n disablePadding\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: context,\n children: /*#__PURE__*/_jsxs(ListRoot, {\n as: component,\n className: clsx(classes.root, className),\n ref: ref,\n ownerState: ownerState,\n ...other,\n children: [subheader, children]\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? List.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used for\n * the list and list items.\n * The prop is available to descendant components as the `dense` context.\n * @default false\n */\n dense: PropTypes.bool,\n /**\n * If `true`, vertical padding is removed from the list.\n * @default false\n */\n disablePadding: PropTypes.bool,\n /**\n * The content of the subheader, normally `ListSubheader`.\n */\n subheader: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default List;","// A change of the browser zoom change the scrollbar size.\n// Credit https://github.com/twbs/bootstrap/blob/488fd8afc535ca3a6ad4dc581f5e89217b6a36ac/js/src/util/scrollbar.js#L14-L18\nexport default function getScrollbarSize(win = window) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = win.document.documentElement.clientWidth;\n return win.innerWidth - documentWidth;\n}","import getScrollbarSize from '@mui/utils/getScrollbarSize';\nexport default getScrollbarSize;","'use client';\n\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nexport default useEnhancedEffect;","import ownerDocument from \"../ownerDocument/index.js\";\nexport default function ownerWindow(node) {\n const doc = ownerDocument(node);\n return doc.defaultView || window;\n}","import ownerWindow from '@mui/utils/ownerWindow';\nexport default ownerWindow;","'use client';\n\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport ownerDocument from \"../utils/ownerDocument.js\";\nimport List from \"../List/index.js\";\nimport getScrollbarSize from \"../utils/getScrollbarSize.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useEnhancedEffect from \"../utils/useEnhancedEffect.js\";\nimport { ownerWindow } from \"../utils/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction nextItem(list, item, disableListWrap) {\n if (list === item) {\n return list.firstChild;\n }\n if (item && item.nextElementSibling) {\n return item.nextElementSibling;\n }\n return disableListWrap ? null : list.firstChild;\n}\nfunction previousItem(list, item, disableListWrap) {\n if (list === item) {\n return disableListWrap ? list.firstChild : list.lastChild;\n }\n if (item && item.previousElementSibling) {\n return item.previousElementSibling;\n }\n return disableListWrap ? null : list.lastChild;\n}\nfunction textCriteriaMatches(nextFocus, textCriteria) {\n if (textCriteria === undefined) {\n return true;\n }\n let text = nextFocus.innerText;\n if (text === undefined) {\n // jsdom doesn't support innerText\n text = nextFocus.textContent;\n }\n text = text.trim().toLowerCase();\n if (text.length === 0) {\n return false;\n }\n if (textCriteria.repeating) {\n return text[0] === textCriteria.keys[0];\n }\n return text.startsWith(textCriteria.keys.join(''));\n}\nfunction moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, traversalFunction, textCriteria) {\n let wrappedOnce = false;\n let nextFocus = traversalFunction(list, currentFocus, currentFocus ? disableListWrap : false);\n while (nextFocus) {\n // Prevent infinite loop.\n if (nextFocus === list.firstChild) {\n if (wrappedOnce) {\n return false;\n }\n wrappedOnce = true;\n }\n\n // Same logic as useAutocomplete.js\n const nextFocusDisabled = disabledItemsFocusable ? false : nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';\n if (!nextFocus.hasAttribute('tabindex') || !textCriteriaMatches(nextFocus, textCriteria) || nextFocusDisabled) {\n // Move to the next element.\n nextFocus = traversalFunction(list, nextFocus, disableListWrap);\n } else {\n nextFocus.focus();\n return true;\n }\n }\n return false;\n}\n\n/**\n * A permanently displayed menu following https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/.\n * It's exposed to help customization of the [`Menu`](/material-ui/api/menu/) component if you\n * use it separately you need to move focus into the component manually. Once\n * the focus is placed inside the component it is fully keyboard accessible.\n */\nconst MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {\n const {\n // private\n // eslint-disable-next-line react/prop-types\n actions,\n autoFocus = false,\n autoFocusItem = false,\n children,\n className,\n disabledItemsFocusable = false,\n disableListWrap = false,\n onKeyDown,\n variant = 'selectedMenu',\n ...other\n } = props;\n const listRef = React.useRef(null);\n const textCriteriaRef = React.useRef({\n keys: [],\n repeating: true,\n previousKeyMatched: true,\n lastTime: null\n });\n useEnhancedEffect(() => {\n if (autoFocus) {\n listRef.current.focus();\n }\n }, [autoFocus]);\n React.useImperativeHandle(actions, () => ({\n adjustStyleForScrollbar: (containerElement, {\n direction\n }) => {\n // Let's ignore that piece of logic if users are already overriding the width\n // of the menu.\n const noExplicitWidth = !listRef.current.style.width;\n if (containerElement.clientHeight < listRef.current.clientHeight && noExplicitWidth) {\n const scrollbarSize = `${getScrollbarSize(ownerWindow(containerElement))}px`;\n listRef.current.style[direction === 'rtl' ? 'paddingLeft' : 'paddingRight'] = scrollbarSize;\n listRef.current.style.width = `calc(100% + ${scrollbarSize})`;\n }\n return listRef.current;\n }\n }), []);\n const handleKeyDown = event => {\n const list = listRef.current;\n const key = event.key;\n const isModifierKeyPressed = event.ctrlKey || event.metaKey || event.altKey;\n if (isModifierKeyPressed) {\n if (onKeyDown) {\n onKeyDown(event);\n }\n return;\n }\n\n /**\n * @type {Element} - will always be defined since we are in a keydown handler\n * attached to an element. A keydown event is either dispatched to the activeElement\n * or document.body or document.documentElement. Only the first case will\n * trigger this specific handler.\n */\n const currentFocus = ownerDocument(list).activeElement;\n if (key === 'ArrowDown') {\n // Prevent scroll of the page\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'ArrowUp') {\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key === 'Home') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'End') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key.length === 1) {\n const criteria = textCriteriaRef.current;\n const lowerKey = key.toLowerCase();\n const currTime = performance.now();\n if (criteria.keys.length > 0) {\n // Reset\n if (currTime - criteria.lastTime > 500) {\n criteria.keys = [];\n criteria.repeating = true;\n criteria.previousKeyMatched = true;\n } else if (criteria.repeating && lowerKey !== criteria.keys[0]) {\n criteria.repeating = false;\n }\n }\n criteria.lastTime = currTime;\n criteria.keys.push(lowerKey);\n const keepFocusOnCurrent = currentFocus && !criteria.repeating && textCriteriaMatches(currentFocus, criteria);\n if (criteria.previousKeyMatched && (keepFocusOnCurrent || moveFocus(list, currentFocus, false, disabledItemsFocusable, nextItem, criteria))) {\n event.preventDefault();\n } else {\n criteria.previousKeyMatched = false;\n }\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n const handleRef = useForkRef(listRef, ref);\n\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n let activeItemIndex = -1;\n // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n React.Children.forEach(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n if (activeItemIndex === index) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n if (activeItemIndex === index && (child.props.disabled || child.props.muiSkipListHighlight || child.type.muiSkipListHighlight)) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n });\n const items = React.Children.map(children, (child, index) => {\n if (index === activeItemIndex) {\n const newChildProps = {};\n if (autoFocusItem) {\n newChildProps.autoFocus = true;\n }\n if (child.props.tabIndex === undefined && variant === 'selectedMenu') {\n newChildProps.tabIndex = 0;\n }\n return /*#__PURE__*/React.cloneElement(child, newChildProps);\n }\n return child;\n });\n return /*#__PURE__*/_jsx(List, {\n role: \"menu\",\n ref: handleRef,\n className: className,\n onKeyDown: handleKeyDown,\n tabIndex: autoFocus ? 0 : -1,\n ...other,\n children: items\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuList.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, will focus the `[role=\"menu\"]` container and move into tab order.\n * @default false\n */\n autoFocus: PropTypes.bool,\n /**\n * If `true`, will focus the first menuitem if `variant=\"menu\"` or selected item\n * if `variant=\"selectedMenu\"`.\n * @default false\n */\n autoFocusItem: PropTypes.bool,\n /**\n * MenuList contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, will allow focus on disabled items.\n * @default false\n */\n disabledItemsFocusable: PropTypes.bool,\n /**\n * If `true`, the menu items will not wrap focus.\n * @default false\n */\n disableListWrap: PropTypes.bool,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus\n * and the vertical alignment relative to the anchor element.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default MenuList;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getDividerUtilityClass(slot) {\n return generateUtilityClass('MuiDivider', slot);\n}\nconst dividerClasses = generateUtilityClasses('MuiDivider', ['root', 'absolute', 'fullWidth', 'inset', 'middle', 'flexItem', 'light', 'vertical', 'withChildren', 'withChildrenVertical', 'textAlignRight', 'textAlignLeft', 'wrapper', 'wrapperVertical']);\nexport default dividerClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha } from '@mui/system/colorManipulator';\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getDividerUtilityClass } from \"./dividerClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n absolute,\n children,\n classes,\n flexItem,\n light,\n orientation,\n textAlign,\n variant\n } = ownerState;\n const slots = {\n root: ['root', absolute && 'absolute', variant, light && 'light', orientation === 'vertical' && 'vertical', flexItem && 'flexItem', children && 'withChildren', children && orientation === 'vertical' && 'withChildrenVertical', textAlign === 'right' && orientation !== 'vertical' && 'textAlignRight', textAlign === 'left' && orientation !== 'vertical' && 'textAlignLeft'],\n wrapper: ['wrapper', orientation === 'vertical' && 'wrapperVertical']\n };\n return composeClasses(slots, getDividerUtilityClass, classes);\n};\nconst DividerRoot = styled('div', {\n name: 'MuiDivider',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.absolute && styles.absolute, styles[ownerState.variant], ownerState.light && styles.light, ownerState.orientation === 'vertical' && styles.vertical, ownerState.flexItem && styles.flexItem, ownerState.children && styles.withChildren, ownerState.children && ownerState.orientation === 'vertical' && styles.withChildrenVertical, ownerState.textAlign === 'right' && ownerState.orientation !== 'vertical' && styles.textAlignRight, ownerState.textAlign === 'left' && ownerState.orientation !== 'vertical' && styles.textAlignLeft];\n }\n})(memoTheme(({\n theme\n}) => ({\n margin: 0,\n // Reset browser default style.\n flexShrink: 0,\n borderWidth: 0,\n borderStyle: 'solid',\n borderColor: (theme.vars || theme).palette.divider,\n borderBottomWidth: 'thin',\n variants: [{\n props: {\n absolute: true\n },\n style: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n width: '100%'\n }\n }, {\n props: {\n light: true\n },\n style: {\n borderColor: theme.vars ? `rgba(${theme.vars.palette.dividerChannel} / 0.08)` : alpha(theme.palette.divider, 0.08)\n }\n }, {\n props: {\n variant: 'inset'\n },\n style: {\n marginLeft: 72\n }\n }, {\n props: {\n variant: 'middle',\n orientation: 'horizontal'\n },\n style: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2)\n }\n }, {\n props: {\n variant: 'middle',\n orientation: 'vertical'\n },\n style: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n }\n }, {\n props: {\n orientation: 'vertical'\n },\n style: {\n height: '100%',\n borderBottomWidth: 0,\n borderRightWidth: 'thin'\n }\n }, {\n props: {\n flexItem: true\n },\n style: {\n alignSelf: 'stretch',\n height: 'auto'\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.children,\n style: {\n display: 'flex',\n textAlign: 'center',\n border: 0,\n borderTopStyle: 'solid',\n borderLeftStyle: 'solid',\n '&::before, &::after': {\n content: '\"\"',\n alignSelf: 'center'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.children && ownerState.orientation !== 'vertical',\n style: {\n '&::before, &::after': {\n width: '100%',\n borderTop: `thin solid ${(theme.vars || theme).palette.divider}`,\n borderTopStyle: 'inherit'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.orientation === 'vertical' && ownerState.children,\n style: {\n flexDirection: 'column',\n '&::before, &::after': {\n height: '100%',\n borderLeft: `thin solid ${(theme.vars || theme).palette.divider}`,\n borderLeftStyle: 'inherit'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.textAlign === 'right' && ownerState.orientation !== 'vertical',\n style: {\n '&::before': {\n width: '90%'\n },\n '&::after': {\n width: '10%'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.textAlign === 'left' && ownerState.orientation !== 'vertical',\n style: {\n '&::before': {\n width: '10%'\n },\n '&::after': {\n width: '90%'\n }\n }\n }]\n})));\nconst DividerWrapper = styled('span', {\n name: 'MuiDivider',\n slot: 'Wrapper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.wrapper, ownerState.orientation === 'vertical' && styles.wrapperVertical];\n }\n})(memoTheme(({\n theme\n}) => ({\n display: 'inline-block',\n paddingLeft: `calc(${theme.spacing(1)} * 1.2)`,\n paddingRight: `calc(${theme.spacing(1)} * 1.2)`,\n whiteSpace: 'nowrap',\n variants: [{\n props: {\n orientation: 'vertical'\n },\n style: {\n paddingTop: `calc(${theme.spacing(1)} * 1.2)`,\n paddingBottom: `calc(${theme.spacing(1)} * 1.2)`\n }\n }]\n})));\nconst Divider = /*#__PURE__*/React.forwardRef(function Divider(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiDivider'\n });\n const {\n absolute = false,\n children,\n className,\n orientation = 'horizontal',\n component = children || orientation === 'vertical' ? 'div' : 'hr',\n flexItem = false,\n light = false,\n role = component !== 'hr' ? 'separator' : undefined,\n textAlign = 'center',\n variant = 'fullWidth',\n ...other\n } = props;\n const ownerState = {\n ...props,\n absolute,\n component,\n flexItem,\n light,\n orientation,\n role,\n textAlign,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(DividerRoot, {\n as: component,\n className: clsx(classes.root, className),\n role: role,\n ref: ref,\n ownerState: ownerState,\n \"aria-orientation\": role === 'separator' && (component !== 'hr' || orientation === 'vertical') ? orientation : undefined,\n ...other,\n children: children ? /*#__PURE__*/_jsx(DividerWrapper, {\n className: classes.wrapper,\n ownerState: ownerState,\n children: children\n }) : null\n });\n});\n\n/**\n * The following flag is used to ensure that this component isn't tabbable i.e.\n * does not get highlight/focus inside of MUI List.\n */\nif (Divider) {\n Divider.muiSkipListHighlight = true;\n}\nprocess.env.NODE_ENV !== \"production\" ? Divider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Absolutely position the element.\n * @default false\n */\n absolute: PropTypes.bool,\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, a vertical divider will have the correct height when used in flex container.\n * (By default, a vertical divider will have a calculated height of `0px` if it is the child of a flex container.)\n * @default false\n */\n flexItem: PropTypes.bool,\n /**\n * If `true`, the divider will have a lighter color.\n * @default false\n * @deprecated Use (or any opacity or color) instead. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n light: PropTypes.bool,\n /**\n * The component orientation.\n * @default 'horizontal'\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n /**\n * @ignore\n */\n role: PropTypes /* @typescript-to-proptypes-ignore */.string,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The text alignment.\n * @default 'center'\n */\n textAlign: PropTypes.oneOf(['center', 'left', 'right']),\n /**\n * The variant to use.\n * @default 'fullWidth'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['fullWidth', 'inset', 'middle']), PropTypes.string])\n} : void 0;\nexport default Divider;","/**\n * Type guard to check if the object has a \"main\" property of type string.\n *\n * @param obj - the object to check\n * @returns boolean\n */\nfunction hasCorrectMainProperty(obj) {\n return typeof obj.main === 'string';\n}\n/**\n * Checks if the object conforms to the SimplePaletteColorOptions type.\n * The minimum requirement is that the object has a \"main\" property of type string, this is always checked.\n * Optionally, you can pass additional properties to check.\n *\n * @param obj - The object to check\n * @param additionalPropertiesToCheck - Array containing \"light\", \"dark\", and/or \"contrastText\"\n * @returns boolean\n */\nfunction checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {\n if (!hasCorrectMainProperty(obj)) {\n return false;\n }\n for (const value of additionalPropertiesToCheck) {\n if (!obj.hasOwnProperty(value) || typeof obj[value] !== 'string') {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Creates a filter function used to filter simple palette color options.\n * The minimum requirement is that the object has a \"main\" property of type string, this is always checked.\n * Optionally, you can pass additional properties to check.\n *\n * @param additionalPropertiesToCheck - Array containing \"light\", \"dark\", and/or \"contrastText\"\n * @returns ([, value]: [any, PaletteColorOptions]) => boolean\n */\nexport default function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {\n return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);\n}","'use client';\n\nimport * as React from 'react';\nimport useLazyRef from '@mui/utils/useLazyRef';\n/**\n * Lazy initialization container for the Ripple instance. This improves\n * performance by delaying mounting the ripple until it's needed.\n */\nexport class LazyRipple {\n /** React ref to the ripple instance */\n\n /** If the ripple component should be mounted */\n\n /** Promise that resolves when the ripple component is mounted */\n\n /** If the ripple component has been mounted */\n\n /** React state hook setter */\n\n static create() {\n return new LazyRipple();\n }\n static use() {\n /* eslint-disable */\n const ripple = useLazyRef(LazyRipple.create).current;\n const [shouldMount, setShouldMount] = React.useState(false);\n ripple.shouldMount = shouldMount;\n ripple.setShouldMount = setShouldMount;\n React.useEffect(ripple.mountEffect, [shouldMount]);\n /* eslint-enable */\n\n return ripple;\n }\n constructor() {\n this.ref = {\n current: null\n };\n this.mounted = null;\n this.didMount = false;\n this.shouldMount = false;\n this.setShouldMount = null;\n }\n mount() {\n if (!this.mounted) {\n this.mounted = createControlledPromise();\n this.shouldMount = true;\n this.setShouldMount(this.shouldMount);\n }\n return this.mounted;\n }\n mountEffect = () => {\n if (this.shouldMount && !this.didMount) {\n if (this.ref.current !== null) {\n this.didMount = true;\n this.mounted.resolve();\n }\n }\n };\n\n /* Ripple API */\n\n start(...args) {\n this.mount().then(() => this.ref.current?.start(...args));\n }\n stop(...args) {\n this.mount().then(() => this.ref.current?.stop(...args));\n }\n pulsate(...args) {\n this.mount().then(() => this.ref.current?.pulsate(...args));\n }\n}\nexport default function useLazyRipple() {\n return LazyRipple.use();\n}\nfunction createControlledPromise() {\n let resolve;\n let reject;\n const p = new Promise((resolveFn, rejectFn) => {\n resolve = resolveFn;\n reject = rejectFn;\n });\n p.resolve = resolve;\n p.reject = reject;\n return p;\n}","import { Children, cloneElement, isValidElement } from 'react';\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\n\nexport function getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && isValidElement(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\nexport function mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nexport function getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\nexport function getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!isValidElement(child)) return;\n var hasPrev = (key in prevChildMapping);\n var hasNext = (key in nextChildMapping);\n var prevChild = prevChildMapping[key];\n var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = cloneElement(child, {\n in: false\n });\n } else if (hasNext && hasPrev && isValidElement(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { getChildMapping, getInitialChildMapping, getNextChildMapping } from './utils/ChildMapping';\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n/**\n * The `` component manages a set of transition components\n * (`` and ``) in a list. Like with the transition\n * components, `` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the ``.\n *\n * Note that `` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\nvar TransitionGroup = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n contextValue: {\n isMounting: true\n },\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true;\n this.setState({\n contextValue: {\n isMounting: false\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n } // node is `undefined` when user provided `nodeRef` prop\n ;\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = getChildMapping(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var contextValue = this.state.contextValue;\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, children);\n }\n\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Component, props, children));\n };\n\n return TransitionGroup;\n}(React.Component);\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `` renders a `
` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `
` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: PropTypes.any,\n\n /**\n * A set of `` components, that are toggled `in` and out as they\n * leave. the `` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `` as\n * with our `` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: PropTypes.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: PropTypes.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\nexport default TransitionGroup;","function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nexport { _assertThisInitialized as default };","import { h as hasOwn, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext, i as isDevelopment } from './emotion-element-f0de968e.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, a as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, b as withTheme } from './emotion-element-f0de968e.browser.esm.js';\nimport * as React from 'react';\nimport { insertStyles, registerStyles, getRegisteredStyles } from '@emotion/utils';\nimport { useInsertionEffectWithLayoutFallback, useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { serializeStyles } from '@emotion/serialize';\nimport '@emotion/cache';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport 'hoist-non-react-statics';\n\nvar jsx = function jsx(type, props) {\n // eslint-disable-next-line prefer-rest-params\n var args = arguments;\n\n if (props == null || !hasOwn.call(props, 'css')) {\n return React.createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n }\n\n return React.createElement.apply(null, createElementArgArray);\n};\n\n(function (_jsx) {\n var JSX;\n\n (function (_JSX) {})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));\n})(jsx || (jsx = {}));\n\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n\n var styles = props.styles;\n var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));\n // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n\n var sheetRef = React.useRef();\n useInsertionEffectWithLayoutFallback(function () {\n var key = cache.key + \"-global\"; // use case of https://github.com/emotion-js/emotion/issues/2675\n\n var sheet = new cache.sheet.constructor({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false;\n var node = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n useInsertionEffectWithLayoutFallback(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n\n if (serialized.next !== undefined) {\n // insert keyframes\n insertStyles(cache, serialized.next, true);\n }\n\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\n\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serializeStyles(args);\n}\n\nfunction keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name;\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n}\n\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serializedArr = _ref.serializedArr;\n useInsertionEffectAlwaysWithSyncFallback(function () {\n\n for (var i = 0; i < serializedArr.length; i++) {\n insertStyles(cache, serializedArr[i], false);\n }\n });\n\n return null;\n};\n\nvar ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {\n var hasRendered = false;\n var serializedArr = [];\n\n var css = function css() {\n if (hasRendered && isDevelopment) {\n throw new Error('css can only be used during render');\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`\n\n registerStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && isDevelopment) {\n throw new Error('cx can only be used during render');\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: React.useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serializedArr: serializedArr\n }), ele);\n});\n\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };\n","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction Ripple(props) {\n const {\n className,\n classes,\n pulsate = false,\n rippleX,\n rippleY,\n rippleSize,\n in: inProp,\n onExited,\n timeout\n } = props;\n const [leaving, setLeaving] = React.useState(false);\n const rippleClassName = clsx(className, classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);\n const rippleStyles = {\n width: rippleSize,\n height: rippleSize,\n top: -(rippleSize / 2) + rippleY,\n left: -(rippleSize / 2) + rippleX\n };\n const childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);\n if (!inProp && !leaving) {\n setLeaving(true);\n }\n React.useEffect(() => {\n if (!inProp && onExited != null) {\n // react-transition-group#onExited\n const timeoutId = setTimeout(onExited, timeout);\n return () => {\n clearTimeout(timeoutId);\n };\n }\n return undefined;\n }, [onExited, inProp, timeout]);\n return /*#__PURE__*/_jsx(\"span\", {\n className: rippleClassName,\n style: rippleStyles,\n children: /*#__PURE__*/_jsx(\"span\", {\n className: childClassName\n })\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? Ripple.propTypes /* remove-proptypes */ = {\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n /**\n * @ignore - injected from TransitionGroup\n */\n in: PropTypes.bool,\n /**\n * @ignore - injected from TransitionGroup\n */\n onExited: PropTypes.func,\n /**\n * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.\n */\n pulsate: PropTypes.bool,\n /**\n * Diameter of the ripple.\n */\n rippleSize: PropTypes.number,\n /**\n * Horizontal position of the ripple center.\n */\n rippleX: PropTypes.number,\n /**\n * Vertical position of the ripple center.\n */\n rippleY: PropTypes.number,\n /**\n * exit delay\n */\n timeout: PropTypes.number.isRequired\n} : void 0;\nexport default Ripple;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTouchRippleUtilityClass(slot) {\n return generateUtilityClass('MuiTouchRipple', slot);\n}\nconst touchRippleClasses = generateUtilityClasses('MuiTouchRipple', ['root', 'ripple', 'rippleVisible', 'ripplePulsate', 'child', 'childLeaving', 'childPulsate']);\nexport default touchRippleClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\nimport useTimeout from '@mui/utils/useTimeout';\nimport { keyframes, styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport Ripple from \"./Ripple.js\";\nimport touchRippleClasses from \"./touchRippleClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DURATION = 550;\nexport const DELAY_RIPPLE = 80;\nconst enterKeyframe = keyframes`\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n`;\nconst exitKeyframe = keyframes`\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n`;\nconst pulsateKeyframe = keyframes`\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n`;\nexport const TouchRippleRoot = styled('span', {\n name: 'MuiTouchRipple',\n slot: 'Root'\n})({\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 0,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit'\n});\n\n// This `styled()` function invokes keyframes. `styled-components` only supports keyframes\n// in string templates. Do not convert these styles in JS object as it will break.\nexport const TouchRippleRipple = styled(Ripple, {\n name: 'MuiTouchRipple',\n slot: 'Ripple'\n})`\n opacity: 0;\n position: absolute;\n\n &.${touchRippleClasses.rippleVisible} {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ${enterKeyframe};\n animation-duration: ${DURATION}ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n }\n\n &.${touchRippleClasses.ripplePulsate} {\n animation-duration: ${({\n theme\n}) => theme.transitions.duration.shorter}ms;\n }\n\n & .${touchRippleClasses.child} {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & .${touchRippleClasses.childLeaving} {\n opacity: 0;\n animation-name: ${exitKeyframe};\n animation-duration: ${DURATION}ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n }\n\n & .${touchRippleClasses.childPulsate} {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ${pulsateKeyframe};\n animation-duration: 2500ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n`;\n\n/**\n * @ignore - internal component.\n *\n * TODO v5: Make private\n */\nconst TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTouchRipple'\n });\n const {\n center: centerProp = false,\n classes = {},\n className,\n ...other\n } = props;\n const [ripples, setRipples] = React.useState([]);\n const nextKey = React.useRef(0);\n const rippleCallback = React.useRef(null);\n React.useEffect(() => {\n if (rippleCallback.current) {\n rippleCallback.current();\n rippleCallback.current = null;\n }\n }, [ripples]);\n\n // Used to filter out mouse emulated events on mobile.\n const ignoringMouseDown = React.useRef(false);\n // We use a timer in order to only show the ripples for touch \"click\" like events.\n // We don't want to display the ripple for touch scroll events.\n const startTimer = useTimeout();\n\n // This is the hook called once the previous timeout is ready.\n const startTimerCommit = React.useRef(null);\n const container = React.useRef(null);\n const startCommit = React.useCallback(params => {\n const {\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n } = params;\n setRipples(oldRipples => [...oldRipples, /*#__PURE__*/_jsx(TouchRippleRipple, {\n classes: {\n ripple: clsx(classes.ripple, touchRippleClasses.ripple),\n rippleVisible: clsx(classes.rippleVisible, touchRippleClasses.rippleVisible),\n ripplePulsate: clsx(classes.ripplePulsate, touchRippleClasses.ripplePulsate),\n child: clsx(classes.child, touchRippleClasses.child),\n childLeaving: clsx(classes.childLeaving, touchRippleClasses.childLeaving),\n childPulsate: clsx(classes.childPulsate, touchRippleClasses.childPulsate)\n },\n timeout: DURATION,\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize\n }, nextKey.current)]);\n nextKey.current += 1;\n rippleCallback.current = cb;\n }, [classes]);\n const start = React.useCallback((event = {}, options = {}, cb = () => {}) => {\n const {\n pulsate = false,\n center = centerProp || options.pulsate,\n fakeElement = false // For test purposes\n } = options;\n if (event?.type === 'mousedown' && ignoringMouseDown.current) {\n ignoringMouseDown.current = false;\n return;\n }\n if (event?.type === 'touchstart') {\n ignoringMouseDown.current = true;\n }\n const element = fakeElement ? null : container.current;\n const rect = element ? element.getBoundingClientRect() : {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n };\n\n // Get the size of the ripple\n let rippleX;\n let rippleY;\n let rippleSize;\n if (center || event === undefined || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {\n rippleX = Math.round(rect.width / 2);\n rippleY = Math.round(rect.height / 2);\n } else {\n const {\n clientX,\n clientY\n } = event.touches && event.touches.length > 0 ? event.touches[0] : event;\n rippleX = Math.round(clientX - rect.left);\n rippleY = Math.round(clientY - rect.top);\n }\n if (center) {\n rippleSize = Math.sqrt((2 * rect.width ** 2 + rect.height ** 2) / 3);\n\n // For some reason the animation is broken on Mobile Chrome if the size is even.\n if (rippleSize % 2 === 0) {\n rippleSize += 1;\n }\n } else {\n const sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;\n const sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;\n rippleSize = Math.sqrt(sizeX ** 2 + sizeY ** 2);\n }\n\n // Touche devices\n if (event?.touches) {\n // check that this isn't another touchstart due to multitouch\n // otherwise we will only clear a single timer when unmounting while two\n // are running\n if (startTimerCommit.current === null) {\n // Prepare the ripple effect.\n startTimerCommit.current = () => {\n startCommit({\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n });\n };\n // Delay the execution of the ripple effect.\n // We have to make a tradeoff with this delay value.\n startTimer.start(DELAY_RIPPLE, () => {\n if (startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n }\n });\n }\n } else {\n startCommit({\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n });\n }\n }, [centerProp, startCommit, startTimer]);\n const pulsate = React.useCallback(() => {\n start({}, {\n pulsate: true\n });\n }, [start]);\n const stop = React.useCallback((event, cb) => {\n startTimer.clear();\n\n // The touch interaction occurs too quickly.\n // We still want to show ripple effect.\n if (event?.type === 'touchend' && startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n startTimer.start(0, () => {\n stop(event, cb);\n });\n return;\n }\n startTimerCommit.current = null;\n setRipples(oldRipples => {\n if (oldRipples.length > 0) {\n return oldRipples.slice(1);\n }\n return oldRipples;\n });\n rippleCallback.current = cb;\n }, [startTimer]);\n React.useImperativeHandle(ref, () => ({\n pulsate,\n start,\n stop\n }), [pulsate, start, stop]);\n return /*#__PURE__*/_jsx(TouchRippleRoot, {\n className: clsx(touchRippleClasses.root, classes.root, className),\n ref: container,\n ...other,\n children: /*#__PURE__*/_jsx(TransitionGroup, {\n component: null,\n exit: true,\n children: ripples\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? TouchRipple.propTypes /* remove-proptypes */ = {\n /**\n * If `true`, the ripple starts at the center of the component\n * rather than at the point of interaction.\n */\n center: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default TouchRipple;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getButtonBaseUtilityClass(slot) {\n return generateUtilityClass('MuiButtonBase', slot);\n}\nconst buttonBaseClasses = generateUtilityClasses('MuiButtonBase', ['root', 'disabled', 'focusVisible']);\nexport default buttonBaseClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport refType from '@mui/utils/refType';\nimport elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport isFocusVisible from '@mui/utils/isFocusVisible';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useEventCallback from \"../utils/useEventCallback.js\";\nimport useLazyRipple from \"../useLazyRipple/index.js\";\nimport TouchRipple from \"./TouchRipple.js\";\nimport buttonBaseClasses, { getButtonBaseUtilityClass } from \"./buttonBaseClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n focusVisible,\n focusVisibleClassName,\n classes\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', focusVisible && 'focusVisible']\n };\n const composedClasses = composeClasses(slots, getButtonBaseUtilityClass, classes);\n if (focusVisible && focusVisibleClassName) {\n composedClasses.root += ` ${focusVisibleClassName}`;\n }\n return composedClasses;\n};\nexport const ButtonBaseRoot = styled('button', {\n name: 'MuiButtonBase',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n boxSizing: 'border-box',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n MozAppearance: 'none',\n // Reset\n WebkitAppearance: 'none',\n // Reset\n textDecoration: 'none',\n // So we take precedent over the style of a native element.\n color: 'inherit',\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n },\n [`&.${buttonBaseClasses.disabled}`]: {\n pointerEvents: 'none',\n // Disable link interactions\n cursor: 'default'\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n});\n\n/**\n * `ButtonBase` contains as few styles as possible.\n * It aims to be a simple building block for creating a button.\n * It contains a load of style reset and some focus/ripple logic.\n */\nconst ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiButtonBase'\n });\n const {\n action,\n centerRipple = false,\n children,\n className,\n component = 'button',\n disabled = false,\n disableRipple = false,\n disableTouchRipple = false,\n focusRipple = false,\n focusVisibleClassName,\n LinkComponent = 'a',\n onBlur,\n onClick,\n onContextMenu,\n onDragLeave,\n onFocus,\n onFocusVisible,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseLeave,\n onMouseUp,\n onTouchEnd,\n onTouchMove,\n onTouchStart,\n tabIndex = 0,\n TouchRippleProps,\n touchRippleRef,\n type,\n ...other\n } = props;\n const buttonRef = React.useRef(null);\n const ripple = useLazyRipple();\n const handleRippleRef = useForkRef(ripple.ref, touchRippleRef);\n const [focusVisible, setFocusVisible] = React.useState(false);\n if (disabled && focusVisible) {\n setFocusVisible(false);\n }\n React.useImperativeHandle(action, () => ({\n focusVisible: () => {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n }), []);\n const enableTouchRipple = ripple.shouldMount && !disableRipple && !disabled;\n React.useEffect(() => {\n if (focusVisible && focusRipple && !disableRipple) {\n ripple.pulsate();\n }\n }, [disableRipple, focusRipple, focusVisible, ripple]);\n const handleMouseDown = useRippleHandler(ripple, 'start', onMouseDown, disableTouchRipple);\n const handleContextMenu = useRippleHandler(ripple, 'stop', onContextMenu, disableTouchRipple);\n const handleDragLeave = useRippleHandler(ripple, 'stop', onDragLeave, disableTouchRipple);\n const handleMouseUp = useRippleHandler(ripple, 'stop', onMouseUp, disableTouchRipple);\n const handleMouseLeave = useRippleHandler(ripple, 'stop', event => {\n if (focusVisible) {\n event.preventDefault();\n }\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n }, disableTouchRipple);\n const handleTouchStart = useRippleHandler(ripple, 'start', onTouchStart, disableTouchRipple);\n const handleTouchEnd = useRippleHandler(ripple, 'stop', onTouchEnd, disableTouchRipple);\n const handleTouchMove = useRippleHandler(ripple, 'stop', onTouchMove, disableTouchRipple);\n const handleBlur = useRippleHandler(ripple, 'stop', event => {\n if (!isFocusVisible(event.target)) {\n setFocusVisible(false);\n }\n if (onBlur) {\n onBlur(event);\n }\n }, false);\n const handleFocus = useEventCallback(event => {\n // Fix for https://github.com/facebook/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n if (isFocusVisible(event.target)) {\n setFocusVisible(true);\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n if (onFocus) {\n onFocus(event);\n }\n });\n const isNonNativeButton = () => {\n const button = buttonRef.current;\n return component && component !== 'button' && !(button.tagName === 'A' && button.href);\n };\n const handleKeyDown = useEventCallback(event => {\n // Check if key is already down to avoid repeats being counted as multiple activations\n if (focusRipple && !event.repeat && focusVisible && event.key === ' ') {\n ripple.stop(event, () => {\n ripple.start(event);\n });\n }\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {\n event.preventDefault();\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n\n // Keyboard accessibility for non interactive elements\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {\n event.preventDefault();\n if (onClick) {\n onClick(event);\n }\n }\n });\n const handleKeyUp = useEventCallback(event => {\n // calling preventDefault in keyUp on a
\n );\n};\n\nItemLabelWithControls.propTypes = {\n itemId: PropTypes.string,\n children: PropTypes.node,\n className: PropTypes.string,\n editable: PropTypes.bool,\n ownerState: PropTypes.object,\n};\n\n// Custom label-input slot. When `itemsReordering` is on, MUI's reorder plugin\n// puts `draggable=\"true\"` on the TreeItem root with NO editing guard. While the\n// label input is focused, that native draggable ancestor hijacks text\n// selection: dragging to highlight a word starts an HTML5 element drag, the\n// input loses focus, MUI's onBlur fires, and edit mode exits mid-gesture.\n//\n// Fix: while this input is mounted (i.e. editing), flip the nearest\n// draggable ancestor to draggable=\"false\" and restore it on cleanup. Also\n// stop mouse/pointer/click from reaching the row (so clicking inside the cell\n// doesn't toggle selection or steal focus) and cancel any dragstart that does\n// fire. We deliberately do NOT preventDefault on mousedown — the browser needs\n// it for caret placement and native text selection inside the input.\nconst EditableLabelInput = React.forwardRef(function EditableLabelInput(\n props,\n ref\n) {\n const innerRef = useRef(null);\n const restoreRef = useRef(null);\n\n const setRefs = useCallback(\n (node) => {\n innerRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n },\n [ref]\n );\n\n useEffect(() => {\n const el = innerRef.current;\n if (!el || typeof el.closest !== 'function') return undefined;\n const host = el.closest('[draggable=\"true\"]');\n if (host) {\n restoreRef.current = host;\n host.setAttribute('draggable', 'false');\n }\n return () => {\n if (restoreRef.current) {\n restoreRef.current.setAttribute('draggable', 'true');\n restoreRef.current = null;\n }\n };\n }, []);\n\n const stopOnly = (handler) => (e) => {\n e.stopPropagation();\n if (handler) handler(e);\n };\n\n return (\n {\n e.preventDefault();\n e.stopPropagation();\n }}\n />\n );\n});\n\nEditableLabelInput.propTypes = {\n onMouseDown: PropTypes.func,\n onPointerDown: PropTypes.func,\n onClick: PropTypes.func,\n};\n\nconst CustomTreeItem = React.forwardRef(function CustomTreeItem(props, ref) {\n const {itemId} = props;\n // Keep the real string `label` prop intact so MUI's edit input and\n // `onItemLabelChange` get the actual text (not \"[object Object]\").\n // Inject the slider + kebab through the label *slot*, and harden the\n // label-input slot so editing stays stable under itemsReordering.\n return (\n \n );\n});\n\nCustomTreeItem.propTypes = {\n itemId: PropTypes.string,\n};\n\n// --- Main component ----------------------------------------------------------\nconst TreeViewPro = ({\n id,\n items: itemsProp = [],\n licenseKey = '',\n // Item accessors\n getItemId: getItemIdProp = 'id',\n getItemLabel: getItemLabelProp = 'label',\n getItemChildren: getItemChildrenProp = 'children',\n // Selection\n selectedItems,\n defaultSelectedItems,\n multiSelect = false,\n checkboxSelection = false,\n disableSelection = false,\n selectionPropagation,\n // Expansion\n expandedItems,\n defaultExpandedItems,\n expansionTrigger = 'content',\n // Editing\n isItemEditable = false,\n editableItems,\n // Disabled\n disabledItems,\n disabledItemsFocusable = false,\n // Appearance\n itemChildrenIndentation = '12px',\n height,\n sx,\n // Icons\n collapseIcon,\n expandIcon,\n endIcon,\n // Accessibility\n ariaLabel,\n ariaLabelledBy,\n // PRO: Ordering\n itemsReordering = false,\n reorderableItems,\n // PRO: Lazy Loading\n lazyLoading = false,\n lazyLoadedChildren,\n // Per-item controls\n showItemControls = false,\n controlsItems,\n sliderValues,\n sliderMin = 0,\n sliderMax = 100,\n sliderStep = 1,\n sliderColor,\n kebabMenuItems,\n kebabMenuItemsById,\n // Dash\n setProps,\n}) => {\n const colorScheme = useMantineColorScheme();\n const muiTheme = colorScheme === 'dark' ? darkTheme : lightTheme;\n\n // --- License key ---\n if (licenseKey && !licenseKeySet) {\n LicenseInfo.setLicenseKey(licenseKey);\n licenseKeySet = true;\n }\n\n // --- Lazy loading: merge loaded children into items ---\n const items = useMemo(() => {\n if (!lazyLoading || !lazyLoadedChildren || !itemsProp) return itemsProp || [];\n const childrenProp = getItemChildrenProp || 'children';\n const idProp = getItemIdProp || 'id';\n\n const mergeChildren = (nodeList) => {\n if (!nodeList) return nodeList;\n return nodeList.map((node) => {\n const nodeId = node[idProp];\n const loadedKids = lazyLoadedChildren[nodeId];\n const existingChildren = node[childrenProp];\n const mergedChildren = loadedKids || existingChildren;\n return {\n ...node,\n [childrenProp]: mergeChildren(mergedChildren),\n };\n });\n };\n return mergeChildren(itemsProp);\n }, [itemsProp, lazyLoadedChildren, lazyLoading, getItemChildrenProp, getItemIdProp]);\n\n // --- Accessor conversion ---\n const getItemId = useCallback(\n (item) => item[getItemIdProp || 'id'],\n [getItemIdProp]\n );\n const getItemLabel = useCallback(\n (item) => item[getItemLabelProp || 'label'],\n [getItemLabelProp]\n );\n const getItemChildren = useCallback(\n (item) => item[getItemChildrenProp || 'children'],\n [getItemChildrenProp]\n );\n\n // --- Disabled/editable conversion ---\n const isItemDisabledFn = useMemo(() => {\n if (!disabledItems || disabledItems.length === 0) return undefined;\n const s = new Set(disabledItems);\n return (item) => s.has(getItemId(item));\n }, [disabledItems, getItemId]);\n\n const isItemEditableFn = useMemo(() => {\n if (typeof isItemEditable === 'boolean') return isItemEditable;\n if (editableItems && editableItems.length > 0) {\n const s = new Set(editableItems);\n return (item) => s.has(getItemId(item));\n }\n return false;\n }, [isItemEditable, editableItems, getItemId]);\n\n // --- PRO: Reorderable conversion ---\n const isItemReorderableFn = useMemo(() => {\n if (!reorderableItems || reorderableItems.length === 0) return undefined;\n const s = new Set(reorderableItems);\n return (itemId) => s.has(itemId);\n }, [reorderableItems]);\n\n // --- Per-item controls: slider + kebab handlers ---\n const sliderValuesRef = useRef(sliderValues || {});\n sliderValuesRef.current = sliderValues || sliderValuesRef.current || {};\n\n const handleSliderChange = useCallback(\n (itemId, value, committed) => {\n const next = {...sliderValuesRef.current, [itemId]: value};\n sliderValuesRef.current = next;\n if (setProps) {\n setProps({sliderValues: next});\n if (committed) {\n setProps({\n sliderChange: {\n itemId,\n value,\n event_timestamp: Date.now(),\n },\n });\n }\n }\n },\n [setProps]\n );\n\n const handleKebabAction = useCallback(\n (itemId, action) => {\n if (setProps) {\n setProps({\n kebabAction: {\n itemId,\n action,\n event_timestamp: Date.now(),\n },\n });\n }\n },\n [setProps]\n );\n\n const controlsItemSet = useMemo(() => {\n if (!controlsItems || controlsItems.length === 0) return null;\n return new Set(controlsItems);\n }, [controlsItems]);\n\n const resolvedSliderColor = useMemo(\n () => resolveSliderColor(sliderColor),\n [sliderColor]\n );\n\n const controlsContextValue = useMemo(\n () => ({\n controlsItemSet,\n sliderValues: sliderValues || {},\n sliderMin,\n sliderMax,\n sliderStep,\n sliderColor: resolvedSliderColor,\n onSliderChange: handleSliderChange,\n kebabMenuItems: kebabMenuItems || [],\n kebabMenuItemsById: kebabMenuItemsById || null,\n onKebabAction: handleKebabAction,\n }),\n [\n controlsItemSet,\n sliderValues,\n sliderMin,\n sliderMax,\n sliderStep,\n resolvedSliderColor,\n kebabMenuItems,\n kebabMenuItemsById,\n handleSliderChange,\n handleKebabAction,\n ]\n );\n\n // --- Slots ---\n const slots = useMemo(() => {\n const s = {};\n if (collapseIcon) s.collapseIcon = resolveIcon(collapseIcon);\n if (expandIcon) s.expandIcon = resolveIcon(expandIcon);\n if (endIcon) s.endIcon = resolveIcon(endIcon);\n if (showItemControls) s.item = CustomTreeItem;\n return Object.keys(s).length > 0 ? s : undefined;\n }, [collapseIcon, expandIcon, endIcon, showItemControls]);\n\n // --- Callbacks ---\n const handleSelectedItemsChange = useCallback(\n (event, itemIds) => {\n if (setProps) setProps({selectedItems: itemIds});\n },\n [setProps]\n );\n\n const handleExpandedItemsChange = useCallback(\n (event, itemIds) => {\n if (setProps) setProps({expandedItems: itemIds});\n\n // Lazy loading: fire request for items that have no children\n if (lazyLoading && setProps && itemIds) {\n const idProp = getItemIdProp || 'id';\n const childrenProp = getItemChildrenProp || 'children';\n const findItem = (nodes, targetId) => {\n if (!nodes) return null;\n for (const node of nodes) {\n if (node[idProp] === targetId) return node;\n const found = findItem(node[childrenProp], targetId);\n if (found) return found;\n }\n return null;\n };\n\n // Check newly expanded items for missing children\n for (const itemId of itemIds) {\n const item = findItem(items, itemId);\n if (item && !item[childrenProp]) {\n setProps({\n lazyLoadRequest: {\n itemId,\n event_timestamp: Date.now(),\n },\n });\n break;\n }\n }\n }\n },\n [setProps, lazyLoading, items, getItemIdProp, getItemChildrenProp]\n );\n\n const handleItemClick = useCallback(\n (event, itemId) => {\n if (setProps) setProps({clickedItem: {itemId, event_timestamp: Date.now()}});\n },\n [setProps]\n );\n\n const handleItemFocus = useCallback(\n (event, itemId) => {\n if (setProps) setProps({focusedItem: {itemId, event_timestamp: Date.now()}});\n },\n [setProps]\n );\n\n const handleItemLabelChange = useCallback(\n (itemId, newLabel) => {\n if (setProps) setProps({editedItemLabel: {itemId, newLabel, event_timestamp: Date.now()}});\n },\n [setProps]\n );\n\n // Track the live (reordered) tree so we can emit it as `orderedItems`.\n // Re-seed from the items prop whenever it changes externally.\n const orderedRef = useRef(itemsProp || []);\n useEffect(() => {\n orderedRef.current = itemsProp || [];\n }, [itemsProp]);\n\n const handleItemPositionChange = useCallback(\n (params) => {\n const updated = applyReorder(\n orderedRef.current,\n params,\n getItemIdProp,\n getItemChildrenProp\n );\n orderedRef.current = updated;\n if (setProps) {\n setProps({\n itemPositionChanged: {\n itemId: params.itemId,\n oldPosition: params.oldPosition,\n newPosition: params.newPosition,\n event_timestamp: Date.now(),\n },\n orderedItems: updated,\n });\n }\n },\n [setProps, getItemIdProp, getItemChildrenProp]\n );\n\n const containerStyle = useMemo(() => {\n const s = {};\n if (height) s.height = typeof height === 'number' ? `${height}px` : height;\n return s;\n }, [height]);\n\n return (\n \n
\n \n \n \n
\n
\n );\n};\n\nTreeViewPro.propTypes = {\n /** Dash component id */\n id: PropTypes.string,\n\n /** MUI X Pro license key. Required for Pro features. */\n licenseKey: PropTypes.string,\n\n /** Array of item objects. */\n items: PropTypes.arrayOf(PropTypes.object),\n\n // --- Accessors ---\n /** Property name for item ID (default: \"id\") */\n getItemId: PropTypes.string,\n\n /** Property name for item label (default: \"label\") */\n getItemLabel: PropTypes.string,\n\n /** Property name for item children (default: \"children\") */\n getItemChildren: PropTypes.string,\n\n // --- Selection ---\n /** Controlled selected item(s). String when multiSelect=false, array when true. */\n selectedItems: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n\n /** Default selected items (uncontrolled). */\n defaultSelectedItems: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n\n /** Allow selecting multiple items. */\n multiSelect: PropTypes.bool,\n\n /** Show checkboxes for selection. */\n checkboxSelection: PropTypes.bool,\n\n /** Disable all selection. */\n disableSelection: PropTypes.bool,\n\n /** Auto-propagate selection to parents/descendants. */\n selectionPropagation: PropTypes.exact({\n parents: PropTypes.bool,\n descendants: PropTypes.bool,\n }),\n\n // --- Expansion ---\n /** Controlled expanded item IDs. */\n expandedItems: PropTypes.arrayOf(PropTypes.string),\n\n /** Default expanded items (uncontrolled). */\n defaultExpandedItems: PropTypes.arrayOf(PropTypes.string),\n\n /** What triggers expansion: \"content\" or \"iconContainer\". */\n expansionTrigger: PropTypes.oneOf(['content', 'iconContainer']),\n\n // --- Editing ---\n /** Enable label editing for all items. */\n isItemEditable: PropTypes.bool,\n\n /** List of item IDs that are editable. */\n editableItems: PropTypes.arrayOf(PropTypes.string),\n\n // --- Disabled ---\n /** List of item IDs that should be disabled. */\n disabledItems: PropTypes.arrayOf(PropTypes.string),\n\n /** Allow focus on disabled items. */\n disabledItemsFocusable: PropTypes.bool,\n\n // --- Appearance ---\n /** Indentation of children. */\n itemChildrenIndentation: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /** Container height. */\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /** MUI sx styling object. */\n sx: PropTypes.object,\n\n // --- Icons ---\n /** MUI icon name for collapse icon. */\n collapseIcon: PropTypes.string,\n\n /** MUI icon name for expand icon. */\n expandIcon: PropTypes.string,\n\n /** MUI icon name for leaf/end icon. */\n endIcon: PropTypes.string,\n\n // --- Accessibility ---\n /** ARIA label for the tree. */\n ariaLabel: PropTypes.string,\n\n /** ID of element that labels the tree. */\n ariaLabelledBy: PropTypes.string,\n\n // --- PRO: Ordering ---\n /** Enable drag-and-drop item reordering. */\n itemsReordering: PropTypes.bool,\n\n /** List of item IDs that can be reordered. If empty, all items are reorderable. */\n reorderableItems: PropTypes.arrayOf(PropTypes.string),\n\n /** Output: Fired after item reorder. {itemId, oldPosition, newPosition, event_timestamp} */\n itemPositionChanged: PropTypes.object,\n\n /**\n * Output: the current tree after any drag-and-drop reorder, preserving\n * each node's original fields (id, label, children, etc.). Updates on\n * every reorder so Python callbacks can render the live order.\n */\n orderedItems: PropTypes.arrayOf(PropTypes.object),\n\n // --- PRO: Lazy Loading ---\n /** Enable lazy loading mode. */\n lazyLoading: PropTypes.bool,\n\n /** Input: Children loaded by Dash callback. {parentItemId: [childItems]} */\n lazyLoadedChildren: PropTypes.object,\n\n /** Output: Fired when unloaded node is expanded. {itemId, event_timestamp} */\n lazyLoadRequest: PropTypes.exact({\n itemId: PropTypes.string,\n event_timestamp: PropTypes.number,\n }),\n\n // --- Per-item controls (slider + kebab) ---\n /** Show a Slider + kebab menu on each item row. */\n showItemControls: PropTypes.bool,\n\n /** Restrict slider+kebab to a subset of item IDs. Empty/omitted means all items. */\n controlsItems: PropTypes.arrayOf(PropTypes.string),\n\n /** Controlled slider values keyed by itemId, e.g. {\"task-1\": 40}. Also updated as user drags. */\n sliderValues: PropTypes.object,\n\n /** Slider minimum. */\n sliderMin: PropTypes.number,\n\n /** Slider maximum. */\n sliderMax: PropTypes.number,\n\n /** Slider step. */\n sliderStep: PropTypes.number,\n\n /**\n * Slider color. Accepts a Mantine theme color name (\"teal\", \"blue.5\"),\n * a CSS color literal (\"#ff6b6b\", \"rgb(...)\"), or a CSS expression\n * (\"var(--mantine-color-teal-6)\", \"light-dark(...)\"). Bare names use\n * shade 6 by default. When omitted, the slider falls back to MUI's\n * `primary` palette color.\n */\n sliderColor: PropTypes.string,\n\n /**\n * Kebab menu entries. Each entry is one of:\n * a LEAF {label, value, icon?} — picking it fires `kebabAction` with\n * `action` = its `value`; a DIVIDER {divider: true}; or a SUBMENU\n * {label, icon?, children: [entries]} that opens on hover/click\n * (nesting is recursive).\n */\n kebabMenuItems: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n icon: PropTypes.string,\n divider: PropTypes.bool,\n children: PropTypes.array,\n })\n ),\n\n /**\n * Per-node kebab menus: {itemId: [entries]} (same entry shape as\n * `kebabMenuItems`, submenus/dividers included). A node listed here gets\n * its own menu; all other nodes fall back to `kebabMenuItems`.\n */\n kebabMenuItemsById: PropTypes.objectOf(PropTypes.array),\n\n /** Output: fires once on each commit (mouse-up) of a slider drag. {itemId, value, event_timestamp} */\n sliderChange: PropTypes.exact({\n itemId: PropTypes.string,\n value: PropTypes.number,\n event_timestamp: PropTypes.number,\n }),\n\n /** Output: fires when a kebab menu item is chosen. {itemId, action, event_timestamp} */\n kebabAction: PropTypes.exact({\n itemId: PropTypes.string,\n action: PropTypes.string,\n event_timestamp: PropTypes.number,\n }),\n\n // --- Output Props ---\n /** Fired when item is clicked. {itemId, event_timestamp} */\n clickedItem: PropTypes.exact({\n itemId: PropTypes.string,\n event_timestamp: PropTypes.number,\n }),\n\n /** Fired when item is focused. {itemId, event_timestamp} */\n focusedItem: PropTypes.exact({\n itemId: PropTypes.string,\n event_timestamp: PropTypes.number,\n }),\n\n /** Fired when label edit completes. {itemId, newLabel, event_timestamp} */\n editedItemLabel: PropTypes.exact({\n itemId: PropTypes.string,\n newLabel: PropTypes.string,\n event_timestamp: PropTypes.number,\n }),\n\n /** Dash setProps callback */\n setProps: PropTypes.func,\n};\n\nexport default TreeViewPro;\n","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"localeText\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useThemeProps } from '@mui/material/styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const PickerAdapterContext = /*#__PURE__*/React.createContext(null);\n\n// TODO v9: Remove this public export\n/**\n * The context that provides the date adapter and default dates to the pickers.\n * @deprecated Use `usePickersAdapter` hook if you need access to the adapter instead.\n */\nif (process.env.NODE_ENV !== \"production\") PickerAdapterContext.displayName = \"PickerAdapterContext\";\nexport const MuiPickersAdapterContext = PickerAdapterContext;\n/**\n * Demos:\n *\n * - [Date format and localization](https://mui.com/x/react-date-pickers/adapters-locale/)\n * - [Calendar systems](https://mui.com/x/react-date-pickers/calendar-systems/)\n * - [Translated components](https://mui.com/x/react-date-pickers/localization/)\n * - [UTC and timezones](https://mui.com/x/react-date-pickers/timezone/)\n *\n * API:\n *\n * - [LocalizationProvider API](https://mui.com/x/api/date-pickers/localization-provider/)\n */\nexport const LocalizationProvider = function LocalizationProvider(inProps) {\n const {\n localeText: inLocaleText\n } = inProps,\n otherInProps = _objectWithoutPropertiesLoose(inProps, _excluded);\n const {\n adapter: parentAdapter,\n localeText: parentLocaleText\n } = React.useContext(PickerAdapterContext) ?? {\n utils: undefined,\n adapter: undefined,\n localeText: undefined\n };\n const props = useThemeProps({\n // We don't want to pass the `localeText` prop to the theme, that way it will always return the theme value,\n // We will then merge this theme value with our value manually\n props: otherInProps,\n name: 'MuiLocalizationProvider'\n });\n const {\n children,\n dateAdapter: DateAdapter,\n dateFormats,\n dateLibInstance,\n adapterLocale,\n localeText: themeLocaleText\n } = props;\n const localeText = React.useMemo(() => _extends({}, themeLocaleText, parentLocaleText, inLocaleText), [themeLocaleText, parentLocaleText, inLocaleText]);\n const adapter = React.useMemo(() => {\n if (!DateAdapter) {\n if (parentAdapter) {\n return parentAdapter;\n }\n return null;\n }\n const dateAdapter = new DateAdapter({\n locale: adapterLocale,\n formats: dateFormats,\n instance: dateLibInstance\n });\n if (!dateAdapter.isMUIAdapter) {\n throw new Error(['MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`', \"For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`\", 'More information on the installation documentation: https://mui.com/x/react-date-pickers/quickstart/#installation'].join(`\\n`));\n }\n return dateAdapter;\n }, [DateAdapter, adapterLocale, dateFormats, dateLibInstance, parentAdapter]);\n const defaultDates = React.useMemo(() => {\n if (!adapter) {\n return null;\n }\n return {\n minDate: adapter.date('1900-01-01T00:00:00.000'),\n maxDate: adapter.date('2099-12-31T00:00:00.000')\n };\n }, [adapter]);\n const contextValue = React.useMemo(() => {\n return {\n utils: adapter,\n adapter,\n defaultDates,\n localeText\n };\n }, [defaultDates, adapter, localeText]);\n return /*#__PURE__*/_jsx(PickerAdapterContext.Provider, {\n value: contextValue,\n children: children\n });\n};\nif (process.env.NODE_ENV !== \"production\") LocalizationProvider.displayName = \"LocalizationProvider\";\nprocess.env.NODE_ENV !== \"production\" ? LocalizationProvider.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Locale for the date library you are using\n */\n adapterLocale: PropTypes.any,\n children: PropTypes.node,\n /**\n * Date library adapter class function.\n * @see See the localization provider {@link https://mui.com/x/react-date-pickers/quickstart/#integrate-provider-and-adapter date adapter setup section} for more details.\n */\n dateAdapter: PropTypes.func,\n /**\n * Formats that are used for any child pickers\n */\n dateFormats: PropTypes.shape({\n dayOfMonth: PropTypes.string,\n dayOfMonthFull: PropTypes.string,\n fullDate: PropTypes.string,\n fullTime12h: PropTypes.string,\n fullTime24h: PropTypes.string,\n hours12h: PropTypes.string,\n hours24h: PropTypes.string,\n keyboardDate: PropTypes.string,\n keyboardDateTime12h: PropTypes.string,\n keyboardDateTime24h: PropTypes.string,\n meridiem: PropTypes.string,\n minutes: PropTypes.string,\n month: PropTypes.string,\n monthShort: PropTypes.string,\n normalDate: PropTypes.string,\n normalDateWithWeekday: PropTypes.string,\n seconds: PropTypes.string,\n shortDate: PropTypes.string,\n weekday: PropTypes.string,\n weekdayShort: PropTypes.string,\n year: PropTypes.string\n }),\n /**\n * Date library instance you are using, if it has some global overrides\n * ```jsx\n * dateLibInstance={momentTimeZone}\n * ```\n */\n dateLibInstance: PropTypes.any,\n /**\n * Locale for components texts\n */\n localeText: PropTypes.object\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/* v8 ignore start */\nimport dayjs from 'dayjs';\n// dayjs has no exports field defined\n// See https://github.com/iamkun/dayjs/issues/2562\n/* eslint-disable import/extensions */\nimport weekOfYearPlugin from 'dayjs/plugin/weekOfYear.js';\nimport customParseFormatPlugin from 'dayjs/plugin/customParseFormat.js';\nimport localizedFormatPlugin from 'dayjs/plugin/localizedFormat.js';\nimport isBetweenPlugin from 'dayjs/plugin/isBetween.js';\nimport advancedFormatPlugin from 'dayjs/plugin/advancedFormat.js';\n/* v8 ignore stop */\n/* eslint-enable import/extensions */\nimport { warnOnce } from '@mui/x-internals/warning';\ndayjs.extend(localizedFormatPlugin);\ndayjs.extend(weekOfYearPlugin);\ndayjs.extend(isBetweenPlugin);\ndayjs.extend(advancedFormatPlugin);\nconst formatTokenMap = {\n // Year\n YY: 'year',\n YYYY: {\n sectionType: 'year',\n contentType: 'digit',\n maxLength: 4\n },\n // Month\n M: {\n sectionType: 'month',\n contentType: 'digit',\n maxLength: 2\n },\n MM: 'month',\n MMM: {\n sectionType: 'month',\n contentType: 'letter'\n },\n MMMM: {\n sectionType: 'month',\n contentType: 'letter'\n },\n // Day of the month\n D: {\n sectionType: 'day',\n contentType: 'digit',\n maxLength: 2\n },\n DD: 'day',\n Do: {\n sectionType: 'day',\n contentType: 'digit-with-letter'\n },\n // Day of the week\n d: {\n sectionType: 'weekDay',\n contentType: 'digit',\n maxLength: 2\n },\n dd: {\n sectionType: 'weekDay',\n contentType: 'letter'\n },\n ddd: {\n sectionType: 'weekDay',\n contentType: 'letter'\n },\n dddd: {\n sectionType: 'weekDay',\n contentType: 'letter'\n },\n // Meridiem\n A: 'meridiem',\n a: 'meridiem',\n // Hours\n H: {\n sectionType: 'hours',\n contentType: 'digit',\n maxLength: 2\n },\n HH: 'hours',\n h: {\n sectionType: 'hours',\n contentType: 'digit',\n maxLength: 2\n },\n hh: 'hours',\n // Minutes\n m: {\n sectionType: 'minutes',\n contentType: 'digit',\n maxLength: 2\n },\n mm: 'minutes',\n // Seconds\n s: {\n sectionType: 'seconds',\n contentType: 'digit',\n maxLength: 2\n },\n ss: 'seconds'\n};\nconst defaultFormats = {\n year: 'YYYY',\n month: 'MMMM',\n monthShort: 'MMM',\n dayOfMonth: 'D',\n dayOfMonthFull: 'Do',\n weekday: 'dddd',\n weekdayShort: 'dd',\n hours24h: 'HH',\n hours12h: 'hh',\n meridiem: 'A',\n minutes: 'mm',\n seconds: 'ss',\n fullDate: 'll',\n keyboardDate: 'L',\n shortDate: 'MMM D',\n normalDate: 'D MMMM',\n normalDateWithWeekday: 'ddd, MMM D',\n fullTime12h: 'hh:mm A',\n fullTime24h: 'HH:mm',\n keyboardDateTime12h: 'L hh:mm A',\n keyboardDateTime24h: 'L HH:mm'\n};\nconst MISSING_UTC_PLUGIN = ['Missing UTC plugin', 'To be able to use UTC or timezones, you have to enable the `utc` plugin', 'Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc'].join('\\n');\nconst MISSING_TIMEZONE_PLUGIN = ['Missing timezone plugin', 'To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin', 'Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone'].join('\\n');\n/**\n * Based on `@date-io/dayjs`\n *\n * MIT License\n *\n * Copyright (c) 2017 Dmitriy Kovalenko\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nexport class AdapterDayjs {\n isMUIAdapter = true;\n isTimezoneCompatible = true;\n lib = 'dayjs';\n escapedCharacters = {\n start: '[',\n end: ']'\n };\n formatTokenMap = (() => formatTokenMap)();\n constructor({\n locale,\n formats\n } = {}) {\n this.locale = locale;\n this.formats = _extends({}, defaultFormats, formats);\n\n // Moved plugins to the constructor to allow for users to use options on the library\n // for reference: https://github.com/mui/mui-x/pull/11151\n dayjs.extend(customParseFormatPlugin);\n }\n setLocaleToValue = value => {\n const expectedLocale = this.getCurrentLocaleCode();\n if (expectedLocale === value.locale()) {\n return value;\n }\n return value.locale(expectedLocale);\n };\n hasUTCPlugin = () => typeof dayjs.utc !== 'undefined';\n hasTimezonePlugin = () => typeof dayjs.tz !== 'undefined';\n isSame = (value, comparing, comparisonTemplate) => {\n const comparingInValueTimezone = this.setTimezone(comparing, this.getTimezone(value));\n return value.format(comparisonTemplate) === comparingInValueTimezone.format(comparisonTemplate);\n };\n\n /**\n * Replaces \"default\" by undefined and \"system\" by the system timezone before passing it to `dayjs`.\n */\n cleanTimezone = timezone => {\n switch (timezone) {\n case 'default':\n {\n return undefined;\n }\n case 'system':\n {\n return dayjs.tz.guess();\n }\n default:\n {\n return timezone;\n }\n }\n };\n createSystemDate = value => {\n let date;\n if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {\n const timezone = dayjs.tz.guess();\n if (timezone === 'UTC') {\n date = dayjs(value);\n } /* v8 ignore next 3 */else {\n // We can't change the system timezone in the tests\n date = dayjs.tz(value, timezone);\n }\n } else {\n date = dayjs(value);\n }\n return this.setLocaleToValue(date);\n };\n createUTCDate = value => {\n /* v8 ignore next 3 */\n if (!this.hasUTCPlugin()) {\n throw new Error(MISSING_UTC_PLUGIN);\n }\n return this.setLocaleToValue(dayjs.utc(value));\n };\n createTZDate = (value, timezone) => {\n /* v8 ignore next 3 */\n if (!this.hasUTCPlugin()) {\n throw new Error(MISSING_UTC_PLUGIN);\n }\n\n /* v8 ignore next 3 */\n if (!this.hasTimezonePlugin()) {\n throw new Error(MISSING_TIMEZONE_PLUGIN);\n }\n const keepLocalTime = value !== undefined && !value.endsWith('Z');\n return this.setLocaleToValue(dayjs(value).tz(this.cleanTimezone(timezone), keepLocalTime));\n };\n getLocaleFormats = () => {\n const locales = dayjs.Ls;\n const locale = this.locale || 'en';\n let localeObject = locales[locale];\n if (localeObject === undefined) {\n /* v8 ignore start */\n if (process.env.NODE_ENV !== 'production') {\n warnOnce(['MUI X: Your locale has not been found.', 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.', \"Or you forget to import the locale from 'dayjs/locale/{localeUsed}'\", 'fallback on English locale.']);\n }\n /* v8 ignore stop */\n localeObject = locales.en;\n }\n return localeObject.formats;\n };\n\n /**\n * If the new day does not have the same offset as the old one (when switching to summer day time for example),\n * Then dayjs will not automatically adjust the offset (moment does).\n * We have to parse again the value to make sure the `fixOffset` method is applied.\n * See https://github.com/iamkun/dayjs/blob/b3624de619d6e734cd0ffdbbd3502185041c1b60/src/plugin/timezone/index.js#L72\n */\n adjustOffset = value => {\n if (!this.hasTimezonePlugin()) {\n return value;\n }\n const timezone = this.getTimezone(value);\n if (timezone !== 'UTC') {\n const fixedValue = value.tz(this.cleanTimezone(timezone), true);\n // TODO: Simplify the case when we raise the `dayjs` peer dep to 1.11.12 (https://github.com/iamkun/dayjs/releases/tag/v1.11.12)\n /* v8 ignore next 3 */\n // @ts-ignore\n if (fixedValue.$offset === (value.$offset ?? 0)) {\n return value;\n }\n // Change only what is needed to avoid creating a new object with unwanted data\n // Especially important when used in an environment where utc or timezone dates are used only in some places\n // Reference: https://github.com/mui/mui-x/issues/13290\n // @ts-ignore\n value.$offset = fixedValue.$offset;\n }\n return value;\n };\n date = (value, timezone = 'default') => {\n if (value === null) {\n return null;\n }\n if (timezone === 'UTC') {\n return this.createUTCDate(value);\n }\n if (timezone === 'system' || timezone === 'default' && !this.hasTimezonePlugin()) {\n return this.createSystemDate(value);\n }\n return this.createTZDate(value, timezone);\n };\n getInvalidDate = () => dayjs(new Date('Invalid date'));\n getTimezone = value => {\n if (this.hasTimezonePlugin()) {\n // @ts-ignore\n const zone = value.$x?.$timezone;\n if (zone) {\n return zone;\n }\n }\n if (this.hasUTCPlugin() && value.isUTC()) {\n return 'UTC';\n }\n return 'system';\n };\n setTimezone = (value, timezone) => {\n if (this.getTimezone(value) === timezone) {\n return value;\n }\n if (timezone === 'UTC') {\n /* v8 ignore next 3 */\n if (!this.hasUTCPlugin()) {\n throw new Error(MISSING_UTC_PLUGIN);\n }\n return value.utc();\n }\n\n // We know that we have the UTC plugin.\n // Otherwise, the value timezone would always equal \"system\".\n // And it would be caught by the first \"if\" of this method.\n if (timezone === 'system') {\n return value.local();\n }\n if (!this.hasTimezonePlugin()) {\n if (timezone === 'default') {\n return value;\n }\n\n /* v8 ignore next */\n throw new Error(MISSING_TIMEZONE_PLUGIN);\n }\n return this.setLocaleToValue(dayjs.tz(value, this.cleanTimezone(timezone)));\n };\n toJsDate = value => {\n return value.toDate();\n };\n parse = (value, format) => {\n if (value === '') {\n return null;\n }\n return dayjs(value, format, this.locale, true);\n };\n getCurrentLocaleCode = () => {\n return this.locale || 'en';\n };\n is12HourCycleInCurrentLocale = () => {\n /* v8 ignore next */\n return /A|a/.test(this.getLocaleFormats().LT || '');\n };\n expandFormat = format => {\n const localeFormats = this.getLocaleFormats();\n\n // @see https://github.com/iamkun/dayjs/blob/dev/src/plugin/localizedFormat/index.js\n const t = formatBis => formatBis.replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g, (_, a, b) => a || b.slice(1));\n return format.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g, (_, a, b) => {\n const B = b && b.toUpperCase();\n return a || localeFormats[b] || t(localeFormats[B]);\n });\n };\n isValid = value => {\n if (value == null) {\n return false;\n }\n return value.isValid();\n };\n format = (value, formatKey) => {\n return this.formatByString(value, this.formats[formatKey]);\n };\n formatByString = (value, formatString) => {\n return this.setLocaleToValue(value).format(formatString);\n };\n formatNumber = numberToFormat => {\n return numberToFormat;\n };\n isEqual = (value, comparing) => {\n if (value === null && comparing === null) {\n return true;\n }\n if (value === null || comparing === null) {\n return false;\n }\n return value.toDate().getTime() === comparing.toDate().getTime();\n };\n isSameYear = (value, comparing) => {\n return this.isSame(value, comparing, 'YYYY');\n };\n isSameMonth = (value, comparing) => {\n return this.isSame(value, comparing, 'YYYY-MM');\n };\n isSameDay = (value, comparing) => {\n return this.isSame(value, comparing, 'YYYY-MM-DD');\n };\n isSameHour = (value, comparing) => {\n return value.isSame(comparing, 'hour');\n };\n isAfter = (value, comparing) => {\n return value > comparing;\n };\n isAfterYear = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isAfter(comparing, 'year');\n }\n return !this.isSameYear(value, comparing) && value.utc() > comparing.utc();\n };\n isAfterDay = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isAfter(comparing, 'day');\n }\n return !this.isSameDay(value, comparing) && value.utc() > comparing.utc();\n };\n isBefore = (value, comparing) => {\n return value < comparing;\n };\n isBeforeYear = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isBefore(comparing, 'year');\n }\n return !this.isSameYear(value, comparing) && value.utc() < comparing.utc();\n };\n isBeforeDay = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isBefore(comparing, 'day');\n }\n return !this.isSameDay(value, comparing) && value.utc() < comparing.utc();\n };\n isWithinRange = (value, [start, end]) => {\n return value >= start && value <= end;\n };\n startOfYear = value => {\n return this.adjustOffset(value.startOf('year'));\n };\n startOfMonth = value => {\n return this.adjustOffset(value.startOf('month'));\n };\n startOfWeek = value => {\n return this.adjustOffset(this.setLocaleToValue(value).startOf('week'));\n };\n startOfDay = value => {\n return this.adjustOffset(value.startOf('day'));\n };\n endOfYear = value => {\n return this.adjustOffset(value.endOf('year'));\n };\n endOfMonth = value => {\n return this.adjustOffset(value.endOf('month'));\n };\n endOfWeek = value => {\n return this.adjustOffset(this.setLocaleToValue(value).endOf('week'));\n };\n endOfDay = value => {\n return this.adjustOffset(value.endOf('day'));\n };\n addYears = (value, amount) => {\n return this.adjustOffset(value.add(amount, 'year'));\n };\n addMonths = (value, amount) => {\n return this.adjustOffset(value.add(amount, 'month'));\n };\n addWeeks = (value, amount) => {\n return this.adjustOffset(value.add(amount, 'week'));\n };\n addDays = (value, amount) => {\n return this.adjustOffset(value.add(amount, 'day'));\n };\n addHours = (value, amount) => {\n return this.adjustOffset(value.add(amount, 'hour'));\n };\n addMinutes = (value, amount) => {\n return this.adjustOffset(value.add(amount, 'minute'));\n };\n addSeconds = (value, amount) => {\n return this.adjustOffset(value.add(amount, 'second'));\n };\n getYear = value => {\n return value.year();\n };\n getMonth = value => {\n return value.month();\n };\n getDate = value => {\n return value.date();\n };\n getHours = value => {\n return value.hour();\n };\n getMinutes = value => {\n return value.minute();\n };\n getSeconds = value => {\n return value.second();\n };\n getMilliseconds = value => {\n return value.millisecond();\n };\n setYear = (value, year) => {\n return this.adjustOffset(value.set('year', year));\n };\n setMonth = (value, month) => {\n return this.adjustOffset(value.set('month', month));\n };\n setDate = (value, date) => {\n return this.adjustOffset(value.set('date', date));\n };\n setHours = (value, hours) => {\n return this.adjustOffset(value.set('hour', hours));\n };\n setMinutes = (value, minutes) => {\n return this.adjustOffset(value.set('minute', minutes));\n };\n setSeconds = (value, seconds) => {\n return this.adjustOffset(value.set('second', seconds));\n };\n setMilliseconds = (value, milliseconds) => {\n return this.adjustOffset(value.set('millisecond', milliseconds));\n };\n getDaysInMonth = value => {\n return value.daysInMonth();\n };\n getWeekArray = value => {\n const start = this.startOfWeek(this.startOfMonth(value));\n const end = this.endOfWeek(this.endOfMonth(value));\n let count = 0;\n let current = start;\n const nestedWeeks = [];\n while (current < end) {\n const weekNumber = Math.floor(count / 7);\n nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];\n nestedWeeks[weekNumber].push(current);\n current = this.addDays(current, 1);\n count += 1;\n }\n return nestedWeeks;\n };\n getWeekNumber = value => {\n return value.week();\n };\n getDayOfWeek(value) {\n return value.day() + 1;\n }\n getYearRange = ([start, end]) => {\n const startDate = this.startOfYear(start);\n const endDate = this.endOfYear(end);\n const years = [];\n let current = startDate;\n while (this.isBefore(current, endDate)) {\n years.push(current);\n current = this.addYears(current, 1);\n }\n return years;\n };\n}","/* eslint no-restricted-syntax: 0, prefer-template: 0, guard-for-in: 0\n ---\n These rules are preventing the performance optimizations below.\n */\n\n/**\n * Compose classes from multiple sources.\n *\n * @example\n * ```tsx\n * const slots = {\n * root: ['root', 'primary'],\n * label: ['label'],\n * };\n *\n * const getUtilityClass = (slot) => `MuiButton-${slot}`;\n *\n * const classes = {\n * root: 'my-root-class',\n * };\n *\n * const output = composeClasses(slots, getUtilityClass, classes);\n * // {\n * // root: 'MuiButton-root MuiButton-primary my-root-class',\n * // label: 'MuiButton-label',\n * // }\n * ```\n *\n * @param slots a list of classes for each possible slot\n * @param getUtilityClass a function to resolve the class based on the slot name\n * @param classes the input classes from props\n * @returns the resolved classes for all slots\n */\nexport default function composeClasses(slots, getUtilityClass, classes = undefined) {\n const output = {};\n for (const slotName in slots) {\n const slot = slots[slotName];\n let buffer = '';\n let start = true;\n for (let i = 0; i < slot.length; i += 1) {\n const value = slot[i];\n if (value) {\n buffer += (start === true ? '' : ' ') + getUtilityClass(value);\n start = false;\n if (classes && classes[value]) {\n buffer += ' ' + classes[value];\n }\n }\n }\n output[slotName] = buffer;\n }\n return output;\n}","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why\nconst safeReact = {\n ...React\n};\nconst maybeReactUseId = safeReact.useId;\n\n/**\n *\n * @example
\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n // React.useId() is only available from React 17.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? reactId;\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport const getPickersLocalization = pickersTranslations => {\n return {\n components: {\n MuiLocalizationProvider: {\n defaultProps: {\n localeText: _extends({}, pickersTranslations)\n }\n }\n }\n };\n};","import { getPickersLocalization } from \"./utils/getPickersLocalization.js\";\n\n// This object is not Partial because it is the default values\n\nconst enUSPickers = {\n // Calendar navigation\n previousMonth: 'Previous month',\n nextMonth: 'Next month',\n // View navigation\n openPreviousView: 'Open previous view',\n openNextView: 'Open next view',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view',\n // DateRange labels\n start: 'Start',\n end: 'End',\n startDate: 'Start date',\n startTime: 'Start time',\n endDate: 'End date',\n endTime: 'End time',\n // Action bar\n cancelButtonLabel: 'Cancel',\n clearButtonLabel: 'Clear',\n okButtonLabel: 'OK',\n todayButtonLabel: 'Today',\n nextStepButtonLabel: 'Next',\n // Toolbar titles\n datePickerToolbarTitle: 'Select date',\n dateTimePickerToolbarTitle: 'Select date & time',\n timePickerToolbarTitle: 'Select time',\n dateRangePickerToolbarTitle: 'Select date range',\n timeRangePickerToolbarTitle: 'Select time range',\n // Clock labels\n clockLabelText: (view, formattedTime) => `Select ${view}. ${!formattedTime ? 'No time selected' : `Selected time is ${formattedTime}`}`,\n hoursClockNumberText: hours => `${hours} hours`,\n minutesClockNumberText: minutes => `${minutes} minutes`,\n secondsClockNumberText: seconds => `${seconds} seconds`,\n // Digital clock labels\n selectViewText: view => `Select ${view}`,\n // Calendar labels\n calendarWeekNumberHeaderLabel: 'Week number',\n calendarWeekNumberHeaderText: '#',\n calendarWeekNumberAriaLabelText: weekNumber => `Week ${weekNumber}`,\n calendarWeekNumberText: weekNumber => `${weekNumber}`,\n // Open Picker labels\n openDatePickerDialogue: formattedDate => formattedDate ? `Choose date, selected date is ${formattedDate}` : 'Choose date',\n openTimePickerDialogue: formattedTime => formattedTime ? `Choose time, selected time is ${formattedTime}` : 'Choose time',\n openRangePickerDialogue: formattedRange => formattedRange ? `Choose range, selected range is ${formattedRange}` : 'Choose range',\n fieldClearLabel: 'Clear',\n // Table labels\n timeTableLabel: 'pick time',\n dateTableLabel: 'pick date',\n // Field section placeholders\n fieldYearPlaceholder: params => 'Y'.repeat(params.digitAmount),\n fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'MMMM' : 'MM',\n fieldDayPlaceholder: () => 'DD',\n fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'EEEE' : 'EE',\n fieldHoursPlaceholder: () => 'hh',\n fieldMinutesPlaceholder: () => 'mm',\n fieldSecondsPlaceholder: () => 'ss',\n fieldMeridiemPlaceholder: () => 'aa',\n // View names\n year: 'Year',\n month: 'Month',\n day: 'Day',\n weekDay: 'Week day',\n hours: 'Hours',\n minutes: 'Minutes',\n seconds: 'Seconds',\n meridiem: 'Meridiem',\n // Common\n empty: 'Empty'\n};\nexport const DEFAULT_LOCALE = enUSPickers;\nexport const enUS = getPickersLocalization(enUSPickers);","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { DEFAULT_LOCALE } from \"../locales/enUS.js\";\nimport { PickerAdapterContext } from \"../LocalizationProvider/LocalizationProvider.js\";\nexport const useLocalizationContext = () => {\n const localization = React.useContext(PickerAdapterContext);\n if (localization === null) {\n throw new Error(['MUI X: Can not find the date and time pickers localization context.', 'It looks like you forgot to wrap your component in LocalizationProvider.', 'This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package'].join('\\n'));\n }\n if (localization.adapter === null) {\n throw new Error(['MUI X: Can not find the date and time pickers adapter from its localization context.', 'It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider.'].join('\\n'));\n }\n const localeText = React.useMemo(() => _extends({}, DEFAULT_LOCALE, localization.localeText), [localization.localeText]);\n return React.useMemo(() => _extends({}, localization, {\n localeText\n }), [localization, localeText]);\n};\nexport const usePickerAdapter = () => useLocalizationContext().adapter;","'use client';\n\nimport { useLocalizationContext } from \"./usePickerAdapter.js\";\nexport const usePickerTranslations = () => useLocalizationContext().localeText;","/**\n * Removes event handlers from the given object.\n * A field is considered an event handler if it is a function with a name beginning with `on`.\n *\n * @param object Object to remove event handlers from.\n * @returns Object with event handlers removed.\n */\nfunction omitEventHandlers(object) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nexport default omitEventHandlers;","import clsx from 'clsx';\nimport extractEventHandlers from \"../extractEventHandlers/index.js\";\nimport omitEventHandlers from \"../omitEventHandlers/index.js\";\n/**\n * Merges the slot component internal props (usually coming from a hook)\n * with the externally provided ones.\n *\n * The merge order is (the latter overrides the former):\n * 1. The internal props (specified as a getter function to work with get*Props hook result)\n * 2. Additional props (specified internally on a Base UI component)\n * 3. External props specified on the owner component. These should only be used on a root slot.\n * 4. External props specified in the `slotProps.*` prop.\n * 5. The `className` prop - combined from all the above.\n * @param parameters\n * @returns\n */\nfunction mergeSlotProps(parameters) {\n const {\n getSlotProps,\n additionalProps,\n externalSlotProps,\n externalForwardedProps,\n className\n } = parameters;\n if (!getSlotProps) {\n // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,\n // so we can simply merge all the props without having to worry about extracting event handlers.\n const joinedClasses = clsx(additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);\n const mergedStyle = {\n ...additionalProps?.style,\n ...externalForwardedProps?.style,\n ...externalSlotProps?.style\n };\n const props = {\n ...additionalProps,\n ...externalForwardedProps,\n ...externalSlotProps\n };\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: undefined\n };\n }\n\n // In this case, getSlotProps is responsible for calling the external event handlers.\n // We don't need to include them in the merged props because of this.\n\n const eventHandlers = extractEventHandlers({\n ...externalForwardedProps,\n ...externalSlotProps\n });\n const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);\n const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);\n const internalSlotProps = getSlotProps(eventHandlers);\n\n // The order of classes is important here.\n // Emotion (that we use in libraries consuming Base UI) depends on this order\n // to properly override style. It requires the most important classes to be last\n // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.\n const joinedClasses = clsx(internalSlotProps?.className, additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);\n const mergedStyle = {\n ...internalSlotProps?.style,\n ...additionalProps?.style,\n ...externalForwardedProps?.style,\n ...externalSlotProps?.style\n };\n const props = {\n ...internalSlotProps,\n ...additionalProps,\n ...otherPropsWithoutEventHandlers,\n ...componentsPropsWithoutEventHandlers\n };\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: internalSlotProps.ref\n };\n}\nexport default mergeSlotProps;","/**\n * Extracts event handlers from a given object.\n * A prop is considered an event handler if it is a function and its name starts with `on`.\n *\n * @param object An object to extract event handlers from.\n * @param excludeKeys An array of keys to exclude from the returned object.\n */\nfunction extractEventHandlers(object, excludeKeys = []) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nexport default extractEventHandlers;","'use client';\n\nimport useForkRef from \"../useForkRef/index.js\";\nimport appendOwnerState from \"../appendOwnerState/index.js\";\nimport mergeSlotProps from \"../mergeSlotProps/index.js\";\nimport resolveComponentProps from \"../resolveComponentProps/index.js\";\n/**\n * @ignore - do not document.\n * Builds the props to be passed into the slot of an unstyled component.\n * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior.\n * If the slot component is not a host component, it also merges in the `ownerState`.\n *\n * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component.\n */\nfunction useSlotProps(parameters) {\n const {\n elementType,\n externalSlotProps,\n ownerState,\n skipResolvingSlotProps = false,\n ...other\n } = parameters;\n const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);\n const {\n props: mergedProps,\n internalRef\n } = mergeSlotProps({\n ...other,\n externalSlotProps: resolvedComponentsProps\n });\n const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.additionalProps?.ref);\n const props = appendOwnerState(elementType, {\n ...mergedProps,\n ref\n }, ownerState);\n return props;\n}\nexport default useSlotProps;","/**\n * If `componentProps` is a function, calls it with the provided `ownerState`.\n * Otherwise, just returns `componentProps`.\n */\nfunction resolveComponentProps(componentProps, ownerState, slotState) {\n if (typeof componentProps === 'function') {\n return componentProps(ownerState, slotState);\n }\n return componentProps;\n}\nexport default resolveComponentProps;","'use client';\n\nimport * as React from 'react';\n\n/**\n * Merges refs into a single memoized callback ref or `null`.\n *\n * ```tsx\n * const rootRef = React.useRef(null);\n * const refFork = useForkRef(rootRef, props.ref);\n *\n * return (\n * \n * );\n * ```\n *\n * @param {Array | undefined>} refs The ref array.\n * @returns {React.RefCallback | null} The new ref callback.\n */\nexport default function useForkRef(...refs) {\n const cleanupRef = React.useRef(undefined);\n const refEffect = React.useCallback(instance => {\n const cleanups = refs.map(ref => {\n if (ref == null) {\n return null;\n }\n if (typeof ref === 'function') {\n const refCallback = ref;\n const refCleanup = refCallback(instance);\n return typeof refCleanup === 'function' ? refCleanup : () => {\n refCallback(null);\n };\n }\n ref.current = instance;\n return () => {\n ref.current = null;\n };\n });\n return () => {\n cleanups.forEach(refCleanup => refCleanup?.());\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return value => {\n if (cleanupRef.current) {\n cleanupRef.current();\n cleanupRef.current = undefined;\n }\n if (value != null) {\n cleanupRef.current = refEffect(value);\n }\n };\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- intentionally ignoring that the dependency array must be an array literal\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}","import isHostComponent from \"../isHostComponent/index.js\";\n\n/**\n * Type of the ownerState based on the type of an element it applies to.\n * This resolves to the provided OwnerState for React components and `undefined` for host components.\n * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.\n */\n\n/**\n * Appends the ownerState object to the props, merging with the existing one if necessary.\n *\n * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.\n * @param otherProps Props of the element.\n * @param ownerState\n */\nfunction appendOwnerState(elementType, otherProps, ownerState) {\n if (elementType === undefined || isHostComponent(elementType)) {\n return otherProps;\n }\n return {\n ...otherProps,\n ownerState: {\n ...otherProps.ownerState,\n ...ownerState\n }\n };\n}\nexport default appendOwnerState;","/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nfunction isHostComponent(element) {\n return typeof element === 'string';\n}\nexport default isHostComponent;","import { createSvgIcon } from '@mui/material/utils';\nimport * as React from 'react';\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const ArrowDropDownIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M7 10l5 5 5-5z\"\n}), 'ArrowDropDown');\n\n/**\n * @ignore - internal component.\n */\nexport const ArrowLeftIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z\"\n}), 'ArrowLeft');\n\n/**\n * @ignore - internal component.\n */\nexport const ArrowRightIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z\"\n}), 'ArrowRight');\n\n/**\n * @ignore - internal component.\n */\nexport const CalendarIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z\"\n}), 'Calendar');\n\n/**\n * @ignore - internal component.\n */\nexport const ClockIcon = createSvgIcon(/*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"path\", {\n d: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n }), /*#__PURE__*/_jsx(\"path\", {\n d: \"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z\"\n })]\n}), 'Clock');\n\n/**\n * @ignore - internal component.\n */\nexport const DateRangeIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z\"\n}), 'DateRange');\n\n/**\n * @ignore - internal component.\n */\nexport const TimeIcon = createSvgIcon(/*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"path\", {\n d: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n }), /*#__PURE__*/_jsx(\"path\", {\n d: \"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z\"\n })]\n}), 'Time');\n\n/**\n * @ignore - internal component.\n */\nexport const ClearIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Clear');","const defaultGenerator = componentName => componentName;\nconst createClassNameGenerator = () => {\n let generate = defaultGenerator;\n return {\n configure(generator) {\n generate = generator;\n },\n generate(componentName) {\n return generate(componentName);\n },\n reset() {\n generate = defaultGenerator;\n }\n };\n};\nconst ClassNameGenerator = createClassNameGenerator();\nexport default ClassNameGenerator;","import ClassNameGenerator from \"../ClassNameGenerator/index.js\";\nexport const globalStateClasses = {\n active: 'active',\n checked: 'checked',\n completed: 'completed',\n disabled: 'disabled',\n error: 'error',\n expanded: 'expanded',\n focused: 'focused',\n focusVisible: 'focusVisible',\n open: 'open',\n readOnly: 'readOnly',\n required: 'required',\n selected: 'selected'\n};\nexport default function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import generateUtilityClass from \"../generateUtilityClass/index.js\";\nexport default function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);\n });\n return result;\n}","import generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nexport function getPickersArrowSwitcherUtilityClass(slot) {\n return generateUtilityClass('MuiPickersArrowSwitcher', slot);\n}\nexport const pickersArrowSwitcherClasses = generateUtilityClasses('MuiPickersArrowSwitcher', ['root', 'spacer', 'button', 'previousIconButton', 'nextIconButton', 'leftArrowIcon', 'rightArrowIcon']);","'use client';\n\nimport * as React from 'react';\nimport { LocalizationProvider } from \"../../LocalizationProvider/index.js\";\nimport { IsValidValueContext } from \"../../hooks/useIsValidValue.js\";\nimport { PickerFieldPrivateContext } from \"../hooks/useNullableFieldPrivateContext.js\";\nimport { PickerContext } from \"../../hooks/usePickerContext.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const PickerActionsContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") PickerActionsContext.displayName = \"PickerActionsContext\";\nexport const PickerPrivateContext = /*#__PURE__*/React.createContext({\n ownerState: {\n isPickerDisabled: false,\n isPickerReadOnly: false,\n isPickerValueEmpty: false,\n isPickerOpen: false,\n pickerVariant: 'desktop',\n pickerOrientation: 'portrait'\n },\n rootRefObject: {\n current: null\n },\n labelId: undefined,\n dismissViews: () => {},\n hasUIView: true,\n getCurrentViewMode: () => 'UI',\n triggerElement: null,\n viewContainerRole: null,\n defaultActionBarActions: [],\n onPopperExited: undefined\n});\n\n/**\n * Provides the context for the various parts of a Picker component:\n * - contextValue: the context for the Picker sub-components.\n * - localizationProvider: the translations passed through the props and through a parent LocalizationProvider.\n *\n * @ignore - do not document.\n */\nif (process.env.NODE_ENV !== \"production\") PickerPrivateContext.displayName = \"PickerPrivateContext\";\nexport function PickerProvider(props) {\n const {\n contextValue,\n actionsContextValue,\n privateContextValue,\n fieldPrivateContextValue,\n isValidContextValue,\n localeText,\n children\n } = props;\n return /*#__PURE__*/_jsx(PickerContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(PickerActionsContext.Provider, {\n value: actionsContextValue,\n children: /*#__PURE__*/_jsx(PickerPrivateContext.Provider, {\n value: privateContextValue,\n children: /*#__PURE__*/_jsx(PickerFieldPrivateContext.Provider, {\n value: fieldPrivateContextValue,\n children: /*#__PURE__*/_jsx(IsValidValueContext.Provider, {\n value: isValidContextValue,\n children: /*#__PURE__*/_jsx(LocalizationProvider, {\n localeText: localeText,\n children: children\n })\n })\n })\n })\n })\n });\n}","'use client';\n\nimport * as React from 'react';\nimport { PickerPrivateContext } from \"../components/PickerProvider.js\";\n\n/**\n * Returns the private context passed by the Picker wrapping the current component.\n */\nexport const usePickerPrivateContext = () => React.useContext(PickerPrivateContext);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"className\", \"slots\", \"slotProps\", \"isNextDisabled\", \"isNextHidden\", \"onGoToNext\", \"nextLabel\", \"isPreviousDisabled\", \"isPreviousHidden\", \"onGoToPrevious\", \"previousLabel\", \"labelId\", \"classes\"],\n _excluded2 = [\"ownerState\"],\n _excluded3 = [\"ownerState\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport Typography from '@mui/material/Typography';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport IconButton from '@mui/material/IconButton';\nimport { ArrowLeftIcon, ArrowRightIcon } from \"../../../icons/index.js\";\nimport { getPickersArrowSwitcherUtilityClass } from \"./pickersArrowSwitcherClasses.js\";\nimport { usePickerPrivateContext } from \"../../hooks/usePickerPrivateContext.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst PickersArrowSwitcherRoot = styled('div', {\n name: 'MuiPickersArrowSwitcher',\n slot: 'Root'\n})({\n display: 'flex'\n});\nconst PickersArrowSwitcherSpacer = styled('div', {\n name: 'MuiPickersArrowSwitcher',\n slot: 'Spacer'\n})(({\n theme\n}) => ({\n width: theme.spacing(3)\n}));\nconst PickersArrowSwitcherButton = styled(IconButton, {\n name: 'MuiPickersArrowSwitcher',\n slot: 'Button'\n})({\n variants: [{\n props: {\n isButtonHidden: true\n },\n style: {\n visibility: 'hidden'\n }\n }]\n});\nconst useUtilityClasses = classes => {\n const slots = {\n root: ['root'],\n spacer: ['spacer'],\n button: ['button'],\n previousIconButton: ['previousIconButton'],\n nextIconButton: ['nextIconButton'],\n leftArrowIcon: ['leftArrowIcon'],\n rightArrowIcon: ['rightArrowIcon']\n };\n return composeClasses(slots, getPickersArrowSwitcherUtilityClass, classes);\n};\nexport const PickersArrowSwitcher = /*#__PURE__*/React.forwardRef(function PickersArrowSwitcher(inProps, ref) {\n const isRtl = useRtl();\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersArrowSwitcher'\n });\n const {\n children,\n className,\n slots,\n slotProps,\n isNextDisabled,\n isNextHidden,\n onGoToNext,\n nextLabel,\n isPreviousDisabled,\n isPreviousHidden,\n onGoToPrevious,\n previousLabel,\n labelId,\n classes: classesProp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n ownerState\n } = usePickerPrivateContext();\n const classes = useUtilityClasses(classesProp);\n const nextProps = {\n isDisabled: isNextDisabled,\n isHidden: isNextHidden,\n goTo: onGoToNext,\n label: nextLabel\n };\n const previousProps = {\n isDisabled: isPreviousDisabled,\n isHidden: isPreviousHidden,\n goTo: onGoToPrevious,\n label: previousLabel\n };\n const PreviousIconButton = slots?.previousIconButton ?? PickersArrowSwitcherButton;\n const previousIconButtonProps = useSlotProps({\n elementType: PreviousIconButton,\n externalSlotProps: slotProps?.previousIconButton,\n additionalProps: {\n size: 'medium',\n title: previousProps.label,\n 'aria-label': previousProps.label,\n disabled: previousProps.isDisabled,\n edge: 'end',\n onClick: previousProps.goTo\n },\n ownerState: _extends({}, ownerState, {\n isButtonHidden: previousProps.isHidden ?? false\n }),\n className: clsx(classes.button, classes.previousIconButton)\n });\n const NextIconButton = slots?.nextIconButton ?? PickersArrowSwitcherButton;\n const nextIconButtonProps = useSlotProps({\n elementType: NextIconButton,\n externalSlotProps: slotProps?.nextIconButton,\n additionalProps: {\n size: 'medium',\n title: nextProps.label,\n 'aria-label': nextProps.label,\n disabled: nextProps.isDisabled,\n edge: 'start',\n onClick: nextProps.goTo\n },\n ownerState: _extends({}, ownerState, {\n isButtonHidden: nextProps.isHidden ?? false\n }),\n className: clsx(classes.button, classes.nextIconButton)\n });\n const LeftArrowIcon = slots?.leftArrowIcon ?? ArrowLeftIcon;\n // The spread is here to avoid this bug mui/material-ui#34056\n const _useSlotProps = useSlotProps({\n elementType: LeftArrowIcon,\n externalSlotProps: slotProps?.leftArrowIcon,\n additionalProps: {\n fontSize: 'inherit'\n },\n ownerState,\n className: classes.leftArrowIcon\n }),\n leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);\n const RightArrowIcon = slots?.rightArrowIcon ?? ArrowRightIcon;\n // The spread is here to avoid this bug mui/material-ui#34056\n const _useSlotProps2 = useSlotProps({\n elementType: RightArrowIcon,\n externalSlotProps: slotProps?.rightArrowIcon,\n additionalProps: {\n fontSize: 'inherit'\n },\n ownerState,\n className: classes.rightArrowIcon\n }),\n rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3);\n return /*#__PURE__*/_jsxs(PickersArrowSwitcherRoot, _extends({\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n children: [/*#__PURE__*/_jsx(PreviousIconButton, _extends({}, previousIconButtonProps, {\n children: isRtl ? /*#__PURE__*/_jsx(RightArrowIcon, _extends({}, rightArrowIconProps)) : /*#__PURE__*/_jsx(LeftArrowIcon, _extends({}, leftArrowIconProps))\n })), children ? /*#__PURE__*/_jsx(Typography, {\n variant: \"subtitle1\",\n component: \"span\",\n id: labelId,\n children: children\n }) : /*#__PURE__*/_jsx(PickersArrowSwitcherSpacer, {\n className: classes.spacer,\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(NextIconButton, _extends({}, nextIconButtonProps, {\n children: isRtl ? /*#__PURE__*/_jsx(LeftArrowIcon, _extends({}, leftArrowIconProps)) : /*#__PURE__*/_jsx(RightArrowIcon, _extends({}, rightArrowIconProps))\n }))]\n }));\n});\nif (process.env.NODE_ENV !== \"production\") PickersArrowSwitcher.displayName = \"PickersArrowSwitcher\";","import { areViewsEqual } from \"./views.js\";\nexport const EXPORTED_TIME_VIEWS = ['hours', 'minutes', 'seconds'];\nexport const TIME_VIEWS = ['hours', 'minutes', 'seconds', 'meridiem'];\nexport const isTimeView = view => EXPORTED_TIME_VIEWS.includes(view);\nexport const isInternalTimeView = view => TIME_VIEWS.includes(view);\nexport const getMeridiem = (date, adapter) => {\n if (!date) {\n return null;\n }\n return adapter.getHours(date) >= 12 ? 'pm' : 'am';\n};\nexport const convertValueToMeridiem = (value, meridiem, ampm) => {\n if (ampm) {\n const currentMeridiem = value >= 12 ? 'pm' : 'am';\n if (currentMeridiem !== meridiem) {\n return meridiem === 'am' ? value - 12 : value + 12;\n }\n }\n return value;\n};\nexport const convertToMeridiem = (time, meridiem, ampm, adapter) => {\n const newHoursAmount = convertValueToMeridiem(adapter.getHours(time), meridiem, ampm);\n return adapter.setHours(time, newHoursAmount);\n};\nexport const getSecondsInDay = (date, adapter) => {\n return adapter.getHours(date) * 3600 + adapter.getMinutes(date) * 60 + adapter.getSeconds(date);\n};\nexport const createIsAfterIgnoreDatePart = (disableIgnoringDatePartForTimeValidation, adapter) => (dateLeft, dateRight) => {\n if (disableIgnoringDatePartForTimeValidation) {\n return adapter.isAfter(dateLeft, dateRight);\n }\n return getSecondsInDay(dateLeft, adapter) > getSecondsInDay(dateRight, adapter);\n};\nexport const resolveTimeFormat = (adapter, {\n format,\n views,\n ampm\n}) => {\n if (format != null) {\n return format;\n }\n const formats = adapter.formats;\n if (areViewsEqual(views, ['hours'])) {\n return ampm ? `${formats.hours12h} ${formats.meridiem}` : formats.hours24h;\n }\n if (areViewsEqual(views, ['minutes'])) {\n return formats.minutes;\n }\n if (areViewsEqual(views, ['seconds'])) {\n return formats.seconds;\n }\n if (areViewsEqual(views, ['minutes', 'seconds'])) {\n return `${formats.minutes}:${formats.seconds}`;\n }\n if (areViewsEqual(views, ['hours', 'minutes', 'seconds'])) {\n return ampm ? `${formats.hours12h}:${formats.minutes}:${formats.seconds} ${formats.meridiem}` : `${formats.hours24h}:${formats.minutes}:${formats.seconds}`;\n }\n return ampm ? `${formats.hours12h}:${formats.minutes} ${formats.meridiem}` : `${formats.hours24h}:${formats.minutes}`;\n};","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from \"../useEnhancedEffect/index.js\";\n\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nexport default useEventCallback;","'use client';\n\n// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- process.env never changes, dependency arrays are intentionally ignored\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport default function useControlled(props) {\n const {\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n } = props;\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n if (!isControlled && JSON.stringify(defaultProp) !== JSON.stringify(defaultValue)) {\n console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n\n // TODO: provide overloads for the useControlled function to account for the case where either\n // controlled or default is not undefined.\n // In that case the return type should be [T, React.Dispatch>]\n // otherwise it should be [T | undefined, React.Dispatch>]\n return [value, setValueIfUncontrolled];\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport const DEFAULT_STEP_NAVIGATION = {\n hasNextStep: false,\n hasSeveralSteps: false,\n goToNextStep: () => {},\n areViewsInSameStep: () => true\n};\n\n/**\n * Create an object that determines whether there is a next step and allows to go to the next step.\n * @param {CreateStepNavigationParameters} parameters The parameters of the createStepNavigation function\n * @returns {CreateStepNavigationReturnValue} The return value of the createStepNavigation function\n */\nexport function createStepNavigation(parameters) {\n const {\n steps,\n isViewMatchingStep,\n onStepChange\n } = parameters;\n return parametersBis => {\n if (steps == null) {\n return DEFAULT_STEP_NAVIGATION;\n }\n const currentStepIndex = steps.findIndex(step => isViewMatchingStep(parametersBis.view, step));\n const nextStep = currentStepIndex === -1 || currentStepIndex === steps.length - 1 ? null : steps[currentStepIndex + 1];\n return {\n hasNextStep: nextStep != null,\n hasSeveralSteps: steps.length > 1,\n goToNextStep: () => {\n if (nextStep == null) {\n return;\n }\n onStepChange(_extends({}, parametersBis, {\n step: nextStep\n }));\n },\n areViewsInSameStep: (viewA, viewB) => {\n const stepA = steps.find(step => isViewMatchingStep(viewA, step));\n const stepB = steps.find(step => isViewMatchingStep(viewB, step));\n return stepA === stepB;\n }\n };\n };\n}","export const DAY_SIZE = 36;\nexport const DAY_MARGIN = 2;\nexport const DIALOG_WIDTH = 320;\nexport const MAX_CALENDAR_HEIGHT = 280;\nexport const VIEW_HEIGHT = 336;\nexport const DIGITAL_CLOCK_VIEW_HEIGHT = 232;\nexport const MULTI_SECTION_CLOCK_SECTION_WIDTH = 48;","import { styled } from '@mui/material/styles';\nimport { DIALOG_WIDTH, VIEW_HEIGHT } from \"../../constants/dimensions.js\";\nexport const PickerViewRoot = styled('div', {\n slot: 'internal',\n shouldForwardProp: undefined\n})({\n overflow: 'hidden',\n width: DIALOG_WIDTH,\n maxHeight: VIEW_HEIGHT,\n display: 'flex',\n flexDirection: 'column',\n margin: '0 auto'\n});","import generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nexport function getTimeClockUtilityClass(slot) {\n return generateUtilityClass('MuiTimeClock', slot);\n}\nexport const timeClockClasses = generateUtilityClasses('MuiTimeClock', ['root', 'arrowSwitcher']);","export const CLOCK_WIDTH = 220;\nexport const CLOCK_HOUR_WIDTH = 36;\nconst clockCenter = {\n x: CLOCK_WIDTH / 2,\n y: CLOCK_WIDTH / 2\n};\nconst baseClockPoint = {\n x: clockCenter.x,\n y: 0\n};\nconst cx = baseClockPoint.x - clockCenter.x;\nconst cy = baseClockPoint.y - clockCenter.y;\nconst rad2deg = rad => rad * (180 / Math.PI);\nconst getAngleValue = (step, offsetX, offsetY) => {\n const x = offsetX - clockCenter.x;\n const y = offsetY - clockCenter.y;\n const atan = Math.atan2(cx, cy) - Math.atan2(x, y);\n let deg = rad2deg(atan);\n deg = Math.round(deg / step) * step;\n deg %= 360;\n const value = Math.floor(deg / step) || 0;\n const delta = x ** 2 + y ** 2;\n const distance = Math.sqrt(delta);\n return {\n value,\n distance\n };\n};\nexport const getMinutes = (offsetX, offsetY, step = 1) => {\n const angleStep = step * 6;\n let {\n value\n } = getAngleValue(angleStep, offsetX, offsetY);\n value = value * step % 60;\n return value;\n};\nexport const getHours = (offsetX, offsetY, ampm) => {\n const {\n value,\n distance\n } = getAngleValue(30, offsetX, offsetY);\n let hour = value || 12;\n if (!ampm) {\n if (distance < CLOCK_WIDTH / 2 - CLOCK_HOUR_WIDTH) {\n hour += 12;\n hour %= 24;\n }\n } else {\n hour %= 12;\n }\n return hour;\n};","import generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nexport function getClockPointerUtilityClass(slot) {\n return generateUtilityClass('MuiClockPointer', slot);\n}\nexport const clockPointerClasses = generateUtilityClasses('MuiClockPointer', ['root', 'thumb']);","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"classes\", \"isBetweenTwoClockValues\", \"isInner\", \"type\", \"viewValue\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { CLOCK_WIDTH, CLOCK_HOUR_WIDTH } from \"./shared.js\";\nimport { getClockPointerUtilityClass } from \"./clockPointerClasses.js\";\nimport { usePickerPrivateContext } from \"../internals/hooks/usePickerPrivateContext.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = classes => {\n const slots = {\n root: ['root'],\n thumb: ['thumb']\n };\n return composeClasses(slots, getClockPointerUtilityClass, classes);\n};\nconst ClockPointerRoot = styled('div', {\n name: 'MuiClockPointer',\n slot: 'Root'\n})(({\n theme\n}) => ({\n width: 2,\n backgroundColor: (theme.vars || theme).palette.primary.main,\n position: 'absolute',\n left: 'calc(50% - 1px)',\n bottom: '50%',\n transformOrigin: 'center bottom 0px',\n variants: [{\n props: {\n isClockPointerAnimated: true\n },\n style: {\n transition: theme.transitions.create(['transform', 'height'])\n }\n }]\n}));\nconst ClockPointerThumb = styled('div', {\n name: 'MuiClockPointer',\n slot: 'Thumb'\n})(({\n theme\n}) => ({\n width: 4,\n height: 4,\n backgroundColor: (theme.vars || theme).palette.primary.contrastText,\n borderRadius: '50%',\n position: 'absolute',\n top: -21,\n left: `calc(50% - ${CLOCK_HOUR_WIDTH / 2}px)`,\n border: `${(CLOCK_HOUR_WIDTH - 4) / 2}px solid ${(theme.vars || theme).palette.primary.main}`,\n boxSizing: 'content-box',\n variants: [{\n props: {\n isClockPointerBetweenTwoValues: false\n },\n style: {\n backgroundColor: (theme.vars || theme).palette.primary.main\n }\n }]\n}));\n\n/**\n * @ignore - internal component.\n */\nexport function ClockPointer(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiClockPointer'\n });\n const {\n className,\n classes: classesProp,\n isBetweenTwoClockValues,\n isInner,\n type,\n viewValue\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const previousType = React.useRef(type);\n React.useEffect(() => {\n previousType.current = type;\n }, [type]);\n const {\n ownerState: pickerOwnerState\n } = usePickerPrivateContext();\n const ownerState = _extends({}, pickerOwnerState, {\n isClockPointerAnimated: previousType.current !== type,\n isClockPointerBetweenTwoValues: isBetweenTwoClockValues\n });\n const classes = useUtilityClasses(classesProp);\n const getAngleStyle = () => {\n const max = type === 'hours' ? 12 : 60;\n let angle = 360 / max * viewValue;\n if (type === 'hours' && viewValue > 12) {\n angle -= 360; // round up angle to max 360 degrees\n }\n return {\n height: Math.round((isInner ? 0.26 : 0.4) * CLOCK_WIDTH),\n transform: `rotateZ(${angle}deg)`\n };\n };\n return /*#__PURE__*/_jsx(ClockPointerRoot, _extends({\n style: getAngleStyle(),\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n children: /*#__PURE__*/_jsx(ClockPointerThumb, {\n ownerState: ownerState,\n className: classes.thumb\n })\n }));\n}","import generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nexport function getClockUtilityClass(slot) {\n return generateUtilityClass('MuiClock', slot);\n}\nexport const clockClasses = generateUtilityClasses('MuiClock', ['root', 'clock', 'wrapper', 'squareMask', 'pin', 'amButton', 'pmButton', 'meridiemText', 'selected']);","import { areViewsEqual } from \"./views.js\";\nexport const mergeDateAndTime = (adapter, dateParam, timeParam) => {\n let mergedDate = dateParam;\n mergedDate = adapter.setHours(mergedDate, adapter.getHours(timeParam));\n mergedDate = adapter.setMinutes(mergedDate, adapter.getMinutes(timeParam));\n mergedDate = adapter.setSeconds(mergedDate, adapter.getSeconds(timeParam));\n mergedDate = adapter.setMilliseconds(mergedDate, adapter.getMilliseconds(timeParam));\n return mergedDate;\n};\nexport const findClosestEnabledDate = ({\n date,\n disableFuture,\n disablePast,\n maxDate,\n minDate,\n isDateDisabled,\n adapter,\n timezone\n}) => {\n const today = mergeDateAndTime(adapter, adapter.date(undefined, timezone), date);\n if (disablePast && adapter.isBefore(minDate, today)) {\n minDate = today;\n }\n if (disableFuture && adapter.isAfter(maxDate, today)) {\n maxDate = today;\n }\n let forward = date;\n let backward = date;\n if (adapter.isBefore(date, minDate)) {\n forward = minDate;\n backward = null;\n }\n if (adapter.isAfter(date, maxDate)) {\n if (backward) {\n backward = maxDate;\n }\n forward = null;\n }\n while (forward || backward) {\n if (forward && adapter.isAfter(forward, maxDate)) {\n forward = null;\n }\n if (backward && adapter.isBefore(backward, minDate)) {\n backward = null;\n }\n if (forward) {\n if (!isDateDisabled(forward)) {\n return forward;\n }\n forward = adapter.addDays(forward, 1);\n }\n if (backward) {\n if (!isDateDisabled(backward)) {\n return backward;\n }\n backward = adapter.addDays(backward, -1);\n }\n }\n return null;\n};\nexport const replaceInvalidDateByNull = (adapter, value) => !adapter.isValid(value) ? null : value;\nexport const applyDefaultDate = (adapter, value, defaultValue) => {\n if (value == null || !adapter.isValid(value)) {\n return defaultValue;\n }\n return value;\n};\nexport const areDatesEqual = (adapter, a, b) => {\n if (!adapter.isValid(a) && a != null && !adapter.isValid(b) && b != null) {\n return true;\n }\n return adapter.isEqual(a, b);\n};\nexport const getMonthsInYear = (adapter, year) => {\n const firstMonth = adapter.startOfYear(year);\n const months = [firstMonth];\n while (months.length < 12) {\n const prevMonth = months[months.length - 1];\n months.push(adapter.addMonths(prevMonth, 1));\n }\n return months;\n};\nexport const getTodayDate = (adapter, timezone, valueType) => valueType === 'date' ? adapter.startOfDay(adapter.date(undefined, timezone)) : adapter.date(undefined, timezone);\nexport const formatMeridiem = (adapter, meridiem) => {\n const date = adapter.setHours(adapter.date(), meridiem === 'am' ? 2 : 14);\n return adapter.format(date, 'meridiem');\n};\nexport const DATE_VIEWS = ['year', 'month', 'day'];\nexport const isDatePickerView = view => DATE_VIEWS.includes(view);\nexport const resolveDateFormat = (adapter, {\n format,\n views\n}, isInToolbar) => {\n if (format != null) {\n return format;\n }\n const formats = adapter.formats;\n if (areViewsEqual(views, ['year'])) {\n return formats.year;\n }\n if (areViewsEqual(views, ['month'])) {\n return formats.month;\n }\n if (areViewsEqual(views, ['day'])) {\n return formats.dayOfMonth;\n }\n if (areViewsEqual(views, ['month', 'year'])) {\n return `${formats.month} ${formats.year}`;\n }\n if (areViewsEqual(views, ['day', 'month'])) {\n return `${formats.month} ${formats.dayOfMonth}`;\n }\n if (isInToolbar) {\n // Little localization hack (Google is doing the same for android native pickers):\n // For english localization it is convenient to include weekday into the date \"Mon, Jun 1\".\n // For other locales using strings like \"June 1\", without weekday.\n return /en/.test(adapter.getCurrentLocaleCode()) ? formats.normalDateWithWeekday : formats.normalDate;\n }\n return formats.keyboardDate;\n};\nexport const getWeekdays = (adapter, date) => {\n const start = adapter.startOfWeek(date);\n return [0, 1, 2, 3, 4, 5, 6].map(diff => adapter.addDays(start, diff));\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport IconButton from '@mui/material/IconButton';\nimport Typography from '@mui/material/Typography';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { ClockPointer } from \"./ClockPointer.js\";\nimport { usePickerAdapter, usePickerTranslations } from \"../hooks/index.js\";\nimport { CLOCK_HOUR_WIDTH, getHours, getMinutes } from \"./shared.js\";\nimport { getClockUtilityClass } from \"./clockClasses.js\";\nimport { formatMeridiem } from \"../internals/utils/date-utils.js\";\nimport { usePickerPrivateContext } from \"../internals/hooks/usePickerPrivateContext.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = (classes, ownerState) => {\n const slots = {\n root: ['root'],\n clock: ['clock'],\n wrapper: ['wrapper'],\n squareMask: ['squareMask'],\n pin: ['pin'],\n amButton: ['amButton', ownerState.clockMeridiemMode === 'am' && 'selected'],\n pmButton: ['pmButton', ownerState.clockMeridiemMode === 'pm' && 'selected'],\n meridiemText: ['meridiemText']\n };\n return composeClasses(slots, getClockUtilityClass, classes);\n};\nconst ClockRoot = styled('div', {\n name: 'MuiClock',\n slot: 'Root'\n})(({\n theme\n}) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n margin: theme.spacing(2)\n}));\nconst ClockClock = styled('div', {\n name: 'MuiClock',\n slot: 'Clock'\n})({\n backgroundColor: 'rgba(0,0,0,.07)',\n borderRadius: '50%',\n height: 220,\n width: 220,\n flexShrink: 0,\n position: 'relative',\n pointerEvents: 'none'\n});\nconst ClockWrapper = styled('div', {\n name: 'MuiClock',\n slot: 'Wrapper'\n})({\n '&:focus': {\n outline: 'none'\n }\n});\nconst ClockSquareMask = styled('div', {\n name: 'MuiClock',\n slot: 'SquareMask'\n})({\n width: '100%',\n height: '100%',\n position: 'absolute',\n pointerEvents: 'auto',\n outline: 0,\n // Disable scroll capabilities.\n touchAction: 'none',\n userSelect: 'none',\n variants: [{\n props: {\n isClockDisabled: false\n },\n style: {\n '@media (pointer: fine)': {\n cursor: 'pointer',\n borderRadius: '50%'\n },\n '&:active': {\n cursor: 'move'\n }\n }\n }]\n});\nconst ClockPin = styled('div', {\n name: 'MuiClock',\n slot: 'Pin'\n})(({\n theme\n}) => ({\n width: 6,\n height: 6,\n borderRadius: '50%',\n backgroundColor: (theme.vars || theme).palette.primary.main,\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)'\n}));\nconst meridiemButtonCommonStyles = (theme, clockMeridiemMode) => ({\n zIndex: 1,\n bottom: 8,\n paddingLeft: 4,\n paddingRight: 4,\n width: CLOCK_HOUR_WIDTH,\n variants: [{\n props: {\n clockMeridiemMode\n },\n style: {\n backgroundColor: (theme.vars || theme).palette.primary.main,\n color: (theme.vars || theme).palette.primary.contrastText,\n '&:hover': {\n backgroundColor: (theme.vars || theme).palette.primary.light\n }\n }\n }]\n});\nconst ClockAmButton = styled(IconButton, {\n name: 'MuiClock',\n slot: 'AmButton'\n})(({\n theme\n}) => _extends({}, meridiemButtonCommonStyles(theme, 'am'), {\n // keeping it here to make TS happy\n position: 'absolute',\n left: 8\n}));\nconst ClockPmButton = styled(IconButton, {\n name: 'MuiClock',\n slot: 'PmButton'\n})(({\n theme\n}) => _extends({}, meridiemButtonCommonStyles(theme, 'pm'), {\n // keeping it here to make TS happy\n position: 'absolute',\n right: 8\n}));\nconst ClockMeridiemText = styled(Typography, {\n name: 'MuiClock',\n slot: 'MeridiemText'\n})({\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis'\n});\n\n/**\n * @ignore - internal component.\n */\nexport function Clock(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiClock'\n });\n const {\n ampm,\n ampmInClock,\n autoFocus,\n children,\n value,\n handleMeridiemChange,\n isTimeDisabled,\n meridiemMode,\n minutesStep = 1,\n onChange,\n selectedId,\n type,\n viewValue,\n viewRange: [minViewValue, maxViewValue],\n disabled = false,\n readOnly,\n className,\n classes: classesProp\n } = props;\n const adapter = usePickerAdapter();\n const translations = usePickerTranslations();\n const {\n ownerState: pickerOwnerState\n } = usePickerPrivateContext();\n const ownerState = _extends({}, pickerOwnerState, {\n isClockDisabled: disabled,\n clockMeridiemMode: meridiemMode\n });\n const isMoving = React.useRef(false);\n const classes = useUtilityClasses(classesProp, ownerState);\n const isSelectedTimeDisabled = isTimeDisabled(viewValue, type);\n const isPointerInner = !ampm && type === 'hours' && (viewValue < 1 || viewValue > 12);\n const handleValueChange = (newValue, isFinish) => {\n if (disabled || readOnly) {\n return;\n }\n if (isTimeDisabled(newValue, type)) {\n return;\n }\n onChange(newValue, isFinish);\n };\n const setTime = (event, isFinish) => {\n let {\n offsetX,\n offsetY\n } = event;\n if (offsetX === undefined) {\n const rect = event.target.getBoundingClientRect();\n offsetX = event.changedTouches[0].clientX - rect.left;\n offsetY = event.changedTouches[0].clientY - rect.top;\n }\n const newSelectedValue = type === 'seconds' || type === 'minutes' ? getMinutes(offsetX, offsetY, minutesStep) : getHours(offsetX, offsetY, Boolean(ampm));\n handleValueChange(newSelectedValue, isFinish);\n };\n const handleTouchSelection = event => {\n isMoving.current = true;\n setTime(event, 'shallow');\n };\n const handleTouchEnd = event => {\n if (isMoving.current) {\n setTime(event, 'finish');\n isMoving.current = false;\n }\n event.preventDefault();\n };\n const handleMouseMove = event => {\n // event.buttons & PRIMARY_MOUSE_BUTTON\n if (event.buttons > 0) {\n setTime(event.nativeEvent, 'shallow');\n }\n };\n const handleMouseUp = event => {\n if (isMoving.current) {\n isMoving.current = false;\n }\n setTime(event.nativeEvent, 'finish');\n };\n const isPointerBetweenTwoClockValues = type === 'hours' ? false : viewValue % 5 !== 0;\n const keyboardControlStep = type === 'minutes' ? minutesStep : 1;\n const listboxRef = React.useRef(null);\n // Since this is rendered when a Popper is opened we can't use passive effects.\n // Focusing in passive effects in Popper causes scroll jump.\n useEnhancedEffect(() => {\n if (autoFocus) {\n // The ref not being resolved would be a bug in MUI.\n listboxRef.current.focus();\n }\n }, [autoFocus]);\n const clampValue = newValue => Math.max(minViewValue, Math.min(maxViewValue, newValue));\n const circleValue = newValue => (newValue + (maxViewValue + 1)) % (maxViewValue + 1);\n const handleKeyDown = event => {\n // TODO: Why this early exit?\n if (isMoving.current) {\n return;\n }\n switch (event.key) {\n case 'Home':\n // reset both hours and minutes\n handleValueChange(minViewValue, 'partial');\n event.preventDefault();\n break;\n case 'End':\n handleValueChange(maxViewValue, 'partial');\n event.preventDefault();\n break;\n case 'ArrowUp':\n handleValueChange(circleValue(viewValue + keyboardControlStep), 'partial');\n event.preventDefault();\n break;\n case 'ArrowDown':\n handleValueChange(circleValue(viewValue - keyboardControlStep), 'partial');\n event.preventDefault();\n break;\n case 'PageUp':\n handleValueChange(clampValue(viewValue + 5), 'partial');\n event.preventDefault();\n break;\n case 'PageDown':\n handleValueChange(clampValue(viewValue - 5), 'partial');\n event.preventDefault();\n break;\n case 'Enter':\n case ' ':\n handleValueChange(viewValue, 'finish');\n event.preventDefault();\n break;\n default:\n // do nothing\n }\n };\n return /*#__PURE__*/_jsxs(ClockRoot, {\n className: clsx(classes.root, className),\n children: [/*#__PURE__*/_jsxs(ClockClock, {\n className: classes.clock,\n children: [/*#__PURE__*/_jsx(ClockSquareMask, {\n onTouchMove: handleTouchSelection,\n onTouchStart: handleTouchSelection,\n onTouchEnd: handleTouchEnd,\n onMouseUp: handleMouseUp,\n onMouseMove: handleMouseMove,\n ownerState: ownerState,\n className: classes.squareMask\n }), !isSelectedTimeDisabled && /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(ClockPin, {\n className: classes.pin\n }), value != null && /*#__PURE__*/_jsx(ClockPointer, {\n type: type,\n viewValue: viewValue,\n isInner: isPointerInner,\n isBetweenTwoClockValues: isPointerBetweenTwoClockValues\n })]\n }), /*#__PURE__*/_jsx(ClockWrapper, {\n \"aria-activedescendant\": selectedId,\n \"aria-label\": translations.clockLabelText(type, value == null ? null : adapter.format(value, ampm ? 'fullTime12h' : 'fullTime24h')),\n ref: listboxRef,\n role: \"listbox\",\n onKeyDown: handleKeyDown,\n tabIndex: 0,\n className: classes.wrapper,\n children: children\n })]\n }), ampm && ampmInClock && /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(ClockAmButton, {\n onClick: readOnly ? undefined : () => handleMeridiemChange('am'),\n disabled: disabled || meridiemMode === null,\n ownerState: ownerState,\n className: classes.amButton,\n title: formatMeridiem(adapter, 'am'),\n children: /*#__PURE__*/_jsx(ClockMeridiemText, {\n variant: \"caption\",\n className: classes.meridiemText,\n children: formatMeridiem(adapter, 'am')\n })\n }), /*#__PURE__*/_jsx(ClockPmButton, {\n disabled: disabled || meridiemMode === null,\n onClick: readOnly ? undefined : () => handleMeridiemChange('pm'),\n ownerState: ownerState,\n className: classes.pmButton,\n title: formatMeridiem(adapter, 'pm'),\n children: /*#__PURE__*/_jsx(ClockMeridiemText, {\n variant: \"caption\",\n className: classes.meridiemText,\n children: formatMeridiem(adapter, 'pm')\n })\n })]\n })]\n });\n}","import generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nexport function getClockNumberUtilityClass(slot) {\n return generateUtilityClass('MuiClockNumber', slot);\n}\nexport const clockNumberClasses = generateUtilityClasses('MuiClockNumber', ['root', 'selected', 'disabled']);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"classes\", \"disabled\", \"index\", \"inner\", \"label\", \"selected\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { CLOCK_WIDTH, CLOCK_HOUR_WIDTH } from \"./shared.js\";\nimport { getClockNumberUtilityClass, clockNumberClasses } from \"./clockNumberClasses.js\";\nimport { usePickerPrivateContext } from \"../internals/hooks/usePickerPrivateContext.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = (classes, ownerState) => {\n const slots = {\n root: ['root', ownerState.isClockNumberSelected && 'selected', ownerState.isClockNumberDisabled && 'disabled']\n };\n return composeClasses(slots, getClockNumberUtilityClass, classes);\n};\nconst ClockNumberRoot = styled('span', {\n name: 'MuiClockNumber',\n slot: 'Root',\n overridesResolver: (_, styles) => [styles.root, {\n [`&.${clockNumberClasses.disabled}`]: styles.disabled\n }, {\n [`&.${clockNumberClasses.selected}`]: styles.selected\n }]\n})(({\n theme\n}) => ({\n height: CLOCK_HOUR_WIDTH,\n width: CLOCK_HOUR_WIDTH,\n position: 'absolute',\n left: `calc((100% - ${CLOCK_HOUR_WIDTH}px) / 2)`,\n display: 'inline-flex',\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: '50%',\n color: (theme.vars || theme).palette.text.primary,\n fontFamily: theme.typography.fontFamily,\n '&:focused': {\n backgroundColor: (theme.vars || theme).palette.background.paper\n },\n [`&.${clockNumberClasses.selected}`]: {\n color: (theme.vars || theme).palette.primary.contrastText\n },\n [`&.${clockNumberClasses.disabled}`]: {\n pointerEvents: 'none',\n color: (theme.vars || theme).palette.text.disabled\n },\n variants: [{\n props: {\n isClockNumberInInnerRing: true\n },\n style: _extends({}, theme.typography.body2, {\n color: (theme.vars || theme).palette.text.secondary\n })\n }]\n}));\n\n/**\n * @ignore - internal component.\n */\nexport function ClockNumber(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiClockNumber'\n });\n const {\n className,\n classes: classesProp,\n disabled,\n index,\n inner,\n label,\n selected\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n ownerState: pickerOwnerState\n } = usePickerPrivateContext();\n const ownerState = _extends({}, pickerOwnerState, {\n isClockNumberInInnerRing: inner,\n isClockNumberSelected: selected,\n isClockNumberDisabled: disabled\n });\n const classes = useUtilityClasses(classesProp, ownerState);\n const angle = index % 12 / 12 * Math.PI * 2 - Math.PI / 2;\n const length = (CLOCK_WIDTH - CLOCK_HOUR_WIDTH - 2) / 2 * (inner ? 0.65 : 1);\n const x = Math.round(Math.cos(angle) * length);\n const y = Math.round(Math.sin(angle) * length);\n return /*#__PURE__*/_jsx(ClockNumberRoot, _extends({\n className: clsx(classes.root, className),\n \"aria-disabled\": disabled ? true : undefined,\n \"aria-selected\": selected ? true : undefined,\n role: \"option\",\n style: {\n transform: `translate(${x}px, ${y + (CLOCK_WIDTH - CLOCK_HOUR_WIDTH) / 2}px`\n },\n ownerState: ownerState\n }, other, {\n children: label\n }));\n}","import * as React from 'react';\nimport { ClockNumber } from \"./ClockNumber.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * @ignore - internal component.\n */\nexport const getHourNumbers = ({\n ampm,\n value,\n getClockNumberText,\n isDisabled,\n selectedId,\n adapter\n}) => {\n const currentHours = value ? adapter.getHours(value) : null;\n const hourNumbers = [];\n const startHour = ampm ? 1 : 0;\n const endHour = ampm ? 12 : 23;\n const isSelected = hour => {\n if (currentHours === null) {\n return false;\n }\n if (ampm) {\n if (hour === 12) {\n return currentHours === 12 || currentHours === 0;\n }\n return currentHours === hour || currentHours - 12 === hour;\n }\n return currentHours === hour;\n };\n for (let hour = startHour; hour <= endHour; hour += 1) {\n let label = hour.toString();\n if (hour === 0) {\n label = '00';\n }\n const inner = !ampm && (hour === 0 || hour > 12);\n label = adapter.formatNumber(label);\n const selected = isSelected(hour);\n hourNumbers.push(/*#__PURE__*/_jsx(ClockNumber, {\n id: selected ? selectedId : undefined,\n index: hour,\n inner: inner,\n selected: selected,\n disabled: isDisabled(hour),\n label: label,\n \"aria-label\": getClockNumberText(label)\n }, hour));\n }\n return hourNumbers;\n};\nexport const getMinutesNumbers = ({\n adapter,\n value,\n isDisabled,\n getClockNumberText,\n selectedId\n}) => {\n const f = adapter.formatNumber;\n return [[5, f('05')], [10, f('10')], [15, f('15')], [20, f('20')], [25, f('25')], [30, f('30')], [35, f('35')], [40, f('40')], [45, f('45')], [50, f('50')], [55, f('55')], [0, f('00')]].map(([numberValue, label], index) => {\n const selected = numberValue === value;\n return /*#__PURE__*/_jsx(ClockNumber, {\n label: label,\n id: selected ? selectedId : undefined,\n index: index + 1,\n inner: false,\n disabled: isDisabled(numberValue),\n selected: selected,\n \"aria-label\": getClockNumberText(label)\n }, numberValue);\n });\n};","import { createIsAfterIgnoreDatePart } from \"./time-utils.js\";\nimport { mergeDateAndTime, getTodayDate } from \"./date-utils.js\";\nexport const SECTION_TYPE_GRANULARITY = {\n year: 1,\n month: 2,\n day: 3,\n hours: 4,\n minutes: 5,\n seconds: 6,\n milliseconds: 7\n};\nexport const getSectionTypeGranularity = sections => Math.max(...sections.map(section => SECTION_TYPE_GRANULARITY[section.type] ?? 1));\nconst roundDate = (adapter, granularity, date) => {\n if (granularity === SECTION_TYPE_GRANULARITY.year) {\n return adapter.startOfYear(date);\n }\n if (granularity === SECTION_TYPE_GRANULARITY.month) {\n return adapter.startOfMonth(date);\n }\n if (granularity === SECTION_TYPE_GRANULARITY.day) {\n return adapter.startOfDay(date);\n }\n\n // We don't have startOfHour / startOfMinute / startOfSecond\n let roundedDate = date;\n if (granularity < SECTION_TYPE_GRANULARITY.minutes) {\n roundedDate = adapter.setMinutes(roundedDate, 0);\n }\n if (granularity < SECTION_TYPE_GRANULARITY.seconds) {\n roundedDate = adapter.setSeconds(roundedDate, 0);\n }\n if (granularity < SECTION_TYPE_GRANULARITY.milliseconds) {\n roundedDate = adapter.setMilliseconds(roundedDate, 0);\n }\n return roundedDate;\n};\nexport const getDefaultReferenceDate = ({\n props,\n adapter,\n granularity,\n timezone,\n getTodayDate: inGetTodayDate\n}) => {\n let referenceDate = inGetTodayDate ? inGetTodayDate() : roundDate(adapter, granularity, getTodayDate(adapter, timezone));\n if (props.minDate != null && adapter.isAfterDay(props.minDate, referenceDate)) {\n referenceDate = roundDate(adapter, granularity, props.minDate);\n }\n if (props.maxDate != null && adapter.isBeforeDay(props.maxDate, referenceDate)) {\n referenceDate = roundDate(adapter, granularity, props.maxDate);\n }\n const isAfter = createIsAfterIgnoreDatePart(props.disableIgnoringDatePartForTimeValidation ?? false, adapter);\n if (props.minTime != null && isAfter(props.minTime, referenceDate)) {\n referenceDate = roundDate(adapter, granularity, props.disableIgnoringDatePartForTimeValidation ? props.minTime : mergeDateAndTime(adapter, referenceDate, props.minTime));\n }\n if (props.maxTime != null && isAfter(referenceDate, props.maxTime)) {\n referenceDate = roundDate(adapter, granularity, props.disableIgnoringDatePartForTimeValidation ? props.maxTime : mergeDateAndTime(adapter, referenceDate, props.maxTime));\n }\n return referenceDate;\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"value\", \"referenceDate\"];\nimport { areDatesEqual, getTodayDate, replaceInvalidDateByNull } from \"./date-utils.js\";\nimport { getDefaultReferenceDate } from \"./getDefaultReferenceDate.js\";\nimport { createDateStrForV7HiddenInputFromSections, createDateStrForV6InputFromSections } from \"../hooks/useField/useField.utils.js\";\nexport const singleItemValueManager = {\n emptyValue: null,\n getTodayValue: getTodayDate,\n getInitialReferenceValue: _ref => {\n let {\n value,\n referenceDate\n } = _ref,\n params = _objectWithoutPropertiesLoose(_ref, _excluded);\n if (params.adapter.isValid(value)) {\n return value;\n }\n if (referenceDate != null) {\n return referenceDate;\n }\n return getDefaultReferenceDate(params);\n },\n cleanValue: replaceInvalidDateByNull,\n areValuesEqual: areDatesEqual,\n isSameError: (a, b) => a === b,\n hasError: error => error != null,\n defaultErrorState: null,\n getTimezone: (adapter, value) => adapter.isValid(value) ? adapter.getTimezone(value) : null,\n setTimezone: (adapter, timezone, value) => value == null ? null : adapter.setTimezone(value, timezone)\n};\nexport const singleItemFieldValueManager = {\n updateReferenceValue: (adapter, value, prevReferenceValue) => adapter.isValid(value) ? value : prevReferenceValue,\n getSectionsFromValue: (date, getSectionsFromDate) => getSectionsFromDate(date),\n getV7HiddenInputValueFromSections: createDateStrForV7HiddenInputFromSections,\n getV6InputValueFromSections: createDateStrForV6InputFromSections,\n parseValueStr: (valueStr, referenceValue, parseDate) => parseDate(valueStr.trim(), referenceValue),\n getDateFromSection: value => value,\n getDateSectionsFromValue: sections => sections,\n updateDateInValue: (value, activeSection, activeDate) => activeDate,\n clearDateSections: sections => sections.map(section => _extends({}, section, {\n value: ''\n }))\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"ampm\", \"ampmInClock\", \"autoFocus\", \"slots\", \"slotProps\", \"value\", \"defaultValue\", \"referenceDate\", \"disableIgnoringDatePartForTimeValidation\", \"maxTime\", \"minTime\", \"disableFuture\", \"disablePast\", \"minutesStep\", \"shouldDisableTime\", \"showViewSwitcher\", \"onChange\", \"view\", \"views\", \"openTo\", \"onViewChange\", \"focusedView\", \"onFocusedViewChange\", \"className\", \"classes\", \"disabled\", \"readOnly\", \"timezone\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useId from '@mui/utils/useId';\nimport { usePickerAdapter, usePickerTranslations } from \"../hooks/index.js\";\nimport { useNow } from \"../internals/hooks/useUtils.js\";\nimport { PickersArrowSwitcher } from \"../internals/components/PickersArrowSwitcher/index.js\";\nimport { convertValueToMeridiem, createIsAfterIgnoreDatePart } from \"../internals/utils/time-utils.js\";\nimport { useViews } from \"../internals/hooks/useViews.js\";\nimport { useMeridiemMode } from \"../internals/hooks/date-helpers-hooks.js\";\nimport { PickerViewRoot } from \"../internals/components/PickerViewRoot/index.js\";\nimport { getTimeClockUtilityClass } from \"./timeClockClasses.js\";\nimport { Clock } from \"./Clock.js\";\nimport { getHourNumbers, getMinutesNumbers } from \"./ClockNumbers.js\";\nimport { useControlledValue } from \"../internals/hooks/useControlledValue.js\";\nimport { singleItemValueManager } from \"../internals/utils/valueManagers.js\";\nimport { useClockReferenceDate } from \"../internals/hooks/useClockReferenceDate.js\";\nimport { usePickerPrivateContext } from \"../internals/hooks/usePickerPrivateContext.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = classes => {\n const slots = {\n root: ['root'],\n arrowSwitcher: ['arrowSwitcher']\n };\n return composeClasses(slots, getTimeClockUtilityClass, classes);\n};\nconst TimeClockRoot = styled(PickerViewRoot, {\n name: 'MuiTimeClock',\n slot: 'Root'\n})({\n display: 'flex',\n flexDirection: 'column',\n position: 'relative'\n});\nconst TimeClockArrowSwitcher = styled(PickersArrowSwitcher, {\n name: 'MuiTimeClock',\n slot: 'ArrowSwitcher'\n})({\n position: 'absolute',\n right: 12,\n top: 15\n});\nconst TIME_CLOCK_DEFAULT_VIEWS = ['hours', 'minutes'];\n\n/**\n * Demos:\n *\n * - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)\n * - [TimeClock](https://mui.com/x/react-date-pickers/time-clock/)\n *\n * API:\n *\n * - [TimeClock API](https://mui.com/x/api/date-pickers/time-clock/)\n */\nexport const TimeClock = /*#__PURE__*/React.forwardRef(function TimeClock(inProps, ref) {\n const adapter = usePickerAdapter();\n const props = useThemeProps({\n props: inProps,\n name: 'MuiTimeClock'\n });\n const {\n ampm = adapter.is12HourCycleInCurrentLocale(),\n ampmInClock = false,\n autoFocus,\n slots,\n slotProps,\n value: valueProp,\n defaultValue,\n referenceDate: referenceDateProp,\n disableIgnoringDatePartForTimeValidation = false,\n maxTime,\n minTime,\n disableFuture,\n disablePast,\n minutesStep = 1,\n shouldDisableTime,\n showViewSwitcher,\n onChange,\n view: inView,\n views = TIME_CLOCK_DEFAULT_VIEWS,\n openTo,\n onViewChange,\n focusedView,\n onFocusedViewChange,\n className,\n classes: classesProp,\n disabled,\n readOnly,\n timezone: timezoneProp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n value,\n handleValueChange,\n timezone\n } = useControlledValue({\n name: 'TimeClock',\n timezone: timezoneProp,\n value: valueProp,\n defaultValue,\n referenceDate: referenceDateProp,\n onChange,\n valueManager: singleItemValueManager\n });\n const valueOrReferenceDate = useClockReferenceDate({\n value,\n referenceDate: referenceDateProp,\n adapter,\n props,\n timezone\n });\n const translations = usePickerTranslations();\n const now = useNow(timezone);\n const selectedId = useId();\n const {\n ownerState\n } = usePickerPrivateContext();\n const {\n view,\n setView,\n previousView,\n nextView,\n setValueAndGoToNextView\n } = useViews({\n view: inView,\n views,\n openTo,\n onViewChange,\n onChange: handleValueChange,\n focusedView,\n onFocusedViewChange\n });\n const {\n meridiemMode,\n handleMeridiemChange\n } = useMeridiemMode(valueOrReferenceDate, ampm, setValueAndGoToNextView);\n const isTimeDisabled = React.useCallback((rawValue, viewType) => {\n const isAfter = createIsAfterIgnoreDatePart(disableIgnoringDatePartForTimeValidation, adapter);\n const shouldCheckPastEnd = viewType === 'hours' || viewType === 'minutes' && views.includes('seconds');\n const containsValidTime = ({\n start,\n end\n }) => {\n if (minTime && isAfter(minTime, end)) {\n return false;\n }\n if (maxTime && isAfter(start, maxTime)) {\n return false;\n }\n if (disableFuture && isAfter(start, now)) {\n return false;\n }\n if (disablePast && isAfter(now, shouldCheckPastEnd ? end : start)) {\n return false;\n }\n return true;\n };\n const isValidValue = (timeValue, step = 1) => {\n if (timeValue % step !== 0) {\n return false;\n }\n if (shouldDisableTime) {\n switch (viewType) {\n case 'hours':\n return !shouldDisableTime(adapter.setHours(valueOrReferenceDate, timeValue), 'hours');\n case 'minutes':\n return !shouldDisableTime(adapter.setMinutes(valueOrReferenceDate, timeValue), 'minutes');\n case 'seconds':\n return !shouldDisableTime(adapter.setSeconds(valueOrReferenceDate, timeValue), 'seconds');\n default:\n return false;\n }\n }\n return true;\n };\n switch (viewType) {\n case 'hours':\n {\n const valueWithMeridiem = convertValueToMeridiem(rawValue, meridiemMode, ampm);\n const dateWithNewHours = adapter.setHours(valueOrReferenceDate, valueWithMeridiem);\n if (adapter.getHours(dateWithNewHours) !== valueWithMeridiem) {\n return true;\n }\n const start = adapter.setSeconds(adapter.setMinutes(dateWithNewHours, 0), 0);\n const end = adapter.setSeconds(adapter.setMinutes(dateWithNewHours, 59), 59);\n return !containsValidTime({\n start,\n end\n }) || !isValidValue(valueWithMeridiem);\n }\n case 'minutes':\n {\n const dateWithNewMinutes = adapter.setMinutes(valueOrReferenceDate, rawValue);\n const start = adapter.setSeconds(dateWithNewMinutes, 0);\n const end = adapter.setSeconds(dateWithNewMinutes, 59);\n return !containsValidTime({\n start,\n end\n }) || !isValidValue(rawValue, minutesStep);\n }\n case 'seconds':\n {\n const dateWithNewSeconds = adapter.setSeconds(valueOrReferenceDate, rawValue);\n const start = dateWithNewSeconds;\n const end = dateWithNewSeconds;\n return !containsValidTime({\n start,\n end\n }) || !isValidValue(rawValue);\n }\n default:\n throw new Error('not supported');\n }\n }, [ampm, valueOrReferenceDate, disableIgnoringDatePartForTimeValidation, maxTime, meridiemMode, minTime, minutesStep, shouldDisableTime, adapter, disableFuture, disablePast, now, views]);\n const viewProps = React.useMemo(() => {\n switch (view) {\n case 'hours':\n {\n const handleHoursChange = (hourValue, isFinish) => {\n const valueWithMeridiem = convertValueToMeridiem(hourValue, meridiemMode, ampm);\n setValueAndGoToNextView(adapter.setHours(valueOrReferenceDate, valueWithMeridiem), isFinish, 'hours');\n };\n const viewValue = adapter.getHours(valueOrReferenceDate);\n let viewRange;\n if (ampm) {\n if (viewValue > 12) {\n viewRange = [12, 23];\n } else {\n viewRange = [0, 11];\n }\n } else {\n viewRange = [0, 23];\n }\n return {\n onChange: handleHoursChange,\n viewValue,\n children: getHourNumbers({\n value,\n adapter,\n ampm,\n onChange: handleHoursChange,\n getClockNumberText: translations.hoursClockNumberText,\n isDisabled: hourValue => disabled || isTimeDisabled(hourValue, 'hours'),\n selectedId\n }),\n viewRange\n };\n }\n case 'minutes':\n {\n const minutesValue = adapter.getMinutes(valueOrReferenceDate);\n const handleMinutesChange = (minuteValue, isFinish) => {\n setValueAndGoToNextView(adapter.setMinutes(valueOrReferenceDate, minuteValue), isFinish, 'minutes');\n };\n return {\n viewValue: minutesValue,\n onChange: handleMinutesChange,\n children: getMinutesNumbers({\n adapter,\n value: minutesValue,\n onChange: handleMinutesChange,\n getClockNumberText: translations.minutesClockNumberText,\n isDisabled: minuteValue => disabled || isTimeDisabled(minuteValue, 'minutes'),\n selectedId\n }),\n viewRange: [0, 59]\n };\n }\n case 'seconds':\n {\n const secondsValue = adapter.getSeconds(valueOrReferenceDate);\n const handleSecondsChange = (secondValue, isFinish) => {\n setValueAndGoToNextView(adapter.setSeconds(valueOrReferenceDate, secondValue), isFinish, 'seconds');\n };\n return {\n viewValue: secondsValue,\n onChange: handleSecondsChange,\n children: getMinutesNumbers({\n adapter,\n value: secondsValue,\n onChange: handleSecondsChange,\n getClockNumberText: translations.secondsClockNumberText,\n isDisabled: secondValue => disabled || isTimeDisabled(secondValue, 'seconds'),\n selectedId\n }),\n viewRange: [0, 59]\n };\n }\n default:\n throw new Error('You must provide the type for ClockView');\n }\n }, [view, adapter, value, ampm, translations.hoursClockNumberText, translations.minutesClockNumberText, translations.secondsClockNumberText, meridiemMode, setValueAndGoToNextView, valueOrReferenceDate, isTimeDisabled, selectedId, disabled]);\n const classes = useUtilityClasses(classesProp);\n return /*#__PURE__*/_jsxs(TimeClockRoot, _extends({\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n children: [/*#__PURE__*/_jsx(Clock, _extends({\n autoFocus: autoFocus ?? !!focusedView,\n ampmInClock: ampmInClock && views.includes('hours'),\n value: value,\n type: view,\n ampm: ampm,\n minutesStep: minutesStep,\n isTimeDisabled: isTimeDisabled,\n meridiemMode: meridiemMode,\n handleMeridiemChange: handleMeridiemChange,\n selectedId: selectedId,\n disabled: disabled,\n readOnly: readOnly\n }, viewProps)), showViewSwitcher && /*#__PURE__*/_jsx(TimeClockArrowSwitcher, {\n className: classes.arrowSwitcher,\n slots: slots,\n slotProps: slotProps,\n onGoToPrevious: () => setView(previousView),\n isPreviousDisabled: !previousView,\n previousLabel: translations.openPreviousView,\n onGoToNext: () => setView(nextView),\n isNextDisabled: !nextView,\n nextLabel: translations.openNextView,\n ownerState: ownerState\n })]\n }));\n});\nif (process.env.NODE_ENV !== \"production\") TimeClock.displayName = \"TimeClock\";\nprocess.env.NODE_ENV !== \"production\" ? TimeClock.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * 12h/24h view for hour selection clock.\n * @default adapter.is12HourCycleInCurrentLocale()\n */\n ampm: PropTypes.bool,\n /**\n * Display ampm controls under the clock (instead of in the toolbar).\n * @default false\n */\n ampmInClock: PropTypes.bool,\n /**\n * If `true`, the main element is focused during the first mount.\n * This main element is:\n * - the element chosen by the visible view if any (i.e: the selected day on the `day` view).\n * - the `input` element if there is a field rendered.\n */\n autoFocus: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n className: PropTypes.string,\n /**\n * The default selected value.\n * Used when the component is not controlled.\n */\n defaultValue: PropTypes.object,\n /**\n * If `true`, the component is disabled.\n * When disabled, the value cannot be changed and no interaction is possible.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, disable values after the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disableFuture: PropTypes.bool,\n /**\n * Do not ignore date part when validating min/max time.\n * @default false\n */\n disableIgnoringDatePartForTimeValidation: PropTypes.bool,\n /**\n * If `true`, disable values before the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disablePast: PropTypes.bool,\n /**\n * Controlled focused view.\n */\n focusedView: PropTypes.oneOf(['hours', 'minutes', 'seconds']),\n /**\n * Maximal selectable time.\n * The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.\n */\n maxTime: PropTypes.object,\n /**\n * Minimal selectable time.\n * The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.\n */\n minTime: PropTypes.object,\n /**\n * Step over minutes.\n * @default 1\n */\n minutesStep: PropTypes.number,\n /**\n * Callback fired when the value changes.\n * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.\n * @template TView The view type. Will be one of date or time views.\n * @param {TValue} value The new value.\n * @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete.\n * @param {TView | undefined} selectedView Indicates the view in which the selection has been made.\n */\n onChange: PropTypes.func,\n /**\n * Callback fired on focused view change.\n * @template TView Type of the view. It will vary based on the Picker type and the `views` it uses.\n * @param {TView} view The new view to focus or not.\n * @param {boolean} hasFocus `true` if the view should be focused.\n */\n onFocusedViewChange: PropTypes.func,\n /**\n * Callback fired on view change.\n * @template TView Type of the view. It will vary based on the Picker type and the `views` it uses.\n * @param {TView} view The new view.\n */\n onViewChange: PropTypes.func,\n /**\n * The default visible view.\n * Used when the component view is not controlled.\n * Must be a valid option from `views` list.\n */\n openTo: PropTypes.oneOf(['hours', 'minutes', 'seconds']),\n /**\n * If `true`, the component is read-only.\n * When read-only, the value cannot be changed but the user can interact with the interface.\n * @default false\n */\n readOnly: PropTypes.bool,\n /**\n * The date used to generate the new value when both `value` and `defaultValue` are empty.\n * @default The closest valid time using the validation props, except callbacks such as `shouldDisableTime`.\n */\n referenceDate: PropTypes.object,\n /**\n * Disable specific time.\n * @param {PickerValidDate} value The value to check.\n * @param {TimeView} view The clock type of the timeValue.\n * @returns {boolean} If `true` the time will be disabled.\n */\n shouldDisableTime: PropTypes.func,\n showViewSwitcher: PropTypes.bool,\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n * @default {}\n */\n slots: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Choose which timezone to use for the value.\n * Example: \"default\", \"system\", \"UTC\", \"America/New_York\".\n * If you pass values from other timezones to some props, they will be converted to this timezone before being used.\n * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.\n * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.\n */\n timezone: PropTypes.string,\n /**\n * The selected value.\n * Used when the component is controlled.\n */\n value: PropTypes.object,\n /**\n * The visible view.\n * Used when the component view is controlled.\n * Must be a valid option from `views` list.\n */\n view: PropTypes.oneOf(['hours', 'minutes', 'seconds']),\n /**\n * Available views.\n * @default ['hours', 'minutes']\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['hours', 'minutes', 'seconds']).isRequired)\n} : void 0;","import * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport useControlled from '@mui/utils/useControlled';\nimport { usePickerAdapter } from \"../../hooks/usePickerAdapter.js\";\n\n/**\n * Hooks controlling the value while making sure that:\n * - The value returned by `onChange` always have the timezone of `props.value` or `props.defaultValue` if defined\n * - The value rendered is always the one from `props.timezone` if defined\n */\nexport const useControlledValue = ({\n name,\n timezone: timezoneProp,\n value: valueProp,\n defaultValue,\n referenceDate,\n onChange: onChangeProp,\n valueManager\n}) => {\n const adapter = usePickerAdapter();\n const [valueWithInputTimezone, setValue] = useControlled({\n name,\n state: 'value',\n controlled: valueProp,\n default: defaultValue ?? valueManager.emptyValue\n });\n const inputTimezone = React.useMemo(() => valueManager.getTimezone(adapter, valueWithInputTimezone), [adapter, valueManager, valueWithInputTimezone]);\n const setInputTimezone = useEventCallback(newValue => {\n if (inputTimezone == null) {\n return newValue;\n }\n return valueManager.setTimezone(adapter, inputTimezone, newValue);\n });\n const timezoneToRender = React.useMemo(() => {\n if (timezoneProp) {\n return timezoneProp;\n }\n if (inputTimezone) {\n return inputTimezone;\n }\n if (referenceDate) {\n return adapter.getTimezone(Array.isArray(referenceDate) ? referenceDate[0] : referenceDate);\n }\n return 'default';\n }, [timezoneProp, inputTimezone, referenceDate, adapter]);\n const valueWithTimezoneToRender = React.useMemo(() => valueManager.setTimezone(adapter, timezoneToRender, valueWithInputTimezone), [valueManager, adapter, timezoneToRender, valueWithInputTimezone]);\n const handleValueChange = useEventCallback((newValue, ...otherParams) => {\n const newValueWithInputTimezone = setInputTimezone(newValue);\n setValue(newValueWithInputTimezone);\n onChangeProp?.(newValueWithInputTimezone, ...otherParams);\n });\n return {\n value: valueWithTimezoneToRender,\n handleValueChange,\n timezone: timezoneToRender\n };\n};","import * as React from 'react';\nimport { singleItemValueManager } from \"../utils/valueManagers.js\";\nimport { getTodayDate } from \"../utils/date-utils.js\";\nimport { SECTION_TYPE_GRANULARITY } from \"../utils/getDefaultReferenceDate.js\";\nexport const useClockReferenceDate = ({\n value,\n referenceDate: referenceDateProp,\n adapter,\n props,\n timezone\n}) => {\n const referenceDate = React.useMemo(() => singleItemValueManager.getInitialReferenceValue({\n value,\n adapter,\n props,\n referenceDate: referenceDateProp,\n granularity: SECTION_TYPE_GRANULARITY.day,\n timezone,\n getTodayDate: () => getTodayDate(adapter, timezone, 'date')\n }),\n // We want the `referenceDate` to update on prop and `timezone` change (https://github.com/mui/mui-x/issues/10804)\n [referenceDateProp, timezone] // eslint-disable-line react-hooks/exhaustive-deps\n );\n return value ?? referenceDate;\n};","import * as React from 'react';\nimport { useLocalizationContext, usePickerAdapter } from \"../../hooks/usePickerAdapter.js\";\nexport const useDefaultDates = () => useLocalizationContext().defaultDates;\nexport const useNow = timezone => {\n const adapter = usePickerAdapter();\n const now = React.useRef(undefined);\n if (now.current === undefined) {\n now.current = adapter.date(undefined, timezone);\n }\n return now.current;\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport useControlled from '@mui/utils/useControlled';\nimport { DEFAULT_STEP_NAVIGATION } from \"../utils/createStepNavigation.js\";\nlet warnedOnceNotValidView = false;\nexport function useViews({\n onChange,\n onViewChange,\n openTo,\n view: inView,\n views,\n autoFocus,\n focusedView: inFocusedView,\n onFocusedViewChange,\n getStepNavigation\n}) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnceNotValidView) {\n if (inView != null && !views.includes(inView)) {\n console.warn(`MUI X: \\`view=\"${inView}\"\\` is not a valid prop.`, `It must be an element of \\`views=[\"${views.join('\", \"')}\"]\\`.`);\n warnedOnceNotValidView = true;\n }\n if (inView == null && openTo != null && !views.includes(openTo)) {\n console.warn(`MUI X: \\`openTo=\"${openTo}\"\\` is not a valid prop.`, `It must be an element of \\`views=[\"${views.join('\", \"')}\"]\\`.`);\n warnedOnceNotValidView = true;\n }\n }\n }\n const previousOpenTo = React.useRef(openTo);\n const previousViews = React.useRef(views);\n const defaultView = React.useRef(views.includes(openTo) ? openTo : views[0]);\n const [view, setView] = useControlled({\n name: 'useViews',\n state: 'view',\n controlled: inView,\n default: defaultView.current\n });\n const defaultFocusedView = React.useRef(autoFocus ? view : null);\n const [focusedView, setFocusedView] = useControlled({\n name: 'useViews',\n state: 'focusedView',\n controlled: inFocusedView,\n default: defaultFocusedView.current\n });\n const stepNavigation = getStepNavigation ? getStepNavigation({\n setView,\n view,\n defaultView: defaultView.current,\n views\n }) : DEFAULT_STEP_NAVIGATION;\n React.useEffect(() => {\n // Update the current view when `openTo` or `views` props change\n if (previousOpenTo.current && previousOpenTo.current !== openTo || previousViews.current && previousViews.current.some(previousView => !views.includes(previousView))) {\n setView(views.includes(openTo) ? openTo : views[0]);\n previousViews.current = views;\n previousOpenTo.current = openTo;\n }\n }, [openTo, setView, view, views]);\n const viewIndex = views.indexOf(view);\n const previousView = views[viewIndex - 1] ?? null;\n const nextView = views[viewIndex + 1] ?? null;\n const handleFocusedViewChange = useEventCallback((viewToFocus, hasFocus) => {\n if (hasFocus) {\n // Focus event\n setFocusedView(viewToFocus);\n } else {\n // Blur event\n setFocusedView(prevFocusedView => viewToFocus === prevFocusedView ? null : prevFocusedView // If false the blur is due to view switching\n );\n }\n onFocusedViewChange?.(viewToFocus, hasFocus);\n });\n const handleChangeView = useEventCallback(newView => {\n // always keep the focused view in sync\n handleFocusedViewChange(newView, true);\n if (newView === view) {\n return;\n }\n setView(newView);\n if (onViewChange) {\n onViewChange(newView);\n }\n });\n const goToNextView = useEventCallback(() => {\n if (nextView) {\n handleChangeView(nextView);\n }\n });\n const setValueAndGoToNextView = useEventCallback((value, currentViewSelectionState, selectedView) => {\n const isSelectionFinishedOnCurrentView = currentViewSelectionState === 'finish';\n const hasMoreViews = selectedView ?\n // handles case like `DateTimePicker`, where a view might return a `finish` selection state\n // but when it's not the final view given all `views` -> overall selection state should be `partial`.\n views.indexOf(selectedView) < views.length - 1 : Boolean(nextView);\n const globalSelectionState = isSelectionFinishedOnCurrentView && hasMoreViews ? 'partial' : currentViewSelectionState;\n onChange(value, globalSelectionState, selectedView);\n\n // The selected view can be different from the active view,\n // This can happen if multiple views are displayed, like in `DesktopDateTimePicker` or `MultiSectionDigitalClock`.\n let currentView = null;\n if (selectedView != null && selectedView !== view) {\n currentView = selectedView;\n } else if (isSelectionFinishedOnCurrentView) {\n currentView = view;\n }\n if (currentView == null) {\n return;\n }\n const viewToNavigateTo = views[views.indexOf(currentView) + 1];\n if (viewToNavigateTo == null || !stepNavigation.areViewsInSameStep(currentView, viewToNavigateTo)) {\n return;\n }\n handleChangeView(viewToNavigateTo);\n });\n return _extends({}, stepNavigation, {\n view,\n setView: handleChangeView,\n focusedView,\n setFocusedView: handleFocusedViewChange,\n nextView,\n previousView,\n // Always return up-to-date default view instead of the initial one (i.e. defaultView.current)\n defaultView: views.includes(openTo) ? openTo : views[0],\n goToNextView,\n setValueAndGoToNextView\n });\n}","import * as React from 'react';\nimport { getMeridiem, convertToMeridiem } from \"../utils/time-utils.js\";\nimport { usePickerAdapter } from \"../../hooks/usePickerAdapter.js\";\nexport function useNextMonthDisabled(month, {\n disableFuture,\n maxDate,\n timezone\n}) {\n const adapter = usePickerAdapter();\n return React.useMemo(() => {\n const now = adapter.date(undefined, timezone);\n const lastEnabledMonth = adapter.startOfMonth(disableFuture && adapter.isBefore(now, maxDate) ? now : maxDate);\n return !adapter.isAfter(lastEnabledMonth, month);\n }, [disableFuture, maxDate, month, adapter, timezone]);\n}\nexport function usePreviousMonthDisabled(month, {\n disablePast,\n minDate,\n timezone\n}) {\n const adapter = usePickerAdapter();\n return React.useMemo(() => {\n const now = adapter.date(undefined, timezone);\n const firstEnabledMonth = adapter.startOfMonth(disablePast && adapter.isAfter(now, minDate) ? now : minDate);\n return !adapter.isBefore(firstEnabledMonth, month);\n }, [disablePast, minDate, month, adapter, timezone]);\n}\nexport function useMeridiemMode(date, ampm, onChange, selectionState) {\n const adapter = usePickerAdapter();\n const cleanDate = React.useMemo(() => !adapter.isValid(date) ? null : date, [adapter, date]);\n const meridiemMode = getMeridiem(cleanDate, adapter);\n const handleMeridiemChange = React.useCallback(mode => {\n const timeWithMeridiem = cleanDate == null ? null : convertToMeridiem(cleanDate, mode, Boolean(ampm), adapter);\n onChange(timeWithMeridiem, selectionState ?? 'partial');\n }, [ampm, cleanDate, onChange, selectionState, adapter]);\n return {\n meridiemMode,\n handleMeridiemChange\n };\n}","/**\n * TimeClock — Dash wrapper for MUI X TimeClock (@mui/x-date-pickers, Community)\n *\n * An inline time selector (no input / popper / modal). The user drags the clock\n * hand or clicks the numbers to pick hours, minutes, and optionally seconds.\n *\n * Dash boundary contract\n * ----------------------\n * dayjs objects cannot cross the Dash <-> Python boundary, so `value` and\n * `defaultValue` are exchanged as plain strings:\n * - Full wall-time ISO : \"2022-04-17T15:30:00\"\n * - Time-only : \"15:30\" or \"15:30:45\"\n * On every change the component pushes back `value` (full wall-time ISO string),\n * the current `view`, and a convenience `timeData` object — so a callback can use\n * the parsed parts without re-parsing the string.\n *\n * MUI components inside this wrapper follow the Mantine color scheme on ,\n * so the clock re-skins automatically in dark mode (same approach as TreeViewPro).\n */\nimport React, {useCallback, useEffect, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport dayjs from 'dayjs';\nimport {LocalizationProvider} from '@mui/x-date-pickers/LocalizationProvider';\nimport {AdapterDayjs} from '@mui/x-date-pickers/AdapterDayjs';\nimport {TimeClock as MuiTimeClock} from '@mui/x-date-pickers/TimeClock';\nimport {ThemeProvider, createTheme} from '@mui/material/styles';\n\n// --- Color scheme: watch ---------------\nconst readMantineScheme = () => {\n if (typeof document === 'undefined') return 'light';\n const v = document.documentElement.getAttribute('data-mantine-color-scheme');\n return v === 'dark' ? 'dark' : 'light';\n};\n\nconst useMantineColorScheme = () => {\n const [scheme, setScheme] = useState(readMantineScheme);\n useEffect(() => {\n if (typeof document === 'undefined') return undefined;\n const html = document.documentElement;\n const sync = () => setScheme(readMantineScheme());\n const obs = new MutationObserver(sync);\n obs.observe(html, {\n attributes: true,\n attributeFilter: ['data-mantine-color-scheme'],\n });\n sync();\n return () => obs.disconnect();\n }, []);\n return scheme;\n};\n\nconst lightTheme = createTheme({palette: {mode: 'light'}});\nconst darkTheme = createTheme({palette: {mode: 'dark'}});\n\n// --- String <-> dayjs at the Dash boundary ----------------------------------\nconst TIME_ONLY_RE = /^(\\d{1,2}):(\\d{2})(:(\\d{2}))?$/;\n\n/** Parse a Dash string value into a dayjs object (or null). */\nconst parseToDayjs = (val) => {\n if (val === null || val === undefined || val === '') return null;\n if (typeof val !== 'string') return null;\n const m = val.match(TIME_ONLY_RE);\n if (m) {\n // Time-only string: anchor it to today's date so the clock has a date part.\n const base = dayjs().startOf('day');\n const withTime = base\n .hour(parseInt(m[1], 10))\n .minute(parseInt(m[2], 10))\n .second(m[4] ? parseInt(m[4], 10) : 0);\n return withTime.isValid() ? withTime : null;\n }\n const d = dayjs(val);\n return d.isValid() ? d : null;\n};\n\n/**\n * TimeClock lets the user pick a time on an inline clock face (hours, minutes,\n * and optionally seconds) without any input, popper, or modal. Values are\n * exchanged with Dash as strings; on change it emits `value` (wall-time ISO),\n * the current `view`, and a parsed `timeData` convenience object.\n */\nconst TimeClock = (props) => {\n const {\n id,\n value,\n defaultValue,\n views,\n view,\n openTo,\n ampm,\n disabled,\n readOnly,\n autoFocus,\n minutesStep,\n minTime,\n maxTime,\n disableFuture,\n disablePast,\n disableIgnoringDatePartForTimeValidation,\n showViewSwitcher,\n className,\n sx,\n setProps,\n } = props;\n\n const scheme = useMantineColorScheme();\n const theme = scheme === 'dark' ? darkTheme : lightTheme;\n\n // --- Parse incoming string props to dayjs -------------------------------\n const dValue = useMemo(() => parseToDayjs(value), [value]);\n const dDefault = useMemo(() => parseToDayjs(defaultValue), [defaultValue]);\n const dMinTime = useMemo(() => parseToDayjs(minTime), [minTime]);\n const dMaxTime = useMemo(() => parseToDayjs(maxTime), [maxTime]);\n\n // --- Change handlers -> Dash outputs ------------------------------------\n const handleChange = useCallback(\n (newVal) => {\n if (!setProps) return;\n if (!newVal || typeof newVal.isValid !== 'function' || !newVal.isValid()) {\n setProps({\n value: null,\n timeData: {\n hours: null,\n minutes: null,\n seconds: null,\n formatted: null,\n event_timestamp: Date.now(),\n },\n });\n return;\n }\n setProps({\n value: newVal.format('YYYY-MM-DDTHH:mm:ss'),\n timeData: {\n hours: newVal.hour(),\n minutes: newVal.minute(),\n seconds: newVal.second(),\n formatted: newVal.format('HH:mm:ss'),\n event_timestamp: Date.now(),\n },\n });\n },\n [setProps]\n );\n\n const handleViewChange = useCallback(\n (newView) => {\n if (setProps) setProps({view: newView});\n },\n [setProps]\n );\n\n // --- Assemble the controlled/uncontrolled value -------------------------\n const clockProps = {};\n if (value !== undefined && value !== null) {\n clockProps.value = dValue; // controlled\n } else if (defaultValue !== undefined && defaultValue !== null) {\n clockProps.defaultValue = dDefault; // uncontrolled initial\n }\n if (view !== undefined && view !== null) clockProps.view = view;\n\n return (\n
\n \n \n \n \n \n
\n );\n};\n\nTimeClock.defaultProps = {\n views: ['hours', 'minutes'],\n disabled: false,\n readOnly: false,\n autoFocus: false,\n disableFuture: false,\n disablePast: false,\n disableIgnoringDatePartForTimeValidation: false,\n showViewSwitcher: false,\n};\n\nTimeClock.propTypes = {\n /** Dash component id */\n id: PropTypes.string,\n\n // --- Value (string <-> dayjs at the boundary) ---------------------------\n /**\n * Controlled value. Full wall-time ISO (\"2022-04-17T15:30:00\") or time-only\n * (\"15:30\" / \"15:30:45\"). Also an OUTPUT: updated on every change with a\n * full wall-time ISO string.\n */\n value: PropTypes.string,\n\n /** Uncontrolled initial value (same string formats as `value`). */\n defaultValue: PropTypes.string,\n\n // --- Views --------------------------------------------------------------\n /** Which views to render, in order. Default [\"hours\", \"minutes\"]. */\n views: PropTypes.arrayOf(PropTypes.oneOf(['hours', 'minutes', 'seconds'])),\n\n /** Controlled visible view. Also an OUTPUT — updated when the view changes. */\n view: PropTypes.oneOf(['hours', 'minutes', 'seconds']),\n\n /** Which view to open first (uncontrolled). */\n openTo: PropTypes.oneOf(['hours', 'minutes', 'seconds']),\n\n // --- Format -------------------------------------------------------------\n /** Force 12h (true) or 24h (false). Omit to use the locale default. */\n ampm: PropTypes.bool,\n\n // --- Form props ---------------------------------------------------------\n /** Disable the whole clock. */\n disabled: PropTypes.bool,\n\n /** Make the clock read-only (no editing). */\n readOnly: PropTypes.bool,\n\n /** Auto-focus the clock on mount. */\n autoFocus: PropTypes.bool,\n\n // --- Constraints --------------------------------------------------------\n /** Step (in minutes) between selectable minute values. */\n minutesStep: PropTypes.number,\n\n /** Minimum selectable time (ISO or time-only string). */\n minTime: PropTypes.string,\n\n /** Maximum selectable time (ISO or time-only string). */\n maxTime: PropTypes.string,\n\n /** Disable times in the future (relative to now). */\n disableFuture: PropTypes.bool,\n\n /** Disable times in the past (relative to now). */\n disablePast: PropTypes.bool,\n\n /**\n * When true, min/max time comparisons include the date part. When false\n * (default), only the time-of-day is compared.\n */\n disableIgnoringDatePartForTimeValidation: PropTypes.bool,\n\n /** Show the hours/minutes/seconds view-switch arrow buttons. */\n showViewSwitcher: PropTypes.bool,\n\n // --- Appearance ---------------------------------------------------------\n /** CSS class applied to the wrapping div. */\n className: PropTypes.string,\n\n /** MUI sx styling object applied to the TimeClock. */\n sx: PropTypes.object,\n\n // --- Output props -------------------------------------------------------\n /**\n * Parsed convenience output, updated on every change:\n * { hours, minutes, seconds, formatted (\"HH:mm:ss\"), event_timestamp }.\n */\n timeData: PropTypes.exact({\n hours: PropTypes.number,\n minutes: PropTypes.number,\n seconds: PropTypes.number,\n formatted: PropTypes.string,\n event_timestamp: PropTypes.number,\n }),\n\n /** Dash setProps callback */\n setProps: PropTypes.func,\n};\n\nexport default TimeClock;\n"],"names":["leafPrototypes","getProto","inProgress","dataWebpackPrefix","module","exports","e","LTS","LT","L","LL","LLL","LLLL","t","n","r","i","o","s","a","f","this","h","zone","offset","match","u","indexOf","concat","d","meridiem","c","A","afternoon","Q","month","S","milliseconds","SS","SSS","ss","m","mm","H","HH","hh","D","DD","Do","ordinal","day","replace","w","ww","M","MM","MMM","map","slice","Error","MMMM","Y","YY","year","YYYY","Z","ZZ","l","formats","toUpperCase","length","regex","parser","exec","call","hours","p","customParseFormat","parseTwoDigitYear","prototype","parse","date","utc","args","$u","$locale","Ls","$d","Date","minutes","seconds","week","getDate","getFullYear","v","getMonth","g","y","UTC","toDate","init","$L","locale","format","Array","apply","isValid","k","Symbol","for","Object","hasOwnProperty","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","key","ref","__self","__source","q","b","defaultProps","$$typeof","type","props","_owner","current","jsx","jsxs","window","React","shim","objectIs","is","x","useSyncExternalStore","useRef","useEffect","useMemo","useDebugValue","useSyncExternalStoreWithSelector","subscribe","getSnapshot","getServerSnapshot","selector","isEqual","instRef","inst","hasValue","value","memoizedSelector","nextSnapshot","hasMemo","memoizedSnapshot","currentSelection","memoizedSelection","nextSelection","maybeGetServerSnapshot","z","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","ForwardRef","Fragment","Lazy","Memo","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","reactIs","REACT_STATICS","childContextTypes","contextType","contextTypes","displayName","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","mixins","propTypes","KNOWN_STATICS","name","caller","callee","arguments","arity","MEMO_STATICS","compare","TYPE_STATICS","getStatics","component","render","defineProperty","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","keys","targetStatics","sourceStatics","descriptor","$","weekdays","split","months","String","join","utcOffset","Math","abs","floor","clone","add","ceil","ms","toLowerCase","_","O","$x","$offset","NaN","test","substring","$y","$M","$D","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","toString","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","getTime","weekStart","$set","min","daysInMonth","get","Number","round","subtract","invalidDate","monthsShort","weekdaysMin","weekdaysShort","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","forEach","extend","$i","isDayjs","en","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_CONSUMER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_CLIENT_REFERENCE","getModuleId","bind","weekYear","isoWeekYear","isoWeek","offsetName","isBetween","yearStart","weeks","useState","useLayoutEffect","checkIfSnapshotChanged","latestGetSnapshot","nextValue","error","document","createElement","_useState","forceUpdate","kSampleStepSize","float32ArraySupported","Float32Array","aA1","aA2","B","C","calcBezier","aT","getSlope","LinearEasing","mX1","mY1","mX2","mY2","sampleValues","aX","intervalStart","currentSample","kSplineTableSize","guessForT","initialSlope","aGuessT","currentSlope","newtonRaphsonIterate","aA","aB","currentX","currentT","binarySubdivide","getTForX","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","id","loaded","__webpack_modules__","getter","__esModule","obj","mode","then","ns","create","def","definition","enumerable","chunkId","Promise","all","reduce","promises","globalThis","Function","prop","url","done","push","script","needAttach","scripts","getElementsByTagName","getAttribute","charset","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","timeout","doneFns","parentNode","removeChild","fn","setTimeout","target","head","appendChild","toStringTag","nmd","paths","children","scriptUrl","importScripts","location","currentScript","tagName","getCurrentScript","doc_scripts","filter","async","text","textContent","jsonpScriptSrc","__jsonpScriptSrc__","isLocal","srcFragments","fileFragments","splice","installedChunks","j","installedChunkData","promise","resolve","reject","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","data","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","self","ponyfillGlobal","__MUI_LICENSE_INFO__","LicenseInfo","getLicenseInfo","getLicenseKey","setLicenseKey","assign","fastObjectShallowCompare","aLength","bLength","sendMuiXTelemetryEvent","licenseVerification","_keyStr","base64Decode","input","chr1","chr2","chr3","enc1","enc2","enc3","enc4","output","charAt","fromCharCode","sin","PI","LICENSE_STATUS","PLAN_SCOPES","LICENSE_MODELS","expiryReg","orderReg","PRO_PACKAGES_AVAILABLE_IN_INITIAL_PRO_PLAN","verifyLicense","releaseInfo","licenseKey","packageName","status","NotFound","hash","substr","encoded","words","unescape","encodeURI","charCodeAt","md5","Invalid","license","encodedLicense","includes","expiryTimestamp","orderId","parseInt","isNaN","err","version","licenseModel","planScope","planVersion","expiryDate","decodeLicenseVersion1","licenseInfo","token","el","orderNum","decodeLicenseVersion2","decodeLicense","console","pkgTimestamp","ExpiredVersion","acceptedScopes","isPlanScopeSufficient","Valid","NotAvailableInInitialProPlan","OutOfScope","isCodeSandbox","hostname","endsWith","showError","log","sharedLicenseStatuses","useLicenseVerifier","contextKey","licenseVerifier","plan","licenseStatus","fullPackageName","packageReleaseInfo","rootPackageName","showLicenseKeyPlanMismatchError","showMissingLicenseKeyError","ExpiredAnnualGrace","showExpiredAnnualGraceLicenseKeyError","meta","ExpiredAnnual","showExpiredAnnualLicenseKeyError","showExpiredPackageVersionError","getLicenseErrorMessage","MemoizedWatermark","style","position","pointerEvents","color","zIndex","width","textAlign","bottom","right","letterSpacing","fontSize","globalId","maybeReactUseId","useId","idOverride","reactId","defaultId","setDefaultId","useGlobalId","useStoreImplementation","reactMajor","store","a1","a2","a3","getSelection","state","Store","constructor","listeners","Set","updateTick","delete","setState","newState","currentTick","it","values","result","next","listener","update","changes","use","useChartAnimation","params","animation","skip","skipAnimation","disableAnimation","disableCalled","skipAnimationRequests","matchMedia","disableAnimationCleanup","handleMediaChange","matches","mql","addEventListener","removeEventListener","instance","useEffectAfterFirstRender","effect","deps","isFirstRender","getDefaultizedParams","getInitialState","DEFAULT_X_AXIS_KEY","DEFAULT_Y_AXIS_KEY","DEFAULT_MARGINS","top","left","NOT_FOUND","ensureIsArray","item","isArray","referenceEqualityCheck","lruMemoize","func","equalityCheckOrOptions","providedOptions","equalityCheck","maxSize","resultEqualityCheck","comparator","createCacheKeyComparator","resultsCount","cache","equals","entry","put","getEntries","clear","createSingletonCache","entries","cacheIndex","findIndex","unshift","pop","createLruCache","memoized","matchingEntry","find","clearCache","resetResultsCount","Ref","WeakRef","deref","createCacheNode","weakMapMemoize","options","fnNode","lastResult","cacheNode","arg","objectCache","WeakMap","objectNode","primitiveCache","Map","primitiveNode","terminatedNode","lastResultValue","createSelectorCreator","memoizeOrOptions","memoizeOptionsFromArgs","createSelectorCreatorOptions","memoize","memoizeOptions","createSelector2","createSelectorArgs","recomputations","dependencyRecomputations","directlyPassedOptions","resultFunc","errorMessage","TypeError","assertIsFunction","combinedOptions","argsMemoize","argsMemoizeOptions","devModeChecks","finalMemoizeOptions","finalArgsMemoizeOptions","dependencies","array","every","itemTypes","assertIsArrayOfFunctions","getDependencies","memoizedResultFunc","inputSelectorResults","inputSelectorArgs","collectInputSelectorResults","resetDependencyRecomputations","resetRecomputations","withTypes","createSelector","createStructuredSelector","inputSelectorsObject","selectorCreator","object","assertIsObject","inputSelectorKeys","structuredSelector","composition","index","reselectCreateSelector","other","va","vb","vc","vd","ve","vf","vg","createSelectorMemoizedWithOptions","inputs","nextCacheId","combiner","nSelectors","argsLength","max","cacheKey","__cacheKey__","selectors","reselectArgs","selectorArgs","createSelectorMemoized","selectorChartRawXAxis","cartesianAxis","selectorChartRawYAxis","selectorChartAxisSizes","yAxis","acc","axis","zoom","slider","enabled","size","xAxis","height","selectorChartDimensionsState","dimensions","selectorChartDrawingArea","margin","marginTop","marginRight","marginBottom","marginLeft","axisSizeLeft","axisSizeRight","axisSizeTop","axisSizeBottom","selectorChartSvgWidth","dimensionsState","selectorChartSvgHeight","selectorChartPropsWidth","propsWidth","selectorChartPropsHeight","propsHeight","defaultizeMargin","defaultMargin","useChartDimensions","svgRef","hasInSize","stateRef","displayError","initialCompute","computeRun","innerWidth","setInnerWidth","innerHeight","setInnerHeight","computeSize","mainEl","computedStyle","node","doc","ownerDocument","defaultView","ownerWindow","getComputedStyle","newHeight","parseFloat","newWidth","computedSize","elementToObserve","ResizeObserver","animationFrame","observer","requestAnimationFrame","observe","cancelAnimationFrame","unobserve","drawingArea","isXInside","isYInside","isPointInside","targetElement","closest","useChartExperimentalFeatures","experimentalFeatures","globalChartDefaultId","useChartId","providedChartId","chartId","rainbowSurgePaletteLight","rainbowSurgePaletteDark","rainbowSurgePalette","defaultizeSeries","series","colors","seriesConfig","seriesGroups","seriesData","seriesIndex","seriesWithDefaultValues","getSeriesWithDefaultValues","seriesOrder","identifier","serializer","identifierSerializer","useChartSeries","dataset","theme","defaultizedSeries","serializeIdentifier","EMPTY_ARRAY","ActiveGesturesRegistry","activeGestures","registerActiveGesture","element","gesture","has","unregisterActiveGesture","elementGestures","getActiveGestures","from","isGestureActive","destroy","unregisterElement","KeyboardManager","pressedKeys","initialize","handleKeyDown","handleKeyUp","clearKeys","areKeysPressed","navigator","platform","PointerManager","preventEventInterruption","pointers","gestureHandlers","root","getRootNode","composed","body","touchAction","passive","setupEventListeners","registerGestureHandler","handler","getPointers","handlePointerEvent","handleInterruptEvents","pointerType","preventDefault","cancelEvent","PointerEvent","bubbles","cancelable","firstPointer","defineProperties","clientX","clientY","pointerId","pointer","updatedPointer","notifyHandlers","createPointerData","pageX","pageY","timeStamp","isPrimary","pressure","srcEvent","GestureManager","gestureTemplates","elementGestureMap","activeGesturesRegistry","keyboardManager","pointerManager","gestures","addGestureTemplate","warn","setGestureOptions","gestureName","CustomEvent","detail","dispatchEvent","setGestureState","registerElement","gestureNames","gestureOptions","registerSingleGesture","gestureTemplate","gestureInstance","unregisterAllGestures","eventList","abort","animationcancel","animationend","animationiteration","animationstart","auxclick","beforeinput","beforetoggle","blur","cancel","canplay","canplaythrough","change","click","close","compositionend","compositionstart","compositionupdate","contextlost","contextmenu","contextrestored","copy","cuechange","cut","dblclick","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","ended","focus","focusin","focusout","formdata","gotpointercapture","invalid","keydown","keypress","keyup","load","loadeddata","loadedmetadata","loadstart","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","paste","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointermove","pointerout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","scrollend","securitypolicyviolation","seeked","seeking","select","selectionchange","selectstart","slotchange","stalled","submit","suspend","timeupdate","toggle","touchcancel","touchend","touchmove","touchstart","transitioncancel","transitionend","transitionrun","transitionstart","volumechange","waiting","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend","wheel","beforematch","pointerrawupdate","Gesture","customData","stopPropagation","preventIf","requiredKeys","pointerMode","pointerOptions","gestureRegistry","gesturesRegistry","changeOptionsEventName","handleOptionsChange","changeStateEventName","handleStateChange","updateOptions","getBaseConfig","getEffectiveConfig","baseConfig","pointerModeOverrides","updateState","stateChanges","getTargetElement","isActive","contains","ShadowRoot","composedPath","shouldPreventGesture","effectiveConfig","isPointerTypeAllowed","PointerGesture","unregisterHandler","originalTarget","super","minPointers","maxPointers","Infinity","isWithinPointerCount","config","getRelevantPointers","calculatedTarget","calculateCentroid","sum","MAIN_THRESHOLD","createEventName","phase","PanGesture","startPointers","startCentroid","lastCentroid","movementThresholdReached","totalDeltaX","totalDeltaY","activeDeltaX","activeDeltaY","lastDirection","vertical","horizontal","mainAxis","lastDeltas","direction","threshold","overrides","structuredClone","resetState","pointersArray","relevantPointers","oldCentroid","newCentroid","offsetX","offsetY","currentCentroid","distanceDeltaX","distanceDeltaY","distance","sqrt","moveDirection","previous","deltaX","deltaY","isDiagonal","angle","atan2","isDiagonalMovement","mainMovement","horizontalThreshold","verticalThreshold","getDirection","lastDeltaX","lastDeltaY","allowedDirections","verticalAllowed","horizontalAllowed","isDirectionAllowed","emitPanEvent","remainingPointers","removedPointerId","timeElapsed","velocityX","velocityY","velocity","customEventData","initialCentroid","centroid","eventName","domEvent","MoveGesture","lastPosition","handleElementEnter","handleElementLeave","currentPosition","emitMoveEvent","TapGesture","currentTapCount","lastTapTime","maxDistance","taps","cancelTap","fireTapEvent","tapCount","PressGesture","timerId","startTime","pressThresholdReached","duration","clearPressTimer","cancelPress","emitPressEvent","currentDuration","getDistance","pointA","pointB","calculateAverageDistance","totalDistance","pairCount","PinchGesture","startDistance","lastDistance","lastScale","lastTime","totalScale","deltaScale","emitPinchEvent","initialDistance","newDistance","currentDistance","distanceChange","scale","scaleChange","deltaTime","TurnWheelGesture","totalDeltaZ","sensitivity","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","initialDelta","invert","handleWheelEvent","deltaZ","emitWheelEvent","deltaMode","TapAndDragGesture","dragTimeoutId","tapMaxDistance","dragTimeout","dragThreshold","dragDirection","tapGesture","panGesture","tapHandler","dragStartHandler","dragMoveHandler","dragEndHandler","restoreTouchAction","setTouchAction","PressAndDragGesture","pressDuration","pressMaxDistance","pressGesture","pressHandler","useChartInteractionListener","gestureManagerRef","svg","gestureManager","addInteractionListener","interaction","callback","cleanup","updateZoomInteractionListeners","CHART_CORE_PLUGINS","_objectWithoutPropertiesLoose","_excluded","extractPluginParamsFromProps","_ref","plugins","paramsLookup","plugin","pluginParams","propName","ChartContext","UNINITIALIZED","useLazyRef","initArg","EMPTY","previousState","dispose","nextState","onMount","selectorChartSeriesState","selectorChartDefaultizedSeries","seriesState","selectorChartSeriesConfig","selectorChartDataset","selectorChartSeriesProcessed","processedSeries","group","seriesProcessor","applySeriesProcessors","selectorChartSeriesLayout","processingDetected","seriesLayout","processor","thisSeries","newValue","applySeriesLayout","ZOOM_SLIDER_MARGIN","ZOOM_SLIDER_PREVIEW_SIZE","DEFAULT_ZOOM_SLIDER_SIZE","DEFAULT_ZOOM_SLIDER_PREVIEW_SIZE","DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP","DEFAULT_PIE_CHART_MARGIN","defaultZoomOptions","minStart","maxEnd","step","minSpan","maxSpan","panning","filterMode","reverse","preview","showTooltip","defaultizeZoom","axisId","axisDirection","defaultizeXAxis","inAxes","offsets","none","parsedAxes","scaleType","axisConfig","dataKey","defaultPosition","defaultHeight","label","sharedConfig","defaultizeYAxis","defaultWidth","createScalarFormatter","tickNumber","zoomScale","context","domain","tickFormat","isBandScaleConfig","scaleConfig","isPointScaleConfig","ascending","descending","bisector","compare1","compare2","delta","lo","hi","mid","zero","center","ascendingBisect","bisectRight","initRange","range","interpolator","unknown","bisect","invertExtent","factory","parent","Color","darker","brighter","reI","reN","reP","reHex","reRgbInteger","RegExp","reRgbPercent","reRgbaInteger","reRgbaPercent","reHslPercent","reHslaPercent","named","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","color_formatHex","rgb","formatHex","color_formatRgb","formatRgb","trim","rgbn","Rgb","rgba","hsla","opacity","rgb_formatHex","hex","rgb_formatRgb","clampa","clampi","Hsl","hslConvert","clamph","clampt","hsl2rgb","m1","m2","basis","t1","v0","v1","v2","v3","t2","t3","channels","displayable","formatHex8","formatHsl","pow","clamp","nogamma","linear","rgbGamma","exponential","gamma","start","end","rgbSpline","spline","rgbBasis","genericArray","nb","na","setTime","reA","reB","source","am","bm","bs","bi","lastIndex","one","string","ArrayBuffer","isView","DataView","unit","identity","normalize","bimap","interpolate","d0","d1","r0","r1","polymap","transformer","transform","untransform","piecewise","rescale","clamper","rangeRound","continuous","e10","e5","e2","tickSpec","stop","count","power","log10","factor","i1","i2","inc","ticks","tickIncrement","tickStep","prefixExponent","re","formatSpecifier","specifier","FormatSpecifier","fill","align","sign","symbol","comma","precision","formatDecimalParts","toExponential","coefficient","exponent","toFixed","toLocaleString","toPrecision","formatRounded","formatPrefix","prefixes","linearish","precisionPrefix","precisionRound","precisionFixed","nice","prestep","i0","maxIter","sequential","t0","k10","x0","x1","grouping","thousands","currencyPrefix","currency","currencySuffix","decimal","numerals","formatNumerals","percent","minus","nan","newFormat","formatTypes","prefix","suffix","formatType","maybeSuffix","valuePrefix","valueSuffix","valueNegative","out","formatTrim","padding","InternMap","keyof","_intern","_key","intern_get","intern_set","intern_delete","implicit","getSequentialColorScale","thresholds","getOrdinalColorScale","unknownColor","getColorScale","getTickNumber","defaultTickNumber","tickMaxStep","tickMinStep","maxTicks","minTicks","defaultizedTickNumber","scaleTickNumberByRange","getDefaultTickNumber","dimension","interval","transformLog","transformExp","exp","transformLogn","transformExpn","pow10","isFinite","reflect","logs","pows","base","E","log2","logp","powp","transformPow","transformSqrt","transformSquare","durationSecond","durationMinute","durationHour","durationDay","durationWeek","durationYear","timeInterval","floori","offseti","field","millisecond","second","getUTCSeconds","timeMinute","utcMinute","setUTCSeconds","getUTCMinutes","timeHour","utcHour","setUTCMinutes","getUTCHours","timeDay","setHours","setDate","utcDay","setUTCHours","setUTCDate","getUTCDate","unixDay","timeWeekday","timeSunday","timeMonday","timeTuesday","timeWednesday","timeThursday","timeFriday","timeSaturday","utcWeekday","getUTCDay","utcSunday","utcMonday","utcTuesday","utcWednesday","utcThursday","utcFriday","utcSaturday","timeMonth","setMonth","utcMonth","setUTCMonth","getUTCMonth","getUTCFullYear","timeYear","setFullYear","utcYear","setUTCFullYear","ticker","hour","minute","tickIntervals","tickInterval","utcTicks","utcTickInterval","timeTicks","timeTickInterval","localDate","utcDate","newDate","timeFormat","utcFormat","pads","numberRe","percentRe","requoteRe","pad","requote","formatRe","names","formatLookup","parseWeekdayNumberSunday","parseWeekdayNumberMonday","parseWeekNumberSunday","U","parseWeekNumberISO","V","parseWeekNumberMonday","W","parseFullYear","parseYear","parseZone","parseQuarter","parseMonthNumber","parseDayOfMonth","parseDayOfYear","parseHour24","parseMinutes","parseSeconds","parseMilliseconds","parseMicroseconds","parseLiteralPercent","parseUnixTimestamp","parseUnixTimestampSeconds","formatDayOfMonth","formatHour24","formatHour12","formatDayOfYear","formatMilliseconds","formatMicroseconds","formatMonthNumber","formatMinutes","formatSeconds","formatWeekdayNumberMonday","formatWeekNumberSunday","dISO","formatWeekNumberISO","formatWeekdayNumberSunday","formatWeekNumberMonday","formatYear","formatYearISO","formatFullYear","formatFullYearISO","formatZone","formatUTCDayOfMonth","formatUTCHour24","formatUTCHour12","formatUTCDayOfYear","formatUTCMilliseconds","getUTCMilliseconds","formatUTCMicroseconds","formatUTCMonthNumber","formatUTCMinutes","formatUTCSeconds","formatUTCWeekdayNumberMonday","dow","formatUTCWeekNumberSunday","UTCdISO","formatUTCWeekNumberISO","formatUTCWeekdayNumberSunday","formatUTCWeekNumberMonday","formatUTCYear","formatUTCYearISO","formatUTCFullYear","formatUTCFullYearISO","formatUTCZone","formatLiteralPercent","formatUnixTimestamp","formatUnixTimestampSeconds","calendar","formatMillisecond","formatSecond","formatMinute","formatHour","formatDay","formatWeek","formatMonth","time","transformSymlog","log1p","transformSymexp","expm1","symlog","constant","scaleSymlog","originalTicks","negativeScale","linearScale","positiveScale","generateScales","negativeLogTickCount","linearTickCount","positiveLogTickCount","tick","finalTicks","linearTicks","at","positiveTicks","extent","negativeScaleDomain","negativeScaleExtent","negativeScaleTickCount","linearScaleDomain","linearScaleExtent","linearScaleTickCount","positiveScaleDomain","positiveScaleExtent","positiveScaleTickCount","negativeTickFormat","linearTickFormat","positiveTickFormat","getScale","locale_dateTime","dateTime","locale_date","locale_time","locale_periods","periods","locale_weekdays","days","locale_shortWeekdays","shortDays","locale_months","locale_shortMonths","shortMonths","periodRe","periodLookup","weekdayRe","weekdayLookup","shortWeekdayRe","shortWeekdayLookup","monthRe","monthLookup","shortMonthRe","shortMonthLookup","utcFormats","parses","parseSpecifier","newParse","X","utcParse","formatLocale","isDateData","createDateFormatter","timeScale","cartesianInstance","polarInstance","cartesianSeriesTypes","types","addType","getTypes","polarSeriesTypes","isCartesianSeriesType","seriesType","isCartesianSeries","isOrdinalScale","bandwidth","isBandScale","paddingOuter","computeAxisValue","scales","formattedSeries","allAxis","zoomMap","domains","axisIds","axisIdsTriggeringTooltip","defaultAxisId","tooltipAxesIds","chartType","tooltipAxes","axisTooltipGetter","getAxisTriggerTooltip","completeAxis","eachAxis","zoomRange","getRange","rawTickNumber","triggerTooltip","ignoreTooltip","scaleRange","desiredCategoryGapRatio","categoryGapRatio","ignoreGapRatios","shouldIgnoreGapRatios","barGapRatio","colorScale","colorMap","dateFormatter","valueFormatter","continuousAxis","isDefined","createDiscreteScaleGetAxisFilter","axisData","zoomStart","zoomEnd","maxIndex","minVal","maxVal","dataIndex","createContinuousScaleGetAxisFilter","val","createZoomLookup","axes","defaultizedZoom","selectorPreferStrictDomainInLineCharts","features","Boolean","preferStrictDomainInLineCharts","JSON","stringify","scaleBand","ordinalRange","isRound","paddingInner","adjustedStart","finalStart","finalBandwidth","arg0","arg1","scalePoint","originalCopy","copied","getNormalizedAxisScale","zoomScaleRange","rangeGap","zoomGap","axisExtremumCallback","axisIndex","getFilters","xExtremumGetter","yExtremumGetter","isDefaultAxis","getAxisExtrema","cartesianChartTypes","extrema","niceDomain","calculateInitialDomainAndTickNumber","minData","maxData","domainLimit","getDomainLimit","axisExtrema","getActualAxisExtrema","calculateFinalDomain","seriesId","line","xAxisId","getAxisDomainLimit","FlatQueue","ids","priority","pos","parentValue","last","halfLen","child","peek","peekValue","shrink","ARRAY_TYPES","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float64Array","Flatbush","byteOffset","byteLength","buffer","magic","versionAndType","ArrayType","nodeSize","numItems","ArrayBufferType","numNodes","_levelBounds","IndexArrayType","arrayTypeIndex","nodesByteSize","BYTES_PER_ELEMENT","_boxes","_indices","_pos","minX","minY","maxX","maxY","_queue","boxes","finish","hilbertValues","hilbert","sort","nodeIndex","nodeMinX","nodeMinY","nodeMaxX","nodeMaxY","search","filterFn","queue","results","upperBound","neighbors","maxResults","maxDistSq","sqDistFn","sqDist","outer","dist","dx","dy","arr","indices","pivot","swap","temp","selectorChartZoomState","selectorChartHasZoom","xAxes","yAxes","selectorChartZoomIsInteracting","isInteracting","selectorChartZoomMap","zoomData","zoomItemMap","zoomItem","createZoomMap","selectorChartAxisZoomData","selectorChartZoomOptionsLookup","selectorChartAxisZoomOptionsLookup","axisLookup","selectorDefaultXAxisTickNumber","selectorDefaultYAxisTickNumber","selectorChartXAxisWithDomains","ordinalTimeTicks","findLast","selectorChartYAxisWithDomains","selectorChartZoomAxisFilters","zoomOptions","xDomains","yDomains","hasFilter","filters","currentAxisId","seriesXAxisId","seriesYAxisId","createGetAxisFilters","selectorChartFilteredXDomains","filteredDomains","zoomOption","selectorChartFilteredYDomains","selectorChartNormalizedXScales","selectorChartNormalizedYScales","selectorChartXScales","normalizedScales","zoomedRange","selectorChartYScales","selectorChartXAxis","selectorChartYAxis","selectorChartAxis","selectorChartRawAxis","selectorChartDefaultXAxisId","selectorChartDefaultYAxisId","EMPTY_MAP","selectorChartSeriesEmptyFlatbushMap","selectorChartSeriesFlatbushMap","allSeries","xAxesScaleMap","yAxesScaleMap","defaultXAxisId","defaultYAxisId","validSeries","scatter","flatbushMap","yAxisId","flatbush","originalXScale","originalYScale","datum","getAsANumber","getAxisIndex","pointerValue","valueAsNumber","closestIndex","pointValue","getAxisValue","invertedValue","getSVGPoint","pt","createSVGPoint","matrixTransform","getScreenCTM","inverse","selectInteraction","selectorChartsInteractionIsInitialized","selectorChartsInteractionPointer","selectorChartsInteractionPointerX","selectorChartsInteractionPointerY","selectorChartsLastInteraction","lastUpdate","isDeepEqual","entriesA","entryA","flags","indexGetter","selectChartsInteractionAxisIndex","selectorChartsInteractionXAxisIndex","selectorChartsInteractionYAxisIndex","selectorChartAxisInteraction","valueGetter","indexes","selectorChartsInteractionXAxisValue","xIndex","selectorChartsInteractionYAxisValue","yIndex","selectorChartsInteractionTooltipXAxes","selectorChartsInteractionTooltipYAxes","selectorChartsInteractionAxisTooltip","xTooltip","yTooltip","checkHasInteractionPlugin","setPointerCoordinate","AXIS_CLICK_SERIES_TYPES","useChartCartesianAxis","onHighlightedAxisChange","isInteractionEnabled","xAxisWithScale","xAxisIds","yAxisWithScale","yAxisIds","highlightedAxis","usedXAxis","usedYAxis","useStoreEffect","prevAxisInteraction","nextAxisInteraction","itemIndex","hasInteractionPlugin","disableAxisListener","moveEndHandler","pan","cleanInteraction","panEndHandler","move","pressEndHandler","gestureHandler","srvEvent","svgPoint","buttons","hasPointerCapture","releasePointerCapture","moveHandler","panHandler","onAxisClick","axisClickHandler","isXAxis","USED_AXIS_ID","axisValue","seriesValues","seriesTypeConfig","seriesItem","providedXAxisId","providedYAxisId","axisKey","defaultizedXAxis","defaultizedYAxis","controlledCartesianAxisHighlight","useChartTooltip","removeTooltipItem","itemToRemove","prevItem","tooltip","setTooltipItem","newItem","useChartInteraction","setLastUpdateSource","coordinate","addDefaultId","processColorMap","getZAxisState","zAxis","zAxisLookup","defaultizedId","useChartZAxis","useChartHighlight","highlightedItem","highlight","clearHighlight","onHighlightChange","prevHighlight","isControlled","setHighlight","findMinMax","createResult","getBaseExtremum","getValueExtremum","stackedData","seriesMin","seriesMax","seriesAcc","order","s0","s1","stackValue","stackSeries","stack","oz","sz","peaks","peak","vi","vj","sums","StackOrder","appearance","insideOut","tops","bottoms","StackOffset","expand","diverging","seriesCount","numericOrder","pointCount","pointIndex","positiveSum","negativeSum","currentSeries","dataPoint","difference","silhouette","wiggle","s2","si","sij0","s3","sk","getStackingGroups","defaultStrategy","stackingGroups","stackIndex","stackOrder","stackOffset","stackingOrder","stackingOffset","barValueFormatter","getLabel","getSeriesColorFn","colorGetter","verticalLayout","layout","bandColorScale","valueColorScale","bandValues","getSeriesColor","getNonEmptySeriesArray","availableSeriesTypes","flatMap","seriesOfType","getPreviousNonEmptySeries","nonEmptySeries","currentSeriesIndex","getMaxSeriesLength","maxLengths","getNextNonEmptySeries","seriesHasData","createGetNextIndexFocusedItem","compatibleSeriesTypes","currentItem","nextSeries","maxLength","createGetPreviousIndexFocusedItem","previousSeries","createGetNextSeriesFocusedItem","createGetPreviousSeriesFocusedItem","outSeriesTypes","getBandSize","bandWidth","groupCount","gapRatio","barWidth","getBarDimensions","xAxisConfig","yAxisConfig","numberOfGroups","groupIndex","baseScaleConfig","barOffset","xScale","yScale","baseValue","seriesValue","valueCoordinates","minValueCoord","maxValueCoord","barSize","minBarSize","startCoordinate","invertStartCoordinate","shouldInvertStartCoordinate","identifierSerializerSeriesIdDataIndex","barSeriesConfig","d3Dataset","completedSeries","stackingGroup","stackedSeries","labelMarkType","colorProcessor","legendGetter","formattedLabel","markType","tooltipGetter","getColor","formattedValue","tooltipItemPositionGetter","axesConfig","placement","itemSeries","bar","keyboardFocusHandler","scatterSeriesConfig","fromEntries","datasetKeys","missingKeys","markerSize","zColorScale","yColorScale","xColorScale","xValue","yValue","hasOwn","lineSeriesConfig","area","isArea","seriesExtremums","getValues","stackedValue","getSeriesExtremums","baseline","cos","epsilon","pi","halfPi","tau","asin","deg2rad","defaultRad","getPercentageValue","refValue","percentage","getPieCoordinates","drawing","cx","cxParam","cy","cyParam","availableRadius","defaultSeriesConfig","pie","arcs","sortValues","startAngle","endAngle","padAngle","a0","da","pa","paddingAngle","getSortingComparator","sortingValues","piePoint","seriesLayoutRecord","innerRadius","outerRadius","arcLabelRadius","inner","radius","available","itemId","point","dataItem","points","y0","y1","defaultPlugins","ChartProvider","contextValue","inPlugins","publicAPI","inputApiRef","fallbackPublicApiRef","initializeInputApiRef","useChartApiInitialization","apiRef","innerChartRootRef","innerSvgRef","storeRef","initialState","pluginResponse","chartRootRef","useCharts","Provider","ChartsSlotsContext","useChartsSlots","ChartsSlotsProvider","slots","slotProps","defaultSlots","resolveProps","defaultSlotProps","slotKey","slotPropName","getThemeProps","components","isPlainObject","iterator","deepClone","createBreakpoints","breakpoints","xs","sm","md","lg","xl","sortedValues","breakpointsAsArray","breakpoint1","breakpoint2","sortBreakpointsValues","up","down","between","endIndex","only","not","keyIndex","sortContainerQueries","css","containerQueries","sorted","startsWith","borderRadius","defaultBreakpoints","defaultContainerQueries","containerName","handleBreakpoints","propValue","styleFromPropValue","themeBreakpoints","breakpoint","breakpointKeys","isCqShorthand","containerKey","shorthand","containerQuery","getContainerQuery","cssKey","removeUnusedBreakpoints","breakpointOutput","formatMuiErrorMessage","code","URL","searchParams","append","getPath","path","checkVars","vars","getStyleValue","themeMapping","propValueFinal","userValue","cssProperty","themeKey","filterProps","properties","directions","aliases","marginX","marginY","paddingX","paddingY","getCssProperties","property","dir","marginKeys","paddingKeys","spacingKeys","createUnaryUnit","defaultValue","themeSpacing","transformed","createUnarySpacing","cssProperties","getStyleFromPropValue","resolveCssProperty","spacing","createSpacing","spacingInput","mui","argsInput","argument","styles","handlers","borderTransform","createBorderStyle","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outline","outlineColor","gap","columnGap","rowGap","paletteTransform","sizingTransform","maxWidth","minWidth","maxHeight","minHeight","defaultSxConfig","bgcolor","backgroundColor","pr","pb","pl","px","py","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd","mt","mr","mb","ml","mx","my","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd","displayPrint","display","overflow","textOverflow","visibility","whiteSpace","flexBasis","flexDirection","flexWrap","justifyContent","alignItems","alignContent","flex","flexGrow","flexShrink","alignSelf","justifyItems","justifySelf","gridColumn","gridRow","gridAutoFlow","gridAutoColumns","gridAutoRows","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","gridArea","boxShadow","boxSizing","font","fontFamily","fontStyle","fontWeight","textTransform","lineHeight","typography","styleFunctionSx","getThemeValue","sx","nested","unstable_sxConfig","traverse","sxInput","sxObject","emptyBreakpoints","breakpointsInput","breakpointsInOrder","createEmptyBreakpointObject","breakpointsKeys","styleKey","maybeFn","callIfFn","breakpointsValues","objects","allKeys","union","objectsHaveSameKeys","modularCssLayers","unstable_createStyleFunctionSx","applyStyles","colorSchemes","getColorSchemeSelector","palette","paletteInput","shape","shapeInput","muiTheme","themeInput","toContainerQuery","mediaQuery","attachCq","cssContainerQueries","unstable_sx","StyleSheet","_this","_insertTag","tag","before","tags","insertionPoint","nextSibling","prepend","container","firstChild","insertBefore","isSpeedy","speedy","ctr","nonce","_proto","hydrate","nodes","insert","rule","createTextNode","createStyleElement","sheet","styleSheets","ownerNode","sheetForTag","insertRule","cssRules","flush","_tag$parentNode","pattern","replacement","indexof","begin","column","character","characters","return","caret","alloc","dealloc","delimit","delimiter","whitespace","escaping","commenter","COMMENT","compile","rules","rulesets","pseudo","declarations","atrule","variable","scanning","ampersand","reference","comment","declaration","ruleset","post","identifierWithPointTracking","fixedElements","compat","isImplicitRule","parsed","toRules","getRules","parentRules","removeLabel","defaultStylisPlugins","ssrStyles","querySelectorAll","_insert","stylisPlugins","inserted","nodesToHydrate","attrib","currentSheet","collection","finalizingPlugins","serialized","shouldCache","stylis","registered","registeredStyles","classNames","rawClassName","className","isStringTag","unitlessKeys","animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flexPositive","flexNegative","flexOrder","gridRowEnd","gridRowSpan","gridRowStart","gridColumnEnd","gridColumnSpan","gridColumnStart","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","orphans","tabSize","widows","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","hyphenateRegex","animationRegex","isCustomProperty","isProcessableValue","processStyleName","styleName","processStyleValue","p1","p2","cursor","handleInterpolation","mergedProps","interpolation","componentSelector","__emotion_styles","keyframes","anim","serializedStyles","asString","interpolated","_i","createStringFromObject","previousCursor","cached","labelPattern","stringMode","strings","raw","identifierName","str","len","useInsertionEffect","useInsertionEffectWithLayoutFallback","EmotionCacheContext","HTMLElement","forwardRef","useContext","typePropName","Insertion","Emotion$1","cssProp","WrappedComponent","newProps","_key2","defaultTheme","contextTheme","systemDefaultTheme","useThemeWithoutDefault","clampWrapper","decomposeColor","hexToRgb","marker","colorSpace","shift","private_safeColorChannel","warning","decomposedColor","idx","colorChannel","recomposeColor","hslToRgb","getLuminance","alpha","private_safeAlpha","darken","private_safeDarken","lighten","private_safeLighten","private_safeEmphasize","emphasize","A100","A200","A400","A700","getLight","primary","secondary","disabled","divider","background","paper","default","action","active","hover","hoverOpacity","selected","selectedOpacity","disabledBackground","disabledOpacity","focusOpacity","activatedOpacity","light","getDark","icon","dark","addLightOrDark","intent","shade","tonalOffset","tonalOffsetLight","tonalOffsetDark","main","createPalette","contrastThreshold","getDefaultPrimary","getDefaultSecondary","getDefaultError","info","getDefaultInfo","success","getDefaultSuccess","getDefaultWarning","getContrastText","contrastText","foreground","lumA","lumB","getContrastRatio","augmentColor","mainShade","lightShade","darkShade","modeHydrated","common","createGetCssVar","appendVar","fallbacks","prepareTypographyVars","fontVariant","fontStretch","assignNestedKeys","arrayKeys","cssVarsParser","shouldSkipGeneratingVar","varsWithDefaults","shouldSkipPaths","cssVar","resolvedValue","getCssValue","recurse","parentKeys","caseAllCaps","defaultFontFamily","createTypography","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem","pxToRem2","coef","buildVariant","casing","variants","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","button","caption","overline","inherit","createShadow","easing","easeInOut","easeOut","easeIn","sharp","shortest","shorter","short","standard","complex","enteringScreen","leavingScreen","formatMs","getAutoHeightDuration","createTransitions","inputTransitions","mergedEasing","mergedDuration","durationOption","easingOption","delay","animatedProp","mobileStepper","fab","speedDial","appBar","drawer","modal","snackbar","isSerializable","stringifyTheme","baseTheme","serializableTheme","serializeTheme","mixinsInput","transitions","transitionsInput","typographyInput","generateThemeVars","systemTheme","toolbar","shadows","toRuntimeSource","getOverlayAlpha","elevation","alphaValue","defaultDarkOverlays","overlay","getOpacity","inputPlaceholder","inputUnderline","switchTrackDisabled","switchTrack","getOverlays","colorScheme","rootSelector","colorSchemeSelector","defaultColorScheme","excludedVariables","cssVarPrefix","setColor","toRgb","setColorChannel","silent","attachColorScheme","scheme","restTheme","overlays","rest","createColorScheme","createThemeWithVars","colorSchemesInput","defaultColorSchemeInput","disableCssColorScheme","firstColorScheme","getCssVar","defaultSchemeInput","builtInLight","builtInDark","customColorSchemes","defaultScheme","setCssVarColor","tokens","colorToken","Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","snackbarContentBackground","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip","parserConfig","getSelector","generateStyleSheets","defaultGetSelector","otherTheme","rootVars","rootCss","rootVarsWithDefaults","themeVars","colorSchemesMap","otherColorSchemes","cssObject","schemeVars","stylesheets","insertStyleSheet","defaultSchemeVal","cssColorSheme","finalCss","generateSpacing","createGetColorSchemeSelector","cssVariables","initialColorSchemes","initialDefaultColorScheme","paletteOptions","themeId","imageMimeTypes","enUSLocaleText","loading","noData","zoomIn","zoomOut","toolbarExport","toolbarExportPrint","toolbarExportImage","mimeType","chartTypeBar","chartTypeColumn","chartTypeLine","chartTypeArea","chartTypePie","chartPaletteLabel","chartPaletteNameRainbowSurge","chartPaletteNameBlueberryTwilight","chartPaletteNameMangoFusion","chartPaletteNameCheerfulFiesta","chartPaletteNameStrawberrySky","chartPaletteNameBlue","chartPaletteNameGreen","chartPaletteNamePurple","chartPaletteNameRed","chartPaletteNameOrange","chartPaletteNameYellow","chartPaletteNameCyan","chartPaletteNamePink","chartConfigurationSectionChart","chartConfigurationSectionColumns","chartConfigurationSectionBars","chartConfigurationSectionAxes","chartConfigurationGrid","chartConfigurationBorderRadius","chartConfigurationCategoryGapRatio","chartConfigurationBarGapRatio","chartConfigurationStacked","chartConfigurationShowToolbar","chartConfigurationSkipAnimation","chartConfigurationInnerRadius","chartConfigurationOuterRadius","chartConfigurationColors","chartConfigurationHideLegend","chartConfigurationShowMark","chartConfigurationHeight","chartConfigurationWidth","chartConfigurationSeriesGap","chartConfigurationTickPlacement","chartConfigurationTickLabelPlacement","chartConfigurationCategoriesAxisLabel","chartConfigurationSeriesAxisLabel","chartConfigurationXAxisPosition","chartConfigurationYAxisPosition","chartConfigurationSeriesAxisReverse","chartConfigurationTooltipPlacement","chartConfigurationTooltipTrigger","chartConfigurationLegendPosition","chartConfigurationLegendDirection","chartConfigurationBarLabels","chartConfigurationColumnLabels","chartConfigurationInterpolation","chartConfigurationSectionTooltip","chartConfigurationSectionLegend","chartConfigurationSectionLines","chartConfigurationSectionAreas","chartConfigurationSectionArcs","chartConfigurationPaddingAngle","chartConfigurationCornerRadius","chartConfigurationArcLabels","chartConfigurationStartAngle","chartConfigurationEndAngle","chartConfigurationPieTooltipTrigger","chartConfigurationPieLegendPosition","chartConfigurationPieLegendDirection","chartConfigurationOptionNone","chartConfigurationOptionValue","chartConfigurationOptionAuto","chartConfigurationOptionTop","chartConfigurationOptionTopLeft","chartConfigurationOptionTopRight","chartConfigurationOptionBottom","chartConfigurationOptionBottomLeft","chartConfigurationOptionBottomRight","chartConfigurationOptionLeft","chartConfigurationOptionRight","chartConfigurationOptionAxis","chartConfigurationOptionItem","chartConfigurationOptionHorizontal","chartConfigurationOptionVertical","chartConfigurationOptionBoth","chartConfigurationOptionStart","chartConfigurationOptionMiddle","chartConfigurationOptionEnd","chartConfigurationOptionExtremities","chartConfigurationOptionTick","chartConfigurationOptionMonotoneX","chartConfigurationOptionMonotoneY","chartConfigurationOptionCatmullRom","chartConfigurationOptionLinear","chartConfigurationOptionNatural","chartConfigurationOptionStep","chartConfigurationOptionStepBefore","chartConfigurationOptionStepAfter","chartConfigurationOptionBumpX","chartConfigurationOptionBumpY","DEFAULT_LOCALE","ChartsLocalizationContext","ChartsLocalizationProvider","inProps","localeText","inLocaleText","parentLocaleText","themeLocaleText","Timeout","currentId","disposeEffect","useTimeout","composeClasses","getUtilityClass","classes","slotName","slot","RtlContext","useRtl","isFocusVisible","getReactElementRef","reactPropsRegex","testOmitPropsOnStringTag","testOmitPropsOnComponent","getDefaultShouldForwardProp","composeShouldForwardProps","isReal","shouldForwardProp","optionsShouldForwardProp","__emotion_forwardProp","styled","createStyled","targetClassName","__emotion_real","baseTag","__emotion_base","defaultShouldForwardProp","shouldUseAs","templateStringsArr","Styled","FinalTag","as","classInterpolations","finalShouldForwardProp","withComponent","nextTag","nextOptions","wrapper","internal_serializeStyles","preprocessStyles","isProcessed","variant","shallowLayer","layerName","defaultOverridesResolver","_props","processStyle","resolvedStyle","subStyle","rootStyle","otherStyles","processStyleVariants","mergedState","variantLoop","ownerState","lowercaseFirstLetter","rootShouldForwardProp","slotShouldForwardProp","styleAttachTheme","attachTheme","inputOptions","componentName","componentSlot","skipVariantsResolver","inputSkipVariantsResolver","skipSx","inputSkipSx","overridesResolver","shouldForwardPropOption","defaultStyledResolver","generateStyledLabel","transformStyle","muiStyledResolver","expressionsInput","expressionsHead","expressionsBody","expressionsTail","styleOverrides","resolvedStyleOverrides","themeVariants","inputStrings","placeholdersHead","placeholdersTail","outputStrings","expressions","Component","muiName","withConfig","styleFn","lastValue","lastTheme","PropsContext","_setPrototypeOf","setPrototypeOf","__proto__","_inheritsLoose","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","Transition","_React$Component","initialStatus","appear","isMounting","enter","appearStatus","in","unmountOnExit","mountOnEnter","nextCallback","prevState","componentDidMount","updateStatus","componentDidUpdate","prevProps","nextStatus","componentWillUnmount","cancelNextCallback","getTimeouts","exit","mounting","nodeRef","scrollTop","forceReflow","performEnter","performExit","_this2","appearing","_ref2","maybeNode","maybeAppearing","timeouts","enterTimeout","onEnter","safeSetState","onEntering","onTransitionEnd","onEntered","_this3","onExit","onExiting","onExited","setNextCallback","_this4","doesNotHaveTimeoutOrListener","addEndListener","_ref3","maybeNextCallback","_this$props","childProps","TransitionGroupContext","reflow","getTransitionProps","transitionDuration","transitionTimingFunction","transitionDelay","useForkRef","refs","cleanupRef","refEffect","cleanups","refCallback","refCleanup","entering","entered","isWebKit154","userAgent","Grow","inProp","TransitionComponent","timer","autoTimeout","handleRef","normalizedTransitionCallback","maybeIsAppearing","handleEntering","handleEnter","isAppearing","clientHeight","transition","handleEntered","handleExiting","handleExit","handleExited","restChildProps","muiSupportAuto","getWindow","isHTMLElement","isShadowRoot","getUAString","uaData","userAgentData","brands","brand","isLayoutViewport","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","offsetWidth","offsetHeight","visualViewport","addVisualOffsets","offsetLeft","offsetTop","getWindowScroll","win","scrollLeft","pageXOffset","pageYOffset","getNodeName","nodeName","getDocumentElement","documentElement","getWindowScrollBarX","isScrollParent","_getComputedStyle","overflowX","overflowY","getCompositeRect","elementOrVirtualElement","offsetParent","isFixed","isOffsetParentAnElement","offsetParentIsScaled","rect","isElementScaled","getNodeScroll","clientLeft","clientTop","getLayoutRect","getParentNode","assignedSlot","host","getScrollParent","listScrollParents","list","_element$ownerDocumen","scrollParent","isBody","updatedList","isTableElement","getTrueOffsetParent","getOffsetParent","isFirefox","currentNode","perspective","contain","willChange","getContainingBlock","auto","basePlacements","viewport","popper","variationPlacements","modifierPhases","modifiers","visited","modifier","requires","requiresIfExists","dep","depModifier","DEFAULT_OPTIONS","strategy","areValidElements","_len","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","pending","orderedModifiers","modifiersData","elements","attributes","effectCleanupFns","isDestroyed","setOptions","setOptionsAction","cleanupModifierEffects","scrollParents","contextElement","merged","orderModifiers","existing","_ref$options","cleanupFn","_state$elements","rects","_state$orderedModifie","_state$orderedModifie2","_options","onFirstUpdate","getBasePlacement","getVariation","getMainAxisFromPlacement","computeOffsets","basePlacement","variation","commonX","commonY","unsetSides","mapToStyles","_Object$assign2","popperRect","gpuAcceleration","adaptive","roundOffsets","_offsets$x","_offsets$y","hasX","hasY","sideX","sideY","heightProp","widthProp","_Object$assign","commonStyles","_ref4","dpr","devicePixelRatio","roundOffsetsByDPR","removeAttribute","initialStyles","arrow","attribute","getOppositePlacement","matched","getOppositeVariationPlacement","rootNode","isSameNode","rectToClientRect","getClientRectFromMixedType","clippingParent","html","clientWidth","layoutViewport","getViewportRect","getInnerBoundingClientRect","winScroll","scrollWidth","scrollHeight","getDocumentRect","mergePaddingObject","paddingObject","expandToHashMap","hashMap","detectOverflow","_options$placement","_options$strategy","_options$boundary","boundary","_options$rootBoundary","rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","mainClippingParents","clippingParents","clipperElement","getClippingParents","firstClippingParent","clippingRect","accRect","getClippingRect","referenceClientRect","popperOffsets","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","flipVariations","allowedAutoPlacements","preferredPlacement","oppositePlacement","getExpandedFallbackPlacements","placements","_options$allowedAutoP","allowedPlacements","overflows","computeAutoPlacement","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","check","_loop","fittingPlacement","within","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowElement","arrowRect","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","arrowOffsetParent","clientOffset","offsetModifierValue","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","withinMaxClamp","_state$modifiersData$","toPaddingObject","minProp","maxProp","endDiff","startDiff","clientSize","centerToReference","axisProp","centerOffset","_options$element","querySelector","getSideOffsets","preventedOffsets","isAnySideFullyClipped","side","_options$scroll","_options$resize","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","_options$offset","invertDistance","skidding","distanceAndSkiddingToXY","_data$state$placement","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","elementType","otherProps","excludeKeys","parameters","getSlotProps","additionalProps","externalSlotProps","externalForwardedProps","joinedClasses","mergedStyle","internalRef","eventHandlers","componentsPropsWithoutEventHandlers","otherPropsWithoutEventHandlers","internalSlotProps","componentProps","slotState","skipResolvingSlotProps","resolvedComponentsProps","setRef","forwardedRef","disablePortal","mountNode","setMountNode","getContainer","defaultGenerator","generate","configure","generator","createClassNameGenerator","globalStateClasses","checked","completed","expanded","focused","focusVisible","open","readOnly","required","globalStatePrefix","globalStateClass","generateUtilityClasses","getPopperUtilityClass","resolveAnchorEl","anchorEl","defaultPopperOptions","PopperTooltip","initialPlacement","popperOptions","popperRef","popperRefProp","TransitionProps","ownerStateProp","tooltipRef","ownRef","handlePopperRef","handlePopperRefRef","rtlPlacement","flipPlacement","setPlacement","resolvedAnchorElement","setResolvedAnchorElement","popperModifiers","useUtilityClasses","Root","rootProps","role","PopperRoot","containerProp","keepMounted","exited","setExited","resolvedAnchorEl","nodeType","transitionProps","isRtl","componentsProps","RootComponent","useControlled","controlled","defaultProp","valueState","setValue","useSlot","initialElementType","internalForwardedProps","shouldForwardComponentProp","useSlotPropsParams","rootComponent","slotComponent","LeafComponent","getTooltipUtilityClass","TooltipPopper","disableInteractive","popperInteractive","popperArrow","popperClose","transformOrigin","TooltipTooltip","touch","tooltipArrow","bg","wordWrap","TooltipArrow","content","hystersisOpen","hystersisTimer","cursorPosition","composeEventHandler","eventHandler","childrenProp","classesProp","describeChild","disableFocusListener","disableHoverListener","disableInteractiveProp","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","idProp","leaveDelay","leaveTouchDelay","onClose","onOpen","openProp","PopperComponent","PopperComponentProp","PopperProps","title","TransitionComponentProp","childNode","setChildNode","arrowRef","setArrowRef","ignoreNonTouchEvents","closeTimer","enterTimer","leaveTimer","touchTimer","openState","setOpenState","prevUserSelect","stopTouchInteraction","WebkitUserSelect","handleOpen","handleClose","handleMouseOver","handleMouseLeave","setChildIsFocusVisible","handleBlur","handleFocus","currentTarget","detectTouchStart","childrenProps","onTouchStart","nativeEvent","nameOrDescProps","titleIsString","onMouseMove","interactiveWrapperListeners","onTouchEnd","onMouseOver","onMouseLeave","onFocus","onBlur","resolvedPopperProps","tooltipModifiers","resolvedTransitionProps","Popper","Arrow","PopperSlot","popperSlotProps","TransitionSlot","transitionSlotProps","TooltipSlot","tooltipSlotProps","ArrowSlot","arrowSlotProps","TransitionPropsInner","getListUtilityClass","ListRoot","disablePadding","dense","subheader","listStyle","List","getScrollbarSize","documentWidth","nextItem","disableListWrap","nextElementSibling","previousItem","lastChild","previousElementSibling","textCriteriaMatches","nextFocus","textCriteria","innerText","repeating","moveFocus","currentFocus","disabledItemsFocusable","traversalFunction","wrappedOnce","nextFocusDisabled","hasAttribute","actions","autoFocus","autoFocusItem","onKeyDown","listRef","textCriteriaRef","previousKeyMatched","adjustStyleForScrollbar","containerElement","noExplicitWidth","scrollbarSize","activeItemIndex","muiSkipListHighlight","items","newChildProps","tabIndex","ctrlKey","metaKey","altKey","activeElement","criteria","lowerKey","currTime","performance","now","keepFocusOnCurrent","getDividerUtilityClass","DividerRoot","absolute","orientation","flexItem","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","borderWidth","borderStyle","borderBottomWidth","dividerChannel","borderRightWidth","borderTopStyle","borderLeftStyle","DividerWrapper","wrapperVertical","Divider","createSimplePaletteValueFilter","additionalPropertiesToCheck","hasCorrectMainProperty","checkSimplePaletteColorValues","LazyRipple","ripple","shouldMount","setShouldMount","mountEffect","mounted","didMount","mount","resolveFn","rejectFn","createControlledPromise","pulsate","getChildMapping","mapFn","Children","isValidElement","mapper","getProp","getNextChildMapping","nextProps","prevChildMapping","nextChildMapping","getValueForKey","nextKeysPending","pendingKeys","prevKey","childMapping","nextKey","pendingNextKey","mergeChildMappings","hasPrev","hasNext","prevChild","isLeaving","cloneElement","TransitionGroup","ReferenceError","_assertThisInitialized","firstRender","currentChildMapping","childFactory","_jsx","JSX","createElementArgArray","createEmotionProps","Global","sheetRef","rehydrating","sheetRefCurrent","insertable","enterKeyframe","exitKeyframe","pulsateKeyframe","TouchRippleRoot","TouchRippleRipple","rippleX","rippleY","rippleSize","leaving","setLeaving","rippleClassName","rippleVisible","ripplePulsate","rippleStyles","childClassName","childLeaving","childPulsate","timeoutId","TouchRipple","centerProp","ripples","setRipples","rippleCallback","ignoringMouseDown","startTimer","startTimerCommit","startCommit","cb","oldRipples","fakeElement","touches","sizeX","sizeY","getButtonBaseUtilityClass","ButtonBaseRoot","WebkitTapHighlightColor","userSelect","verticalAlign","MozAppearance","WebkitAppearance","textDecoration","colorAdjust","ButtonBase","centerRipple","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onClick","onContextMenu","onDragLeave","onFocusVisible","onKeyUp","onMouseDown","onMouseUp","onTouchMove","TouchRippleProps","touchRippleRef","buttonRef","handleRippleRef","setFocusVisible","enableTouchRipple","handleMouseDown","useRippleHandler","handleContextMenu","handleDragLeave","handleMouseUp","handleTouchStart","handleTouchEnd","handleTouchMove","isNonNativeButton","href","repeat","defaultPrevented","ComponentProp","to","buttonProps","composedClasses","rippleAction","eventCallback","skipRippleAction","getCircularProgressUtilityClass","circularRotateKeyframe","circularDashKeyframe","rotateAnimation","dashAnimation","CircularProgressRoot","CircularProgressSVG","CircularProgressCircle","circle","disableShrink","circleDisableShrink","stroke","CircularProgress","thickness","circleStyle","circumference","viewBox","getIconButtonUtilityClass","IconButtonRoot","edge","activeChannel","mainChannel","IconButtonLoadingIndicator","loadingIndicator","IconButton","disableFocusRipple","loadingIndicatorProp","loadingId","loadingWrapper","getButtonUtilityClass","commonIconStyles","ButtonRoot","colorInherit","disableElevation","fullWidth","inheritContainedBackgroundColor","inheritContainedHoverBackgroundColor","inheritContainedBg","inheritContainedHoverBg","primaryChannel","loadingPosition","ButtonStartIcon","startIcon","startIconLoadingStart","ButtonEndIcon","endIcon","endIconLoadingEnd","ButtonLoadingIndicator","ButtonLoadingIconPlaceholder","loadingIconPlaceholder","contextProps","buttonGroupButtonContextPositionClassName","endIconProp","startIconProp","positionClassName","loader","defaultSlotsMaterial","baseButton","baseIconButton","getListItemIconUtilityClass","getListItemTextUtilityClass","getMenuItemUtilityClass","MenuItemRoot","disableGutters","gutters","inset","backgroundClip","MenuItem","tabIndexProp","childContext","menuItemRef","ListItemIconRoot","alignItemsFlexStart","getTypographyUtilityClass","v6Colors","textPrimary","textSecondary","textDisabled","inSx","systemProps","splitProps","finalSx","TypographyRoot","noWrap","gutterBottom","paragraph","defaultVariantMapping","Typography","themeProps","variantMapping","ListItemTextRoot","multiline","disableTypography","primaryProp","primaryTypographyProps","secondaryProp","secondaryTypographyProps","RootSlot","rootSlotProps","PrimarySlot","primarySlotProps","SecondarySlot","secondarySlotProps","candidatesSelector","defaultGetTabbable","regularTabNodes","orderedTabNodes","nodeTabIndex","tabindexAttr","contentEditable","getTabIndex","getRadio","roving","isNonTabbableRadio","isNodeMatchingSelectorFocusable","documentOrder","defaultIsEnabled","disableAutoFocus","disableEnforceFocus","disableRestoreFocus","getTabbable","isEnabled","ignoreNextEnforceFocus","sentinelStart","sentinelEnd","nodeToRestore","reactFocusEventTarget","activated","rootRef","lastKeydown","loopFocus","shiftKey","rootElement","hasFocus","tabbable","isShiftTab","focusNext","focusPrevious","setInterval","clearInterval","handleFocusSentinel","relatedTarget","childrenPropsHandler","mapEventPropToEvent","eventProp","ClickAwayListener","disableReactTree","mouseEvent","onClickAway","touchEvent","movedRef","activatedRef","syntheticEventRef","handleClickAway","insideReactTree","clickedRootScrollbar","insideDOM","createHandleSynthetic","handlerName","mappedTouchEvent","mappedMouseEvent","getPaperUtilityClass","PaperRoot","square","rounded","backgroundImage","Paper","wrappers","focusTrap","focusTrapWrapper","clickAwayTouchEvent","clickAwayMouseEvent","clickAwayWrapper","getSvgIconUtilityClass","SvgIconRoot","hasSvgAsChild","SvgIcon","htmlColor","inheritViewBox","titleAccess","instanceFontSize","more","focusable","createSvgIcon","ChartsZoomInIcon","ChartsZoomOutIcon","ChartsExportIcon","baseTooltip","basePopper","flip","onDidShow","onDidHide","popperOnExited","baseMenuList","baseMenuItem","inert","iconStart","iconEnd","baseDivider","zoomInIcon","zoomOutIcon","exportIcon","selectorBrush","brush","selectorBrushStartX","selectorBrushStartY","selectorBrushCurrentX","selectorBrushCurrentY","selectorBrushState","startX","startY","currentY","selectorBrushConfigNoZoom","hasHorizontal","isBothDirections","selectorBrushConfigZoom","optionsLookup","selectorBrushConfig","configNoZoom","configZoom","selectorIsBrushEnabled","isZoomBrushEnabled","selectorIsBrushSelectionActive","isBrushEnabled","selectorBrushShouldPreventAxisHighlight","isBrushSelectionActive","preventHighlight","selectorBrushShouldPreventTooltip","preventTooltip","useChartBrush","brushConfig","setBrushCoordinates","clearBrush","setZoomBrushEnabled","brushStartHandler","brushHandler","currentPoint","brushCancelHandler","brushEndHandler","defaultizeAxis","inAxis","axisName","DEFAULT_AXIS_KEY","isPolarSeriesType","angles","extremums","charType","rotationExtremumGetter","radiusExtremumGetter","minChartTypeData","maxChartTypeData","getAxisExtremum","axisExtremums","finalScale","minDomain","maxDomain","selectorChartPolarAxisState","polarAxis","selectorChartRawRotationAxis","rotation","selectorChartRawRadiusAxis","selectorChartRotationAxis","selectorChartPolarCenter","generateSvg2rotation","clampAngle","TWO_PI","angleGap","useChartPolarAxis","rotationAxis","radiusAxis","rotationAxisWithScale","rotationAxisIds","radiusAxisWithScale","radiusAxisIds","svg2rotation","svg2polar","generateSvg2polar","polar2svg","generatePolar2svg","usedRotationAxisId","usedRadiusAxisId","mousePosition","isInChart","svgRect","isRotationAxis","rotationIndex","EMPTY_VISIBILITY_MAP","visibilityParamToMap","visibilityManager","visibilityMap","uniqueId","isIdentifierVisible","hiddenItems","useChartVisibilityManager","hideItem","newVisibilityMap","onHiddenItemsChange","showItem","toggleItem","toggleItemVisibility","loadStyleSheets","stylesheetLoadPromises","headStyleElements","newHeadStyleElement","styleCSS","cssText","attr","nodeValue","createExportIframe","iframeEl","previousStyles","getPropertyValue","setProperty","chartsToolbarClasses","defaultOnBeforeExport","iframe","chartsToolbarEl","contentDocument","remove","waitForAnimationFrame","res","useChartProExport","exportAsPrint","chartRoot","enableAnimation","fileName","onBeforeExport","copyStyles","printWindow","printDoc","elementClone","cloneNode","replaceChildren","rootCandidate","contentWindow","print","printChart","exportAsImage","quality","drawDocumentPromise","drawDocument","cause","getDrawDocument","iframeLoadPromise","exportDoc","exportDocBodySize","canvas","ratio","resolveBlobPromise","blobPromise","blob","toBlob","createObjectURL","download","triggerDownload","revokeObjectURL","exportImage","rafThrottle","lastArgs","rafRef","later","throttled","export","zoomAtPoint","centerRatio","scaleRatio","currentZoomData","MIN_RANGE","MAX_RANGE","MIN_ALLOWED_SPAN","minRange","maxRange","newMinRange","newMaxRange","minSpillover","maxSpillover","isSpanValid","isZoomIn","option","newSpanPercent","getHorizontalCenterRatio","getVerticalCenterRatio","translateZoom","initialZoomData","movement","span","MIN_PERCENT","MAX_PERCENT","rawDisplacement","displacement","newMinPercent","newMaxPercent","selectorChartZoomIsEnabled","selectorChartCanZoomOut","zoomState","selectorChartCanZoomIn","selectorZoomInteractionConfig","interactionName","zoomInteractionConfig","selectorPanInteractionConfig","useZoomOnWheel","setZoomDataCallback","startedOutsideRef","startedOutsideTimeoutRef","isZoomOnWheelEnabled","rafThrottledSetZoomData","zoomOnWheelHandler","multiplier","ctrlMultiplier","getMultiplier","scaledStep","getWheelScaleRatio","initializeZoomInteractionConfig","defaultizedConfig","initializeFor","mouse","pinch","hasXZoom","hasYZoom","allowedDirection","interactionType","aggregation","lastEmpty","lastMouse","lastTouch","initializeZoomData","zoomDataMap","useChartProZoom","pluginData","paramsZoomData","onZoomChange","onZoomChangeProp","removeIsInteracting","wait","debounced","newZoomData","setAxisZoomData","prevZoom","moveZoomRange","by","prevZoomData","isPanOnDragEnabled","accumulatedChange","throttledCallback","panStartHandler","usePanOnDrag","isPanOnPressAndDragEnabled","pressAndDragHandler","pressAndDragStartHandler","pressAndDragEndHandler","usePanOnPressAndDrag","isPanOnWheelEnabled","wheelHandler","movementX","movementY","usePanOnWheel","isZoomOnPinchEnabled","rafThrottledCallback","zoomHandler","useZoomOnPinch","isZoomOnTapAndDragEnabled","useZoomOnTapAndDrag","isZoomOnBrushEnabled","startPoint","endPoint","startRatio","endRatio","minRatio","maxRatio","currentStart","currentSpan","newStart","newEnd","clampedStart","clampedEnd","useZoomOnBrush","isZoomOnDoubleTapResetEnabled","doubleTapResetHandler","useZoomOnDoubleTapReset","calculateZoom","setZoomData","initialZoom","DEFAULT_PLUGINS","useChartKeyboardNavigation","removeFocus","keyboardNavigation","enableKeyboardNavigation","keyboardHandler","newFocusedItem","calculateFocusedItem","findClosestPoints","xZoomStart","xZoomEnd","yZoomStart","yZoomEnd","svgPointX","svgPointY","maxRadius","fx","fy","fxSq","fySq","pointX","invertScale","pointY","getDataPoint","useChartClosestPoint","disableVoronoi","voronoiMaxRadius","onItemClick","zoomIsInteracting","isVoronoiEnabled","getClosestPoint","closestPoint","aSeries","xAxisZoom","yAxisZoom","closestPointIndex","scaledX","scaledY","distSq","distanceSq","enableVoronoi","voronoi","useChartDataProviderProps","chartProviderProps","useChartDataProviderProProps","packageIdentifier","defaultSeriesConfigPro","ChartDataProviderPro","useDrawingArea","useXAxes","useYAxes","useRotationAxes","ChartsPiecewiseGradient","isReversed","gradientId","x2","y2","gradientUnits","stopColor","ChartsContinuousGradient","extremumValues","extremumPositions","numberOfPoints","keyPrefix","ChartsContinuousGradientObjectBound","selectorChartZAxis","useZAxes","zAxisIds","selectorChartId","idState","useChartGradientIdBuilder","useChartGradientIdObjectBoundBuilder","ChartsAxesGradients","svgHeight","svgWidth","getGradientId","getObjectBoundGradientId","filteredYAxisIds","filteredXAxisIds","filteredZAxisIds","objectBoundGradientId","useSvgRef","selectKeyboardNavigation","selectorChartsItemIsFocused","keyboardNavigationState","selectorChartsHasFocusedItem","selectorChartsFocusedItem","selectorChartsIsKeyboardNavigationEnabled","createSelectAxisHighlight","selectorChartsKeyboardXAxisIndex","selectorChartsKeyboardYAxisIndex","selectorChartsKeyboardItem","keyboardState","getSurfaceUtilityClass","ChartsSurfaceStyles","hasZoom","ChartsSurface","isKeyboardNavigationEnabled","hasFocusedItem","desc","hasIntrinsicSize","onPointerDown","useInteractionItemProps","interactionActive","onPointerEnter","onPointerLeave","alwaysFalse","createIsHighlighted","highlightScope","createIsFaded","fade","isSeriesHighlighted","scope","getSeriesHighlightedItem","selectorChartsHighlightScopePerSeriesId","selectorChartsHighlightedItem","keyboardItem","selectorChartsHighlightScope","seriesIdToHighlightScope","selectorChartsIsHighlightedCallback","selectorChartsIsFadedCallback","selectorChartsIsHighlighted","selectorChartIsSeriesHighlighted","selectorChartIsSeriesFaded","selectorChartSeriesUnfadedItem","selectorChartSeriesHighlightedItem","selectorChartsIsFaded","useItemHighlighted","isHighlighted","isFaded","ANIMATION_DURATION_MS","ANIMATION_TIMING_FUNCTION","ANIMATION_TIMING_FUNCTION_JS","taskHead","taskTail","clockLast","clockNow","clockSkew","clock","setFrame","clearNow","Timer","_call","_time","_next","restart","wake","timerFlush","sleep","nap","poke","elapsed","easingFn","onTick","onTickCallback","resume","running","timerCallback","easedT","useAnimate","createInterpolator","transformProps","applyProps","initialProps","animateRef","lastInterpolatedProps","lastInterpolatedPropsRef","transitionRef","elementRef","lastPropsRef","animate","interpolatedProps","lastElement","objA","objB","keysA","keysB","currentKey","shallowEqual","useAnimateInternal","animatedProps","cleanId","appearingMaskClasses","AnimatedRect","animationName","animationTimingFunction","animationDuration","AppearingMask","clipId","clipPath","AnimatedArea","lastProps","useAnimateArea","getAreaElementUtilityClass","areaElementClasses","AreaElement","innerClasses","interactionProps","Area","areaProps","selectorChartSkipAnimation","useSkipAnimation","storeSkipAnimation","useInternalIsZoomInteracting","Linear","_context","areaStart","_line","areaEnd","lineStart","_point","lineEnd","closePath","lineTo","moveTo","tauEpsilon","Path","digits","_x0","_y0","_x1","_y1","_append","appendRound","quadraticCurveTo","bezierCurveTo","arcTo","x21","y21","x01","y01","l01_2","x20","y20","l21_2","l20_2","l21","l01","acos","t01","t21","arc","ccw","cw","withPath","RangeError","defined","curve","defined0","x0z","y0z","arealine","lineX0","lineY0","lineY1","lineX1","that","_k","_x2","_y2","Cardinal","tension","CatmullRom","_alpha","custom","cardinal","_l01_a","_l12_a","_l23_a","_l01_2a","_l12_2a","_l23_2a","x23","y23","catmullRom","slope3","h0","slope2","MonotoneX","MonotoneY","ReflectContext","monotoneX","monotoneY","Natural","controlPoints","Step","_t","stepBefore","stepAfter","_t0","_x","_y","Bump","bumpX","bumpY","getCurveFactory","curveType","selectorAllSeriesOfType","selectorSeriesOfType","failedIds","useAllSeriesOfType","useLineSeriesContext","getValueToPositionMapper","useXScale","useYScale","useAreaPlotData","allData","areaPlotData","groupIds","connectNulls","strictStepCurve","xPosition","xData","shouldExpand","formattedData","nullData","rep","isExtension","d3Data","areaPath","AreaPlotRoot","transitionProperty","useAggregatedData","AreaPlot","inSkipAnimation","completedData","AnimatedLine","animateProps","useAnimateLine","fadedOpacity","strokeLinejoin","hidden","getLineElementUtilityClass","lineElementClasses","LineElement","Line","lineProps","useLinePlotData","linePlotData","linePath","LinePlotRoot","LinePlot","getMarkElementUtilityClass","markElementClasses","Circle","CircleMarkElement","draw","tan30","tan30_2","kr","kx","ky","symbolsFill","cross","diamond","star","triangle","wye","getSymbol","MarkElementPath","MarkElement","useItemHighlightedGetter","selectorChartControlledCartesianAxisHighlight","selectAxisHighlight","computedIndex","axisItems","selectorChartsHighlightXAxisIndex","selectAxisHighlightWithValue","computedValue","controlledAxisItems","keyboardAxisItem","lastInteractionUpdate","pointerHighlight","keyboardValue","keyboardHighlight","selectorChartsHighlightXAxisValue","selectorChartsHighlightYAxisValue","selectAxis","MarkPlot","xAxisHighlightIndexes","highlightedItems","markPlotData","showMark","marks","xPos","useMarkPlotData","Mark","mark","isSeriesFaded","useIsHydrated","isHydrated","setIsHydrated","isInfinity","monthNumber","dayNumber","tickFrequencies","years","isTick","quarterly","Intl","DateTimeFormat","biweekly","offsetRatio","extremities","middle","getTickPosition","useTicks","tickPlacement","tickLabelPlacement","tickSpacing","isInside","tickPlacementProp","tickLabelPlacementProp","ticksIndexes","ticksFrequencies","startIndex","findLastIndex","startFrequencyIndex","endFrequencyIndex","prevTickCount","nextTickCount","tickIndex","prevDate","currentDate","formatter","getTimeTicks","tickDef","labelOffset","filteredDomain","rangeSpan","applyTickSpacing","defaultTickLabel","getDefaultTicks","visibleTicks","getTicks","segmenter","Segmenter","granularity","getGraphemeCount","segments","segment","_unused","sliceUntil","newText","ELLIPSIS","doesTextFitInRect","measureText","textSize","angledWidth","angledHeight","ellipsize","doesTextFit","shortenedText","graphemeCount","newLength","lastLength","longestFittingText","isSsr","stringCache","MAX_CACHE_NUM","PIXEL_STYLES","convertPixelValue","AZ","camelCaseToDashCase","getStyleString","getStringSize","measurementSpanContainer","getMeasurementContainer","measurementElem","createElementNS","measureSVGTextElement","getBBox","measurementContainer","ANGLE_APPROX","getAxisUtilityClass","axisClasses","tickContainer","tickLabel","TICK_LABEL_GAP","AXIS_LABEL_TICK_LABEL_GAP","disableLine","disableTicks","tickSize","tickLabelMinGap","_excluded2","ChartsText","styleProps","textProps","textAnchor","dominantBaseline","wordsByLines","needsComputation","subText","getWordsByLines","startDy","getDefaultTextAnchor","adjustedAngle","getDefaultBaseline","invertTextAnchor","useAxisTicksProps","_xAxis","themedProps","defaultizedProps","tickLabelStyle","positionSign","Tick","axisTick","TickLabel","axisTickLabel","defaultTextAnchor","defaultDominantBaseline","axisTickLabelProps","ChartsSingleXAxisTicks","axisLabelHeight","isMounted","defer","mountedState","setMountedState","useMounted","tickSizeProp","tickLabelInterval","axisHeight","xTicks","visibleLabels","previousTextLimit","candidateTickLabels","sizeMap","texts","textToMeasure","styleString","measurementSpanStyle","measurementElements","batchMeasureStrings","measureTickLabels","labelIndex","textPosition","lineSize","getTickLabelSize","standardAngle","radAngle","getMinXTranslation","getVisibleLabels","tickLabelsMaxHeight","tickLabels","shortenedLabels","leftBoundFactor","rightBoundFactor","shortenLabels","tickOffset","xTickLabel","yTickLabel","showTick","showTickLabel","useTicksGrouped","groups","mapToGrouping","ignoreTick","tickValues","allTickItems","dataIndexToTickIndex","currentValueCount","tickValue","groupValue","getValue","lastItem","tickIndexes","previousIndex","DEFAULT_GROUPING_CONFIG","getGroupingConfig","defaultTickSize","calculatedTickSize","ChartsGroupedXAxisTicks","groupConfig","tickYSize","labelPositionY","AxisRoot","shapeRendering","XAxisRoot","ChartsXAxisImpl","labelStyle","axisLine","Label","axisLabel","axisLabelProps","labelHeight","labelRefPoint","ChartsXAxis","_yAxis","tickFontSize","ChartsSingleYAxisTicks","axisWidth","yTicks","tickLabelsMaxWidth","topBoundFactor","bottomBoundFactor","skipLabel","showLabel","ChartsGroupedYAxisTicks","tickXSize","labelPositionX","YAxisRoot","ChartsYAxisImpl","settings","strokeLinecap","ChartsYAxis","getChartsGridUtilityClass","chartsGridClasses","GridRoot","verticalLine","horizontalLine","GridLine","ChartsGridVertical","ChartsGridHorizontal","ChartsGrid","horizontalAxis","verticalAxis","getChartsTooltipUtilityClass","chartsTooltipClasses","table","row","cell","markContainer","labelCell","valueCell","axisValueCell","useSeries","selectorChartsTooltipPointerItem","selectorChartsTooltipPointerItemIsDefined","selectorChartsTooltipItem","lastInteraction","pointerItem","selectorChartsTooltipItemIsDefined","pointerItemIsDefined","keyboardItemIsDefined","selectorChartsTooltipAxisConfig","rotationAxes","radiusAxes","selectorChartsTooltipItemPosition","useInternalItemTooltip","zAxisId","rotationAxisId","ChartsTooltipPaper","ChartsTooltipTable","borderSpacing","ChartsTooltipRow","ChartsTooltipCell","getLabelMarkUtilityClass","labelMarkClasses","mergeClassNameAndStyle","consumeThemeProps","InComponent","outProps","classesResolver","OutComponent","mask","ChartsLabelMark","preserveAspectRatio","ChartsItemTooltipContent","propClasses","tooltipData","seriesLabel","useMediaQueryOld","query","defaultMatches","ssrMatchMedia","noSsr","setMatch","queryList","updateMatch","maybeReactUseSyncExternalStore","useMediaQueryNew","getDefaultSnapshot","mediaQueryList","notify","unstable_createUseMediaQuery","queryInput","supportMatchMedia","useIsFineMainPointer","optionalGetAxisId","optionalGetAxisIds","selectorChartsInteractionRotationAngle","selectorChartsInteractionRotationAxisIndex","selectorChartsInteractionRotationAxisIndexes","selectorChartsInteractionTooltipRotationAxes","rotationIndexes","selectorChartsInteractionPolarAxisTooltip","rotationTooltip","defaultAxisTooltipConfig","axisFormattedValue","utcFormatter","seriesItems","useAxesTooltip","multipleAxes","defaultXAxis","defaultYAxis","defaultRotationAxis","tooltipXAxes","tooltipYAxes","tooltipRotationAxes","colorProcessors","seriesT","useColorProcessor","seriesToAdd","tooltipItemIndex","providedRotationAxisId","useAxisTooltip","ChartsAxisTooltipContent","hideTooltip","fallback","selectorReturnFalse","selectorReturnNull","ChartsTooltipRoot","ChartsTooltipContainer","trigger","anchor","anchorRef","setPointerType","handleOut","usePointerType","isFineMainPointer","positionRef","axisSystem","rawRotationAxis","rawXAxis","useAxisSystem","shouldPreventBecauseOfBrush","isOpen","getIsOpenSelector","computedAnchor","itemPosition","svgElement","pointerUpdate","pointerAnchorEl","isMouse","isTouch","ChartsTooltip","getAxisHighlightUtilityClass","ChartsAxisHighlightPath","axisHighlight","ChartsYHighlight","axisYValues","getYPosition","isYScaleOrdinal","ChartsXHighlight","axisXValues","getXPosition","isXScaleOrdinal","ChartsAxisHighlight","xAxisHighlight","yAxisHighlight","getSeriesToDisplay","getLegendUtilityClass","legendClasses","getLabelUtilityClass","ChartsLabel","RootElement","listStyleType","li","ChartsLegend","ConsumeSlotsInternal","propagateSlots","_useSlotProps","omitProps","consumeSlots","ChartsClipPath","offsetProps","createPreviewDrawingArea","mainChartDrawingArea","selectorChartPreviewXScales","chartDrawingArea","normalizedXScales","hasAxis","selectorChartPreviewComputedXAxis","computedAxes","selectorChartPreviewYScales","normalizedYScales","selectorChartPreviewComputedYAxis","getAxisMessage","useBarSeriesContext","useBarPlotData","masks","seriesIds","xMin","xMax","yMin","yMax","lastNegativePerIndex","lastPositivePerIndex","seriesDataLength","discreteAxisConfig","continuousAxisConfig","discreteAxisId","continuousAxisId","discreteAxisDirection","continuousAxisDirection","checkBarChartScaleErrors","xOrigin","yOrigin","seriesDataPoints","barDimensions","stackId","maskId","lastNegative","lastPositive","borderRadiusSide","hasNegative","hasPositive","barLabel","barLabelPlacement","masksData","getBarElementUtilityClass","barElementClasses","barPropsInterpolator","interpolateX","interpolateY","interpolateWidth","interpolateHeight","AnimatedBarElement","useAnimateBar","BarElement","itemIdentifier","isFocused","Bar","barProps","useScatterPlotData","scatterPoint","useScatterSeriesContext","ScatterMarker","ScatterPreviewItems","scatterPlotData","AreaPreviewPlot","useAreaPreviewData","PreviewAreaElement","LinePreviewPlot","useLinePreviewData","PreviewLineElement","seriesPreviewPlotMap","useBarPreviewData","zAxes","defaultZAxisId","ChartAxisZoomSliderPreviewContent","PreviewBackgroundRect","rx","ry","ChartAxisZoomSliderPreview","PreviewRectangles","ZOOM_SLIDER_TRACK_SIZE","ZOOM_SLIDER_ACTIVE_TRACK_SIZE","ZOOM_SLIDER_THUMB_HEIGHT","ZOOM_SLIDER_THUMB_WIDTH","ZOOM_SLIDER_SIZE","calculateZoomFromPoint","pointerZoom","calculateZoomFromPointImpl","calculateZoomStart","currentZoom","calculateZoomEnd","getAxisZoomSliderTrackUtilityClass","ZoomSliderTrack","isSelecting","ChartAxisZoomSliderTrack","onSelectStart","onSelectEnd","setIsSelecting","pointerDownPoint","zoomFromPointerDown","onPointerMove","pointerMoveEvent","pointerMovePoint","zoomFromPointerMove","setPointerCapture","onPointerUp","pointerUpEvent","getDataIndexForOrdinalScaleValue","chartAxisZoomSliderThumbClasses","getAxisZoomSliderThumbUtilityClass","Rect","ChartAxisZoomSliderThumb","onMove","thumbRef","onMoveEvent","thumb","onPointerEnd","ChartsZoomSliderTooltipRoot","MODIFIERS","ChartsTooltipZoomSliderValue","ZoomSliderActiveTrackRect","ChartAxisZoomSliderActiveTrack","axisPosition","activePreviewRectRef","startThumbEl","setStartThumbEl","endThumbEl","setEndThumbEl","tooltipStart","tooltipEnd","formatValue","startValue","endValue","getZoomSliderTooltipsText","previewThumbWidth","previewThumbHeight","previewX","previewY","previewWidth","previewHeight","startThumbX","startThumbY","endThumbX","endThumbY","activePreviewRect","prevPointerZoom","deltaZoom","axisZoomData","pointerDownZoom","previewOffset","ChartAxisZoomSlider","setShowTooltip","showPreview","tooltipConditions","sliderSize","axisSize","backgroundRectOffset","track","ChartZoomSlider","getReferenceLineUtilityClass","referenceLineClasses","ReferenceLineRoot","getTextParams","labelAlign","defaultSpacingOtherAxis","spacingX","spacingY","ChartsXReferenceLine","inClasses","lineStyle","xAxisScale","getXReferenceLineClasses","textParams","ChartsYReferenceLine","yPosition","yAxisScale","getYReferenceLineClasses","ChartsReferenceLine","brushOverlayClasses","BrushRect","ChartsBrushOverlay","brushStartX","brushStartY","brushCurrentX","brushCurrentY","clampX","clampY","rectColor","rectWidth","rectHeight","useComponentRenderer","defaultElement","otherClassName","ToolbarContext","ToolbarContextProvider","focusableItemId","setFocusableItemId","focusableItemIdRef","setItems","getSortedItems","sortByDocumentPosition","findEnabledItem","wrap","sortedItems","itemCount","ariaDisabled","registerItem","itemRef","prevItems","unregisterItem","onItemKeyDown","focusableItemIndex","newIndex","onItemFocus","onItemDisabled","currentIndex","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_CONTAINED_BY","DOCUMENT_POSITION_PRECEDING","DOCUMENT_POSITION_CONTAINS","ToolbarButton","_useRegisterToolbarBu","useToolbarContext","previousDisabled","previousAriaDisabled","useRegisterToolbarButton","toolbarButtonProps","ToolbarRoot","Toolbar","useChartsLocalization","localization","ChartsToolbarDivider","ChartsMenu","savedFocusRef","ChartsToolbarZoomInTrigger","ChartsToolbarZoomOutTrigger","useChartProApiContext","useChartApiContext","ChartsToolbarPrintExportTrigger","ChartsToolbarImageExportTrigger","DEFAULT_IMAGE_EXPORT_OPTIONS","ChartsToolbarPro","printOptions","imageExportOptions","rawImageExportOptions","exportMenuOpen","setExportMenuOpen","exportMenuTriggerRef","exportMenuId","exportMenuTriggerId","isZoomEnabled","imageExportOptionList","showExportMenu","disableToolbarButton","ZoomOutIcon","ZoomInIcon","MenuList","ExportIcon","closeExportMenu","handleListKeyDown","licenseKeySet","MONTHS_SHORT","pad2","CustomBrushOverlay","_ref$primaryColor","primaryColor","_ref$positiveColor","positiveColor","_ref$negativeColor","negativeColor","clampedStartX","clampedCurrentX","getIndex","_toConsumableArray","currentValue","percentChange","startLabel","currentLabel","diffColor","LineChart","_series$","_props$series","_props$height","grid","_props$hideLegend","hideLegend","_props$skipAnimation","_props$loading","_props$showSlider","showSlider","_props$referenceLines","referenceLines","_props$brushOverlay","brushOverlay","brushSeriesId","_props$axisHighlight","tooltipItem","_props$showToolbar","showToolbar","_props$n_clicks","brushData","clickData","n_clicks","setProps","clipPathId","_useState2","_slicedToArray","controlledZoom","setControlledZoom","lastKnownZoomRef","_useState4","chartKey","setChartKey","currentZoomStr","lastKnownHighlightedAxisRef","_useState6","controlledHighlightedAxis","setControlledHighlightedAxis","currentStr","lastKnownHighlightedItemRef","_useState8","controlledHighlightedItem","setControlledHighlightedItem","lastKnownTooltipItemRef","_useState0","controlledTooltipItem","setControlledTooltipItem","hasAreaSeries","hasMarks","_objectSpread","hasSliderInAxisConfig","checkAxes","_typeof","processedXAxis","dateFormat","tf","formatDateStr","dateTickFormat","resolved","registry","dashMuiChartsFunctions","resolveFunctionProp","existingZoom","zoomConfig","providerProps","resolvedZoomData","onTooltipItemChange","AXIS_RENDER_PROPS","extractRenderProps","renderProps","_AXIS_RENDER_PROPS","xAxisConfigs","resolvedXAxis","yAxisConfigs","_extends","timestamp","refLine","getBarLabelUtilityClass","PropTypes","function","isRequired","barLabelClasses","barLabelPropsInterpolator","LABEL_OFFSET","BarLabelComponent","faded","highlighted","BarLabel","initialX","initialY","getOutsidePlacement","getCenterPlacement","useAnimateBarLabel","getTextAnchor","getDominantBaseline","BarLabelItem","barLabelOwnerState","barLabelProps","formattedLabelText","getBarLabel","BarLabelPlot","getBarUtilityClass","seriesLabels","barClipPathPropsInterpolator","interpolateBorderRadius","BarClipPath","generateClipPath","useAnimateBarClipPath","bR","IndividualBarPlot","withoutBorderRadius","barElement","selectorBarItemAtPosition","bandAxis","bandScale","svgPointBandCoordinate","bandValue","bandStart","bandBarStart","bandBarEnd","bandBarMin","bandBarMax","svgPointContinuousCoordinate","continuousMin","continuousMax","appendAtKey","bucket","createPath","barData","topLeftBorderRadius","topRightBorderRadius","bottomRightBorderRadius","bottomLeftBorderRadius","tLBR","tRBR","bRBR","bLBR","generateBarPath","PathGroup","BarGroup","AnimatedGroup","animationFillMode","animateChildren","BatchBarPlot","prevCursorRef","getItemAtPosition","onItemEnter","onItemLeave","lastItemRef","onItemEnterRef","onItemLeaveRef","useRegisterPointerInteractions","lastPointerUp","useRegisterItemClickHandlers","SeriesBatchPlot","MemoFadedHighlightedBars","FadedHighlightedBars","BatchBarSeriesPlot","temporaryPaths","pathString","tempPath","useCreateBarPaths","dArray","seriesHighlightedDataIndex","seriesUnfadedDataIndex","seriesHighlightedItem","seriesUnfadedItem","siblings","BarPlotRoot","BarPlot","renderer","batchSkipAnimation","BarElementPlot","getHighlightElementUtilityClass","LineHighlightElement","LineHighlightPlot","highlightedIndexes","lineHighlight","highlightedIndex","highlightedAxisId","disableHighlight","ChartDataProvider","useFocusedItem","FocusedLineMark","focusedItem","lineSeries","SPARK_LINE_DEFAULT_MARGIN","SparkLineChart","xAxisProps","yAxisProps","showHighlight","inAxisHighlight","plotType","disableClipping","clipAreaOffset","clipPathOffset","defaultXHighlight","SparklineChart","_props$data","_props$plotType","_props$area","_props$curve","_props$showTooltip","_props$showHighlight","_props$disableClippin","_props$n_hovers","hoverIndex","hoverValue","n_hovers","internalHighlightIndex","setInternalHighlightIndex","lastHighlightPropRef","sparklineProps","mergedSlotProps","_axisItems$0$dataInde","_axisItems$","MuiSparkLineChart","ChartsAxis","getJustifyItems","getAlignItems","horizontalPosition","drawingAreaColumn","getTemplateColumns","legendDirection","legendPosition","verticalPosition","drawingAreaRow","getTemplateRows","getGridTemplateAreas","extendVertically","ChartsWrapper","StyledText","ChartsLoadingOverlay","ChartsNoDataOverlay","ChartsOverlay","seriesPerType","seriesOfGivenType","links","useNoData","LoadingOverlay","loadingOverlay","NoDataOverlay","noDataOverlay","getLabelGradientUtilityClass","labelGradientClasses","rotate","getRotation","ChartsLabelGradient","continuousColorLegendClasses","templateAreas","endLabel","extremes","maxLabel","minLabel","gradient","getText","ContinuousColorLegend","labelPosition","rotateGradient","generateGradientId","axisItem","useAxis","minValue","maxValue","formattedMin","formattedMax","minText","maxText","minComponent","maxComponent","useHeatmapSeriesContext","getHeatmapUtilityClass","HeatmapCell","HeatmapItem","Cell","cellProps","HeatmapPlot","useZAxis","useZColorScale","xDomain","yDomain","seriesToDisplay","heatmapSeriesConfig","heatmap","HeatmapTooltipAxesValue","HeatmapTooltipContent","heatmapSeries","formattedX","formattedY","HeatmapTooltip","HEATMAP_PLUGINS","defaultColorMap","getDefaultDataForAxis","getDefaultDataForXAxis","getDefaultDataForYAxis","Heatmap","xAxisWithDefault","yAxisWithDefault","zAxisWithDefault","chartsWrapperProps","legend","DefaultCell","onCellClick","_objectWithoutProperties","RoundedCell","cellConfig","_ref$gap","_ref$borderRadius","_ref$showValue","showValue","_ref$fontSize","_ref$fontWeight","_ref$textColor","textColor","cellStyle","zAxisConfig","_colorScale$min","_colorScale$max","handleCellClick","_params$dataIndex","_params$dataIndex2","heatmapProps","MuiHeatmap","arcInnerRadius","arcOuterRadius","arcStartAngle","arcEndAngle","arcPadAngle","cornerTangents","rc","ox","oy","x11","y11","x10","y10","x00","y00","d2","cx0","cy0","cx1","cy1","dx0","dy0","dx1","dy1","cornerRadius","padRadius","a01","a11","a00","a10","da0","da1","ap","rp","rc0","rc1","p0","oc","x3","y3","x32","y32","intersect","ax","ay","bx","kc","lc","pieArcPropsInterpolator","interpolateStartAngle","interpolateEndAngle","interpolateInnerRadius","interpolateOuterRadius","interpolatePaddingAngle","interpolateCornerRadius","getPieArcUtilityClass","pieArcClasses","PieArcRoot","PieArc","strokeProp","skipInteraction","useAnimatePieArc","getModifiedArcProperties","seriesDef","basePaddingAngle","baseCornerRadius","baseInnerRadius","baseArcLabelRadius","baseOuterRadius","attributesOverride","additionalRadius","useTransformData","isItemFaded","isItemHighlighted","isItemFocused","useIsItemFocusedGetter","arcSizes","PieArcPlot","transformedData","Arc","pieArc","pieArcLabelPropsInterpolator","getPieArcLabelUtilityClass","pieArcLabelClasses","PieArcLabelRoot","PieArcLabel","formattedArcLabel","useAnimatePieArcLabel","RATIO","getItemLabel","arcLabel","arcLabelMinAngle","PieArcLabelPlot","ArcLabel","pieArcLabel","usePieSeriesContext","usePieSeriesLayout","getPieUtilityClass","PiePlot","useChartContainerProps","chartsSurfaceProps","chartDataProviderProps","PIE_CHART_PLUGINS","FocusedPieArc","pieSeriesLayout","pieSeries","focusIndicator","PieChart","marginProps","chartSeries","seriesProp","_props$paddingAngle","_props$cornerRadius","_props$startAngle","_props$endAngle","chartProps","_clickedItem","_clickedItem2","_clickedItem3","clickedItem","_seriesProp$seriesInd","MuiPieChart","selectorChartsIsVoronoiEnabled","getScatterUtilityClass","Scatter","skipInteractionHandlers","disableHover","Marker","markerProps","getInteractionItemProps","ALMOST_ZERO","BatchScatterPaths","useCreatePaths","MemoBatchScatterPaths","Group","BatchScatter","ScatterPlot","DefaultScatterItems","ScatterItems","SCATTER_CHART_PLUGINS","FocusedScatterMark","scatterSeries","ScatterChart","chartContainerProps","chartsAxisProps","gridProps","scatterPlotProps","overlayProps","legendProps","axisHighlightProps","seriesWithDefault","useVoronoiOnItemClick","useScatterChartProps","_props$disableVoronoi","_seriesConfig$data","MuiScatterChart","CrosshairTracker","_useDrawingArea","lastReportedRef","ownerSVGElement","svgPt","xVal","yVal","rawX","crosshairPosition","_unused2","crosshairClick","CompositeAxisTooltipContent","proximity","displayAxisValue","scatterSeriesIds","lineEntries","scatterEntries","_step","numericValue","_iterator","_createForOfIteratorHelper","_step2","_iterator2","maximumFractionDigits","allEntries","rowStyle","dotStyle","ExternalAxisTooltip","xAxisObj","useXAxis","xPixel","_unused3","_unused4","_s$data","_step3","_iterator3","_step4","_iterator4","tooltipLeft","chartMidpoint","showOnLeft","ForecastOverlay","forecast","_ref4$color","_ref4$opacity","pts","yUp","upper","yLo","lower","CompositeChart","_axisHighlight$x","_axisHighlight$y","syncedTooltipIndex","_props$forecastColor","forecastColor","_props$forecastOpacit","forecastOpacity","_props$enableCrosshai","enableCrosshair","lastZoomPropRef","hasScatter","hasLine","hasArea","scatterSeriesData","handleLineClick","scatterProximity","_resolvedXAxis$","minStep","tooltipTrigger","useCustomTooltip","_i4","newZoom","createSeededRng","seed","imul","nextGaussian","u1","u2","CandlestickPlot","candles","upColor","downColor","totalSlots","drawWidth","slotWidth","bodyWidth","wickWidth","yHigh","high","yLow","low","yOpen","yClose","bodyTop","bodyHeight","VolumeBars","volumeHeightPct","_useDrawingArea2","drawHeight","maxVol","volume","volZoneHeight","volZoneTop","isUp","barH","PriceLabels","labelInterval","forecastData","lowerBound","AlertMarks","alerts","alertUpColor","alertDownColor","formatterFn","alert","displayIndex","price","bgColor","labelText","pctChange","labelWidth","ShadedBackground","_ref6","_useDrawingArea3","LiveTradingChart","_grid$horizontal","_grid$vertical","_props$windowSize","windowSize","_props$forecastSize","forecastSize","_props$running","_props$intervalMs","intervalMs","_props$seed","_props$resetTrigger","resetTrigger","_props$initialPrice","initialPrice","_props$volatility","volatility","_props$drift","drift","_props$forecastVolati","forecastVolatility","_props$alertProbabili","alertProbability","_props$alertThreshold","alertThresholdPct","_props$alertLookback","alertLookback","_props$alertMinDistan","alertMinDistance","_props$maxVisibleAler","maxVisibleAlerts","alertFilter","alertFormatter","_props$candleUpColor","candleUpColor","_props$candleDownColo","candleDownColor","_props$alertUpColor","_props$alertDownColor","_props$uncertaintyOpa","uncertaintyOpacity","_props$showVolume","showVolume","_props$showLabels","showLabels","_props$volumeHeightPc","_props$showGrid","showGrid","_props$xAxisLabel","xAxisLabel","_props$yAxisLabel","yAxisLabel","alertHistory","currentPrice","tickCount","rngRef","candleBufferRef","alertBufferRef","intervalRef","lastResetRef","forecastStartIndex","displayData","setDisplayData","generateForecast","useCallback","lastClose","rng","numPoints","cumUncertainty","shock","prevClose","vol","dft","r2","r3","buf","candle","candidateIdx","candidate","alertFilterFn","alertType","lookback","rangeStart","rangeEnd","isSwingHigh","isSwingLow","lastAlertTick","windowStart","windowed","_generateForecast","visibleAlerts","_useMemo","totalLen","closeData","allValues","xAxisData","forecastStartIdx","BAR_CHART_PLUGINS","useBarChartProps","hasHorizontalSeries","defaultBandXAxis","defaultBandYAxis","processedYAxis","barPlotProps","clipPathGroupProps","clipPathProps","FocusedBar","barSeries","BarChart","BAR_CHART_PRO_PLUGINS","BarChartPro","chartDataProviderProProps","baseProps","useChartContainerProProps","_props$layout","axisClickData","usePro","handleHighlightChange","handleZoomChange","handleItemClick","barItemIdentifier","handleAxisClick","refLineChildren","ChartComponent","MuiBarChart","CandlePlot","ohlcData","labels","bodyWidthRatio","onCandleClick","xBase","bodyBottom","wickTop","wickBottom","VolumePlot","volumeData","maxHeightRatio","volumeHeight","baseY","CandleTooltip","tooltipEnabled","setHoverIndex","CandlestickChart","volumeHeightRatio","hoverData","cats","vols","volumeKey","computedYDomain","allLows","allHighs","dataMin","dataMax","handleCandleClick","ohlc","baseAxis","useMergedRefs","forkRef","createForkRef","didChange","cleanupCallbacks","cleanupCallback","getAlertUtilityClass","AlertRoot","severity","getBackgroundColor","colorSeverity","AlertIcon","AlertMessage","AlertAction","defaultIconMapping","SuccessOutlined","ReportProblemOutlined","ErrorOutline","InfoOutlined","closeText","iconMapping","closeButton","CloseButton","closeIcon","CloseIcon","IconSlot","iconSlotProps","MessageSlot","messageSlotProps","ActionSlot","actionSlotProps","CloseButtonSlot","closeButtonProps","CloseIconSlot","closeIconProps","Close","getRichTreeViewUtilityClass","createUseThemeProps","freeze","EMPTY_OBJECT","TreeViewContext","useTreeViewContext","TreeViewStyleContext","useTreeViewStyleContext","TreeViewProvider","buildPublicAPI","runItemPlugins","itemPluginProps","finalRootRef","finalContentRef","pluginPropEnhancers","pluginPropEnhancersNames","itemPluginManager","listPlugins","itemPlugin","itemPluginResponse","contentRef","propsEnhancers","propsEnhancerName","propEnhancerName","currentSlotName","currentSlotParams","enhancedProps","propsEnhancersForCurrentPlugin","propsEnhancerForCurrentPluginAndSlot","wrapItem","idAttribute","finalChildren","itemsWrapper","listWrappers","itemWrapper","useTreeViewBuildContext","styleContextValue","collapseIcon","expandIcon","getCollapseUtilityClass","CollapseRoot","collapsedSize","CollapseWrapper","CollapseWrapperInner","wrapperInner","Collapse","collapsedSizeProp","wrapperRef","autoTransitionDuration","isHorizontal","getWrapperSize","wrapperSize","duration2","incomingOwnerState","getSwitchBaseUtilityClass","SwitchBaseRoot","SwitchBaseInput","SwitchBase","checkedProp","checkedIcon","defaultChecked","disabledProp","inputProps","inputRef","onChange","setCheckedState","muiFormControl","hasLabelFor","InputSlot","inputSlotProps","newChecked","handleInputChange","getCheckboxUtilityClass","defaultSlotPropsValue","externalSlotPropsValue","typedDefaultSlotProps","CheckboxRoot","indeterminate","defaultCheckedIcon","CheckBox","defaultIcon","CheckBoxOutlineBlank","defaultIndeterminateIcon","IndeterminateCheckBox","Checkbox","iconProp","indeterminateIcon","indeterminateIconProp","externalInputProps","TREE_VIEW_ROOT_PARENT_ID","buildSiblingIndexes","siblingsIndexLookup","childId","isItemDisabled","itemMetaLookup","itemMeta","parentId","buildItemsLookups","storeParameters","depth","isItemExpandable","otherItemsMetaLookup","metaLookup","modelLookup","orderedChildrenIds","itemsChildren","processItem","getItemId","siblingsMetaLookup","checkId","getItemChildren","expandable","selectable","isItemSelectionDisabled","childrenIndexes","EMPTY_CHILDREN","itemsSelectors","domStructure","disabledItemFocusable","itemOrderedChildrenIdsLookup","itemOrderedChildrenIds","itemModel","itemModelLookup","itemChildrenIndexesLookup","itemParentId","itemDepth","canItemBeFocused","itemChildrenIndentation","expandedItemMapSelector","expandedItems","expandedItemsMap","expansionSelectors","expandedItemsRaw","flatList","appendChildren","itemsWithDescendants","triggerSlot","expansionTrigger","isItemExpanded","_itemId","selectedItemsSelector","selectedItems","selectedItemsRaw","selectedItemsMapSelector","selectedItemsMap","isItemSelectableSelector","selectionSelectors","disableSelection","isMultiSelectEnabled","multiSelect","isCheckboxSelectionEnabled","checkboxSelection","propagationRules","selectionPropagation","isItemSelected","isFeatureEnabledForItem","isItemSelectable","isSelectionEnabled","canItemBeSelected","defaultFocusableItemIdSelector","orderedRootItemIds","firstSelectedItem","firstNavigableItem","focusSelectors","defaultFocusableItemId","isItemTheDefaultFocusableItem","focusedItemId","lazyLoadingSelectors","isEmpty","lazyLoadedItems","errors","isItemLoading","itemHasError","itemError","labelSelectors","isItemEditable","isItemBeingEdited","editedItemId","isAnyItemBeingEdited","itemHasChildren","reactChildren","TreeViewItemDepthContext","getLastNavigableItemInArray","getPreviousNavigableItem","previousNavigableSiblingIndex","currentItemId","lastNavigableChild","getNextNavigableItem","firstNavigableChild","currentItemIndex","nextItemIndex","getLastNavigableItem","getFirstNavigableItem","findOrderInTremauxTree","itemAId","itemBId","itemMetaA","itemMetaB","aFamily","bFamily","aAncestor","bAncestor","aAncestorIsCommon","bAncestorIsCommon","continueA","continueB","commonAncestor","ancestorFamily","aSide","bSide","isTargetInDescendants","itemRoot","treeIdSelector","providedTreeId","treeId","idSelectors","treeItemIdAttribute","providedIdAttribute","depthSelector","depthContext","getTreeItemUtilityClass","TreeViewExpandIcon","TreeViewCollapseIcon","pickIcon","treeItemIcon","treeViewIcon","TreeItemIcon","slotsFromTreeItem","slotPropsFromTreeItem","slotsFromTreeView","slotPropsFromTreeView","iconName","Icon","iconProps","tempOwnerState","TreeItemDragAndDropOverlayRoot","darkChannel","TreeItemDragAndDropOverlay","TreeItemProvider","TreeItemLabelInput","TreeItemRoot","TreeItemContent","TreeItemLabel","editable","TreeItemIconContainer","TreeItemGroupTransition","groupTransition","TreeItemErrorContainer","TreeItemLoadingContainer","TreeItemCheckbox","visible","TreeItem","getContextProviderProps","getRootProps","getContentProps","getIconContainerProps","getCheckboxProps","getLabelProps","getGroupTransitionProps","getLabelInputProps","getDragAndDropOverlayProps","getErrorContainerProps","getLoadingContainerProps","pluginRootRef","interactions","isLoading","hasError","isExpandable","isExpanded","isSelected","isDisabled","isEditing","isEditable","editing","toggleItemEditing","labelEditing","setEditedItem","handleExpansion","focusItem","multiple","expansion","setItemExpansion","handleSelection","selection","expandSelectionRange","setItemSelection","keepExistingSelection","shouldBeSelected","handleCheckboxSelection","hasShift","handleSaveItemLabel","newLabel","updateItemLabel","handleCancelItemLabelEditing","useTreeItemUtils","rootRefObject","contentRefObject","handleRootRef","handleContentRef","checkboxRef","shouldBeAccessibleWithTab","sharedPropsEnhancerParams","createRootHandleBlur","otherHandlers","defaultMuiPrevented","getItemDOMElement","removeFocusedItem","createRootHandleKeyDown","handleItemKeyDown","createContentHandleMouseDown","externalProps","externalEventHandlers","enhancedRootProps","enhancedContentProps","enhancedCheckboxProps","checkbox","onDoubleClick","enhancedLabelProps","enhancedLabelInputProps","labelInput","enhancedDragAndDropOverlayProps","dragAndDropOverlay","useTreeItem","classesFromTreeView","iconContainer","errorIcon","loadingIcon","itemContent","itemIconContainer","itemCheckbox","itemLabel","itemGroupTransition","itemLabelInput","itemDragAndDropOverlay","itemErrorIcon","itemLoadingIcon","Content","contentProps","IconContainer","iconContainerProps","labelProps","checkboxProps","GroupTransition","groupTransitionProps","LabelInput","labelInputProps","DragAndDropOverlay","dragAndDropOverlayProps","ErrorIcon","errorContainerProps","LoadingIcon","loadingContainerProps","RichTreeViewItemsContext","selectorNoChildren","selectorChildrenIdsNull","WrappedTreeItem","itemSlot","itemSlotProps","skipChildren","renderItemForRichTreeView","Item","itemProps","RichTreeViewItems","renderItem","useTreeViewRootProps","forwardedProps","handleRootFocus","handleRootBlur","useIsoLayoutEffect","useTreeViewStore","StoreClass","updateStateFromParameters","useLabelEditingItemPlugin","labelInputValue","setLabelInputValue","TreeViewLabelEditingPlugin","register","onItemLabelChange","EventManager","maxListeners","warnOnce","events","on","highPriority","regular","isFirst","removeListener","removeAllListeners","emit","highPriorityListeners","regularListeners","once","oneTimeListener","getExpansionTrigger","TreeViewItemsPlugin","static","newParameters","previousParameters","typedKey","processSiblings","parentIdWithDefault","getItem","getItemTree","getItemFromItemId","itemToMutate","newChildren","getItemOrderedChildrenIds","getParentId","setIsItemDisabled","shouldBeDisabled","getElementById","setItemChildren","getChildrenCount","parentDepth","removeChildren","newMetaMap","newItemOrderedChildrenIdsLookup","newItemChildrenIndexesLookup","deriveStateFromParameters","applyModelInitialValue","controlledValue","globalTreeViewDefaultId","TimeoutManager","timeoutIds","intervalIds","startTimeout","startInterval","clearAll","TreeViewKeyboardNavigationPlugin","typeaheadQuery","labelMap","createLabelMapFromItemMetaLookup","registerStoreEffect","shouldIgnoreItemsStateUpdate","canToggleItemSelection","canToggleItemExpansion","getFirstItemMatchingTypeaheadQuery","newKey","getNextItem","itemIdToCheck","nextItemId","getNextMatchingItemId","matchingItemId","checkedItems","cleanNewKey","concatenatedQuery","concatenatedQueryMatchingItemId","newKeyMatchingItemId","updateLabelMap","ctrlPressed","selectItemFromArrowNavigation","selectRangeFromStartToItem","selectRangeFromItemToEnd","expandAllSiblings","keyCode","selectAllNavigableItems","isPrintableKey","timeoutManager","matchingItem","TreeViewFocusPlugin","checkItemInNewTree","itemToFocusId","setFocusedItemId","applyItemFocus","itemElement","selectorCheckboxSelectionStatus","hasSelectedDescendant","hasUnSelectedDescendant","traverseDescendants","itemToTraverseId","parents","useSelectionItemPlugin","selectionStatus","ariaChecked","TreeViewSelectionPlugin","lastSelectedItem","lastSelectedRange","setSelectedItems","newModel","additionalItemsToPropagate","onItemSelectionToggle","onSelectedItemsChange","oldModel","cleanModel","descendants","shouldRegenerateModel","newModelLookup","getLookupFromArray","getAddedAndRemovedItems","added","removed","addedItemId","selectDescendants","checkAllDescendantsSelected","selectParents","removedItemId","deSelectDescendants","propagateSelection","selectRange","newSelectedItems","selectedItemsLookup","first","getNonDisabledItemsInRange","itemsToAddToModel","newSelected","oldSelected","isSelectedBefore","navigableItems","getAllNavigableItems","newModelMap","lookup","TreeViewExpansionPlugin","setExpandedItems","onExpandedItemsChange","shouldBeExpanded","isExpandedBefore","cleanShouldBeExpanded","eventParameters","isExpansionPrevented","publishEvent","applyItemExpansion","oldExpanded","newExpanded","onItemExpansionToggle","newlyExpandedItemId","addExpandableItems","newItemMetaLookup","TreeViewItemPluginManager","itemPlugins","itemWrappers","MinimalTreeViewStore","initialParameters","eventManager","instanceName","minimalInitialState","buildItemsStateIfNeeded","defaultExpandedItems","defaultSelectedItems","createMinimalInitialState","updateModel","mutableNewState","controlledProp","newMinimalState","shouldRebuildItemsState","previousValue","isPropagationStopped","isSyntheticEvent","subscribeEvent","parametersToStateMapper","ExtendableRichTreeViewStore","RichTreeViewStore","RichTreeViewRoot","RichTreeView","useExtractRichTreeViewParameters","localTheme","outerTheme","mergeOuterLocalTheme","globalStyles","wrapGlobalLayer","upperTheme","resolvedTheme","styleArg","EMPTY_THEME","useThemeScoping","isPrivate","mergedTheme","upperPrivateTheme","engineTheme","privateTheme","rtlValue","layerOrder","styleElement","useLayerOrder","ThemeProviderNoVars","scopedTheme","DEFAULT_MODE_STORAGE_KEY","DEFAULT_COLOR_SCHEME_STORAGE_KEY","DEFAULT_ATTRIBUTE","storageWindow","localStorage","setItem","getSystemMode","processState","systemMode","defaultConfig","CssVarsProvider","InternalCssVarsProvider","useColorScheme","getInitColorSchemeScript","deprecatedGetInitColorSchemeScript","modeStorageKey","defaultModeStorageKey","colorSchemeStorageKey","defaultColorSchemeStorageKey","disableTransitionOnChange","designSystemTransitionOnChange","resolveTheme","defaultContext","allColorSchemes","darkColorScheme","lightColorScheme","setColorScheme","setMode","ColorSchemeContext","defaultColorSchemes","defaultComponents","defaultLightColorScheme","defaultDarkColorScheme","themeProp","storageManager","documentNode","colorSchemeNode","disableNestedContext","disableStyleSheetGeneration","defaultMode","initialMode","hasMounted","ctx","initialTheme","restThemeProp","joinedColorSchemes","stateMode","stateColorScheme","supportedColorSchemes","isMultiSchemes","modeStorage","lightStorage","darkStorage","isClient","setIsClient","getColorScheme","currentState","newMode","newLightColorScheme","newDarkColorScheme","handleMediaQuery","mediaListener","media","addListener","unsubscribeMode","unsubscribeLight","unsubscribeDark","useCurrentColorScheme","memoTheme","calculatedColorScheme","schemeKey","classList","shouldGenerateStyleSheet","initialAttribute","setter","suppressHydrationWarning","dangerouslySetInnerHTML","__html","InitColorSchemeScript","createCssVarsProvider","newTheme","noVarsTheme","ICON_MAP","ExpandMore","ExpandMoreIcon","ChevronRight","ChevronRightIcon","Folder","FolderIcon","FolderOpen","FolderOpenIcon","InsertDriveFile","InsertDriveFileIcon","Remove","RemoveIcon","Add","AddIcon","ArrowDropDown","ArrowDropDownIcon","ArrowRight","ArrowRightIcon","AccountTree","AccountTreeIcon","Description","DescriptionIcon","Code","CodeIcon","Image","ImageIcon","Settings","SettingsIcon","Home","HomeIcon","Star","StarIcon","Delete","DeleteIcon","Edit","EditIcon","Visibility","VisibilityIcon","Lock","LockIcon","ShowChart","ShowChartIcon","BarChartIcon","PieChartIcon","ScatterPlotIcon","GridOn","GridOnIcon","Timeline","TimelineIcon","CandlestickChartIcon","Speed","SpeedIcon","Layers","LayersIcon","TrendingUp","TrendingUpIcon","History","HistoryIcon","PlayArrow","PlayArrowIcon","Tune","TuneIcon","Brush","BrushIcon","Highlight","HighlightIcon","Sync","SyncIcon","ZoomIn","TouchApp","TouchAppIcon","TableChart","TableChartIcon","StackedBarChart","StackedBarChartIcon","Palette","PaletteIcon","Rule","RuleIcon","Mouse","MouseIcon","CheckBoxIcon","UnfoldMore","UnfoldMoreIcon","Block","BlockIcon","Diamond","DiamondIcon","AutoGraph","AutoGraphIcon","ViewList","ViewListIcon","GpsFixed","GpsFixedIcon","ContentCopy","ContentCopyIcon","PersonAdd","PersonAddIcon","CheckCircle","CheckCircleIcon","Archive","ArchiveIcon","MoreVert","MoreVertIcon","resolveIcon","readMantineScheme","lightTheme","createTheme","darkTheme","TreeView","getItemIdProp","getItemLabelProp","getItemChildrenProp","editableItems","disabledItems","ariaLabel","ariaLabelledBy","isItemDisabledFn","disabledSet","isItemEditableFn","editableSet","handleSelectedItemsChange","itemIds","handleExpandedItemsChange","event_timestamp","handleItemFocus","handleItemLabelChange","editedItemLabel","containerStyle","setScheme","sync","obs","MutationObserver","attributeFilter","disconnect","useMantineColorScheme","ThemeProvider","getSimpleTreeViewUtilityClass","TreeViewChildrenItemContext","TreeViewChildrenItemProvider","childrenIdAttrToIdRef","previousChildrenIds","escapedIdAttr","childrenElements","childrenIds","jsxItems","setJSXItemsOrderedChildrenIds","registerChild","childIdAttribute","childItemId","unregisterChild","useJSXItemsItemPlugin","parentContext","pluginContentRef","isMountedRef","ownerTokenRef","upsertJSXItem","mapLabelFromJSX","jsxItemsitemWrapper","TreeViewJSXItemsPlugin","itemOwners","ownerToken","currentOwner","existingMeta","hasChanges","newItemModelLookup","newMap","SimpleTreeViewStore","SimpleTreeViewRoot","useExtractSimpleTreeViewParameters","renderItems","IconComponent","SimpleTreeView","_ref$items","_ref$multiSelect","_ref$checkboxSelectio","_ref$disableSelection","_ref$expansionTrigger","_ref$disabledItemsFoc","_ref$itemChildrenInde","MuiSimpleTreeView","getRichTreeViewProUtilityClass","DataSourceCacheDefault","ttl","expiry","RequestStatus","NestedDataManager","pendingRequests","queuedRequests","settledRequests","lazyLoadingPlugin","maxConcurrentRequests","MAX_CONCURRENT_REQUESTS","processQueue","loopLength","fetchQueue","fetchPromises","fetchItemChildren","loadingIds","setRequestSettled","clearPendingRequest","getRequestStatus","PENDING","QUEUED","SETTLED","UNKNOWN","getActiveRequestsCount","TREE_VIEW_LAZY_LOADED_ITEMS_INITIAL_STATE","TreeViewLazyLoadingPlugin","nestedDataManager","dataSourceCache","dataSource","handleBeforeItemToggleExpansion","newlyExpandableItems","getExpandableItemsFromDataSource","fetchChildrenIfExpanded","parentIds","itemsToLazyLoad","fetchItems","fetchAllExpandedItems","setItemLoading","itemIdWithDefault","setItemError","updateItemChildren","forceRefresh","getTreeItems","cachedData","response","childrenFetchError","itemsReorderingSelectors","currentReorder","draggedItemProperties","targetItemId","targetDepth","newPosition","isDragging","draggedItemId","canItemBeReordered","isItemReorderable","isAncestor","itemIdA","itemIdB","useTreeViewItemsReorderingItemPlugin","validActionsRef","draggable","onDragStart","dataTransfer","effectAllowed","setDragImage","setData","itemsReordering","startDraggingItem","onDragOver","onDragEnd","dropEffect","completeDraggingItem","cancelDraggingItem","onDragEnter","getDroppingTargetValidActions","setDragTargetItem","validActions","targetHeight","cursorY","cursorX","contentElement","TreeViewItemsReorderingPlugin","canMoveItemToNewPosition","targetItemMeta","targetItemIndex","draggedItemMeta","draggedItemIndex","isTargetLastSibling","oldPosition","positionsAfterAction","positionAfterAction","checkIfPositionIsValid","itemToMoveId","itemToMoveMeta","oldParentId","newParentId","updatedChildren","updatedOldParentChildren","updatedNewParentChildren","itemChildrenIndexes","updateExpandable","itemToMoveDepth","updateItemDepth","moveItemInTree","onItemPositionChange","prevItemReorder","itemChildrenIndentationPx","pixelExec","tempElement","parseItemChildrenIndentation","chooseActionToApply","DEFAULT_IS_ITEM_REORDERABLE_WHEN_ENABLED","DEFAULT_IS_ITEM_REORDERABLE_WHEN_DISABLED","rawMapper","RichTreeViewProStore","lazyLoading","RichTreeViewProRoot","RichTreeViewPro","useExtractRichTreeViewProParameters","clip","getNewValue","asc","findClosest","trackFinger","touchId","changedTouches","valueToPercent","setValueIndex","focusThumb","sliderRef","activeIndex","setActive","areValuesEqual","oldValue","array1","array2","itemComparer","axisProps","leap","Identity","cachedSupportsTouchActionNone","doesSupportTouchActionNone","CSS","supports","useSlider","ariaLabelledby","disableSwap","marksProp","onChangeCommitted","shiftStep","valueProp","setOpen","dragging","setDragging","moveCount","lastChangedValue","valueDerived","setValueState","handleChange","thumbIndex","clonedEvent","writable","marksValues","focusedThumbIndex","setFocusedThumbIndex","createHandleHiddenInputFocus","createHandleHiddenInputBlur","changeValue","valueInput","marksIndex","maxMarksValue","createHandleHiddenInputKeyDown","stepSize","currentMarkIndex","incrementKeys","getFingerNewValue","finger","percentToValue","nearest","num","parts","matissaDecimalPart","decimalPart","getDecimalPrecision","roundValueToStep","stopListening","trackOffset","trackLeap","createHandleMouseLeave","cssWritingMode","getHiddenInputProps","externalHandlers","ownEventHandlers","mergedEventHandlers","writingMode","getThumbProps","getThumbStyle","getSliderUtilityClass","SliderRoot","marked","trackInverted","trackFalse","SliderRail","rail","SliderTrack","SliderThumb","valueLabelOpen","valueLabelCircle","valueLabelLabel","useValueLabelClasses","valueLabel","SliderMark","markActive","SliderMarkLabel","markLabel","markLabelActive","Forward","ariaValuetext","getAriaLabel","getAriaValueText","valueLabelDisplay","valueLabelFormat","RailSlot","Rail","TrackSlot","Track","ThumbSlot","Thumb","ValueLabelSlot","ValueLabel","MarkSlot","MarkLabelSlot","MarkLabel","Input","railSlotProps","trackSlotProps","thumbSlotProps","valueLabelSlotProps","markSlotProps","markLabelSlotProps","Slot","railProps","trackProps","thumbProps","valueLabelProps","markProps","markLabelProps","inputSliderProps","ValueLabelComponent","Fade","defaultTimeout","webkitTransition","getBackdropUtilityClass","BackdropRoot","invisible","Backdrop","createChainedFunction","funcs","ariaHidden","hide","getPaddingRight","ariaHiddenSiblings","mountElement","currentElement","elementsToExclude","isNotExcludedElement","isNotForbiddenElement","isForbiddenTagName","isInputHidden","isAriaHiddenForbiddenOnElement","findIndexOf","manager","modals","containers","modalIndex","modalRef","hiddenSiblings","getHiddenSiblings","containerIndex","restore","containerInfo","restoreStyle","disableScrollLock","isOverflowing","scrollContainer","DocumentFragment","parentElement","containerWindow","removeProperty","handleContainer","ariaHiddenState","nextTop","isTopModal","getModalUtilityClass","ModalRoot","ModalBackdrop","backdrop","Modal","BackdropComponent","BackdropProps","closeAfterTransition","disableEscapeKeyDown","hideBackdrop","onBackdropClick","onTransitionEnter","onTransitionExited","propsWithDefaults","getBackdropProps","portalRef","hasTransition","mountNodeRef","getHasTransition","ariaHiddenProp","getModal","handleMounted","resolvedContainer","handlePortalRef","createHandleKeyDown","which","createHandleBackdropClick","propsEventHandlers","BackdropSlot","backdropProps","getPopoverUtilityClass","getOffsetTop","getOffsetLeft","getTransformOriginValue","PopoverRoot","PopoverPaper","Popover","anchorOrigin","anchorPosition","anchorReference","marginThreshold","PaperProps","PaperPropsProp","transitionDurationProp","paperRef","getAnchorOffset","anchorRect","getTransformOrigin","elemRect","getPositioningStyle","elemTransformOrigin","anchorOffset","heightThreshold","widthThreshold","isPositioned","setIsPositioned","setPositioningStyles","positioning","updatePosition","handleResize","rootSlotsProp","rootSlotPropsProp","PaperSlot","paperProps","getMenuUtilityClass","RTL_ORIGIN","LTR_ORIGIN","MenuRoot","MenuPaper","WebkitOverflowScrolling","MenuMenuList","disableAutoFocusItem","MenuListProps","PopoverClasses","menuListActionsRef","paperSlotProps","ListSlot","listSlotProps","MANTINE_NAME_RE","ItemControlsContext","KebabSubMenu","onLeaf","setAnchor","IconComp","onMouseEnter","ListItemIcon","ListItemText","Menu","KebabEntries","ItemLabelWithControls","_ctx$sliderValues","menuAnchor","setMenuAnchor","externalValue","sliderValues","initial","localValue","setLocalValue","isDraggingRef","controlsItemSet","sliderMin","sliderMax","sliderStep","sliderColor","onSliderChange","kebabMenuItems","kebabMenuItemsById","onKebabAction","menuEntries","stopReact","blockNativeDrag","EditableLabelInput","innerRef","restoreRef","setRefs","stopOnly","CustomTreeItem","TreeViewPro","_ref4$items","itemsProp","_ref4$licenseKey","_ref4$getItemId","_ref4$getItemLabel","_ref4$getItemChildren","_ref4$multiSelect","_ref4$checkboxSelecti","_ref4$disableSelectio","_ref4$expansionTrigge","_ref4$isItemEditable","_ref4$disabledItemsFo","_ref4$itemChildrenInd","_ref4$itemsReordering","reorderableItems","_ref4$lazyLoading","lazyLoadedChildren","_ref4$showItemControl","showItemControls","controlsItems","_ref4$sliderMin","_ref4$sliderMax","_ref4$sliderStep","mergeChildren","nodeList","nodeId","loadedKids","existingChildren","mergedChildren","_defineProperty","isItemReorderableFn","sliderValuesRef","handleSliderChange","committed","sliderChange","handleKebabAction","kebabAction","resolvedSliderColor","resolveSliderColor","controlsContextValue","findItem","targetId","found","lazyLoadRequest","orderedRef","handleItemPositionChange","updated","idField","childrenField","idK","childK","moved","removeFrom","kids","insertTo","applyReorder","itemPositionChanged","orderedItems","PickerAdapterContext","otherInProps","adapter","parentAdapter","utils","dateAdapter","DateAdapter","dateFormats","dateLibInstance","adapterLocale","isMUIAdapter","defaultDates","minDate","maxDate","localizedFormat","weekOfYear","advancedFormat","formatTokenMap","sectionType","contentType","dd","ddd","dddd","defaultFormats","monthShort","dayOfMonth","dayOfMonthFull","weekday","weekdayShort","hours24h","hours12h","fullDate","keyboardDate","shortDate","normalDate","normalDateWithWeekday","fullTime12h","fullTime24h","keyboardDateTime12h","keyboardDateTime24h","MISSING_UTC_PLUGIN","MISSING_TIMEZONE_PLUGIN","AdapterDayjs","isTimezoneCompatible","lib","escapedCharacters","setLocaleToValue","expectedLocale","getCurrentLocaleCode","hasUTCPlugin","hasTimezonePlugin","comparing","comparisonTemplate","comparingInValueTimezone","setTimezone","getTimezone","cleanTimezone","timezone","guess","createSystemDate","createUTCDate","createTZDate","keepLocalTime","tz","getLocaleFormats","locales","localeObject","adjustOffset","fixedValue","getInvalidDate","$timezone","isUTC","local","toJsDate","is12HourCycleInCurrentLocale","expandFormat","localeFormats","formatKey","formatByString","formatString","formatNumber","numberToFormat","isSameYear","isSameMonth","isSameDay","isSameHour","isAfterYear","isAfterDay","isBeforeYear","isBeforeDay","isWithinRange","startOfYear","startOfMonth","startOfWeek","startOfDay","endOfYear","endOfMonth","endOfWeek","endOfDay","addYears","amount","addMonths","addWeeks","addDays","addHours","addMinutes","addSeconds","getYear","setYear","setMinutes","setSeconds","setMilliseconds","getDaysInMonth","getWeekArray","nestedWeeks","weekNumber","getWeekNumber","getDayOfWeek","getYearRange","startDate","endDate","enUSPickers","previousMonth","nextMonth","openPreviousView","openNextView","calendarViewSwitchingButtonAriaLabel","view","endTime","cancelButtonLabel","clearButtonLabel","okButtonLabel","todayButtonLabel","nextStepButtonLabel","datePickerToolbarTitle","dateTimePickerToolbarTitle","timePickerToolbarTitle","dateRangePickerToolbarTitle","timeRangePickerToolbarTitle","clockLabelText","formattedTime","hoursClockNumberText","minutesClockNumberText","secondsClockNumberText","selectViewText","calendarWeekNumberHeaderLabel","calendarWeekNumberHeaderText","calendarWeekNumberAriaLabelText","calendarWeekNumberText","openDatePickerDialogue","formattedDate","openTimePickerDialogue","openRangePickerDialogue","formattedRange","fieldClearLabel","timeTableLabel","dateTableLabel","fieldYearPlaceholder","digitAmount","fieldMonthPlaceholder","fieldDayPlaceholder","fieldWeekDayPlaceholder","fieldHoursPlaceholder","fieldMinutesPlaceholder","fieldSecondsPlaceholder","fieldMeridiemPlaceholder","weekDay","empty","usePickerTranslations","ArrowLeftIcon","getPickersArrowSwitcherUtilityClass","PickerPrivateContext","isPickerDisabled","isPickerReadOnly","isPickerValueEmpty","isPickerOpen","pickerVariant","pickerOrientation","labelId","dismissViews","hasUIView","getCurrentViewMode","triggerElement","viewContainerRole","defaultActionBarActions","onPopperExited","usePickerPrivateContext","_excluded3","PickersArrowSwitcherRoot","PickersArrowSwitcherSpacer","PickersArrowSwitcherButton","isButtonHidden","PickersArrowSwitcher","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","spacer","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon","isHidden","goTo","previousProps","PreviousIconButton","previousIconButtonProps","NextIconButton","nextIconButtonProps","LeftArrowIcon","leftArrowIconProps","RightArrowIcon","rightArrowIconProps","convertValueToMeridiem","ampm","getSecondsInDay","createIsAfterIgnoreDatePart","disableIgnoringDatePartForTimeValidation","dateLeft","dateRight","DEFAULT_STEP_NAVIGATION","hasNextStep","hasSeveralSteps","goToNextStep","areViewsInSameStep","PickerViewRoot","getTimeClockUtilityClass","clockCenter","CLOCK_WIDTH","getAngleValue","deg","getClockPointerUtilityClass","ClockPointerRoot","isClockPointerAnimated","ClockPointerThumb","isClockPointerBetweenTwoValues","ClockPointer","isBetweenTwoClockValues","isInner","viewValue","previousType","pickerOwnerState","getAngleStyle","getClockUtilityClass","mergeDateAndTime","dateParam","timeParam","mergedDate","getTodayDate","valueType","formatMeridiem","ClockRoot","ClockClock","ClockWrapper","ClockSquareMask","isClockDisabled","ClockPin","meridiemButtonCommonStyles","clockMeridiemMode","ClockAmButton","ClockPmButton","ClockMeridiemText","Clock","ampmInClock","handleMeridiemChange","isTimeDisabled","meridiemMode","minutesStep","selectedId","viewRange","minViewValue","maxViewValue","translations","isMoving","squareMask","pin","amButton","pmButton","meridiemText","isSelectedTimeDisabled","isPointerInner","handleValueChange","isFinish","newSelectedValue","angleStep","handleTouchSelection","isPointerBetweenTwoClockValues","keyboardControlStep","listboxRef","clampValue","circleValue","getClockNumberUtilityClass","clockNumberClasses","ClockNumberRoot","isClockNumberInInnerRing","ClockNumber","isClockNumberSelected","isClockNumberDisabled","getHourNumbers","getClockNumberText","currentHours","hourNumbers","endHour","getMinutesNumbers","numberValue","SECTION_TYPE_GRANULARITY","roundDate","roundedDate","singleItemValueManager","emptyValue","getTodayValue","getInitialReferenceValue","referenceDate","inGetTodayDate","minTime","maxTime","getDefaultReferenceDate","cleanValue","isSameError","defaultErrorState","TimeClockRoot","TimeClockArrowSwitcher","TIME_CLOCK_DEFAULT_VIEWS","referenceDateProp","disableFuture","disablePast","shouldDisableTime","showViewSwitcher","inView","views","openTo","onViewChange","focusedView","onFocusedViewChange","timezoneProp","onChangeProp","valueManager","valueWithInputTimezone","inputTimezone","setInputTimezone","timezoneToRender","otherParams","newValueWithInputTimezone","useControlledValue","valueOrReferenceDate","useClockReferenceDate","useNow","setView","previousView","nextView","setValueAndGoToNextView","inFocusedView","getStepNavigation","previousOpenTo","previousViews","defaultFocusedView","setFocusedView","stepNavigation","viewIndex","handleFocusedViewChange","viewToFocus","prevFocusedView","handleChangeView","newView","goToNextView","currentViewSelectionState","selectedView","isSelectionFinishedOnCurrentView","hasMoreViews","currentView","viewToNavigateTo","useViews","selectionState","cleanDate","getMeridiem","timeWithMeridiem","newHoursAmount","convertToMeridiem","useMeridiemMode","rawValue","viewType","shouldCheckPastEnd","containsValidTime","isValidValue","timeValue","valueWithMeridiem","dateWithNewHours","dateWithNewMinutes","dateWithNewSeconds","viewProps","handleHoursChange","hourValue","minutesValue","handleMinutesChange","minuteValue","secondsValue","handleSecondsChange","secondValue","arrowSwitcher","TIME_ONLY_RE","parseToDayjs","withTime","dayjs","TimeClock","dValue","dDefault","dMinTime","dMaxTime","newVal","timeData","formatted","handleViewChange","clockProps","LocalizationProvider","MuiTimeClock"],"ignoreList":[],"sourceRoot":""} \ No newline at end of file diff --git a/dash_mui_charts/metadata.json b/dash_mui_charts/metadata.json index 97df806..43b1f5b 100644 --- a/dash_mui_charts/metadata.json +++ b/dash_mui_charts/metadata.json @@ -1 +1 @@ -{"src/lib/components/BarChart.react.js":{"description":"BarChart \u2014 Dash wrapper for MUI X BarChart (Community) and BarChartPro (Pro).\n\nRenders vertical or horizontal bar charts with support for stacking, bar labels,\ndataset mode, color maps, reference lines, highlighting, and Pro features\n(zoom, toolbar, brush).","displayName":"BarChart","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"series":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Array of bar series objects. Each series can contain:\n- data (number[]): Bar values\n- dataKey (string): Column key when using dataset prop\n- label (string): Series label for legend/tooltip\n- color (string): Series color\n- stack (string): Stack group ID (series with same value are stacked)\n- stackOffset (string): 'none', 'expand', 'diverging', 'silhouette', 'wiggle'\n- stackOrder (string): 'none', 'appearance', 'ascending', 'descending', 'insideOut', 'reverse'\n- barLabel (string): 'value' or 'formattedValue' to show labels on bars\n- barLabelPlacement (string): 'center' or 'outside'\n- highlightScope (object): {highlight, fade} highlight behavior\n- yAxisId (string): Y-axis binding for biaxial charts\n- id (string): Unique series identifier"},"dataset":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Array of row objects for dataKey-based series.\nExample: [{month: 'Jan', sales: 100}, {month: 'Feb', sales: 150}]"},"xAxis":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"X-axis configuration array. For bar charts, typically uses scaleType: 'band'.\nEach axis can contain:\n- data (array): Category labels\n- dataKey (string): Column key from dataset\n- scaleType (string): 'band' (required for bars), 'linear', 'log', etc.\n- label (string): Axis label text\n- categoryGapRatio (number): Gap between categories (0-1)\n- barGapRatio (number): Gap between bars in same category (-1 to Infinity)\n- tickPlacement (string): 'start', 'end', 'middle', 'extremities'\n- tickLabelPlacement (string): 'tick' or 'middle'\n- colorMap (object): Color mapping configuration\n- zoom (object): Zoom config for Pro features\n- id (string): Axis identifier\n- position (string): 'top', 'bottom', 'none'\n- min/max (number): Domain limits\n- reverse (bool): Reverse axis direction\n- tickNumber (number): Approximate tick count\n- tickMinStep/tickMaxStep (number): Control tick spacing\n- tickLabelStyle (object): CSS for tick labels\n- labelStyle (object): CSS for axis label\n- disableLine (bool): Hide axis line\n- disableTicks (bool): Hide tick marks\n- domainLimit (string): 'nice' or 'strict'\n- height (number): Space reserved for axis"},"yAxis":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Y-axis configuration array. Same structure as xAxis."},"layout":{"type":{"name":"enum","value":[{"value":"'vertical'","computed":false},{"value":"'horizontal'","computed":false}]},"required":false,"description":"Bar direction: 'vertical' (default) or 'horizontal'."},"borderRadius":{"type":{"name":"number"},"required":false,"description":"Border radius for bar corners in pixels."},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels."},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not set, uses parent container width."},"margin":{"type":{"name":"exact","value":{"top":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false},"right":{"name":"number","required":false}}},"required":false,"description":"Chart margins: {top, bottom, left, right} in pixels."},"grid":{"type":{"name":"exact","value":{"horizontal":{"name":"bool","required":false},"vertical":{"name":"bool","required":false}}},"required":false,"description":"Background grid lines: {horizontal: bool, vertical: bool}."},"colors":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Color palette array for series colors."},"skipAnimation":{"type":{"name":"bool"},"required":false,"description":"Disable animations."},"loading":{"type":{"name":"bool"},"required":false,"description":"Show loading overlay."},"hideLegend":{"type":{"name":"bool"},"required":false,"description":"Hide the legend."},"renderer":{"type":{"name":"enum","value":[{"value":"'svg-single'","computed":false},{"value":"'svg-batch'","computed":false}]},"required":false,"description":"Renderer strategy: 'svg-single' (default) or 'svg-batch' for large datasets."},"axisHighlight":{"type":{"name":"exact","value":{"x":{"name":"enum","value":[{"value":"'band'","computed":false},{"value":"'line'","computed":false},{"value":"'none'","computed":false}],"required":false},"y":{"name":"enum","value":[{"value":"'band'","computed":false},{"value":"'line'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Axis highlight configuration: {x: 'band'|'line'|'none', y: 'band'|'line'|'none'}."},"tooltip":{"type":{"name":"exact","value":{"trigger":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'axis'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Tooltip configuration: {trigger: 'item'|'axis'|'none'}."},"highlightedItem":{"type":{"name":"object"},"required":false,"description":"Controlled highlight state. Both input (to set highlight) and output\n(fires on hover). Object: {seriesId, dataIndex} or null."},"referenceLines":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Reference lines array. Each object:\n- x (string|number): Vertical line at this x value\n- y (number): Horizontal line at this y value\n- axisId (string): Which axis (when multiple)\n- label (string): Text label\n- labelAlign (string): 'start', 'middle', 'end'\n- lineStyle (object): SVG style for the line\n- labelStyle (object): SVG style for the label\n- spacing (object): Label offset"},"licenseKey":{"type":{"name":"string"},"required":false,"description":"MUI X Pro license key. Required for zoom, brush, and toolbar features."},"initialZoom":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Initial zoom state (Pro). Array of {axisId, start, end}."},"showSlider":{"type":{"name":"bool"},"required":false,"description":"Show zoom range slider below the chart (Pro)."},"showToolbar":{"type":{"name":"bool"},"required":false,"description":"Show zoom/export toolbar above the chart (Pro)."},"brushConfig":{"type":{"name":"object"},"required":false,"description":"Brush selection config (Pro): {enabled: bool, preventTooltip: bool, preventHighlight: bool}."},"zoomInteractionConfig":{"type":{"name":"object"},"required":false,"description":"Zoom interaction configuration (Pro). Controls drag, wheel, pinch, brush zoom behaviors."},"clickData":{"type":{"name":"object"},"required":false,"description":"Fires on bar click. Contains: {seriesId, dataIndex, timestamp}."},"axisClickData":{"type":{"name":"object"},"required":false,"description":"Fires on axis area click. Contains: {axisValue, dataIndex, seriesValues, timestamp}."},"zoomData":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Zoom state output (Pro). Fires on zoom change."},"n_clicks":{"type":{"name":"number"},"required":false,"description":"Number of times bars have been clicked."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash callback function."}}},"src/lib/components/CandlestickChart.react.js":{"description":"CandlestickChart \u2014 Dash wrapper that renders OHLC candlestick charts\nusing MUI X Charts Pro composition API with custom SVG candle rendering.\n\nSupports:\n- Array format: series[0].data = [[open, high, low, close], ...]\n- Dataset format: dataset + series[0].datasetKeys = {open, high, low, close}\n- Volume overlay (optional)\n- Reference lines\n- Grid, axes, zoom (Pro), toolbar (Pro)\n- Click events","displayName":"CandlestickChart","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"series":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"OHLC candlestick series. Typically a single series with two data formats:\n\nArray format:\n series=[{data: [[open,high,low,close], ...], upColor: '#4caf50', downColor: '#f44336'}]\n\nDataset format (use with dataset prop):\n series=[{datasetKeys: {open:'open', high:'high', low:'low', close:'close'},\n upColor: '#4caf50', downColor: '#f44336'}]\n\nOptional volume:\n series=[{..., volume: [100, 200, ...]}] (array format)\n series=[{..., volumeKey: 'volume'}] (dataset format)\n\nSeries properties:\n- data (array): Array of [open, high, low, close] tuples or {open, high, low, close} objects\n- datasetKeys (object): {open, high, low, close} mapping to dataset columns\n- upColor (string): Color when close >= open (default: '#4caf50')\n- downColor (string): Color when close < open (default: '#f44336')\n- volume (array): Volume values for each candle\n- volumeKey (string): Dataset column name for volume data"},"dataset":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Dataset for datasetKeys mode. Array of row objects.\nExample: [{date: '2025-01-02', open: 100, high: 110, low: 95, close: 105, volume: 1000}, ...]"},"xAxis":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"X-axis configuration. Typically band scale with dates/labels.\n- data (array): Category labels (dates, day names, etc.)\n- dataKey (string): Column from dataset for labels\n- label (string): Axis label text\n- scaleType (string): Always 'band' for candlestick (set automatically)\n- zoom (object): Zoom config for Pro features\n- tickLabelStyle (object): CSS for tick labels\n- tickPlacement (string): 'start', 'end', 'middle', 'extremities'"},"yAxis":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Y-axis configuration for price values.\n- label (string): Axis label (e.g., 'Price ($)')\n- min/max (number): Override auto-computed domain from OHLC data\n- position (string): 'left' or 'right'"},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels."},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not set, uses parent container width."},"margin":{"type":{"name":"exact","value":{"top":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false},"right":{"name":"number","required":false}}},"required":false,"description":"Chart margins: {top, bottom, left, right} in pixels."},"grid":{"type":{"name":"exact","value":{"horizontal":{"name":"bool","required":false},"vertical":{"name":"bool","required":false}}},"required":false,"description":"Background grid lines: {horizontal: bool, vertical: bool}."},"skipAnimation":{"type":{"name":"bool"},"required":false,"description":"Disable animations."},"hideLegend":{"type":{"name":"bool"},"required":false,"description":"Hide the legend (default: true for candlestick)."},"tooltip":{"type":{"name":"exact","value":{"trigger":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Tooltip configuration: {trigger: 'item'|'none'}.\nSet trigger to 'none' to disable the OHLC tooltip."},"bodyWidthRatio":{"type":{"name":"number"},"required":false,"description":"Candle body width as a ratio of the band width (0-1). Default: 0.6."},"wickWidth":{"type":{"name":"number"},"required":false,"description":"Wick (shadow) line width in pixels. Default: 2."},"showVolume":{"type":{"name":"bool"},"required":false,"description":"Show volume bars below candles. Requires volume data in series."},"volumeHeightRatio":{"type":{"name":"number"},"required":false,"description":"Volume bars maximum height as ratio of chart height (0-1). Default: 0.2."},"referenceLines":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Reference lines array. Same format as BarChart/LineChart."},"licenseKey":{"type":{"name":"string"},"required":false,"description":"MUI X Pro license key. Required for zoom, slider, and toolbar."},"initialZoom":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Initial zoom state (Pro). Array of {axisId, start, end}."},"showSlider":{"type":{"name":"bool"},"required":false,"description":"Show zoom range slider (Pro)."},"showToolbar":{"type":{"name":"bool"},"required":false,"description":"Show toolbar (Pro)."},"zoomInteractionConfig":{"type":{"name":"object"},"required":false,"description":"Zoom interaction configuration (Pro)."},"clickData":{"type":{"name":"object"},"required":false,"description":"Fires on candle click. Contains: {dataIndex, label, open, high, low, close, timestamp}."},"hoverData":{"type":{"name":"object"},"required":false,"description":"Hover data output (reserved for future use)."},"zoomData":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Zoom state output (Pro)."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash callback function."}}},"src/lib/components/CompositeChart.react.js":{"description":"CompositeChart component for layering multiple chart types together.\nUses MUI X Charts composition API to render scatter, line, and area plots\non a single chart surface. Each series must specify its type ('scatter' or 'line').\nSupports Pro features like zoom/pan with a license key.","displayName":"CompositeChart","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"licenseKey":{"type":{"name":"string"},"required":false,"description":"MUI X Pro license key. Required for zoom/pan/toolbar features."},"series":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"type":{"name":"enum","value":[{"value":"'scatter'","computed":false},{"value":"'line'","computed":false}],"required":true},"id":{"name":"string","required":false},"label":{"name":"string","required":false},"color":{"name":"string","required":false},"data":{"name":"union","value":[{"name":"arrayOf","value":{"name":"number"}},{"name":"arrayOf","value":{"name":"shape","value":{"x":{"name":"number","required":false},"y":{"name":"number","required":false},"id":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false}}}}],"required":false},"datasetKeys":{"name":"shape","value":{"x":{"name":"string","required":false},"y":{"name":"string","required":false}},"required":false},"markerSize":{"name":"number","required":false},"preview":{"name":"shape","value":{"markerSize":{"name":"number","required":false}},"required":false},"area":{"name":"bool","required":false},"curve":{"name":"enum","value":[{"value":"'linear'","computed":false},{"value":"'monotoneX'","computed":false},{"value":"'monotoneY'","computed":false},{"value":"'natural'","computed":false},{"value":"'step'","computed":false},{"value":"'stepBefore'","computed":false},{"value":"'stepAfter'","computed":false},{"value":"'catmullRom'","computed":false},{"value":"'bumpX'","computed":false},{"value":"'bumpY'","computed":false}],"required":false},"showMark":{"name":"bool","required":false},"yAxisId":{"name":"string","required":false},"xAxisId":{"name":"string","required":false},"highlightScope":{"name":"shape","value":{"highlight":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'series'","computed":false},{"value":"'none'","computed":false}],"required":false},"fade":{"name":"enum","value":[{"value":"'global'","computed":false},{"value":"'series'","computed":false},{"value":"'none'","computed":false}],"required":false}},"required":false},"stack":{"name":"string","required":false},"connectNulls":{"name":"bool","required":false}}}},"required":false,"description":"Array of series to display. Each series MUST include a 'type' field.\n\nScatter series:\n{type: 'scatter', id, label, color, markerSize, data: [{x, y, id}], highlightScope}\n\nLine series:\n{type: 'line', id, label, color, data: [...], area, curve, showMark, highlightScope, yAxisId}"},"xAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"label":{"name":"string","required":false},"scaleType":{"name":"enum","value":[{"value":"'linear'","computed":false},{"value":"'log'","computed":false},{"value":"'time'","computed":false},{"value":"'band'","computed":false},{"value":"'point'","computed":false},{"value":"'sqrt'","computed":false},{"value":"'symlog'","computed":false},{"value":"'utc'","computed":false},{"value":"'pow'","computed":false}],"required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"data":{"name":"array","required":false},"dataKey":{"name":"string","required":false},"position":{"name":"enum","value":[{"value":"'top'","computed":false},{"value":"'bottom'","computed":false},{"value":"'none'","computed":false}],"required":false},"reverse":{"name":"bool","required":false},"colorMap":{"name":"object","required":false},"tickLabelStyle":{"name":"object","required":false},"labelStyle":{"name":"object","required":false},"tickMinStep":{"name":"number","required":false},"tickMaxStep":{"name":"number","required":false},"tickNumber":{"name":"number","required":false},"tickSize":{"name":"number","required":false},"tickSpacing":{"name":"number","required":false},"tickLabelMinGap":{"name":"number","required":false},"tickLabelPlacement":{"name":"enum","value":[{"value":"'middle'","computed":false},{"value":"'tick'","computed":false}],"required":false},"tickPlacement":{"name":"enum","value":[{"value":"'start'","computed":false},{"value":"'end'","computed":false},{"value":"'middle'","computed":false},{"value":"'extremities'","computed":false}],"required":false},"height":{"name":"number","required":false},"disableLine":{"name":"bool","required":false},"disableTicks":{"name":"bool","required":false},"domainLimit":{"name":"enum","value":[{"value":"'nice'","computed":false},{"value":"'strict'","computed":false}],"required":false},"zoom":{"name":"union","value":[{"name":"bool"},{"name":"object"}],"required":false},"dateFormat":{"name":"string","required":false},"dateTickFormat":{"name":"string","required":false},"valueFormatter":{"name":"union","value":[{"name":"func"},{"name":"shape","value":{"function":{"name":"string","required":true},"options":{"name":"object","required":false}}}],"required":false}}}},"required":false,"description":"X-axis configuration. Array of axis config objects."},"yAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"label":{"name":"string","required":false},"scaleType":{"name":"enum","value":[{"value":"'linear'","computed":false},{"value":"'log'","computed":false},{"value":"'time'","computed":false},{"value":"'band'","computed":false},{"value":"'point'","computed":false},{"value":"'sqrt'","computed":false},{"value":"'symlog'","computed":false},{"value":"'utc'","computed":false},{"value":"'pow'","computed":false}],"required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"data":{"name":"array","required":false},"dataKey":{"name":"string","required":false},"position":{"name":"enum","value":[{"value":"'left'","computed":false},{"value":"'right'","computed":false},{"value":"'none'","computed":false}],"required":false},"reverse":{"name":"bool","required":false},"colorMap":{"name":"object","required":false},"tickLabelStyle":{"name":"object","required":false},"labelStyle":{"name":"object","required":false},"tickMinStep":{"name":"number","required":false},"tickMaxStep":{"name":"number","required":false},"tickNumber":{"name":"number","required":false},"tickSize":{"name":"number","required":false},"tickSpacing":{"name":"number","required":false},"tickLabelMinGap":{"name":"number","required":false},"tickLabelPlacement":{"name":"enum","value":[{"value":"'middle'","computed":false},{"value":"'tick'","computed":false}],"required":false},"tickPlacement":{"name":"enum","value":[{"value":"'start'","computed":false},{"value":"'end'","computed":false},{"value":"'middle'","computed":false},{"value":"'extremities'","computed":false}],"required":false},"width":{"name":"number","required":false},"disableLine":{"name":"bool","required":false},"disableTicks":{"name":"bool","required":false},"domainLimit":{"name":"enum","value":[{"value":"'nice'","computed":false},{"value":"'strict'","computed":false}],"required":false},"zoom":{"name":"union","value":[{"name":"bool"},{"name":"object"}],"required":false},"valueFormatter":{"name":"union","value":[{"name":"func"},{"name":"shape","value":{"function":{"name":"string","required":true},"options":{"name":"object","required":false}}}],"required":false}}}},"required":false,"description":"Y-axis configuration. Array of axis config objects."},"zAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"string","required":false},"data":{"name":"array","required":false},"dataKey":{"name":"string","required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"colorMap":{"name":"object","required":false}}}},"required":false,"description":"Z-axis configuration for color mapping scatter points."},"dataset":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Dataset array for datasetKeys-driven series."},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels. Default is 400."},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not set, fills available space."},"margin":{"type":{"name":"shape","value":{"top":{"name":"number","required":false},"right":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false}}},"required":false,"description":"Chart margins in pixels."},"grid":{"type":{"name":"shape","value":{"horizontal":{"name":"bool","required":false},"vertical":{"name":"bool","required":false}}},"required":false,"description":"Grid configuration."},"colors":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Color palette array."},"voronoiMaxRadius":{"type":{"name":"union","value":[{"name":"number"},{"name":"enum","value":[{"value":"'item'","computed":false}]}]},"required":false,"description":"Maximum distance for Voronoi scatter interaction."},"disableVoronoi":{"type":{"name":"bool"},"required":false,"description":"If true, disables Voronoi cell interaction."},"axisHighlight":{"type":{"name":"shape","value":{"x":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'line'","computed":false},{"value":"'band'","computed":false}],"required":false},"y":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'line'","computed":false},{"value":"'band'","computed":false}],"required":false}}},"required":false,"description":"Axis highlight configuration."},"tooltip":{"type":{"name":"shape","value":{"trigger":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'axis'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Tooltip configuration."},"hideLegend":{"type":{"name":"bool"},"required":false,"description":"If true, the legend is hidden."},"skipAnimation":{"type":{"name":"bool"},"required":false,"description":"If true, animations are disabled."},"loading":{"type":{"name":"bool"},"required":false,"description":"If true, shows a loading overlay."},"slotProps":{"type":{"name":"object"},"required":false,"description":"Props passed to internal slot components."},"referenceLines":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"x":{"name":"union","value":[{"name":"number"},{"name":"string"}],"required":false},"y":{"name":"number","required":false},"label":{"name":"string","required":false},"lineStyle":{"name":"object","required":false},"labelStyle":{"name":"object","required":false},"labelAlign":{"name":"enum","value":[{"value":"'start'","computed":false},{"value":"'middle'","computed":false},{"value":"'end'","computed":false}],"required":false},"spacing":{"name":"object","required":false}}}},"required":false,"description":"Reference lines to display on the chart.\nArray of objects with:\n- x (number|string): Vertical reference line at x value\n- y (number): Horizontal reference line at y value\n- label (string): Label text\n- lineStyle (object): CSS for line element\n- labelStyle (object): CSS for label text\n- labelAlign (string): 'start', 'middle', 'end'"},"initialZoom":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"axisId":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"start":{"name":"number","required":false},"end":{"name":"number","required":false}}}},"required":false,"description":"Initial zoom configuration (Pro). Array of {axisId, start, end} objects.\nstart/end are percentages (0-100) of the axis range."},"showToolbar":{"type":{"name":"bool"},"required":false,"description":"If true, shows the Pro toolbar for zoom/export controls."},"showSlider":{"type":{"name":"bool"},"required":false,"description":"If true, shows the zoom slider below the chart.\nInjects zoom.slider.enabled into x-axis config."},"zoomInteractionConfig":{"type":{"name":"shape","value":{"zoom":{"name":"array","required":false},"pan":{"name":"array","required":false}}},"required":false,"description":"Fine-grained control over zoom/pan interactions (Pro).\n- zoom: Array of interaction types ['wheel', 'pinch', 'brush', 'tapAndDrag', 'doubleTapReset']\n- pan: Array of interaction types ['drag', 'pressAndDrag', 'wheel']"},"highlightedAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"axisId":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":true},"dataIndex":{"name":"number","required":true}}}},"required":false,"description":"Controlled axis highlight state. Array of objects specifying which axis values\nare highlighted. Each object has:\n- axisId (string|number): The axis identifier\n- dataIndex (number): The data index to highlight\nSet to empty array [] to clear highlights."},"highlightedItem":{"type":{"name":"object"},"required":false,"description":"Currently highlighted item (controlled input/output)."},"tooltipItem":{"type":{"name":"shape","value":{"type":{"name":"string","required":false},"seriesId":{"name":"string","required":false},"dataIndex":{"name":"number","required":false}}},"required":false,"description":"Controlled tooltip item state. Used to synchronize tooltips across multiple charts.\nObject with:\n- type (string): Chart type ('line', 'scatter', etc.)\n- seriesId (string): The series identifier\n- dataIndex (number): The data index within the series\nSet to null to hide tooltip."},"forecast":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"x":{"name":"number","required":true},"y":{"name":"number","required":true},"upper":{"name":"number","required":false},"lower":{"name":"number","required":false}}}},"required":false,"description":"Forecast overlay data. Array of objects with x, y (center), upper, and lower\nvalues. Renders a dashed trend line with a shaded uncertainty band in the\nchart's SVG layer, matching the LiveTradingChart forecast style."},"forecastColor":{"type":{"name":"string"},"required":false,"description":"Forecast line and band color. Default '#ff9800' (orange)."},"forecastOpacity":{"type":{"name":"number"},"required":false,"description":"Forecast band fill opacity. Default 0.15."},"enableCrosshair":{"type":{"name":"bool"},"required":false,"description":"Enable crosshair position tracking. When true, the crosshairPosition\noutput prop reports the pointer's x/y data-space coordinates in real time\nas the user moves the mouse over the chart. Requires axisHighlight\nset to {x: 'line', y: 'line'} for the visual crosshair."},"crosshairPosition":{"type":{"name":"shape","value":{"x":{"name":"number","required":false},"y":{"name":"number","required":false}}},"required":false,"description":"Current crosshair position in data coordinates. Read-only output that\nupdates as the user moves the mouse. Object with:\n- x (number): x-axis data value (epoch ms for time scales)\n- y (number): y-axis data value\nSet to null when the pointer leaves the chart area."},"crosshairClick":{"type":{"name":"shape","value":{"x":{"name":"number","required":false},"y":{"name":"number","required":false},"button":{"name":"string","required":false},"timestamp":{"name":"string","required":false}}},"required":false,"description":"Fires on right-click within the chart drawing area when enableCrosshair\nis true. Object with:\n- x (number): x-axis data value at click position\n- y (number): y-axis data value at click position\n- button (string): always 'right'\n- timestamp (string): ISO timestamp of the click\nUse this to implement context menus (e.g. \"Set Alert\") at precise\ndata coordinates."},"syncedTooltipIndex":{"type":{"name":"number"},"required":false,"description":"Synced tooltip data index. When set to a non-negative integer, renders a\ntooltip overlay at that x-axis data index position, even without pointer hover.\nUse this to synchronize tooltip display across multiple CompositeCharts:\nread highlightedAxis.dataIndex from one chart, write it to syncedTooltipIndex\non the other charts. Set to null or -1 to hide."},"clickData":{"type":{"name":"object"},"required":false,"description":"Data from the most recent click event.\nContains type ('scatter'|'line'), seriesId, dataIndex, and timestamp."},"n_clicks":{"type":{"name":"number"},"required":false,"description":"Number of times the chart has been clicked."},"zoomData":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"axisId":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"start":{"name":"number","required":false},"end":{"name":"number","required":false}}}},"required":false,"description":"Current zoom state. Read-only output updated on zoom/pan.\nArray of {axisId, start, end} objects."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash-assigned callback that should be called to report property changes\nto Dash, to make them available for callbacks."}}},"src/lib/components/Heatmap.react.js":{"description":"Heatmap component wrapping MUI X Charts Pro Heatmap.\nRenders a matrix visualization where color intensity represents values.\nThis is a Pro feature - requires MUI X Pro license key.","displayName":"Heatmap","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"licenseKey":{"type":{"name":"string"},"required":false,"description":"MUI X Pro license key. Required to enable Pro features without watermarks.\nGet your license key from https://mui.com/x/introduction/licensing/"},"data":{"type":{"name":"arrayOf","value":{"name":"arrayOf","value":{"name":"number"}}},"required":false,"description":"Heatmap data as an array of [x, y, value] tuples.\n- x: X-axis index (0-based)\n- y: Y-axis index (0-based)\n- value: Numeric value for the cell (mapped to color)\n\nExample: [[0, 0, 25], [0, 1, 45], [1, 0, 30], [1, 1, 60]]"},"xAxis":{"type":{"name":"shape","value":{"data":{"name":"array","required":false},"label":{"name":"string","required":false},"scaleType":{"name":"enum","value":[{"value":"'band'","computed":false},{"value":"'point'","computed":false}],"required":false},"zoom":{"name":"union","value":[{"name":"bool"},{"name":"object"}],"required":false}}},"required":false,"description":"X-axis configuration object.\n- data (array): Category labels for x-axis\n- label (string): Axis label\n- scaleType (string): Scale type, defaults to 'band' for heatmaps\n- zoom (boolean or object): Enable zoom on this axis. Can be true or object with:\n - minStart (number): Minimum start position (0-100)\n - maxEnd (number): Maximum end position (0-100)\n - minSpan (number): Minimum zoom span\n - maxSpan (number): Maximum zoom span\n - step (number): Zoom step size\n - panning (boolean): Enable panning\n - filterMode (string): 'keep' or 'discard'\n - slider (object): Slider config with { enabled, preview, size, showTooltip }"},"yAxis":{"type":{"name":"shape","value":{"data":{"name":"array","required":false},"label":{"name":"string","required":false},"scaleType":{"name":"enum","value":[{"value":"'band'","computed":false},{"value":"'point'","computed":false}],"required":false},"zoom":{"name":"union","value":[{"name":"bool"},{"name":"object"}],"required":false}}},"required":false,"description":"Y-axis configuration object.\n- data (array): Category labels for y-axis\n- label (string): Axis label\n- scaleType (string): Scale type, defaults to 'band' for heatmaps\n- zoom (boolean or object): Enable zoom on this axis (same options as xAxis)"},"colorScale":{"type":{"name":"shape","value":{"type":{"name":"enum","value":[{"value":"'continuous'","computed":false},{"value":"'piecewise'","computed":false}],"required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"colors":{"name":"arrayOf","value":{"name":"string"},"required":false},"thresholds":{"name":"arrayOf","value":{"name":"number"},"required":false}}},"required":false,"description":"Color scale configuration for mapping values to colors.\n\nContinuous scale (interpolates between colors):\n{ type: 'continuous', min: 0, max: 100, colors: ['#e3f2fd', '#1565c0'] }\n\nPiecewise scale (discrete color bands):\n{ type: 'piecewise', thresholds: [20, 40, 60, 80],\n colors: ['#color1', '#color2', '#color3', '#color4', '#color5'] }\n\nNote: For piecewise, you need n+1 colors for n thresholds."},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not specified, the chart expands to fill\nthe available space."},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels. Default is 400."},"margin":{"type":{"name":"shape","value":{"top":{"name":"number","required":false},"right":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false}}},"required":false,"description":"Chart margins in pixels. Object with top, right, bottom, left keys."},"hideLegend":{"type":{"name":"bool"},"required":false,"description":"If true, the color legend is hidden."},"tooltip":{"type":{"name":"shape","value":{"trigger":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Tooltip configuration.\n- trigger (string): 'item' to show on cell hover, 'none' to disable"},"highlightScope":{"type":{"name":"shape","value":{"highlight":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'none'","computed":false}],"required":false},"fade":{"name":"enum","value":[{"value":"'global'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Highlight scope configuration for cell highlighting behavior.\n- highlight: 'item' or 'none'\n- fade: 'global' or 'none'"},"cellStyle":{"type":{"name":"union","value":[{"name":"enum","value":[{"value":"'rounded'","computed":false}]},{"name":"shape","value":{"gap":{"name":"number","required":false},"borderRadius":{"name":"number","required":false},"showValue":{"name":"bool","required":false},"fontSize":{"name":"number","required":false},"fontWeight":{"name":"number","required":false},"textColor":{"name":"string","required":false}}}]},"required":false,"description":"Custom cell style. Use 'rounded' for default rounded corners with gap,\nor provide an object for detailed configuration:\n- gap (number): Spacing between cells in pixels (default: 4)\n- borderRadius (number): Corner radius in pixels (default: 10)\n- showValue (boolean): Display value text in cells (default: true)\n- fontSize (number): Font size for value text (default: 12)\n- fontWeight (number): Font weight for value text (default: 500)\n- textColor (string): Color for value text (default: '#ffffff')"},"slotProps":{"type":{"name":"object"},"required":false,"description":"Props passed to internal slot components for customization."},"highlightedItem":{"type":{"name":"object"},"required":false,"description":"Currently highlighted item. Read-only output property updated when\nthe user hovers over a cell."},"clickData":{"type":{"name":"object"},"required":false,"description":"Data from the most recent click event. Read-only output property.\nContains x, y, value, seriesId, and timestamp."},"n_clicks":{"type":{"name":"number"},"required":false,"description":"Number of times the chart has been clicked. Increments on each click event."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash-assigned callback that should be called to report property changes\nto Dash, to make them available for callbacks."}}},"src/lib/components/LineChart.react.js":{"description":"LineChart component wrapping MUI X Charts Pro with composition API.\nRenders interactive line charts with support for multiple series,\ncustomizable axes, tooltips, click event callbacks, and Pro features\nlike zoom, pan, and zoom slider.","displayName":"LineChart","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"licenseKey":{"type":{"name":"string"},"required":false,"description":"MUI X Pro license key. Required to enable Pro features like zoom/pan\nwithout watermarks. Get your license key from https://mui.com/x/introduction/licensing/"},"series":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"string","required":false},"data":{"name":"arrayOf","value":{"name":"number"},"required":false},"label":{"name":"string","required":false},"color":{"name":"string","required":false},"area":{"name":"bool","required":false},"stack":{"name":"string","required":false},"curve":{"name":"enum","value":[{"value":"'linear'","computed":false},{"value":"'monotoneX'","computed":false},{"value":"'monotoneY'","computed":false},{"value":"'natural'","computed":false},{"value":"'step'","computed":false},{"value":"'stepBefore'","computed":false},{"value":"'stepAfter'","computed":false},{"value":"'catmullRom'","computed":false},{"value":"'bumpX'","computed":false},{"value":"'bumpY'","computed":false}],"required":false},"showMark":{"name":"bool","required":false},"connectNulls":{"name":"bool","required":false},"yAxisId":{"name":"string","required":false},"xAxisId":{"name":"string","required":false},"highlightScope":{"name":"shape","value":{"highlight":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'item'","computed":false},{"value":"'series'","computed":false}],"required":false},"fade":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'series'","computed":false},{"value":"'global'","computed":false}],"required":false}},"required":false}}}},"required":false,"description":"Array of series configurations. Each series represents a line in the chart.\nEach series object can have:\n- id (string): Unique identifier for the series\n- data (array of numbers): Y-axis values, supports null for gaps\n- label (string): Label shown in legend and tooltip\n- color (string): Custom color for this series\n- area (boolean): Fill area under the line\n- stack (string): Stack identifier for stacked area charts\n- curve (string): Interpolation method - 'linear', 'monotoneX', 'monotoneY',\n 'natural', 'step', 'stepBefore', 'stepAfter', 'catmullRom', 'bumpX', 'bumpY'\n- showMark (boolean): Whether to show data point markers\n- connectNulls (boolean): Whether to bridge gaps across null values\n- yAxisId (string): ID of the y-axis to use for this series (for biaxial charts)\n- xAxisId (string): ID of the x-axis to use for this series\n- highlightScope (object): Per-series highlight behavior with:\n - highlight: 'none', 'item', or 'series'\n - fade: 'none', 'series', or 'global'"},"xAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"data":{"name":"array","required":false},"dataKey":{"name":"string","required":false},"label":{"name":"string","required":false},"scaleType":{"name":"enum","value":[{"value":"'band'","computed":false},{"value":"'point'","computed":false},{"value":"'linear'","computed":false},{"value":"'log'","computed":false},{"value":"'time'","computed":false},{"value":"'utc'","computed":false},{"value":"'symlog'","computed":false},{"value":"'sqrt'","computed":false}],"required":false},"position":{"name":"enum","value":[{"value":"'top'","computed":false},{"value":"'bottom'","computed":false},{"value":"'none'","computed":false}],"required":false},"id":{"name":"string","required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"reverse":{"name":"bool","required":false},"tickNumber":{"name":"number","required":false},"tickMinStep":{"name":"number","required":false},"tickMaxStep":{"name":"number","required":false},"tickSize":{"name":"number","required":false},"tickSpacing":{"name":"number","required":false},"tickInterval":{"name":"array","required":false},"tickLabelStyle":{"name":"object","required":false},"tickLabelPlacement":{"name":"enum","value":[{"value":"'middle'","computed":false},{"value":"'tick'","computed":false}],"required":false},"tickPlacement":{"name":"enum","value":[{"value":"'end'","computed":false},{"value":"'extremities'","computed":false},{"value":"'middle'","computed":false},{"value":"'start'","computed":false}],"required":false},"tickLabelMinGap":{"name":"number","required":false},"labelStyle":{"name":"object","required":false},"height":{"name":"number","required":false},"dateFormat":{"name":"string","required":false},"dateTickFormat":{"name":"string","required":false},"disableLine":{"name":"bool","required":false},"disableTicks":{"name":"bool","required":false},"domainLimit":{"name":"enum","value":[{"value":"'nice'","computed":false},{"value":"'strict'","computed":false}],"required":false},"categoryGapRatio":{"name":"number","required":false},"barGapRatio":{"name":"number","required":false},"colorMap":{"name":"object","required":false},"zoom":{"name":"union","value":[{"name":"bool"},{"name":"object"}],"required":false},"valueFormatter":{"name":"union","value":[{"name":"func"},{"name":"shape","value":{"function":{"name":"string","required":true},"options":{"name":"object","required":false}}}],"required":false}}}},"required":false,"description":"X-axis configuration. Array of axis config objects.\nEach axis object can have:\n- data (array): X-axis values (timestamps in ms for 'time' scaleType)\n- dataKey (string): Key to use from dataset for axis values\n- label (string): Axis label\n- scaleType (string): 'band', 'point', 'linear', 'log', 'time', 'utc', 'symlog', 'sqrt'\n- position (string): 'top', 'bottom', or 'none' (hidden but still computed)\n- id (string): Axis identifier for referencing in series and zoom\n- min (number): Minimum domain value\n- max (number): Maximum domain value\n- reverse (boolean): Reverse axis direction\n- tickNumber (number): Approximate number of ticks\n- tickMinStep (number): Minimum step between ticks (ms for time axes)\n- tickMaxStep (number): Maximum step between ticks\n- tickSize (number): Tick mark length in pixels (default: 6)\n- tickSpacing (number): Minimum spacing in px between ticks (ordinal axes only)\n- tickInterval (array): Fixed tick positions as array of values\n- tickLabelStyle (object): CSS style for tick labels (e.g. {angle: 45, fontSize: 12})\n- tickLabelPlacement (string): 'middle' or 'tick' (band scale only)\n- tickPlacement (string): 'end', 'extremities', 'middle', 'start' (band scale only)\n- tickLabelMinGap (number): Minimum gap in px between tick labels (default: 4)\n- labelStyle (object): CSS style for the axis label\n- height (number): Space reserved for this x-axis in pixels\n- disableLine (boolean): Hide the axis line\n- disableTicks (boolean): Hide tick marks\n- domainLimit (string): 'nice' (default, rounds to friendly values) or 'strict'\n- categoryGapRatio (number): Gap ratio between bands (0-1, band scale only)\n- barGapRatio (number): Gap ratio between bars within a band (band scale only)\n- colorMap (object): Axis color mapping configuration\n- zoom (boolean or object): Enable zoom on this axis. Can be true or object with:\n - minStart (number): Minimum start position (0-100)\n - maxEnd (number): Maximum end position (0-100)\n - minSpan (number): Minimum zoom span\n - maxSpan (number): Maximum zoom span\n - step (number): Zoom step size\n - panning (boolean): Enable panning\n - filterMode (string): 'keep' or 'discard'\n - slider (object): Slider config with { enabled, preview, size, showTooltip }"},"yAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"data":{"name":"array","required":false},"dataKey":{"name":"string","required":false},"label":{"name":"string","required":false},"scaleType":{"name":"enum","value":[{"value":"'band'","computed":false},{"value":"'point'","computed":false},{"value":"'linear'","computed":false},{"value":"'log'","computed":false},{"value":"'time'","computed":false},{"value":"'utc'","computed":false},{"value":"'symlog'","computed":false},{"value":"'sqrt'","computed":false}],"required":false},"position":{"name":"enum","value":[{"value":"'left'","computed":false},{"value":"'right'","computed":false},{"value":"'none'","computed":false}],"required":false},"id":{"name":"string","required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"width":{"name":"number","required":false},"reverse":{"name":"bool","required":false},"dateFormat":{"name":"string","required":false},"dateTickFormat":{"name":"string","required":false},"tickNumber":{"name":"number","required":false},"tickMinStep":{"name":"number","required":false},"tickMaxStep":{"name":"number","required":false},"tickSize":{"name":"number","required":false},"tickSpacing":{"name":"number","required":false},"tickInterval":{"name":"array","required":false},"tickLabelStyle":{"name":"object","required":false},"tickLabelPlacement":{"name":"enum","value":[{"value":"'middle'","computed":false},{"value":"'tick'","computed":false}],"required":false},"tickPlacement":{"name":"enum","value":[{"value":"'end'","computed":false},{"value":"'extremities'","computed":false},{"value":"'middle'","computed":false},{"value":"'start'","computed":false}],"required":false},"tickLabelMinGap":{"name":"number","required":false},"labelStyle":{"name":"object","required":false},"height":{"name":"number","required":false},"disableLine":{"name":"bool","required":false},"disableTicks":{"name":"bool","required":false},"domainLimit":{"name":"enum","value":[{"value":"'nice'","computed":false},{"value":"'strict'","computed":false}],"required":false},"categoryGapRatio":{"name":"number","required":false},"barGapRatio":{"name":"number","required":false},"colorMap":{"name":"object","required":false},"zoom":{"name":"union","value":[{"name":"bool"},{"name":"object"}],"required":false},"valueFormatter":{"name":"union","value":[{"name":"func"},{"name":"shape","value":{"function":{"name":"string","required":true},"options":{"name":"object","required":false}}}],"required":false}}}},"required":false,"description":"Y-axis configuration. Array of axis config objects.\nEach axis object can have:\n- data (array): Y-axis values (for horizontal bar charts)\n- dataKey (string): Key to use from dataset for axis values\n- label (string): Axis label\n- scaleType (string): 'band', 'point', 'linear', 'log', 'time', 'utc', 'symlog', 'sqrt'\n- position (string): 'left', 'right', or 'none' (hidden but still computed)\n- id (string): Axis identifier for referencing in series\n- min (number): Minimum domain value\n- max (number): Maximum domain value\n- width (number): Width allocated for axis in pixels\n- reverse (boolean): Reverse axis direction\n- tickNumber (number): Approximate number of ticks\n- tickMinStep (number): Minimum step between ticks\n- tickMaxStep (number): Maximum step between ticks\n- tickSize (number): Tick mark length in pixels (default: 6)\n- tickSpacing (number): Minimum spacing in px between ticks (ordinal axes only)\n- tickInterval (array): Fixed tick positions as array of values\n- tickLabelStyle (object): CSS style for tick labels (e.g. {angle: 45, fontSize: 12})\n- tickLabelPlacement (string): 'middle' or 'tick' (band scale only)\n- tickPlacement (string): 'end', 'extremities', 'middle', 'start' (band scale only)\n- tickLabelMinGap (number): Minimum gap in px between tick labels (default: 4)\n- labelStyle (object): CSS style for the axis label\n- height (number): Space reserved for this y-axis in pixels\n- disableLine (boolean): Hide the axis line\n- disableTicks (boolean): Hide tick marks\n- domainLimit (string): 'nice' (default, rounds to friendly values) or 'strict'\n- categoryGapRatio (number): Gap ratio between bands (0-1, band scale only)\n- barGapRatio (number): Gap ratio between bars within a band (band scale only)\n- colorMap (object): Axis color mapping configuration\n- zoom (boolean or object): Enable zoom on this axis (same options as xAxis)"},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels. Default is 400."},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not specified, the chart expands to fill\nthe available space."},"margin":{"type":{"name":"shape","value":{"top":{"name":"number","required":false},"right":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false}}},"required":false,"description":"Chart margins in pixels. Object with top, right, bottom, left keys."},"grid":{"type":{"name":"shape","value":{"vertical":{"name":"bool","required":false},"horizontal":{"name":"bool","required":false}}},"required":false,"description":"Grid configuration. Object with vertical and horizontal boolean keys."},"colors":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Array of colors for the series palette."},"hideLegend":{"type":{"name":"bool"},"required":false,"description":"If true, the legend is hidden."},"tooltip":{"type":{"name":"shape","value":{"trigger":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'axis'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Tooltip configuration. Object with trigger key.\n- trigger (string): 'item', 'axis', or 'none'"},"skipAnimation":{"type":{"name":"bool"},"required":false,"description":"If true, animations are skipped."},"loading":{"type":{"name":"bool"},"required":false,"description":"If true, a loading overlay is displayed."},"zoom":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"axisId":{"name":"string","required":false},"start":{"name":"number","required":false},"end":{"name":"number","required":false}}}},"required":false,"description":"Controlled zoom state for the chart. Array of objects with:\n- axisId (string): The axis identifier\n- start (number): Start position (0-100)\n- end (number): End position (0-100)"},"initialZoom":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"axisId":{"name":"string","required":false},"start":{"name":"number","required":false},"end":{"name":"number","required":false}}}},"required":false,"description":"Initial zoom state for uncontrolled mode. Array of objects with:\n- axisId (string): The axis identifier\n- start (number): Start position (0-100)\n- end (number): End position (0-100)"},"showSlider":{"type":{"name":"bool"},"required":false,"description":"If true, shows a zoom slider below the chart for easy zoom control.\nThe slider allows users to select a range and pan through the data."},"zoomInteractionConfig":{"type":{"name":"shape","value":{"zoom":{"name":"arrayOf","value":{"name":"union","value":[{"name":"string"},{"name":"shape","value":{"type":{"name":"string","required":false},"requiredKeys":{"name":"arrayOf","value":{"name":"string"},"required":false},"pointerMode":{"name":"enum","value":[{"value":"'mouse'","computed":false},{"value":"'touch'","computed":false}],"required":false}}}]},"required":false},"pan":{"name":"arrayOf","value":{"name":"union","value":[{"name":"string"},{"name":"shape","value":{"type":{"name":"string","required":false},"requiredKeys":{"name":"arrayOf","value":{"name":"string"},"required":false},"pointerMode":{"name":"enum","value":[{"value":"'mouse'","computed":false},{"value":"'touch'","computed":false}],"required":false}}}]},"required":false}}},"required":false,"description":"Zoom interaction configuration. Controls which interactions are enabled for\nzooming and panning. Object with:\n- zoom (array): Zoom interactions - 'wheel', 'pinch', 'tapAndDrag', 'brush', 'doubleTapReset',\n or objects with { type, requiredKeys, pointerMode }\n- pan (array): Pan interactions - 'drag', 'pressAndDrag', 'wheel',\n or objects with { type, requiredKeys, pointerMode }"},"referenceLines":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"x":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"y":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"axisId":{"name":"string","required":false},"label":{"name":"string","required":false},"labelAlign":{"name":"enum","value":[{"value":"'start'","computed":false},{"value":"'middle'","computed":false},{"value":"'end'","computed":false}],"required":false},"lineStyle":{"name":"object","required":false},"labelStyle":{"name":"object","required":false},"spacing":{"name":"union","value":[{"name":"number"},{"name":"object"}],"required":false}}}},"required":false,"description":"Array of reference line configurations. Each reference line can be vertical (x) or horizontal (y).\n- x (string|number): X-axis value for a vertical reference line\n- y (number): Y-axis value for a horizontal reference line\n- axisId (string): The axis ID to use for the reference value\n- label (string): Label text displayed along the reference line\n- labelAlign (string): 'start', 'middle', or 'end' alignment\n- lineStyle (object): CSS style object for the line (e.g. {stroke: 'red', strokeDasharray: '4 4'})\n- labelStyle (object): CSS style object for the label\n- spacing (number|object): Space around label in px, or {x, y} object"},"brushConfig":{"type":{"name":"shape","value":{"enabled":{"name":"bool","required":false},"preventTooltip":{"name":"bool","required":false},"preventHighlight":{"name":"bool","required":false}}},"required":false,"description":"Brush configuration for range selection. Object with:\n- enabled (boolean): Whether brush interaction is enabled (default: false)\n- preventTooltip (boolean): Prevent tooltip during brush (default: true)\n- preventHighlight (boolean): Prevent highlight during brush (default: true)"},"brushOverlay":{"type":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'default'","computed":false},{"value":"'values'","computed":false}]},"required":false,"description":"Type of brush overlay to display:\n- 'none': No overlay (default)\n- 'default': Standard MUI selection rectangle\n- 'values': Custom overlay showing start/end values with difference and percentage"},"brushSeriesId":{"type":{"name":"string"},"required":false,"description":"Series ID for the custom 'values' brush overlay to read data from.\nIf not specified, uses the first series."},"brushData":{"type":{"name":"shape","value":{"start":{"name":"shape","value":{"x":{"name":"number","required":false},"y":{"name":"number","required":false}},"required":false},"current":{"name":"shape","value":{"x":{"name":"number","required":false},"y":{"name":"number","required":false}},"required":false},"timestamp":{"name":"string","required":false}}},"required":false,"description":"Current brush selection data. Read-only output property.\nContains pixel coordinates of the brush selection."},"axisHighlight":{"type":{"name":"shape","value":{"x":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'line'","computed":false},{"value":"'band'","computed":false}],"required":false},"y":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'line'","computed":false}],"required":false}}},"required":false,"description":"Axis highlight configuration. Controls how axes are highlighted on hover.\n- x (string): 'none', 'line', or 'band'\n- y (string): 'none' or 'line'"},"highlightedAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"axisId":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":true},"dataIndex":{"name":"number","required":true}}}},"required":false,"description":"Controlled axis highlight state. Array of objects specifying which axis values\nare highlighted. Each object has:\n- axisId (string|number): The axis identifier\n- dataIndex (number): The data index to highlight\nSet to empty array [] to clear highlights."},"highlightedItem":{"type":{"name":"shape","value":{"seriesId":{"name":"string","required":true},"dataIndex":{"name":"number","required":false}}},"required":false,"description":"Controlled item highlight state. Specifies which data point is highlighted.\nObject with:\n- seriesId (string): The series identifier\n- dataIndex (number): The data index within the series (optional)\nSet to null to clear highlight."},"showToolbar":{"type":{"name":"bool"},"required":false,"description":"Show chart toolbar with zoom/export controls. This is a Pro feature\nthat requires a valid licenseKey."},"tooltipItem":{"type":{"name":"shape","value":{"type":{"name":"string","required":false},"seriesId":{"name":"string","required":false},"dataIndex":{"name":"number","required":false}}},"required":false,"description":"Controlled tooltip item state. Used to synchronize tooltips across multiple charts.\nObject with:\n- type (string): Chart type ('line', 'bar', 'pie', etc.)\n- seriesId (string): The series identifier\n- dataIndex (number): The data index within the series\nSet to null to hide tooltip."},"zoomData":{"type":{"name":"union","value":[{"name":"arrayOf","value":{"name":"shape","value":{"axisId":{"name":"string","required":false},"start":{"name":"number","required":false},"end":{"name":"number","required":false}}}},{"name":"any"}]},"required":false,"description":"Current zoom state. Read-only output property updated when zoom changes.\nArray of objects with axisId, start, and end values."},"clickData":{"type":{"name":"object"},"required":false,"description":"Data from the most recent click event. Read-only output property.\nContains type ('axis', 'mark', 'line', 'area'), relevant IDs/values,\nand timestamp."},"n_clicks":{"type":{"name":"number"},"required":false,"description":"Number of times the chart has been clicked. Increments on each click event."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash-assigned callback that should be called to report property changes\nto Dash, to make them available for callbacks."}}},"src/lib/components/LiveTradingChart.react.js":{"description":"LiveTradingChart simulates real-time candlestick trading data with volume bars,\nforecast line with uncertainty bands, alert labels, and optional price labels.\nUses an internal React timer for smooth high-speed updates.","displayName":"LiveTradingChart","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"licenseKey":{"type":{"name":"string"},"required":false,"description":"MUI X Pro license key."},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels. Default 500."},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not set, fills available space."},"margin":{"type":{"name":"shape","value":{"top":{"name":"number","required":false},"right":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false}}},"required":false,"description":"Chart margins."},"windowSize":{"type":{"name":"number"},"required":false,"description":"Number of visible candles in the sliding window. Default 60."},"forecastSize":{"type":{"name":"number"},"required":false,"description":"Number of forecast points beyond the window. Default 15."},"running":{"type":{"name":"bool"},"required":false,"description":"Whether the simulation is running. Default false."},"intervalMs":{"type":{"name":"number"},"required":false,"description":"Tick interval in milliseconds. Default 300."},"seed":{"type":{"name":"number"},"required":false,"description":"RNG seed for reproducible randomness. Default 42."},"resetTrigger":{"type":{"name":"number"},"required":false,"description":"Increment this to reset the simulation."},"initialPrice":{"type":{"name":"number"},"required":false,"description":"Starting price. Default 100."},"volatility":{"type":{"name":"number"},"required":false,"description":"Price volatility factor. Default 0.02."},"drift":{"type":{"name":"number"},"required":false,"description":"Price drift/trend factor. Default 0.001."},"forecastVolatility":{"type":{"name":"number"},"required":false,"description":"Forecast uncertainty multiplier. Default 1.5."},"alertProbability":{"type":{"name":"number"},"required":false,"description":"(Legacy) Probability of alert per tick \u2014 unused by default swing detection."},"alertThresholdPct":{"type":{"name":"number"},"required":false,"description":"(Legacy) Minimum % change to flag as alert \u2014 unused by default swing detection."},"alertLookback":{"type":{"name":"number"},"required":false,"description":"Number of candles on each side to confirm a swing high/low. Default 5."},"alertMinDistance":{"type":{"name":"number"},"required":false,"description":"Minimum ticks between consecutive alerts to prevent clustering. Default 10."},"maxVisibleAlerts":{"type":{"name":"number"},"required":false,"description":"Maximum number of alert labels visible in the window. Default 6."},"alertFilter":{"type":{"name":"shape","value":{"function":{"name":"string","required":true},"options":{"name":"object","required":false}}},"required":false,"description":"Functions-as-props: custom alert detection. {function: 'name', options: {...}}"},"alertFormatter":{"type":{"name":"shape","value":{"function":{"name":"string","required":true},"options":{"name":"object","required":false}}},"required":false,"description":"Functions-as-props: custom alert label formatting. {function: 'name', options: {...}}"},"candleUpColor":{"type":{"name":"string"},"required":false,"description":"Candle color for upward (close >= open) moves. Default '#4caf50'."},"candleDownColor":{"type":{"name":"string"},"required":false,"description":"Candle color for downward (close < open) moves. Default '#f44336'."},"forecastColor":{"type":{"name":"string"},"required":false,"description":"Forecast line/area color. Default '#ff9800'."},"alertUpColor":{"type":{"name":"string"},"required":false,"description":"Alert label color for upward moves. Default '#4caf50'."},"alertDownColor":{"type":{"name":"string"},"required":false,"description":"Alert label color for downward moves. Default '#f44336'."},"uncertaintyOpacity":{"type":{"name":"number"},"required":false,"description":"Opacity of the forecast uncertainty shaded area. Default 0.15."},"showVolume":{"type":{"name":"bool"},"required":false,"description":"Show volume bars. Default true."},"showLabels":{"type":{"name":"bool"},"required":false,"description":"Show price labels on candles. Default false."},"volumeHeightPct":{"type":{"name":"number"},"required":false,"description":"Volume bars height as percentage of chart area. Default 20."},"showGrid":{"type":{"name":"bool"},"required":false,"description":"Show grid lines. Default true."},"showSlider":{"type":{"name":"bool"},"required":false,"description":"Show zoom slider below the chart (Pro). Default false."},"hideLegend":{"type":{"name":"bool"},"required":false,"description":"Hide the legend. Default true."},"grid":{"type":{"name":"shape","value":{"horizontal":{"name":"bool","required":false},"vertical":{"name":"bool","required":false}}},"required":false,"description":"Grid configuration."},"xAxisLabel":{"type":{"name":"string"},"required":false,"description":"X-axis label text. Default 'Tick'."},"yAxisLabel":{"type":{"name":"string"},"required":false,"description":"Y-axis label text. Default 'Price'."},"currentPrice":{"type":{"name":"number"},"required":false,"description":"Current price (read-only output)."},"tickCount":{"type":{"name":"number"},"required":false,"description":"Total ticks elapsed (read-only output)."},"alertHistory":{"type":{"name":"array"},"required":false,"description":"Recent alert history (read-only output)."},"zoomData":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"axisId":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"start":{"name":"number","required":false},"end":{"name":"number","required":false}}}},"required":false,"description":"Current zoom state (read-only output)."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash-assigned callback for reporting property changes."}}},"src/lib/components/PieChart.react.js":{"description":"PieChart component wrapping MUI X Charts PieChart.\nRenders pie and donut charts with customizable arcs, labels, and interactions.\nSupports single series (via data prop) or multiple series (via series prop) for nested pies.\nThis is a free feature - no MUI X Pro license required.","displayName":"PieChart","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"data":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"union","value":[{"name":"number"},{"name":"string"}],"required":false},"value":{"name":"number","required":true},"label":{"name":"string","required":false},"color":{"name":"string","required":false}}}},"required":false,"description":"Pie chart data as an array of objects (for single series).\nEach object should have:\n- id (number/string): Unique identifier for the slice\n- value (number): The numeric value (required)\n- label (string): Display label for the slice\n- color (string): Optional color override for this slice\n\nExample: [\n { id: 0, value: 35, label: 'Marketing' },\n { id: 1, value: 25, label: 'Engineering', color: '#1976d2' },\n]\n\nNote: Use either 'data' for single series or 'series' for multiple series (nested pies)."},"series":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"string","required":false},"data":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"union","value":[{"name":"number"},{"name":"string"}],"required":false},"value":{"name":"number","required":true},"label":{"name":"string","required":false},"color":{"name":"string","required":false}}},"required":true},"innerRadius":{"name":"union","value":[{"name":"number"},{"name":"string"}],"required":false},"outerRadius":{"name":"union","value":[{"name":"number"},{"name":"string"}],"required":false},"paddingAngle":{"name":"number","required":false},"cornerRadius":{"name":"number","required":false},"startAngle":{"name":"number","required":false},"endAngle":{"name":"number","required":false},"arcLabel":{"name":"enum","value":[{"value":"'value'","computed":false},{"value":"'label'","computed":false},{"value":"'formattedValue'","computed":false}],"required":false},"arcLabelMinAngle":{"name":"number","required":false},"arcLabelRadius":{"name":"number","required":false},"highlightScope":{"name":"shape","value":{"highlight":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'none'","computed":false}],"required":false},"fade":{"name":"enum","value":[{"value":"'global'","computed":false},{"value":"'none'","computed":false}],"required":false}},"required":false}}}},"required":false,"description":"Array of series configurations for multi-series/nested pie charts.\nEach series can have its own data, geometry, and styling.\nWhen provided, the 'data' prop and individual geometry props are ignored.\n\nExample for nested pie:\n[\n {\n data: innerRingData,\n innerRadius: 0,\n outerRadius: 80,\n cornerRadius: 3,\n highlightScope: { fade: 'global', highlight: 'item' },\n },\n {\n data: outerRingData,\n innerRadius: 90,\n outerRadius: 120,\n cornerRadius: 3,\n highlightScope: { fade: 'global', highlight: 'item' },\n },\n]"},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not specified, the chart expands to fill\nthe available space."},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels. Default is 300."},"innerRadius":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Inner radius of the pie in pixels or percentage string.\nSet to a value > 0 to create a donut chart.\nExamples: 50, '50%', '40%'"},"outerRadius":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Outer radius of the pie in pixels or percentage string.\nExamples: 100, '80%'"},"paddingAngle":{"type":{"name":"number"},"required":false,"description":"Gap between arcs in degrees. Creates visual separation between slices."},"cornerRadius":{"type":{"name":"number"},"required":false,"description":"Corner radius of the arcs in pixels. Rounds the corners of each slice."},"startAngle":{"type":{"name":"number"},"required":false,"description":"Start angle of the first arc in degrees. Default is 0 (3 o'clock position).\nUse -90 for 12 o'clock start position."},"endAngle":{"type":{"name":"number"},"required":false,"description":"End angle of the last arc in degrees. Default is 360 (full circle).\nUse 90 with startAngle=-90 for a half-pie/gauge chart."},"cx":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"X position of the pie center. Can be pixels or percentage string.\nDefault is '50%' (centered)."},"cy":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Y position of the pie center. Can be pixels or percentage string.\nDefault is '50%' (centered)."},"arcLabel":{"type":{"name":"enum","value":[{"value":"'value'","computed":false},{"value":"'label'","computed":false},{"value":"'formattedValue'","computed":false}]},"required":false,"description":"Type of label to display on arcs.\n- 'value': Shows the numeric value\n- 'label': Shows the label text\n- 'formattedValue': Shows formatted value"},"arcLabelMinAngle":{"type":{"name":"number"},"required":false,"description":"Minimum arc angle in degrees required to display a label.\nPrevents labels from appearing on very small slices."},"colors":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Array of colors to use for the pie slices.\nIf not provided, uses the default MUI color palette.\nExample: ['#1976d2', '#dc004e', '#ff9800', '#4caf50']"},"hideLegend":{"type":{"name":"bool"},"required":false,"description":"If true, the legend is hidden."},"margin":{"type":{"name":"shape","value":{"top":{"name":"number","required":false},"right":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false}}},"required":false,"description":"Chart margins in pixels. Object with top, right, bottom, left keys."},"highlightScope":{"type":{"name":"shape","value":{"highlight":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'none'","computed":false}],"required":false},"fade":{"name":"enum","value":[{"value":"'global'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Highlight scope configuration for slice highlighting behavior.\n- highlight: 'item' or 'none'\n- fade: 'global' or 'none'\n\nExample: { highlight: 'item', fade: 'global' }"},"tooltip":{"type":{"name":"shape","value":{"trigger":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Tooltip configuration.\n- trigger (string): 'item' to show on slice hover, 'none' to disable"},"skipAnimation":{"type":{"name":"bool"},"required":false,"description":"If true, disables chart animations. Also respects prefers-reduced-motion."},"clickData":{"type":{"name":"object"},"required":false,"description":"Data from the most recent click event. Read-only output property.\nContains id, dataIndex, value, label, and timestamp."},"n_clicks":{"type":{"name":"number"},"required":false,"description":"Number of times the chart has been clicked. Increments on each click event."},"highlightedItem":{"type":{"name":"shape","value":{"seriesId":{"name":"string","required":false},"dataIndex":{"name":"number","required":false}}},"required":false,"description":"Currently highlighted item. Can be used as both input (controlled mode) and\noutput (updated when user hovers over a slice).\nObject with:\n- seriesId (string): The series identifier\n- dataIndex (number): The data index within the series\nSet to null to clear highlight."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash-assigned callback that should be called to report property changes\nto Dash, to make them available for callbacks."}}},"src/lib/components/ScatterChart.react.js":{"description":"ScatterChart component wrapping MUI X Charts ScatterChart.\nRenders scatter/point charts showing relationships between two variables.\nSupports multiple series, z-axis color mapping, voronoi interaction,\ncustom marker sizes, and click/highlight callbacks.","displayName":"ScatterChart","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"series":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"string","required":false},"label":{"name":"string","required":false},"color":{"name":"string","required":false},"data":{"name":"arrayOf","value":{"name":"shape","value":{"x":{"name":"number","required":false},"y":{"name":"number","required":false},"id":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"z":{"name":"number","required":false}}},"required":false},"datasetKeys":{"name":"shape","value":{"x":{"name":"string","required":false},"y":{"name":"string","required":false},"id":{"name":"string","required":false},"z":{"name":"string","required":false}},"required":false},"markerSize":{"name":"number","required":false},"highlightScope":{"name":"shape","value":{"highlight":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'series'","computed":false},{"value":"'none'","computed":false}],"required":false},"fade":{"name":"enum","value":[{"value":"'global'","computed":false},{"value":"'series'","computed":false},{"value":"'none'","computed":false}],"required":false}},"required":false},"xAxisId":{"name":"string","required":false},"yAxisId":{"name":"string","required":false}}}},"required":false,"description":"Array of scatter series to display. Each series contains:\n- id (string): Unique series identifier\n- label (string): Display label for legend/tooltip\n- color (string): Series color\n- data (array): Array of {x, y, id, z?} point objects\n- datasetKeys (object): {x, y, id?, z?} keys mapping to dataset columns\n- markerSize (number): Radius of scatter markers in pixels\n- highlightScope (object): {highlight, fade} highlighting behavior"},"xAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"label":{"name":"string","required":false},"scaleType":{"name":"enum","value":[{"value":"'linear'","computed":false},{"value":"'log'","computed":false},{"value":"'time'","computed":false},{"value":"'band'","computed":false},{"value":"'point'","computed":false},{"value":"'sqrt'","computed":false},{"value":"'symlog'","computed":false},{"value":"'utc'","computed":false},{"value":"'pow'","computed":false}],"required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"data":{"name":"array","required":false},"dataKey":{"name":"string","required":false},"position":{"name":"enum","value":[{"value":"'top'","computed":false},{"value":"'bottom'","computed":false},{"value":"'none'","computed":false}],"required":false},"reverse":{"name":"bool","required":false},"colorMap":{"name":"object","required":false},"tickLabelStyle":{"name":"object","required":false},"labelStyle":{"name":"object","required":false},"tickMinStep":{"name":"number","required":false},"tickMaxStep":{"name":"number","required":false},"tickNumber":{"name":"number","required":false},"tickSize":{"name":"number","required":false},"tickSpacing":{"name":"number","required":false},"tickLabelMinGap":{"name":"number","required":false},"tickLabelPlacement":{"name":"enum","value":[{"value":"'middle'","computed":false},{"value":"'tick'","computed":false}],"required":false},"tickPlacement":{"name":"enum","value":[{"value":"'start'","computed":false},{"value":"'end'","computed":false},{"value":"'middle'","computed":false},{"value":"'extremities'","computed":false}],"required":false},"height":{"name":"number","required":false},"disableLine":{"name":"bool","required":false},"disableTicks":{"name":"bool","required":false},"domainLimit":{"name":"enum","value":[{"value":"'nice'","computed":false},{"value":"'strict'","computed":false}],"required":false},"categoryGapRatio":{"name":"number","required":false},"barGapRatio":{"name":"number","required":false},"width":{"name":"number","required":false}}}},"required":false,"description":"X-axis configuration. Array of axis config objects.\n- id (string): Axis identifier\n- label (string): Axis label\n- scaleType (string): 'linear', 'log', 'time', 'band', 'point', 'sqrt', 'symlog', 'utc'\n- min/max (number): Domain bounds\n- data (array): Axis data values\n- dataKey (string): Key for dataset-driven axis\n- position (string): 'top', 'bottom', 'none'\n- reverse (bool): Reverse axis direction\n- colorMap (object): Color mapping configuration\n- tickLabelStyle (object): CSS for tick labels\n- labelStyle (object): CSS for axis label\n- tickMinStep (number): Minimum step between ticks\n- tickMaxStep (number): Maximum step between ticks\n- tickNumber (number): Approximate tick count\n- tickSize (number): Tick mark length in pixels\n- height (number): Space reserved for axis\n- disableLine (bool): Hide axis line\n- disableTicks (bool): Hide tick marks\n- domainLimit (string): 'nice' or 'strict'"},"yAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"label":{"name":"string","required":false},"scaleType":{"name":"enum","value":[{"value":"'linear'","computed":false},{"value":"'log'","computed":false},{"value":"'time'","computed":false},{"value":"'band'","computed":false},{"value":"'point'","computed":false},{"value":"'sqrt'","computed":false},{"value":"'symlog'","computed":false},{"value":"'utc'","computed":false},{"value":"'pow'","computed":false}],"required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"data":{"name":"array","required":false},"dataKey":{"name":"string","required":false},"position":{"name":"enum","value":[{"value":"'left'","computed":false},{"value":"'right'","computed":false},{"value":"'none'","computed":false}],"required":false},"reverse":{"name":"bool","required":false},"colorMap":{"name":"object","required":false},"tickLabelStyle":{"name":"object","required":false},"labelStyle":{"name":"object","required":false},"tickMinStep":{"name":"number","required":false},"tickMaxStep":{"name":"number","required":false},"tickNumber":{"name":"number","required":false},"tickSize":{"name":"number","required":false},"tickSpacing":{"name":"number","required":false},"tickLabelMinGap":{"name":"number","required":false},"tickLabelPlacement":{"name":"enum","value":[{"value":"'middle'","computed":false},{"value":"'tick'","computed":false}],"required":false},"tickPlacement":{"name":"enum","value":[{"value":"'start'","computed":false},{"value":"'end'","computed":false},{"value":"'middle'","computed":false},{"value":"'extremities'","computed":false}],"required":false},"width":{"name":"number","required":false},"disableLine":{"name":"bool","required":false},"disableTicks":{"name":"bool","required":false},"domainLimit":{"name":"enum","value":[{"value":"'nice'","computed":false},{"value":"'strict'","computed":false}],"required":false}}}},"required":false,"description":"Y-axis configuration. Array of axis config objects.\nSame properties as xAxis, plus:\n- width (number): Space reserved for axis\n- position (string): 'left', 'right', 'none'"},"zAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"string","required":false},"data":{"name":"array","required":false},"dataKey":{"name":"string","required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"colorMap":{"name":"object","required":false}}}},"required":false,"description":"Z-axis configuration for color mapping scatter points.\nColor priority: z-axis > y-axis > x-axis > series color.\n- data (array): Z-axis values\n- dataKey (string): Key for dataset-driven z values\n- id (string): Axis identifier\n- min/max (number): Domain bounds\n- colorMap (object): Color mapping - continuous, piecewise, or ordinal\n Continuous: {type: 'continuous', min, max, color: ['#start', '#end']}\n Piecewise: {type: 'piecewise', thresholds: [...], colors: [...]}\n Ordinal: {type: 'ordinal', values: [...], colors: [...]}"},"dataset":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Dataset array for datasetKeys-driven series.\nArray of objects where keys map to series datasetKeys.\nExample: [{x1: 10, y1: 20, x2: 30, y2: 40}, ...]"},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels. Default is 400."},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not set, fills available space."},"margin":{"type":{"name":"shape","value":{"top":{"name":"number","required":false},"right":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false}}},"required":false,"description":"Chart margins in pixels. Object with top, right, bottom, left keys."},"grid":{"type":{"name":"shape","value":{"horizontal":{"name":"bool","required":false},"vertical":{"name":"bool","required":false}}},"required":false,"description":"Grid configuration. Object with horizontal and vertical boolean keys."},"colors":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Color palette array for multiple series."},"voronoiMaxRadius":{"type":{"name":"union","value":[{"name":"number"},{"name":"enum","value":[{"value":"'item'","computed":false}]}]},"required":false,"description":"Maximum distance between pointer and scatter point for interaction.\n- number: Distance in pixels\n- 'item': Only trigger on direct hover over marker\n- undefined: Infinite radius (default)"},"disableVoronoi":{"type":{"name":"bool"},"required":false,"description":"If true, disables Voronoi cell interaction and falls back to hover events."},"axisHighlight":{"type":{"name":"shape","value":{"x":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'line'","computed":false},{"value":"'band'","computed":false}],"required":false},"y":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'line'","computed":false},{"value":"'band'","computed":false}],"required":false}}},"required":false,"description":"Axis highlight configuration on hover.\n- x: 'none', 'line', or 'band'\n- y: 'none', 'line', or 'band'"},"tooltip":{"type":{"name":"shape","value":{"trigger":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'axis'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Tooltip configuration.\n- trigger: 'item' (on point hover), 'axis' (all at x position), 'none' (disabled)"},"hideLegend":{"type":{"name":"bool"},"required":false,"description":"If true, the legend is hidden."},"skipAnimation":{"type":{"name":"bool"},"required":false,"description":"If true, animations are disabled."},"loading":{"type":{"name":"bool"},"required":false,"description":"If true, shows a loading overlay."},"renderer":{"type":{"name":"enum","value":[{"value":"'svg-single'","computed":false},{"value":"'svg-batch'","computed":false}]},"required":false,"description":"Renderer type for performance optimization.\n- 'svg-single': Default, renders each point as a element\n- 'svg-batch': Batch renders points in elements for large datasets\n Note: svg-batch has limitations (no CSS per-point, no custom markers)"},"slotProps":{"type":{"name":"object"},"required":false,"description":"Props passed to internal slot components for customization."},"highlightedItem":{"type":{"name":"object"},"required":false,"description":"Currently highlighted item. Works as both input (controlled) and output.\nObject with seriesId and dataIndex."},"clickData":{"type":{"name":"object"},"required":false,"description":"Data from the most recent click event. Read-only output property.\nContains seriesId, dataIndex, x, y, and timestamp."},"n_clicks":{"type":{"name":"number"},"required":false,"description":"Number of times the chart has been clicked. Increments on each click event."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash-assigned callback that should be called to report property changes\nto Dash, to make them available for callbacks."}}},"src/lib/components/SimpleTreeView.react.js":{"description":"","displayName":"SimpleTreeView","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"Dash component id"},"items":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"itemId":{"name":"string","required":true},"label":{"name":"string","required":true},"children":{"name":"array","required":false},"disabled":{"name":"bool","required":false},"disableSelection":{"name":"bool","required":false}}}},"required":false,"description":"Nested items array. Each item: {itemId: string, label: string, children?: [], disabled?: bool, disableSelection?: bool}","defaultValue":{"value":"[]","computed":false}},"selectedItems":{"type":{"name":"union","value":[{"name":"string"},{"name":"arrayOf","value":{"name":"string"}}]},"required":false,"description":"Controlled selected item(s). String when multiSelect=false, array when true."},"defaultSelectedItems":{"type":{"name":"union","value":[{"name":"string"},{"name":"arrayOf","value":{"name":"string"}}]},"required":false,"description":"Default selected items (uncontrolled)."},"multiSelect":{"type":{"name":"bool"},"required":false,"description":"Allow selecting multiple items.","defaultValue":{"value":"false","computed":false}},"checkboxSelection":{"type":{"name":"bool"},"required":false,"description":"Show checkboxes for selection.","defaultValue":{"value":"false","computed":false}},"disableSelection":{"type":{"name":"bool"},"required":false,"description":"Disable all selection.","defaultValue":{"value":"false","computed":false}},"expandedItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Controlled expanded item IDs."},"defaultExpandedItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Default expanded items (uncontrolled)."},"expansionTrigger":{"type":{"name":"enum","value":[{"value":"'content'","computed":false},{"value":"'iconContainer'","computed":false}]},"required":false,"description":"What triggers expansion: \"content\" or \"iconContainer\".","defaultValue":{"value":"'content'","computed":false}},"disabledItemsFocusable":{"type":{"name":"bool"},"required":false,"description":"Allow focus on disabled items.","defaultValue":{"value":"false","computed":false}},"itemChildrenIndentation":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Indentation of children. Number (px) or string (\"24px\", \"2rem\").","defaultValue":{"value":"'12px'","computed":false}},"height":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Container height."},"sx":{"type":{"name":"object"},"required":false,"description":"MUI sx styling object."},"collapseIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for collapse icon (e.g. \"ExpandMore\")."},"expandIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for expand icon (e.g. \"ChevronRight\")."},"endIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for leaf/end icon."},"ariaLabel":{"type":{"name":"string"},"required":false,"description":"ARIA label for the tree."},"ariaLabelledBy":{"type":{"name":"string"},"required":false,"description":"ID of element that labels the tree."},"clickedItem":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Fired when item is clicked. {itemId, event_timestamp}"},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash setProps callback"}}},"src/lib/components/SparklineChart.react.js":{"description":"SparklineChart component wrapping MUI X Charts SparkLineChart.\nRenders compact, inline charts perfect for dashboards, tables, and KPI cards.\nThis is a Community feature - no license key required.\n\nSupports both controlled and uncontrolled highlight states for interactive\ndashboards where hovering on a sparkline updates other components.","displayName":"SparklineChart","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"data":{"type":{"name":"arrayOf","value":{"name":"number"}},"required":true,"description":"Array of numeric values to display in the sparkline.\nThis is the primary data for the chart."},"plotType":{"type":{"name":"enum","value":[{"value":"'line'","computed":false},{"value":"'bar'","computed":false}]},"required":false,"description":"Type of plot to render.\n- 'line': Renders a line chart (default)\n- 'bar': Renders a bar chart"},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not specified, the chart will\nexpand to fill the available space."},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels. Default is 36 for compact inline display."},"color":{"type":{"name":"string"},"required":false,"description":"Single color for the sparkline. Can be any valid CSS color string.\nExample: '#1976d2', 'rgb(25, 118, 210)', 'blue'"},"colors":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Array of colors for the sparkline. Use this for multi-color configurations."},"area":{"type":{"name":"bool"},"required":false,"description":"If true, fills the area under the line. Only applies when plotType is 'line'."},"curve":{"type":{"name":"enum","value":[{"value":"'linear'","computed":false},{"value":"'monotoneX'","computed":false},{"value":"'monotoneY'","computed":false},{"value":"'natural'","computed":false},{"value":"'step'","computed":false},{"value":"'stepBefore'","computed":false},{"value":"'stepAfter'","computed":false},{"value":"'catmullRom'","computed":false},{"value":"'bumpX'","computed":false},{"value":"'bumpY'","computed":false}]},"required":false,"description":"Curve interpolation method for line charts.\nOptions: 'linear', 'monotoneX', 'monotoneY', 'natural', 'step',\n'stepBefore', 'stepAfter', 'catmullRom', 'bumpX', 'bumpY'"},"showTooltip":{"type":{"name":"bool"},"required":false,"description":"If true, shows a tooltip on hover displaying the value."},"showHighlight":{"type":{"name":"bool"},"required":false,"description":"If true, shows a visual highlight on the hovered data point.\nFor line charts, shows a dot. For bar charts, shows a band."},"margin":{"type":{"name":"shape","value":{"top":{"name":"number","required":false},"right":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false}}},"required":false,"description":"Chart margins in pixels. Object with top, right, bottom, left keys.\nDefault is { top: 5, right: 5, bottom: 5, left: 5 }."},"xAxis":{"type":{"name":"shape","value":{"id":{"name":"string","required":false},"data":{"name":"array","required":false},"scaleType":{"name":"enum","value":[{"value":"'band'","computed":false},{"value":"'point'","computed":false},{"value":"'linear'","computed":false},{"value":"'log'","computed":false},{"value":"'time'","computed":false}],"required":false}}},"required":false,"description":"X-axis configuration object. Unlike LineChart, this is a single object,\nnot an array. The axis is hidden by default for compact display.\n- id (string): Axis identifier for controlled highlighting\n- data (array): X-axis labels/values\n- scaleType (string): Scale type"},"yAxis":{"type":{"name":"shape","value":{"min":{"name":"number","required":false},"max":{"name":"number","required":false}}},"required":false,"description":"Y-axis configuration object. Unlike LineChart, this is a single object,\nnot an array. The axis is hidden by default for compact display."},"axisHighlight":{"type":{"name":"shape","value":{"x":{"name":"enum","value":[{"value":"'line'","computed":false},{"value":"'band'","computed":false},{"value":"'none'","computed":false}],"required":false},"y":{"name":"enum","value":[{"value":"'line'","computed":false},{"value":"'band'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Axis highlight configuration. Controls how the axis is highlighted on hover.\n- x: 'line' | 'band' | 'none' - highlight style for x-axis\n- y: 'line' | 'band' | 'none' - highlight style for y-axis"},"slotProps":{"type":{"name":"object"},"required":false,"description":"Props passed to internal slot components for customization.\n- lineHighlight: { r: number } - radius of the highlight dot\n- tooltip: tooltip configuration"},"clipAreaOffset":{"type":{"name":"shape","value":{"top":{"name":"number","required":false},"right":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false}}},"required":false,"description":"Offset for the clip area to prevent cutting off elements at edges.\nObject with top, right, bottom, left keys (in pixels)."},"baseline":{"type":{"name":"union","value":[{"name":"enum","value":[{"value":"'min'","computed":false},{"value":"'max'","computed":false}]},{"name":"number"}]},"required":false,"description":"Baseline for area charts. Determines where the area fill starts.\n- 'min': fills from minimum value (default)\n- 'max': fills from maximum value\n- number: fills from a specific value"},"strokeWidth":{"type":{"name":"number"},"required":false,"description":"Stroke width for the line in pixels. Only applies when plotType is 'line'.\nDefault is 2. Higher values create thicker lines."},"disableClipping":{"type":{"name":"bool"},"required":false,"description":"If true, disables clipping of the chart content.\nUseful when elements extend beyond the chart boundaries."},"highlightedIndex":{"type":{"name":"number"},"required":false,"description":"Controlled highlight index. Set this to programmatically highlight\na specific data point. Requires xAxis.id to be set."},"highlightedItem":{"type":{"name":"object"},"required":false,"description":"Currently highlighted item. Read-only output property updated when\nthe user hovers over a data point (requires showHighlight=true).\nContains the data index of the highlighted point."},"hoverIndex":{"type":{"name":"number"},"required":false,"description":"Index of the currently hovered data point. Read-only output.\nUse this to sync hover state with other components."},"hoverValue":{"type":{"name":"number"},"required":false,"description":"Value at the currently hovered data point. Read-only output.\nUse this to display the hovered value in other components."},"n_hovers":{"type":{"name":"number"},"required":false,"description":"Number of hover events. Increments each time a data point is hovered."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash-assigned callback that should be called to report property changes\nto Dash, to make them available for callbacks."}}},"src/lib/components/TimeClock.react.js":{"description":"TimeClock lets the user pick a time on an inline clock face (hours, minutes,\nand optionally seconds) without any input, popper, or modal. Values are\nexchanged with Dash as strings; on change it emits `value` (wall-time ISO),\nthe current `view`, and a parsed `timeData` convenience object.","displayName":"TimeClock","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"Dash component id"},"value":{"type":{"name":"string"},"required":false,"description":"Controlled value. Full wall-time ISO (\"2022-04-17T15:30:00\") or time-only\n(\"15:30\" / \"15:30:45\"). Also an OUTPUT: updated on every change with a\nfull wall-time ISO string."},"defaultValue":{"type":{"name":"string"},"required":false,"description":"Uncontrolled initial value (same string formats as `value`)."},"views":{"type":{"name":"arrayOf","value":{"name":"enum","value":[{"value":"'hours'","computed":false},{"value":"'minutes'","computed":false},{"value":"'seconds'","computed":false}]}},"required":false,"description":"Which views to render, in order. Default [\"hours\", \"minutes\"].","defaultValue":{"value":"['hours', 'minutes']","computed":false}},"view":{"type":{"name":"enum","value":[{"value":"'hours'","computed":false},{"value":"'minutes'","computed":false},{"value":"'seconds'","computed":false}]},"required":false,"description":"Controlled visible view. Also an OUTPUT \u2014 updated when the view changes."},"openTo":{"type":{"name":"enum","value":[{"value":"'hours'","computed":false},{"value":"'minutes'","computed":false},{"value":"'seconds'","computed":false}]},"required":false,"description":"Which view to open first (uncontrolled)."},"ampm":{"type":{"name":"bool"},"required":false,"description":"Force 12h (true) or 24h (false). Omit to use the locale default."},"disabled":{"type":{"name":"bool"},"required":false,"description":"Disable the whole clock.","defaultValue":{"value":"false","computed":false}},"readOnly":{"type":{"name":"bool"},"required":false,"description":"Make the clock read-only (no editing).","defaultValue":{"value":"false","computed":false}},"autoFocus":{"type":{"name":"bool"},"required":false,"description":"Auto-focus the clock on mount.","defaultValue":{"value":"false","computed":false}},"minutesStep":{"type":{"name":"number"},"required":false,"description":"Step (in minutes) between selectable minute values."},"minTime":{"type":{"name":"string"},"required":false,"description":"Minimum selectable time (ISO or time-only string)."},"maxTime":{"type":{"name":"string"},"required":false,"description":"Maximum selectable time (ISO or time-only string)."},"disableFuture":{"type":{"name":"bool"},"required":false,"description":"Disable times in the future (relative to now).","defaultValue":{"value":"false","computed":false}},"disablePast":{"type":{"name":"bool"},"required":false,"description":"Disable times in the past (relative to now).","defaultValue":{"value":"false","computed":false}},"disableIgnoringDatePartForTimeValidation":{"type":{"name":"bool"},"required":false,"description":"When true, min/max time comparisons include the date part. When false\n(default), only the time-of-day is compared.","defaultValue":{"value":"false","computed":false}},"showViewSwitcher":{"type":{"name":"bool"},"required":false,"description":"Show the hours/minutes/seconds view-switch arrow buttons.","defaultValue":{"value":"false","computed":false}},"className":{"type":{"name":"string"},"required":false,"description":"CSS class applied to the wrapping div."},"sx":{"type":{"name":"object"},"required":false,"description":"MUI sx styling object applied to the TimeClock."},"timeData":{"type":{"name":"exact","value":{"hours":{"name":"number","required":false},"minutes":{"name":"number","required":false},"seconds":{"name":"number","required":false},"formatted":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Parsed convenience output, updated on every change:\n{ hours, minutes, seconds, formatted (\"HH:mm:ss\"), event_timestamp }."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash setProps callback"}}},"src/lib/components/TreeView.react.js":{"description":"","displayName":"TreeView","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"Dash component id"},"items":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Array of item objects. Each must have an id and label (or use getItemId/getItemLabel).","defaultValue":{"value":"[]","computed":false}},"getItemId":{"type":{"name":"string"},"required":false,"description":"Property name for item ID (default: \"id\")","defaultValue":{"value":"'id'","computed":false}},"getItemLabel":{"type":{"name":"string"},"required":false,"description":"Property name for item label (default: \"label\")","defaultValue":{"value":"'label'","computed":false}},"getItemChildren":{"type":{"name":"string"},"required":false,"description":"Property name for item children (default: \"children\")","defaultValue":{"value":"'children'","computed":false}},"selectedItems":{"type":{"name":"union","value":[{"name":"string"},{"name":"arrayOf","value":{"name":"string"}}]},"required":false,"description":"Controlled selected item(s). String when multiSelect=false, array when true."},"defaultSelectedItems":{"type":{"name":"union","value":[{"name":"string"},{"name":"arrayOf","value":{"name":"string"}}]},"required":false,"description":"Default selected items (uncontrolled)."},"multiSelect":{"type":{"name":"bool"},"required":false,"description":"Allow selecting multiple items.","defaultValue":{"value":"false","computed":false}},"checkboxSelection":{"type":{"name":"bool"},"required":false,"description":"Show checkboxes for selection.","defaultValue":{"value":"false","computed":false}},"disableSelection":{"type":{"name":"bool"},"required":false,"description":"Disable all selection.","defaultValue":{"value":"false","computed":false}},"selectionPropagation":{"type":{"name":"exact","value":{"parents":{"name":"bool","required":false},"descendants":{"name":"bool","required":false}}},"required":false,"description":"Auto-propagate selection to parents/descendants. {parents: bool, descendants: bool}"},"expandedItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Controlled expanded item IDs."},"defaultExpandedItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Default expanded items (uncontrolled)."},"expansionTrigger":{"type":{"name":"enum","value":[{"value":"'content'","computed":false},{"value":"'iconContainer'","computed":false}]},"required":false,"description":"What triggers expansion: \"content\" or \"iconContainer\".","defaultValue":{"value":"'content'","computed":false}},"isItemEditable":{"type":{"name":"bool"},"required":false,"description":"Enable label editing. true = all items, or use editableItems for per-item control.","defaultValue":{"value":"false","computed":false}},"editableItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"List of item IDs that are editable (alternative to isItemEditable=true)."},"disabledItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"List of item IDs that should be disabled."},"disabledItemsFocusable":{"type":{"name":"bool"},"required":false,"description":"Allow focus on disabled items.","defaultValue":{"value":"false","computed":false}},"itemChildrenIndentation":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Indentation of children. Number (px) or string (\"24px\", \"2rem\").","defaultValue":{"value":"'12px'","computed":false}},"height":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Container height."},"sx":{"type":{"name":"object"},"required":false,"description":"MUI sx styling object."},"collapseIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for collapse icon (e.g. \"ExpandMore\")."},"expandIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for expand icon (e.g. \"ChevronRight\")."},"endIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for leaf/end icon."},"ariaLabel":{"type":{"name":"string"},"required":false,"description":"ARIA label for the tree."},"ariaLabelledBy":{"type":{"name":"string"},"required":false,"description":"ID of element that labels the tree."},"clickedItem":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Fired when item is clicked. {itemId, event_timestamp}"},"focusedItem":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Fired when item is focused. {itemId, event_timestamp}"},"editedItemLabel":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"newLabel":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Fired when label edit completes. {itemId, newLabel, event_timestamp}"},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash setProps callback"}}},"src/lib/components/TreeViewPro.react.js":{"description":"","displayName":"TreeViewPro","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"Dash component id"},"licenseKey":{"type":{"name":"string"},"required":false,"description":"MUI X Pro license key. Required for Pro features.","defaultValue":{"value":"''","computed":false}},"items":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Array of item objects.","defaultValue":{"value":"[]","computed":false}},"getItemId":{"type":{"name":"string"},"required":false,"description":"Property name for item ID (default: \"id\")","defaultValue":{"value":"'id'","computed":false}},"getItemLabel":{"type":{"name":"string"},"required":false,"description":"Property name for item label (default: \"label\")","defaultValue":{"value":"'label'","computed":false}},"getItemChildren":{"type":{"name":"string"},"required":false,"description":"Property name for item children (default: \"children\")","defaultValue":{"value":"'children'","computed":false}},"selectedItems":{"type":{"name":"union","value":[{"name":"string"},{"name":"arrayOf","value":{"name":"string"}}]},"required":false,"description":"Controlled selected item(s). String when multiSelect=false, array when true."},"defaultSelectedItems":{"type":{"name":"union","value":[{"name":"string"},{"name":"arrayOf","value":{"name":"string"}}]},"required":false,"description":"Default selected items (uncontrolled)."},"multiSelect":{"type":{"name":"bool"},"required":false,"description":"Allow selecting multiple items.","defaultValue":{"value":"false","computed":false}},"checkboxSelection":{"type":{"name":"bool"},"required":false,"description":"Show checkboxes for selection.","defaultValue":{"value":"false","computed":false}},"disableSelection":{"type":{"name":"bool"},"required":false,"description":"Disable all selection.","defaultValue":{"value":"false","computed":false}},"selectionPropagation":{"type":{"name":"exact","value":{"parents":{"name":"bool","required":false},"descendants":{"name":"bool","required":false}}},"required":false,"description":"Auto-propagate selection to parents/descendants."},"expandedItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Controlled expanded item IDs."},"defaultExpandedItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Default expanded items (uncontrolled)."},"expansionTrigger":{"type":{"name":"enum","value":[{"value":"'content'","computed":false},{"value":"'iconContainer'","computed":false}]},"required":false,"description":"What triggers expansion: \"content\" or \"iconContainer\".","defaultValue":{"value":"'content'","computed":false}},"isItemEditable":{"type":{"name":"bool"},"required":false,"description":"Enable label editing for all items.","defaultValue":{"value":"false","computed":false}},"editableItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"List of item IDs that are editable."},"disabledItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"List of item IDs that should be disabled."},"disabledItemsFocusable":{"type":{"name":"bool"},"required":false,"description":"Allow focus on disabled items.","defaultValue":{"value":"false","computed":false}},"itemChildrenIndentation":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Indentation of children.","defaultValue":{"value":"'12px'","computed":false}},"height":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Container height."},"sx":{"type":{"name":"object"},"required":false,"description":"MUI sx styling object."},"collapseIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for collapse icon."},"expandIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for expand icon."},"endIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for leaf/end icon."},"ariaLabel":{"type":{"name":"string"},"required":false,"description":"ARIA label for the tree."},"ariaLabelledBy":{"type":{"name":"string"},"required":false,"description":"ID of element that labels the tree."},"itemsReordering":{"type":{"name":"bool"},"required":false,"description":"Enable drag-and-drop item reordering.","defaultValue":{"value":"false","computed":false}},"reorderableItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"List of item IDs that can be reordered. If empty, all items are reorderable."},"itemPositionChanged":{"type":{"name":"object"},"required":false,"description":"Output: Fired after item reorder. {itemId, oldPosition, newPosition, event_timestamp}"},"orderedItems":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Output: the current tree after any drag-and-drop reorder, preserving\neach node's original fields (id, label, children, etc.). Updates on\nevery reorder so Python callbacks can render the live order."},"lazyLoading":{"type":{"name":"bool"},"required":false,"description":"Enable lazy loading mode.","defaultValue":{"value":"false","computed":false}},"lazyLoadedChildren":{"type":{"name":"object"},"required":false,"description":"Input: Children loaded by Dash callback. {parentItemId: [childItems]}"},"lazyLoadRequest":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Output: Fired when unloaded node is expanded. {itemId, event_timestamp}"},"showItemControls":{"type":{"name":"bool"},"required":false,"description":"Show a Slider + kebab menu on each item row.","defaultValue":{"value":"false","computed":false}},"controlsItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Restrict slider+kebab to a subset of item IDs. Empty/omitted means all items."},"sliderValues":{"type":{"name":"object"},"required":false,"description":"Controlled slider values keyed by itemId, e.g. {\"task-1\": 40}. Also updated as user drags."},"sliderMin":{"type":{"name":"number"},"required":false,"description":"Slider minimum.","defaultValue":{"value":"0","computed":false}},"sliderMax":{"type":{"name":"number"},"required":false,"description":"Slider maximum.","defaultValue":{"value":"100","computed":false}},"sliderStep":{"type":{"name":"number"},"required":false,"description":"Slider step.","defaultValue":{"value":"1","computed":false}},"sliderColor":{"type":{"name":"string"},"required":false,"description":"Slider color. Accepts a Mantine theme color name (\"teal\", \"blue.5\"),\na CSS color literal (\"#ff6b6b\", \"rgb(...)\"), or a CSS expression\n(\"var(--mantine-color-teal-6)\", \"light-dark(...)\"). Bare names use\nshade 6 by default. When omitted, the slider falls back to MUI's\n`primary` palette color."},"kebabMenuItems":{"type":{"name":"arrayOf","value":{"name":"exact","value":{"label":{"name":"string","required":true},"value":{"name":"string","required":true},"icon":{"name":"string","required":false}}}},"required":false,"description":"Kebab menu options: [{label, value, icon?}]. `value` is sent back as `action`."},"sliderChange":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"value":{"name":"number","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Output: fires once on each commit (mouse-up) of a slider drag. {itemId, value, event_timestamp}"},"kebabAction":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"action":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Output: fires when a kebab menu item is chosen. {itemId, action, event_timestamp}"},"clickedItem":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Fired when item is clicked. {itemId, event_timestamp}"},"focusedItem":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Fired when item is focused. {itemId, event_timestamp}"},"editedItemLabel":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"newLabel":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Fired when label edit completes. {itemId, newLabel, event_timestamp}"},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash setProps callback"}}}} \ No newline at end of file +{"src/lib/components/BarChart.react.js":{"description":"BarChart \u2014 Dash wrapper for MUI X BarChart (Community) and BarChartPro (Pro).\n\nRenders vertical or horizontal bar charts with support for stacking, bar labels,\ndataset mode, color maps, reference lines, highlighting, and Pro features\n(zoom, toolbar, brush).","displayName":"BarChart","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"series":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Array of bar series objects. Each series can contain:\n- data (number[]): Bar values\n- dataKey (string): Column key when using dataset prop\n- label (string): Series label for legend/tooltip\n- color (string): Series color\n- stack (string): Stack group ID (series with same value are stacked)\n- stackOffset (string): 'none', 'expand', 'diverging', 'silhouette', 'wiggle'\n- stackOrder (string): 'none', 'appearance', 'ascending', 'descending', 'insideOut', 'reverse'\n- barLabel (string): 'value' or 'formattedValue' to show labels on bars\n- barLabelPlacement (string): 'center' or 'outside'\n- highlightScope (object): {highlight, fade} highlight behavior\n- yAxisId (string): Y-axis binding for biaxial charts\n- id (string): Unique series identifier"},"dataset":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Array of row objects for dataKey-based series.\nExample: [{month: 'Jan', sales: 100}, {month: 'Feb', sales: 150}]"},"xAxis":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"X-axis configuration array. For bar charts, typically uses scaleType: 'band'.\nEach axis can contain:\n- data (array): Category labels\n- dataKey (string): Column key from dataset\n- scaleType (string): 'band' (required for bars), 'linear', 'log', etc.\n- label (string): Axis label text\n- categoryGapRatio (number): Gap between categories (0-1)\n- barGapRatio (number): Gap between bars in same category (-1 to Infinity)\n- tickPlacement (string): 'start', 'end', 'middle', 'extremities'\n- tickLabelPlacement (string): 'tick' or 'middle'\n- colorMap (object): Color mapping configuration\n- zoom (object): Zoom config for Pro features\n- id (string): Axis identifier\n- position (string): 'top', 'bottom', 'none'\n- min/max (number): Domain limits\n- reverse (bool): Reverse axis direction\n- tickNumber (number): Approximate tick count\n- tickMinStep/tickMaxStep (number): Control tick spacing\n- tickLabelStyle (object): CSS for tick labels\n- labelStyle (object): CSS for axis label\n- disableLine (bool): Hide axis line\n- disableTicks (bool): Hide tick marks\n- domainLimit (string): 'nice' or 'strict'\n- height (number): Space reserved for axis"},"yAxis":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Y-axis configuration array. Same structure as xAxis."},"layout":{"type":{"name":"enum","value":[{"value":"'vertical'","computed":false},{"value":"'horizontal'","computed":false}]},"required":false,"description":"Bar direction: 'vertical' (default) or 'horizontal'."},"borderRadius":{"type":{"name":"number"},"required":false,"description":"Border radius for bar corners in pixels."},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels."},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not set, uses parent container width."},"margin":{"type":{"name":"exact","value":{"top":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false},"right":{"name":"number","required":false}}},"required":false,"description":"Chart margins: {top, bottom, left, right} in pixels."},"grid":{"type":{"name":"exact","value":{"horizontal":{"name":"bool","required":false},"vertical":{"name":"bool","required":false}}},"required":false,"description":"Background grid lines: {horizontal: bool, vertical: bool}."},"colors":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Color palette array for series colors."},"skipAnimation":{"type":{"name":"bool"},"required":false,"description":"Disable animations."},"loading":{"type":{"name":"bool"},"required":false,"description":"Show loading overlay."},"hideLegend":{"type":{"name":"bool"},"required":false,"description":"Hide the legend."},"renderer":{"type":{"name":"enum","value":[{"value":"'svg-single'","computed":false},{"value":"'svg-batch'","computed":false}]},"required":false,"description":"Renderer strategy: 'svg-single' (default) or 'svg-batch' for large datasets."},"axisHighlight":{"type":{"name":"exact","value":{"x":{"name":"enum","value":[{"value":"'band'","computed":false},{"value":"'line'","computed":false},{"value":"'none'","computed":false}],"required":false},"y":{"name":"enum","value":[{"value":"'band'","computed":false},{"value":"'line'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Axis highlight configuration: {x: 'band'|'line'|'none', y: 'band'|'line'|'none'}."},"tooltip":{"type":{"name":"exact","value":{"trigger":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'axis'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Tooltip configuration: {trigger: 'item'|'axis'|'none'}."},"highlightedItem":{"type":{"name":"object"},"required":false,"description":"Controlled highlight state. Both input (to set highlight) and output\n(fires on hover). Object: {seriesId, dataIndex} or null."},"referenceLines":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Reference lines array. Each object:\n- x (string|number): Vertical line at this x value\n- y (number): Horizontal line at this y value\n- axisId (string): Which axis (when multiple)\n- label (string): Text label\n- labelAlign (string): 'start', 'middle', 'end'\n- lineStyle (object): SVG style for the line\n- labelStyle (object): SVG style for the label\n- spacing (object): Label offset"},"licenseKey":{"type":{"name":"string"},"required":false,"description":"MUI X Pro license key. Required for zoom, brush, and toolbar features."},"initialZoom":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Initial zoom state (Pro). Array of {axisId, start, end}."},"showSlider":{"type":{"name":"bool"},"required":false,"description":"Show zoom range slider below the chart (Pro)."},"showToolbar":{"type":{"name":"bool"},"required":false,"description":"Show zoom/export toolbar above the chart (Pro)."},"brushConfig":{"type":{"name":"object"},"required":false,"description":"Brush selection config (Pro): {enabled: bool, preventTooltip: bool, preventHighlight: bool}."},"zoomInteractionConfig":{"type":{"name":"object"},"required":false,"description":"Zoom interaction configuration (Pro). Controls drag, wheel, pinch, brush zoom behaviors."},"clickData":{"type":{"name":"object"},"required":false,"description":"Fires on bar click. Contains: {seriesId, dataIndex, timestamp}."},"axisClickData":{"type":{"name":"object"},"required":false,"description":"Fires on axis area click. Contains: {axisValue, dataIndex, seriesValues, timestamp}."},"zoomData":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Zoom state output (Pro). Fires on zoom change."},"n_clicks":{"type":{"name":"number"},"required":false,"description":"Number of times bars have been clicked."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash callback function."}}},"src/lib/components/CandlestickChart.react.js":{"description":"CandlestickChart \u2014 Dash wrapper that renders OHLC candlestick charts\nusing MUI X Charts Pro composition API with custom SVG candle rendering.\n\nSupports:\n- Array format: series[0].data = [[open, high, low, close], ...]\n- Dataset format: dataset + series[0].datasetKeys = {open, high, low, close}\n- Volume overlay (optional)\n- Reference lines\n- Grid, axes, zoom (Pro), toolbar (Pro)\n- Click events","displayName":"CandlestickChart","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"series":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"OHLC candlestick series. Typically a single series with two data formats:\n\nArray format:\n series=[{data: [[open,high,low,close], ...], upColor: '#4caf50', downColor: '#f44336'}]\n\nDataset format (use with dataset prop):\n series=[{datasetKeys: {open:'open', high:'high', low:'low', close:'close'},\n upColor: '#4caf50', downColor: '#f44336'}]\n\nOptional volume:\n series=[{..., volume: [100, 200, ...]}] (array format)\n series=[{..., volumeKey: 'volume'}] (dataset format)\n\nSeries properties:\n- data (array): Array of [open, high, low, close] tuples or {open, high, low, close} objects\n- datasetKeys (object): {open, high, low, close} mapping to dataset columns\n- upColor (string): Color when close >= open (default: '#4caf50')\n- downColor (string): Color when close < open (default: '#f44336')\n- volume (array): Volume values for each candle\n- volumeKey (string): Dataset column name for volume data"},"dataset":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Dataset for datasetKeys mode. Array of row objects.\nExample: [{date: '2025-01-02', open: 100, high: 110, low: 95, close: 105, volume: 1000}, ...]"},"xAxis":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"X-axis configuration. Typically band scale with dates/labels.\n- data (array): Category labels (dates, day names, etc.)\n- dataKey (string): Column from dataset for labels\n- label (string): Axis label text\n- scaleType (string): Always 'band' for candlestick (set automatically)\n- zoom (object): Zoom config for Pro features\n- tickLabelStyle (object): CSS for tick labels\n- tickPlacement (string): 'start', 'end', 'middle', 'extremities'"},"yAxis":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Y-axis configuration for price values.\n- label (string): Axis label (e.g., 'Price ($)')\n- min/max (number): Override auto-computed domain from OHLC data\n- position (string): 'left' or 'right'"},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels."},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not set, uses parent container width."},"margin":{"type":{"name":"exact","value":{"top":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false},"right":{"name":"number","required":false}}},"required":false,"description":"Chart margins: {top, bottom, left, right} in pixels."},"grid":{"type":{"name":"exact","value":{"horizontal":{"name":"bool","required":false},"vertical":{"name":"bool","required":false}}},"required":false,"description":"Background grid lines: {horizontal: bool, vertical: bool}."},"skipAnimation":{"type":{"name":"bool"},"required":false,"description":"Disable animations."},"hideLegend":{"type":{"name":"bool"},"required":false,"description":"Hide the legend (default: true for candlestick)."},"tooltip":{"type":{"name":"exact","value":{"trigger":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Tooltip configuration: {trigger: 'item'|'none'}.\nSet trigger to 'none' to disable the OHLC tooltip."},"bodyWidthRatio":{"type":{"name":"number"},"required":false,"description":"Candle body width as a ratio of the band width (0-1). Default: 0.6."},"wickWidth":{"type":{"name":"number"},"required":false,"description":"Wick (shadow) line width in pixels. Default: 2."},"showVolume":{"type":{"name":"bool"},"required":false,"description":"Show volume bars below candles. Requires volume data in series."},"volumeHeightRatio":{"type":{"name":"number"},"required":false,"description":"Volume bars maximum height as ratio of chart height (0-1). Default: 0.2."},"referenceLines":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Reference lines array. Same format as BarChart/LineChart."},"licenseKey":{"type":{"name":"string"},"required":false,"description":"MUI X Pro license key. Required for zoom, slider, and toolbar."},"initialZoom":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Initial zoom state (Pro). Array of {axisId, start, end}."},"showSlider":{"type":{"name":"bool"},"required":false,"description":"Show zoom range slider (Pro)."},"showToolbar":{"type":{"name":"bool"},"required":false,"description":"Show toolbar (Pro)."},"zoomInteractionConfig":{"type":{"name":"object"},"required":false,"description":"Zoom interaction configuration (Pro)."},"clickData":{"type":{"name":"object"},"required":false,"description":"Fires on candle click. Contains: {dataIndex, label, open, high, low, close, timestamp}."},"hoverData":{"type":{"name":"object"},"required":false,"description":"Hover data output (reserved for future use)."},"zoomData":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Zoom state output (Pro)."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash callback function."}}},"src/lib/components/CompositeChart.react.js":{"description":"CompositeChart component for layering multiple chart types together.\nUses MUI X Charts composition API to render scatter, line, and area plots\non a single chart surface. Each series must specify its type ('scatter' or 'line').\nSupports Pro features like zoom/pan with a license key.","displayName":"CompositeChart","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"licenseKey":{"type":{"name":"string"},"required":false,"description":"MUI X Pro license key. Required for zoom/pan/toolbar features."},"series":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"type":{"name":"enum","value":[{"value":"'scatter'","computed":false},{"value":"'line'","computed":false}],"required":true},"id":{"name":"string","required":false},"label":{"name":"string","required":false},"color":{"name":"string","required":false},"data":{"name":"union","value":[{"name":"arrayOf","value":{"name":"number"}},{"name":"arrayOf","value":{"name":"shape","value":{"x":{"name":"number","required":false},"y":{"name":"number","required":false},"id":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false}}}}],"required":false},"datasetKeys":{"name":"shape","value":{"x":{"name":"string","required":false},"y":{"name":"string","required":false}},"required":false},"markerSize":{"name":"number","required":false},"preview":{"name":"shape","value":{"markerSize":{"name":"number","required":false}},"required":false},"area":{"name":"bool","required":false},"curve":{"name":"enum","value":[{"value":"'linear'","computed":false},{"value":"'monotoneX'","computed":false},{"value":"'monotoneY'","computed":false},{"value":"'natural'","computed":false},{"value":"'step'","computed":false},{"value":"'stepBefore'","computed":false},{"value":"'stepAfter'","computed":false},{"value":"'catmullRom'","computed":false},{"value":"'bumpX'","computed":false},{"value":"'bumpY'","computed":false}],"required":false},"showMark":{"name":"bool","required":false},"yAxisId":{"name":"string","required":false},"xAxisId":{"name":"string","required":false},"highlightScope":{"name":"shape","value":{"highlight":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'series'","computed":false},{"value":"'none'","computed":false}],"required":false},"fade":{"name":"enum","value":[{"value":"'global'","computed":false},{"value":"'series'","computed":false},{"value":"'none'","computed":false}],"required":false}},"required":false},"stack":{"name":"string","required":false},"connectNulls":{"name":"bool","required":false}}}},"required":false,"description":"Array of series to display. Each series MUST include a 'type' field.\n\nScatter series:\n{type: 'scatter', id, label, color, markerSize, data: [{x, y, id}], highlightScope}\n\nLine series:\n{type: 'line', id, label, color, data: [...], area, curve, showMark, highlightScope, yAxisId}"},"xAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"label":{"name":"string","required":false},"scaleType":{"name":"enum","value":[{"value":"'linear'","computed":false},{"value":"'log'","computed":false},{"value":"'time'","computed":false},{"value":"'band'","computed":false},{"value":"'point'","computed":false},{"value":"'sqrt'","computed":false},{"value":"'symlog'","computed":false},{"value":"'utc'","computed":false},{"value":"'pow'","computed":false}],"required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"data":{"name":"array","required":false},"dataKey":{"name":"string","required":false},"position":{"name":"enum","value":[{"value":"'top'","computed":false},{"value":"'bottom'","computed":false},{"value":"'none'","computed":false}],"required":false},"reverse":{"name":"bool","required":false},"colorMap":{"name":"object","required":false},"tickLabelStyle":{"name":"object","required":false},"labelStyle":{"name":"object","required":false},"tickMinStep":{"name":"number","required":false},"tickMaxStep":{"name":"number","required":false},"tickNumber":{"name":"number","required":false},"tickSize":{"name":"number","required":false},"tickSpacing":{"name":"number","required":false},"tickLabelMinGap":{"name":"number","required":false},"tickLabelPlacement":{"name":"enum","value":[{"value":"'middle'","computed":false},{"value":"'tick'","computed":false}],"required":false},"tickPlacement":{"name":"enum","value":[{"value":"'start'","computed":false},{"value":"'end'","computed":false},{"value":"'middle'","computed":false},{"value":"'extremities'","computed":false}],"required":false},"height":{"name":"number","required":false},"disableLine":{"name":"bool","required":false},"disableTicks":{"name":"bool","required":false},"domainLimit":{"name":"enum","value":[{"value":"'nice'","computed":false},{"value":"'strict'","computed":false}],"required":false},"zoom":{"name":"union","value":[{"name":"bool"},{"name":"object"}],"required":false},"dateFormat":{"name":"string","required":false},"dateTickFormat":{"name":"string","required":false},"valueFormatter":{"name":"union","value":[{"name":"func"},{"name":"shape","value":{"function":{"name":"string","required":true},"options":{"name":"object","required":false}}}],"required":false}}}},"required":false,"description":"X-axis configuration. Array of axis config objects."},"yAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"label":{"name":"string","required":false},"scaleType":{"name":"enum","value":[{"value":"'linear'","computed":false},{"value":"'log'","computed":false},{"value":"'time'","computed":false},{"value":"'band'","computed":false},{"value":"'point'","computed":false},{"value":"'sqrt'","computed":false},{"value":"'symlog'","computed":false},{"value":"'utc'","computed":false},{"value":"'pow'","computed":false}],"required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"data":{"name":"array","required":false},"dataKey":{"name":"string","required":false},"position":{"name":"enum","value":[{"value":"'left'","computed":false},{"value":"'right'","computed":false},{"value":"'none'","computed":false}],"required":false},"reverse":{"name":"bool","required":false},"colorMap":{"name":"object","required":false},"tickLabelStyle":{"name":"object","required":false},"labelStyle":{"name":"object","required":false},"tickMinStep":{"name":"number","required":false},"tickMaxStep":{"name":"number","required":false},"tickNumber":{"name":"number","required":false},"tickSize":{"name":"number","required":false},"tickSpacing":{"name":"number","required":false},"tickLabelMinGap":{"name":"number","required":false},"tickLabelPlacement":{"name":"enum","value":[{"value":"'middle'","computed":false},{"value":"'tick'","computed":false}],"required":false},"tickPlacement":{"name":"enum","value":[{"value":"'start'","computed":false},{"value":"'end'","computed":false},{"value":"'middle'","computed":false},{"value":"'extremities'","computed":false}],"required":false},"width":{"name":"number","required":false},"disableLine":{"name":"bool","required":false},"disableTicks":{"name":"bool","required":false},"domainLimit":{"name":"enum","value":[{"value":"'nice'","computed":false},{"value":"'strict'","computed":false}],"required":false},"zoom":{"name":"union","value":[{"name":"bool"},{"name":"object"}],"required":false},"valueFormatter":{"name":"union","value":[{"name":"func"},{"name":"shape","value":{"function":{"name":"string","required":true},"options":{"name":"object","required":false}}}],"required":false}}}},"required":false,"description":"Y-axis configuration. Array of axis config objects."},"zAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"string","required":false},"data":{"name":"array","required":false},"dataKey":{"name":"string","required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"colorMap":{"name":"object","required":false}}}},"required":false,"description":"Z-axis configuration for color mapping scatter points."},"dataset":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Dataset array for datasetKeys-driven series."},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels. Default is 400."},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not set, fills available space."},"margin":{"type":{"name":"shape","value":{"top":{"name":"number","required":false},"right":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false}}},"required":false,"description":"Chart margins in pixels."},"grid":{"type":{"name":"shape","value":{"horizontal":{"name":"bool","required":false},"vertical":{"name":"bool","required":false}}},"required":false,"description":"Grid configuration."},"colors":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Color palette array."},"voronoiMaxRadius":{"type":{"name":"union","value":[{"name":"number"},{"name":"enum","value":[{"value":"'item'","computed":false}]}]},"required":false,"description":"Maximum distance for Voronoi scatter interaction."},"disableVoronoi":{"type":{"name":"bool"},"required":false,"description":"If true, disables Voronoi cell interaction."},"axisHighlight":{"type":{"name":"shape","value":{"x":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'line'","computed":false},{"value":"'band'","computed":false}],"required":false},"y":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'line'","computed":false},{"value":"'band'","computed":false}],"required":false}}},"required":false,"description":"Axis highlight configuration."},"tooltip":{"type":{"name":"shape","value":{"trigger":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'axis'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Tooltip configuration."},"hideLegend":{"type":{"name":"bool"},"required":false,"description":"If true, the legend is hidden."},"skipAnimation":{"type":{"name":"bool"},"required":false,"description":"If true, animations are disabled."},"loading":{"type":{"name":"bool"},"required":false,"description":"If true, shows a loading overlay."},"slotProps":{"type":{"name":"object"},"required":false,"description":"Props passed to internal slot components."},"referenceLines":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"x":{"name":"union","value":[{"name":"number"},{"name":"string"}],"required":false},"y":{"name":"number","required":false},"label":{"name":"string","required":false},"lineStyle":{"name":"object","required":false},"labelStyle":{"name":"object","required":false},"labelAlign":{"name":"enum","value":[{"value":"'start'","computed":false},{"value":"'middle'","computed":false},{"value":"'end'","computed":false}],"required":false},"spacing":{"name":"object","required":false}}}},"required":false,"description":"Reference lines to display on the chart.\nArray of objects with:\n- x (number|string): Vertical reference line at x value\n- y (number): Horizontal reference line at y value\n- label (string): Label text\n- lineStyle (object): CSS for line element\n- labelStyle (object): CSS for label text\n- labelAlign (string): 'start', 'middle', 'end'"},"initialZoom":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"axisId":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"start":{"name":"number","required":false},"end":{"name":"number","required":false}}}},"required":false,"description":"Initial zoom configuration (Pro). Array of {axisId, start, end} objects.\nstart/end are percentages (0-100) of the axis range."},"showToolbar":{"type":{"name":"bool"},"required":false,"description":"If true, shows the Pro toolbar for zoom/export controls."},"showSlider":{"type":{"name":"bool"},"required":false,"description":"If true, shows the zoom slider below the chart.\nInjects zoom.slider.enabled into x-axis config."},"zoomInteractionConfig":{"type":{"name":"shape","value":{"zoom":{"name":"array","required":false},"pan":{"name":"array","required":false}}},"required":false,"description":"Fine-grained control over zoom/pan interactions (Pro).\n- zoom: Array of interaction types ['wheel', 'pinch', 'brush', 'tapAndDrag', 'doubleTapReset']\n- pan: Array of interaction types ['drag', 'pressAndDrag', 'wheel']"},"highlightedAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"axisId":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":true},"dataIndex":{"name":"number","required":true}}}},"required":false,"description":"Controlled axis highlight state. Array of objects specifying which axis values\nare highlighted. Each object has:\n- axisId (string|number): The axis identifier\n- dataIndex (number): The data index to highlight\nSet to empty array [] to clear highlights."},"highlightedItem":{"type":{"name":"object"},"required":false,"description":"Currently highlighted item (controlled input/output)."},"tooltipItem":{"type":{"name":"shape","value":{"type":{"name":"string","required":false},"seriesId":{"name":"string","required":false},"dataIndex":{"name":"number","required":false}}},"required":false,"description":"Controlled tooltip item state. Used to synchronize tooltips across multiple charts.\nObject with:\n- type (string): Chart type ('line', 'scatter', etc.)\n- seriesId (string): The series identifier\n- dataIndex (number): The data index within the series\nSet to null to hide tooltip."},"forecast":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"x":{"name":"number","required":true},"y":{"name":"number","required":true},"upper":{"name":"number","required":false},"lower":{"name":"number","required":false}}}},"required":false,"description":"Forecast overlay data. Array of objects with x, y (center), upper, and lower\nvalues. Renders a dashed trend line with a shaded uncertainty band in the\nchart's SVG layer, matching the LiveTradingChart forecast style."},"forecastColor":{"type":{"name":"string"},"required":false,"description":"Forecast line and band color. Default '#ff9800' (orange)."},"forecastOpacity":{"type":{"name":"number"},"required":false,"description":"Forecast band fill opacity. Default 0.15."},"enableCrosshair":{"type":{"name":"bool"},"required":false,"description":"Enable crosshair position tracking. When true, the crosshairPosition\noutput prop reports the pointer's x/y data-space coordinates in real time\nas the user moves the mouse over the chart. Requires axisHighlight\nset to {x: 'line', y: 'line'} for the visual crosshair."},"crosshairPosition":{"type":{"name":"shape","value":{"x":{"name":"number","required":false},"y":{"name":"number","required":false}}},"required":false,"description":"Current crosshair position in data coordinates. Read-only output that\nupdates as the user moves the mouse. Object with:\n- x (number): x-axis data value (epoch ms for time scales)\n- y (number): y-axis data value\nSet to null when the pointer leaves the chart area."},"crosshairClick":{"type":{"name":"shape","value":{"x":{"name":"number","required":false},"y":{"name":"number","required":false},"button":{"name":"string","required":false},"timestamp":{"name":"string","required":false}}},"required":false,"description":"Fires on right-click within the chart drawing area when enableCrosshair\nis true. Object with:\n- x (number): x-axis data value at click position\n- y (number): y-axis data value at click position\n- button (string): always 'right'\n- timestamp (string): ISO timestamp of the click\nUse this to implement context menus (e.g. \"Set Alert\") at precise\ndata coordinates."},"syncedTooltipIndex":{"type":{"name":"number"},"required":false,"description":"Synced tooltip data index. When set to a non-negative integer, renders a\ntooltip overlay at that x-axis data index position, even without pointer hover.\nUse this to synchronize tooltip display across multiple CompositeCharts:\nread highlightedAxis.dataIndex from one chart, write it to syncedTooltipIndex\non the other charts. Set to null or -1 to hide."},"clickData":{"type":{"name":"object"},"required":false,"description":"Data from the most recent click event.\nContains type ('scatter'|'line'), seriesId, dataIndex, and timestamp."},"n_clicks":{"type":{"name":"number"},"required":false,"description":"Number of times the chart has been clicked."},"zoomData":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"axisId":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"start":{"name":"number","required":false},"end":{"name":"number","required":false}}}},"required":false,"description":"Current zoom state. Read-only output updated on zoom/pan.\nArray of {axisId, start, end} objects."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash-assigned callback that should be called to report property changes\nto Dash, to make them available for callbacks."}}},"src/lib/components/Heatmap.react.js":{"description":"Heatmap component wrapping MUI X Charts Pro Heatmap.\nRenders a matrix visualization where color intensity represents values.\nThis is a Pro feature - requires MUI X Pro license key.","displayName":"Heatmap","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"licenseKey":{"type":{"name":"string"},"required":false,"description":"MUI X Pro license key. Required to enable Pro features without watermarks.\nGet your license key from https://mui.com/x/introduction/licensing/"},"data":{"type":{"name":"arrayOf","value":{"name":"arrayOf","value":{"name":"number"}}},"required":false,"description":"Heatmap data as an array of [x, y, value] tuples.\n- x: X-axis index (0-based)\n- y: Y-axis index (0-based)\n- value: Numeric value for the cell (mapped to color)\n\nExample: [[0, 0, 25], [0, 1, 45], [1, 0, 30], [1, 1, 60]]"},"xAxis":{"type":{"name":"shape","value":{"data":{"name":"array","required":false},"label":{"name":"string","required":false},"scaleType":{"name":"enum","value":[{"value":"'band'","computed":false},{"value":"'point'","computed":false}],"required":false},"zoom":{"name":"union","value":[{"name":"bool"},{"name":"object"}],"required":false}}},"required":false,"description":"X-axis configuration object.\n- data (array): Category labels for x-axis\n- label (string): Axis label\n- scaleType (string): Scale type, defaults to 'band' for heatmaps\n- zoom (boolean or object): Enable zoom on this axis. Can be true or object with:\n - minStart (number): Minimum start position (0-100)\n - maxEnd (number): Maximum end position (0-100)\n - minSpan (number): Minimum zoom span\n - maxSpan (number): Maximum zoom span\n - step (number): Zoom step size\n - panning (boolean): Enable panning\n - filterMode (string): 'keep' or 'discard'\n - slider (object): Slider config with { enabled, preview, size, showTooltip }"},"yAxis":{"type":{"name":"shape","value":{"data":{"name":"array","required":false},"label":{"name":"string","required":false},"scaleType":{"name":"enum","value":[{"value":"'band'","computed":false},{"value":"'point'","computed":false}],"required":false},"zoom":{"name":"union","value":[{"name":"bool"},{"name":"object"}],"required":false}}},"required":false,"description":"Y-axis configuration object.\n- data (array): Category labels for y-axis\n- label (string): Axis label\n- scaleType (string): Scale type, defaults to 'band' for heatmaps\n- zoom (boolean or object): Enable zoom on this axis (same options as xAxis)"},"colorScale":{"type":{"name":"shape","value":{"type":{"name":"enum","value":[{"value":"'continuous'","computed":false},{"value":"'piecewise'","computed":false}],"required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"colors":{"name":"arrayOf","value":{"name":"string"},"required":false},"thresholds":{"name":"arrayOf","value":{"name":"number"},"required":false}}},"required":false,"description":"Color scale configuration for mapping values to colors.\n\nContinuous scale (interpolates between colors):\n{ type: 'continuous', min: 0, max: 100, colors: ['#e3f2fd', '#1565c0'] }\n\nPiecewise scale (discrete color bands):\n{ type: 'piecewise', thresholds: [20, 40, 60, 80],\n colors: ['#color1', '#color2', '#color3', '#color4', '#color5'] }\n\nNote: For piecewise, you need n+1 colors for n thresholds."},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not specified, the chart expands to fill\nthe available space."},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels. Default is 400."},"margin":{"type":{"name":"shape","value":{"top":{"name":"number","required":false},"right":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false}}},"required":false,"description":"Chart margins in pixels. Object with top, right, bottom, left keys."},"hideLegend":{"type":{"name":"bool"},"required":false,"description":"If true, the color legend is hidden."},"tooltip":{"type":{"name":"shape","value":{"trigger":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Tooltip configuration.\n- trigger (string): 'item' to show on cell hover, 'none' to disable"},"highlightScope":{"type":{"name":"shape","value":{"highlight":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'none'","computed":false}],"required":false},"fade":{"name":"enum","value":[{"value":"'global'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Highlight scope configuration for cell highlighting behavior.\n- highlight: 'item' or 'none'\n- fade: 'global' or 'none'"},"cellStyle":{"type":{"name":"union","value":[{"name":"enum","value":[{"value":"'rounded'","computed":false}]},{"name":"shape","value":{"gap":{"name":"number","required":false},"borderRadius":{"name":"number","required":false},"showValue":{"name":"bool","required":false},"fontSize":{"name":"number","required":false},"fontWeight":{"name":"number","required":false},"textColor":{"name":"string","required":false}}}]},"required":false,"description":"Custom cell style. Use 'rounded' for default rounded corners with gap,\nor provide an object for detailed configuration:\n- gap (number): Spacing between cells in pixels (default: 4)\n- borderRadius (number): Corner radius in pixels (default: 10)\n- showValue (boolean): Display value text in cells (default: true)\n- fontSize (number): Font size for value text (default: 12)\n- fontWeight (number): Font weight for value text (default: 500)\n- textColor (string): Color for value text (default: '#ffffff')"},"slotProps":{"type":{"name":"object"},"required":false,"description":"Props passed to internal slot components for customization."},"highlightedItem":{"type":{"name":"object"},"required":false,"description":"Currently highlighted item. Read-only output property updated when\nthe user hovers over a cell."},"clickData":{"type":{"name":"object"},"required":false,"description":"Data from the most recent click event. Read-only output property.\nContains x, y, value, seriesId, and timestamp."},"n_clicks":{"type":{"name":"number"},"required":false,"description":"Number of times the chart has been clicked. Increments on each click event."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash-assigned callback that should be called to report property changes\nto Dash, to make them available for callbacks."}}},"src/lib/components/LineChart.react.js":{"description":"LineChart component wrapping MUI X Charts Pro with composition API.\nRenders interactive line charts with support for multiple series,\ncustomizable axes, tooltips, click event callbacks, and Pro features\nlike zoom, pan, and zoom slider.","displayName":"LineChart","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"licenseKey":{"type":{"name":"string"},"required":false,"description":"MUI X Pro license key. Required to enable Pro features like zoom/pan\nwithout watermarks. Get your license key from https://mui.com/x/introduction/licensing/"},"series":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"string","required":false},"data":{"name":"arrayOf","value":{"name":"number"},"required":false},"label":{"name":"string","required":false},"color":{"name":"string","required":false},"area":{"name":"bool","required":false},"stack":{"name":"string","required":false},"curve":{"name":"enum","value":[{"value":"'linear'","computed":false},{"value":"'monotoneX'","computed":false},{"value":"'monotoneY'","computed":false},{"value":"'natural'","computed":false},{"value":"'step'","computed":false},{"value":"'stepBefore'","computed":false},{"value":"'stepAfter'","computed":false},{"value":"'catmullRom'","computed":false},{"value":"'bumpX'","computed":false},{"value":"'bumpY'","computed":false}],"required":false},"showMark":{"name":"bool","required":false},"connectNulls":{"name":"bool","required":false},"yAxisId":{"name":"string","required":false},"xAxisId":{"name":"string","required":false},"highlightScope":{"name":"shape","value":{"highlight":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'item'","computed":false},{"value":"'series'","computed":false}],"required":false},"fade":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'series'","computed":false},{"value":"'global'","computed":false}],"required":false}},"required":false}}}},"required":false,"description":"Array of series configurations. Each series represents a line in the chart.\nEach series object can have:\n- id (string): Unique identifier for the series\n- data (array of numbers): Y-axis values, supports null for gaps\n- label (string): Label shown in legend and tooltip\n- color (string): Custom color for this series\n- area (boolean): Fill area under the line\n- stack (string): Stack identifier for stacked area charts\n- curve (string): Interpolation method - 'linear', 'monotoneX', 'monotoneY',\n 'natural', 'step', 'stepBefore', 'stepAfter', 'catmullRom', 'bumpX', 'bumpY'\n- showMark (boolean): Whether to show data point markers\n- connectNulls (boolean): Whether to bridge gaps across null values\n- yAxisId (string): ID of the y-axis to use for this series (for biaxial charts)\n- xAxisId (string): ID of the x-axis to use for this series\n- highlightScope (object): Per-series highlight behavior with:\n - highlight: 'none', 'item', or 'series'\n - fade: 'none', 'series', or 'global'"},"xAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"data":{"name":"array","required":false},"dataKey":{"name":"string","required":false},"label":{"name":"string","required":false},"scaleType":{"name":"enum","value":[{"value":"'band'","computed":false},{"value":"'point'","computed":false},{"value":"'linear'","computed":false},{"value":"'log'","computed":false},{"value":"'time'","computed":false},{"value":"'utc'","computed":false},{"value":"'symlog'","computed":false},{"value":"'sqrt'","computed":false}],"required":false},"position":{"name":"enum","value":[{"value":"'top'","computed":false},{"value":"'bottom'","computed":false},{"value":"'none'","computed":false}],"required":false},"id":{"name":"string","required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"reverse":{"name":"bool","required":false},"tickNumber":{"name":"number","required":false},"tickMinStep":{"name":"number","required":false},"tickMaxStep":{"name":"number","required":false},"tickSize":{"name":"number","required":false},"tickSpacing":{"name":"number","required":false},"tickInterval":{"name":"array","required":false},"tickLabelStyle":{"name":"object","required":false},"tickLabelPlacement":{"name":"enum","value":[{"value":"'middle'","computed":false},{"value":"'tick'","computed":false}],"required":false},"tickPlacement":{"name":"enum","value":[{"value":"'end'","computed":false},{"value":"'extremities'","computed":false},{"value":"'middle'","computed":false},{"value":"'start'","computed":false}],"required":false},"tickLabelMinGap":{"name":"number","required":false},"labelStyle":{"name":"object","required":false},"height":{"name":"number","required":false},"dateFormat":{"name":"string","required":false},"dateTickFormat":{"name":"string","required":false},"disableLine":{"name":"bool","required":false},"disableTicks":{"name":"bool","required":false},"domainLimit":{"name":"enum","value":[{"value":"'nice'","computed":false},{"value":"'strict'","computed":false}],"required":false},"categoryGapRatio":{"name":"number","required":false},"barGapRatio":{"name":"number","required":false},"colorMap":{"name":"object","required":false},"zoom":{"name":"union","value":[{"name":"bool"},{"name":"object"}],"required":false},"valueFormatter":{"name":"union","value":[{"name":"func"},{"name":"shape","value":{"function":{"name":"string","required":true},"options":{"name":"object","required":false}}}],"required":false}}}},"required":false,"description":"X-axis configuration. Array of axis config objects.\nEach axis object can have:\n- data (array): X-axis values (timestamps in ms for 'time' scaleType)\n- dataKey (string): Key to use from dataset for axis values\n- label (string): Axis label\n- scaleType (string): 'band', 'point', 'linear', 'log', 'time', 'utc', 'symlog', 'sqrt'\n- position (string): 'top', 'bottom', or 'none' (hidden but still computed)\n- id (string): Axis identifier for referencing in series and zoom\n- min (number): Minimum domain value\n- max (number): Maximum domain value\n- reverse (boolean): Reverse axis direction\n- tickNumber (number): Approximate number of ticks\n- tickMinStep (number): Minimum step between ticks (ms for time axes)\n- tickMaxStep (number): Maximum step between ticks\n- tickSize (number): Tick mark length in pixels (default: 6)\n- tickSpacing (number): Minimum spacing in px between ticks (ordinal axes only)\n- tickInterval (array): Fixed tick positions as array of values\n- tickLabelStyle (object): CSS style for tick labels (e.g. {angle: 45, fontSize: 12})\n- tickLabelPlacement (string): 'middle' or 'tick' (band scale only)\n- tickPlacement (string): 'end', 'extremities', 'middle', 'start' (band scale only)\n- tickLabelMinGap (number): Minimum gap in px between tick labels (default: 4)\n- labelStyle (object): CSS style for the axis label\n- height (number): Space reserved for this x-axis in pixels\n- disableLine (boolean): Hide the axis line\n- disableTicks (boolean): Hide tick marks\n- domainLimit (string): 'nice' (default, rounds to friendly values) or 'strict'\n- categoryGapRatio (number): Gap ratio between bands (0-1, band scale only)\n- barGapRatio (number): Gap ratio between bars within a band (band scale only)\n- colorMap (object): Axis color mapping configuration\n- zoom (boolean or object): Enable zoom on this axis. Can be true or object with:\n - minStart (number): Minimum start position (0-100)\n - maxEnd (number): Maximum end position (0-100)\n - minSpan (number): Minimum zoom span\n - maxSpan (number): Maximum zoom span\n - step (number): Zoom step size\n - panning (boolean): Enable panning\n - filterMode (string): 'keep' or 'discard'\n - slider (object): Slider config with { enabled, preview, size, showTooltip }"},"yAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"data":{"name":"array","required":false},"dataKey":{"name":"string","required":false},"label":{"name":"string","required":false},"scaleType":{"name":"enum","value":[{"value":"'band'","computed":false},{"value":"'point'","computed":false},{"value":"'linear'","computed":false},{"value":"'log'","computed":false},{"value":"'time'","computed":false},{"value":"'utc'","computed":false},{"value":"'symlog'","computed":false},{"value":"'sqrt'","computed":false}],"required":false},"position":{"name":"enum","value":[{"value":"'left'","computed":false},{"value":"'right'","computed":false},{"value":"'none'","computed":false}],"required":false},"id":{"name":"string","required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"width":{"name":"number","required":false},"reverse":{"name":"bool","required":false},"dateFormat":{"name":"string","required":false},"dateTickFormat":{"name":"string","required":false},"tickNumber":{"name":"number","required":false},"tickMinStep":{"name":"number","required":false},"tickMaxStep":{"name":"number","required":false},"tickSize":{"name":"number","required":false},"tickSpacing":{"name":"number","required":false},"tickInterval":{"name":"array","required":false},"tickLabelStyle":{"name":"object","required":false},"tickLabelPlacement":{"name":"enum","value":[{"value":"'middle'","computed":false},{"value":"'tick'","computed":false}],"required":false},"tickPlacement":{"name":"enum","value":[{"value":"'end'","computed":false},{"value":"'extremities'","computed":false},{"value":"'middle'","computed":false},{"value":"'start'","computed":false}],"required":false},"tickLabelMinGap":{"name":"number","required":false},"labelStyle":{"name":"object","required":false},"height":{"name":"number","required":false},"disableLine":{"name":"bool","required":false},"disableTicks":{"name":"bool","required":false},"domainLimit":{"name":"enum","value":[{"value":"'nice'","computed":false},{"value":"'strict'","computed":false}],"required":false},"categoryGapRatio":{"name":"number","required":false},"barGapRatio":{"name":"number","required":false},"colorMap":{"name":"object","required":false},"zoom":{"name":"union","value":[{"name":"bool"},{"name":"object"}],"required":false},"valueFormatter":{"name":"union","value":[{"name":"func"},{"name":"shape","value":{"function":{"name":"string","required":true},"options":{"name":"object","required":false}}}],"required":false}}}},"required":false,"description":"Y-axis configuration. Array of axis config objects.\nEach axis object can have:\n- data (array): Y-axis values (for horizontal bar charts)\n- dataKey (string): Key to use from dataset for axis values\n- label (string): Axis label\n- scaleType (string): 'band', 'point', 'linear', 'log', 'time', 'utc', 'symlog', 'sqrt'\n- position (string): 'left', 'right', or 'none' (hidden but still computed)\n- id (string): Axis identifier for referencing in series\n- min (number): Minimum domain value\n- max (number): Maximum domain value\n- width (number): Width allocated for axis in pixels\n- reverse (boolean): Reverse axis direction\n- tickNumber (number): Approximate number of ticks\n- tickMinStep (number): Minimum step between ticks\n- tickMaxStep (number): Maximum step between ticks\n- tickSize (number): Tick mark length in pixels (default: 6)\n- tickSpacing (number): Minimum spacing in px between ticks (ordinal axes only)\n- tickInterval (array): Fixed tick positions as array of values\n- tickLabelStyle (object): CSS style for tick labels (e.g. {angle: 45, fontSize: 12})\n- tickLabelPlacement (string): 'middle' or 'tick' (band scale only)\n- tickPlacement (string): 'end', 'extremities', 'middle', 'start' (band scale only)\n- tickLabelMinGap (number): Minimum gap in px between tick labels (default: 4)\n- labelStyle (object): CSS style for the axis label\n- height (number): Space reserved for this y-axis in pixels\n- disableLine (boolean): Hide the axis line\n- disableTicks (boolean): Hide tick marks\n- domainLimit (string): 'nice' (default, rounds to friendly values) or 'strict'\n- categoryGapRatio (number): Gap ratio between bands (0-1, band scale only)\n- barGapRatio (number): Gap ratio between bars within a band (band scale only)\n- colorMap (object): Axis color mapping configuration\n- zoom (boolean or object): Enable zoom on this axis (same options as xAxis)"},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels. Default is 400."},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not specified, the chart expands to fill\nthe available space."},"margin":{"type":{"name":"shape","value":{"top":{"name":"number","required":false},"right":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false}}},"required":false,"description":"Chart margins in pixels. Object with top, right, bottom, left keys."},"grid":{"type":{"name":"shape","value":{"vertical":{"name":"bool","required":false},"horizontal":{"name":"bool","required":false}}},"required":false,"description":"Grid configuration. Object with vertical and horizontal boolean keys."},"colors":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Array of colors for the series palette."},"hideLegend":{"type":{"name":"bool"},"required":false,"description":"If true, the legend is hidden."},"tooltip":{"type":{"name":"shape","value":{"trigger":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'axis'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Tooltip configuration. Object with trigger key.\n- trigger (string): 'item', 'axis', or 'none'"},"skipAnimation":{"type":{"name":"bool"},"required":false,"description":"If true, animations are skipped."},"loading":{"type":{"name":"bool"},"required":false,"description":"If true, a loading overlay is displayed."},"zoom":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"axisId":{"name":"string","required":false},"start":{"name":"number","required":false},"end":{"name":"number","required":false}}}},"required":false,"description":"Controlled zoom state for the chart. Array of objects with:\n- axisId (string): The axis identifier\n- start (number): Start position (0-100)\n- end (number): End position (0-100)"},"initialZoom":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"axisId":{"name":"string","required":false},"start":{"name":"number","required":false},"end":{"name":"number","required":false}}}},"required":false,"description":"Initial zoom state for uncontrolled mode. Array of objects with:\n- axisId (string): The axis identifier\n- start (number): Start position (0-100)\n- end (number): End position (0-100)"},"showSlider":{"type":{"name":"bool"},"required":false,"description":"If true, shows a zoom slider below the chart for easy zoom control.\nThe slider allows users to select a range and pan through the data."},"zoomInteractionConfig":{"type":{"name":"shape","value":{"zoom":{"name":"arrayOf","value":{"name":"union","value":[{"name":"string"},{"name":"shape","value":{"type":{"name":"string","required":false},"requiredKeys":{"name":"arrayOf","value":{"name":"string"},"required":false},"pointerMode":{"name":"enum","value":[{"value":"'mouse'","computed":false},{"value":"'touch'","computed":false}],"required":false}}}]},"required":false},"pan":{"name":"arrayOf","value":{"name":"union","value":[{"name":"string"},{"name":"shape","value":{"type":{"name":"string","required":false},"requiredKeys":{"name":"arrayOf","value":{"name":"string"},"required":false},"pointerMode":{"name":"enum","value":[{"value":"'mouse'","computed":false},{"value":"'touch'","computed":false}],"required":false}}}]},"required":false}}},"required":false,"description":"Zoom interaction configuration. Controls which interactions are enabled for\nzooming and panning. Object with:\n- zoom (array): Zoom interactions - 'wheel', 'pinch', 'tapAndDrag', 'brush', 'doubleTapReset',\n or objects with { type, requiredKeys, pointerMode }\n- pan (array): Pan interactions - 'drag', 'pressAndDrag', 'wheel',\n or objects with { type, requiredKeys, pointerMode }"},"referenceLines":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"x":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"y":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"axisId":{"name":"string","required":false},"label":{"name":"string","required":false},"labelAlign":{"name":"enum","value":[{"value":"'start'","computed":false},{"value":"'middle'","computed":false},{"value":"'end'","computed":false}],"required":false},"lineStyle":{"name":"object","required":false},"labelStyle":{"name":"object","required":false},"spacing":{"name":"union","value":[{"name":"number"},{"name":"object"}],"required":false}}}},"required":false,"description":"Array of reference line configurations. Each reference line can be vertical (x) or horizontal (y).\n- x (string|number): X-axis value for a vertical reference line\n- y (number): Y-axis value for a horizontal reference line\n- axisId (string): The axis ID to use for the reference value\n- label (string): Label text displayed along the reference line\n- labelAlign (string): 'start', 'middle', or 'end' alignment\n- lineStyle (object): CSS style object for the line (e.g. {stroke: 'red', strokeDasharray: '4 4'})\n- labelStyle (object): CSS style object for the label\n- spacing (number|object): Space around label in px, or {x, y} object"},"brushConfig":{"type":{"name":"shape","value":{"enabled":{"name":"bool","required":false},"preventTooltip":{"name":"bool","required":false},"preventHighlight":{"name":"bool","required":false}}},"required":false,"description":"Brush configuration for range selection. Object with:\n- enabled (boolean): Whether brush interaction is enabled (default: false)\n- preventTooltip (boolean): Prevent tooltip during brush (default: true)\n- preventHighlight (boolean): Prevent highlight during brush (default: true)"},"brushOverlay":{"type":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'default'","computed":false},{"value":"'values'","computed":false}]},"required":false,"description":"Type of brush overlay to display:\n- 'none': No overlay (default)\n- 'default': Standard MUI selection rectangle\n- 'values': Custom overlay showing start/end values with difference and percentage"},"brushSeriesId":{"type":{"name":"string"},"required":false,"description":"Series ID for the custom 'values' brush overlay to read data from.\nIf not specified, uses the first series."},"brushData":{"type":{"name":"shape","value":{"start":{"name":"shape","value":{"x":{"name":"number","required":false},"y":{"name":"number","required":false}},"required":false},"current":{"name":"shape","value":{"x":{"name":"number","required":false},"y":{"name":"number","required":false}},"required":false},"timestamp":{"name":"string","required":false}}},"required":false,"description":"Current brush selection data. Read-only output property.\nContains pixel coordinates of the brush selection."},"axisHighlight":{"type":{"name":"shape","value":{"x":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'line'","computed":false},{"value":"'band'","computed":false}],"required":false},"y":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'line'","computed":false}],"required":false}}},"required":false,"description":"Axis highlight configuration. Controls how axes are highlighted on hover.\n- x (string): 'none', 'line', or 'band'\n- y (string): 'none' or 'line'"},"highlightedAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"axisId":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":true},"dataIndex":{"name":"number","required":true}}}},"required":false,"description":"Controlled axis highlight state. Array of objects specifying which axis values\nare highlighted. Each object has:\n- axisId (string|number): The axis identifier\n- dataIndex (number): The data index to highlight\nSet to empty array [] to clear highlights."},"highlightedItem":{"type":{"name":"shape","value":{"seriesId":{"name":"string","required":true},"dataIndex":{"name":"number","required":false}}},"required":false,"description":"Controlled item highlight state. Specifies which data point is highlighted.\nObject with:\n- seriesId (string): The series identifier\n- dataIndex (number): The data index within the series (optional)\nSet to null to clear highlight."},"showToolbar":{"type":{"name":"bool"},"required":false,"description":"Show chart toolbar with zoom/export controls. This is a Pro feature\nthat requires a valid licenseKey."},"tooltipItem":{"type":{"name":"shape","value":{"type":{"name":"string","required":false},"seriesId":{"name":"string","required":false},"dataIndex":{"name":"number","required":false}}},"required":false,"description":"Controlled tooltip item state. Used to synchronize tooltips across multiple charts.\nObject with:\n- type (string): Chart type ('line', 'bar', 'pie', etc.)\n- seriesId (string): The series identifier\n- dataIndex (number): The data index within the series\nSet to null to hide tooltip."},"zoomData":{"type":{"name":"union","value":[{"name":"arrayOf","value":{"name":"shape","value":{"axisId":{"name":"string","required":false},"start":{"name":"number","required":false},"end":{"name":"number","required":false}}}},{"name":"any"}]},"required":false,"description":"Current zoom state. Read-only output property updated when zoom changes.\nArray of objects with axisId, start, and end values."},"clickData":{"type":{"name":"object"},"required":false,"description":"Data from the most recent click event. Read-only output property.\nContains type ('axis', 'mark', 'line', 'area'), relevant IDs/values,\nand timestamp."},"n_clicks":{"type":{"name":"number"},"required":false,"description":"Number of times the chart has been clicked. Increments on each click event."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash-assigned callback that should be called to report property changes\nto Dash, to make them available for callbacks."}}},"src/lib/components/LiveTradingChart.react.js":{"description":"LiveTradingChart simulates real-time candlestick trading data with volume bars,\nforecast line with uncertainty bands, alert labels, and optional price labels.\nUses an internal React timer for smooth high-speed updates.","displayName":"LiveTradingChart","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"licenseKey":{"type":{"name":"string"},"required":false,"description":"MUI X Pro license key."},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels. Default 500."},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not set, fills available space."},"margin":{"type":{"name":"shape","value":{"top":{"name":"number","required":false},"right":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false}}},"required":false,"description":"Chart margins."},"windowSize":{"type":{"name":"number"},"required":false,"description":"Number of visible candles in the sliding window. Default 60."},"forecastSize":{"type":{"name":"number"},"required":false,"description":"Number of forecast points beyond the window. Default 15."},"running":{"type":{"name":"bool"},"required":false,"description":"Whether the simulation is running. Default false."},"intervalMs":{"type":{"name":"number"},"required":false,"description":"Tick interval in milliseconds. Default 300."},"seed":{"type":{"name":"number"},"required":false,"description":"RNG seed for reproducible randomness. Default 42."},"resetTrigger":{"type":{"name":"number"},"required":false,"description":"Increment this to reset the simulation."},"initialPrice":{"type":{"name":"number"},"required":false,"description":"Starting price. Default 100."},"volatility":{"type":{"name":"number"},"required":false,"description":"Price volatility factor. Default 0.02."},"drift":{"type":{"name":"number"},"required":false,"description":"Price drift/trend factor. Default 0.001."},"forecastVolatility":{"type":{"name":"number"},"required":false,"description":"Forecast uncertainty multiplier. Default 1.5."},"alertProbability":{"type":{"name":"number"},"required":false,"description":"(Legacy) Probability of alert per tick \u2014 unused by default swing detection."},"alertThresholdPct":{"type":{"name":"number"},"required":false,"description":"(Legacy) Minimum % change to flag as alert \u2014 unused by default swing detection."},"alertLookback":{"type":{"name":"number"},"required":false,"description":"Number of candles on each side to confirm a swing high/low. Default 5."},"alertMinDistance":{"type":{"name":"number"},"required":false,"description":"Minimum ticks between consecutive alerts to prevent clustering. Default 10."},"maxVisibleAlerts":{"type":{"name":"number"},"required":false,"description":"Maximum number of alert labels visible in the window. Default 6."},"alertFilter":{"type":{"name":"shape","value":{"function":{"name":"string","required":true},"options":{"name":"object","required":false}}},"required":false,"description":"Functions-as-props: custom alert detection. {function: 'name', options: {...}}"},"alertFormatter":{"type":{"name":"shape","value":{"function":{"name":"string","required":true},"options":{"name":"object","required":false}}},"required":false,"description":"Functions-as-props: custom alert label formatting. {function: 'name', options: {...}}"},"candleUpColor":{"type":{"name":"string"},"required":false,"description":"Candle color for upward (close >= open) moves. Default '#4caf50'."},"candleDownColor":{"type":{"name":"string"},"required":false,"description":"Candle color for downward (close < open) moves. Default '#f44336'."},"forecastColor":{"type":{"name":"string"},"required":false,"description":"Forecast line/area color. Default '#ff9800'."},"alertUpColor":{"type":{"name":"string"},"required":false,"description":"Alert label color for upward moves. Default '#4caf50'."},"alertDownColor":{"type":{"name":"string"},"required":false,"description":"Alert label color for downward moves. Default '#f44336'."},"uncertaintyOpacity":{"type":{"name":"number"},"required":false,"description":"Opacity of the forecast uncertainty shaded area. Default 0.15."},"showVolume":{"type":{"name":"bool"},"required":false,"description":"Show volume bars. Default true."},"showLabels":{"type":{"name":"bool"},"required":false,"description":"Show price labels on candles. Default false."},"volumeHeightPct":{"type":{"name":"number"},"required":false,"description":"Volume bars height as percentage of chart area. Default 20."},"showGrid":{"type":{"name":"bool"},"required":false,"description":"Show grid lines. Default true."},"showSlider":{"type":{"name":"bool"},"required":false,"description":"Show zoom slider below the chart (Pro). Default false."},"hideLegend":{"type":{"name":"bool"},"required":false,"description":"Hide the legend. Default true."},"grid":{"type":{"name":"shape","value":{"horizontal":{"name":"bool","required":false},"vertical":{"name":"bool","required":false}}},"required":false,"description":"Grid configuration."},"xAxisLabel":{"type":{"name":"string"},"required":false,"description":"X-axis label text. Default 'Tick'."},"yAxisLabel":{"type":{"name":"string"},"required":false,"description":"Y-axis label text. Default 'Price'."},"currentPrice":{"type":{"name":"number"},"required":false,"description":"Current price (read-only output)."},"tickCount":{"type":{"name":"number"},"required":false,"description":"Total ticks elapsed (read-only output)."},"alertHistory":{"type":{"name":"array"},"required":false,"description":"Recent alert history (read-only output)."},"zoomData":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"axisId":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"start":{"name":"number","required":false},"end":{"name":"number","required":false}}}},"required":false,"description":"Current zoom state (read-only output)."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash-assigned callback for reporting property changes."}}},"src/lib/components/PieChart.react.js":{"description":"PieChart component wrapping MUI X Charts PieChart.\nRenders pie and donut charts with customizable arcs, labels, and interactions.\nSupports single series (via data prop) or multiple series (via series prop) for nested pies.\nThis is a free feature - no MUI X Pro license required.","displayName":"PieChart","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"data":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"union","value":[{"name":"number"},{"name":"string"}],"required":false},"value":{"name":"number","required":true},"label":{"name":"string","required":false},"color":{"name":"string","required":false}}}},"required":false,"description":"Pie chart data as an array of objects (for single series).\nEach object should have:\n- id (number/string): Unique identifier for the slice\n- value (number): The numeric value (required)\n- label (string): Display label for the slice\n- color (string): Optional color override for this slice\n\nExample: [\n { id: 0, value: 35, label: 'Marketing' },\n { id: 1, value: 25, label: 'Engineering', color: '#1976d2' },\n]\n\nNote: Use either 'data' for single series or 'series' for multiple series (nested pies)."},"series":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"string","required":false},"data":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"union","value":[{"name":"number"},{"name":"string"}],"required":false},"value":{"name":"number","required":true},"label":{"name":"string","required":false},"color":{"name":"string","required":false}}},"required":true},"innerRadius":{"name":"union","value":[{"name":"number"},{"name":"string"}],"required":false},"outerRadius":{"name":"union","value":[{"name":"number"},{"name":"string"}],"required":false},"paddingAngle":{"name":"number","required":false},"cornerRadius":{"name":"number","required":false},"startAngle":{"name":"number","required":false},"endAngle":{"name":"number","required":false},"arcLabel":{"name":"enum","value":[{"value":"'value'","computed":false},{"value":"'label'","computed":false},{"value":"'formattedValue'","computed":false}],"required":false},"arcLabelMinAngle":{"name":"number","required":false},"arcLabelRadius":{"name":"number","required":false},"highlightScope":{"name":"shape","value":{"highlight":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'none'","computed":false}],"required":false},"fade":{"name":"enum","value":[{"value":"'global'","computed":false},{"value":"'none'","computed":false}],"required":false}},"required":false}}}},"required":false,"description":"Array of series configurations for multi-series/nested pie charts.\nEach series can have its own data, geometry, and styling.\nWhen provided, the 'data' prop and individual geometry props are ignored.\n\nExample for nested pie:\n[\n {\n data: innerRingData,\n innerRadius: 0,\n outerRadius: 80,\n cornerRadius: 3,\n highlightScope: { fade: 'global', highlight: 'item' },\n },\n {\n data: outerRingData,\n innerRadius: 90,\n outerRadius: 120,\n cornerRadius: 3,\n highlightScope: { fade: 'global', highlight: 'item' },\n },\n]"},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not specified, the chart expands to fill\nthe available space."},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels. Default is 300."},"innerRadius":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Inner radius of the pie in pixels or percentage string.\nSet to a value > 0 to create a donut chart.\nExamples: 50, '50%', '40%'"},"outerRadius":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Outer radius of the pie in pixels or percentage string.\nExamples: 100, '80%'"},"paddingAngle":{"type":{"name":"number"},"required":false,"description":"Gap between arcs in degrees. Creates visual separation between slices."},"cornerRadius":{"type":{"name":"number"},"required":false,"description":"Corner radius of the arcs in pixels. Rounds the corners of each slice."},"startAngle":{"type":{"name":"number"},"required":false,"description":"Start angle of the first arc in degrees. Default is 0 (3 o'clock position).\nUse -90 for 12 o'clock start position."},"endAngle":{"type":{"name":"number"},"required":false,"description":"End angle of the last arc in degrees. Default is 360 (full circle).\nUse 90 with startAngle=-90 for a half-pie/gauge chart."},"cx":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"X position of the pie center. Can be pixels or percentage string.\nDefault is '50%' (centered)."},"cy":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Y position of the pie center. Can be pixels or percentage string.\nDefault is '50%' (centered)."},"arcLabel":{"type":{"name":"enum","value":[{"value":"'value'","computed":false},{"value":"'label'","computed":false},{"value":"'formattedValue'","computed":false}]},"required":false,"description":"Type of label to display on arcs.\n- 'value': Shows the numeric value\n- 'label': Shows the label text\n- 'formattedValue': Shows formatted value"},"arcLabelMinAngle":{"type":{"name":"number"},"required":false,"description":"Minimum arc angle in degrees required to display a label.\nPrevents labels from appearing on very small slices."},"colors":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Array of colors to use for the pie slices.\nIf not provided, uses the default MUI color palette.\nExample: ['#1976d2', '#dc004e', '#ff9800', '#4caf50']"},"hideLegend":{"type":{"name":"bool"},"required":false,"description":"If true, the legend is hidden."},"margin":{"type":{"name":"shape","value":{"top":{"name":"number","required":false},"right":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false}}},"required":false,"description":"Chart margins in pixels. Object with top, right, bottom, left keys."},"highlightScope":{"type":{"name":"shape","value":{"highlight":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'none'","computed":false}],"required":false},"fade":{"name":"enum","value":[{"value":"'global'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Highlight scope configuration for slice highlighting behavior.\n- highlight: 'item' or 'none'\n- fade: 'global' or 'none'\n\nExample: { highlight: 'item', fade: 'global' }"},"tooltip":{"type":{"name":"shape","value":{"trigger":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Tooltip configuration.\n- trigger (string): 'item' to show on slice hover, 'none' to disable"},"skipAnimation":{"type":{"name":"bool"},"required":false,"description":"If true, disables chart animations. Also respects prefers-reduced-motion."},"clickData":{"type":{"name":"object"},"required":false,"description":"Data from the most recent click event. Read-only output property.\nContains id, dataIndex, value, label, and timestamp."},"n_clicks":{"type":{"name":"number"},"required":false,"description":"Number of times the chart has been clicked. Increments on each click event."},"highlightedItem":{"type":{"name":"shape","value":{"seriesId":{"name":"string","required":false},"dataIndex":{"name":"number","required":false}}},"required":false,"description":"Currently highlighted item. Can be used as both input (controlled mode) and\noutput (updated when user hovers over a slice).\nObject with:\n- seriesId (string): The series identifier\n- dataIndex (number): The data index within the series\nSet to null to clear highlight."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash-assigned callback that should be called to report property changes\nto Dash, to make them available for callbacks."}}},"src/lib/components/ScatterChart.react.js":{"description":"ScatterChart component wrapping MUI X Charts ScatterChart.\nRenders scatter/point charts showing relationships between two variables.\nSupports multiple series, z-axis color mapping, voronoi interaction,\ncustom marker sizes, and click/highlight callbacks.","displayName":"ScatterChart","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"series":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"string","required":false},"label":{"name":"string","required":false},"color":{"name":"string","required":false},"data":{"name":"arrayOf","value":{"name":"shape","value":{"x":{"name":"number","required":false},"y":{"name":"number","required":false},"id":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"z":{"name":"number","required":false}}},"required":false},"datasetKeys":{"name":"shape","value":{"x":{"name":"string","required":false},"y":{"name":"string","required":false},"id":{"name":"string","required":false},"z":{"name":"string","required":false}},"required":false},"markerSize":{"name":"number","required":false},"highlightScope":{"name":"shape","value":{"highlight":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'series'","computed":false},{"value":"'none'","computed":false}],"required":false},"fade":{"name":"enum","value":[{"value":"'global'","computed":false},{"value":"'series'","computed":false},{"value":"'none'","computed":false}],"required":false}},"required":false},"xAxisId":{"name":"string","required":false},"yAxisId":{"name":"string","required":false}}}},"required":false,"description":"Array of scatter series to display. Each series contains:\n- id (string): Unique series identifier\n- label (string): Display label for legend/tooltip\n- color (string): Series color\n- data (array): Array of {x, y, id, z?} point objects\n- datasetKeys (object): {x, y, id?, z?} keys mapping to dataset columns\n- markerSize (number): Radius of scatter markers in pixels\n- highlightScope (object): {highlight, fade} highlighting behavior"},"xAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"label":{"name":"string","required":false},"scaleType":{"name":"enum","value":[{"value":"'linear'","computed":false},{"value":"'log'","computed":false},{"value":"'time'","computed":false},{"value":"'band'","computed":false},{"value":"'point'","computed":false},{"value":"'sqrt'","computed":false},{"value":"'symlog'","computed":false},{"value":"'utc'","computed":false},{"value":"'pow'","computed":false}],"required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"data":{"name":"array","required":false},"dataKey":{"name":"string","required":false},"position":{"name":"enum","value":[{"value":"'top'","computed":false},{"value":"'bottom'","computed":false},{"value":"'none'","computed":false}],"required":false},"reverse":{"name":"bool","required":false},"colorMap":{"name":"object","required":false},"tickLabelStyle":{"name":"object","required":false},"labelStyle":{"name":"object","required":false},"tickMinStep":{"name":"number","required":false},"tickMaxStep":{"name":"number","required":false},"tickNumber":{"name":"number","required":false},"tickSize":{"name":"number","required":false},"tickSpacing":{"name":"number","required":false},"tickLabelMinGap":{"name":"number","required":false},"tickLabelPlacement":{"name":"enum","value":[{"value":"'middle'","computed":false},{"value":"'tick'","computed":false}],"required":false},"tickPlacement":{"name":"enum","value":[{"value":"'start'","computed":false},{"value":"'end'","computed":false},{"value":"'middle'","computed":false},{"value":"'extremities'","computed":false}],"required":false},"height":{"name":"number","required":false},"disableLine":{"name":"bool","required":false},"disableTicks":{"name":"bool","required":false},"domainLimit":{"name":"enum","value":[{"value":"'nice'","computed":false},{"value":"'strict'","computed":false}],"required":false},"categoryGapRatio":{"name":"number","required":false},"barGapRatio":{"name":"number","required":false},"width":{"name":"number","required":false}}}},"required":false,"description":"X-axis configuration. Array of axis config objects.\n- id (string): Axis identifier\n- label (string): Axis label\n- scaleType (string): 'linear', 'log', 'time', 'band', 'point', 'sqrt', 'symlog', 'utc'\n- min/max (number): Domain bounds\n- data (array): Axis data values\n- dataKey (string): Key for dataset-driven axis\n- position (string): 'top', 'bottom', 'none'\n- reverse (bool): Reverse axis direction\n- colorMap (object): Color mapping configuration\n- tickLabelStyle (object): CSS for tick labels\n- labelStyle (object): CSS for axis label\n- tickMinStep (number): Minimum step between ticks\n- tickMaxStep (number): Maximum step between ticks\n- tickNumber (number): Approximate tick count\n- tickSize (number): Tick mark length in pixels\n- height (number): Space reserved for axis\n- disableLine (bool): Hide axis line\n- disableTicks (bool): Hide tick marks\n- domainLimit (string): 'nice' or 'strict'"},"yAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"union","value":[{"name":"string"},{"name":"number"}],"required":false},"label":{"name":"string","required":false},"scaleType":{"name":"enum","value":[{"value":"'linear'","computed":false},{"value":"'log'","computed":false},{"value":"'time'","computed":false},{"value":"'band'","computed":false},{"value":"'point'","computed":false},{"value":"'sqrt'","computed":false},{"value":"'symlog'","computed":false},{"value":"'utc'","computed":false},{"value":"'pow'","computed":false}],"required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"data":{"name":"array","required":false},"dataKey":{"name":"string","required":false},"position":{"name":"enum","value":[{"value":"'left'","computed":false},{"value":"'right'","computed":false},{"value":"'none'","computed":false}],"required":false},"reverse":{"name":"bool","required":false},"colorMap":{"name":"object","required":false},"tickLabelStyle":{"name":"object","required":false},"labelStyle":{"name":"object","required":false},"tickMinStep":{"name":"number","required":false},"tickMaxStep":{"name":"number","required":false},"tickNumber":{"name":"number","required":false},"tickSize":{"name":"number","required":false},"tickSpacing":{"name":"number","required":false},"tickLabelMinGap":{"name":"number","required":false},"tickLabelPlacement":{"name":"enum","value":[{"value":"'middle'","computed":false},{"value":"'tick'","computed":false}],"required":false},"tickPlacement":{"name":"enum","value":[{"value":"'start'","computed":false},{"value":"'end'","computed":false},{"value":"'middle'","computed":false},{"value":"'extremities'","computed":false}],"required":false},"width":{"name":"number","required":false},"disableLine":{"name":"bool","required":false},"disableTicks":{"name":"bool","required":false},"domainLimit":{"name":"enum","value":[{"value":"'nice'","computed":false},{"value":"'strict'","computed":false}],"required":false}}}},"required":false,"description":"Y-axis configuration. Array of axis config objects.\nSame properties as xAxis, plus:\n- width (number): Space reserved for axis\n- position (string): 'left', 'right', 'none'"},"zAxis":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"string","required":false},"data":{"name":"array","required":false},"dataKey":{"name":"string","required":false},"min":{"name":"number","required":false},"max":{"name":"number","required":false},"colorMap":{"name":"object","required":false}}}},"required":false,"description":"Z-axis configuration for color mapping scatter points.\nColor priority: z-axis > y-axis > x-axis > series color.\n- data (array): Z-axis values\n- dataKey (string): Key for dataset-driven z values\n- id (string): Axis identifier\n- min/max (number): Domain bounds\n- colorMap (object): Color mapping - continuous, piecewise, or ordinal\n Continuous: {type: 'continuous', min, max, color: ['#start', '#end']}\n Piecewise: {type: 'piecewise', thresholds: [...], colors: [...]}\n Ordinal: {type: 'ordinal', values: [...], colors: [...]}"},"dataset":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Dataset array for datasetKeys-driven series.\nArray of objects where keys map to series datasetKeys.\nExample: [{x1: 10, y1: 20, x2: 30, y2: 40}, ...]"},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels. Default is 400."},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not set, fills available space."},"margin":{"type":{"name":"shape","value":{"top":{"name":"number","required":false},"right":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false}}},"required":false,"description":"Chart margins in pixels. Object with top, right, bottom, left keys."},"grid":{"type":{"name":"shape","value":{"horizontal":{"name":"bool","required":false},"vertical":{"name":"bool","required":false}}},"required":false,"description":"Grid configuration. Object with horizontal and vertical boolean keys."},"colors":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Color palette array for multiple series."},"voronoiMaxRadius":{"type":{"name":"union","value":[{"name":"number"},{"name":"enum","value":[{"value":"'item'","computed":false}]}]},"required":false,"description":"Maximum distance between pointer and scatter point for interaction.\n- number: Distance in pixels\n- 'item': Only trigger on direct hover over marker\n- undefined: Infinite radius (default)"},"disableVoronoi":{"type":{"name":"bool"},"required":false,"description":"If true, disables Voronoi cell interaction and falls back to hover events."},"axisHighlight":{"type":{"name":"shape","value":{"x":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'line'","computed":false},{"value":"'band'","computed":false}],"required":false},"y":{"name":"enum","value":[{"value":"'none'","computed":false},{"value":"'line'","computed":false},{"value":"'band'","computed":false}],"required":false}}},"required":false,"description":"Axis highlight configuration on hover.\n- x: 'none', 'line', or 'band'\n- y: 'none', 'line', or 'band'"},"tooltip":{"type":{"name":"shape","value":{"trigger":{"name":"enum","value":[{"value":"'item'","computed":false},{"value":"'axis'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Tooltip configuration.\n- trigger: 'item' (on point hover), 'axis' (all at x position), 'none' (disabled)"},"hideLegend":{"type":{"name":"bool"},"required":false,"description":"If true, the legend is hidden."},"skipAnimation":{"type":{"name":"bool"},"required":false,"description":"If true, animations are disabled."},"loading":{"type":{"name":"bool"},"required":false,"description":"If true, shows a loading overlay."},"renderer":{"type":{"name":"enum","value":[{"value":"'svg-single'","computed":false},{"value":"'svg-batch'","computed":false}]},"required":false,"description":"Renderer type for performance optimization.\n- 'svg-single': Default, renders each point as a element\n- 'svg-batch': Batch renders points in elements for large datasets\n Note: svg-batch has limitations (no CSS per-point, no custom markers)"},"slotProps":{"type":{"name":"object"},"required":false,"description":"Props passed to internal slot components for customization."},"highlightedItem":{"type":{"name":"object"},"required":false,"description":"Currently highlighted item. Works as both input (controlled) and output.\nObject with seriesId and dataIndex."},"clickData":{"type":{"name":"object"},"required":false,"description":"Data from the most recent click event. Read-only output property.\nContains seriesId, dataIndex, x, y, and timestamp."},"n_clicks":{"type":{"name":"number"},"required":false,"description":"Number of times the chart has been clicked. Increments on each click event."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash-assigned callback that should be called to report property changes\nto Dash, to make them available for callbacks."}}},"src/lib/components/SimpleTreeView.react.js":{"description":"","displayName":"SimpleTreeView","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"Dash component id"},"items":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"itemId":{"name":"string","required":true},"label":{"name":"string","required":true},"children":{"name":"array","required":false},"disabled":{"name":"bool","required":false},"disableSelection":{"name":"bool","required":false}}}},"required":false,"description":"Nested items array. Each item: {itemId: string, label: string, children?: [], disabled?: bool, disableSelection?: bool}","defaultValue":{"value":"[]","computed":false}},"selectedItems":{"type":{"name":"union","value":[{"name":"string"},{"name":"arrayOf","value":{"name":"string"}}]},"required":false,"description":"Controlled selected item(s). String when multiSelect=false, array when true."},"defaultSelectedItems":{"type":{"name":"union","value":[{"name":"string"},{"name":"arrayOf","value":{"name":"string"}}]},"required":false,"description":"Default selected items (uncontrolled)."},"multiSelect":{"type":{"name":"bool"},"required":false,"description":"Allow selecting multiple items.","defaultValue":{"value":"false","computed":false}},"checkboxSelection":{"type":{"name":"bool"},"required":false,"description":"Show checkboxes for selection.","defaultValue":{"value":"false","computed":false}},"disableSelection":{"type":{"name":"bool"},"required":false,"description":"Disable all selection.","defaultValue":{"value":"false","computed":false}},"expandedItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Controlled expanded item IDs."},"defaultExpandedItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Default expanded items (uncontrolled)."},"expansionTrigger":{"type":{"name":"enum","value":[{"value":"'content'","computed":false},{"value":"'iconContainer'","computed":false}]},"required":false,"description":"What triggers expansion: \"content\" or \"iconContainer\".","defaultValue":{"value":"'content'","computed":false}},"disabledItemsFocusable":{"type":{"name":"bool"},"required":false,"description":"Allow focus on disabled items.","defaultValue":{"value":"false","computed":false}},"itemChildrenIndentation":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Indentation of children. Number (px) or string (\"24px\", \"2rem\").","defaultValue":{"value":"'12px'","computed":false}},"height":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Container height."},"sx":{"type":{"name":"object"},"required":false,"description":"MUI sx styling object."},"collapseIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for collapse icon (e.g. \"ExpandMore\")."},"expandIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for expand icon (e.g. \"ChevronRight\")."},"endIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for leaf/end icon."},"ariaLabel":{"type":{"name":"string"},"required":false,"description":"ARIA label for the tree."},"ariaLabelledBy":{"type":{"name":"string"},"required":false,"description":"ID of element that labels the tree."},"clickedItem":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Fired when item is clicked. {itemId, event_timestamp}"},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash setProps callback"}}},"src/lib/components/SparklineChart.react.js":{"description":"SparklineChart component wrapping MUI X Charts SparkLineChart.\nRenders compact, inline charts perfect for dashboards, tables, and KPI cards.\nThis is a Community feature - no license key required.\n\nSupports both controlled and uncontrolled highlight states for interactive\ndashboards where hovering on a sparkline updates other components.","displayName":"SparklineChart","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"data":{"type":{"name":"arrayOf","value":{"name":"number"}},"required":true,"description":"Array of numeric values to display in the sparkline.\nThis is the primary data for the chart."},"plotType":{"type":{"name":"enum","value":[{"value":"'line'","computed":false},{"value":"'bar'","computed":false}]},"required":false,"description":"Type of plot to render.\n- 'line': Renders a line chart (default)\n- 'bar': Renders a bar chart"},"width":{"type":{"name":"number"},"required":false,"description":"Chart width in pixels. If not specified, the chart will\nexpand to fill the available space."},"height":{"type":{"name":"number"},"required":false,"description":"Chart height in pixels. Default is 36 for compact inline display."},"color":{"type":{"name":"string"},"required":false,"description":"Single color for the sparkline. Can be any valid CSS color string.\nExample: '#1976d2', 'rgb(25, 118, 210)', 'blue'"},"colors":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Array of colors for the sparkline. Use this for multi-color configurations."},"area":{"type":{"name":"bool"},"required":false,"description":"If true, fills the area under the line. Only applies when plotType is 'line'."},"curve":{"type":{"name":"enum","value":[{"value":"'linear'","computed":false},{"value":"'monotoneX'","computed":false},{"value":"'monotoneY'","computed":false},{"value":"'natural'","computed":false},{"value":"'step'","computed":false},{"value":"'stepBefore'","computed":false},{"value":"'stepAfter'","computed":false},{"value":"'catmullRom'","computed":false},{"value":"'bumpX'","computed":false},{"value":"'bumpY'","computed":false}]},"required":false,"description":"Curve interpolation method for line charts.\nOptions: 'linear', 'monotoneX', 'monotoneY', 'natural', 'step',\n'stepBefore', 'stepAfter', 'catmullRom', 'bumpX', 'bumpY'"},"showTooltip":{"type":{"name":"bool"},"required":false,"description":"If true, shows a tooltip on hover displaying the value."},"showHighlight":{"type":{"name":"bool"},"required":false,"description":"If true, shows a visual highlight on the hovered data point.\nFor line charts, shows a dot. For bar charts, shows a band."},"margin":{"type":{"name":"shape","value":{"top":{"name":"number","required":false},"right":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false}}},"required":false,"description":"Chart margins in pixels. Object with top, right, bottom, left keys.\nDefault is { top: 5, right: 5, bottom: 5, left: 5 }."},"xAxis":{"type":{"name":"shape","value":{"id":{"name":"string","required":false},"data":{"name":"array","required":false},"scaleType":{"name":"enum","value":[{"value":"'band'","computed":false},{"value":"'point'","computed":false},{"value":"'linear'","computed":false},{"value":"'log'","computed":false},{"value":"'time'","computed":false}],"required":false}}},"required":false,"description":"X-axis configuration object. Unlike LineChart, this is a single object,\nnot an array. The axis is hidden by default for compact display.\n- id (string): Axis identifier for controlled highlighting\n- data (array): X-axis labels/values\n- scaleType (string): Scale type"},"yAxis":{"type":{"name":"shape","value":{"min":{"name":"number","required":false},"max":{"name":"number","required":false}}},"required":false,"description":"Y-axis configuration object. Unlike LineChart, this is a single object,\nnot an array. The axis is hidden by default for compact display."},"axisHighlight":{"type":{"name":"shape","value":{"x":{"name":"enum","value":[{"value":"'line'","computed":false},{"value":"'band'","computed":false},{"value":"'none'","computed":false}],"required":false},"y":{"name":"enum","value":[{"value":"'line'","computed":false},{"value":"'band'","computed":false},{"value":"'none'","computed":false}],"required":false}}},"required":false,"description":"Axis highlight configuration. Controls how the axis is highlighted on hover.\n- x: 'line' | 'band' | 'none' - highlight style for x-axis\n- y: 'line' | 'band' | 'none' - highlight style for y-axis"},"slotProps":{"type":{"name":"object"},"required":false,"description":"Props passed to internal slot components for customization.\n- lineHighlight: { r: number } - radius of the highlight dot\n- tooltip: tooltip configuration"},"clipAreaOffset":{"type":{"name":"shape","value":{"top":{"name":"number","required":false},"right":{"name":"number","required":false},"bottom":{"name":"number","required":false},"left":{"name":"number","required":false}}},"required":false,"description":"Offset for the clip area to prevent cutting off elements at edges.\nObject with top, right, bottom, left keys (in pixels)."},"baseline":{"type":{"name":"union","value":[{"name":"enum","value":[{"value":"'min'","computed":false},{"value":"'max'","computed":false}]},{"name":"number"}]},"required":false,"description":"Baseline for area charts. Determines where the area fill starts.\n- 'min': fills from minimum value (default)\n- 'max': fills from maximum value\n- number: fills from a specific value"},"strokeWidth":{"type":{"name":"number"},"required":false,"description":"Stroke width for the line in pixels. Only applies when plotType is 'line'.\nDefault is 2. Higher values create thicker lines."},"disableClipping":{"type":{"name":"bool"},"required":false,"description":"If true, disables clipping of the chart content.\nUseful when elements extend beyond the chart boundaries."},"highlightedIndex":{"type":{"name":"number"},"required":false,"description":"Controlled highlight index. Set this to programmatically highlight\na specific data point. Requires xAxis.id to be set."},"highlightedItem":{"type":{"name":"object"},"required":false,"description":"Currently highlighted item. Read-only output property updated when\nthe user hovers over a data point (requires showHighlight=true).\nContains the data index of the highlighted point."},"hoverIndex":{"type":{"name":"number"},"required":false,"description":"Index of the currently hovered data point. Read-only output.\nUse this to sync hover state with other components."},"hoverValue":{"type":{"name":"number"},"required":false,"description":"Value at the currently hovered data point. Read-only output.\nUse this to display the hovered value in other components."},"n_hovers":{"type":{"name":"number"},"required":false,"description":"Number of hover events. Increments each time a data point is hovered."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash-assigned callback that should be called to report property changes\nto Dash, to make them available for callbacks."}}},"src/lib/components/TimeClock.react.js":{"description":"TimeClock lets the user pick a time on an inline clock face (hours, minutes,\nand optionally seconds) without any input, popper, or modal. Values are\nexchanged with Dash as strings; on change it emits `value` (wall-time ISO),\nthe current `view`, and a parsed `timeData` convenience object.","displayName":"TimeClock","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"Dash component id"},"value":{"type":{"name":"string"},"required":false,"description":"Controlled value. Full wall-time ISO (\"2022-04-17T15:30:00\") or time-only\n(\"15:30\" / \"15:30:45\"). Also an OUTPUT: updated on every change with a\nfull wall-time ISO string."},"defaultValue":{"type":{"name":"string"},"required":false,"description":"Uncontrolled initial value (same string formats as `value`)."},"views":{"type":{"name":"arrayOf","value":{"name":"enum","value":[{"value":"'hours'","computed":false},{"value":"'minutes'","computed":false},{"value":"'seconds'","computed":false}]}},"required":false,"description":"Which views to render, in order. Default [\"hours\", \"minutes\"].","defaultValue":{"value":"['hours', 'minutes']","computed":false}},"view":{"type":{"name":"enum","value":[{"value":"'hours'","computed":false},{"value":"'minutes'","computed":false},{"value":"'seconds'","computed":false}]},"required":false,"description":"Controlled visible view. Also an OUTPUT \u2014 updated when the view changes."},"openTo":{"type":{"name":"enum","value":[{"value":"'hours'","computed":false},{"value":"'minutes'","computed":false},{"value":"'seconds'","computed":false}]},"required":false,"description":"Which view to open first (uncontrolled)."},"ampm":{"type":{"name":"bool"},"required":false,"description":"Force 12h (true) or 24h (false). Omit to use the locale default."},"disabled":{"type":{"name":"bool"},"required":false,"description":"Disable the whole clock.","defaultValue":{"value":"false","computed":false}},"readOnly":{"type":{"name":"bool"},"required":false,"description":"Make the clock read-only (no editing).","defaultValue":{"value":"false","computed":false}},"autoFocus":{"type":{"name":"bool"},"required":false,"description":"Auto-focus the clock on mount.","defaultValue":{"value":"false","computed":false}},"minutesStep":{"type":{"name":"number"},"required":false,"description":"Step (in minutes) between selectable minute values."},"minTime":{"type":{"name":"string"},"required":false,"description":"Minimum selectable time (ISO or time-only string)."},"maxTime":{"type":{"name":"string"},"required":false,"description":"Maximum selectable time (ISO or time-only string)."},"disableFuture":{"type":{"name":"bool"},"required":false,"description":"Disable times in the future (relative to now).","defaultValue":{"value":"false","computed":false}},"disablePast":{"type":{"name":"bool"},"required":false,"description":"Disable times in the past (relative to now).","defaultValue":{"value":"false","computed":false}},"disableIgnoringDatePartForTimeValidation":{"type":{"name":"bool"},"required":false,"description":"When true, min/max time comparisons include the date part. When false\n(default), only the time-of-day is compared.","defaultValue":{"value":"false","computed":false}},"showViewSwitcher":{"type":{"name":"bool"},"required":false,"description":"Show the hours/minutes/seconds view-switch arrow buttons.","defaultValue":{"value":"false","computed":false}},"className":{"type":{"name":"string"},"required":false,"description":"CSS class applied to the wrapping div."},"sx":{"type":{"name":"object"},"required":false,"description":"MUI sx styling object applied to the TimeClock."},"timeData":{"type":{"name":"exact","value":{"hours":{"name":"number","required":false},"minutes":{"name":"number","required":false},"seconds":{"name":"number","required":false},"formatted":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Parsed convenience output, updated on every change:\n{ hours, minutes, seconds, formatted (\"HH:mm:ss\"), event_timestamp }."},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash setProps callback"}}},"src/lib/components/TreeView.react.js":{"description":"","displayName":"TreeView","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"Dash component id"},"items":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Array of item objects. Each must have an id and label (or use getItemId/getItemLabel).","defaultValue":{"value":"[]","computed":false}},"getItemId":{"type":{"name":"string"},"required":false,"description":"Property name for item ID (default: \"id\")","defaultValue":{"value":"'id'","computed":false}},"getItemLabel":{"type":{"name":"string"},"required":false,"description":"Property name for item label (default: \"label\")","defaultValue":{"value":"'label'","computed":false}},"getItemChildren":{"type":{"name":"string"},"required":false,"description":"Property name for item children (default: \"children\")","defaultValue":{"value":"'children'","computed":false}},"selectedItems":{"type":{"name":"union","value":[{"name":"string"},{"name":"arrayOf","value":{"name":"string"}}]},"required":false,"description":"Controlled selected item(s). String when multiSelect=false, array when true."},"defaultSelectedItems":{"type":{"name":"union","value":[{"name":"string"},{"name":"arrayOf","value":{"name":"string"}}]},"required":false,"description":"Default selected items (uncontrolled)."},"multiSelect":{"type":{"name":"bool"},"required":false,"description":"Allow selecting multiple items.","defaultValue":{"value":"false","computed":false}},"checkboxSelection":{"type":{"name":"bool"},"required":false,"description":"Show checkboxes for selection.","defaultValue":{"value":"false","computed":false}},"disableSelection":{"type":{"name":"bool"},"required":false,"description":"Disable all selection.","defaultValue":{"value":"false","computed":false}},"selectionPropagation":{"type":{"name":"exact","value":{"parents":{"name":"bool","required":false},"descendants":{"name":"bool","required":false}}},"required":false,"description":"Auto-propagate selection to parents/descendants. {parents: bool, descendants: bool}"},"expandedItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Controlled expanded item IDs."},"defaultExpandedItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Default expanded items (uncontrolled)."},"expansionTrigger":{"type":{"name":"enum","value":[{"value":"'content'","computed":false},{"value":"'iconContainer'","computed":false}]},"required":false,"description":"What triggers expansion: \"content\" or \"iconContainer\".","defaultValue":{"value":"'content'","computed":false}},"isItemEditable":{"type":{"name":"bool"},"required":false,"description":"Enable label editing. true = all items, or use editableItems for per-item control.","defaultValue":{"value":"false","computed":false}},"editableItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"List of item IDs that are editable (alternative to isItemEditable=true)."},"disabledItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"List of item IDs that should be disabled."},"disabledItemsFocusable":{"type":{"name":"bool"},"required":false,"description":"Allow focus on disabled items.","defaultValue":{"value":"false","computed":false}},"itemChildrenIndentation":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Indentation of children. Number (px) or string (\"24px\", \"2rem\").","defaultValue":{"value":"'12px'","computed":false}},"height":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Container height."},"sx":{"type":{"name":"object"},"required":false,"description":"MUI sx styling object."},"collapseIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for collapse icon (e.g. \"ExpandMore\")."},"expandIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for expand icon (e.g. \"ChevronRight\")."},"endIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for leaf/end icon."},"ariaLabel":{"type":{"name":"string"},"required":false,"description":"ARIA label for the tree."},"ariaLabelledBy":{"type":{"name":"string"},"required":false,"description":"ID of element that labels the tree."},"clickedItem":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Fired when item is clicked. {itemId, event_timestamp}"},"focusedItem":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Fired when item is focused. {itemId, event_timestamp}"},"editedItemLabel":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"newLabel":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Fired when label edit completes. {itemId, newLabel, event_timestamp}"},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash setProps callback"}}},"src/lib/components/TreeViewPro.react.js":{"description":"","displayName":"TreeViewPro","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"Dash component id"},"licenseKey":{"type":{"name":"string"},"required":false,"description":"MUI X Pro license key. Required for Pro features.","defaultValue":{"value":"''","computed":false}},"items":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Array of item objects.","defaultValue":{"value":"[]","computed":false}},"getItemId":{"type":{"name":"string"},"required":false,"description":"Property name for item ID (default: \"id\")","defaultValue":{"value":"'id'","computed":false}},"getItemLabel":{"type":{"name":"string"},"required":false,"description":"Property name for item label (default: \"label\")","defaultValue":{"value":"'label'","computed":false}},"getItemChildren":{"type":{"name":"string"},"required":false,"description":"Property name for item children (default: \"children\")","defaultValue":{"value":"'children'","computed":false}},"selectedItems":{"type":{"name":"union","value":[{"name":"string"},{"name":"arrayOf","value":{"name":"string"}}]},"required":false,"description":"Controlled selected item(s). String when multiSelect=false, array when true."},"defaultSelectedItems":{"type":{"name":"union","value":[{"name":"string"},{"name":"arrayOf","value":{"name":"string"}}]},"required":false,"description":"Default selected items (uncontrolled)."},"multiSelect":{"type":{"name":"bool"},"required":false,"description":"Allow selecting multiple items.","defaultValue":{"value":"false","computed":false}},"checkboxSelection":{"type":{"name":"bool"},"required":false,"description":"Show checkboxes for selection.","defaultValue":{"value":"false","computed":false}},"disableSelection":{"type":{"name":"bool"},"required":false,"description":"Disable all selection.","defaultValue":{"value":"false","computed":false}},"selectionPropagation":{"type":{"name":"exact","value":{"parents":{"name":"bool","required":false},"descendants":{"name":"bool","required":false}}},"required":false,"description":"Auto-propagate selection to parents/descendants."},"expandedItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Controlled expanded item IDs."},"defaultExpandedItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Default expanded items (uncontrolled)."},"expansionTrigger":{"type":{"name":"enum","value":[{"value":"'content'","computed":false},{"value":"'iconContainer'","computed":false}]},"required":false,"description":"What triggers expansion: \"content\" or \"iconContainer\".","defaultValue":{"value":"'content'","computed":false}},"isItemEditable":{"type":{"name":"bool"},"required":false,"description":"Enable label editing for all items.","defaultValue":{"value":"false","computed":false}},"editableItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"List of item IDs that are editable."},"disabledItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"List of item IDs that should be disabled."},"disabledItemsFocusable":{"type":{"name":"bool"},"required":false,"description":"Allow focus on disabled items.","defaultValue":{"value":"false","computed":false}},"itemChildrenIndentation":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Indentation of children.","defaultValue":{"value":"'12px'","computed":false}},"height":{"type":{"name":"union","value":[{"name":"number"},{"name":"string"}]},"required":false,"description":"Container height."},"sx":{"type":{"name":"object"},"required":false,"description":"MUI sx styling object."},"collapseIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for collapse icon."},"expandIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for expand icon."},"endIcon":{"type":{"name":"string"},"required":false,"description":"MUI icon name for leaf/end icon."},"ariaLabel":{"type":{"name":"string"},"required":false,"description":"ARIA label for the tree."},"ariaLabelledBy":{"type":{"name":"string"},"required":false,"description":"ID of element that labels the tree."},"itemsReordering":{"type":{"name":"bool"},"required":false,"description":"Enable drag-and-drop item reordering.","defaultValue":{"value":"false","computed":false}},"reorderableItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"List of item IDs that can be reordered. If empty, all items are reorderable."},"itemPositionChanged":{"type":{"name":"object"},"required":false,"description":"Output: Fired after item reorder. {itemId, oldPosition, newPosition, event_timestamp}"},"orderedItems":{"type":{"name":"arrayOf","value":{"name":"object"}},"required":false,"description":"Output: the current tree after any drag-and-drop reorder, preserving\neach node's original fields (id, label, children, etc.). Updates on\nevery reorder so Python callbacks can render the live order."},"lazyLoading":{"type":{"name":"bool"},"required":false,"description":"Enable lazy loading mode.","defaultValue":{"value":"false","computed":false}},"lazyLoadedChildren":{"type":{"name":"object"},"required":false,"description":"Input: Children loaded by Dash callback. {parentItemId: [childItems]}"},"lazyLoadRequest":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Output: Fired when unloaded node is expanded. {itemId, event_timestamp}"},"showItemControls":{"type":{"name":"bool"},"required":false,"description":"Show a Slider + kebab menu on each item row.","defaultValue":{"value":"false","computed":false}},"controlsItems":{"type":{"name":"arrayOf","value":{"name":"string"}},"required":false,"description":"Restrict slider+kebab to a subset of item IDs. Empty/omitted means all items."},"sliderValues":{"type":{"name":"object"},"required":false,"description":"Controlled slider values keyed by itemId, e.g. {\"task-1\": 40}. Also updated as user drags."},"sliderMin":{"type":{"name":"number"},"required":false,"description":"Slider minimum.","defaultValue":{"value":"0","computed":false}},"sliderMax":{"type":{"name":"number"},"required":false,"description":"Slider maximum.","defaultValue":{"value":"100","computed":false}},"sliderStep":{"type":{"name":"number"},"required":false,"description":"Slider step.","defaultValue":{"value":"1","computed":false}},"sliderColor":{"type":{"name":"string"},"required":false,"description":"Slider color. Accepts a Mantine theme color name (\"teal\", \"blue.5\"),\na CSS color literal (\"#ff6b6b\", \"rgb(...)\"), or a CSS expression\n(\"var(--mantine-color-teal-6)\", \"light-dark(...)\"). Bare names use\nshade 6 by default. When omitted, the slider falls back to MUI's\n`primary` palette color."},"kebabMenuItems":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"label":{"name":"string","required":false},"value":{"name":"string","required":false},"icon":{"name":"string","required":false},"divider":{"name":"bool","required":false},"children":{"name":"array","required":false}}}},"required":false,"description":"Kebab menu entries. Each entry is one of:\na LEAF {label, value, icon?} \u2014 picking it fires `kebabAction` with\n`action` = its `value`; a DIVIDER {divider: true}; or a SUBMENU\n{label, icon?, children: [entries]} that opens on hover/click\n(nesting is recursive)."},"kebabMenuItemsById":{"type":{"name":"objectOf","value":{"name":"array"}},"required":false,"description":"Per-node kebab menus: {itemId: [entries]} (same entry shape as\n`kebabMenuItems`, submenus/dividers included). A node listed here gets\nits own menu; all other nodes fall back to `kebabMenuItems`."},"sliderChange":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"value":{"name":"number","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Output: fires once on each commit (mouse-up) of a slider drag. {itemId, value, event_timestamp}"},"kebabAction":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"action":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Output: fires when a kebab menu item is chosen. {itemId, action, event_timestamp}"},"clickedItem":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Fired when item is clicked. {itemId, event_timestamp}"},"focusedItem":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Fired when item is focused. {itemId, event_timestamp}"},"editedItemLabel":{"type":{"name":"exact","value":{"itemId":{"name":"string","required":false},"newLabel":{"name":"string","required":false},"event_timestamp":{"name":"number","required":false}}},"required":false,"description":"Fired when label edit completes. {itemId, newLabel, event_timestamp}"},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash setProps callback"}}}} \ No newline at end of file diff --git a/dash_mui_charts/package-info.json b/dash_mui_charts/package-info.json index af7d52e..1482401 100644 --- a/dash_mui_charts/package-info.json +++ b/dash_mui_charts/package-info.json @@ -1,4 +1,61 @@ { - "name": "dash_mui_charts", - "version": "1.3.0" + "name": "dash_mui_charts", + "version": "1.4.0", + "description": "Dash components wrapping MUI X Charts for creating interactive data visualizations", + "main": "build/index.js", + "repository": { + "type": "git", + "url": "git://github.com/pip-install-python/dash-mui-charts.git" + }, + "bugs": { + "url": "https://github.com/pip-install-python/dash-mui-charts/issues" + }, + "homepage": "https://github.com/pip-install-python/dash-mui-charts", + "scripts": { + "start": "webpack serve --config webpack.serve.config.js --open", + "build:js": "webpack --mode production", + "build:backends": "dash-generate-components ./src/lib/components dash_mui_charts -p package-info.json --ignore \\.test\\.", + "build": "npm run build:js && npm run build:backends", + "validate-init": "python _validate_init.py" + }, + "author": "Pip Install Python", + "license": "MIT", + "dependencies": { + "@emotion/react": "^11.14.0", + "@emotion/styled": "^11.14.1", + "@mui/icons-material": "^6.5.0", + "@mui/material": "^6.5.0", + "@mui/x-charts": "^8.24.0", + "@mui/x-charts-pro": "^8.24.0", + "@mui/x-date-pickers": "8.24.0", + "@mui/x-license": "^7.24.0", + "@mui/x-tree-view": "^8.27.2", + "@mui/x-tree-view-pro": "^8.27.2", + "dayjs": "1.11.13", + "ramda": "^0.26.1" + }, + "devDependencies": { + "@babel/core": "^7.22.10", + "@babel/plugin-transform-object-rest-spread": "^7.22.5", + "@babel/preset-env": "^7.22.10", + "@babel/preset-react": "^7.22.5", + "@plotly/webpack-dash-dynamic-import": "^1.2.0", + "babel-loader": "^9.1.3", + "css-loader": "^6.8.1", + "prop-types": "^15.8.1", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "style-loader": "^3.3.3", + "webpack": "^5.88.2", + "webpack-cli": "^5.1.4", + "webpack-dev-server": "^4.15.1" + }, + "peerDependencies": { + "react": ">=17.0.0", + "react-dom": ">=17.0.0" + }, + "engines": { + "node": ">=14.0.0", + "npm": ">=6.1.0" + } } diff --git a/docs/api/api.md b/docs/api/api.md new file mode 100644 index 0000000..7eece1e --- /dev/null +++ b/docs/api/api.md @@ -0,0 +1,142 @@ +--- +name: API Reference +description: Every prop of all 13 dash-mui-charts components — generated from the components' own metadata, so it always matches the installed version. +endpoint: /api +package: dash_mui_charts +category: Reference +icon: mdi:api +--- + +.. llms_copy::API Reference + +.. toc:: + +### Overview + +The tables below are generated from each component's own metadata (the +docstrings `dash-generate-components` builds from the React prop types), +so they always match the installed version. Interaction props +(`clickData`, `highlightedItem`, `hoverIndex`, `zoomData`, …) are Dash +callback outputs; controlled props (`highlightedItem`, `expandedItems`, +`value`, …) also work as inputs. + +Pro-tier features (zoom, sliders, toolbars, Heatmap, TreeViewPro extras) +require a MUI X Pro license key passed via each component's `licenseKey` +prop. + +--- + +### LineChart + +Line/area charts with biaxial axes, reference lines, and Pro zoom/pan, +slider, brush and toolbar. [Demos →](/linechart-basic) + +.. kwargs::dash_mui_charts.LineChart + +--- + +### BarChart + +Vertical/horizontal bars with stacking, bar labels, dataset mode, and Pro +zoom. [Demos →](/barchart-basic) + +.. kwargs::dash_mui_charts.BarChart + +--- + +### CandlestickChart + +Static OHLC candlesticks with volume overlay and reference lines. +[Demos →](/candlestick) + +.. kwargs::dash_mui_charts.CandlestickChart + +--- + +### PieChart + +Pie, donut, and nested pies with controlled highlighting. +[Demos →](/pie) + +.. kwargs::dash_mui_charts.PieChart + +--- + +### ScatterChart + +Scatter charts with z-axis color mapping and voronoi interaction. +[Demos →](/scatter) + +.. kwargs::dash_mui_charts.ScatterChart + +--- + +### CompositeChart + +Scatter + line series layered on one surface, multi-axis, Pro zoom. +[Demos →](/composite) + +.. kwargs::dash_mui_charts.CompositeChart + +--- + +### Heatmap + +Matrix visualization with continuous/piecewise color scales (Pro). +[Demos →](/heatmap) + +.. kwargs::dash_mui_charts.Heatmap + +--- + +### SparklineChart + +Compact inline charts for dashboards, KPI cards and tables. +[Demos →](/sparkline) + +.. kwargs::dash_mui_charts.SparklineChart + +--- + +### LiveTradingChart + +Real-time streaming OHLCV simulation with forecast and alerts. +[Demos →](/live-trading) + +.. kwargs::dash_mui_charts.LiveTradingChart + +--- + +### TreeView + +Data-driven RichTreeView: selection, expansion, inline editing. +[Demos →](/tree-basic) + +.. kwargs::dash_mui_charts.TreeView + +--- + +### SimpleTreeView + +JSX-driven tree for navigation sidebars and static hierarchies. +[Demos →](/tree-simple) + +.. kwargs::dash_mui_charts.SimpleTreeView + +--- + +### TreeViewPro + +Drag-reorder, lazy loading, per-item slider and kebab controls (Pro). +[Demos →](/tree-pro) + +.. kwargs::dash_mui_charts.TreeViewPro + +--- + +### TimeClock + +Inline clock-face time picker (MUI X Date & Time Pickers). +[Demos →](/time-clock) + +.. kwargs::dash_mui_charts.TimeClock diff --git a/docs/barchart_basic/_data.py b/docs/barchart_basic/_data.py new file mode 100644 index 0000000..e665d62 --- /dev/null +++ b/docs/barchart_basic/_data.py @@ -0,0 +1,16 @@ +"""Shared demo data for the BarChart basics examples — one seeded RNG in +the pre-migration draw ORDER, so every bar keeps its height.""" +import random + +random.seed(42) + +months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'] +revenue = [random.randint(30, 90) for _ in months] +expenses = [random.randint(20, 65) for _ in months] +profit = [r - e for r, e in zip(revenue, expenses)] + +# The stacked example's draws came AFTER revenue/expenses in the original +# module — same stream position preserved here. +organic = [random.randint(10, 30) for _ in months] +paid = [random.randint(8, 25) for _ in months] +referral = [random.randint(5, 15) for _ in months] diff --git a/docs/barchart_basic/barchart-basic.md b/docs/barchart_basic/barchart-basic.md new file mode 100644 index 0000000..54d1efd --- /dev/null +++ b/docs/barchart_basic/barchart-basic.md @@ -0,0 +1,120 @@ +--- +name: Bar Chart - Basic +description: "BarChart basics for Dash: multi-series vertical, stacked and horizontal bars, bar labels, rounded corners, custom colors and negative values." +endpoint: /barchart-basic +package: dash_mui_charts +category: BarChart +icon: mdi:chart-bar +--- + +.. llms_copy::Bar Chart - Basic + +.. toc:: + +### Overview + +Vertical and horizontal bar charts for Plotly Dash, wrapping MUI X Charts' +`BarChart`. Community features — bars, stacking, bar labels, dataset mode, +reference lines, click events — need no license. Pro features (zoom, +slider, toolbar) require a MUI X Pro `licenseKey`; the component +automatically switches to `BarChartPro` when Pro features are used. + +```python +from dash_mui_charts import BarChart + +BarChart( + id='my-bar', + series=[{'data': [4, 3, 5], 'label': 'Sales', 'color': '#1976d2'}], + xAxis=[{'data': ['Q1', 'Q2', 'Q3'], 'scaleType': 'band'}], + height=350, +) +``` + +`scaleType: 'band'` is required on the category axis. For horizontal bars, +put the band axis on `yAxis` and set `layout='horizontal'`. + +--- + +### Multi-series vertical + +Revenue, expenses, and profit by month. + +.. exec::docs.barchart_basic.multi_example + :code: false + +.. source::docs/barchart_basic/multi_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Stacked bar chart + +Traffic sources stacked per month via a shared `stack` id. + +.. exec::docs.barchart_basic.stacked_example + :code: false + +.. source::docs/barchart_basic/stacked_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Horizontal bar chart + +Revenue displayed horizontally with rounded corners — the band axis moves +to `yAxis` and `layout='horizontal'`. + +.. exec::docs.barchart_basic.horizontal_example + :code: false + +.. source::docs/barchart_basic/horizontal_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Bar labels + +Display values on bars with `barLabel='value'` and center or outside +placement. + +.. exec::docs.barchart_basic.labels_example + :code: false + +.. source::docs/barchart_basic/labels_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Rounded bars with custom colors + +`borderRadius` and a custom `colors` palette. + +.. exec::docs.barchart_basic.rounded_example + :code: false + +.. source::docs/barchart_basic/rounded_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Negative values + +Bars with negative values extend below the zero baseline. + +.. exec::docs.barchart_basic.negative_example + :code: false + +.. source::docs/barchart_basic/negative_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Related pages + +- [Dataset Mode](/barchart-dataset) · [Stacking](/barchart-stacking) · [Interaction](/barchart-interaction) · [Reference Lines](/barchart-reference) · [Pro Features](/barchart-pro) diff --git a/docs/barchart_basic/horizontal_example.py b/docs/barchart_basic/horizontal_example.py new file mode 100644 index 0000000..8c2c03e --- /dev/null +++ b/docs/barchart_basic/horizontal_example.py @@ -0,0 +1,14 @@ +from dash_mui_charts import BarChart + +from docs.barchart_basic._data import months, revenue + +component = BarChart( + id='bar-basic-horizontal', + series=[{'data': revenue, 'label': 'Revenue ($k)', 'color': '#1976d2'}], + yAxis=[{'data': months, 'scaleType': 'band'}], + xAxis=[{'label': 'Amount ($k)'}], + layout='horizontal', + borderRadius=6, + grid={'vertical': True}, + height=300, +) diff --git a/docs/barchart_basic/labels_example.py b/docs/barchart_basic/labels_example.py new file mode 100644 index 0000000..6848fd3 --- /dev/null +++ b/docs/barchart_basic/labels_example.py @@ -0,0 +1,15 @@ +from dash_mui_charts import BarChart + +component = BarChart( + id='bar-basic-labels', + series=[ + {'data': [4, 3, 5], 'barLabel': 'value', + 'barLabelPlacement': 'outside', 'label': 'Outside'}, + {'data': [2, 5, 6], 'barLabel': 'value', + 'barLabelPlacement': 'center', 'label': 'Center'}, + {'data': [3, 4, 2], 'label': 'No label'}, + ], + xAxis=[{'data': ['Group A', 'Group B', 'Group C'], 'scaleType': 'band'}], + height=300, + grid={'horizontal': True}, +) diff --git a/docs/barchart_basic/multi_example.py b/docs/barchart_basic/multi_example.py new file mode 100644 index 0000000..67b7fe0 --- /dev/null +++ b/docs/barchart_basic/multi_example.py @@ -0,0 +1,16 @@ +from dash_mui_charts import BarChart + +from docs.barchart_basic._data import expenses, months, profit, revenue + +component = BarChart( + id='bar-basic-multi', + series=[ + {'data': revenue, 'label': 'Revenue ($k)', 'color': '#1976d2'}, + {'data': expenses, 'label': 'Expenses ($k)', 'color': '#f57c00'}, + {'data': profit, 'label': 'Profit ($k)', 'color': '#388e3c'}, + ], + xAxis=[{'data': months, 'scaleType': 'band', 'label': 'Month'}], + yAxis=[{'label': 'Amount ($k)'}], + grid={'horizontal': True}, + height=350, +) diff --git a/docs/barchart_basic/negative_example.py b/docs/barchart_basic/negative_example.py new file mode 100644 index 0000000..f760605 --- /dev/null +++ b/docs/barchart_basic/negative_example.py @@ -0,0 +1,14 @@ +from dash_mui_charts import BarChart + +from docs.barchart_basic._data import months + +component = BarChart( + id='bar-basic-negative', + series=[ + {'data': [35, -20, 45, -15, 55, -30], 'label': 'Net Change', + 'color': '#00897b'}, + ], + xAxis=[{'data': months, 'scaleType': 'band'}], + grid={'horizontal': True}, + height=300, +) diff --git a/docs/barchart_basic/rounded_example.py b/docs/barchart_basic/rounded_example.py new file mode 100644 index 0000000..09a0564 --- /dev/null +++ b/docs/barchart_basic/rounded_example.py @@ -0,0 +1,14 @@ +from dash_mui_charts import BarChart + +component = BarChart( + id='bar-basic-rounded', + series=[ + {'data': [25, 50, 35, 70, 45], 'label': 'Sales'}, + ], + xAxis=[{'data': ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'], + 'scaleType': 'band'}], + borderRadius=10, + colors=['#7c4dff'], + grid={'horizontal': True}, + height=280, +) diff --git a/docs/barchart_basic/stacked_example.py b/docs/barchart_basic/stacked_example.py new file mode 100644 index 0000000..0a44912 --- /dev/null +++ b/docs/barchart_basic/stacked_example.py @@ -0,0 +1,19 @@ +from dash_mui_charts import BarChart + +from docs.barchart_basic._data import months, organic, paid, referral + +component = BarChart( + id='bar-basic-stacked', + series=[ + {'data': organic, 'label': 'Organic', 'color': '#66bb6a', + 'stack': 'traffic'}, + {'data': paid, 'label': 'Paid', 'color': '#42a5f5', + 'stack': 'traffic'}, + {'data': referral, 'label': 'Referral', 'color': '#ab47bc', + 'stack': 'traffic'}, + ], + xAxis=[{'data': months, 'scaleType': 'band'}], + yAxis=[{'label': 'Visitors (k)'}], + grid={'horizontal': True}, + height=300, +) diff --git a/docs/barchart_dataset/_data.py b/docs/barchart_dataset/_data.py new file mode 100644 index 0000000..333f4a6 --- /dev/null +++ b/docs/barchart_dataset/_data.py @@ -0,0 +1,25 @@ +"""Shared table-format datasets for the BarChart dataset-mode examples.""" + +# City temperature data +temp_dataset = [ + {'month': 'Jan', 'london': 5, 'paris': 4, 'nyc': 0, 'tokyo': 6}, + {'month': 'Feb', 'london': 6, 'paris': 5, 'nyc': 1, 'tokyo': 7}, + {'month': 'Mar', 'london': 9, 'paris': 10, 'nyc': 7, 'tokyo': 11}, + {'month': 'Apr', 'london': 13, 'paris': 14, 'nyc': 13, 'tokyo': 17}, + {'month': 'May', 'london': 16, 'paris': 18, 'nyc': 18, 'tokyo': 21}, + {'month': 'Jun', 'london': 20, 'paris': 22, 'nyc': 24, 'tokyo': 25}, + {'month': 'Jul', 'london': 22, 'paris': 25, 'nyc': 28, 'tokyo': 29}, + {'month': 'Aug', 'london': 21, 'paris': 24, 'nyc': 27, 'tokyo': 30}, + {'month': 'Sep', 'london': 18, 'paris': 20, 'nyc': 22, 'tokyo': 26}, + {'month': 'Oct', 'london': 14, 'paris': 15, 'nyc': 16, 'tokyo': 20}, + {'month': 'Nov', 'london': 9, 'paris': 9, 'nyc': 9, 'tokyo': 14}, + {'month': 'Dec', 'london': 6, 'paris': 5, 'nyc': 2, 'tokyo': 8}, +] + +# Product sales data +product_dataset = [ + {'product': 'Widget A', 'q1': 120, 'q2': 150, 'q3': 180, 'q4': 200}, + {'product': 'Widget B', 'q1': 90, 'q2': 110, 'q3': 95, 'q4': 130}, + {'product': 'Widget C', 'q1': 200, 'q2': 180, 'q3': 220, 'q4': 250}, + {'product': 'Widget D', 'q1': 60, 'q2': 85, 'q3': 100, 'q4': 90}, +] diff --git a/docs/barchart_dataset/barchart-dataset.md b/docs/barchart_dataset/barchart-dataset.md new file mode 100644 index 0000000..02277e6 --- /dev/null +++ b/docs/barchart_dataset/barchart-dataset.md @@ -0,0 +1,78 @@ +--- +name: Bar Chart - Dataset +description: "BarChart dataset mode: pass table-format data once and reference columns by dataKey, with stacked series and bar/category gap control." +endpoint: /barchart-dataset +package: dash_mui_charts +category: BarChart +icon: mdi:table +--- + +.. llms_copy::Bar Chart - Dataset + +.. toc:: + +### Overview + +Dataset mode passes table-format data ONCE via the `dataset` prop; each +series and the band axis reference columns by `dataKey` — no data +duplication across series. + +```python +BarChart( + dataset=[ + {'month': 'Jan', 'london': 18, 'paris': 15}, + {'month': 'Feb', 'london': 22, 'paris': 18}, + ], + xAxis=[{'dataKey': 'month', 'scaleType': 'band'}], + series=[ + {'dataKey': 'london', 'label': 'London'}, + {'dataKey': 'paris', 'label': 'Paris'}, + ], +) +``` + +--- + +### City temperatures (dataset mode) + +Data is passed once via `dataset`; series reference columns by `dataKey`. + +.. exec::docs.barchart_dataset.temps_example + :code: false + +.. source::docs/barchart_dataset/temps_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Stacked quarterly sales + +Stacked bars from a dataset, in horizontal layout. + +.. exec::docs.barchart_dataset.stacked_example + :code: false + +.. source::docs/barchart_dataset/stacked_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Bar gap & category gap + +Control spacing with `categoryGapRatio` and `barGapRatio` on the band +axis. + +.. exec::docs.barchart_dataset.gaps_example + :code: false + +.. source::docs/barchart_dataset/gaps_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Related pages + +- [Basic](/barchart-basic) · [Stacking](/barchart-stacking) · [Interaction](/barchart-interaction) · [Reference Lines](/barchart-reference) · [Pro Features](/barchart-pro) diff --git a/docs/barchart_dataset/gaps_example.py b/docs/barchart_dataset/gaps_example.py new file mode 100644 index 0000000..f5ff451 --- /dev/null +++ b/docs/barchart_dataset/gaps_example.py @@ -0,0 +1,21 @@ +from dash_mui_charts import BarChart + +from docs.barchart_dataset._data import temp_dataset + +component = BarChart( + id='bar-ds-gaps', + dataset=temp_dataset, + xAxis=[{ + 'dataKey': 'month', + 'scaleType': 'band', + 'categoryGapRatio': 0.4, + 'barGapRatio': 0.1, + }], + series=[ + {'dataKey': 'london', 'label': 'London', 'color': '#1565c0'}, + {'dataKey': 'tokyo', 'label': 'Tokyo', 'color': '#c62828'}, + ], + yAxis=[{'label': '°C'}], + height=320, + grid={'horizontal': True}, +) diff --git a/docs/barchart_dataset/stacked_example.py b/docs/barchart_dataset/stacked_example.py new file mode 100644 index 0000000..c60fbb8 --- /dev/null +++ b/docs/barchart_dataset/stacked_example.py @@ -0,0 +1,23 @@ +from dash_mui_charts import BarChart + +from docs.barchart_dataset._data import product_dataset + +component = BarChart( + id='bar-ds-stacked', + dataset=product_dataset, + yAxis=[{'dataKey': 'product', 'scaleType': 'band'}], + series=[ + {'dataKey': 'q1', 'label': 'Q1', 'stack': 'annual', + 'color': '#5c6bc0'}, + {'dataKey': 'q2', 'label': 'Q2', 'stack': 'annual', + 'color': '#42a5f5'}, + {'dataKey': 'q3', 'label': 'Q3', 'stack': 'annual', + 'color': '#26c6da'}, + {'dataKey': 'q4', 'label': 'Q4', 'stack': 'annual', + 'color': '#66bb6a'}, + ], + layout='horizontal', + borderRadius=4, + grid={'vertical': True}, + height=300, +) diff --git a/docs/barchart_dataset/temps_example.py b/docs/barchart_dataset/temps_example.py new file mode 100644 index 0000000..a647ca4 --- /dev/null +++ b/docs/barchart_dataset/temps_example.py @@ -0,0 +1,18 @@ +from dash_mui_charts import BarChart + +from docs.barchart_dataset._data import temp_dataset + +component = BarChart( + id='bar-ds-temps', + dataset=temp_dataset, + xAxis=[{'dataKey': 'month', 'scaleType': 'band'}], + series=[ + {'dataKey': 'london', 'label': 'London', 'color': '#1976d2'}, + {'dataKey': 'paris', 'label': 'Paris', 'color': '#f57c00'}, + {'dataKey': 'nyc', 'label': 'New York', 'color': '#388e3c'}, + {'dataKey': 'tokyo', 'label': 'Tokyo', 'color': '#d32f2f'}, + ], + yAxis=[{'label': '°C'}], + height=380, + grid={'horizontal': True}, +) diff --git a/docs/barchart_interaction/_data.py b/docs/barchart_interaction/_data.py new file mode 100644 index 0000000..05b3b47 --- /dev/null +++ b/docs/barchart_interaction/_data.py @@ -0,0 +1,21 @@ +"""Shared demo data for the BarChart interaction examples — same seed and +draw order as the pre-migration page.""" +import random + +random.seed(42) + +months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'] +revenue = [random.randint(30, 90) for _ in months] +expenses = [random.randint(20, 65) for _ in months] + +PRE_STYLE = { + 'fontSize': '12px', + 'margin': 0, + 'padding': '10px 14px', + 'borderRadius': '6px', + 'background': 'var(--mantine-color-body)', + 'border': '1px solid var(--mantine-color-default-border)', + 'maxHeight': '120px', + 'overflow': 'auto', + 'color': 'var(--mantine-color-text)', +} diff --git a/docs/barchart_interaction/axis_click_example.py b/docs/barchart_interaction/axis_click_example.py new file mode 100644 index 0000000..32cdbfc --- /dev/null +++ b/docs/barchart_interaction/axis_click_example.py @@ -0,0 +1,38 @@ +import json + +from dash import Input, Output, callback, html + +from dash_mui_charts import BarChart +from docs.barchart_interaction._data import PRE_STYLE, expenses, months, revenue + +component = html.Div( + [ + BarChart( + id='bar-int-axis-click', + series=[ + {'data': revenue, 'label': 'Revenue', 'color': '#1976d2'}, + {'data': expenses, 'label': 'Expenses', 'color': '#f57c00'}, + ], + xAxis=[{'data': months, 'scaleType': 'band'}], + grid={'horizontal': True}, + height=300, + ), + html.P("axisClickData:", style={'fontSize': '12px', + 'color': 'var(--mantine-color-dimmed)', + 'marginTop': '12px', + 'marginBottom': '4px'}), + html.Pre(id='bar-int-axis-click-out', children='Click on the chart...', + style=PRE_STYLE), + ] +) + + +@callback( + Output('bar-int-axis-click-out', 'children'), + Input('bar-int-axis-click', 'axisClickData'), + prevent_initial_call=True, +) +def show_axis_click(data): + if not data: + return 'Click on the chart...' + return json.dumps(data, indent=2) diff --git a/docs/barchart_interaction/axis_highlight_example.py b/docs/barchart_interaction/axis_highlight_example.py new file mode 100644 index 0000000..69ccc2c --- /dev/null +++ b/docs/barchart_interaction/axis_highlight_example.py @@ -0,0 +1,31 @@ +from dash import html + +from dash_mui_charts import BarChart +from docs.barchart_interaction._data import months, revenue + + +def _variant(chart_id, title, color, mode): + return html.Div( + [ + html.P(title, style={'fontWeight': 600, 'fontSize': '13px'}), + BarChart( + id=chart_id, + series=[{'data': revenue, 'label': 'Revenue', + 'color': color}], + xAxis=[{'data': months, 'scaleType': 'band'}], + axisHighlight={'x': mode, 'y': 'none'}, + height=200, + ), + ], + style={'flex': 1}, + ) + + +component = html.Div( + [ + _variant('bar-int-ax-band', "x: 'band' (default)", '#1976d2', 'band'), + _variant('bar-int-ax-line', "x: 'line'", '#f57c00', 'line'), + _variant('bar-int-ax-none', "x: 'none'", '#388e3c', 'none'), + ], + style={'display': 'flex', 'gap': '16px'}, +) diff --git a/docs/barchart_interaction/barchart-interaction.md b/docs/barchart_interaction/barchart-interaction.md new file mode 100644 index 0000000..5fa3f79 --- /dev/null +++ b/docs/barchart_interaction/barchart-interaction.md @@ -0,0 +1,93 @@ +--- +name: Bar Chart - Interaction +description: "BarChart interaction in Dash: bar and axis click callbacks, series highlighting, axis highlight modes, and axis vs item tooltip triggers." +endpoint: /barchart-interaction +package: dash_mui_charts +category: BarChart +icon: mdi:cursor-default-click-outline +--- + +.. llms_copy::Bar Chart - Interaction + +.. toc:: + +### Overview + +Interaction flows back to Dash through two callback outputs: `clickData` +(the clicked bar's `seriesId` and `dataIndex`) and `axisClickData` (the +axis value plus every series' value at the clicked position). +`highlightedItem` reports hover state, and `highlightScope` per series +controls what highlights and what fades. + +--- + +### Click events + +Click any bar to capture `seriesId` and `dataIndex`. + +.. exec::docs.barchart_interaction.click_example + :code: false + +.. source::docs/barchart_interaction/click_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Axis click + +Click on the chart area to capture the axis value and all series values +at that point. + +.. exec::docs.barchart_interaction.axis_click_example + :code: false + +.. source::docs/barchart_interaction/axis_click_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Series highlighting + +Hover over a bar to highlight the entire series and fade others. + +.. exec::docs.barchart_interaction.highlight_example + :code: false + +.. source::docs/barchart_interaction/highlight_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Axis highlight: band vs line vs none + +Control the hover band/line on each axis with `axisHighlight`. + +.. exec::docs.barchart_interaction.axis_highlight_example + :code: false + +.. source::docs/barchart_interaction/axis_highlight_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Tooltip triggers + +`'axis'` shows all series at the hover position; `'item'` shows only the +hovered bar. + +.. exec::docs.barchart_interaction.tooltip_example + :code: false + +.. source::docs/barchart_interaction/tooltip_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Related pages + +- [Basic](/barchart-basic) · [Dataset Mode](/barchart-dataset) · [Stacking](/barchart-stacking) · [Reference Lines](/barchart-reference) · [Pro Features](/barchart-pro) diff --git a/docs/barchart_interaction/click_example.py b/docs/barchart_interaction/click_example.py new file mode 100644 index 0000000..2da435a --- /dev/null +++ b/docs/barchart_interaction/click_example.py @@ -0,0 +1,38 @@ +import json + +from dash import Input, Output, callback, html + +from dash_mui_charts import BarChart +from docs.barchart_interaction._data import PRE_STYLE, expenses, months, revenue + +component = html.Div( + [ + BarChart( + id='bar-int-click', + series=[ + {'data': revenue, 'label': 'Revenue', 'color': '#1976d2'}, + {'data': expenses, 'label': 'Expenses', 'color': '#f57c00'}, + ], + xAxis=[{'data': months, 'scaleType': 'band'}], + grid={'horizontal': True}, + height=300, + ), + html.P("clickData:", style={'fontSize': '12px', + 'color': 'var(--mantine-color-dimmed)', + 'marginTop': '12px', + 'marginBottom': '4px'}), + html.Pre(id='bar-int-click-out', children='Click a bar...', + style=PRE_STYLE), + ] +) + + +@callback( + Output('bar-int-click-out', 'children'), + Input('bar-int-click', 'clickData'), + prevent_initial_call=True, +) +def show_click(data): + if not data: + return 'Click a bar...' + return json.dumps(data, indent=2) diff --git a/docs/barchart_interaction/highlight_example.py b/docs/barchart_interaction/highlight_example.py new file mode 100644 index 0000000..92932a5 --- /dev/null +++ b/docs/barchart_interaction/highlight_example.py @@ -0,0 +1,46 @@ +import json + +from dash import Input, Output, callback, html + +from dash_mui_charts import BarChart +from docs.barchart_interaction._data import PRE_STYLE + +component = html.Div( + [ + BarChart( + id='bar-int-highlight', + series=[ + {'data': [4, 3, 5, 7, 6], 'label': 'Alpha', + 'highlightScope': {'highlight': 'series', 'fade': 'global'}, + 'color': '#5c6bc0'}, + {'data': [2, 5, 6, 3, 4], 'label': 'Beta', + 'highlightScope': {'highlight': 'series', 'fade': 'global'}, + 'color': '#26a69a'}, + {'data': [3, 4, 2, 5, 3], 'label': 'Gamma', + 'highlightScope': {'highlight': 'series', 'fade': 'global'}, + 'color': '#ef5350'}, + ], + xAxis=[{'data': ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'], + 'scaleType': 'band'}], + grid={'horizontal': True}, + height=300, + ), + html.P("highlightedItem:", style={'fontSize': '12px', + 'color': 'var(--mantine-color-dimmed)', + 'marginTop': '12px', + 'marginBottom': '4px'}), + html.Pre(id='bar-int-highlight-out', children='Hover over a bar...', + style=PRE_STYLE), + ] +) + + +@callback( + Output('bar-int-highlight-out', 'children'), + Input('bar-int-highlight', 'highlightedItem'), + prevent_initial_call=True, +) +def show_highlight(data): + if not data: + return 'Hover over a bar...' + return json.dumps(data, indent=2) diff --git a/docs/barchart_interaction/tooltip_example.py b/docs/barchart_interaction/tooltip_example.py new file mode 100644 index 0000000..08c7fd8 --- /dev/null +++ b/docs/barchart_interaction/tooltip_example.py @@ -0,0 +1,33 @@ +from dash import html + +from dash_mui_charts import BarChart +from docs.barchart_interaction._data import expenses, months, revenue + + +def _variant(chart_id, title, trigger): + return html.Div( + [ + html.P(title, style={'fontWeight': 600, 'fontSize': '13px'}), + BarChart( + id=chart_id, + series=[ + {'data': revenue, 'label': 'Revenue', 'color': '#1976d2'}, + {'data': expenses, 'label': 'Expenses', + 'color': '#f57c00'}, + ], + xAxis=[{'data': months, 'scaleType': 'band'}], + tooltip={'trigger': trigger}, + height=250, + ), + ], + style={'flex': 1}, + ) + + +component = html.Div( + [ + _variant('bar-int-tt-axis', "trigger: 'axis' (default)", 'axis'), + _variant('bar-int-tt-item', "trigger: 'item'", 'item'), + ], + style={'display': 'flex', 'gap': '16px'}, +) diff --git a/docs/barchart_pro/_data.py b/docs/barchart_pro/_data.py new file mode 100644 index 0000000..d1b6a00 --- /dev/null +++ b/docs/barchart_pro/_data.py @@ -0,0 +1,14 @@ +"""Shared 52-week data for the BarChart Pro zoom demos — same seed and +draw order as the pre-migration page (the stacked demo's three series were +drawn AFTER weekly_sales/weekly_returns from the same stream).""" +import random + +random.seed(42) + +categories = [f'W{i+1}' for i in range(52)] +weekly_sales = [random.randint(20, 100) for _ in categories] +weekly_returns = [random.randint(2, 20) for _ in categories] + +online = [random.randint(10, 40) for _ in categories] +retail = [random.randint(5, 30) for _ in categories] +wholesale = [random.randint(3, 15) for _ in categories] diff --git a/docs/barchart_pro/barchart-pro.md b/docs/barchart_pro/barchart-pro.md new file mode 100644 index 0000000..0ea8d22 --- /dev/null +++ b/docs/barchart_pro/barchart-pro.md @@ -0,0 +1,82 @@ +--- +name: Bar Chart - Pro +description: "BarChart Pro features with a MUI X license key: zoom with slider, zoom plus toolbar, and stacked bars with zoom on 52 weeks of data." +endpoint: /barchart-pro +package: dash_mui_charts +category: BarChart +icon: mdi:diamond-outline +--- + +.. llms_copy::Bar Chart - Pro + +.. toc:: + +### Overview + +Pro features — zoom, the range slider and the toolbar — flip the component +onto `BarChartPro` from `@mui/x-charts-pro` automatically when used. + +.. admonition::Pro features + :icon: mdi:diamond-outline + :color: orange + + These demos require a **MUI X Pro license key**, read from the + `MUI_PRO_API_KEY` environment variable and passed as `licenseKey`. + Without it the charts render with the unlicensed watermark. + +```python +BarChart( + licenseKey=MUI_KEY, + series=[{'data': weekly_sales, 'label': 'Sales'}], + xAxis=[{'data': categories, 'scaleType': 'band', + 'zoom': {'minSpan': 8}}], + showSlider=True, + initialZoom=[{'axisId': 'auto-generated-id-0', 'start': 0, 'end': 40}], +) +``` + +--- + +### Zoom with slider + +52 weeks of data with a zoom slider — drag the slider or use the mouse +wheel to zoom. + +.. exec::docs.barchart_pro.slider_example + :code: false + +.. source::docs/barchart_pro/slider_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Zoom + toolbar + +Toolbar with zoom in/out buttons and export options. + +.. exec::docs.barchart_pro.toolbar_example + :code: false + +.. source::docs/barchart_pro/toolbar_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Stacked with zoom + +Stacked bars with zoom and slider. + +.. exec::docs.barchart_pro.stacked_zoom_example + :code: false + +.. source::docs/barchart_pro/stacked_zoom_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Related pages + +- [Basic](/barchart-basic) · [Dataset Mode](/barchart-dataset) · [Stacking](/barchart-stacking) · [Interaction](/barchart-interaction) · [Reference Lines](/barchart-reference) diff --git a/docs/barchart_pro/slider_example.py b/docs/barchart_pro/slider_example.py new file mode 100644 index 0000000..2f3dc72 --- /dev/null +++ b/docs/barchart_pro/slider_example.py @@ -0,0 +1,41 @@ +import os + +from dash import html + +from dash_mui_charts import BarChart +from docs.barchart_pro._data import categories, weekly_sales + +MUI_KEY = os.getenv('MUI_PRO_API_KEY', '') + +component = html.Div( + [ + # License posture, stated in-page either way: the keyless banner is + # what tests/test_pages_smoke.py BANNER_ROUTES asserts. + html.P( + "⚠️ Set MUI_PRO_API_KEY environment variable to enable Pro " + "features." if not MUI_KEY else "✓ Pro license key detected.", + style={'color': 'var(--mantine-color-orange-6)' if not MUI_KEY + else 'var(--mantine-color-green-7)', + 'fontWeight': 600}, + ), + BarChart( + id='bar-pro-slider', + licenseKey=MUI_KEY, + series=[ + {'data': weekly_sales, 'label': 'Sales', 'color': '#1976d2'}, + ], + xAxis=[{ + 'data': categories, + 'scaleType': 'band', + 'zoom': {'minSpan': 8}, + 'label': 'Week', + }], + yAxis=[{'label': 'Units'}], + showSlider=True, + initialZoom=[{'axisId': 'auto-generated-id-0', + 'start': 0, 'end': 40}], + grid={'horizontal': True}, + height=400, + ), + ] +) diff --git a/docs/barchart_pro/stacked_zoom_example.py b/docs/barchart_pro/stacked_zoom_example.py new file mode 100644 index 0000000..343ddb7 --- /dev/null +++ b/docs/barchart_pro/stacked_zoom_example.py @@ -0,0 +1,27 @@ +import os + +from dash_mui_charts import BarChart +from docs.barchart_pro._data import categories, online, retail, wholesale + +MUI_KEY = os.getenv('MUI_PRO_API_KEY', '') + +component = BarChart( + id='bar-pro-stacked-zoom', + licenseKey=MUI_KEY, + series=[ + {'data': online, 'label': 'Online', 'stack': 'channel', + 'color': '#1976d2'}, + {'data': retail, 'label': 'Retail', 'stack': 'channel', + 'color': '#42a5f5'}, + {'data': wholesale, 'label': 'Wholesale', 'stack': 'channel', + 'color': '#90caf9'}, + ], + xAxis=[{ + 'data': categories, + 'scaleType': 'band', + 'zoom': {'minSpan': 6}, + }], + showSlider=True, + grid={'horizontal': True}, + height=380, +) diff --git a/docs/barchart_pro/toolbar_example.py b/docs/barchart_pro/toolbar_example.py new file mode 100644 index 0000000..4d75063 --- /dev/null +++ b/docs/barchart_pro/toolbar_example.py @@ -0,0 +1,24 @@ +import os + +from dash_mui_charts import BarChart +from docs.barchart_pro._data import categories, weekly_returns, weekly_sales + +MUI_KEY = os.getenv('MUI_PRO_API_KEY', '') + +component = BarChart( + id='bar-pro-toolbar', + licenseKey=MUI_KEY, + series=[ + {'data': weekly_sales, 'label': 'Sales', 'color': '#1565c0'}, + {'data': weekly_returns, 'label': 'Returns', 'color': '#c62828'}, + ], + xAxis=[{ + 'data': categories, + 'scaleType': 'band', + 'zoom': {'minSpan': 5}, + }], + showSlider=True, + showToolbar=True, + grid={'horizontal': True}, + height=420, +) diff --git a/docs/barchart_reference/_data.py b/docs/barchart_reference/_data.py new file mode 100644 index 0000000..cb53397 --- /dev/null +++ b/docs/barchart_reference/_data.py @@ -0,0 +1,4 @@ +"""Shared demo data for the BarChart reference-line examples.""" + +months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug'] +sales = [45, 52, 48, 61, 55, 70, 65, 72] diff --git a/docs/barchart_reference/barchart-reference.md b/docs/barchart_reference/barchart-reference.md new file mode 100644 index 0000000..6884f2e --- /dev/null +++ b/docs/barchart_reference/barchart-reference.md @@ -0,0 +1,104 @@ +--- +name: Bar Chart - Reference Lines +description: "BarChart reference lines and styling: target and threshold markers, vertical reference lines, skip animation, hidden legend and custom color palettes." +endpoint: /barchart-reference +package: dash_mui_charts +category: BarChart +icon: mdi:chart-bar +--- + +.. llms_copy::Bar Chart - Reference Lines + +.. toc:: + +### Overview + +`referenceLines` draws horizontal (`y`) and vertical (`x`) markers over +the bars — targets, thresholds, dates — each with its own `label`, +`labelAlign`, `lineStyle` and `labelStyle`. The rest of this page covers +the styling switches: `skipAnimation`, `hideLegend` and the `colors` +palette. + +--- + +### Target line + +Horizontal reference line showing a sales target. + +.. exec::docs.barchart_reference.target_example + :code: false + +.. source::docs/barchart_reference/target_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Multiple reference lines + +Min, average, and max thresholds on one chart. + +.. exec::docs.barchart_reference.multi_example + :code: false + +.. source::docs/barchart_reference/multi_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Vertical reference line + +Mark a specific category (e.g., a policy change date). + +.. exec::docs.barchart_reference.vertical_example + :code: false + +.. source::docs/barchart_reference/vertical_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Skip animation + +Bars render instantly when `skipAnimation=True`. + +.. exec::docs.barchart_reference.noanim_example + :code: false + +.. source::docs/barchart_reference/noanim_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Hidden legend + +Use `hideLegend=True` when the legend is redundant. + +.. exec::docs.barchart_reference.nolegend_example + :code: false + +.. source::docs/barchart_reference/nolegend_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Custom color palette + +Override the default palette with the `colors` prop. + +.. exec::docs.barchart_reference.colors_example + :code: false + +.. source::docs/barchart_reference/colors_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Related pages + +- [Basic](/barchart-basic) · [Dataset Mode](/barchart-dataset) · [Stacking](/barchart-stacking) · [Interaction](/barchart-interaction) · [Pro Features](/barchart-pro) diff --git a/docs/barchart_reference/colors_example.py b/docs/barchart_reference/colors_example.py new file mode 100644 index 0000000..d0f82fd --- /dev/null +++ b/docs/barchart_reference/colors_example.py @@ -0,0 +1,14 @@ +from dash_mui_charts import BarChart + +component = BarChart( + id='bar-ref-colors', + series=[ + {'data': [30, 45, 35], 'label': 'East'}, + {'data': [25, 50, 40], 'label': 'West'}, + {'data': [40, 30, 55], 'label': 'Central'}, + ], + xAxis=[{'data': ['2023', '2024', '2025'], 'scaleType': 'band'}], + colors=['#ff6f00', '#00bfa5', '#6200ea'], + grid={'horizontal': True}, + height=300, +) diff --git a/docs/barchart_reference/multi_example.py b/docs/barchart_reference/multi_example.py new file mode 100644 index 0000000..96155e0 --- /dev/null +++ b/docs/barchart_reference/multi_example.py @@ -0,0 +1,38 @@ +from dash_mui_charts import BarChart + +from docs.barchart_reference._data import months, sales + +component = BarChart( + id='bar-ref-multi', + series=[ + {'data': sales, 'label': 'Sales', 'color': '#5c6bc0'}, + ], + xAxis=[{'data': months, 'scaleType': 'band'}], + referenceLines=[ + { + 'y': min(sales), + 'label': f'Min ({min(sales)})', + 'labelAlign': 'start', + 'lineStyle': {'stroke': '#f44336', 'strokeWidth': 1.5, + 'strokeDasharray': '4 4'}, + 'labelStyle': {'fill': '#f44336', 'fontSize': 11}, + }, + { + 'y': sum(sales) / len(sales), + 'label': f'Avg ({sum(sales) / len(sales):.0f})', + 'labelAlign': 'middle', + 'lineStyle': {'stroke': '#ff9800', 'strokeWidth': 2}, + 'labelStyle': {'fill': '#ff9800', 'fontSize': 11}, + }, + { + 'y': max(sales), + 'label': f'Max ({max(sales)})', + 'labelAlign': 'end', + 'lineStyle': {'stroke': '#4caf50', 'strokeWidth': 1.5, + 'strokeDasharray': '4 4'}, + 'labelStyle': {'fill': '#4caf50', 'fontSize': 11}, + }, + ], + grid={'horizontal': True}, + height=350, +) diff --git a/docs/barchart_reference/noanim_example.py b/docs/barchart_reference/noanim_example.py new file mode 100644 index 0000000..b9eb14a --- /dev/null +++ b/docs/barchart_reference/noanim_example.py @@ -0,0 +1,14 @@ +from dash_mui_charts import BarChart + +from docs.barchart_reference._data import months, sales + +component = BarChart( + id='bar-ref-noanim', + series=[ + {'data': sales, 'label': 'Sales', 'color': '#ef6c00'}, + ], + xAxis=[{'data': months, 'scaleType': 'band'}], + skipAnimation=True, + grid={'horizontal': True}, + height=280, +) diff --git a/docs/barchart_reference/nolegend_example.py b/docs/barchart_reference/nolegend_example.py new file mode 100644 index 0000000..f3c6885 --- /dev/null +++ b/docs/barchart_reference/nolegend_example.py @@ -0,0 +1,15 @@ +from dash_mui_charts import BarChart + +from docs.barchart_reference._data import months, sales + +component = BarChart( + id='bar-ref-nolegend', + series=[ + {'data': sales, 'label': 'Sales', 'color': '#7b1fa2'}, + ], + xAxis=[{'data': months, 'scaleType': 'band'}], + hideLegend=True, + borderRadius=8, + grid={'horizontal': True}, + height=280, +) diff --git a/docs/barchart_reference/target_example.py b/docs/barchart_reference/target_example.py new file mode 100644 index 0000000..68ac218 --- /dev/null +++ b/docs/barchart_reference/target_example.py @@ -0,0 +1,25 @@ +from dash_mui_charts import BarChart + +from docs.barchart_reference._data import months, sales + +component = BarChart( + id='bar-ref-target', + series=[ + {'data': sales, 'label': 'Monthly Sales', 'color': '#1976d2'}, + ], + xAxis=[{'data': months, 'scaleType': 'band'}], + yAxis=[{'label': 'Units Sold'}], + referenceLines=[ + { + 'y': 60, + 'label': 'Target (60)', + 'labelAlign': 'end', + 'lineStyle': {'stroke': '#f44336', 'strokeWidth': 2, + 'strokeDasharray': '6 4'}, + 'labelStyle': {'fill': '#f44336', 'fontWeight': 'bold', + 'fontSize': 12}, + }, + ], + grid={'horizontal': True}, + height=350, +) diff --git a/docs/barchart_reference/vertical_example.py b/docs/barchart_reference/vertical_example.py new file mode 100644 index 0000000..56b1f98 --- /dev/null +++ b/docs/barchart_reference/vertical_example.py @@ -0,0 +1,23 @@ +from dash_mui_charts import BarChart + +from docs.barchart_reference._data import months, sales + +component = BarChart( + id='bar-ref-vertical', + series=[ + {'data': sales, 'label': 'Sales', 'color': '#00897b'}, + ], + xAxis=[{'data': months, 'scaleType': 'band'}], + referenceLines=[ + { + 'x': 'May', + 'label': 'New Policy', + 'labelAlign': 'start', + 'lineStyle': {'stroke': '#9c27b0', 'strokeWidth': 2}, + 'labelStyle': {'fill': '#9c27b0', 'fontWeight': 'bold', + 'fontSize': 12}, + }, + ], + grid={'horizontal': True}, + height=350, +) diff --git a/docs/barchart_stacking/barchart-stacking.md b/docs/barchart_stacking/barchart-stacking.md new file mode 100644 index 0000000..c5abf6f --- /dev/null +++ b/docs/barchart_stacking/barchart-stacking.md @@ -0,0 +1,98 @@ +--- +name: Bar Chart - Stacking +description: "BarChart stacking options: standard, normalized (expand) and diverging stack offsets, multiple stack groups, and horizontal stacked bars." +endpoint: /barchart-stacking +package: dash_mui_charts +category: BarChart +icon: mdi:chart-bar-stacked +--- + +.. llms_copy::Bar Chart - Stacking + +.. toc:: + +### Overview + +Series sharing a `stack` id render stacked. `stackOffset` controls the +arithmetic: `'none'` (default, accumulate from zero), `'expand'` +(normalized to 100%), or `'diverging'` (positives above zero, negatives +below). Different `stack` ids render as side-by-side stack groups. + +```python +series=[ + {'data': [40, 35], 'stack': 'g', 'stackOffset': 'expand'}, + {'data': [30, 25], 'stack': 'g', 'stackOffset': 'expand'}, +] +``` + +--- + +### Standard stack (offset: none) + +Default stacking — bars accumulate from zero. + +.. exec::docs.barchart_stacking.normal_example + :code: false + +.. source::docs/barchart_stacking/normal_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Normalized stack (offset: expand) + +All bars fill to 100% — shows proportions rather than absolute values. + +.. exec::docs.barchart_stacking.expand_example + :code: false + +.. source::docs/barchart_stacking/expand_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Diverging stack + +Positive values above zero, negative below — useful for sentiment or net +scores. + +.. exec::docs.barchart_stacking.diverging_example + :code: false + +.. source::docs/barchart_stacking/diverging_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Multiple stack groups + +Different stack IDs create separate stacked groups side by side. + +.. exec::docs.barchart_stacking.groups_example + :code: false + +.. source::docs/barchart_stacking/groups_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Horizontal stacked + +Stacked bars in horizontal layout with rounded corners. + +.. exec::docs.barchart_stacking.horizontal_example + :code: false + +.. source::docs/barchart_stacking/horizontal_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Related pages + +- [Basic](/barchart-basic) · [Dataset Mode](/barchart-dataset) · [Interaction](/barchart-interaction) · [Reference Lines](/barchart-reference) · [Pro Features](/barchart-pro) diff --git a/docs/barchart_stacking/diverging_example.py b/docs/barchart_stacking/diverging_example.py new file mode 100644 index 0000000..b9bbb95 --- /dev/null +++ b/docs/barchart_stacking/diverging_example.py @@ -0,0 +1,16 @@ +from dash_mui_charts import BarChart + +categories = ['Q1', 'Q2', 'Q3', 'Q4'] + +component = BarChart( + id='bar-stack-diverging', + series=[ + {'data': [20, -10, 30, -5], 'label': 'Gains', 'stack': 'net', + 'stackOffset': 'diverging', 'color': '#4caf50'}, + {'data': [-15, 25, -20, 35], 'label': 'Losses', 'stack': 'net', + 'stackOffset': 'diverging', 'color': '#f44336'}, + ], + xAxis=[{'data': categories, 'scaleType': 'band'}], + grid={'horizontal': True}, + height=320, +) diff --git a/docs/barchart_stacking/expand_example.py b/docs/barchart_stacking/expand_example.py new file mode 100644 index 0000000..14e845e --- /dev/null +++ b/docs/barchart_stacking/expand_example.py @@ -0,0 +1,18 @@ +from dash_mui_charts import BarChart + +categories = ['Q1', 'Q2', 'Q3', 'Q4'] + +component = BarChart( + id='bar-stack-expand', + series=[ + {'data': [40, 35, 50, 45], 'label': 'Product A', 'stack': 'revenue', + 'stackOffset': 'expand', 'color': '#e65100'}, + {'data': [30, 25, 35, 40], 'label': 'Product B', 'stack': 'revenue', + 'stackOffset': 'expand', 'color': '#ff9800'}, + {'data': [20, 30, 25, 20], 'label': 'Product C', 'stack': 'revenue', + 'stackOffset': 'expand', 'color': '#ffcc80'}, + ], + xAxis=[{'data': categories, 'scaleType': 'band'}], + grid={'horizontal': True}, + height=320, +) diff --git a/docs/barchart_stacking/groups_example.py b/docs/barchart_stacking/groups_example.py new file mode 100644 index 0000000..f63fd17 --- /dev/null +++ b/docs/barchart_stacking/groups_example.py @@ -0,0 +1,21 @@ +from dash_mui_charts import BarChart + +categories = ['Q1', 'Q2', 'Q3', 'Q4'] + +component = BarChart( + id='bar-stack-groups', + series=[ + {'data': [40, 35, 50, 45], 'label': '2024 Online', + 'stack': 'year2024', 'color': '#1565c0'}, + {'data': [20, 15, 25, 30], 'label': '2024 Retail', + 'stack': 'year2024', 'color': '#42a5f5'}, + {'data': [35, 40, 45, 55], 'label': '2025 Online', + 'stack': 'year2025', 'color': '#2e7d32'}, + {'data': [25, 20, 30, 35], 'label': '2025 Retail', + 'stack': 'year2025', 'color': '#66bb6a'}, + ], + xAxis=[{'data': categories, 'scaleType': 'band'}], + yAxis=[{'label': 'Sales ($k)'}], + grid={'horizontal': True}, + height=350, +) diff --git a/docs/barchart_stacking/horizontal_example.py b/docs/barchart_stacking/horizontal_example.py new file mode 100644 index 0000000..b5cb0d0 --- /dev/null +++ b/docs/barchart_stacking/horizontal_example.py @@ -0,0 +1,19 @@ +from dash_mui_charts import BarChart + +component = BarChart( + id='bar-stack-horizontal', + series=[ + {'data': [60, 45, 70, 55], 'label': 'Completed', 'stack': 'tasks', + 'color': '#4caf50'}, + {'data': [20, 25, 15, 30], 'label': 'In Progress', 'stack': 'tasks', + 'color': '#ff9800'}, + {'data': [10, 15, 5, 10], 'label': 'Blocked', 'stack': 'tasks', + 'color': '#f44336'}, + ], + yAxis=[{'data': ['Team A', 'Team B', 'Team C', 'Team D'], + 'scaleType': 'band'}], + layout='horizontal', + borderRadius=4, + grid={'vertical': True}, + height=280, +) diff --git a/docs/barchart_stacking/normal_example.py b/docs/barchart_stacking/normal_example.py new file mode 100644 index 0000000..64b07af --- /dev/null +++ b/docs/barchart_stacking/normal_example.py @@ -0,0 +1,19 @@ +from dash_mui_charts import BarChart + +categories = ['Q1', 'Q2', 'Q3', 'Q4'] + +component = BarChart( + id='bar-stack-normal', + series=[ + {'data': [40, 35, 50, 45], 'label': 'Product A', 'stack': 'revenue', + 'color': '#1976d2'}, + {'data': [30, 25, 35, 40], 'label': 'Product B', 'stack': 'revenue', + 'color': '#42a5f5'}, + {'data': [20, 30, 25, 20], 'label': 'Product C', 'stack': 'revenue', + 'color': '#90caf9'}, + ], + xAxis=[{'data': categories, 'scaleType': 'band'}], + yAxis=[{'label': 'Revenue ($k)'}], + grid={'horizontal': True}, + height=320, +) diff --git a/docs/candlestick/_data.py b/docs/candlestick/_data.py new file mode 100644 index 0000000..b0bb96a --- /dev/null +++ b/docs/candlestick/_data.py @@ -0,0 +1,49 @@ +"""Shared OHLC demo data for the CandlestickChart examples. + +`generate_ohlc` seeds its own RNG, so the series is reproducible wherever +it is called from. (The pre-migration page also generated a 60-candle +`big_ohlc` it never rendered — dropped here as dead code.) +""" +import random + + +def generate_ohlc(start_price=100, n=30, seed=42): + """Realistic-looking OHLCV rows as a random walk.""" + random.seed(seed) + data = [] + price = start_price + for _ in range(n): + change = random.gauss(0, 2) + open_p = round(price + random.uniform(-0.5, 0.5), 2) + close_p = round(open_p + change, 2) + high_p = round(max(open_p, close_p) + random.uniform(0.5, 3), 2) + low_p = round(min(open_p, close_p) - random.uniform(0.5, 3), 2) + vol = random.randint(500, 5000) + data.append({'open': open_p, 'high': high_p, 'low': low_p, + 'close': close_p, 'volume': vol}) + price = close_p + return data + + +ohlc_data = generate_ohlc(100, 25) + +dates = [f'Apr {i+1}' for i in range(25)] + +# Array format — [open, high, low, close] tuples +ohlc_tuples = [[d['open'], d['high'], d['low'], d['close']] + for d in ohlc_data] + +# Dataset format — row objects +ohlc_dataset = [{**d, 'date': dates[i]} for i, d in enumerate(ohlc_data)] + +PRE_STYLE = { + 'fontSize': '12px', + 'margin': 0, + 'padding': '10px 14px', + 'borderRadius': '6px', + 'background': 'var(--mantine-color-body)', + 'border': '1px solid var(--mantine-color-default-border)', + 'maxHeight': '120px', + 'overflow': 'auto', + 'color': 'var(--mantine-color-text)', +} diff --git a/docs/candlestick/basic_example.py b/docs/candlestick/basic_example.py new file mode 100644 index 0000000..1c8d61b --- /dev/null +++ b/docs/candlestick/basic_example.py @@ -0,0 +1,15 @@ +from dash_mui_charts import CandlestickChart +from docs.candlestick._data import dates, ohlc_tuples + +component = CandlestickChart( + id='candle-basic', + series=[{ + 'data': ohlc_tuples, + 'upColor': '#4caf50', + 'downColor': '#f44336', + }], + xAxis=[{'data': dates, 'label': 'Date'}], + yAxis=[{'label': 'Price ($)'}], + grid={'horizontal': True}, + height=400, +) diff --git a/docs/candlestick/candlestick.md b/docs/candlestick/candlestick.md new file mode 100644 index 0000000..4d87005 --- /dev/null +++ b/docs/candlestick/candlestick.md @@ -0,0 +1,144 @@ +--- +name: Candlestick Chart +description: "CandlestickChart OHLC demos: array and dataset formats, volume overlay, candle styling, support/resistance reference lines and click events." +endpoint: /candlestick +package: dash_mui_charts +category: CandlestickChart +icon: mdi:chart-waterfall +--- + +.. llms_copy::Candlestick Chart + +.. toc:: + +### Overview + +Static OHLC candlestick charts for financial data in Plotly Dash. Built on +the MUI X Charts Pro composition API (`ChartDataProviderPro` plus a custom +SVG `CandlePlot` for candle bodies and wicks), so it does not need +`@mui/x-charts-premium`. Basic charts work without a license; zoom, slider +and toolbar are Pro features that require a MUI X Pro `licenseKey`. + +Not the same as [LiveTradingChart](/live-trading), which is a real-time +streaming chart. + +```python +from dash_mui_charts import CandlestickChart + +CandlestickChart( + id='my-candles', + series=[{ + 'data': [ + [100, 110, 95, 105], # [open, high, low, close] + [105, 115, 100, 112], + ], + 'upColor': '#4caf50', # close >= open + 'downColor': '#f44336', # close < open + }], + xAxis=[{'data': ['Mon', 'Tue']}], +) +``` + +Key props: `showVolume` + `volumeHeightRatio` (volume bars from +`volumeKey` or a `volume` array), `bodyWidthRatio` (0–1, default 0.6), +`wickWidth` (px), `referenceLines`, and a built-in OHLC hover tooltip with +vertical crosshair. The y-axis domain is computed automatically. + +--- + +### Basic candlestick (array format) + +OHLC data as `[open, high, low, close]` tuples. + +.. exec::docs.candlestick.basic_example + :code: false + +.. source::docs/candlestick/basic_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Dataset mode + +Data as row objects with a `datasetKeys` mapping. + +.. exec::docs.candlestick.dataset_example + :code: false + +.. source::docs/candlestick/dataset_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Candlestick + volume + +Volume bars overlaid below the candles (30% of chart height). + +.. exec::docs.candlestick.volume_example + :code: false + +.. source::docs/candlestick/volume_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Custom styling + +Wider candle bodies and thicker wicks with custom colors. + +.. exec::docs.candlestick.styled_example + :code: false + +.. source::docs/candlestick/styled_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Support & resistance lines + +Reference lines marking key price levels. + +.. exec::docs.candlestick.refs_example + :code: false + +.. source::docs/candlestick/refs_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Click events + +Click a candle to see its OHLC data — `clickData` carries `dataIndex`, +`label`, `open`, `high`, `low`, `close`. + +.. exec::docs.candlestick.click_example + :code: false + +.. source::docs/candlestick/click_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Tooltip disabled + +Set the tooltip trigger to `'none'` to hide the OHLC tooltip. + +.. exec::docs.candlestick.no_tooltip_example + :code: false + +.. source::docs/candlestick/no_tooltip_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Related pages + +- [LiveTradingChart](/live-trading) — real-time streaming charts +- [BarChart](/barchart-basic) — the BarChart component family diff --git a/docs/candlestick/click_example.py b/docs/candlestick/click_example.py new file mode 100644 index 0000000..804021e --- /dev/null +++ b/docs/candlestick/click_example.py @@ -0,0 +1,40 @@ +import json + +from dash import Input, Output, callback, html + +from dash_mui_charts import CandlestickChart +from docs.candlestick._data import PRE_STYLE, dates, ohlc_tuples + +component = html.Div( + [ + CandlestickChart( + id='candle-click', + series=[{ + 'data': ohlc_tuples[:15], + 'upColor': '#1976d2', + 'downColor': '#c62828', + }], + xAxis=[{'data': dates[:15]}], + yAxis=[{'label': 'Price ($)'}], + grid={'horizontal': True}, + height=380, + ), + html.P("clickData:", style={'fontSize': '12px', + 'color': 'var(--mantine-color-dimmed)', + 'marginTop': '12px', + 'marginBottom': '4px'}), + html.Pre(id='candle-click-out', children='Click a candle...', + style=PRE_STYLE), + ] +) + + +@callback( + Output('candle-click-out', 'children'), + Input('candle-click', 'clickData'), + prevent_initial_call=True, +) +def show_candle_click(data): + if not data: + return 'Click a candle...' + return json.dumps(data, indent=2) diff --git a/docs/candlestick/dataset_example.py b/docs/candlestick/dataset_example.py new file mode 100644 index 0000000..e295618 --- /dev/null +++ b/docs/candlestick/dataset_example.py @@ -0,0 +1,17 @@ +from dash_mui_charts import CandlestickChart +from docs.candlestick._data import ohlc_dataset + +component = CandlestickChart( + id='candle-dataset', + dataset=ohlc_dataset, + series=[{ + 'datasetKeys': {'open': 'open', 'high': 'high', 'low': 'low', + 'close': 'close'}, + 'upColor': '#26a69a', + 'downColor': '#ef5350', + }], + xAxis=[{'dataKey': 'date', 'label': 'Date'}], + yAxis=[{'label': 'Price ($)'}], + grid={'horizontal': True}, + height=400, +) diff --git a/docs/candlestick/no_tooltip_example.py b/docs/candlestick/no_tooltip_example.py new file mode 100644 index 0000000..442d7b6 --- /dev/null +++ b/docs/candlestick/no_tooltip_example.py @@ -0,0 +1,15 @@ +from dash_mui_charts import CandlestickChart +from docs.candlestick._data import dates, ohlc_tuples + +component = CandlestickChart( + id='candle-no-tooltip', + series=[{ + 'data': ohlc_tuples[:10], + 'upColor': '#7b1fa2', + 'downColor': '#e65100', + }], + xAxis=[{'data': dates[:10]}], + tooltip={'trigger': 'none'}, + grid={'horizontal': True}, + height=300, +) diff --git a/docs/candlestick/refs_example.py b/docs/candlestick/refs_example.py new file mode 100644 index 0000000..fa6688b --- /dev/null +++ b/docs/candlestick/refs_example.py @@ -0,0 +1,40 @@ +from dash_mui_charts import CandlestickChart +from docs.candlestick._data import dates, ohlc_tuples + +component = CandlestickChart( + id='candle-refs', + series=[{ + 'data': ohlc_tuples, + 'upColor': '#4caf50', + 'downColor': '#f44336', + }], + xAxis=[{'data': dates}], + yAxis=[{'label': 'Price ($)'}], + referenceLines=[ + { + 'y': max(d[1] for d in ohlc_tuples), + 'label': 'Resistance', + 'labelAlign': 'end', + 'lineStyle': {'stroke': '#f44336', 'strokeWidth': 1.5, + 'strokeDasharray': '6 4'}, + 'labelStyle': {'fill': '#f44336', 'fontSize': 11}, + }, + { + 'y': min(d[2] for d in ohlc_tuples), + 'label': 'Support', + 'labelAlign': 'end', + 'lineStyle': {'stroke': '#4caf50', 'strokeWidth': 1.5, + 'strokeDasharray': '6 4'}, + 'labelStyle': {'fill': '#4caf50', 'fontSize': 11}, + }, + { + 'y': sum(d[3] for d in ohlc_tuples) / len(ohlc_tuples), + 'label': 'Avg Close', + 'labelAlign': 'start', + 'lineStyle': {'stroke': '#ff9800', 'strokeWidth': 1}, + 'labelStyle': {'fill': '#ff9800', 'fontSize': 11}, + }, + ], + grid={'horizontal': True}, + height=420, +) diff --git a/docs/candlestick/styled_example.py b/docs/candlestick/styled_example.py new file mode 100644 index 0000000..6c4baa7 --- /dev/null +++ b/docs/candlestick/styled_example.py @@ -0,0 +1,17 @@ +from dash_mui_charts import CandlestickChart +from docs.candlestick._data import dates, ohlc_tuples + +component = CandlestickChart( + id='candle-styled', + series=[{ + 'data': ohlc_tuples[:15], + 'upColor': '#00bcd4', + 'downColor': '#ff5722', + }], + xAxis=[{'data': dates[:15]}], + yAxis=[{'label': 'Price'}], + bodyWidthRatio=0.8, + wickWidth=3, + grid={'horizontal': True, 'vertical': True}, + height=380, +) diff --git a/docs/candlestick/volume_example.py b/docs/candlestick/volume_example.py new file mode 100644 index 0000000..27f3293 --- /dev/null +++ b/docs/candlestick/volume_example.py @@ -0,0 +1,20 @@ +from dash_mui_charts import CandlestickChart +from docs.candlestick._data import ohlc_dataset + +component = CandlestickChart( + id='candle-volume', + dataset=ohlc_dataset, + series=[{ + 'datasetKeys': {'open': 'open', 'high': 'high', 'low': 'low', + 'close': 'close'}, + 'volumeKey': 'volume', + 'upColor': '#4caf50', + 'downColor': '#f44336', + }], + xAxis=[{'dataKey': 'date'}], + yAxis=[{'label': 'Price ($)'}], + showVolume=True, + volumeHeightRatio=0.3, + grid={'horizontal': True}, + height=450, +) diff --git a/docs/composite/composite.md b/docs/composite/composite.md new file mode 100644 index 0000000..c37023d --- /dev/null +++ b/docs/composite/composite.md @@ -0,0 +1,118 @@ +--- +name: Composite Chart (0.0.8) +description: "CompositeChart demos layering scatter and line series on one surface: trend overlays, reference lines, multi-axis charts and Pro zoom with slider preview." +endpoint: /composite +package: dash_mui_charts +category: CompositeChart +icon: mdi:layers-outline +--- + +.. llms_copy::Composite Chart (0.0.8) + +.. toc:: + +### Overview + +CompositeChart demos layering scatter and line series on one surface: trend overlays, reference lines, multi-axis charts and Pro zoom with slider preview. + + +`CompositeChart` layers multiple chart types — `type: 'scatter'` and +`type: 'line'` series — on a single surface using the MUI X Charts composition +API (`ChartDataProviderPro` + `ChartsSurface` + individual plot components). +Basic layering is **Community (free)**; zoom/pan, slider preview, and the +toolbar are **Pro** features that require a `licenseKey`. + +It ships a custom axis tooltip that shows both line and scatter data at the +hovered x-position (scatter matches by proximity, auto-computed from axis data +spacing), and epoch-ms values are converted to Date objects automatically on +`scaleType: 'time'` axes. + +### Basic scatter + line overlay + +```python +from dash_mui_charts import CompositeChart + +CompositeChart( + series=[ + {'type': 'scatter', 'id': 'readings', 'label': 'Sensor Readings', + 'data': [{'x': 0, 'y': 18.5, 'id': 0}], 'markerSize': 4}, + {'type': 'line', 'id': 'trend', 'label': 'Trend Line', + 'data': [20.0, 22.1], # positional values + 'curve': 'natural', 'showMark': False}, + ], + xAxis=[{'data': x_values, 'scaleType': 'linear'}], +) +``` + +### Zoom with slider preview (Pro) + +```python +CompositeChart( + licenseKey=MUI_PRO_LICENSE, + series=[ + {'type': 'line', 'id': 'baseline', 'data': values, 'area': True}, + {'type': 'scatter', 'id': 'anomalies', 'data': scatter_points, + 'markerSize': 6, + 'preview': {'markerSize': 2}, # marker size in the slider preview + 'highlightScope': {'highlight': 'item'}}, + ], + xAxis=[{ + 'data': timestamps, + 'scaleType': 'time', # epoch ms auto-converted to Date objects + 'zoom': {'slider': {'enabled': True, 'preview': True}}, + }], + initialZoom=[{'axisId': 'time-axis', 'start': 0, 'end': 30}], +) +``` + +### Multi-axis + +```python +CompositeChart( + series=[ + {'type': 'scatter', 'yAxisId': 'left-axis'}, + {'type': 'line', 'yAxisId': 'right-axis'}, + ], + yAxis=[ + {'id': 'left-axis', 'position': 'left'}, + {'id': 'right-axis', 'position': 'right'}, + ], +) +``` + +### Reference lines + +```python +CompositeChart( + referenceLines=[ + {'y': 28, 'label': 'Upper Limit', 'lineStyle': {'stroke': 'red'}}, + {'y': 16, 'label': 'Lower Limit', 'lineStyle': {'stroke': 'red'}}, + ], +) +``` + +### Related pages + +- `/composite` — this demo (overlays, reference lines, multi-axis, Pro zoom) +- `/composite-v120` — v1.2.0 axis tooltip fix, highlightedAxis, cross-chart sync +- `/composite-render-bp` — rendering best practices for large time ranges +- `/scatter` — standalone ScatterChart + +.. admonition::Pro component demos + :icon: mdi:diamond-outline + :color: orange + + The examples on this page read a **MUI X Pro license key** from the + `MUI_PRO_API_KEY` environment variable and pass it as `licenseKey`. + Without it the charts render with the unlicensed watermark. + +--- + +### Live examples + +.. exec::docs.composite.demo + :code: false + +.. source::docs/composite/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/composite.py b/docs/composite/demo.py similarity index 96% rename from pages/composite.py rename to docs/composite/demo.py index bcf55d1..a78ca97 100644 --- a/pages/composite.py +++ b/docs/composite/demo.py @@ -1,19 +1,14 @@ -""" -CompositeChart Demo - 0.0.8 -Showcases layering scatter and line charts together using the composition API. -""" +"""Composite Chart demo — rendered on /composite via `.. exec::`. +Ported verbatim from the pre-migration pages/composite.py (same ids, same callbacks). +""" import os import json import math import random - -import dash import dash_mantine_components as dmc from dash import html, callback, Input, Output -dash.register_page(__name__, path='/composite', name='Composite Chart (0.0.8)') - from dash_mui_charts import CompositeChart # Get license key from environment @@ -116,18 +111,7 @@ } ) -layout = html.Div([ - html.Div([ - html.H1("Composite Chart", style={'display': 'inline'}), - new_badge, - ]), - html.P( - "New in 0.0.8: CompositeChart layers scatter and line plots on a single surface. " - "Each series specifies its type ('scatter' or 'line'). Supports zoom, reference lines, " - "and multi-axis configurations.", - style={'fontSize': '16px', 'color': 'var(--mantine-color-dimmed)', 'marginBottom': '30px'} - ), - +component = html.Div([ # ========================================================================== # 1. Scatter + Trend Line # ========================================================================== @@ -583,4 +567,4 @@ def update_anomaly_marker_size(marker_size, preview_size): def display_composite_click(click_data): if click_data: return json.dumps(click_data, indent=2) - return "Click on a point to see event data" \ No newline at end of file + return "Click on a point to see event data" diff --git a/docs/composite_render_bp/composite-render-bp.md b/docs/composite_render_bp/composite-render-bp.md new file mode 100644 index 0000000..8fb6688 --- /dev/null +++ b/docs/composite_render_bp/composite-render-bp.md @@ -0,0 +1,35 @@ +--- +name: Composite Render BP +description: "Best-practice CompositeChart rendering for stacked discharge/temperature/pressure dashboards across 7d-live to 1yr+ date ranges (~2k to 150k+ points)." +endpoint: /composite-render-bp +package: dash_mui_charts +category: CompositeChart +icon: mdi:speedometer +--- + +.. llms_copy::Composite Render BP + +.. toc:: + +### Overview + +Best-practice CompositeChart rendering for stacked discharge/temperature/pressure dashboards across 7d-live to 1yr+ date ranges (~2k to 150k+ points). + +.. admonition::Pro component demos + :icon: mdi:diamond-outline + :color: orange + + The examples on this page read a **MUI X Pro license key** from the + `MUI_PRO_API_KEY` environment variable and pass it as `licenseKey`. + Without it the charts render with the unlicensed watermark. + +--- + +### Live examples + +.. exec::docs.composite_render_bp.demo + :code: false + +.. source::docs/composite_render_bp/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/composit_render_bp.py b/docs/composite_render_bp/demo.py similarity index 98% rename from pages/composit_render_bp.py rename to docs/composite_render_bp/demo.py index dc31b73..050dfa2 100644 --- a/pages/composit_render_bp.py +++ b/docs/composite_render_bp/demo.py @@ -1,24 +1,14 @@ -""" -Composite Render Best Practices -Optimal rendering of stacked Discharge Time / Temperature / Pressure dashboards -across different date ranges: 7d (LIVE), 30d, 3mo, 6mo, 1yr, 1yr+. +"""Composite Render BP demo — rendered on /composite-render-bp via `.. exec::`. -Each range uses tuned tick spacing, date formatting, marker visibility, and -chart heights to produce the best visual density for that data volume. -Equipment pings every ~5 minutes; data scales from ~2k to ~150k+ points. +Ported verbatim from the pre-migration pages/composit_render_bp.py (same ids, same callbacks). """ - import os import math import random from datetime import datetime, timedelta - -import dash import dash_mantine_components as dmc from dash import html, dcc, callback, Input, Output, State, ctx, no_update -dash.register_page(__name__, path='/composite-render-bp', name='Composite Render BP') - from dash_mui_charts import CompositeChart MUI_LICENSE_KEY = os.environ.get('MUI_PRO_API_KEY', '') @@ -477,7 +467,7 @@ def build_live_7d_section(): # --------------------------------------------------------------------------- # Layout — lightweight shell; heavy chart sections loaded via callback # --------------------------------------------------------------------------- -layout = dmc.Box( +component = dmc.Box( pos="relative", children=[ dmc.LoadingOverlay( diff --git a/docs/composite_v120/composite-v120.md b/docs/composite_v120/composite-v120.md new file mode 100644 index 0000000..3f82de3 --- /dev/null +++ b/docs/composite_v120/composite-v120.md @@ -0,0 +1,35 @@ +--- +name: CompositeChart v1.2.0 +description: "CompositeChart v1.2.0 demos: the axis tooltip fix, the highlightedAxis output, and cross-chart crosshair sync up to a 3-chart stacked dashboard." +endpoint: /composite-v120 +package: dash_mui_charts +category: CompositeChart +icon: mdi:layers-plus +--- + +.. llms_copy::CompositeChart v1.2.0 + +.. toc:: + +### Overview + +CompositeChart v1.2.0 demos: the axis tooltip fix, the highlightedAxis output, and cross-chart crosshair sync up to a 3-chart stacked dashboard. + +.. admonition::Pro component demos + :icon: mdi:diamond-outline + :color: orange + + The examples on this page read a **MUI X Pro license key** from the + `MUI_PRO_API_KEY` environment variable and pass it as `licenseKey`. + Without it the charts render with the unlicensed watermark. + +--- + +### Live examples + +.. exec::docs.composite_v120.demo + :code: false + +.. source::docs/composite_v120/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/composite_v120.py b/docs/composite_v120/demo.py similarity index 96% rename from pages/composite_v120.py rename to docs/composite_v120/demo.py index 13f1318..17e6a68 100644 --- a/pages/composite_v120.py +++ b/docs/composite_v120/demo.py @@ -1,19 +1,14 @@ -""" -CompositeChart v1.2.0 Changes Demo -Demonstrates: axis tooltip fix, highlightedAxis, syncedTooltipIndex cross-chart sync. -""" +"""CompositeChart v1.2.0 demo — rendered on /composite-v120 via `.. exec::`. +Ported verbatim from the pre-migration pages/composite_v120.py (same ids, same callbacks). +""" import os import json import math import random from datetime import datetime, timedelta - -import dash import dash_mantine_components as dmc -from dash import html, callback, Input, Output, State, ctx, no_update - -dash.register_page(__name__, path='/composite-v120', name='CompositeChart v1.2.0') +from dash import html, callback, Input, Output, State, ctx from dash_mui_charts import CompositeChart @@ -84,17 +79,7 @@ 'verticalAlign': 'middle', } -layout = html.Div([ - html.Div([ - html.H1("CompositeChart v1.2.0", style={'display': 'inline'}), - html.Span("1.2.0", style=badge_style), - ]), - html.P( - "v1.2.0 fixes axis tooltip behavior for mixed series (line + scatter) and adds " - "highlightedAxis / syncedTooltipIndex controlled props for cross-chart synchronization.", - style={'fontSize': '16px', 'color': 'var(--mantine-color-dimmed)', 'marginBottom': '30px'}, - ), - +component = html.Div([ # ====================================================================== # 1. Axis Tooltip Fix (the core bug fix) # ====================================================================== diff --git a/docs/crosshair/crosshair.md b/docs/crosshair/crosshair.md new file mode 100644 index 0000000..4e79c3d --- /dev/null +++ b/docs/crosshair/crosshair.md @@ -0,0 +1,35 @@ +--- +name: Crosshair Explorer +description: "CompositeChart crosshair tracking with live coordinate readout, right-click alert placement, and a synced three-chart dashboard with HoverCard-managed alerts." +endpoint: /crosshair +package: dash_mui_charts +category: LineChart +icon: mdi:crosshairs-gps +--- + +.. llms_copy::Crosshair Explorer + +.. toc:: + +### Overview + +CompositeChart crosshair tracking with live coordinate readout, right-click alert placement, and a synced three-chart dashboard with HoverCard-managed alerts. + +.. admonition::Pro component demos + :icon: mdi:diamond-outline + :color: orange + + The examples on this page read a **MUI X Pro license key** from the + `MUI_PRO_API_KEY` environment variable and pass it as `licenseKey`. + Without it the charts render with the unlicensed watermark. + +--- + +### Live examples + +.. exec::docs.crosshair.demo + :code: false + +.. source::docs/crosshair/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/crosshair.py b/docs/crosshair/demo.py similarity index 97% rename from pages/crosshair.py rename to docs/crosshair/demo.py index fa29b0a..8eee8dd 100644 --- a/pages/crosshair.py +++ b/docs/crosshair/demo.py @@ -1,21 +1,15 @@ -""" -Crosshair Explorer -Demonstrates crosshair tracking, right-click alert placement with inline -HoverCard management anchored to reference lines on the chart edge. -""" +"""Crosshair Explorer demo — rendered on /crosshair via `.. exec::`. +Ported verbatim from the pre-migration pages/crosshair.py (same ids, same callbacks). +""" import os import math import random from datetime import datetime, timedelta - -import dash import dash_mantine_components as dmc from dash import html, dcc, callback, Input, Output, State, ctx, no_update, ALL from dash_iconify import DashIconify -dash.register_page(__name__, path='/crosshair', name='Crosshair Explorer') - from dash_mui_charts import CompositeChart MUI_LICENSE_KEY = os.environ.get('MUI_PRO_API_KEY', '') @@ -212,15 +206,7 @@ def _build_ref_lines(alerts): # --------------------------------------------------------------------------- # Layout # --------------------------------------------------------------------------- -layout = html.Div([ - html.H1("Crosshair Explorer"), - html.P( - "Crosshair tracking reports pointer position in data coordinates. " - "Right-click to place alerts as reference lines — hover the tag on the " - "chart edge to manage trigger conditions or remove the alert.", - style={'fontSize': '15px', 'color': 'var(--mantine-color-dimmed)', 'marginBottom': '25px'}, - ), - +component = html.Div([ # ================================================================== # 1. Position tracking # ================================================================== @@ -445,6 +431,8 @@ def s2_render(alerts): SEC3_KEYS = ['temp', 'pressure', 'humidity'] # Crosshair sync + + @callback( *[Output(cid, 'highlightedAxis') for cid in SEC3_IDS], *[Output(cid, 'syncedTooltipIndex') for cid in SEC3_IDS], diff --git a/docs/heatmap-props/heatmap-props.md b/docs/heatmap-props/heatmap-props.md new file mode 100644 index 0000000..18864f7 --- /dev/null +++ b/docs/heatmap-props/heatmap-props.md @@ -0,0 +1,44 @@ +--- +name: Heatmap Props +description: "Interactive Heatmap props playground (MUI X Pro): live controls for color scale, dimensions, cell style, interactions and margins on a 5x5 grid." +endpoint: /heatmap-props +package: dash_mui_charts +category: Heatmap +icon: mdi:tune-vertical +--- + +.. llms_copy::Heatmap Props + +.. toc:: + +### Overview + +An interactive control panel for exploring and customizing `Heatmap` +props on a 5×5 grid — changes reflect in real time, and the generated +code panel writes the exact `Heatmap(...)` call for the current settings. + +.. admonition::Pro component + :icon: mdi:diamond-outline + :color: orange + + Heatmap is a **MUI X Pro** component. These demos read the license key + from the `MUI_PRO_API_KEY` environment variable; without it the chart + renders with the unlicensed watermark and the playground shows a + warning banner. + +--- + +### Playground + +.. exec::docs.heatmap-props.playground + :code: false + +.. source::docs/heatmap-props/playground.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Related pages + +- [Heatmap examples](/heatmap) — activity grids, correlation matrix, color scales, click interaction diff --git a/pages/heatmap_props.py b/docs/heatmap-props/playground.py similarity index 95% rename from pages/heatmap_props.py rename to docs/heatmap-props/playground.py index fb17d2f..6e30ab6 100644 --- a/pages/heatmap_props.py +++ b/docs/heatmap-props/playground.py @@ -1,23 +1,16 @@ -""" -Heatmap Props Playground +"""Heatmap props playground — MUI X Pro, live controls on a 5x5 grid. -Interactive control panel for exploring and customizing Heatmap component properties. -Uses dash-mantine-components for the control panel UI. +Rendered on /heatmap-props via `.. exec::`; ported verbatim from the +pre-migration pages/heatmap_props.py (same ids, same callbacks). """ -import os import json -import dash -from dash import html, callback, Input, Output, State, dcc +import os + +from dash import html, callback, Input, Output, dcc import dash_mantine_components as dmc from dash_mui_charts import Heatmap -dash.register_page( - __name__, - path='/heatmap-props', - name='Heatmap Props' -) - # Get license key from environment MUI_LICENSE_KEY = os.environ.get('MUI_PRO_API_KEY', '') @@ -60,17 +53,7 @@ def create_control_card(title, children): ) -layout = html.Div([ - # Header - html.Div([ - html.H1('Heatmap Props Playground'), - html.P( - 'Interactively explore and customize Heatmap component properties. ' - 'Changes are reflected in real-time.', - style={'color': 'var(--mantine-color-dimmed)', 'marginBottom': '30px'} - ), - ]), - +component = html.Div([ # Pro License Warning (if no key) html.Div([ dmc.Paper( @@ -499,32 +482,32 @@ def update_heatmap( code_lines.append(f" yAxis={{'data': {Y_LABELS}}},") code_lines.append(f' width={width},') code_lines.append(f' height={height},') - code_lines.append(f' colorScale={{') + code_lines.append(' colorScale={') code_lines.append(f" 'type': '{scale_type}',") code_lines.append(f" 'min': {min_value},") code_lines.append(f" 'max': {max_value},") code_lines.append(f" 'colors': ['{min_color}', '{max_color}'],") - code_lines.append(f' }},') + code_lines.append(' },') if cell_style_prop: - code_lines.append(f' cellStyle={{') + code_lines.append(' cellStyle={') code_lines.append(f" 'gap': {gap},") code_lines.append(f" 'borderRadius': {border_radius},") code_lines.append(f" 'showValue': {show_values},") code_lines.append(f" 'fontSize': {font_size},") code_lines.append(f" 'textColor': '{text_color}',") - code_lines.append(f' }},') + code_lines.append(' },') if highlight_scope: - code_lines.append(f" highlightScope={{'highlight': 'item'}},") + code_lines.append(" highlightScope={'highlight': 'item'},") if hide_legend: - code_lines.append(f' hideLegend=True,') + code_lines.append(' hideLegend=True,') - code_lines.append(f' margin={{') + code_lines.append(' margin={') code_lines.append(f" 'top': {margin_top}, 'right': {margin_right},") code_lines.append(f" 'bottom': {margin_bottom}, 'left': {margin_left},") - code_lines.append(f' }},') + code_lines.append(' },') code_lines.append(')') code = '\n'.join(code_lines) diff --git a/docs/heatmap/_data.py b/docs/heatmap/_data.py new file mode 100644 index 0000000..e90bdca --- /dev/null +++ b/docs/heatmap/_data.py @@ -0,0 +1,44 @@ +"""Shared demo datasets for the Heatmap examples — one definition, used by +every section, exactly as the pre-migration page defined them.""" + +# Weekly activity (7 days x 4 weeks) +days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] +weeks = ['Week 1', 'Week 2', 'Week 3', 'Week 4'] + +# Activity data as [x_index, y_index, value] +activity_data = [ + # Week 1 + [0, 0, 8], [1, 0, 7], [2, 0, 9], [3, 0, 6], [4, 0, 5], [5, 0, 2], [6, 0, 1], + # Week 2 + [0, 1, 7], [1, 1, 8], [2, 1, 8], [3, 1, 9], [4, 1, 6], [5, 1, 3], [6, 1, 2], + # Week 3 + [0, 2, 9], [1, 2, 8], [2, 2, 7], [3, 2, 8], [4, 2, 7], [5, 2, 4], [6, 2, 3], + # Week 4 + [0, 3, 6], [1, 3, 7], [2, 3, 8], [3, 3, 9], [4, 3, 8], [5, 3, 5], [6, 3, 2], +] + +# Correlation matrix data +variables = ['Revenue', 'Users', 'Sessions', 'Conversion', 'Bounce Rate'] +correlation_data = [ + [0, 0, 1.00], [1, 0, 0.85], [2, 0, 0.78], [3, 0, 0.65], [4, 0, -0.42], + [0, 1, 0.85], [1, 1, 1.00], [2, 1, 0.92], [3, 1, 0.58], [4, 1, -0.55], + [0, 2, 0.78], [1, 2, 0.92], [2, 2, 1.00], [3, 2, 0.48], [4, 2, -0.62], + [0, 3, 0.65], [1, 3, 0.58], [2, 3, 0.48], [3, 3, 1.00], [4, 3, -0.38], + [0, 4, -0.42], [1, 4, -0.55], [2, 4, -0.62], [3, 4, -0.38], [4, 4, 1.00], +] + +# Temperature data (hours x days) +hours = ['6am', '9am', '12pm', '3pm', '6pm', '9pm'] +temp_days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'] +temperature_data = [ + # Monday + [0, 0, 58], [0, 1, 65], [0, 2, 72], [0, 3, 75], [0, 4, 70], [0, 5, 62], + # Tuesday + [1, 0, 55], [1, 1, 62], [1, 2, 70], [1, 3, 73], [1, 4, 68], [1, 5, 60], + # Wednesday + [2, 0, 60], [2, 1, 68], [2, 2, 78], [2, 3, 82], [2, 4, 76], [2, 5, 65], + # Thursday + [3, 0, 62], [3, 1, 70], [3, 2, 80], [3, 3, 85], [3, 4, 78], [3, 5, 68], + # Friday + [4, 0, 58], [4, 1, 66], [4, 2, 74], [4, 3, 78], [4, 4, 72], [4, 5, 64], +] diff --git a/docs/heatmap/basic_example.py b/docs/heatmap/basic_example.py new file mode 100644 index 0000000..d9a0971 --- /dev/null +++ b/docs/heatmap/basic_example.py @@ -0,0 +1,44 @@ +import os + +from dash import html + +from dash_mui_charts import Heatmap +from docs.heatmap._data import activity_data, days, weeks + +MUI_LICENSE_KEY = os.environ.get('MUI_PRO_API_KEY', '') + +component = html.Div( + [ + # The Pro degradation banner: rendered only when no license key is + # configured, so a keyless deployment says WHY the charts carry the + # unlicensed watermark. tests/test_pages_smoke.py asserts this. + html.Div( + html.P( + "This feature requires an MUI X Pro license key. " + "Set your license key in the MUI_PRO_API_KEY environment " + "variable.", + style={ + 'backgroundColor': '#fff3e0', + 'padding': '12px 16px', + 'borderRadius': '4px', + 'borderLeft': '4px solid #ff9800', + 'marginBottom': '20px', + }, + ) + ) if not MUI_LICENSE_KEY else None, + Heatmap( + id='basic-heatmap', + licenseKey=MUI_LICENSE_KEY, + data=activity_data, + xAxis={'data': days, 'label': 'Day of Week'}, + yAxis={'data': weeks, 'label': 'Week'}, + height=300, + colorScale={ + 'type': 'continuous', + 'min': 0, + 'max': 10, + 'colors': ['#e3f2fd', '#1565c0'], + }, + ), + ] +) diff --git a/docs/heatmap/correlation_example.py b/docs/heatmap/correlation_example.py new file mode 100644 index 0000000..b9f48a7 --- /dev/null +++ b/docs/heatmap/correlation_example.py @@ -0,0 +1,23 @@ +import os + +from dash_mui_charts import Heatmap +from docs.heatmap._data import correlation_data, variables + +MUI_LICENSE_KEY = os.environ.get('MUI_PRO_API_KEY', '') + +# Correlation values range from -1 to 1 — a diverging red-white-blue scale. +component = Heatmap( + id='correlation-heatmap', + licenseKey=MUI_LICENSE_KEY, + data=correlation_data, + xAxis={'data': variables}, + yAxis={'data': variables}, + height=400, + colorScale={ + 'type': 'continuous', + 'min': -1, + 'max': 1, + 'colors': ['#d32f2f', '#fff', '#1976d2'], # Red to White to Blue + }, + margin={'left': 100, 'right': 20, 'top': 20, 'bottom': 80}, +) diff --git a/docs/heatmap/custom_cells_example.py b/docs/heatmap/custom_cells_example.py new file mode 100644 index 0000000..db1e049 --- /dev/null +++ b/docs/heatmap/custom_cells_example.py @@ -0,0 +1,30 @@ +import os + +from dash_mui_charts import Heatmap +from docs.heatmap._data import activity_data, days, weeks + +MUI_LICENSE_KEY = os.environ.get('MUI_PRO_API_KEY', '') + +component = Heatmap( + id='custom-cell-heatmap', + licenseKey=MUI_LICENSE_KEY, + data=activity_data, + xAxis={'data': days}, + yAxis={'data': weeks}, + height=300, + colorScale={ + 'type': 'continuous', + 'min': 0, + 'max': 10, + 'colors': ['#fce4ec', '#c2185b'], # Pink gradient + }, + cellStyle={ + 'gap': 6, # Space between cells + 'borderRadius': 8, # Rounded corners + 'showValue': True, # Display value in cell + 'fontSize': 14, # Text size + 'fontWeight': 600, # Text weight + 'textColor': '#ffffff', # Text color + }, + highlightScope={'highlight': 'item'}, +) diff --git a/docs/heatmap/heatmap.md b/docs/heatmap/heatmap.md new file mode 100644 index 0000000..9daae76 --- /dev/null +++ b/docs/heatmap/heatmap.md @@ -0,0 +1,168 @@ +--- +name: Heatmap +description: "Heatmap (MUI X Pro) demos: activity grids, a correlation matrix, continuous and piecewise color scales, custom cell styling and click interaction." +endpoint: /heatmap +package: dash_mui_charts +category: Heatmap +icon: mdi:grid +--- + +.. llms_copy::Heatmap + +.. toc:: + +### Overview + +`Heatmap` renders matrix/grid visualizations with color-coded cells, +wrapping the MUI X Charts Pro heatmap for Plotly Dash. + +Cells are addressed by x/y index against categorical axis labels, and each +cell's color is derived from its value through a color scale (continuous +or piecewise). Cell clicks flow back to Dash as `clickData` with x, y, and +value. + +.. admonition::Pro component + :icon: mdi:diamond-outline + :color: orange + + Heatmap is a **MUI X Pro** component — a Pro license key is required, + passed via the `licenseKey` prop. These demos read it from the + `MUI_PRO_API_KEY` environment variable; without it the charts render + with the unlicensed watermark. + +```python +# Data format: [x_index, y_index, value] triples +from dash_mui_charts import Heatmap + +Heatmap( + id='my-heatmap', + licenseKey=MUI_LICENSE_KEY, + data=[[0, 0, 10], [0, 1, 20], [1, 0, 40], [1, 1, 50]], + xAxis={'data': ['Mon', 'Tue'], 'label': 'Day'}, + yAxis={'data': ['Week 1', 'Week 2'], 'label': 'Week'}, + height=300, + colorScale={ + 'type': 'continuous', + 'min': 0, + 'max': 100, + 'colors': ['#e3f2fd', '#1976d2'], + }, +) +``` + +--- + +### Basic heatmap + +A simple heatmap showing weekly activity levels. Data is provided as +`[x_index, y_index, value]` tuples. + +.. exec::docs.heatmap.basic_example + :code: false + +.. source::docs/heatmap/basic_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Correlation matrix + +Heatmaps are ideal for displaying correlation matrices. Use a diverging +color scale to show positive and negative correlations. + +.. exec::docs.heatmap.correlation_example + :code: false + +.. source::docs/heatmap/correlation_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Temperature heatmap + +A practical example showing hourly temperatures across the week, with a +warm color scale from cool (blue) to hot (red). + +.. exec::docs.heatmap.temperature_example + :code: false + +.. source::docs/heatmap/temperature_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Custom rounded cells + +Use `cellStyle='rounded'` for cells with gaps, rounded corners, and value +labels. + +.. exec::docs.heatmap.rounded_example + :code: false + +.. source::docs/heatmap/rounded_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Custom cell configuration + +Fine-tune cell appearance with custom gap, border radius, font size, and +colors. + +.. exec::docs.heatmap.custom_cells_example + :code: false + +.. source::docs/heatmap/custom_cells_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Piecewise color scale + +Use a piecewise color scale for discrete color bands — useful for +categorizing values into ranges (Low, Medium, High). + +.. exec::docs.heatmap.piecewise_example + :code: false + +.. source::docs/heatmap/piecewise_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Interactive heatmap + +Click on cells to see their data — the heatmap reports click events with +x, y coordinates and value. + +.. exec::docs.heatmap.interactive_example + :code: false + +.. source::docs/heatmap/interactive_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Color scale reference + +| Type | Configuration | Use case | +|------|---------------|----------| +| Continuous | `{'type': 'continuous', 'min': 0, 'max': 100, 'colors': ['#low', '#high']}` | Smooth gradient for numerical data | +| Diverging | `{'type': 'continuous', 'min': -1, 'max': 1, 'colors': ['#neg', '#mid', '#pos']}` | Correlations, deviations from center | +| Piecewise | `{'type': 'piecewise', 'thresholds': [a, b, c], 'colors': ['#1', '#2', '#3', '#4']}` | Categorical ranges (Low/Med/High) | + +Piecewise thresholds `[3, 5, 7]` create four bands (0–2, 3–4, 5–6, 7+) and +need `len(thresholds) + 1` colors. + +--- + +### Related pages + +- [Props Explorer](/heatmap-props) — interactive props playground with live controls diff --git a/docs/heatmap/interactive_example.py b/docs/heatmap/interactive_example.py new file mode 100644 index 0000000..5de94fa --- /dev/null +++ b/docs/heatmap/interactive_example.py @@ -0,0 +1,53 @@ +import json +import os + +from dash import Input, Output, callback, html + +from dash_mui_charts import Heatmap +from docs.heatmap._data import activity_data, days, weeks + +MUI_LICENSE_KEY = os.environ.get('MUI_PRO_API_KEY', '') + +component = html.Div( + [ + Heatmap( + id='interactive-heatmap', + licenseKey=MUI_LICENSE_KEY, + data=activity_data, + xAxis={'data': days, 'label': 'Day'}, + yAxis={'data': weeks, 'label': 'Week'}, + height=300, + colorScale={ + 'type': 'continuous', + 'min': 0, + 'max': 10, + 'colors': ['#fff3e0', '#ff9800'], + }, + ), + html.H4("Click Data:", style={'marginTop': '20px'}), + html.Pre( + id='heatmap-click-output', + children="Click on a cell to see its data", + style={ + 'backgroundColor': '#f5f5f5', + 'padding': '15px', + 'borderRadius': '5px', + 'whiteSpace': 'pre-wrap', + 'fontSize': '12px', + 'overflow': 'auto', + }, + ), + ] +) + + +@callback( + Output('heatmap-click-output', 'children'), + Input('interactive-heatmap', 'clickData'), + prevent_initial_call=True +) +def display_click(click_data): + """Display clicked cell data from heatmap.""" + if click_data: + return json.dumps(click_data, indent=2) + return "Click on a cell to see its data" diff --git a/docs/heatmap/piecewise_example.py b/docs/heatmap/piecewise_example.py new file mode 100644 index 0000000..0af5221 --- /dev/null +++ b/docs/heatmap/piecewise_example.py @@ -0,0 +1,46 @@ +import os + +from dash import html + +from dash_mui_charts import Heatmap +from docs.heatmap._data import activity_data, days, weeks + +MUI_LICENSE_KEY = os.environ.get('MUI_PRO_API_KEY', '') + +component = html.Div( + [ + Heatmap( + id='piecewise-heatmap', + licenseKey=MUI_LICENSE_KEY, + data=activity_data, + xAxis={'data': days}, + yAxis={'data': weeks}, + height=300, + colorScale={ + 'type': 'piecewise', + 'thresholds': [3, 5, 7], # Creates 4 color bands + 'colors': ['#e8f5e9', '#81c784', '#43a047', '#1b5e20'], + }, + ), + html.Div( + [ + html.Span("Legend: ", style={'fontWeight': 'bold', + 'marginRight': '10px'}), + html.Span("0-2 (Low) ", + style={'backgroundColor': '#e8f5e9', + 'padding': '2px 8px', 'marginRight': '5px'}), + html.Span("3-4 ", + style={'backgroundColor': '#81c784', + 'padding': '2px 8px', 'marginRight': '5px'}), + html.Span("5-6 ", + style={'backgroundColor': '#43a047', + 'padding': '2px 8px', 'marginRight': '5px', + 'color': 'white'}), + html.Span("7+ (High)", + style={'backgroundColor': '#1b5e20', + 'padding': '2px 8px', 'color': 'white'}), + ], + style={'marginTop': '15px'}, + ), + ] +) diff --git a/docs/heatmap/rounded_example.py b/docs/heatmap/rounded_example.py new file mode 100644 index 0000000..ef4ab32 --- /dev/null +++ b/docs/heatmap/rounded_example.py @@ -0,0 +1,23 @@ +import os + +from dash_mui_charts import Heatmap +from docs.heatmap._data import activity_data, days, weeks + +MUI_LICENSE_KEY = os.environ.get('MUI_PRO_API_KEY', '') + +component = Heatmap( + id='rounded-heatmap', + licenseKey=MUI_LICENSE_KEY, + data=activity_data, + xAxis={'data': days, 'label': 'Day of Week'}, + yAxis={'data': weeks, 'label': 'Week'}, + height=300, + colorScale={ + 'type': 'continuous', + 'min': 0, + 'max': 10, + 'colors': ['#e8f5e9', '#2e7d32'], + }, + cellStyle='rounded', # Enable rounded corners with gap + highlightScope={'highlight': 'item'}, # Highlight on hover +) diff --git a/docs/heatmap/temperature_example.py b/docs/heatmap/temperature_example.py new file mode 100644 index 0000000..b450fbe --- /dev/null +++ b/docs/heatmap/temperature_example.py @@ -0,0 +1,21 @@ +import os + +from dash_mui_charts import Heatmap +from docs.heatmap._data import hours, temp_days, temperature_data + +MUI_LICENSE_KEY = os.environ.get('MUI_PRO_API_KEY', '') + +component = Heatmap( + id='temperature-heatmap', + licenseKey=MUI_LICENSE_KEY, + data=temperature_data, + xAxis={'data': temp_days, 'label': 'Day'}, + yAxis={'data': hours, 'label': 'Time'}, + height=350, + colorScale={ + 'type': 'continuous', + 'min': 50, + 'max': 90, + 'colors': ['#42a5f5', '#ffeb3b', '#f44336'], # Blue-Yellow-Red + }, +) diff --git a/pages/highlighting_sync.py b/docs/highlighting_sync/demo.py similarity index 97% rename from pages/highlighting_sync.py rename to docs/highlighting_sync/demo.py index 8a08c6f..31c69ed 100644 --- a/pages/highlighting_sync.py +++ b/docs/highlighting_sync/demo.py @@ -1,15 +1,13 @@ -""" -Highlighting Sync - Synchronized highlights across multiple charts -""" +"""Highlighting Sync demo — rendered on /highlighting-sync via `.. exec::`. +Ported verbatim from the pre-migration pages/highlighting_sync.py (same ids, same callbacks). +""" import os import json -import dash import dash_mantine_components as dmc +import dash from dash import html, callback, Input, Output, ctx -dash.register_page(__name__, path='/highlighting-sync', name='Highlighting Sync') - from dash_mui_charts import LineChart, PieChart # Get license key from environment @@ -75,14 +73,7 @@ 'color': 'var(--mantine-color-text)', } -layout = html.Div([ - html.H1("Synchronized Highlighting"), - html.P( - "This page demonstrates synchronized highlights across multiple charts. " - "Hovering over one chart highlights the corresponding data in other charts.", - style={'fontSize': '16px', 'color': 'var(--mantine-color-dimmed)', 'marginBottom': '20px'} - ), - +component = html.Div([ # ========================================================================== # LineChart + PieChart Sync # ========================================================================== @@ -411,6 +402,7 @@ def sync_charts_with_custom_tooltips(highlight_a, highlight_b): # Map category names to indices for pie chart CATEGORY_TO_INDEX = {cat.lower(): i for i, cat in enumerate(categories)} + @callback( Output('sync-line-chart', 'highlightedItem'), Output('sync-pie-chart', 'highlightedItem'), @@ -536,7 +528,7 @@ def get_profit_display(data_index): """Generate profit display for a given data index.""" if data_index is None or data_index < 0 or data_index >= len(months): return html.P("Hover over either chart to see monthly profit calculation", - style={'color': 'var(--mantine-color-dimmed)', 'margin': 0}) + style={'color': 'var(--mantine-color-dimmed)', 'margin': 0}) month = months[data_index] revenue = revenue_data[data_index] diff --git a/docs/highlighting_sync/highlighting-sync.md b/docs/highlighting_sync/highlighting-sync.md new file mode 100644 index 0000000..be9706a --- /dev/null +++ b/docs/highlighting_sync/highlighting-sync.md @@ -0,0 +1,35 @@ +--- +name: Highlighting Sync +description: "Synchronized highlighting across charts: hover one to highlight matching data in others — LineChart + PieChart and two LineCharts sharing highlightedItem state." +endpoint: /highlighting-sync +package: dash_mui_charts +category: LineChart +icon: mdi:sync +--- + +.. llms_copy::Highlighting Sync + +.. toc:: + +### Overview + +Synchronized highlighting across charts: hover one to highlight matching data in others — LineChart + PieChart and two LineCharts sharing highlightedItem state. + +.. admonition::Pro component demos + :icon: mdi:diamond-outline + :color: orange + + The examples on this page read a **MUI X Pro license key** from the + `MUI_PRO_API_KEY` environment variable and pass it as `licenseKey`. + Without it the charts render with the unlicensed watermark. + +--- + +### Live examples + +.. exec::docs.highlighting_sync.demo + :code: false + +.. source::docs/highlighting_sync/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/linechart_basic.py b/docs/linechart_basic/demo.py similarity index 97% rename from pages/linechart_basic.py rename to docs/linechart_basic/demo.py index 34041e9..635a52e 100644 --- a/pages/linechart_basic.py +++ b/docs/linechart_basic/demo.py @@ -1,15 +1,12 @@ -""" -LineChart Basics - Fundamental features and usage examples -""" +"""LineChart Basics demo — rendered on /linechart-basic via `.. exec::`. +Ported verbatim from the pre-migration pages/linechart_basic.py (same ids, same callbacks). +""" import os import json -import dash import dash_mantine_components as dmc from dash import html, callback, Input, Output -dash.register_page(__name__, path='/linechart-basic', name='LineChart Basics') - from dash_mui_charts import LineChart # Get license key from environment @@ -27,13 +24,7 @@ 'overflow': 'auto', } -layout = html.Div([ - html.H1("LineChart Basics"), - html.P( - "This page demonstrates the fundamental features of the LineChart component.", - style={'fontSize': '16px', 'color': '#666', 'marginBottom': '40px'} - ), - +component = html.Div([ # ========================================================================== # Basic Line Chart with Grid # ========================================================================== diff --git a/docs/linechart_basic/linechart-basic.md b/docs/linechart_basic/linechart-basic.md new file mode 100644 index 0000000..72d3db8 --- /dev/null +++ b/docs/linechart_basic/linechart-basic.md @@ -0,0 +1,145 @@ +--- +name: LineChart Basics +description: "Fundamentals of the LineChart Dash component: grid, area and stacked-area charts, curve interpolation, dual y-axes, and click-event callbacks." +endpoint: /linechart-basic +package: dash_mui_charts +category: LineChart +icon: mdi:chart-line +--- + +.. llms_copy::LineChart Basics + +.. toc:: + +### Overview + +Fundamentals of the LineChart Dash component: grid, area and stacked-area charts, curve interpolation, dual y-axes, and click-event callbacks. + + +`LineChart` is the line and area chart component of dash-mui-charts, a Plotly +Dash wrapper around MUI X Charts. It draws one or more line series with +optional area fill, stacking, curve interpolation, dual y-axes, grid lines, +reference lines, hover highlighting and click-event callbacks — all configured +from Python dicts. + +Core charting is Community tier (no license needed). Pro features require an +MUI X Pro license key passed as `licenseKey`: zoom/pan (`zoom`, `initialZoom`, +`zoomData` output), the zoom range slider (`showSlider`), brush range +selection (`brushConfig`) and the toolbar (`showToolbar`). + +### Basic usage + +```python +from dash_mui_charts import LineChart +LineChart( + height=350, + series=[ + {'data': [2, 5.5, 2, 8.5, 1.5, 5], 'label': 'Series A', 'showMark': True}, + {'data': [4, 3.5, 6, 2.5, 4.5, 3], 'label': 'Series B'}, + ], + xAxis=[{'data': [1, 2, 3, 4, 5, 6], 'scaleType': 'point'}], + grid={'horizontal': True, 'vertical': True}, +) +``` + +### Series options + +Each series dict supports `data` (y values, required), `label`, `color`, +`area` (fill under the line), `curve` ('linear', 'monotoneX', 'monotoneY', +'natural', 'step', 'stepBefore', 'stepAfter', 'catmullRom', 'bumpX', 'bumpY'), +`stack` (group id for stacked areas), `showMark`, and `yAxisId` for biaxial +charts (give each `yAxis` entry an `id` and a `position` of 'left' or +'right', then reference it from the series via `yAxisId`). + +### Reference lines + +Horizontal (`y`) or vertical (`x`) markers; on multi-axis charts, `axisId` +picks which axis the value refers to. + +```python +referenceLines=[ + {'y': 100, 'label': 'Target', 'labelAlign': 'end', + 'lineStyle': {'stroke': '#4caf50', 'strokeWidth': 2}}, + {'x': 'Q2', 'label': 'Launch', + 'lineStyle': {'stroke': '#f44336', 'strokeDasharray': '5 5'}}, +] +``` + +### Highlighting + +`highlightedItem` and `highlightedAxis` are controlled props (input and +output) for cross-chart sync. Per-series `highlightScope` sets hover behavior: +`highlight` 'none' | 'item' | 'series'; `fade` 'none' | 'series' | 'global'. + +```python +series=[{'id': 'sales', 'data': [1, 2, 3], 'showMark': True, + 'highlightScope': {'highlight': 'item', 'fade': 'global'}}], +tooltip={'trigger': 'item'}, +highlightedItem={'seriesId': 'sales', 'dataIndex': 2}, +``` + +### Pro: zoom and brush + +```python +LineChart( + licenseKey=MUI_PRO_LICENSE, + xAxis=[{'id': 'x', 'data': years, 'scaleType': 'point', + 'zoom': {'minSpan': 5, 'maxSpan': 100, 'panning': True}}], + showSlider=True, + initialZoom=[{'axisId': 'x', 'start': 0, 'end': 50}], + brushConfig={'enabled': True}, + brushOverlay='values', # 'none' | 'default' | 'values' + brushSeriesId='my-series', +) +# Current zoom state is reported via the zoomData output prop. +``` + +### Date formatting and functions-as-props + +For time-scale axes, `dateFormat` / `dateTickFormat` set tooltip and tick +label formats without JavaScript (tokens: YYYY, MMM, MM, M, dd, d, HH, mm). +For anything else, `valueFormatter` accepts `{'function': name, 'options': +{...}}` resolved from the `window.dashMuiChartsFunctions` registry defined in +`assets/*.js`. + +```python +xAxis=[{'data': epoch_ms_timestamps, 'scaleType': 'time', + 'dateFormat': 'M/d HH:mm', # tooltip labels + 'dateTickFormat': 'M/d'}] # tick labels +``` + +### Click events + +The `clickData` output prop reports `{'type': 'axis' | 'mark' | 'line' | +'area', 'seriesIndex', 'dataIndex', 'value', 'timestamp'}`; read it with a +Dash callback (`n_clicks` also increments per click). + +### Related pages + +- /linechart-pro — zoom, pan, slider and controlled zoom state (Pro) +- /linechart-brush — brush range selection and overlay types (Pro) +- /linechart-referencelines — reference line styling, spacing, multi-axis +- /linechart-highlighting — controlled highlights and highlightScope +- /linechart-tick-hover — ticks, tooltips and grid across date ranges +- /linechart-zoom-preview — zoom slider preview, zoomInteractionConfig +- /crosshair — crosshair tracking dashboard (CompositeChart) +- /highlighting-sync — synchronized highlights across multiple charts + +.. admonition::Pro component demos + :icon: mdi:diamond-outline + :color: orange + + The examples on this page read a **MUI X Pro license key** from the + `MUI_PRO_API_KEY` environment variable and pass it as `licenseKey`. + Without it the charts render with the unlicensed watermark. + +--- + +### Live examples + +.. exec::docs.linechart_basic.demo + :code: false + +.. source::docs/linechart_basic/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/linechart_brush.py b/docs/linechart_brush/demo.py similarity index 93% rename from pages/linechart_brush.py rename to docs/linechart_brush/demo.py index a48cc3c..c9a758c 100644 --- a/pages/linechart_brush.py +++ b/docs/linechart_brush/demo.py @@ -1,15 +1,11 @@ -""" -LineChart Brush - Range selection with visual overlays -""" +"""LineChart Brush demo — rendered on /linechart-brush via `.. exec::`. +Ported verbatim from the pre-migration pages/linechart_brush.py (same ids, same callbacks). +""" import os -import json -import dash import dash_mantine_components as dmc from dash import html, callback, Input, Output -dash.register_page(__name__, path='/linechart-brush', name='LineChart Brush') - from dash_mui_charts import LineChart # Get license key from environment @@ -47,17 +43,7 @@ } ) -layout = html.Div([ - html.Div([ - html.H1("LineChart Brush", style={'display': 'inline'}), - pro_badge, - ]), - html.P( - "The brush interaction enables users to select chart regions by clicking and dragging. " - "It captures start and current positions of the selection for highlighting trends, " - "selecting data points, or triggering callbacks based on the selection area.", - style={'fontSize': '16px', 'color': '#666', 'marginBottom': '20px'} - ), +component = html.Div([ html.Div([ html.P( "These features require an MUI X Pro license key. " @@ -135,11 +121,11 @@ html.Div([ html.Label("Overlay Type: ", style={'fontWeight': 'bold', 'marginRight': '10px'}), html.Button("None", id='overlay-none-btn', n_clicks=0, - style={'marginRight': '5px', 'padding': '8px 16px'}), + style={'marginRight': '5px', 'padding': '8px 16px'}), html.Button("Default", id='overlay-default-btn', n_clicks=0, - style={'marginRight': '5px', 'padding': '8px 16px'}), + style={'marginRight': '5px', 'padding': '8px 16px'}), html.Button("Values", id='overlay-values-btn', n_clicks=0, - style={'padding': '8px 16px', 'backgroundColor': '#1976d2', 'color': 'white', 'border': 'none'}), + style={'padding': '8px 16px', 'backgroundColor': '#1976d2', 'color': 'white', 'border': 'none'}), ], style={'marginBottom': '20px'}), LineChart( diff --git a/docs/linechart_brush/linechart-brush.md b/docs/linechart_brush/linechart-brush.md new file mode 100644 index 0000000..ce12652 --- /dev/null +++ b/docs/linechart_brush/linechart-brush.md @@ -0,0 +1,35 @@ +--- +name: LineChart Brush +description: "Pro brush range selection on LineChart: drag to select a region, overlay types (none, default, values with % change), brushConfig and axis highlight options." +endpoint: /linechart-brush +package: dash_mui_charts +category: LineChart +icon: mdi:brush +--- + +.. llms_copy::LineChart Brush + +.. toc:: + +### Overview + +Pro brush range selection on LineChart: drag to select a region, overlay types (none, default, values with % change), brushConfig and axis highlight options. + +.. admonition::Pro component demos + :icon: mdi:diamond-outline + :color: orange + + The examples on this page read a **MUI X Pro license key** from the + `MUI_PRO_API_KEY` environment variable and pass it as `licenseKey`. + Without it the charts render with the unlicensed watermark. + +--- + +### Live examples + +.. exec::docs.linechart_brush.demo + :code: false + +.. source::docs/linechart_brush/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/linechart_highlighting.py b/docs/linechart_highlighting/demo.py similarity index 96% rename from pages/linechart_highlighting.py rename to docs/linechart_highlighting/demo.py index bb2f5be..ed01572 100644 --- a/pages/linechart_highlighting.py +++ b/docs/linechart_highlighting/demo.py @@ -1,14 +1,12 @@ -""" -LineChart Highlighting - Controlled axis/item highlights and per-series highlightScope -""" +"""LineChart Highlighting demo — rendered on /linechart-highlighting via `.. exec::`. +Ported verbatim from the pre-migration pages/linechart_highlighting.py (same ids, same callbacks). +""" import os import json -import dash import dash_mantine_components as dmc -from dash import html, callback, Input, Output, State, ctx - -dash.register_page(__name__, path='/linechart-highlighting', name='LineChart Highlighting') +import dash +from dash import html, callback, Input, Output, ctx from dash_mui_charts import LineChart @@ -32,14 +30,7 @@ 'overflow': 'auto', } -layout = html.Div([ - html.H2("LineChart Highlighting"), - html.P( - "Controlled highlighting features: axis highlights, item highlights, " - "and per-series highlight scopes.", - style={'color': 'var(--mantine-color-dimmed)', 'marginBottom': '24px'} - ), - +component = html.Div([ # ========================================================================== # Controlled Item Highlight # ========================================================================== diff --git a/docs/linechart_highlighting/linechart-highlighting.md b/docs/linechart_highlighting/linechart-highlighting.md new file mode 100644 index 0000000..c9be61c --- /dev/null +++ b/docs/linechart_highlighting/linechart-highlighting.md @@ -0,0 +1,35 @@ +--- +name: LineChart Highlighting +description: "Controlled highlighting on LineChart: set highlightedItem and highlightedAxis from Dash callbacks, plus per-series highlightScope highlight/fade behavior." +endpoint: /linechart-highlighting +package: dash_mui_charts +category: LineChart +icon: mdi:lightbulb-on-outline +--- + +.. llms_copy::LineChart Highlighting + +.. toc:: + +### Overview + +Controlled highlighting on LineChart: set highlightedItem and highlightedAxis from Dash callbacks, plus per-series highlightScope highlight/fade behavior. + +.. admonition::Pro component demos + :icon: mdi:diamond-outline + :color: orange + + The examples on this page read a **MUI X Pro license key** from the + `MUI_PRO_API_KEY` environment variable and pass it as `licenseKey`. + Without it the charts render with the unlicensed watermark. + +--- + +### Live examples + +.. exec::docs.linechart_highlighting.demo + :code: false + +.. source::docs/linechart_highlighting/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/linechart_pro.py b/docs/linechart_pro/demo.py similarity index 96% rename from pages/linechart_pro.py rename to docs/linechart_pro/demo.py index da8895b..b067771 100644 --- a/pages/linechart_pro.py +++ b/docs/linechart_pro/demo.py @@ -1,14 +1,11 @@ -""" -LineChart Pro - Advanced Pro license features -""" +"""LineChart Pro demo — rendered on /linechart-pro via `.. exec::`. +Ported verbatim from the pre-migration pages/linechart_pro.py (same ids, same callbacks). +""" import os import json -import dash import dash_mantine_components as dmc -from dash import html, callback, Input, Output, State - -dash.register_page(__name__, path='/linechart-pro', name='LineChart Pro') +from dash import html, callback, Input, Output from dash_mui_charts import LineChart @@ -53,16 +50,7 @@ } ) -layout = html.Div([ - html.Div([ - html.H1("LineChart Pro", style={'display': 'inline'}), - pro_badge, - ]), - html.P( - "This page demonstrates the advanced Pro features of LineChart including " - "zoom, pan, zoom slider, and zoom state callbacks.", - style={'fontSize': '16px', 'color': '#666', 'marginBottom': '20px'} - ), +component = html.Div([ html.Div([ html.P( "These features require an MUI X Pro license key. " diff --git a/docs/linechart_pro/linechart-pro.md b/docs/linechart_pro/linechart-pro.md new file mode 100644 index 0000000..a73433f --- /dev/null +++ b/docs/linechart_pro/linechart-pro.md @@ -0,0 +1,35 @@ +--- +name: LineChart Pro +description: "MUI X Pro features on LineChart: zoom and pan with a slider, zoom configuration options, biaxial zoom, and controlled zoom state via Dash callbacks." +endpoint: /linechart-pro +package: dash_mui_charts +category: LineChart +icon: mdi:diamond-outline +--- + +.. llms_copy::LineChart Pro + +.. toc:: + +### Overview + +MUI X Pro features on LineChart: zoom and pan with a slider, zoom configuration options, biaxial zoom, and controlled zoom state via Dash callbacks. + +.. admonition::Pro component demos + :icon: mdi:diamond-outline + :color: orange + + The examples on this page read a **MUI X Pro license key** from the + `MUI_PRO_API_KEY` environment variable and pass it as `licenseKey`. + Without it the charts render with the unlicensed watermark. + +--- + +### Live examples + +.. exec::docs.linechart_pro.demo + :code: false + +.. source::docs/linechart_pro/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/linechart_referencelines.py b/docs/linechart_referencelines/demo.py similarity index 98% rename from pages/linechart_referencelines.py rename to docs/linechart_referencelines/demo.py index e42d886..70699aa 100644 --- a/pages/linechart_referencelines.py +++ b/docs/linechart_referencelines/demo.py @@ -1,13 +1,10 @@ -""" -LineChart Reference Lines - Horizontal and vertical reference markers -""" +"""LineChart Reference Lines demo — rendered on /linechart-referencelines via `.. exec::`. +Ported verbatim from the pre-migration pages/linechart_referencelines.py (same ids, same callbacks). +""" import os -import dash import dash_mantine_components as dmc -from dash import html, dcc, callback, Input, Output, State - -dash.register_page(__name__, path='/linechart-referencelines', name='LineChart Reference Lines') +from dash import html, dcc, callback, Input, Output from dash_mui_charts import LineChart @@ -41,15 +38,7 @@ 'overflow': 'auto', } -layout = html.Div([ - html.H1("LineChart Reference Lines"), - html.P( - "Reference lines are horizontal or vertical markers that help highlight specific values, " - "thresholds, targets, or important dates on a chart. They provide visual context for " - "interpreting data.", - style={'fontSize': '16px', 'color': '#666', 'marginBottom': '30px'} - ), - +component = html.Div([ # ========================================================================== # Basic Horizontal Reference Lines # ========================================================================== diff --git a/docs/linechart_referencelines/linechart-referencelines.md b/docs/linechart_referencelines/linechart-referencelines.md new file mode 100644 index 0000000..1362b92 --- /dev/null +++ b/docs/linechart_referencelines/linechart-referencelines.md @@ -0,0 +1,35 @@ +--- +name: LineChart Reference Lines +description: "Horizontal and vertical reference lines on LineChart: targets, thresholds, label alignment, dash styles, multi-axis axisId, and dynamic updates via callbacks." +endpoint: /linechart-referencelines +package: dash_mui_charts +category: LineChart +icon: mdi:chart-timeline-variant +--- + +.. llms_copy::LineChart Reference Lines + +.. toc:: + +### Overview + +Horizontal and vertical reference lines on LineChart: targets, thresholds, label alignment, dash styles, multi-axis axisId, and dynamic updates via callbacks. + +.. admonition::Pro component demos + :icon: mdi:diamond-outline + :color: orange + + The examples on this page read a **MUI X Pro license key** from the + `MUI_PRO_API_KEY` environment variable and pass it as `licenseKey`. + Without it the charts render with the unlicensed watermark. + +--- + +### Live examples + +.. exec::docs.linechart_referencelines.demo + :code: false + +.. source::docs/linechart_referencelines/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/linechart_tick_hover.py b/docs/linechart_tick_hover/demo.py similarity index 98% rename from pages/linechart_tick_hover.py rename to docs/linechart_tick_hover/demo.py index 5d375bc..5d11d55 100644 --- a/pages/linechart_tick_hover.py +++ b/docs/linechart_tick_hover/demo.py @@ -1,19 +1,15 @@ -""" -LineChart Ticks & Hover - Tooltips, reference lines, ticks, and grid at various date ranges -""" +"""LineChart Ticks & Hover demo — rendered on /linechart-tick-hover via `.. exec::`. +Ported verbatim from the pre-migration pages/linechart_tick_hover.py (same ids, same callbacks). +""" import os import json import math import random from datetime import datetime, timedelta - -import dash import dash_mantine_components as dmc from dash import html, callback, Input, Output -dash.register_page(__name__, path='/linechart-tick-hover', name='LineChart Ticks & Hover') - from dash_mui_charts import LineChart # Get license key from environment @@ -54,6 +50,7 @@ # --------------------------------------------------------------------------- random.seed(42) + def generate_sensor_data(start_date, num_days, base=72, noise=5, trend=0.01): """Generate fake equipment sensor readings with slight upward trend.""" dates = [] @@ -65,6 +62,7 @@ def generate_sensor_data(start_date, num_days, base=72, noise=5, trend=0.01): values.append(round(val, 1)) return dates, values + # 1-week data week_start = datetime(2025, 3, 1) week_dates, week_temps = generate_sensor_data(week_start, 7, base=68, noise=4, trend=0.3) @@ -94,15 +92,7 @@ def generate_sensor_data(start_date, num_days, base=72, noise=5, trend=0.01): # --------------------------------------------------------------------------- # Layout # --------------------------------------------------------------------------- -layout = html.Div([ - html.H1("LineChart Ticks & Hover"), - html.P( - "This page demonstrates best practices for configuring tooltips, reference lines, " - "ticks, and grid on LineCharts across different date ranges. It addresses common " - "alignment issues that appear when rendering large date ranges (year+).", - style={'fontSize': '16px', 'color': '#666', 'marginBottom': '30px'} - ), - +component = html.Div([ # ====================================================================== # 1. Short Date Range (1 Week) - Baseline # ====================================================================== diff --git a/docs/linechart_tick_hover/linechart-tick-hover.md b/docs/linechart_tick_hover/linechart-tick-hover.md new file mode 100644 index 0000000..4b8f731 --- /dev/null +++ b/docs/linechart_tick_hover/linechart-tick-hover.md @@ -0,0 +1,35 @@ +--- +name: LineChart Ticks & Hover +description: "Best practices for LineChart tooltips, reference lines, ticks and grid across week, quarter and year date ranges, with fixes for alignment at large ranges." +endpoint: /linechart-tick-hover +package: dash_mui_charts +category: LineChart +icon: mdi:gesture-tap +--- + +.. llms_copy::LineChart Ticks & Hover + +.. toc:: + +### Overview + +Best practices for LineChart tooltips, reference lines, ticks and grid across week, quarter and year date ranges, with fixes for alignment at large ranges. + +.. admonition::Pro component demos + :icon: mdi:diamond-outline + :color: orange + + The examples on this page read a **MUI X Pro license key** from the + `MUI_PRO_API_KEY` environment variable and pass it as `licenseKey`. + Without it the charts render with the unlicensed watermark. + +--- + +### Live examples + +.. exec::docs.linechart_tick_hover.demo + :code: false + +.. source::docs/linechart_tick_hover/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/linechart_zoom_preview.py b/docs/linechart_zoom_preview/demo.py similarity index 96% rename from pages/linechart_zoom_preview.py rename to docs/linechart_zoom_preview/demo.py index d91975d..17962fb 100644 --- a/pages/linechart_zoom_preview.py +++ b/docs/linechart_zoom_preview/demo.py @@ -1,19 +1,15 @@ -""" -LineChart 0.0.8 - Zoom Slider Preview & Enhanced Axis Configuration -""" +"""Zoom Preview (0.0.8) demo — rendered on /linechart-zoom-preview via `.. exec::`. +Ported verbatim from the pre-migration pages/linechart_zoom_preview.py (same ids, same callbacks). +""" import os import json import math import random from datetime import datetime, timedelta - -import dash import dash_mantine_components as dmc from dash import html, callback, Input, Output -dash.register_page(__name__, path='/linechart-zoom-preview', name='Zoom Preview (0.0.8)') - from dash_mui_charts import LineChart # Get license key from environment @@ -88,19 +84,7 @@ } ) -layout = html.Div([ - html.Div([ - html.H1("Zoom Slider Preview", style={'display': 'inline'}), - pro_badge, - new_badge, - ]), - html.P( - "New in 0.0.8: zoom.slider.preview shows a miniature of the full dataset " - "inside the slider, enhanced axis configuration with tick styling, and " - "zoomInteractionConfig for fine-grained zoom/pan control.", - style={'fontSize': '16px', 'color': '#666', 'marginBottom': '30px'} - ), - +component = html.Div([ # ========================================================================== # Zoom Slider with Preview - Time Series # ========================================================================== @@ -499,4 +483,4 @@ def display_zoom_preview(zoom_data): if zoom_data: return json.dumps(zoom_data, indent=2) - return "Interact with the chart to see zoom state" \ No newline at end of file + return "Interact with the chart to see zoom state" diff --git a/docs/linechart_zoom_preview/linechart-zoom-preview.md b/docs/linechart_zoom_preview/linechart-zoom-preview.md new file mode 100644 index 0000000..355b538 --- /dev/null +++ b/docs/linechart_zoom_preview/linechart-zoom-preview.md @@ -0,0 +1,35 @@ +--- +name: Zoom Preview (0.0.8) +description: "LineChart Pro zoom slider with a miniature full-dataset preview, zoomInteractionConfig for fine-grained zoom/pan control, and enhanced axis tick styling." +endpoint: /linechart-zoom-preview +package: dash_mui_charts +category: LineChart +icon: mdi:magnify-plus-outline +--- + +.. llms_copy::Zoom Preview (0.0.8) + +.. toc:: + +### Overview + +LineChart Pro zoom slider with a miniature full-dataset preview, zoomInteractionConfig for fine-grained zoom/pan control, and enhanced axis tick styling. + +.. admonition::Pro component demos + :icon: mdi:diamond-outline + :color: orange + + The examples on this page read a **MUI X Pro license key** from the + `MUI_PRO_API_KEY` environment variable and pass it as `licenseKey`. + Without it the charts render with the unlicensed watermark. + +--- + +### Live examples + +.. exec::docs.linechart_zoom_preview.demo + :code: false + +.. source::docs/linechart_zoom_preview/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/docs/live_trading/live-trading.md b/docs/live_trading/live-trading.md new file mode 100644 index 0000000..b1cb319 --- /dev/null +++ b/docs/live_trading/live-trading.md @@ -0,0 +1,64 @@ +--- +name: Live Trading Chart +description: LiveTradingChart real-time candlestick simulation with OHLCV data, volume bars, forecast band, swing-point alert labels, and slider-controlled parameters. +endpoint: /live-trading +package: dash_mui_charts +category: LiveTradingChart +icon: mdi:trending-up +--- + +.. llms_copy::Live Trading Chart + +.. toc:: + +### Overview + +`LiveTradingChart` is the real-time streaming chart component of +dash-mui-charts, built for live data visualization such as trading feeds +and sensor streams. The demo renders a live OHLCV candlestick simulation +with volume bars, a forecast line with uncertainty bands, and alert labels +on significant moves — ticks are generated by the component itself from a +seed, so no Dash interval is needed to stream. + +Basic streaming is Community tier. Pro features — zoom and the range +slider (`showSlider`) — require a MUI X Pro license key passed as +`licenseKey` (read here from `MUI_PRO_API_KEY`). + +Simulation props are live-updatable from Dash callbacks: `running`, +`intervalMs`, `volatility`, `drift`, `windowSize`, `seed`, +`forecastVolatility`, and `resetTrigger` (change its value to restart). +Output props updated as the simulation runs: `currentPrice`, `tickCount`, +and `alertHistory`. + +.. admonition::Functions-as-props + :icon: mdi:function-variant + :color: blue + + `alertFormatter` and `alertFilter` accept + `{'function': 'name', 'options': {...}}`, resolved from the + `window.dashMuiChartsFunctions` registry defined in + `assets/muiChartsFunctions.js` — the demo formats prices with + `priceAlertFormatter`. + +--- + +### Live simulation + +Start the simulation, then drive it: speed, volatility, drift and window +size are sliders; volume bars, price labels and the zoom preview are +toggles. The stats row and alert log stream from the chart's output props. + +.. exec::docs.live_trading.simulator + :code: false + +.. source::docs/live_trading/simulator.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Related pages + +- [Candlestick Chart](/candlestick) — static OHLC charts +- [LineChart Pro](/linechart-pro) — zoom, pan and slider +- [Crosshair](/crosshair) — crosshair tracking dashboard diff --git a/pages/live_trading.py b/docs/live_trading/simulator.py similarity index 83% rename from pages/live_trading.py rename to docs/live_trading/simulator.py index 238a06f..611c3a1 100644 --- a/pages/live_trading.py +++ b/docs/live_trading/simulator.py @@ -1,17 +1,13 @@ -""" -LiveTradingChart Demo — Candlestick Trading Simulation -Real-time OHLCV candlestick chart with volume bars, forecast, and alert labels. -""" +"""LiveTradingChart simulator — the whole control surface. +Rendered on /live-trading via `.. exec::`; ported verbatim from the +pre-migration pages/live_trading.py (same ids, same callbacks). +""" import os -import json -import dash import dash_mantine_components as dmc from dash import html, callback, Input, Output, State, ctx -dash.register_page(__name__, path='/live-trading', name='Live Trading Chart') - from dash_mui_charts import LiveTradingChart MUI_LICENSE_KEY = os.environ.get('MUI_PRO_API_KEY', '') @@ -34,15 +30,7 @@ 'maxHeight': '300px', } -layout = html.Div([ - html.H1("Live Trading Chart"), - html.P( - "Real-time candlestick trading simulation with OHLCV data, volume bars, " - "forecast line with uncertainty bands, and alert labels on significant moves. " - "All simulation parameters are controllable via the sliders below.", - style={'fontSize': '16px', 'color': 'var(--mantine-color-dimmed)', 'marginBottom': '20px'} - ), - +component = html.Div([ # ── Controls Row 1: Buttons + Toggles ───────────────────────────────── html.Div([ html.Div([ @@ -162,37 +150,6 @@ html.H4("Recent Alerts", style={'marginTop': '15px'}), html.Pre(id='lt-alert-log', children="Alerts will appear here...", style=code_style), - # ── Code Example ────────────────────────────────────────────────────── - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '15px'}), - dmc.CodeHighlight(code="""LiveTradingChart( - id='lt-chart', - height=520, - running=True, # Start/stop simulation - intervalMs=200, # Tick speed - windowSize=80, # Visible candles - forecastSize=20, # Forecast horizon - initialPrice=100, - volatility=0.02, # Candle volatility - drift=0.001, # Price trend - showVolume=True, # Volume bars - showLabels=False, # Price labels on candles - - # Swing-point alert detection - alertLookback=5, # Candles on each side to confirm extreme - alertMinDistance=10, # Min ticks between alerts - maxVisibleAlerts=6, # Cap visible labels - - # Functions-as-props: custom formatting via JS registry - alertFormatter={ - 'function': 'priceAlertFormatter', - 'options': {'decimals': 2}, - }, - - # Outputs for callbacks: - # currentPrice, tickCount, alertHistory -)""", language="python"), - ]), ], style={'padding': '20px'}) @@ -287,4 +244,4 @@ def update_alerts(alerts): for a in recent: d = "UP" if a.get('type') == 'up' else "DN" lines.append(f"[Tick {a.get('tick', '?'):>5}] {d} ${a.get('price', 0):>8.2f} ({a.get('message', '')})") - return str(len(alerts)), "\n".join(lines) \ No newline at end of file + return str(len(alerts)), "\n".join(lines) diff --git a/docs/pie-props/pie-props.md b/docs/pie-props/pie-props.md new file mode 100644 index 0000000..5a61b2e --- /dev/null +++ b/docs/pie-props/pie-props.md @@ -0,0 +1,48 @@ +--- +name: Pie Chart Props +description: Interactive playground for nested two-ring PieCharts on Titanic survival data with live controls for dimensions, radii, ring gap, labels and highlighting. +endpoint: /pie-props +package: dash_mui_charts +category: PieChart +icon: mdi:tune-variant +--- + +.. llms_copy::Pie Chart Props + +.. toc:: + +### Overview + +An interactive control panel for nested/multi-series pie charts — +hierarchical data as inner and outer rings, based on the MUI X Charts +Titanic survival statistics example. Switch between three data views +(by class, by survival, simple budget demo), tune every ring prop, and +copy the generated `PieChart(...)` call from the code panel. + +Controls cover: + +- **Chart dimensions** — width and height +- **Inner / outer ring** — each ring's inner/outer radius, corner radius and padding angle +- **Ring gap & labels** — spacing between rings, arc label source and minimum angle +- **Interactions** — hover highlight, fade-others scope, tooltip, legend, animation +- **Margins** + +The Hover Info and Click Data panels stream `highlightedItem` and +`clickData` from the live chart. + +--- + +### Playground + +.. exec::docs.pie-props.playground + :code: false + +.. source::docs/pie-props/playground.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Related pages + +- [PieChart examples](/pie) — basic pie, donut, arc labels, gauge and interactivity diff --git a/pages/pie_props.py b/docs/pie-props/playground.py similarity index 97% rename from pages/pie_props.py rename to docs/pie-props/playground.py index 03a64f5..4336fc8 100644 --- a/pages/pie_props.py +++ b/docs/pie-props/playground.py @@ -1,23 +1,13 @@ -""" -PieChart Props Playground +"""PieChart props playground — nested two-ring pies on Titanic data. -Interactive control panel for exploring and customizing PieChart component properties. -Features nested/multi-series pie charts with inner and outer rings. -Based on MUI X Charts Titanic survival statistics example. +Rendered on /pie-props via `.. exec::`; ported verbatim from the +pre-migration pages/pie_props.py (same ids, same callbacks). """ -import json -import dash -from dash import html, callback, Input, Output, dcc, ctx +from dash import html, callback, Input, Output, dcc import dash_mantine_components as dmc from dash_mui_charts import PieChart -dash.register_page( - __name__, - path='/pie-props', - name='Pie Chart Props' -) - # ============================================================================= # TITANIC DATA # ============================================================================= @@ -176,18 +166,7 @@ def create_control_card(title, children): # ============================================================================= # LAYOUT # ============================================================================= -layout = html.Div([ - # Header - html.Div([ - html.H1('PieChart Props Playground'), - html.P( - 'Interactive demo of nested/multi-series pie charts. ' - 'Visualize hierarchical data with inner and outer rings. ' - 'Based on MUI X Charts Titanic survival statistics example.', - style={'color': 'var(--mantine-color-dimmed)', 'marginBottom': '30px'} - ), - ]), - +component = html.Div([ # Live Preview Section dmc.Paper( shadow='sm', @@ -879,4 +858,4 @@ def reset_controls(n_clicks): 10, # margin right 10, # margin bottom 10, # margin left - ) \ No newline at end of file + ) diff --git a/docs/pie/basic_example.py b/docs/pie/basic_example.py new file mode 100644 index 0000000..dedd7cb --- /dev/null +++ b/docs/pie/basic_example.py @@ -0,0 +1,20 @@ +from dash import html + +from dash_mui_charts import PieChart + +budget_data = [ + {'id': 0, 'value': 35, 'label': 'Marketing'}, + {'id': 1, 'value': 25, 'label': 'Engineering'}, + {'id': 2, 'value': 20, 'label': 'Sales'}, + {'id': 3, 'value': 15, 'label': 'Support'}, + {'id': 4, 'value': 5, 'label': 'Other'}, +] + +component = html.Div( + PieChart( + id='basic-pie', + data=budget_data, + height=300, + ), + style={'display': 'flex', 'justifyContent': 'center'}, +) diff --git a/docs/pie/donut_example.py b/docs/pie/donut_example.py new file mode 100644 index 0000000..fd9e8ba --- /dev/null +++ b/docs/pie/donut_example.py @@ -0,0 +1,21 @@ +from dash import html + +from dash_mui_charts import PieChart + +browser_data = [ + {'id': 0, 'value': 63.5, 'label': 'Chrome'}, + {'id': 1, 'value': 19.2, 'label': 'Safari'}, + {'id': 2, 'value': 4.3, 'label': 'Firefox'}, + {'id': 3, 'value': 3.9, 'label': 'Edge'}, + {'id': 4, 'value': 9.1, 'label': 'Other'}, +] + +component = html.Div( + PieChart( + id='donut-pie', + data=browser_data, + innerRadius=60, # Creates the donut hole + height=300, + ), + style={'display': 'flex', 'justifyContent': 'center'}, +) diff --git a/docs/pie/gauge_example.py b/docs/pie/gauge_example.py new file mode 100644 index 0000000..f14a08b --- /dev/null +++ b/docs/pie/gauge_example.py @@ -0,0 +1,21 @@ +from dash import html + +from dash_mui_charts import PieChart + +task_data = [ + {'id': 0, 'value': 72, 'label': 'Completed'}, + {'id': 1, 'value': 28, 'label': 'Remaining'}, +] + +component = html.Div( + PieChart( + id='gauge-pie', + data=task_data, + startAngle=-90, # Start at 12 o'clock + endAngle=90, # End at 6 o'clock (half circle) + innerRadius=50, # Donut style + colors=['#4caf50', '#e0e0e0'], + height=200, + ), + style={'display': 'flex', 'justifyContent': 'center'}, +) diff --git a/docs/pie/interactive_example.py b/docs/pie/interactive_example.py new file mode 100644 index 0000000..6b3ba55 --- /dev/null +++ b/docs/pie/interactive_example.py @@ -0,0 +1,95 @@ +import json + +from dash import Input, Output, callback, html + +from dash_mui_charts import PieChart + +budget_data = [ + {'id': 0, 'value': 35, 'label': 'Marketing'}, + {'id': 1, 'value': 25, 'label': 'Engineering'}, + {'id': 2, 'value': 20, 'label': 'Sales'}, + {'id': 3, 'value': 15, 'label': 'Support'}, + {'id': 4, 'value': 5, 'label': 'Other'}, +] + +component = html.Div( + [ + html.Div( + PieChart( + id='interactive-pie', + data=budget_data, + innerRadius=40, + paddingAngle=2, + cornerRadius=4, + highlightScope={'highlight': 'item', 'fade': 'global'}, + height=300, + ), + style={'flex': '1'}, + ), + html.Div( + [ + html.Div( + [ + html.H4("Click Data", + style={'marginTop': 0, 'marginBottom': '10px'}), + html.Pre( + id='pie-click-data', + children='Click on a slice', + style={ + 'backgroundColor': '#e3f2fd', + 'padding': '15px', + 'borderRadius': '8px', + 'minHeight': '80px', + 'fontSize': '13px', + 'margin': 0, + }, + ), + ], + style={'marginBottom': '20px'}, + ), + html.Div( + [ + html.H4("Highlighted Item", + style={'marginTop': 0, 'marginBottom': '10px'}), + html.Pre( + id='pie-highlight-data', + children='Hover over a slice', + style={ + 'backgroundColor': '#e8f5e9', + 'padding': '15px', + 'borderRadius': '8px', + 'minHeight': '80px', + 'fontSize': '13px', + 'margin': 0, + }, + ), + ] + ), + ], + style={'flex': '1', 'paddingLeft': '30px'}, + ), + ], + style={'display': 'flex', 'alignItems': 'flex-start'}, +) + + +@callback( + Output('pie-click-data', 'children'), + Input('interactive-pie', 'clickData'), + prevent_initial_call=True +) +def display_click_data(click_data): + if click_data: + return json.dumps(click_data, indent=2) + return 'Click on a slice' + + +@callback( + Output('pie-highlight-data', 'children'), + Input('interactive-pie', 'highlightedItem'), + prevent_initial_call=True +) +def display_highlight_data(highlighted_item): + if highlighted_item: + return json.dumps(highlighted_item, indent=2) + return 'Hover over a slice' diff --git a/docs/pie/labels_example.py b/docs/pie/labels_example.py new file mode 100644 index 0000000..97c5dc9 --- /dev/null +++ b/docs/pie/labels_example.py @@ -0,0 +1,22 @@ +from dash import html + +from dash_mui_charts import PieChart + +budget_data = [ + {'id': 0, 'value': 35, 'label': 'Marketing'}, + {'id': 1, 'value': 25, 'label': 'Engineering'}, + {'id': 2, 'value': 20, 'label': 'Sales'}, + {'id': 3, 'value': 15, 'label': 'Support'}, + {'id': 4, 'value': 5, 'label': 'Other'}, +] + +component = html.Div( + PieChart( + id='labeled-pie', + data=budget_data, + arcLabel='value', # Options: 'value', 'label', 'formattedValue' + arcLabelMinAngle=30, # Hide labels on slices < 30 degrees + height=300, + ), + style={'display': 'flex', 'justifyContent': 'center'}, +) diff --git a/docs/pie/pie.md b/docs/pie/pie.md new file mode 100644 index 0000000..efdb0e2 --- /dev/null +++ b/docs/pie/pie.md @@ -0,0 +1,138 @@ +--- +name: Pie Chart +description: "PieChart demos: basic pie, donut, arc labels, styled slices, half-pie gauge, and an interactive example with clickData and highlightedItem callbacks." +endpoint: /pie +package: dash_mui_charts +category: PieChart +icon: mdi:chart-pie +--- + +.. llms_copy::Pie Chart + +.. toc:: + +### Overview + +`PieChart` renders pie, donut, and nested/concentric pie charts, wrapping +the MUI X Charts pie chart for Plotly Dash. It is a **Community (free)** +component — no MUI X Pro license required. + +Slices come from a flat `data` list (single series) or a `series` list +(nested pies). Interaction flows back to Dash through `clickData` and +`highlightedItem`; `highlightedItem` also works as an input for +synchronized highlighting across charts. + +```python +from dash_mui_charts import PieChart + +PieChart( + data=[ + {'id': 'a', 'value': 35, 'label': 'Marketing', 'color': '#1976d2'}, + {'id': 'b', 'value': 25, 'label': 'Engineering'}, + ], + innerRadius=50, # >0 creates donut + outerRadius=100, + cornerRadius=5, + paddingAngle=2, +) +``` + +.. admonition::seriesId, not seriesIndex + :icon: mdi:information-outline + :color: blue + + MUI X Charts uses `seriesId` (a string such as + `"auto-generated-id-0"`), not `seriesIndex`, in event payloads like + `clickData` and `highlightedItem`. + +--- + +### Basic pie chart + +A simple pie chart showing budget allocation by department. Hover over +slices to see values, click to interact. + +.. exec::docs.pie.basic_example + :code: false + +.. source::docs/pie/basic_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Donut chart + +Set `innerRadius` to create a donut chart. The hollow center can be used +for additional information or just aesthetic appeal. + +.. exec::docs.pie.donut_example + :code: false + +.. source::docs/pie/donut_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Arc labels + +Display values directly on the arcs with `arcLabel` (`'value'`, `'label'` +or `'formattedValue'`). Use `arcLabelMinAngle` to hide labels on small +slices that would be too crowded. + +.. exec::docs.pie.labels_example + :code: false + +.. source::docs/pie/labels_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Styled pie + +Customize the appearance with padding between slices, rounded corners, and +custom color palettes. + +.. exec::docs.pie.styled_example + :code: false + +.. source::docs/pie/styled_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Half pie / gauge + +Create gauge-style visualizations by adjusting `startAngle` and +`endAngle`. Perfect for progress indicators or completion metrics. + +.. exec::docs.pie.gauge_example + :code: false + +.. source::docs/pie/gauge_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Interactive example + +Click on slices to see detailed click data. Hover to highlight slices and +see the highlight state update in real time — `clickData` and +`highlightedItem` both arrive as callback inputs. + +.. exec::docs.pie.interactive_example + :code: false + +.. source::docs/pie/interactive_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Related pages + +- [Props Explorer](/pie-props) — interactive props playground with nested two-ring pies diff --git a/docs/pie/styled_example.py b/docs/pie/styled_example.py new file mode 100644 index 0000000..4677871 --- /dev/null +++ b/docs/pie/styled_example.py @@ -0,0 +1,23 @@ +from dash import html + +from dash_mui_charts import PieChart + +budget_data = [ + {'id': 0, 'value': 35, 'label': 'Marketing'}, + {'id': 1, 'value': 25, 'label': 'Engineering'}, + {'id': 2, 'value': 20, 'label': 'Sales'}, + {'id': 3, 'value': 15, 'label': 'Support'}, + {'id': 4, 'value': 5, 'label': 'Other'}, +] + +component = html.Div( + PieChart( + id='styled-pie', + data=budget_data, + paddingAngle=3, # Gap between slices in degrees + cornerRadius=8, # Rounded corners on slices + colors=['#1976d2', '#dc004e', '#ff9800', '#4caf50', '#9c27b0'], + height=300, + ), + style={'display': 'flex', 'justifyContent': 'center'}, +) diff --git a/docs/scatter/_data.py b/docs/scatter/_data.py new file mode 100644 index 0000000..5f4c29c --- /dev/null +++ b/docs/scatter/_data.py @@ -0,0 +1,51 @@ +"""Shared demo datasets for the ScatterChart examples. + +One module, one seed, one generation ORDER — the sequences below are drawn +from a single seeded RNG exactly as the pre-migration page drew them, so +every example renders the same points it always has. Splitting the +generation into the per-example modules would re-seed per module and +silently reshuffle every cloud. +""" +import random + +random.seed(42) + +# Two clusters +cluster_a = [ + {'x': random.gauss(150, 40), 'y': random.gauss(300, 60), 'id': i} + for i in range(50) +] +cluster_b = [ + {'x': random.gauss(350, 50), 'y': random.gauss(150, 45), 'id': i} + for i in range(50) +] + +# Correlated data with z-values +correlated = [] +for i in range(80): + x = random.uniform(0, 100) + noise = random.gauss(0, 10) + y = 2 * x + 20 + noise + z = x + y # z for color mapping + correlated.append({'x': round(x, 1), 'y': round(y, 1), 'z': round(z, 1), + 'id': i}) + +# Log-scale data (simulated processor data) +log_data_a = [] +log_data_b = [] +for i in range(40): + year = 1990 + i * 0.8 + density_a = 10 ** (random.uniform(1, 2) + (year - 1990) * 0.06) + density_b = 10 ** (random.uniform(0.8, 1.8) + (year - 1990) * 0.055) + log_data_a.append({'x': round(year, 1), 'y': round(density_a), 'id': i}) + log_data_b.append({'x': round(year, 1), 'y': round(density_b), 'id': i}) + +# Small datasets for marker sizes +size_data_small = [ + {'x': random.uniform(10, 90), 'y': random.uniform(10, 90), 'id': i} + for i in range(15) +] +size_data_large = [ + {'x': random.uniform(10, 90), 'y': random.uniform(10, 90), 'id': i} + for i in range(20) +] diff --git a/docs/scatter/axis_styling_example.py b/docs/scatter/axis_styling_example.py new file mode 100644 index 0000000..23a6446 --- /dev/null +++ b/docs/scatter/axis_styling_example.py @@ -0,0 +1,53 @@ +from dash_mui_charts import ScatterChart + +from docs.scatter._data import correlated + +component = ScatterChart( + id='scatter-axis-styling', + height=400, + series=[ + { + 'id': 'styled', + 'label': 'Measurements', + 'data': correlated[:40], + 'markerSize': 6, + 'color': '#00897b', + 'highlightScope': {'highlight': 'item', 'fade': 'global'}, + }, + ], + xAxis=[{ + 'label': 'Independent Variable', + 'min': -5, + 'max': 105, + 'tickSize': 8, + 'tickNumber': 10, + 'tickLabelStyle': { + 'fontSize': 11, + 'fontWeight': 'bold', + }, + 'labelStyle': { + 'fontSize': 14, + 'fontWeight': 'bold', + 'fill': '#00897b', + }, + 'domainLimit': 'nice', + }], + yAxis=[{ + 'label': 'Dependent Variable', + 'width': 65, + 'tickSize': 8, + 'tickLabelStyle': { + 'fontSize': 11, + 'fontWeight': 'bold', + }, + 'labelStyle': { + 'fontSize': 14, + 'fontWeight': 'bold', + 'fill': '#00897b', + }, + 'domainLimit': 'nice', + }], + grid={'horizontal': True, 'vertical': True}, + margin={'left': 75, 'bottom': 50, 'right': 20, 'top': 20}, + voronoiMaxRadius=40, +) diff --git a/docs/scatter/basic_example.py b/docs/scatter/basic_example.py new file mode 100644 index 0000000..75422d3 --- /dev/null +++ b/docs/scatter/basic_example.py @@ -0,0 +1,28 @@ +from dash_mui_charts import ScatterChart + +from docs.scatter._data import cluster_a, cluster_b + +component = ScatterChart( + id='scatter-basic', + height=350, + series=[ + { + 'id': 'cluster-a', + 'label': 'Cluster A', + 'data': cluster_a, + 'color': '#1976d2', + 'highlightScope': {'highlight': 'series', 'fade': 'global'}, + }, + { + 'id': 'cluster-b', + 'label': 'Cluster B', + 'data': cluster_b, + 'color': '#ff7043', + 'highlightScope': {'highlight': 'series', 'fade': 'global'}, + }, + ], + grid={'horizontal': True, 'vertical': True}, + xAxis=[{'label': 'X Value'}], + yAxis=[{'label': 'Y Value', 'width': 50}], + voronoiMaxRadius=30, +) diff --git a/docs/scatter/click_example.py b/docs/scatter/click_example.py new file mode 100644 index 0000000..0438af3 --- /dev/null +++ b/docs/scatter/click_example.py @@ -0,0 +1,75 @@ +import json + +from dash import Input, Output, callback, html + +from dash_mui_charts import ScatterChart + +component = html.Div( + [ + ScatterChart( + id='scatter-click', + height=300, + series=[ + { + 'id': 'series-a', + 'label': 'A', + 'data': [ + {'x': 1, 'y': 5, 'id': 0}, + {'x': 2, 'y': 3, 'id': 1}, + {'x': 3, 'y': 8, 'id': 2}, + {'x': 4, 'y': 2, 'id': 3}, + {'x': 5, 'y': 7, 'id': 4}, + {'x': 6, 'y': 4, 'id': 5}, + {'x': 7, 'y': 9, 'id': 6}, + {'x': 8, 'y': 1, 'id': 7}, + ], + 'color': '#7e57c2', + 'markerSize': 8, + 'highlightScope': {'highlight': 'item'}, + }, + { + 'id': 'series-b', + 'label': 'B', + 'data': [ + {'x': 1.5, 'y': 6, 'id': 0}, + {'x': 2.5, 'y': 4, 'id': 1}, + {'x': 3.5, 'y': 7, 'id': 2}, + {'x': 4.5, 'y': 3, 'id': 3}, + {'x': 5.5, 'y': 8, 'id': 4}, + {'x': 6.5, 'y': 5, 'id': 5}, + {'x': 7.5, 'y': 6, 'id': 6}, + ], + 'color': '#26a69a', + 'markerSize': 8, + 'highlightScope': {'highlight': 'item'}, + }, + ], + grid={'horizontal': True}, + voronoiMaxRadius=50, + ), + html.H4("Click Data:", style={'marginTop': '15px'}), + html.Pre( + id='scatter-click-output', + children="Click on a scatter point to see event data", + style={ + 'backgroundColor': '#f5f5f5', + 'padding': '15px', + 'borderRadius': '5px', + 'whiteSpace': 'pre-wrap', + 'fontSize': '12px', + 'overflow': 'auto', + }, + ), + ] +) + + +@callback( + Output('scatter-click-output', 'children'), + Input('scatter-click', 'clickData'), + prevent_initial_call=True +) +def display_scatter_click(click_data): + if click_data: + return json.dumps(click_data, indent=2) + return "Click on a scatter point to see event data" diff --git a/docs/scatter/colormap_example.py b/docs/scatter/colormap_example.py new file mode 100644 index 0000000..d374700 --- /dev/null +++ b/docs/scatter/colormap_example.py @@ -0,0 +1,36 @@ +from dash_mui_charts import ScatterChart + +from docs.scatter._data import correlated + +component = ScatterChart( + id='scatter-colormap', + height=400, + series=[ + { + 'id': 'correlated', + 'label': 'Data Points', + 'data': correlated, + 'markerSize': 5, + }, + ], + xAxis=[{ + 'label': 'X Value', + 'min': -5, + 'max': 105, + }], + yAxis=[{ + 'label': 'Y Value (2x + 20 + noise)', + 'width': 60, + 'domainLimit': 'nice', + }], + zAxis=[{ + 'colorMap': { + 'type': 'continuous', + 'min': 30, + 'max': 300, + 'color': ['#4fc3f7', '#e53935'], + }, + }], + grid={'horizontal': True, 'vertical': True}, + voronoiMaxRadius=40, +) diff --git a/docs/scatter/dataset_example.py b/docs/scatter/dataset_example.py new file mode 100644 index 0000000..69e5ebb --- /dev/null +++ b/docs/scatter/dataset_example.py @@ -0,0 +1,37 @@ +from dash_mui_charts import ScatterChart + +component = ScatterChart( + id='scatter-dataset', + height=300, + dataset=[ + {'x1': 373, 'y1': 434, 'x2': 304, 'y2': 349}, + {'x1': 173, 'y1': 437, 'x2': 208, 'y2': 347}, + {'x1': 68, 'y1': 292, 'x2': 151, 'y2': 280}, + {'x1': 121, 'y1': 116, 'x2': 185, 'y2': 176}, + {'x1': 322, 'y1': 61, 'x2': 278, 'y2': 170}, + {'x1': 466, 'y1': 210, 'x2': 346, 'y2': 246}, + {'x1': 418, 'y1': 403, 'x2': 326, 'y2': 333}, + {'x1': 224, 'y1': 449, 'x2': 235, 'y2': 352}, + {'x1': 87, 'y1': 335, 'x2': 158, 'y2': 311}, + {'x1': 104, 'y1': 167, 'x2': 166, 'y2': 218}, + {'x1': 262, 'y1': 70, 'x2': 251, 'y2': 161}, + {'x1': 421, 'y1': 167, 'x2': 335, 'y2': 199}, + {'x1': 442, 'y1': 352, 'x2': 341, 'y2': 302}, + {'x1': 294, 'y1': 474, 'x2': 264, 'y2': 366}, + {'x1': 101, 'y1': 386, 'x2': 174, 'y2': 318}, + ], + series=[ + { + 'id': 'ds-a', + 'label': 'Series A', + 'datasetKeys': {'x': 'x1', 'y': 'y1'}, + }, + { + 'id': 'ds-b', + 'label': 'Series B', + 'datasetKeys': {'x': 'x2', 'y': 'y2'}, + }, + ], + yAxis=[{'label': 'Rainfall (mm)', 'width': 60}], + grid={'horizontal': True, 'vertical': True}, +) diff --git a/docs/scatter/log_example.py b/docs/scatter/log_example.py new file mode 100644 index 0000000..b0596e9 --- /dev/null +++ b/docs/scatter/log_example.py @@ -0,0 +1,38 @@ +from dash_mui_charts import ScatterChart + +from docs.scatter._data import log_data_a, log_data_b + +component = ScatterChart( + id='scatter-log', + height=350, + series=[ + { + 'id': 'manufacturer-a', + 'label': 'Manufacturer A', + 'data': log_data_a, + 'markerSize': 4, + 'color': '#1565c0', + 'highlightScope': {'highlight': 'series', 'fade': 'global'}, + }, + { + 'id': 'manufacturer-b', + 'label': 'Manufacturer B', + 'data': log_data_b, + 'markerSize': 4, + 'color': '#e65100', + 'highlightScope': {'highlight': 'series', 'fade': 'global'}, + }, + ], + xAxis=[{ + 'label': 'Year', + 'tickLabelStyle': {'fontSize': 11}, + }], + yAxis=[{ + 'scaleType': 'log', + 'label': 'Density (units/mm²)', + 'width': 65, + 'tickLabelStyle': {'fontSize': 11}, + }], + grid={'horizontal': True}, + voronoiMaxRadius=25, +) diff --git a/docs/scatter/scatter.md b/docs/scatter/scatter.md new file mode 100644 index 0000000..2c75d7d --- /dev/null +++ b/docs/scatter/scatter.md @@ -0,0 +1,152 @@ +--- +name: Scatter Chart +description: "ScatterChart demos: two-series scatter, custom marker sizes, z-axis color mapping, log-scale axes, click events, dataset-driven series and axis styling." +endpoint: /scatter +package: dash_mui_charts +category: ScatterChart +icon: mdi:chart-scatter-plot +--- + +.. llms_copy::Scatter Chart + +.. toc:: + +### Overview + +`ScatterChart` renders scatter/point charts with optional z-axis color +mapping, voronoi-based proximity interaction, and dataset-driven data, +wrapping the MUI X Charts scatter chart for Plotly Dash. It is a +**Community (free)** component — no MUI X Pro license required. + +```python +from dash_mui_charts import ScatterChart + +ScatterChart( + series=[ + { + 'id': 'group-a', + 'label': 'Group A', + 'data': [{'x': 1, 'y': 5, 'id': 0}, {'x': 2, 'y': 8, 'id': 1}], + 'color': '#1976d2', + 'markerSize': 6, + }, + ], + voronoiMaxRadius=30, # proximity-based hover/click + height=400, +) +``` + +Axes support `scaleType` including log and sqrt scales; +`renderer='svg-batch'` speeds up large datasets. + +.. admonition::seriesId, not seriesIndex + :icon: mdi:information-outline + :color: blue + + MUI X Charts uses `seriesId` (a string), not `seriesIndex`, in event + payloads like `clickData`. + +--- + +### Basic scatter — two series + +Two data clusters plotted as separate series with grid lines. + +.. exec::docs.scatter.basic_example + :code: false + +.. source::docs/scatter/basic_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Custom marker sizes + +Use `markerSize` (the radius in pixels) to differentiate series — smaller +markers for dense data, larger for emphasis. + +.. exec::docs.scatter.sizes_example + :code: false + +.. source::docs/scatter/sizes_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Z-axis color mapping + +Use `zAxis` with a `colorMap` to color scatter points by a third variable +(continuous, piecewise, or ordinal). Color priority: z-axis > y-axis > +x-axis > series color. + +.. exec::docs.scatter.colormap_example + :code: false + +.. source::docs/scatter/colormap_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Log scale axis + +Scatter charts support logarithmic axis scales for data spanning multiple +orders of magnitude. + +.. exec::docs.scatter.log_example + :code: false + +.. source::docs/scatter/log_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Click events + +Click on scatter points to capture event data in Dash callbacks — +`clickData` reports `{'type': 'scatter', 'seriesId': ..., 'dataIndex': ..., +'x': ..., 'y': ...}`. `voronoiMaxRadius` controls the interaction distance. + +.. exec::docs.scatter.click_example + :code: false + +.. source::docs/scatter/click_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Dataset-driven scatter + +Use the `dataset` prop with `datasetKeys` to map columns to x/y axes — +useful when data comes from a shared table format. + +.. exec::docs.scatter.dataset_example + :code: false + +.. source::docs/scatter/dataset_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Axis styling + +The full axis API: `tickLabelStyle`, `labelStyle`, `tickSize`, +`tickNumber`, `domainLimit`, `disableLine` and more. + +.. exec::docs.scatter.axis_styling_example + :code: false + +.. source::docs/scatter/axis_styling_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Related pages + +- [CompositeChart](/composite) — layer scatter and line series on one surface diff --git a/docs/scatter/sizes_example.py b/docs/scatter/sizes_example.py new file mode 100644 index 0000000..64843d3 --- /dev/null +++ b/docs/scatter/sizes_example.py @@ -0,0 +1,27 @@ +from dash_mui_charts import ScatterChart + +from docs.scatter._data import size_data_large, size_data_small + +component = ScatterChart( + id='scatter-sizes', + height=300, + series=[ + { + 'id': 'small-markers', + 'label': 'Background (r=3)', + 'data': size_data_large, + 'color': '#90caf9', + 'markerSize': 3, + }, + { + 'id': 'large-markers', + 'label': 'Focus Points (r=10)', + 'data': size_data_small, + 'color': '#e53935', + 'markerSize': 10, + 'highlightScope': {'highlight': 'item', 'fade': 'global'}, + }, + ], + xAxis=[{'label': 'X', 'min': 0, 'max': 100}], + yAxis=[{'label': 'Y', 'min': 0, 'max': 100, 'width': 40}], +) diff --git a/pages/sparkline_style_advanced.py b/docs/sparkline-style-advanced/glass_example.py similarity index 92% rename from pages/sparkline_style_advanced.py rename to docs/sparkline-style-advanced/glass_example.py index bb66d55..a8769ad 100644 --- a/pages/sparkline_style_advanced.py +++ b/docs/sparkline-style-advanced/glass_example.py @@ -1,25 +1,13 @@ +"""Liquid glass sparkline card — glassmorphism via assets/liquid_glass.css. + +Rendered on /sparkline-style-advanced via `.. exec::`; ported verbatim from +the pre-migration pages/sparkline_style_advanced.py (same ids, same +callback). """ -Advanced Sparkline with Liquid Glass Theme -Apple-inspired glassmorphism design with interactive hover effects. - -Features: -- Liquid glass (glassmorphism) card design -- Left-to-right reveal animation on page load -- Hover effect: left side 100% opacity, right side 40% opacity -- X-axis highlight line follows cursor -- Real-time value display -""" -import dash -from dash import html, callback, Input, Output, State +from dash import html, callback, Input, Output from dash_mui_charts import SparklineChart -dash.register_page( - __name__, - path='/sparkline-style-advanced', - name='Sparkline Advanced' -) - # Stock-like data with realistic movement STOCK_DATA = [ 142.50, 143.20, 141.80, 144.50, 146.20, 145.80, 147.90, 149.20, @@ -33,7 +21,7 @@ CHANGE = END_VALUE - START_VALUE CHANGE_PERCENT = (CHANGE / START_VALUE) * 100 -layout = html.Div( +component = html.Div( className='liquid-glass-background', children=[ html.Div( diff --git a/docs/sparkline-style-advanced/sparkline-style-advanced.md b/docs/sparkline-style-advanced/sparkline-style-advanced.md new file mode 100644 index 0000000..cff4fa0 --- /dev/null +++ b/docs/sparkline-style-advanced/sparkline-style-advanced.md @@ -0,0 +1,52 @@ +--- +name: Sparkline Advanced +description: "Advanced SparklineChart demo: a liquid glass (glassmorphism) stock card with reveal animation, hover opacity effects and real-time value display." +endpoint: /sparkline-style-advanced +package: dash_mui_charts +category: SparklineChart +icon: mdi:blur +--- + +.. llms_copy::Sparkline Advanced + +.. toc:: + +### Overview + +An Apple-inspired glassmorphism stock card built around a single +`SparklineChart`, showing how far the component styles with plain CSS: + +- liquid glass (glassmorphism) card design — `assets/liquid_glass.css` +- left-to-right reveal animation on page load +- hover effect: left side 100% opacity, right side 40% opacity, driven by a + CSS custom property the callback sets from `hoverIndex` +- x-axis highlight line follows the cursor +- real-time value display fed by `hoverIndex` / `hoverValue` + +.. admonition::CSS dependency + :icon: mdi:language-css3 + :color: blue + + The card's entire look lives in `assets/liquid_glass.css` + (`liquid-glass-background`, `liquid-glass-card`, `sparkline-container`, + `value-display-panel`, …). The component itself only carries data and + hover props — delete the stylesheet and the page silently degrades to + unstyled divs. + +--- + +### Live example + +.. exec::docs.sparkline-style-advanced.glass_example + :code: false + +.. source::docs/sparkline-style-advanced/glass_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Related pages + +- [SparklineChart examples](/sparkline) — the component's full demo tour +- [Styling playground](/sparkline-style) — interactive controls with generated code diff --git a/pages/sparkline_style.py b/docs/sparkline-style/playground.py similarity index 97% rename from pages/sparkline_style.py rename to docs/sparkline-style/playground.py index 690ef24..21acc81 100644 --- a/pages/sparkline_style.py +++ b/docs/sparkline-style/playground.py @@ -1,13 +1,12 @@ +"""SparklineChart styling playground — the whole control board. + +Rendered on /sparkline-style via `.. exec::`; ported verbatim from the +pre-migration pages/sparkline_style.py (same ids, same callbacks). """ -SparklineChart Styling Playground -Interactive control board for customizing sparkline appearance using dash-mantine-components. -""" -import dash -from dash import html, callback, Input, Output, State, dcc, no_update +from dash import html, callback, Input, Output, dcc import dash_mantine_components as dmc -from dash_mui_charts import SparklineChart -dash.register_page(__name__, path='/sparkline-style', name='Sparkline Style') +from dash_mui_charts import SparklineChart # Sample data for preview PREVIEW_DATA = [ @@ -72,17 +71,9 @@ def create_control_card(title, children): ) -layout = html.Div( +component = html.Div( style={'maxWidth': '1200px', 'margin': '0 auto', 'padding': '20px'}, children=[ - # Header - html.H1('SparklineChart Styling Playground', style={'marginBottom': '10px'}), - html.P( - 'Interactive control board for customizing sparkline appearance. ' - 'Adjust the controls below to see real-time changes.', - style={'color': 'var(--mantine-color-dimmed)', 'marginBottom': '30px'} - ), - # Live Preview Section dmc.Paper( shadow='md', diff --git a/docs/sparkline-style/sparkline-style.md b/docs/sparkline-style/sparkline-style.md new file mode 100644 index 0000000..88fcef9 --- /dev/null +++ b/docs/sparkline-style/sparkline-style.md @@ -0,0 +1,45 @@ +--- +name: Sparkline Style +description: "Interactive SparklineChart styling playground: tweak color, plot type, curve, area, size and highlights with a live preview and generated code." +endpoint: /sparkline-style +package: dash_mui_charts +category: SparklineChart +icon: mdi:palette-outline +--- + +.. llms_copy::Sparkline Style + +.. toc:: + +### Overview + +An interactive control board for customizing sparkline appearance. Adjust +the controls to see real-time changes in the live preview — the **Generated +Code** panel at the bottom writes the exact `SparklineChart(...)` call for +the current settings, ready to copy into your app. + +Controls cover the full styling surface: + +- **Colors** — chart color and preview background +- **Chart type** — line or bar, curve interpolation, stroke width, area fill and baseline +- **Dimensions** — width and height +- **Interactive features** — tooltip, highlight, x-axis highlight, highlight dot size +- **Margins** and **clip-area offsets** — fine positioning + +--- + +### Playground + +.. exec::docs.sparkline-style.playground + :code: false + +.. source::docs/sparkline-style/playground.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Related pages + +- [SparklineChart examples](/sparkline) — the component's full demo tour +- [Advanced styling](/sparkline-style-advanced) — liquid glass (glassmorphism) sparkline card diff --git a/docs/sparkline/area_example.py b/docs/sparkline/area_example.py new file mode 100644 index 0000000..c55f2e2 --- /dev/null +++ b/docs/sparkline/area_example.py @@ -0,0 +1,34 @@ +from dash import html + +from dash_mui_charts import SparklineChart + +temperature_week = [72, 75, 78, 82, 79, 74, 71] + + +def _row(label, spark): + return html.Div( + [ + html.Span(label, style={"width": "120px", + "display": "inline-block"}), + spark, + ], + style={"marginBottom": "10px"}, + ) + + +component = html.Div( + [ + # baseline='min' — fills from the minimum value (default) + _row("baseline='min': ", + SparklineChart(data=temperature_week, width=150, height=40, + color="#ff9800", area=True, baseline="min")), + # baseline='max' — fills from the maximum (inverted) + _row("baseline='max': ", + SparklineChart(data=temperature_week, width=150, height=40, + color="#2196f3", area=True, baseline="max")), + # baseline=75 — fills from a specific value + _row("baseline=75: ", + SparklineChart(data=temperature_week, width=150, height=40, + color="#9c27b0", area=True, baseline=75)), + ] +) diff --git a/docs/sparkline/bar_example.py b/docs/sparkline/bar_example.py new file mode 100644 index 0000000..804e5e2 --- /dev/null +++ b/docs/sparkline/bar_example.py @@ -0,0 +1,39 @@ +from dash import html + +from dash_mui_charts import SparklineChart + +error_rates = [2, 5, 3, 8, 4, 2, 1, 3, 2, 4] + +component = html.Div( + [ + html.Div( + [ + html.Span("Daily Errors: ", + style={"marginRight": "10px", "fontWeight": "bold"}), + SparklineChart( + data=error_rates, + width=150, + height=40, + plotType="bar", + color="#f44336", + ), + ], + style={"display": "flex", "alignItems": "center", + "marginBottom": "15px"}, + ), + html.Div( + [ + html.Span("Weekly Sales: ", + style={"marginRight": "10px", "fontWeight": "bold"}), + SparklineChart( + data=[120, 145, 132, 168, 155, 142, 178], + width=150, + height=40, + plotType="bar", + color="#2196f3", + ), + ], + style={"display": "flex", "alignItems": "center"}, + ), + ] +) diff --git a/docs/sparkline/basic_example.py b/docs/sparkline/basic_example.py new file mode 100644 index 0000000..e6ec30b --- /dev/null +++ b/docs/sparkline/basic_example.py @@ -0,0 +1,39 @@ +from dash import html + +from dash_mui_charts import SparklineChart + +sales_trend = [10, 15, 8, 22, 18, 25, 30, 28, 35, 40, 38, 45] +stock_prices = [142.5, 145.2, 143.8, 148.9, 151.2, 149.5, 155.8, 158.2, + 154.3, 160.1] + +component = html.Div( + [ + html.Div( + [ + html.Span("Sales Trend: ", + style={"marginRight": "10px", "fontWeight": "bold"}), + SparklineChart( + data=sales_trend, + width=150, + height=30, + color="#1976d2", + ), + ], + style={"display": "flex", "alignItems": "center", + "marginBottom": "15px"}, + ), + html.Div( + [ + html.Span("Stock Price: ", + style={"marginRight": "10px", "fontWeight": "bold"}), + SparklineChart( + data=stock_prices, + width=150, + height=30, + color="#4caf50", + ), + ], + style={"display": "flex", "alignItems": "center"}, + ), + ] +) diff --git a/docs/sparkline/curves_example.py b/docs/sparkline/curves_example.py new file mode 100644 index 0000000..d5b0c1b --- /dev/null +++ b/docs/sparkline/curves_example.py @@ -0,0 +1,27 @@ +from dash import html + +from dash_mui_charts import SparklineChart + +sales_trend = [10, 15, 8, 22, 18, 25, 30, 28, 35, 40, 38, 45] + + +def _row(label, curve, color): + return html.Div( + [ + html.Span(label, style={"width": "100px", + "display": "inline-block"}), + SparklineChart(data=sales_trend, width=120, height=30, + color=color, curve=curve), + ], + style={"marginBottom": "10px"}, + ) + + +component = html.Div( + [ + _row("Linear: ", "linear", "#1976d2"), + _row("Natural: ", "natural", "#4caf50"), + _row("Step: ", "step", "#ff9800"), + _row("MonotoneX: ", "monotoneX", "#9c27b0"), + ] +) diff --git a/docs/sparkline/dynamic_example.py b/docs/sparkline/dynamic_example.py new file mode 100644 index 0000000..68e0a41 --- /dev/null +++ b/docs/sparkline/dynamic_example.py @@ -0,0 +1,82 @@ +from dash import Input, Output, callback, dcc, html + +from dash_mui_charts import SparklineChart + +revenue_data = [42, 45, 48, 52, 49, 55, 58, 62, 60, 65] +users_data = [1200, 1350, 1420, 1580, 1520, 1680, 1750, 1890, 1820, 1950] +sessions_data = [3500, 3800, 4100, 4500, 4200, 4800, 5100, 5400, 5200, 5600] +error_rates = [2, 5, 3, 8, 4, 2, 1, 3, 2, 4] + +component = html.Div( + [ + html.Div( + [ + html.Label("Select Metric:", + style={"marginRight": "10px", + "fontWeight": "bold"}), + dcc.Dropdown( + id="metric-selector", + options=[ + {"label": "Revenue", "value": "revenue"}, + {"label": "Users", "value": "users"}, + {"label": "Sessions", "value": "sessions"}, + {"label": "Errors", "value": "errors"}, + ], + value="revenue", + style={"width": "200px"}, + clearable=False, + ), + ], + style={"marginBottom": "20px"}, + ), + html.Div( + [ + html.Div(id="dynamic-metric-label", children="Revenue Trend", + style={"fontSize": "14px", "color": "#666", + "marginBottom": "5px"}), + html.Div(id="dynamic-metric-value", children="$65K", + style={"fontSize": "32px", "fontWeight": "bold", + "marginBottom": "10px"}), + html.Div(id="dynamic-sparkline-container"), + ], + style={ + "backgroundColor": "white", + "padding": "20px", + "borderRadius": "8px", + "boxShadow": "0 2px 4px rgba(0,0,0,0.1)", + "width": "300px", + }, + ), + ] +) + + +@callback( + Output("dynamic-sparkline-container", "children"), + Output("dynamic-metric-label", "children"), + Output("dynamic-metric-value", "children"), + Input("metric-selector", "value"), +) +def update_dynamic_sparkline(metric): + """Update sparkline based on selected metric.""" + data_map = { + "revenue": (revenue_data, "#4caf50", "Revenue Trend", + f"${revenue_data[-1]}K"), + "users": (users_data, "#2196f3", "Active Users", + f"{users_data[-1]:,}"), + "sessions": (sessions_data, "#ff9800", "Sessions", + f"{sessions_data[-1]:,}"), + "errors": (error_rates, "#f44336", "Error Rate", + str(error_rates[-1])), + } + data, color, label, value = data_map[metric] + + return SparklineChart( + data=data, + width=260, + height=50, + color=color, + area=True, + showHighlight=True, + showTooltip=True, + ), label, value diff --git a/docs/sparkline/interactive_example.py b/docs/sparkline/interactive_example.py new file mode 100644 index 0000000..9fa426d --- /dev/null +++ b/docs/sparkline/interactive_example.py @@ -0,0 +1,79 @@ +import json + +from dash import Input, Output, callback, html + +from dash_mui_charts import SparklineChart + +stock_prices = [142.5, 145.2, 143.8, 148.9, 151.2, 149.5, 155.8, 158.2, + 154.3, 160.1] + +component = html.Div( + [ + html.Div( + [ + html.Div( + [ + html.Span("Stock Price: ", + style={"fontWeight": "bold"}), + html.Span(id="stock-price-display", + children=f"${stock_prices[-1]:.2f}"), + ], + style={"marginBottom": "10px"}, + ), + SparklineChart( + id="interactive-stock-sparkline", + data=stock_prices, + width=300, + height=60, + color="#1976d2", + area=True, + showTooltip=True, + showHighlight=True, + xAxis={"id": "stock-axis", + "data": ["Day 1", "Day 2", "Day 3", "Day 4", + "Day 5", "Day 6", "Day 7", "Day 8", + "Day 9", "Day 10"]}, + axisHighlight={"x": "line"}, + ), + ] + ), + html.Div( + [ + html.Strong("Hover Data:"), + html.Pre( + id="stock-hover-output", + children="Hover over the chart to see details", + style={ + "backgroundColor": "#f5f5f5", + "padding": "15px", + "borderRadius": "5px", + "whiteSpace": "pre-wrap", + "fontSize": "12px", + "overflow": "auto", + "marginTop": "10px", + "minHeight": "60px", + }, + ), + ], + style={"marginTop": "15px"}, + ), + ] +) + + +@callback( + Output("stock-price-display", "children"), + Output("stock-hover-output", "children"), + Input("interactive-stock-sparkline", "hoverIndex"), + Input("interactive-stock-sparkline", "hoverValue"), + prevent_initial_call=True, +) +def update_stock_display(index, value): + """Update stock price display based on hover.""" + if index is not None and value is not None: + return f"${value:.2f}", json.dumps({ + "index": index, + "value": value, + "day": f"Day {index + 1}", + }, indent=2) + return f"${stock_prices[-1]:.2f}", "Hover over the chart to see details" diff --git a/docs/sparkline/npm_example.py b/docs/sparkline/npm_example.py new file mode 100644 index 0000000..aaf844d --- /dev/null +++ b/docs/sparkline/npm_example.py @@ -0,0 +1,88 @@ +from dash import Input, Output, callback, html + +from dash_mui_charts import SparklineChart + +weekly_downloads = [ + 125430, 142350, 138200, 156780, 162340, 158900, 171200, + 168500, 175600, 182300, 178900, 195400, +] +weeks = [ + 'Dec 1-7', 'Dec 8-14', 'Dec 15-21', 'Dec 22-28', + 'Dec 29-Jan 4', 'Jan 5-11', 'Jan 12-18', + 'Jan 19-25', 'Jan 26-Feb 1', 'Feb 2-8', 'Feb 9-15', 'Feb 16-22', +] + +component = html.Div( + html.Div( + [ + html.Div( + [ + html.Span("📦 ", style={"marginRight": "5px"}), + html.Span( + id="npm-week-label", + children="Weekly Downloads", + style={"color": "#666", "fontSize": "14px"}, + ), + ], + style={"marginBottom": "8px"}, + ), + html.Div( + [ + html.Span( + id="npm-download-count", + children=f"{weekly_downloads[-1]:,}", + style={"fontSize": "28px", "fontWeight": "bold", + "color": "#333"}, + ), + html.Div( + SparklineChart( + id="npm-sparkline", + data=weekly_downloads, + width=200, + height=45, + color="rgb(137, 86, 255)", + area=True, + showHighlight=True, + baseline="min", + margin={"top": 5, "right": 0, "bottom": 0, + "left": 4}, + xAxis={"id": "week-axis", "data": weeks}, + axisHighlight={"x": "line"}, + slotProps={"lineHighlight": {"r": 4}}, + clipAreaOffset={"top": 2, "bottom": 2}, + ), + style={"marginLeft": "auto"}, + ), + ], + style={ + "display": "flex", + "alignItems": "flex-end", + "justifyContent": "space-between", + "borderBottom": "2px solid rgba(137, 86, 255, 0.2)", + "paddingBottom": "5px", + }, + ), + ], + style={ + "width": "350px", + "backgroundColor": "white", + "padding": "15px 20px", + "borderRadius": "8px", + "boxShadow": "0 2px 8px rgba(0,0,0,0.1)", + }, + ) +) + + +@callback( + Output("npm-download-count", "children"), + Output("npm-week-label", "children"), + Input("npm-sparkline", "hoverIndex"), + Input("npm-sparkline", "hoverValue"), + prevent_initial_call=True, +) +def update_npm_display(hover_index, hover_value): + """Update npm-style display based on hover.""" + if hover_index is not None and hover_value is not None: + return f"{int(hover_value):,}", weeks[hover_index] + return f"{weekly_downloads[-1]:,}", "Weekly Downloads" diff --git a/docs/sparkline/sparkline.md b/docs/sparkline/sparkline.md new file mode 100644 index 0000000..674872a --- /dev/null +++ b/docs/sparkline/sparkline.md @@ -0,0 +1,178 @@ +--- +name: SparklineChart +description: "SparklineChart demos: line, area and bar sparklines for KPI cards and tables, synced multi-metric hover, custom curves and callback-driven data." +endpoint: /sparkline +package: dash_mui_charts +category: SparklineChart +icon: mdi:chart-line-variant +--- + +.. llms_copy::SparklineChart + +.. toc:: + +### Overview + +Sparklines are compact, inline charts (default 36px height) that show a data +trend without axes or labels — ideal for dashboards, KPI cards and table +cells. This is a **Community component**: no MUI X license key required. + +```python +from dash_mui_charts import SparklineChart + +SparklineChart( + data=[1, 4, 2, 5, 7, 2, 4, 6], + plotType='line', # or 'bar' + color='#1976d2', + area=True, + height=40, + width=150, +) +``` + +Key props: + +- `data` — list of numbers to plot +- `plotType` — `'line'` (default) or `'bar'` +- `area` — fill the region under the line +- `color`, `height`, `width` — appearance and sizing +- `curve` — line interpolation: `'linear'`, `'natural'`, `'monotoneX'`, `'step'`, and more +- `showTooltip` / `showHighlight` — hover value display and point marker +- `baseline` and `margin` — area baseline and plot margins +- `highlightedIndex` — controlled highlight, to sync the marked point with a table row, slider or another chart + +--- + +### Basic line sparkline + +The simplest sparkline — just pass an array of numbers. Great for showing +trends at a glance. + +.. exec::docs.sparkline.basic_example + :code: false + +.. source::docs/sparkline/basic_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### NPM-style downloads sparkline + +A rich interactive sparkline like npm's package download chart. Hover over +the chart to see weekly download counts update in real time — the +`hoverIndex` / `hoverValue` props feed a Dash callback. + +.. exec::docs.sparkline.npm_example + :code: false + +.. source::docs/sparkline/npm_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Synchronized multi-metric dashboard + +Multiple sparklines that sync their hover state. Hover over any chart to see +all metrics for that time period. + +.. exec::docs.sparkline.synced_example + :code: false + +.. source::docs/sparkline/synced_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Area sparkline + +Add `area=True` to fill the area under the line. Use `baseline` to control +where the fill starts: `'min'` (default), `'max'`, or a specific value. + +.. exec::docs.sparkline.area_example + :code: false + +.. source::docs/sparkline/area_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Bar sparkline + +Use `plotType='bar'` for a bar chart sparkline. Good for discrete values or +comparing magnitudes. + +.. exec::docs.sparkline.bar_example + :code: false + +.. source::docs/sparkline/bar_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Sparklines in a table + +Sparklines are perfect for embedding in data tables to show trends alongside +other metrics. + +.. exec::docs.sparkline.table_example + :code: false + +.. source::docs/sparkline/table_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Callback-triggered data changes + +Change the sparkline data dynamically from a Dash callback. Select a metric +to see different trend data. + +.. exec::docs.sparkline.dynamic_example + :code: false + +.. source::docs/sparkline/dynamic_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Custom curves + +Use different curve interpolation methods for different visual effects. +Available curves: `'linear'`, `'natural'`, `'step'`, `'stepBefore'`, +`'stepAfter'`, `'monotoneX'`, `'monotoneY'`, `'catmullRom'`, `'bumpX'`, +`'bumpY'`. + +.. exec::docs.sparkline.curves_example + :code: false + +.. source::docs/sparkline/curves_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Interactive sparkline with hover details + +Enable tooltips and highlighting to make sparklines interactive. The +`hoverIndex` and `hoverValue` props update as you move across the chart. + +.. exec::docs.sparkline.interactive_example + :code: false + +.. source::docs/sparkline/interactive_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Related pages + +- [Styling playground](/sparkline-style) — interactive styling controls with live preview and generated code +- [Advanced styling](/sparkline-style-advanced) — liquid glass (glassmorphism) sparkline card diff --git a/docs/sparkline/synced_example.py b/docs/sparkline/synced_example.py new file mode 100644 index 0000000..7a12d53 --- /dev/null +++ b/docs/sparkline/synced_example.py @@ -0,0 +1,129 @@ +from dash import Input, Output, callback, html + +from dash_mui_charts import SparklineChart + +revenue_data = [42, 45, 48, 52, 49, 55, 58, 62, 60, 65] +users_data = [1200, 1350, 1420, 1580, 1520, 1680, 1750, 1890, 1820, 1950] +sessions_data = [3500, 3800, 4100, 4500, 4200, 4800, 5100, 5400, 5200, 5600] +metric_labels = ['Week 1', 'Week 2', 'Week 3', 'Week 4', 'Week 5', + 'Week 6', 'Week 7', 'Week 8', 'Week 9', 'Week 10'] + +kpi_card_style = { + "backgroundColor": "white", + "borderRadius": "8px", + "padding": "20px", + "boxShadow": "0 2px 4px rgba(0,0,0,0.1)", + "width": "280px", +} + + +def _kpi_card(title, value_id, label_id, value, spark): + return html.Div( + [ + html.Div(title, style={"fontSize": "12px", "color": "#666", + "marginBottom": "5px"}), + html.Div( + [ + html.Span(id=value_id, children=value, + style={"fontSize": "24px", + "fontWeight": "bold"}), + html.Span(id=label_id, children="", + style={"fontSize": "11px", "color": "#999", + "marginLeft": "8px"}), + ] + ), + spark, + ], + ) + + +component = html.Div( + [ + html.Div( + _kpi_card( + "Revenue", "sync-revenue-value", "sync-revenue-label", + f"${revenue_data[-1]}K", + SparklineChart( + id="sync-revenue-spark", + data=revenue_data, + width=200, + height=35, + color="#4caf50", + area=True, + showHighlight=True, + xAxis={"id": "rev-axis", "data": metric_labels}, + ), + ), + style={**kpi_card_style, "borderTop": "3px solid #4caf50"}, + ), + html.Div( + _kpi_card( + "Active Users", "sync-users-value", "sync-users-label", + f"{users_data[-1]:,}", + SparklineChart( + id="sync-users-spark", + data=users_data, + width=200, + height=35, + color="#2196f3", + area=True, + showHighlight=True, + xAxis={"id": "users-axis", "data": metric_labels}, + ), + ), + style={**kpi_card_style, "borderTop": "3px solid #2196f3"}, + ), + html.Div( + _kpi_card( + "Sessions", "sync-sessions-value", "sync-sessions-label", + f"{sessions_data[-1]:,}", + SparklineChart( + id="sync-sessions-spark", + data=sessions_data, + width=200, + height=35, + color="#ff9800", + area=True, + showHighlight=True, + xAxis={"id": "sessions-axis", "data": metric_labels}, + ), + ), + style={**kpi_card_style, "borderTop": "3px solid #ff9800"}, + ), + ], + style={"display": "flex", "gap": "20px", "flexWrap": "wrap"}, +) + + +@callback( + Output("sync-revenue-value", "children"), + Output("sync-revenue-label", "children"), + Output("sync-users-value", "children"), + Output("sync-users-label", "children"), + Output("sync-sessions-value", "children"), + Output("sync-sessions-label", "children"), + Input("sync-revenue-spark", "hoverIndex"), + Input("sync-users-spark", "hoverIndex"), + Input("sync-sessions-spark", "hoverIndex"), + prevent_initial_call=True, +) +def sync_hover(rev_idx, users_idx, sessions_idx): + """Sync hover state across multiple sparklines.""" + idx = None + for i in [rev_idx, users_idx, sessions_idx]: + if i is not None: + idx = i + break + + if idx is not None: + label = metric_labels[idx] + return ( + f"${revenue_data[idx]}K", label, + f"{users_data[idx]:,}", label, + f"{sessions_data[idx]:,}", label, + ) + return ( + f"${revenue_data[-1]}K", "", + f"{users_data[-1]:,}", "", + f"{sessions_data[-1]:,}", "", + ) diff --git a/docs/sparkline/table_example.py b/docs/sparkline/table_example.py new file mode 100644 index 0000000..63dac05 --- /dev/null +++ b/docs/sparkline/table_example.py @@ -0,0 +1,70 @@ +from dash import html + +from dash_mui_charts import SparklineChart + +_th = {"textAlign": "left", "padding": "12px", + "borderBottom": "2px solid #ddd"} +_td = {"padding": "12px"} +_num = {"textAlign": "right", "padding": "12px", "fontWeight": "bold"} +_mid = {"textAlign": "center", "padding": "12px"} + + +def _spark_row(metric, current, spark, change, change_color): + return html.Tr( + [ + html.Td(metric, style=_td), + html.Td(current, style=_num), + html.Td(spark, style=_mid), + html.Td(change, style={"textAlign": "right", "padding": "12px", + "color": change_color}), + ] + ) + + +component = html.Table( + [ + html.Thead( + html.Tr( + [ + html.Th("Metric", style=_th), + html.Th("Current", style={**_th, "textAlign": "right"}), + html.Th("Trend (7 days)", + style={**_th, "textAlign": "center"}), + html.Th("Change", style={**_th, "textAlign": "right"}), + ] + ) + ), + html.Tbody( + [ + _spark_row( + "Revenue", "$45,230", + SparklineChart(data=[38, 42, 40, 44, 43, 45, 45], + width=100, height=25, color="#4caf50", + area=True), + "+12%", "#4caf50", + ), + _spark_row( + "Users", "2,847", + SparklineChart(data=[2200, 2350, 2400, 2500, 2650, 2750, + 2847], + width=100, height=25, color="#2196f3", + area=True), + "+29%", "#4caf50", + ), + _spark_row( + "Errors", "23", + SparklineChart(data=[45, 38, 42, 35, 30, 28, 23], + width=100, height=25, color="#f44336"), + "-49%", "#4caf50", + ), + _spark_row( + "Response Time", "245ms", + SparklineChart(data=[220, 235, 242, 238, 250, 248, 245], + width=100, height=25, color="#ff9800"), + "+11%", "#f44336", + ), + ] + ), + ], + style={"width": "100%", "borderCollapse": "collapse", "marginTop": "10px"}, +) diff --git a/pages/time_clock.py b/docs/time_clock/demo.py similarity index 86% rename from pages/time_clock.py rename to docs/time_clock/demo.py index 7e31f95..6c5dd61 100644 --- a/pages/time_clock.py +++ b/docs/time_clock/demo.py @@ -1,18 +1,10 @@ -""" -Time Clock — inline time selection (no input / popper / modal). +"""Time Clock demo — rendered on /time-clock via `.. exec::`. -A limited working example for the TimeClock component, wrapping MUI X -@mui/x-date-pickers TimeClock. Mirrors the official MUI demo sections: -basic usage, controlled vs uncontrolled, form props, views, and 12h/24h format. +Ported verbatim from the pre-migration pages/time_clock.py (same ids, same callbacks). """ - import json - -import dash import dash_mantine_components as dmc -from dash import html, callback, Input, Output, ctx, no_update - -dash.register_page(__name__, path='/time-clock', name='Time Clock') +from dash import callback, Input, Output, ctx, no_update from dash_mui_charts import TimeClock @@ -47,28 +39,8 @@ def section(title, description, *children): # --------------------------------------------------------------------------- # # Layout # --------------------------------------------------------------------------- # -layout = dmc.Container( +component = dmc.Container( [ - dmc.Stack( - [ - dmc.Group( - [ - dmc.Title("Time Clock", order=1), - dmc.Badge("Community", color="teal", variant="light"), - ], - align="center", - ), - dmc.Text( - "Select a time directly on a clock face — no text input, popper, " - "or modal. Values cross the Dash boundary as strings " - "(\"15:30\" or \"2022-04-17T15:30:00\").", - c="dimmed", - ), - ], - gap=4, - mb="lg", - ), - # --- 1. Basic usage -------------------------------------------------- section( "1. Basic usage", diff --git a/docs/time_clock/time-clock.md b/docs/time_clock/time-clock.md new file mode 100644 index 0000000..cfab821 --- /dev/null +++ b/docs/time_clock/time-clock.md @@ -0,0 +1,88 @@ +--- +name: Time Clock +description: "TimeClock demos mirroring the MUI docs: basic usage, controlled vs uncontrolled values, disabled/readOnly, view configuration and 12h/24h format." +endpoint: /time-clock +package: dash_mui_charts +category: Date & Time Pickers +icon: mdi:clock-outline +--- + +.. llms_copy::Time Clock + +.. toc:: + +### Overview + +TimeClock demos mirroring the MUI docs: basic usage, controlled vs uncontrolled values, disabled/readOnly, view configuration and 12h/24h format. + + +`TimeClock` is an inline clock-face time selector — no text input, popper, or +modal; the user drags the hand or clicks the numbers to pick hours, minutes, +and optionally seconds. It is a **Community (free)** component and the +library's first **Date & Time Pickers** component (wrapping +`@mui/x-date-pickers` 8.24.0 with the dayjs adapter), NOT a chart. + +**String <-> dayjs boundary:** dayjs objects can't cross the Dash boundary, so +values are exchanged as strings — full wall-time ISO +(`"2022-04-17T15:30:00"`) or time-only (`"15:30"` / `"15:30:45"`). Strings are +parsed to dayjs on the way in; on the way out the value is formatted as local +wall-time `YYYY-MM-DDTHH:mm:ss` (not `toISOString()`, to avoid a UTC shift). + +### Usage + +```python +from dash_mui_charts import TimeClock + +TimeClock( + id="clock", + value="15:30:00", # controlled, in/out (wall-time ISO out) + defaultValue="15:30:00", # uncontrolled initial (use instead of value) + views=["hours", "minutes", "seconds"], # default ["hours", "minutes"] + view="hours", # controlled view, in/out + ampm=False, # force 12h/24h (omit = locale default) + minutesStep=5, + minTime="09:00", maxTime="18:00", + disabled=False, readOnly=False, + showViewSwitcher=True, +) +``` + +### Outputs + +`value` (wall-time ISO), `view`, and `timeData`: +`{"hours", "minutes", "seconds", "formatted" ("HH:mm:ss"), "event_timestamp"}`. + +```python +@callback(Output("out", "children"), Input("clock", "timeData")) +def show(td): + return td["formatted"] if td else "-" +``` + +### Notes + +- Function-only MUI props are omitted (not serializable across the Dash + boundary): `shouldDisableTime`, `referenceDate`, `slots`/`slotProps`. + `skipDisabled` is intentionally not exposed — it belongs to the digital + clock variants, not the analog `TimeClock`. +- Recolour via `sx` using internal MUI class names: face `.MuiClock-clock`, + hand `.MuiClockPointer-root` + `.MuiClockPointer-thumb` + centre + `.MuiClock-pin`, digits `.MuiClockNumber-root` / `-selected`, meridiem + `.MuiClock-amButton` / `-pmButton`. + +### Related pages + +- `/time-clock` — this demo (basic, controlled vs uncontrolled, form props, + views, 12h/24h) +- `/time-clock-lab` — dynamic colours, liquid glass theme, stopwatch, and + two-way pairings with dmc.TimeInput / TimePicker / TimeGrid / DateTimePicker + +--- + +### Live examples + +.. exec::docs.time_clock.demo + :code: false + +.. source::docs/time_clock/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/time_clock_lab.py b/docs/time_clock_lab/demo.py similarity index 95% rename from pages/time_clock_lab.py rename to docs/time_clock_lab/demo.py index 73b4fe7..544e72f 100644 --- a/pages/time_clock_lab.py +++ b/docs/time_clock_lab/demo.py @@ -1,27 +1,12 @@ -""" -TimeClock Lab — dynamic theming, a stopwatch, and two-way pairings with -dash-mantine-components time inputs. - -Shows the dash-mui-charts TimeClock working hand-in-hand with DMC. Each -example carries a syntax-highlighted "View code" panel (dmc.CodeHighlightTabs): - 1. dmc.ColorPicker/Input → recolor face (with opacity) + hand + digits live - 2. Liquid glass clock → CSS glassmorphism + magnifying-lens handle - 3. dcc.Interval → start/stop/restart stopwatch (seconds→minutes→hours) - 4. dmc.TimeInput → two-way sync + reset buttons - 5. dmc.TimePicker → two-way sync (dropdown, seconds) - 6. dmc.TimeGrid → two-way sync against preset half-hour slots - 7. dmc.DateTimePicker → the clock drives the time portion of a datetime -""" +"""TimeClock Lab demo — rendered on /time-clock-lab via `.. exec::`. +Ported verbatim from the pre-migration pages/time_clock_lab.py (same ids, same callbacks). +""" import datetime as _dt - -import dash import dash_mantine_components as dmc from dash import html, dcc, callback, Input, Output, State, ctx, no_update from dash_iconify import DashIconify -dash.register_page(__name__, path='/time-clock-lab', name='TimeClock Lab') - from dash_mui_charts import TimeClock @@ -337,31 +322,12 @@ def sync_datetime(clock_value, dtp_value, dtp_state): # --------------------------------------------------------------------------- # # Layout # --------------------------------------------------------------------------- # -layout = dmc.Container( +component = dmc.Container( [ dcc.Store(id="lab-sw-store", data={"elapsed": 0, "running": False}), dcc.Interval(id="lab-sw-interval", interval=1000, disabled=True, n_intervals=0), - dmc.Stack( - [ - dmc.Group( - [ - dmc.Title("TimeClock Lab", order=1), - dmc.Badge("TimeClock × DMC", color="grape", variant="light"), - ], - align="center", - ), - dmc.Text( - "Deep-dive examples pairing the MUI TimeClock with " - "dash-mantine-components — live theming, a stopwatch, and " - "fully two-way-synced time inputs.", - c="dimmed", - ), - ], - gap=4, mb="lg", - ), - # --- 1. Dynamic colours --------------------------------------------- lab_section( "mdi:palette-outline", diff --git a/docs/time_clock_lab/time-clock-lab.md b/docs/time_clock_lab/time-clock-lab.md new file mode 100644 index 0000000..65cb667 --- /dev/null +++ b/docs/time_clock_lab/time-clock-lab.md @@ -0,0 +1,27 @@ +--- +name: TimeClock Lab +description: "TimeClock experiments: live recoloring, a liquid-glass theme, a stopwatch, and two-way pairings with DMC TimeInput, TimePicker, TimeGrid and DateTimePicker." +endpoint: /time-clock-lab +package: dash_mui_charts +category: Date & Time Pickers +icon: mdi:flask-outline +--- + +.. llms_copy::TimeClock Lab + +.. toc:: + +### Overview + +TimeClock experiments: live recoloring, a liquid-glass theme, a stopwatch, and two-way pairings with DMC TimeInput, TimePicker, TimeGrid and DateTimePicker. + +--- + +### Live examples + +.. exec::docs.time_clock_lab.demo + :code: false + +.. source::docs/time_clock_lab/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/tree_basic.py b/docs/tree_basic/demo.py similarity index 93% rename from pages/tree_basic.py rename to docs/tree_basic/demo.py index b642306..080bfad 100644 --- a/pages/tree_basic.py +++ b/docs/tree_basic/demo.py @@ -1,16 +1,10 @@ -""" -Tree View - Basic Usage +"""Tree Basic demo — rendered on /tree-basic via `.. exec::`. -Demonstrates the core TreeView component with data-driven items, -default expansion, and click tracking. +Ported verbatim from the pre-migration pages/tree_basic.py (same ids, same callbacks). """ - import json -import dash from dash import html, callback, Input, Output -dash.register_page(__name__, path='/tree-basic', name='Tree Basic') - from dash_mui_charts import TreeView # --- Sample Data --- @@ -66,10 +60,7 @@ 'overflow': 'auto', } -layout = html.Div([ - html.H2("Tree View - Basic Usage"), - html.P("Data-driven tree using the RichTreeView component.", style={'color': '#666'}), - +component = html.Div([ # --- 1. Minimal tree --- html.Div([ html.H3("1. Minimal Tree"), diff --git a/docs/tree_basic/tree-basic.md b/docs/tree_basic/tree-basic.md new file mode 100644 index 0000000..30294d1 --- /dev/null +++ b/docs/tree_basic/tree-basic.md @@ -0,0 +1,92 @@ +--- +name: Tree Basic +description: "TreeView basics for Dash: data-driven items, defaultExpandedItems, click and focus tracking, and custom getItemId/getItemLabel accessors." +endpoint: /tree-basic +package: dash_mui_charts +category: TreeView +icon: mdi:file-tree +--- + +.. llms_copy::Tree Basic + +.. toc:: + +### Overview + +TreeView basics for Dash: data-driven items, defaultExpandedItems, click and focus tracking, and custom getItemId/getItemLabel accessors. + +\ +# TreeView + +TreeView is the data-driven tree component in dash-mui-charts (Community +license — no key needed). It wraps MUI X `RichTreeView`: you pass one nested +`items` list and the component renders the whole tree, with controlled +selection, expansion, in-place label editing, and per-item disabling +available through props. + +### Item shape + +```python +items = [ + {"id": "docs", "label": "Documents", "children": [ + {"id": "docs-resume", "label": "resume.pdf"}, + {"id": "docs-cover", "label": "cover_letter.docx"}, + ]}, +] +``` + +### Basic usage + +```python +from dash_mui_charts import TreeView + +TreeView( + id="tree", + items=items, + defaultExpandedItems=["docs"], +) +``` + +### Key props + +- `items` — nested list of `{id, label, children}` dicts (the whole tree). +- `defaultExpandedItems` — item ids expanded on load (uncontrolled). +- `expandedItems` / `selectedItems` — controlled equivalents, in/out. +- `getItemId` / `getItemLabel` / `getItemChildren` — string accessors for + when your dicts use different keys, e.g. `getItemId="key"`, + `getItemLabel="name"` maps `{"key": "a", "name": "Alpha"}` items. +- `expandIcon` / `collapseIcon` / `endIcon` — MUI icon names as strings. + +### Outputs (use as callback Inputs) + +- `clickedItem` — `{itemId, event_timestamp}` on every item click. +- `focusedItem` — fires when an item receives focus (click or keyboard nav). +- `expandedItems` / `selectedItems` — update as the user toggles/selects. +- `editedItemLabel` — `{itemId, newLabel}` after inline label editing. + +```python +@callback(Output("out", "children"), Input("tree", "clickedItem")) +def show_click(data): + return data["itemId"] if data else "Click an item..." +``` + +### Related pages + +- /tree-selection — single, multi, checkbox and propagated selection +- /tree-expansion — expansion triggers and controlled expand/collapse +- /tree-editing — inline label editing +- /tree-icons — icons, indentation, height and sx styling +- /tree-disabled — disabled items and focusability +- /tree-simple — SimpleTreeView, the lighter JSX-driven tree +- /tree-pro — TreeViewPro: drag-reorder, lazy loading, per-item controls + +--- + +### Live examples + +.. exec::docs.tree_basic.demo + :code: false + +.. source::docs/tree_basic/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/tree_disabled.py b/docs/tree_disabled/demo.py similarity index 90% rename from pages/tree_disabled.py rename to docs/tree_disabled/demo.py index 57c7c48..2b6f643 100644 --- a/pages/tree_disabled.py +++ b/docs/tree_disabled/demo.py @@ -1,16 +1,10 @@ -""" -Tree View - Disabled Items +"""Tree Disabled demo — rendered on /tree-disabled via `.. exec::`. -Demonstrates disabling specific items, disabledItemsFocusable, -and interaction of disabled items with selection. +Ported verbatim from the pre-migration pages/tree_disabled.py (same ids, same callbacks). """ - import json -import dash from dash import html, callback, Input, Output -dash.register_page(__name__, path='/tree-disabled', name='Tree Disabled') - from dash_mui_charts import TreeView PRODUCTS = [ @@ -45,10 +39,7 @@ 'overflow': 'auto', } -layout = html.Div([ - html.H2("Tree View - Disabled Items"), - html.P("Disable specific items to prevent selection and interaction.", style={'color': '#666'}), - +component = html.Div([ # --- 1. Disabled specific items --- html.Div([ html.H3("1. Disabled Pro/Premium Items"), diff --git a/docs/tree_disabled/tree-disabled.md b/docs/tree_disabled/tree-disabled.md new file mode 100644 index 0000000..23e89cd --- /dev/null +++ b/docs/tree_disabled/tree-disabled.md @@ -0,0 +1,27 @@ +--- +name: Tree Disabled +description: "TreeView disabled items: disabledItems blocking selection, checkbox propagation that skips them, disabledItemsFocusable, and disabled parent nodes." +endpoint: /tree-disabled +package: dash_mui_charts +category: TreeView +icon: mdi:cancel +--- + +.. llms_copy::Tree Disabled + +.. toc:: + +### Overview + +TreeView disabled items: disabledItems blocking selection, checkbox propagation that skips them, disabledItemsFocusable, and disabled parent nodes. + +--- + +### Live examples + +.. exec::docs.tree_disabled.demo + :code: false + +.. source::docs/tree_disabled/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/tree_editing.py b/docs/tree_editing/demo.py similarity index 91% rename from pages/tree_editing.py rename to docs/tree_editing/demo.py index 4c08162..a5d03a3 100644 --- a/pages/tree_editing.py +++ b/docs/tree_editing/demo.py @@ -1,16 +1,10 @@ -""" -Tree View - Label Editing +"""Tree Editing demo — rendered on /tree-editing via `.. exec::`. -Demonstrates inline label editing: edit all items, edit specific items, -and tracking edit events via callbacks. +Ported verbatim from the pre-migration pages/tree_editing.py (same ids, same callbacks). """ - import json -import dash from dash import html, callback, Input, Output -dash.register_page(__name__, path='/tree-editing', name='Tree Editing') - from dash_mui_charts import TreeView FILE_SYSTEM = [ @@ -46,10 +40,7 @@ 'overflow': 'auto', } -layout = html.Div([ - html.H2("Tree View - Label Editing"), - html.P("Double-click an item label to edit. Press Enter to save, Esc to cancel.", style={'color': 'var(--mantine-color-dimmed)'}), - +component = html.Div([ # --- 1. All items editable --- html.Div([ html.H3("1. All Items Editable"), diff --git a/docs/tree_editing/tree-editing.md b/docs/tree_editing/tree-editing.md new file mode 100644 index 0000000..ae18b18 --- /dev/null +++ b/docs/tree_editing/tree-editing.md @@ -0,0 +1,27 @@ +--- +name: Tree Editing +description: "Inline TreeView label editing: isItemEditable for all items, editableItems for a subset, and editedItemLabel callbacks with an edit history log." +endpoint: /tree-editing +package: dash_mui_charts +category: TreeView +icon: mdi:pencil-outline +--- + +.. llms_copy::Tree Editing + +.. toc:: + +### Overview + +Inline TreeView label editing: isItemEditable for all items, editableItems for a subset, and editedItemLabel callbacks with an edit history log. + +--- + +### Live examples + +.. exec::docs.tree_editing.demo + :code: false + +.. source::docs/tree_editing/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/tree_expansion.py b/docs/tree_expansion/demo.py similarity index 93% rename from pages/tree_expansion.py rename to docs/tree_expansion/demo.py index 6eeb41e..bd50682 100644 --- a/pages/tree_expansion.py +++ b/docs/tree_expansion/demo.py @@ -1,16 +1,10 @@ -""" -Tree View - Expansion +"""Tree Expansion demo — rendered on /tree-expansion via `.. exec::`. -Demonstrates expansion triggers, controlled expansion, -and expand/collapse all. +Ported verbatim from the pre-migration pages/tree_expansion.py (same ids, same callbacks). """ - import json -import dash from dash import html, callback, Input, Output -dash.register_page(__name__, path='/tree-expansion', name='Tree Expansion') - from dash_mui_charts import TreeView DEEP_TREE = [ @@ -48,10 +42,7 @@ 'overflow': 'auto', } -layout = html.Div([ - html.H2("Tree View - Expansion"), - html.P("Control how tree nodes expand and collapse.", style={'color': '#666'}), - +component = html.Div([ # --- 1. expansionTrigger="content" (default) --- html.Div([ html.H3('1. Expansion Trigger: "content" (default)'), diff --git a/docs/tree_expansion/tree-expansion.md b/docs/tree_expansion/tree-expansion.md new file mode 100644 index 0000000..a9282a3 --- /dev/null +++ b/docs/tree_expansion/tree-expansion.md @@ -0,0 +1,27 @@ +--- +name: Tree Expansion +description: "TreeView expansion control: content vs iconContainer triggers, controlled expandedItems with expand/collapse-all buttons, and expansion tracking." +endpoint: /tree-expansion +package: dash_mui_charts +category: TreeView +icon: mdi:unfold-more-horizontal +--- + +.. llms_copy::Tree Expansion + +.. toc:: + +### Overview + +TreeView expansion control: content vs iconContainer triggers, controlled expandedItems with expand/collapse-all buttons, and expansion tracking. + +--- + +### Live examples + +.. exec::docs.tree_expansion.demo + :code: false + +.. source::docs/tree_expansion/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/tree_icons.py b/docs/tree_icons/demo.py similarity index 93% rename from pages/tree_icons.py rename to docs/tree_icons/demo.py index 451c182..400af65 100644 --- a/pages/tree_icons.py +++ b/docs/tree_icons/demo.py @@ -1,14 +1,9 @@ -""" -Tree View - Icons & Appearance +"""Tree Icons demo — rendered on /tree-icons via `.. exec::`. -Demonstrates custom icons, indentation, height, and sx styling. +Ported verbatim from the pre-migration pages/tree_icons.py (same ids, same callbacks). """ - -import dash from dash import html -dash.register_page(__name__, path='/tree-icons', name='Tree Icons') - from dash_mui_charts import TreeView FILE_SYSTEM = [ @@ -32,10 +27,7 @@ section_style = {'marginBottom': '40px'} -layout = html.Div([ - html.H2("Tree View - Icons & Appearance"), - html.P("Customize icons, indentation, height, and styling.", style={'color': 'var(--mantine-color-dimmed)'}), - +component = html.Div([ # --- 1. Default icons --- html.Div([ html.H3("1. Default Icons"), @@ -159,7 +151,9 @@ "border": "1px solid #1976d2", "borderRadius": "8px", "padding": "12px", - "backgroundColor": "#f8f9ff", + # Theme-aware: a hardcoded light "#f8f9ff" made the box + # unreadable in dark mode (white card, light text). + "backgroundColor": "var(--mantine-color-default)", "& .MuiTreeItem-label": { "fontSize": "14px", }, diff --git a/docs/tree_icons/tree-icons.md b/docs/tree_icons/tree-icons.md new file mode 100644 index 0000000..b7a5355 --- /dev/null +++ b/docs/tree_icons/tree-icons.md @@ -0,0 +1,27 @@ +--- +name: Tree Icons +description: "TreeView appearance: custom expand/collapse/end icons, itemChildrenIndentation, fixed height with scrolling, and sx styling." +endpoint: /tree-icons +package: dash_mui_charts +category: TreeView +icon: mdi:palette-outline +--- + +.. llms_copy::Tree Icons + +.. toc:: + +### Overview + +TreeView appearance: custom expand/collapse/end icons, itemChildrenIndentation, fixed height with scrolling, and sx styling. + +--- + +### Live examples + +.. exec::docs.tree_icons.demo + :code: false + +.. source::docs/tree_icons/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/tree_pro.py b/docs/tree_pro/demo.py similarity index 95% rename from pages/tree_pro.py rename to docs/tree_pro/demo.py index e52d246..3204922 100644 --- a/pages/tree_pro.py +++ b/docs/tree_pro/demo.py @@ -1,32 +1,15 @@ -""" -Tree View Pro - Pro Features - -Demonstrates TreeViewPro with drag-and-drop reordering, plus per-item -Slider (0-100) and kebab action menu on each row. - -Section 3 is designed as the "map companion" pattern: a tree on the left where -each row carries a 0-100 progress slider and a ⋮ actions menu, paired with a -companion panel on the right that mirrors the selected layer's state. Slider -moves and menu picks are surfaced via dmc.Text so callback wiring is visible. +"""Tree Pro demo — rendered on /tree-pro via `.. exec::`. -IDs are derived from labels at startup (spaces → "-", duplicates get "-1", -"-2", ...). The right column shows the live reordered tree as nested JSON. - -Requires MUI X Pro license key. +Ported verbatim from the pre-migration pages/tree_pro.py (same ids, same callbacks). """ - import copy import os import json import re - -import dash import dash_mantine_components as dmc from dash import html, dcc, callback, Input, Output, State, no_update from dash_iconify import DashIconify -dash.register_page(__name__, path='/tree-pro', name='Tree Pro') - from dash_mui_charts import TreeViewPro # Try to load license key from environment @@ -216,16 +199,10 @@ def _stat_card(label, value_id, initial, icon): ) -layout = dmc.Stack( +component = dmc.Stack( [ dmc.Stack( [ - dmc.Title("Tree View Pro", order=2), - dmc.Text( - "Pro features: drag-and-drop reordering, plus per-item Slider (0–100) and kebab actions menu, " - "designed for pairing with a map / canvas as the layer list.", - c="dimmed", - ), dmc.Badge( f"License key: {'Set' if LICENSE_KEY else 'Not set (set MUI_PRO_API_KEY)'}", color="blue" if LICENSE_KEY else "red", diff --git a/docs/tree_pro/tree-pro.md b/docs/tree_pro/tree-pro.md new file mode 100644 index 0000000..dde03e1 --- /dev/null +++ b/docs/tree_pro/tree-pro.md @@ -0,0 +1,122 @@ +--- +name: Tree Pro +description: "TreeViewPro (MUI X Pro): drag-and-drop reordering, reorderable subsets, and per-item 0-100 sliders plus kebab action menus wired to Dash callbacks." +endpoint: /tree-pro +package: dash_mui_charts +category: TreeView +icon: mdi:diamond-outline +--- + +.. llms_copy::Tree Pro + +.. toc:: + +### Overview + +TreeViewPro (MUI X Pro): drag-and-drop reordering, reorderable subsets, and per-item 0-100 sliders plus kebab action menus wired to Dash callbacks. + +\ +# TreeViewPro + +TreeViewPro extends `TreeView` with MUI X Pro features — it requires an +MUI X Pro license key, passed as the `licenseKey` prop (this demo reads it +from the `MUI_PRO_API_KEY` environment variable). It is designed for the +"tree paired with a map / canvas" pattern where each leaf is a layer with +a 0-100 value and a row-level actions menu. + +### Pro features + +```python +import os +from dash_mui_charts import TreeViewPro + +TreeViewPro( + id="layers", + items=LAYER_ITEMS, + licenseKey=os.environ["MUI_PRO_API_KEY"], + itemsReordering=True, # drag-and-drop reorder + reorderableItems=["task-1"], # optional subset that may be reordered + lazyLoading=True, # fire `lazyLoadRequest` on expand + lazyLoadedChildren={...}, # parentId -> [child items] +) +``` + +Outputs from reorder / lazy loading: + +- `itemPositionChanged` — `{itemId, oldPosition, newPosition, + event_timestamp}` per move. +- `orderedItems` — the full live tree after each reorder, so Python can + render the current nested order without re-applying deltas. Falls back + to `items` until the first reorder. +- `lazyLoadRequest` — `{itemId, event_timestamp}` when an unloaded node + is expanded. + +### Per-item slider + kebab controls (`showItemControls=True`) + +```python +TreeViewPro( + showItemControls=True, + controlsItems=LEAF_IDS, # optional subset (leaves only) + sliderValues={"layer-a": 80}, # bidirectional {itemId: value} + sliderMin=0, sliderMax=100, sliderStep=1, + sliderColor="teal", # Mantine palette name, hex, or CSS + kebabMenuItems=[ + {"label": "Duplicate", "value": "duplicate", "icon": "ContentCopy"}, + {"label": "Delete", "value": "delete", "icon": "Delete"}, + ], +) +``` + +- `sliderChange` output — `{itemId, value, event_timestamp}` on slider + commit (mouse-up / touch-end); observe `sliderValues` for live mid-drag + values. +- `kebabAction` output — `{itemId, action, event_timestamp}` when a menu + item is picked; `action` is the chosen entry's `value`. +- `sliderColor` accepts Mantine palette names ("teal", "blue.5"), CSS + literals ("#ff6b6b"), or CSS expressions ("var(--mantine-color-...)"). + +### Kebab submenus, dividers, and per-node menus (v1.4.0) + +`kebabMenuItems` entries may be a leaf `{label, value, icon?}`, a +`{divider: True}` rule, or a submenu `{label, icon?, children: [entries]}` +that opens on hover/click (recursive nesting; a leaf anywhere in the chain +closes the whole menu and fires `kebabAction`). `kebabMenuItemsById` +(`{itemId: [entries]}`) overrides the global `kebabMenuItems` for that +node — same entry shape — so one tree can carry different action sets for +different node types. + +### Also supported (inherited patterns) + +Selection (`multiSelect`, `checkboxSelection`), controlled expansion, +inline label editing (`isItemEditable`, `editedItemLabel` output), and +custom icons work the same as on `TreeView`. + +### Related pages + +- /tree-basic — TreeView, the Community data-driven tree +- /tree-simple — SimpleTreeView, the lighter JSX-driven tree +- /tree-selection — selection modes +- /tree-expansion — expansion triggers and controlled expand/collapse +- /tree-editing — inline label editing +- /tree-icons — icons, indentation, height and sx styling +- /tree-disabled — disabled items and focusability + +.. admonition::Pro component demos + :icon: mdi:diamond-outline + :color: orange + + The examples on this page read a **MUI X Pro license key** from the + `MUI_PRO_API_KEY` environment variable and pass it as `licenseKey`. + Without it the tree renders with the unlicensed watermark; the badge + below reports the live posture. + +--- + +### Live examples + +.. exec::docs.tree_pro.demo + :code: false + +.. source::docs/tree_pro/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/tree_selection.py b/docs/tree_selection/demo.py similarity index 93% rename from pages/tree_selection.py rename to docs/tree_selection/demo.py index c2d1c8c..ba4aa25 100644 --- a/pages/tree_selection.py +++ b/docs/tree_selection/demo.py @@ -1,15 +1,9 @@ -""" -Tree View - Selection +"""Tree Selection demo — rendered on /tree-selection via `.. exec::`. -Demonstrates single selection, multi-select, checkbox selection, -selection propagation, and controlled selection. +Ported verbatim from the pre-migration pages/tree_selection.py (same ids, same callbacks). """ - import json -import dash -from dash import html, callback, Input, Output, State - -dash.register_page(__name__, path='/tree-selection', name='Tree Selection') +from dash import html, callback, Input, Output from dash_mui_charts import TreeView @@ -43,10 +37,7 @@ 'overflow': 'auto', } -layout = html.Div([ - html.H2("Tree View - Selection"), - html.P("Various selection modes and propagation behaviors.", style={'color': '#666'}), - +component = html.Div([ # --- 1. Single selection (default) --- html.Div([ html.H3("1. Single Selection (default)"), diff --git a/docs/tree_selection/tree-selection.md b/docs/tree_selection/tree-selection.md new file mode 100644 index 0000000..078bacd --- /dev/null +++ b/docs/tree_selection/tree-selection.md @@ -0,0 +1,27 @@ +--- +name: Tree Selection +description: "TreeView selection modes: single, multi-select, checkbox selection, parent/descendant propagation, disabled selection, and controlled selectedItems." +endpoint: /tree-selection +package: dash_mui_charts +category: TreeView +icon: mdi:check-box-outline +--- + +.. llms_copy::Tree Selection + +.. toc:: + +### Overview + +TreeView selection modes: single, multi-select, checkbox selection, parent/descendant propagation, disabled selection, and controlled selectedItems. + +--- + +### Live examples + +.. exec::docs.tree_selection.demo + :code: false + +.. source::docs/tree_selection/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/pages/tree_simple.py b/docs/tree_simple/demo.py similarity index 91% rename from pages/tree_simple.py rename to docs/tree_simple/demo.py index fcfb8a2..df6612e 100644 --- a/pages/tree_simple.py +++ b/docs/tree_simple/demo.py @@ -1,17 +1,10 @@ -""" -Tree View - SimpleTreeView +"""Tree Simple demo — rendered on /tree-simple via `.. exec::`. -Demonstrates the SimpleTreeView component which uses a different -item structure (itemId/label) and renders TreeItem JSX children. -Lighter alternative to the data-driven TreeView. +Ported verbatim from the pre-migration pages/tree_simple.py (same ids, same callbacks). """ - import json -import dash from dash import html, callback, Input, Output -dash.register_page(__name__, path='/tree-simple', name='Tree Simple') - from dash_mui_charts import SimpleTreeView # SimpleTreeView uses itemId (not id) and label @@ -62,13 +55,7 @@ 'overflow': 'auto', } -layout = html.Div([ - html.H2("SimpleTreeView"), - html.P( - "Lighter alternative using itemId/label structure. Items are rendered as TreeItem JSX children.", - style={'color': '#666'}, - ), - +component = html.Div([ # --- 1. Basic --- html.Div([ html.H3("1. Basic SimpleTreeView"), diff --git a/docs/tree_simple/sidebar_example.py b/docs/tree_simple/sidebar_example.py new file mode 100644 index 0000000..e7914e4 --- /dev/null +++ b/docs/tree_simple/sidebar_example.py @@ -0,0 +1,87 @@ +"""The dogfooding demo: this documentation's own sidebar as a SimpleTreeView. + +Before the boilerplate migration, this site's navigation WAS a +SimpleTreeView — the component navigating its own docs. The shell now uses +the network-standard navbar, so the dogfooding story lives here instead: +the tree below is built from `components/navbar.py`'s real family map (it +can never drift from the actual nav), and selecting a leaf genuinely +navigates, exactly as the old sidebar did. +""" +from dash import Input, Output, clientside_callback, html + +from dash_mui_charts import SimpleTreeView +from components.navbar import FAMILIES, TOP_LINKS + +_ICON_BY_FAMILY = { + "SparklineChart": "Timeline", + "PieChart": "PieChart", + "BarChart": "BarChart", + "Heatmap": "GridOn", + "ScatterChart": "ScatterPlot", + "LineChart": "ShowChart", + "CandlestickChart": "CandlestickChart", + "LiveTradingChart": "TrendingUp", + "CompositeChart": "Layers", + "TreeView": "AccountTree", + "Date & Time Pickers": "Schedule", +} + +items = [ + {"itemId": path, "label": label, "icon": "Home" if path == "/" else "History"} + for path, label, _icon in TOP_LINKS +] + [ + { + "itemId": f"group-{family}", + "label": family, + "icon": _ICON_BY_FAMILY.get(family, "Folder"), + "children": [ + {"itemId": path, "label": label, "icon": "PlayArrow"} + for path, label, _icon in entries + ], + } + for family, entries in FAMILIES +] + +component = html.Div( + [ + html.P( + "Click a leaf to navigate these docs — the tree is generated " + "from the site's real navigation map.", + style={"color": "var(--mantine-color-dimmed)", + "fontSize": "14px"}, + ), + SimpleTreeView( + id="tree-simple-sidebar-demo", + items=items, + defaultExpandedItems=["group-TreeView"], + itemChildrenIndentation="8px", + sx={ + "& .MuiTreeItem-label": {"fontSize": "14px", + "lineHeight": "1.6"}, + "& .MuiTreeItem-content": {"padding": "4px 10px", + "borderRadius": "6px", + "minHeight": "34px"}, + }, + ), + ], + style={"maxWidth": "320px"}, +) + + +# The old shell's navigation callback, verbatim in spirit: leaf selection +# drives the URL. Groups (non-path ids) are ignored. +clientside_callback( + """ + (selected) => { + if (selected && typeof selected === 'string' && selected.startsWith('/')) { + if (window.location.pathname !== selected) { + return selected; + } + } + return window.dash_clientside.no_update; + } + """, + Output("url", "href", allow_duplicate=True), + Input("tree-simple-sidebar-demo", "selectedItems"), + prevent_initial_call=True, +) diff --git a/docs/tree_simple/tree-simple.md b/docs/tree_simple/tree-simple.md new file mode 100644 index 0000000..9d19b63 --- /dev/null +++ b/docs/tree_simple/tree-simple.md @@ -0,0 +1,112 @@ +--- +name: Tree Simple +description: "SimpleTreeView examples: itemId/label items, checkbox multi-select, per-item disabled flags, custom icons, and the iconContainer expansion trigger." +endpoint: /tree-simple +package: dash_mui_charts +category: TreeView +icon: mdi:view-list-outline +--- + +.. llms_copy::Tree Simple + +.. toc:: + +### Overview + +SimpleTreeView examples: itemId/label items, checkbox multi-select, per-item disabled flags, custom icons, and the iconContainer expansion trigger. + +\ +# SimpleTreeView + +SimpleTreeView is the lightweight, JSX-driven tree in dash-mui-charts +(Community license — no key needed). Unlike the data-driven `TreeView` +(a `RichTreeView` wrapper with an MUI store), SimpleTreeView renders its +items as `TreeItem` JSX children — a lighter alternative that suits +navigation sidebars and small static trees. This documentation site +dogfoods it: the site's own sidebar navigation is a SimpleTreeView +(`NAV_ITEMS` in app.py). + +### Item shape — itemId, not id + +```python +items = [ + {"itemId": "1", "label": "Applications", "children": [ + {"itemId": "1.1", "label": "Calendar"}, + {"itemId": "1.2", "label": "Chrome"}, + ]}, +] +``` + +Items also support per-item flags directly on the dict: + +- `disabled: True` — item is greyed out and inert. +- `disableSelection: True` — item renders normally but cannot be selected. +- `icon` — an MUI icon name, resolved through the library's icon resolver. + +### Basic usage + +```python +from dash_mui_charts import SimpleTreeView + +SimpleTreeView( + id="nav", + items=items, + defaultExpandedItems=["1"], +) +``` + +### Key props + +- `multiSelect=True` + `checkboxSelection=True` — checkbox multi-select. +- `expandIcon` / `collapseIcon` / `endIcon` — MUI icon names, e.g. + `expandIcon="ChevronRight"`, `collapseIcon="ExpandMore"`, + `endIcon="Description"`. +- `expansionTrigger="iconContainer"` — only clicking the expand/collapse + icon toggles the node (default `"content"` toggles on the whole row). + +### Outputs (use as callback Inputs) + +- `selectedItems` — the current selection (string or list with multiSelect). + +```python +@callback(Output("out", "children"), Input("nav", "selectedItems")) +def show_selection(sel): + return json.dumps(sel) if sel else "Select an item..." +``` + +### Related pages + +- /tree-basic — TreeView, the data-driven RichTreeView wrapper +- /tree-selection — selection modes on TreeView +- /tree-expansion — expansion triggers and controlled expand/collapse +- /tree-editing — inline label editing +- /tree-icons — icons, indentation, height and sx styling +- /tree-disabled — disabled items and focusability +- /tree-pro — TreeViewPro: drag-reorder, lazy loading, per-item controls + +--- + +### The docs sidebar, dogfooded + +Before the boilerplate migration this site's navigation WAS a +SimpleTreeView. The tree below is generated from the site's real +navigation map (`components/navbar.py`), and clicking a leaf genuinely +navigates — the component driving its own documentation, as it always did. + +.. exec::docs.tree_simple.sidebar_example + :code: false + +.. source::docs/tree_simple/sidebar_example.py + :defaultExpanded: false + :withExpandedButton: true + +--- + +### Live examples + +.. exec::docs.tree_simple.demo + :code: false + +.. source::docs/tree_simple/demo.py + :defaultExpanded: false + :withExpandedButton: true diff --git a/lib/access.py b/lib/access.py new file mode 100644 index 0000000..11178d7 --- /dev/null +++ b/lib/access.py @@ -0,0 +1,188 @@ +"""The access policy this site hands to dash-improve-my-llms. + +One function matters — :func:`check` — and its *ordering* is the whole design: + + tier -> short-circuit public/hidden + -> local Clerk session (a person in a browser) + -> hub verification of ?key= (an agent, later, elsewhere) + +**Local session first, hub only as a fallback.** A signed-in visitor is +resolved entirely on this host, so the hub being down gates nothing for them. +Only the agent path — a fetch with no cookie, carrying a key in the URL — +needs the hub at all. Reversing this order would couple every satellite's +availability to one host for no benefit: it is the single most consequential +line in this file. + +Two questions get asked of a documentation site, and only one has a session +attached. Clerk answers "who is this human?". It can never answer "may this +fetch of a text file proceed?", because when someone pastes +``https://host/guide/llms.txt`` into an assistant, the fetch arrives with no +cookie. That is why authority has to be able to travel in the URL, and why +both mechanisms exist rather than one. + +Unwired by default: :func:`configure` does nothing unless this deployment has +tiers that are not all public, so a fork inherits the machinery without +inheriting a gate it did not ask for. +""" + +from __future__ import annotations + +import logging +from typing import Optional + +from lib import auth, hub_client, page_tiers + +logger = logging.getLogger(__name__) + + +def _request_key() -> str: + """The ``?key=`` on the current request, or "". Never raises, never logs.""" + try: + from flask import request, has_request_context + + if not has_request_context(): + return "" + return (request.args.get("key") or "").strip() + except Exception: + return "" + + +def effective_tier(path: str) -> str: + """This page's tier, with the hub ceiling applied and degradation handled.""" + tier = page_tiers.effective_tier(path, hub_client.hub_tiers().get(path)) + if not auth.clerk_enabled(): + # No way to identify anyone: everything except `hidden` falls open. + # See lib/page_tiers.degraded_tier for why that is the right trade + # for reading documentation, and why admin surfaces don't rely on it. + return page_tiers.degraded_tier(tier) + return tier + + +def check(path: str) -> str: + """``allow`` | ``gated`` | ``deny`` for the current request. + + Runs inside the request, on every request, on paths that may be hot — so + it stays cheap: a dict lookup, and at most one cached hub call for the + agent path. + """ + tier = effective_tier(path) + + if tier == "hidden": + return "deny" + if tier == "public": + return "allow" + + # A signed-in reader in a browser. Resolved here, without the hub. + user = auth.current_user() + if user is not None: + if tier == "admin": + return "allow" if auth.is_admin_user(user) else "gated" + return "allow" + + # No session: an agent, or an anonymous browser. Only a key can help now. + key = _request_key() + if not key: + return "gated" + return hub_client.verify(key, path, tier) + + +def gate_doc(path: str) -> str: + """The Markdown an unauthorised reader receives at 200. + + Deliberately useful rather than a wall: it names the page, says what would + unlock it and where to sign in. An agent that fetches a gated document + should come away knowing what it is and how its user gets access — that is + the difference between a gate and a dead end, and it is why `gated` keeps + the URL listed in the index and sitemap. + """ + tier = effective_tier(path) + name = _page_name(path) or path + sign_in = _sign_in_url() + + lines = [ + f"# {name}", + "", + "> This document exists but is not public.", + "", + "---", + "", + ] + if tier == "admin": + lines += ["Reading it requires an administrator account on this site."] + else: + lines += ["Reading it requires a signed-in account."] + lines += [ + "", + "**If you are a person:** sign in" + + (f" at {sign_in}" if sign_in else "") + + ", then reload this page.", + "", + "**If you are an assistant:** ask whoever gave you this URL to copy it " + "again while signed in. The copied link carries a key that authorises " + "this document, and it will work when pasted here.", + "", + "The page's existence is public; only its content is restricted.", + "", + ] + return "\n".join(lines) + + +def link_suffix() -> str: + """Carry authority to the links generated in *this* response. + + An agent handed an authorised URL must be able to follow the site-index + and per-page links inside it, or the catalogue is untraversable one hop + from the document it was given. The package appends this to same-origin + generated URLs only — never to canonical tags, the sitemap, or peer hosts, + because a capability should not travel to another origin. + """ + key = _request_key() + return f"?key={key}" if key else "" + + +def _page_name(path: str) -> Optional[str]: + try: + import dash + + for entry in dash.page_registry.values(): + if page_tiers.normalize(entry.get("path", "")) == page_tiers.normalize(path): + return entry.get("name") + except Exception: + pass + return None + + +def _sign_in_url() -> Optional[str]: + import os + + return (os.getenv("CLERK_SIGN_IN_URL") or "").strip() or None + + +def gating_configured() -> bool: + """True when at least one page is not public. + + A site whose pages are all public gains nothing from a per-request check + and pays for it on every hot path, so the wiring stays off until a tier + says otherwise. + """ + return any(tier != "public" for tier in page_tiers.registered().values()) + + +def configure(force: bool = False) -> bool: + """Hand the policy to the package. Returns True when access control is on. + + Call after the pages are registered — the decision depends on their tiers. + """ + if not (force or gating_configured()): + return False + + from dash_improve_my_llms import configure_access, configure_viewer_identity + + configure_access(check, gate_doc=gate_doc, link_suffix=link_suffix) + configure_viewer_identity(auth.viewer_identity) + logger.info( + "access control ON (clerk=%s, hub=%s)", + auth.clerk_enabled(), + hub_client.enabled(), + ) + return True diff --git a/lib/ad_client.py b/lib/ad_client.py index 4b07e1d..07f909f 100644 --- a/lib/ad_client.py +++ b/lib/ad_client.py @@ -13,18 +13,25 @@ inject_ad_into_aside(layout, metadata.endpoint) Wiring (custom apps without the markdown TOC aside): - from lib.ad_client import create_ad_component, register_shell_ad - ...place create_ad_component("__floating__", compact=True) in the shell... - register_shell_ad("url", exclude_paths=("/",)) # serve per navigation + from lib.ad_client import create_ad_component, register_location_refresh + ...place create_ad_component("__navbar__") in a static shell... + register_location_refresh("url") # re-serve the ad on SPA navigation Env: AD_SERVER_URL — ad server origin (default https://2plot.dev) - AD_APP_ID — this app's identity in the network (default from - the APP_ID fallback below; override per deployment) + AD_APP_ID — this app's identity in the network (default + "boilerplate"; a fork MUST override it or its + impressions and clicks land on the template's rows) Failure behaviour: if the ad server is unreachable the slot simply stays hidden, and a 60s circuit breaker stops retrying so an outage never adds the HTTP timeout to every page view. + +Analytics: the server-to-server fetch sends the network's internal-traffic +User-Agent (``lib/constants.INTERNAL_UA``) so 2plot.dev does not count this +app's ad requests as visits to itself. The click beacon deliberately does +not — it is fired by the reader's own browser, which cannot set a +User-Agent anyway, and a click IS a real person. """ from __future__ import annotations @@ -41,7 +48,27 @@ logger = logging.getLogger(__name__) AD_SERVER_URL = os.environ.get("AD_SERVER_URL", "https://2plot.dev").rstrip("/") -APP_ID = os.environ.get("AD_APP_ID", "dash-mui-charts") + +# "boilerplate", NOT "dash-documentation-boilerplate". This is the app's own +# key in the hub's network directory — the same string `SATELLITE_APP_KEY` +# carries for traffic rollups, `lib/bulletin.py` sends as `?app=`, and +# `lib/hub_client.py` presents as `X-Satellite-App`. One identifier for this +# app on every hub surface, so /admin/ad-board and /traffic name the same +# thing and a column of them stays readable. +# +# It also removes a real hazard: `lib/hub_client.app_id()` falls back to +# `AD_APP_ID` when `SATELLITE_APP_KEY` is unset, so while the ad identifier +# was a long name that was NOT a directory key, a deployment that set it for +# ads alone silently re-keyed its hub calls off the directory. +# `lib/satellite_reporter.app_key()` still refuses to chain to it — see the +# note there; a fork is free to use a long ad identifier (leaflet.2plot.dev +# uses "dash-leaflet2" against directory key "leaflet") and that must not +# re-key its analytics. The hub already folds the legacy "dash-mui-charts" +# spelling into "muicharts" at ingest, so pre-migration impressions survive. +# +# CHANGING THIS SPLITS HISTORY. The ad server keys impressions and clicks by +# `app`, so anything logged under the old identifier stays under it. +APP_ID = os.environ.get("AD_APP_ID", "muicharts") _TIMEOUT = 2 # seconds per fetch — never stall a page view longer _COOLDOWN = 60 # seconds to skip fetches after a failure @@ -62,11 +89,20 @@ def fetch_ad(page: str) -> dict | None: with _breaker_lock: if time.time() - _last_failure < _COOLDOWN: return None + from lib.constants import internal_ua + try: resp = _session.get( f"{AD_SERVER_URL}/api/ad-network/serve", params={"app": APP_ID, "page": page}, timeout=_TIMEOUT, + # The highest-volume outbound call this app makes — one per docs + # page view, server-to-server. Without the internal-traffic token + # every one of them reached 2plot.dev as `python-requests/2.x`, + # which its tracker classifies as a bot: this satellite's readers + # were being counted as crawler traffic on the hub. See + # lib/constants.INTERNAL_UA. + headers={"User-Agent": internal_ua("ad-client")}, ) if resp.status_code == 200 and resp.content: return resp.json() @@ -78,35 +114,28 @@ def fetch_ad(page: str) -> dict | None: return None -def create_ad_component(page_path: str, compact: bool = False) -> html.Div: - """Hidden ad shell; the serve callback below fills it per page view. - - ``compact=True`` drops the section divider and adds a shadow — for - floating placements where the card is not part of a document flow. - """ - divider = [] if compact else [ - dmc.Divider( - label="Advertisement", - labelPosition="center", - mb="md", - mt="xl", - styles={ - "label": { - "fontSize": "0.75rem", - "fontWeight": 600, - "textTransform": "uppercase", - "letterSpacing": "0.5px", - "color": "var(--mantine-color-gray-6)", - } - }, - ), - ] +def create_ad_component(page_path: str) -> html.Div: + """Hidden ad shell; the mount callback below fills it per page view.""" return html.Div( id={"type": "net-ad-container", "page": page_path}, style={"display": "none"}, children=[ dcc.Store(id={"type": "net-ad-data", "page": page_path}, data=None), - *divider, + dmc.Divider( + label="Advertisement", + labelPosition="center", + mb="md", + mt="xl", + styles={ + "label": { + "fontSize": "0.75rem", + "fontWeight": 600, + "textTransform": "uppercase", + "letterSpacing": "0.5px", + "color": "var(--mantine-color-gray-6)", + } + }, + ), html.A( href="#", target="_blank", @@ -143,7 +172,6 @@ def create_ad_component(page_path: str, compact: bool = False) -> html.Div: p="sm", withBorder=True, radius="md", - shadow="md" if compact else None, style={"cursor": "pointer"}, ), ), @@ -202,11 +230,16 @@ def _serve(page: str): ) -# NOTE (dash-mui-charts divergence from the canonical boilerplate copy): -# this app's only ad slot lives in the static shell, so the generic -# mount-fired MATCH callback is intentionally absent — with it, every hard -# load would fetch twice (mount + location) and log a double impression. -# The location callback in register_shell_ad below is the sole driver. +@callback( + *_AD_OUTPUTS(MATCH), + Input({"type": "net-ad-container", "page": MATCH}, "id"), + # Explicit: boilerplate apps may set prevent_initial_callbacks=True + # app-wide; the mount-fire is exactly what serves the ad per page view. + prevent_initial_call=False, +) +def serve_network_ad(container_id): + """Fetch + show an ad every time the slot mounts (each page view).""" + return _serve((container_id or {}).get("page", "unknown")) # Click beacon: browser → 2plot.dev directly. text/plain keeps it a CORS @@ -238,25 +271,20 @@ def _serve(page: str): ) -def register_shell_ad(location_id: str = "url", - page_key: str = "__floating__", - exclude_paths: tuple[str, ...] = ()) -> None: - """Drive a static-shell ad slot from the URL bar. +def register_location_refresh(location_id: str = "url", + page_key: str = "__navbar__") -> None: + """For ad slots living in the static app shell (not per-page layouts). - Fires on hard load and on every SPA navigation, attributing the real - pathname. Paths in ``exclude_paths`` keep the slot hidden and fetch - nothing (no impression is logged for them). + Static shells mount once per hard load, so the mount callback above + only fires once. Apps like dash-mui-charts call this to re-serve the + slot on every SPA navigation, attributing the real pathname. """ - excluded = {(p.rstrip("/") or "/") for p in exclude_paths} @callback( - *_AD_OUTPUTS(page_key), + *[Output(o.component_id, o.component_property, allow_duplicate=True) + for o in _AD_OUTPUTS(page_key)], Input(location_id, "pathname"), - prevent_initial_call=False, + prevent_initial_call="initial_duplicate", ) def refresh_shell_ad(pathname): - path = (pathname or "/").rstrip("/") or "/" - if path in excluded: - # clear the store too so a stale click_url can't outlive the hide - return no_update, no_update, no_update, None, {"display": "none"} - return _serve(path) + return _serve(pathname or page_key) diff --git a/lib/analytics.py b/lib/analytics.py new file mode 100644 index 0000000..c9447c9 --- /dev/null +++ b/lib/analytics.py @@ -0,0 +1,205 @@ +"""Local traffic recorder — the data source for the satellite rollup. + +Every hit lands as one JSON line in a per-day file; ``lib/traffic_report`` +folds those files into the hourly rollup this app POSTs to the 2plot.ai +hub (contract: 2plotai/docs/network/satellite-analytics.md). + +Two kinds of row, and the distinction is the whole point: + +- ``source="doc"`` — an HTTP document request, written by the + ``before_request`` hook in app.py. Crawlers only ever appear here: they + do not run JavaScript, so they never reach a Dash callback. +- ``source="spa"`` — a RENDERED PAGE VIEW, written by the ``url.pathname`` + callback in app.py. This app is a single-page app (every doc page is a + ``dcc.Location`` navigation), so document requests alone would report + one hit per visitor with ``/`` as the only page and no measurable + session. The spa rows are the real page-view stream. + +Definitions are kept identical to the hub's (2plotai/lib/traffic_insights) +so the numbers compare across the network: a visitor is an (IP, user-agent) +pair, and the bot pattern list below is copied verbatim. + +Storage is append-only on purpose: render.yaml runs gunicorn with two +workers, and a single ``O_APPEND`` line write under the pipe-buffer size is +atomic, whereas a read-modify-write of one JSON blob would lose hits +between processes. Both workers write the same day file and read all of it. + +Env: + ANALYTICS_DIR — where day files live (default ``/analytics``). + Point it at a mounted disk to survive deploys. +""" +from __future__ import annotations + +import hashlib +import json +import logging +import os +import threading +from datetime import datetime, timedelta +from pathlib import Path + +logger = logging.getLogger(__name__) + +RETENTION_DAYS = 3 # the rollup only ever reads today + yesterday + +# Copied verbatim from 2plotai/lib/traffic_insights._BOT_NAMES so this app's +# human/bot split matches the hub's. First match wins — specific → generic. +_BOT_NAMES = [ + ('gptbot', 'GPTBot'), ('chatgpt-user', 'ChatGPT-User'), ('oai-searchbot', 'OAI-SearchBot'), + ('claudebot', 'ClaudeBot'), ('claude-web', 'Claude-Web'), ('anthropic', 'Anthropic'), + ('perplexitybot', 'PerplexityBot'), ('youbot', 'YouBot'), + ('google-extended', 'Google-Extended'), ('googlebot', 'Googlebot'), + ('bingbot', 'Bingbot'), ('duckduckbot', 'DuckDuckBot'), ('slurp', 'Yahoo Slurp'), + ('yandex', 'Yandex'), ('baidu', 'Baidu'), ('ccbot', 'CCBot'), ('facebookbot', 'FacebookBot'), + ('python-requests', 'python-requests'), ('curl', 'curl'), ('wget', 'wget'), + ('scraper', 'Scraper'), ('spider', 'Spider'), ('crawler', 'Crawler'), ('bot', 'Other bot'), +] + +# Paths that are never a page view: Dash plumbing, static assets, probes. +_SKIP_FRAGMENTS = ( + '/assets/', '/_dash', '/_reload-hash', '/_favicon', 'favicon', + '/healthz', '/robots.txt', '/sitemap', '/llms.txt', '[]', +) +_SKIP_SUFFIXES = ('.css', '.js', '.map', '.png', '.jpg', '.jpeg', '.gif', '.ico', + '.svg', '.webp', '.woff', '.woff2', '.ttf', '.eot', '.txt', '.xml') + +# Orders writes within a process; across processes O_APPEND does the ordering. +_write_lock = threading.Lock() + + +def analytics_dir() -> Path: + return Path(os.environ.get("ANALYTICS_DIR") + or Path(__file__).resolve().parent.parent / "analytics") + + +def day_file(date: str | None = None) -> Path: + """Path of one day's hit log (the app's own local day — consistent is + all the contract asks).""" + date = date or datetime.now().strftime("%Y-%m-%d") + return analytics_dir() / f"hits-{date}.jsonl" + + +def is_bot(user_agent: str | None) -> bool: + ua = (user_agent or "").lower() + return any(pat in ua for pat, _ in _BOT_NAMES) + + +def bot_name(user_agent: str | None) -> str: + ua = (user_agent or "").lower() + for pat, name in _BOT_NAMES: + if pat in ua: + return name + return "Unknown bot" + + +def visitor_key(ip: str | None, user_agent: str | None) -> str: + """The hub's visitor identity: an (IP, browser) pair. Shared IPs can + merge people and private windows can split them — stated, not hidden.""" + ua = hashlib.md5((user_agent or "?").encode()).hexdigest()[:8] + return f"{ip or '?'}|{ua}" + + +def client_ip(headers=None, remote_addr: str | None = None) -> str | None: + """The real client address behind Render's proxy (and Cloudflare, if a + CF-fronted domain is ever put in front).""" + try: + get = headers.get if headers is not None else (lambda _k, _d=None: None) + cf = (get("CF-Connecting-IP") or "").strip() + if cf: + return cf + fwd = (get("X-Forwarded-For") or "").strip() + if fwd: + return fwd.split(",")[0].strip() + except Exception: + pass + return remote_addr + + +def cf_country(headers=None) -> str | None: + """ISO country from Cloudflare's free header when present. This app is + on onrender.com today (no CF), so lib/traffic_report falls back to an + IP lookup — but the day a CF-fronted domain fronts it, geo gets free + and accurate with no code change.""" + try: + cc = (headers.get("CF-IPCountry") or "").strip().upper() if headers else "" + except Exception: + return None + return cc if len(cc) == 2 and cc != "XX" else None + + +def trackable_path(path: str | None) -> bool: + """True for paths that represent a page a person could read.""" + if not path or not path.startswith("/") or path.startswith("//"): + return False + low = path.lower() + return not (any(f in low for f in _SKIP_FRAGMENTS) + or low.endswith(_SKIP_SUFFIXES)) + + +def record(path: str | None, user_agent: str | None, ip: str | None, + source: str = "doc", country: str | None = None) -> None: + """Append one hit. Never raises — analytics must not break a page view.""" + try: + # The network's internal-traffic contract, applied at WRITE time, + # before bot classification: a UA carrying the token is 2plot + # machinery talking to itself (hub health sweeps, CI batteries, + # smoke probes) and is counted NOWHERE — not as a bot, not ever. + from lib.constants import INTERNAL_UA_TOKEN + + if INTERNAL_UA_TOKEN in (user_agent or "").lower(): + return + if not trackable_path(path): + return + row = { + "ts": datetime.now().isoformat(timespec="seconds"), + "path": path[:160], + "ua": (user_agent or "")[:300], + "ip": ip or "", + "bot": is_bot(user_agent), + "source": source, + } + if country: + row["country"] = country + line = json.dumps(row, separators=(",", ":")) + "\n" + target = day_file() + with _write_lock: + target.parent.mkdir(parents=True, exist_ok=True) + # O_APPEND: two gunicorn workers can share this file safely. + with open(target, "a", encoding="utf-8") as fh: + fh.write(line) + except Exception: # noqa: BLE001 — recording is best-effort, always + logger.debug("analytics record failed", exc_info=True) + + +def load_day(date: str | None = None) -> list[dict]: + """Every row of one day, oldest first. Corrupt lines are skipped.""" + out: list[dict] = [] + try: + with open(day_file(date), encoding="utf-8") as fh: + for line in fh: + line = line.strip() + if not line: + continue + try: + out.append(json.loads(line)) + except ValueError: + continue + except FileNotFoundError: + return [] + except Exception: # noqa: BLE001 + logger.debug("analytics read failed", exc_info=True) + return out + return out + + +def prune(keep_days: int = RETENTION_DAYS) -> None: + """Drop day files older than the retention window (called from the + reporter thread, never from a request).""" + try: + keep = {(datetime.now() - timedelta(days=i)).strftime("%Y-%m-%d") + for i in range(keep_days + 1)} + for f in analytics_dir().glob("hits-*.jsonl"): + if f.stem.replace("hits-", "") not in keep: + f.unlink(missing_ok=True) + except Exception: # noqa: BLE001 + logger.debug("analytics prune failed", exc_info=True) diff --git a/lib/auth.py b/lib/auth.py new file mode 100644 index 0000000..5b0247c --- /dev/null +++ b/lib/auth.py @@ -0,0 +1,345 @@ +"""Optional Clerk authentication — this site as a Clerk satellite. + +Adapted from ``2plot_leaflet/lib/auth.py``, the implementation already sharing +authenticated state across ``2plot.ai`` → ``2plot.dev`` → ``leaflet.2plot.dev`` +in production. Every satellite forked from this template should inherit this +file rather than reimplement it; the satellite fixups below in particular were +each found the hard way. + +FULLY OPTIONAL. With no ``CLERK_*`` keys in the environment — or the package +missing, which is the default, because ``dash-clerk-auth`` is not on PyPI — the +site runs exactly as it does without this module: no script injection, no +session machinery, no routes, and every page tier falls open to public. That is +deliberate. A component library's documentation must never brick because a +deploy forgot a key. The single source of truth for "is auth on" is +:func:`clerk_enabled`. + +Env vars (set all three to enable): + CLERK_SECRET_KEY sk_... backend SDK key, never exposed to the client + CLERK_PUBLISHABLE_KEY pk_... embedded in the injected " + ) + + @_dash_hooks.index() + def _clerk_satellite_fixups(index_string): + needle = "data-clerk-publishable-key=" + if needle in index_string and "data-clerk-domain=" not in index_string: + index_string = index_string.replace( + needle, f'data-clerk-domain="{sat_domain}" {needle}', 1 + ) + if "redirectToSignIn" not in index_string and "" in index_string: + index_string = index_string.replace("", signin_js + "", 1) + return index_string + + +def configure_app(app) -> None: + """Post-construction Clerk wiring (sessions, /api/auth/*, request identity). + + Separate from :func:`register` because dash-clerk-auth splits its setup + either side of ``Dash(...)``. No-ops when auth is off. + """ + if not clerk_enabled(): + return + try: + from dash_clerk_auth import configure_app as _configure + + _configure(app) + except ImportError: + pass + except Exception as exc: # noqa: BLE001 — never break the boot on auth wiring + print(f"[auth] WARNING: configure_app failed: {exc}") diff --git a/lib/backend.py b/lib/backend.py new file mode 100644 index 0000000..ab550b0 --- /dev/null +++ b/lib/backend.py @@ -0,0 +1,84 @@ +""" +Backend selection helper for the Dash documentation boilerplate. + +Dash 4.1+ supports pluggable backends: + app = Dash(backend="flask" | "fastapi" | "quart") + +This module owns the single source of truth for which backend the app is +running on, so both `run.py` and UI components (e.g. the navbar badge) stay +in sync. + +Backend is selected via the ``DASH_BACKEND`` environment variable. Falls back +to ``flask`` if unset or invalid. +""" +from __future__ import annotations + +import os +from dataclasses import dataclass +from typing import Literal + +try: + from dotenv import load_dotenv + load_dotenv() +except ImportError: + pass + +BackendName = Literal["flask", "fastapi", "quart"] + +SUPPORTED_BACKENDS: tuple[BackendName, ...] = ("flask", "fastapi", "quart") +DEFAULT_BACKEND: BackendName = "flask" + + +@dataclass(frozen=True) +class BackendInfo: + name: BackendName + label: str + color: str # DMC color name + icon: str # iconify icon id + description: str + is_async: bool + + +_BACKEND_INFO: dict[str, BackendInfo] = { + "flask": BackendInfo( + name="flask", + label="Flask", + color="gray", + icon="simple-icons:flask", + description="WSGI backend. Default. Full feature parity with Dash 3.x.", + is_async=False, + ), + "fastapi": BackendInfo( + name="fastapi", + label="FastAPI", + color="teal", + icon="simple-icons:fastapi", + description="ASGI backend. Adds websocket callbacks, async support and MCP-friendly transport.", + is_async=True, + ), + "quart": BackendInfo( + name="quart", + label="Quart", + color="violet", + icon="simple-icons:python", + description="ASGI backend with a Flask-compatible API surface.", + is_async=True, + ), +} + + +def resolve_backend(name: str | None = None) -> BackendName: + """Resolve the backend to use. + + Reads ``DASH_BACKEND`` env var when ``name`` is not given. Unknown values + fall back to the default backend rather than raising — the docs site + should always boot. + """ + raw = (name or os.environ.get("DASH_BACKEND") or DEFAULT_BACKEND).strip().lower() + if raw not in SUPPORTED_BACKENDS: + return DEFAULT_BACKEND + return raw # type: ignore[return-value] + + +def get_backend_info(name: str | None = None) -> BackendInfo: + return _BACKEND_INFO[resolve_backend(name)] diff --git a/lib/bulletin.py b/lib/bulletin.py new file mode 100644 index 0000000..0f62ec6 --- /dev/null +++ b/lib/bulletin.py @@ -0,0 +1,79 @@ +"""Network bulletin — hub-published tips and announcements. + +Adapted from the boilerplate's template copy (its ``app_id()`` reads +``lib.satellite_reporter``; this repo's reporter is ``lib.traffic_report``). + +The hub (2plot.dev) serves one JSON document at ``/api/network/bulletin`` +and every satellite renders it in the header of its llms.txt viewer: a +twenty-site network says "here is what changed" once, in one place. + +The wiring is a function that returns whether it wired, and app.py prints +that at boot — the boilerplate shipped this commented out for weeks against +a hub endpoint that was already serving, and an announcement that never +appears is not a symptom anyone notices. + +Env: + NETWORK_BULLETIN_URL the hub endpoint. Absent -> feature off, silently. + Must be set on the Render SERVICE, not only in + render.yaml — blueprint envVars apply on + Blueprint sync, not git-push autodeploys. + NETWORK_BULLETIN_TTL_S seconds a cached bulletin stays fresh (default 900) +""" + +from __future__ import annotations + +import os +from typing import Optional + +DEFAULT_TTL_S = 900.0 + +# The hub endpoint, for .env.example and the docs to copy from. Not a +# default — configure() requires the env var, because a satellite that +# silently starts calling a hub it was never pointed at is the kind of +# surprise a template must not ship. +HUB_BULLETIN_URL = "https://2plot.dev/api/network/bulletin" + + +def url() -> Optional[str]: + return os.environ.get("NETWORK_BULLETIN_URL") or None + + +def _ttl() -> float: + try: + return max(60.0, float(os.environ.get("NETWORK_BULLETIN_TTL_S", + DEFAULT_TTL_S))) + except (TypeError, ValueError): + return DEFAULT_TTL_S + + +def app_id() -> str: + """This app's key in the hub's network directory. + + Reused from ``lib.traffic_report.APP_KEY`` rather than hard-coded, so + the traffic rollups and the bulletin fetches identify this satellite + the same way on every hub surface. + """ + from lib.traffic_report import APP_KEY + + return APP_KEY + + +def configure() -> bool: + """Point the package at the hub's bulletin. Returns whether it did. + + Fail-open in both directions: with no URL the feature is off and the + llms viewer still renders on the package's built-in tips; with an + unreachable URL the package's client degrades silently — a hub outage + must not take the documentation down with it. + """ + endpoint = url() + if not endpoint: + return False + + try: + from dash_improve_my_llms import configure_bulletin + except ImportError: # pragma: no cover - older releases lack the feature + return False + + configure_bulletin(url=endpoint, ttl=_ttl(), app_id=app_id()) + return True diff --git a/lib/constants.py b/lib/constants.py new file mode 100644 index 0000000..dd1a62b --- /dev/null +++ b/lib/constants.py @@ -0,0 +1,144 @@ +"""Site identity + network contract constants — one string, every surface. + +The network standard (STANDARD.md §1): a site states what it is, in the same +words, on every surface an agent or a reader can reach. The surfaces this +brand reaches, and what serves each: + + Dash(title=SITE_BRAND) -> , and resolve_site_title's + second candidate + register_page_metadata(path="/", -> the /llms.txt H1 and the llms + name=SITE_BRAND) viewer's brand chip (via + dash-improve-my-llms 2.3.4) + templates/index.html og:site_name -> substituted from here at boot + +Naming rules, from the network standard: + - LIBRARY RULE: the package name comes FIRST in the brand (people + install `dash-mui-charts`; the brand must match PyPI and GitHub); + - "Pip Install Python" is the byline (who made it), never the site name. +""" +import os + +SITE_BRAND = "dash-mui-charts — MUI X charts for Dash" + +# What Dash(title=...) receives. Kept equal to the brand — resolve_site_title +# treats it as the second candidate after the home page's registered name. +APP_TITLE = SITE_BRAND + +# The brand without its tagline, for surfaces that prefix something else and +# would otherwise run past platform truncation points. +SITE_SHORT_NAME = "dash-mui-charts" + +# Prefixed to every per-page title. NOT only a browser-tab string: Dash passes +# the page title straight into og:title and twitter:title (dash/_pages.py +# _page_meta_tags), so this is the headline on every share card the site +# produces. Derived, not retyped, so brand and prefix cannot drift apart. +PAGE_TITLE_PREFIX = f"{SITE_SHORT_NAME} | " + +SITE_DESCRIPTION = ( + "dash-mui-charts — 13 Plotly Dash components wrapping MUI X: LineChart, " + "BarChart, CandlestickChart, PieChart, ScatterChart, CompositeChart, " + "Heatmap, SparklineChart, LiveTradingChart, TreeView, SimpleTreeView, " + "TreeViewPro and TimeClock. Interactive documentation with live " + "examples, dark mode and MUI X Pro features. By Pip Install Python." +) + +# --------------------------------------------------------------------------- +# Public origin +# --------------------------------------------------------------------------- +# BASE_URL drives <link rel="canonical"> on every page, the absolute URLs in +# sitemap.xml and llms.txt, and og:url. The name BASE_URL is REQUIRED by the +# network's shared scripts and tests (LESSONS §12) — alias, never rename. +# +# require_owned_base_url() below refuses to boot in production on a +# platform-generated hostname: *.onrender.com keeps resolving after the +# custom domain is attached, and canonicals pointing there split link equity +# across two hosts while nothing about the running site looks wrong. +DEFAULT_BASE_URL = "https://muicharts.2plot.dev" +BASE_URL = os.environ.get("APP_BASE_URL", DEFAULT_BASE_URL).rstrip("/") + +# Token in templates/index.html that app.py substitutes with BASE_URL at +# boot. A static file cannot import this module, and two hand-maintained +# copies of an origin is how half a site ends up pointing at one hostname +# and half at another. +ORIGIN_PLACEHOLDER = "__CANONICAL_ORIGIN__" + +# --------------------------------------------------------------------------- +# The social card +# --------------------------------------------------------------------------- +# Every register_page call passes image_url=OG_IMAGE_URL and a description= +# — one page missing either and Dash emits content="" for it, and the empty +# tag, later in document order, wins with scrapers (LESSONS §1). +# +# THE CARD LIVES ON THE CDN, NOT IN assets/: a card served by the app is +# fetched by the scraper at unfurl time, and on a cold free-tier container +# that request times out and the platform caches the miss. HARD GATE +# (STANDARD §3): the object must answer 200 with IHDR 1200x630 at this URL +# BEFORE a deploy whose og:image points here. +OG_IMAGE_URL = "https://cdn.2plot.ai/github_assets/muicharts.2plot.dev.png" +OG_IMAGE_WIDTH = 1200 +OG_IMAGE_HEIGHT = 630 +OG_IMAGE_TYPE = "image/png" +OG_IMAGE_ALT = SITE_BRAND + +# --------------------------------------------------------------------------- +# The network's internal-traffic contract +# --------------------------------------------------------------------------- +# Any request whose User-Agent contains INTERNAL_UA_TOKEN is 2plot network +# machinery talking to itself — the hub's hourly health sweep, CI smoke +# batteries, this app's own server-to-server calls. It is counted NOWHERE. +# +# inbound — lib/analytics.record drops token-carrying requests at WRITE +# time, before bot classification; +# outbound — every call this host makes to another network host sends +# internal_ua(...), so the far side can apply the same rule. +# +# The token must stay byte-identical across the network; it mirrors +# 2plotai/lib/constants.py and pip-docs+/lib/constants.py. +INTERNAL_UA_TOKEN = "2plot-internal" +INTERNAL_UA = "2plot-internal/1.0 (+https://2plot.ai/docs/satellite-analytics)" + + +def internal_ua(caller: str = "") -> str: + """``INTERNAL_UA`` with a caller suffix, e.g. ``"ad-client"``. + + The suffix is for reading logs on the far side; only the token matters + to the contract, and it stays intact whatever the suffix says. + """ + caller = (caller or "").strip() + return f"{INTERNAL_UA} {caller}" if caller else INTERNAL_UA + + +def require_owned_base_url(base_url: str = BASE_URL) -> None: + """Fail fast in production when BASE_URL isn't this app's real origin. + + Only enforced when a hosting platform is detected (Render sets + ``RENDER``; ``APP_ENV=production`` works anywhere else), so local + development and the test suite are unaffected. + """ + in_production = bool(os.environ.get("RENDER") + or os.environ.get("APP_ENV") == "production") + if not in_production: + return + + for platform_host in ("onrender.com", "herokuapp.com", "railway.app", + "fly.dev"): + if platform_host in base_url: + raise RuntimeError( + f"APP_BASE_URL={base_url!r} is a platform-generated " + "hostname. Canonical tags, sitemap.xml and llms.txt would " + "all point at it instead of the custom domain, splitting " + "link equity across two hosts. Set APP_BASE_URL to the " + "public domain (https://muicharts.2plot.dev)." + ) + + +# --------------------------------------------------------------------------- +# Boilerplate shell constants (components/appshell.py, header.py, navbar.py) +# --------------------------------------------------------------------------- +# Mantine primary — MUI's blue, matching the template's theme-color #1976d2. +PRIMARY_COLOR = "blue" +HEADER_HEIGHT = 70 + +# Raw markdown per page name, filled by pages/markdown.py at import — the +# llms_copy directive's copy-for-LLM button reads from it. +NAME_CONTENT_MAP = {} diff --git a/lib/directives/headings.py b/lib/directives/headings.py new file mode 100644 index 0000000..ea2c07a --- /dev/null +++ b/lib/directives/headings.py @@ -0,0 +1,85 @@ +"""Heading ids that survive inline formatting — and match their TOC anchors. + +Two defects in markdown2dash's heading handling, both hit as soon as a heading +contains anything other than plain text: + +1. **`## The `peers` tier` raises `AttributeError`.** + ``DashRenderer.heading`` does ``create_heading_id(text[0])``, where ``text`` + is the list of *rendered* inline tokens. When the first token is formatted, + ``text[0]`` is a ``dmc.Code`` / ``dmc.Text`` component rather than a string, + and ``create_heading_id`` calls ``.lower()`` on it. The whole page fails to + import, so one backtick in one heading takes the site down at startup. + +2. **Formatted headings get an id their own TOC doesn't link to.** + Even when the first token *is* a string, only that first token becomes the + id: ``## Wiring **it** up`` renders ``id="wiring"``. Meanwhile the `toc` + directive slugs the raw markdown source — ``wiring-**it**-up`` — so the + anchor in the sidebar points at a fragment that exists nowhere on the page. + Clicking it does nothing, silently. + +The fix is one slug function used by both sides: flatten the rendered heading +back to plain text for the id, strip the same inline markers out of the raw +source for the TOC, and the two agree again. + +Plain-text headings — every heading in this repo before this module existed — +slug exactly as they did before, so no existing anchor or deep link moves. +""" + +from __future__ import annotations + +import re +from typing import Any + +# Inline markdown markers to drop before slugging: code spans, emphasis, +# strong, strikethrough, and mark/spoiler. Deliberately NOT a general +# punctuation strip — "AI/LLM Integration" has always slugged to +# "ai/llm-integration", and rewriting that would break links that already +# point at it. +_INLINE_MARKERS = re.compile(r"[`*_~=]|\|\|") + +# [label](target) -> label. A link in a heading otherwise drags its URL into +# the id. +_MD_LINK = re.compile(r"\[([^\]]*)\]\([^)]*\)") + + +def slugify(text: str) -> str: + """Slug a heading. Same output as markdown2dash for unformatted text.""" + text = _MD_LINK.sub(r"\1", text) + text = _INLINE_MARKERS.sub("", text) + return "-".join(text.lower().split()) + + +def plain_text(node: Any) -> str: + """Flatten a rendered inline tree (strings + Dash components) to text.""" + if isinstance(node, str): + return node + if isinstance(node, (list, tuple)): + return "".join(plain_text(child) for child in node) + + children = getattr(node, "children", None) + if children is None: + return "" + return plain_text(children) + + +def patch_renderer() -> None: + """Replace ``DashRenderer.heading`` with a version that reads all tokens. + + Monkeypatching rather than subclassing because ``create_parser`` hard-codes + ``renderer=DashRenderer()``; subclassing would mean reimplementing its + plugin list here and re-syncing that list on every markdown2dash upgrade. + Idempotent — importing this module twice is harmless. + """ + import dash_mantine_components as dmc + from markdown2dash.src import renderer as m2d_renderer + from markdown2dash.src.decorators import class_name + + if getattr(m2d_renderer.DashRenderer.heading, "_ddb_patched", False): + return + + @class_name + def heading(self, text, level: int, **attrs): + return dmc.Title(text, order=level, id=slugify(plain_text(text))) + + heading._ddb_patched = True + m2d_renderer.DashRenderer.heading = heading diff --git a/lib/directives/kwargs.py b/lib/directives/kwargs.py new file mode 100644 index 0000000..9439b9d --- /dev/null +++ b/lib/directives/kwargs.py @@ -0,0 +1,83 @@ +import importlib +import inspect +from markdown2dash.src.directives.kwargs import Kwargs as KwargsBase + + +def convert_docstring_to_dict(docstring): + """Convert numpy style parameter docstring to a list of dicts with keys name, type, description""" + + lines: list[str] = docstring.split("----------\n")[-1].split("\n") + + params = [] + new_param = None + for line in lines: + if not line.startswith(" "): + if new_param is not None: + params.append(new_param) + name, type = line.split(": ", 1) + new_param = {"name": name, "type": type, "description": ""} + else: + new_param["description"] += " " + line.strip() + params.append(new_param) + + return params + + +class Kwargs(KwargsBase): + + def hook(self, md, state): + sections = [] + + for tok in state.tokens: + if tok["type"] == self.block_name: + sections.append(tok) + + for section in sections: + attrs = section["attrs"] + + # Parse the component specification (e.g., "dmc.Button" or "html.Div") + component_spec = attrs["title"] + + # Common package name mappings + package_map = { + "dmc": "dash_mantine_components", + "html": "dash.html", + "dcc": "dash.dcc", + "dash": "dash" + } + + # Try to parse package.Component format + if "." in component_spec: + package_abbr, component_name = component_spec.rsplit(".", 1) + package = package_map.get(package_abbr, package_abbr) + else: + # If no package specified, use default or library attribute + package = attrs.pop("library", "dash_mantine_components") + component_name = component_spec + + try: + imported = importlib.import_module(package) + component = getattr(imported, component_name) + docstring = inspect.getdoc(component) + + if docstring and "----------" in docstring: + # numpy-style (dash-mantine-components hand-written docs) + docstring = docstring.split("----------\n")[-1] + attrs["kwargs"] = convert_docstring_to_dict(docstring) + elif docstring and "Keyword arguments:" in docstring: + # dash-generate-components style — every dash_mui_charts + # wrapper. The base package ships a parser for exactly + # this format; the numpy override above shadowed it. + from markdown2dash.src.utils import ( + convert_docstring_to_dict as dash_convert, + ) + + attrs["kwargs"] = dash_convert( + docstring.split("Keyword arguments:")[-1] + ) + else: + attrs["kwargs"] = [] + except Exception: + # Import failed or the component has no usable docstring; + # a props table is a nice-to-have, not worth failing a page for. + attrs["kwargs"] = [] diff --git a/lib/directives/llms_copy.py b/lib/directives/llms_copy.py new file mode 100644 index 0000000..1f70d0b --- /dev/null +++ b/lib/directives/llms_copy.py @@ -0,0 +1,46 @@ +import dash_mantine_components as dmc +from dash.development.base_component import Component +from dash_iconify import DashIconify +from markdown2dash import BaseDirective + + +class LlmsCopy(BaseDirective): + """ + Render the per-page LLM copy button at the top of a documentation page. + + Usage in markdown: + .. llms_copy::Page Title + + Renders a single button that copies `<origin>/<page-path>/llms.txt` to + the clipboard. Paste the result into ChatGPT, Claude, or any LLM and + they'll fetch the page's prose docs directly. + + The `llms.toon` and `page.json` buttons were removed in v0.5.0: + `dash-improve-my-llms` 2.0 dropped both endpoints (Dash 4.3 MCP covers + structured layout introspection natively). + """ + NAME = "llms_copy" + + def render(self, renderer, title: str, content: str, **options) -> Component: + safe_title = title.lower().replace(" ", "-").replace("/", "-") + button_id = f"llm-copy-button-{safe_title}" + + button = dmc.Tooltip( + dmc.Button( + dmc.Group( + [DashIconify(icon="mdi:file-document-outline", width=14), "Copy llms.txt URL"], + gap=6, + wrap="nowrap", + ), + id=button_id, + variant="subtle", + color="gray", + size="compact-sm", + className="llms-copy-button", + ), + label="Copy this page's /llms.txt URL — paste into ChatGPT, Claude, or any LLM", + position="top", + withArrow=True, + ) + + return dmc.Box(button, c="dimmed", my="sm") diff --git a/lib/directives/source.py b/lib/directives/source.py new file mode 100644 index 0000000..3452270 --- /dev/null +++ b/lib/directives/source.py @@ -0,0 +1,36 @@ +import os + +import dash_mantine_components as dmc +from dash.development.base_component import Component +from dash_iconify import DashIconify +from markdown2dash import SourceCode + + +class SC(SourceCode): + NAME = "source" + + def render(self, renderer, title: str, content: str, **options) -> Component: + defaultExpanded = options.pop("defaultExpanded", "false") + withExpandedButton = options.pop("withExpandedButton", "true") + + mapping = { + "py": {"language": "python", "icon": DashIconify(icon="devicon:python")}, + "css": {"language": "css", "icon": DashIconify(icon="devicon:css3")}, + } + files = title.split(", ") + code = [] + for file in files: + extension = file.split(".")[-1] + code.append( + { + "fileName": os.path.basename(file), + "code": open(file, "r").read(), + "language": mapping[extension]["language"], + "icon": mapping[extension]["icon"], + } + ) + return dmc.CodeHighlightTabs( + code=code, + defaultExpanded=defaultExpanded == "true", + withExpandButton=withExpandedButton == "true", + ) diff --git a/lib/directives/toc.py b/lib/directives/toc.py new file mode 100644 index 0000000..5ebed2e --- /dev/null +++ b/lib/directives/toc.py @@ -0,0 +1,66 @@ +import dash_mantine_components as dmc +from dash import html +from dash.development.base_component import Component + +from markdown2dash import TableOfContents + +from lib.directives.headings import slugify + + +class TOC(TableOfContents): + def hook(self, md, state): + """Build the entries, then re-slug them the way headings are slugged. + + markdown2dash slugs the *raw* markdown of each heading, so + ``## The `peers` tier`` yields the anchor ``#the-`peers`-tier`` while + the rendered ``dmc.Title`` carries a different id — the link lands + nowhere and does it silently. `slugify` is the same function + lib/directives/headings.py gives the renderer, so the two agree. + + The link label keeps its markdown markers stripped too; a sidebar + entry reading "The `peers` tier" with literal backticks is noise. + """ + super().hook(md, state) + + for token in state.tokens: + if token["type"] != "block_toc": + continue + attrs = token.get("attrs", {}) + attrs["table_of_contents"] = [ + (level, _label(text), slugify(text)) + for level, text, _ in attrs.get("table_of_contents", []) + ] + + def render(self, renderer, title: str, content: str, **options) -> Component: + table_of_contents = options.pop("table_of_contents") + paddings = {3: 0, 4: 20, 5: 40} + links = [ + html.A( + dmc.Text(text, c="dimmed", size="sm", variant="text"), + href="#" + hid, + style={ + "textTransform": "capitalize", + "textDecoration": "none", + "paddingLeft": paddings[level], + "width": "fit-content", + }, + ) + for level, text, hid in table_of_contents + if level >= 3 + ] + + heading = dmc.Text(title, mb=10, fw=500) if links else None + + content = dmc.Stack([ + heading, *links, dmc.Space(h=20) + ], gap=6, px=25) + return dmc.AppShellAside( + children=dmc.ScrollArea(content, type="never"), withBorder=False + ) + + +def _label(text: str) -> str: + """The heading, minus inline markdown markers, for display in the aside.""" + from lib.directives.headings import _INLINE_MARKERS, _MD_LINK + + return _INLINE_MARKERS.sub("", _MD_LINK.sub(r"\1", text)).strip() diff --git a/lib/hub_client.py b/lib/hub_client.py new file mode 100644 index 0000000..ac30bcd --- /dev/null +++ b/lib/hub_client.py @@ -0,0 +1,305 @@ +"""Client for the network hub's agent-key and page-tier endpoints. + +Three calls, all satellite → hub, never browser → hub:: + + POST {hub}/api/agent-key/current -> {"key": "k2p_..."} for the copy button + POST {hub}/api/agent-key/verify -> {"verdict": ..., "ttl": ...} + POST {hub}/api/page-tiers -> {"tiers": {path: tier}, "ttl": ...} + +Why a hub call exists at all +---------------------------- +A signed-in visitor is resolved **locally** by Clerk and never reaches this +module. Only an agent fetch does: someone pastes a document URL into an +assistant, and it arrives with no cookie, carrying `?key=` instead. Only the +hub can validate that key, because only the hub holds the secret it was +derived from. + +That asymmetry is the point of the design. A satellite holds **no key +material** — it cannot mint, and it cannot verify offline. Sharing the hub's +`SESSION_SECRET` would let any satellite verify locally, but anything that can +verify can also mint, including `scope=admin`; twenty deployments holding a +network-wide admin-minting secret is precisely the failure this avoids. + +Authenticating the caller +------------------------- +The hub must know which satellite is asking — a verify endpoint open to the +internet is a key-guessing oracle. This reuses the network's existing +signed-webhook scheme (`CROSS_APP_WEBHOOK_SECRET`, HMAC-SHA256 over +`"{timestamp}." + body`), the same one `lib/satellite_reporter` already uses. +That secret authenticates a caller; it does not derive keys, so holding it +grants a satellite nothing it could not already do. + +Failure behaviour +----------------- +Every failure path — no secret, timeout, DNS, 5xx, non-JSON, wrong shape — +returns ``gated``. Never ``allow``: a hub outage must not publish restricted +prose. Never ``deny``: an outage must not black-hole every document. ``gated`` +leaks nothing and keeps the surface answering, which is the same fail-safe the +package applies when an app's own check raises. + +Nothing here logs a key, or anything derived from one. +""" + +from __future__ import annotations + +import hashlib +import hmac +import json +import logging +import os +import time +from typing import Dict, Optional, Tuple + +logger = logging.getLogger(__name__) + +DEFAULT_HUB_URL = "https://2plot.dev" + +# Allow verdicts outlive deny verdicts on purpose. A brief hub blip should not +# gate a reader who was fine a minute ago, whereas a revoked key should stop +# working promptly — so the cost of being slightly stale is paid by the side +# that fails safe. The hub may override both per response. +ALLOW_TTL_S = 900.0 +DENY_TTL_S = 60.0 + +# key-hash + path -> (verdict, expires_at) +_VERDICT_CACHE: Dict[Tuple[str, str], Tuple[str, float]] = {} +_CACHE_MAX = 4096 + + +def hub_url() -> str: + return (os.getenv("NETWORK_HUB_URL") or DEFAULT_HUB_URL).rstrip("/") + + +def _secret() -> Optional[str]: + return os.getenv("CROSS_APP_WEBHOOK_SECRET") or None + + +def app_id() -> str: + """This satellite's identity to the hub. Same key the reporter uses.""" + return os.getenv("SATELLITE_APP_KEY") or os.getenv("AD_APP_ID") or "pannellum" + + +def enabled() -> bool: + """False when this deployment cannot talk to the hub at all. + + With no shared secret there is nobody to authenticate as, so every verify + would fail anyway. Reporting that up front lets the caller skip the round + trip and go straight to the fail-safe. + """ + return bool(_secret()) + + +def _fingerprint(key: str) -> str: + """A cache handle for a key that is not the key. + + The cache lives in process memory and may be dumped by a debugger, a heap + profiler or an error reporter. Storing a hash means none of those ever + contain a capability. + """ + return hashlib.sha256(key.encode("utf-8", "replace")).hexdigest()[:32] + + +def _cache_get(fingerprint: str, path: str) -> Optional[str]: + entry = _VERDICT_CACHE.get((fingerprint, path)) + if not entry: + return None + verdict, expires_at = entry + if expires_at < time.time(): + _VERDICT_CACHE.pop((fingerprint, path), None) + return None + return verdict + + +def _cache_put(fingerprint: str, path: str, verdict: str, ttl: float) -> None: + if len(_VERDICT_CACHE) >= _CACHE_MAX: + _VERDICT_CACHE.clear() + _VERDICT_CACHE[(fingerprint, path)] = (verdict, time.time() + max(0.0, ttl)) + + +def clear_cache() -> None: + _VERDICT_CACHE.clear() + clear_tiers_cache() + + +def _post(route: str, payload: dict, timeout: float) -> Optional[dict]: + """Signed POST to the hub. Returns the decoded body, or None on any failure.""" + secret = _secret() + if not secret: + return None + + import requests + + from lib.constants import internal_ua + + # Sign the exact bytes sent — serialise once, sign that. + body = json.dumps(payload).encode() + ts = str(int(time.time())) + signature = hmac.new( + secret.encode(), f"{ts}.".encode() + body, hashlib.sha256 + ).hexdigest() + + try: + response = requests.post( + f"{hub_url()}{route}", + data=body, + timeout=timeout, + headers={ + "Content-Type": "application/json", + "X-AI-Canvas-Timestamp": ts, + "X-AI-Canvas-Signature": signature, + "X-Satellite-App": app_id(), + # Internal-traffic contract (lib/constants.INTERNAL_UA): these + # are satellite→hub machine calls, and a key verification is + # not a reader of 2plot.dev's documentation. + "User-Agent": internal_ua("hub-client"), + }, + ) + except Exception as exc: # noqa: BLE001 — DNS, TLS, timeouts all land here + logger.debug("hub %s unreachable: %r", route, exc) + return None + + if response.status_code != 200: + logger.debug("hub %s returned HTTP %s", route, response.status_code) + return None + + try: + decoded = response.json() + except Exception: + # A hub whose catch-all serves an HTML app shell answers 200 with a + # page. Treating that as a verdict would be worse than a timeout. + logger.debug("hub %s did not return JSON", route) + return None + + return decoded if isinstance(decoded, dict) else None + + +def verify(key: str, path: str, tier: str, timeout: float = 3.0) -> str: + """``allow`` | ``gated`` | ``deny`` for an agent fetch carrying ``key``. + + Cached on (key fingerprint, path). Anything unexpected is ``gated``. + """ + if not key: + return "gated" + + fingerprint = _fingerprint(key) + cached = _cache_get(fingerprint, path) + if cached is not None: + return cached + + if not enabled(): + logger.debug("hub verify skipped: no CROSS_APP_WEBHOOK_SECRET") + return "gated" + + decoded = _post( + "/api/agent-key/verify", + {"key": key, "path": path, "tier": tier, "app": app_id()}, + timeout, + ) + if decoded is None: + return "gated" + + verdict = str(decoded.get("verdict") or "").strip().lower() + if verdict not in ("allow", "gated", "deny"): + logger.debug("hub verify returned an unrecognised verdict") + return "gated" + + # The hub may set the TTL; fall back to ours. allow outlives deny. + default_ttl = ALLOW_TTL_S if verdict == "allow" else DENY_TTL_S + try: + ttl = float(decoded.get("ttl", default_ttl)) + except (TypeError, ValueError): + ttl = default_ttl + _cache_put(fingerprint, path, verdict, ttl) + return verdict + + +def current_key(token: str, timeout: float = 3.0) -> Optional[str]: + """This user's current agent key, minted by the hub if needed. + + For the "copy for LLM" button: a signed-in reader gets a URL that still + works after it is pasted into an assistant. ``token`` is the browser's + Clerk session token — server-side, the ``__session`` cookie value on a + Clerk-authenticated request. The hub verifies it against Clerk's JWKS and + mints at ``scope=auth``, never admin. + + The hub 401s any caller-asserted identity (a ``user_id`` in the payload is + the forgery path — this satellite could claim to be anyone), which is why + the token travels instead: only Clerk's signature says who the reader is. + + Two rules from the hub session: call this on copy-button CLICK, never on + page render — every call is a hub round trip and each mint is recorded + hub-side; and ``None`` degrades to copying the plain URL, which is what an + anonymous reader gets anyway. None when the hub is unreachable or auth is + off. + """ + if not token or not enabled(): + return None + + decoded = _post( + "/api/agent-key/current", + {"token": token, "app": app_id()}, + timeout, + ) + if decoded is None: + return None + + key = decoded.get("key") + return key if isinstance(key, str) and key else None + + +# hub_tiers cache: (tiers, expires_at). One entry — the feed is per-app, and +# this process is one app. A failed fetch caches {} briefly so an outage costs +# one timeout per FAILURE_TTL_S, not one per request (access.check calls this +# on every non-public resolution). +TIERS_TTL_S = 900.0 +TIERS_FAILURE_TTL_S = 60.0 +_TIERS_CACHE: Tuple[Dict[str, str], float] = ({}, 0.0) + + +def clear_tiers_cache() -> None: + global _TIERS_CACHE + _TIERS_CACHE = ({}, 0.0) + + +def hub_tiers(timeout: float = 3.0) -> Dict[str, str]: + """Tiers published by the hub — the ceiling for this site's pages. + + Signed POST ``/api/page-tiers`` with ``{"app": app_id()}`` → + ``{"tiers": {path: tier}, "ttl": seconds}``, cached for the returned TTL. + Each fetch is recorded hub-side — the hub admin's "last pulled" indicator + is how a published ceiling is confirmed to have landed on this satellite. + + Every failure returns ``{}``, meaning "hub unknown", which + `page_tiers.effective_tier` resolves to the local value. The ceiling only + ever restricts, so an outage loosens nothing — and an outage that served + a ceiling a moment ago degrades to the local tier, never below it. + """ + global _TIERS_CACHE + tiers, expires_at = _TIERS_CACHE + if expires_at > time.time(): + return tiers + + if not enabled(): + # No secret -> nobody to authenticate as; don't re-check every request. + _TIERS_CACHE = ({}, time.time() + TIERS_FAILURE_TTL_S) + return {} + + decoded = _post("/api/page-tiers", {"app": app_id()}, timeout) + raw = decoded.get("tiers") if isinstance(decoded, dict) else None + if not isinstance(raw, dict): + _TIERS_CACHE = ({}, time.time() + TIERS_FAILURE_TTL_S) + return {} + + # Keep only well-formed entries; a junk value must not become a tier. + tiers = { + str(path): str(tier).strip().lower() + for path, tier in raw.items() + if isinstance(path, str) and isinstance(tier, str) + } + + try: + ttl = float(decoded.get("ttl", TIERS_TTL_S)) + except (TypeError, ValueError): + ttl = TIERS_TTL_S + _TIERS_CACHE = (tiers, time.time() + max(0.0, ttl)) + return tiers diff --git a/lib/network_directory.py b/lib/network_directory.py new file mode 100644 index 0000000..2b050b2 --- /dev/null +++ b/lib/network_directory.py @@ -0,0 +1,187 @@ +"""Cross-host directory for the 2plot network — one definition, every satellite. + +Search engines follow links between hosts weakly; agents don't follow them at +all. Landing on muicharts.2plot.dev a model sees one library, with nothing in +the markup saying the other hosts exist — sitemap.xml cannot fix that, being +scoped to its own origin by design. dash-improve-my-llms emits an explicit +machine-readable directory instead: ``<link rel="related">`` tags in +``<head>``, a ``## Network`` section in ``/llms.txt``, and followed links in +the prerendered body. + +The canonical copy lives in the boilerplate; satellites copy it and note any +deliberate divergence. This copy is based on dash-email's (whose peer list +was verified host-by-host on 2026-07-31, dropping two NXDOMAIN entries the +boilerplate still lists) with two changes of its own: + +- dash-mui-charts (muicharts.2plot.dev) is ADDED — this is the change that + ships it; ``peers_for()`` drops it from this host's own peer list, and + every other satellite's copy should gain it via the boilerplate. +- MUI X (mui.com/x) joins EXTERNAL: it is the upstream library all 13 of + this site's components wrap, referenced on nearly every page. + +Usage in app.py, before ``add_llms_routes(app)``:: + + from lib.constants import BASE_URL + from lib import network_directory + + app._base_url = BASE_URL + network_directory.apply(BASE_URL) +""" + +from __future__ import annotations + +from typing import Any, Dict, List + +PEERS: List[Dict[str, str]] = [ + { + "name": "2plot.ai", + "url": "https://2plot.ai", + "description": "Network hub and account origin.", + }, + { + "name": "2plot.dev", + "url": "https://2plot.dev", + "description": "Package index for every open-source component in the network.", + }, + { + "name": "Documentation boilerplate", + "url": "https://boilerplate.2plot.dev", + "description": "The markdown-driven documentation template every satellite site is built from.", + }, + { + "name": "dash-leaflet2", + "url": "https://leaflet.2plot.dev", + "description": "Leaflet 2 maps as Dash components.", + }, + { + "name": "dash-mui-scheduler", + "url": "https://muischeduler.2plot.dev", + "description": "MUI X Scheduler — calendars and event scheduling for Dash.", + }, + { + "name": "dash-mui-charts", + "url": "https://muicharts.2plot.dev", + "description": "MUI X charts, tree views and time pickers for Dash.", + }, + { + "name": "dash-flows", + "url": "https://flows.2plot.dev", + "description": "Node-graph editors built on React Flow.", + }, + { + "name": "dash-improve-my-llms", + "url": "https://llms.2plot.dev", + "description": "The AI/LLM and SEO package every site in this network is built on.", + }, + { + "name": "dash-email", + "url": "https://email.2plot.dev", + "description": "Email composition and delivery components.", + }, + # dash-pannellum (pannellum.2plot.dev) and dash-emoji-mart + # (emojimart.2plot.dev) belong here the day their DNS resolves. Both were + # NXDOMAIN as of 2026-07-31 (dash-email's verified sweep). +] + +AFFILIATED: List[Dict[str, str]] = [ + { + "name": "Pip Install Python", + "url": "https://pip-install-python.com", + "description": "The original component documentation site.", + }, + { + "name": "Pirate's Bargain", + "url": "https://piratesbargain.com", + "description": "Deal aggregator built on the same Dash stack.", + }, + { + "name": "ai-agent.buzz", + "url": "https://ai-agent.buzz", + "description": "Agent tooling directory.", + }, +] + +EXTERNAL: List[Dict[str, Any]] = [ + { + "name": "MUI X Charts", + "url": "https://mui.com/x/react-charts/", + "description": "The upstream React charting library these components wrap.", + }, + { + "name": "Dash Mantine Components", + "url": "https://www.dash-mantine-components.com", + "description": "The UI component layer these docs are built with.", + "llms_txt": "https://www.dash-mantine-components.com/llms.txt", + }, + { + "name": "Plotly Dash documentation", + "url": "https://dash.plotly.com", + "description": "Upstream framework documentation.", + }, +] + +NETWORK_NAME = "The 2plot network" +NETWORK_DESCRIPTION = ( + "Open-source Dash component libraries by Pip Install Python. Each component " + "has its own documentation site and its own llms.txt; 2plot.dev indexes all " + "of them, and 2plot.ai is the hub." +) +HUB_URL = "https://2plot.dev" + +# The mark drawn in the header of the rendered llms.txt view: "2" + morse +# encoding of "plot" + "ai". Defined here rather than per-app because this +# module is copied verbatim into every satellite — that is what keeps one +# mark across the network instead of twelve slightly different ones. +WORDMARK = { + "morse": "plot", + "prefix": "2", + "suffix": "ai", + "label": "2plot.ai", +} + + +def peers_for(app_url: str) -> List[Dict[str, str]]: + """`PEERS` with this app removed. + + A site listing itself as its own peer reads as generated rather than + curated, and it wastes a slot in a list an agent may only skim. + """ + own = app_url.rstrip("/") + return [p for p in PEERS if p["url"].rstrip("/") != own] + + +def apply(app_url: str) -> None: + """Publish the directory for the app served at ``app_url``. + + Degrades rather than fails on older releases of the package: losing the + directory, or losing the wordmark, is a degradation — refusing to start + is not. + """ + try: + from dash_improve_my_llms import register_network + except ImportError: # pragma: no cover - only on <2.1 + import warnings + + warnings.warn( + "dash-improve-my-llms is older than 2.1, so the cross-host network " + "directory will not be published. Upgrade to publish it.", + RuntimeWarning, + stacklevel=2, + ) + return + + import inspect + + extra: Dict[str, Any] = {} + if "wordmark" in inspect.signature(register_network).parameters: + extra["wordmark"] = WORDMARK + + register_network( + name=NETWORK_NAME, + description=NETWORK_DESCRIPTION, + hub_url=HUB_URL, + peers=peers_for(app_url), + affiliated=AFFILIATED, + external=EXTERNAL, + **extra, + ) diff --git a/lib/page_tiers.py b/lib/page_tiers.py new file mode 100644 index 0000000..77c90f1 --- /dev/null +++ b/lib/page_tiers.py @@ -0,0 +1,130 @@ +"""Who may read a page — the local half of the network's access rule. + +Four tiers, least to most restrictive: + +``public`` anyone, including agents and crawlers +``auth`` any signed-in user; anonymous readers get the gate document +``admin`` signed in AND allowlisted (``ADMIN_EMAILS`` / ``ADMIN_USER_IDS``) +``hidden`` nobody; the document 404s and the page is delisted everywhere + +A page declares its tier in markdown frontmatter, because this template is +already frontmatter-driven and a satellite author should not need a control +board to mark one page:: + + --- + name: Internal Runbook + endpoint: /runbook + tier: admin + --- + +Absent that, :data:`DEFAULT_TIER` applies — ``public``, because a +documentation site that defaults to gated is a documentation site nobody +reads. Override the default per deployment with ``PAGE_DEFAULT_TIER``. + +Two rules make this safe to run before the hub exists: + +**Fail open for reading, closed for admin.** With Clerk unavailable — no keys, +package missing, which is the default — every tier except ``hidden`` degrades +to ``public``. A component library's documentation must never brick because a +deploy forgot a credential. ``hidden`` still holds, because it means "there is +nothing here", not "you may not read this yet". + +**The hub sets the ceiling.** Once ``2plot.dev`` publishes tiers, the effective +tier is the *more restrictive* of the hub's and this site's. A satellite can +lock its own page down further; it can never loosen what the hub restricted. +That direction is deliberate: a satellite misconfiguration then cannot expose +something the network gated, and "loosen this page" stays a hub action, which +is where that authority belongs. +""" + +from __future__ import annotations + +import logging +import os +from typing import Dict, Optional + +logger = logging.getLogger(__name__) + +# Ordered least -> most restrictive. The order is the comparison. +TIERS = ("public", "auth", "admin", "hidden") + + +def _default_tier() -> str: + tier = (os.getenv("PAGE_DEFAULT_TIER") or "public").strip().lower() + if tier not in TIERS: + logger.warning("PAGE_DEFAULT_TIER=%r is not a tier — using 'public'", tier) + return "public" + return tier + + +# endpoint -> tier, populated from frontmatter as pages/markdown.py loads docs. +_LOCAL_TIERS: Dict[str, str] = {} + + +def normalize(path: str) -> str: + """One canonical path form, so registration and lookup cannot disagree.""" + path = (path or "/").strip() + if not path.startswith("/"): + path = "/" + path + return path.rstrip("/") or "/" + + +def register(path: str, tier: Optional[str]) -> str: + """Record a page's locally declared tier. Returns the tier applied.""" + resolved = (tier or _default_tier()).strip().lower() + if resolved not in TIERS: + logger.warning( + "Page %s declares tier %r, which is not one of %s — using %r", + path, tier, TIERS, _default_tier(), + ) + resolved = _default_tier() + _LOCAL_TIERS[normalize(path)] = resolved + return resolved + + +def local_tier(path: str) -> str: + return _LOCAL_TIERS.get(normalize(path), _default_tier()) + + +def registered() -> Dict[str, str]: + """Every locally declared tier. For tests and for a future control board.""" + return dict(_LOCAL_TIERS) + + +def more_restrictive(first: str, second: str) -> str: + """The stricter of two tiers. Unknown values are treated as the default.""" + def rank(tier: str) -> int: + try: + return TIERS.index((tier or "").strip().lower()) + except ValueError: + return TIERS.index(_default_tier()) + + return TIERS[max(rank(first), rank(second))] + + +def effective_tier(path: str, hub_tier: Optional[str] = None) -> str: + """The tier actually enforced for ``path``. + + ``hub_tier`` is the ceiling published by the network hub, when one is + known. Passing None means "hub unknown", which resolves to the local + value — a hub outage must not silently *loosen* anything, and it cannot, + because the local value is already the stricter-or-equal half whenever the + hub is reachable. + """ + local = local_tier(path) + return more_restrictive(local, hub_tier) if hub_tier else local + + +def is_readable_without_auth(tier: str) -> bool: + return tier == "public" + + +def degraded_tier(tier: str) -> str: + """What ``tier`` means when authentication is unavailable entirely. + + Everything except ``hidden`` falls open. See the module docstring — this + is the trade that keeps documentation readable when a credential is + missing, and it is why ``admin`` surfaces use `auth.admin_access_open()` + rather than relying on a tier. + """ + return "hidden" if tier == "hidden" else "public" diff --git a/lib/proxy.py b/lib/proxy.py new file mode 100644 index 0000000..565d6b0 --- /dev/null +++ b/lib/proxy.py @@ -0,0 +1,162 @@ +"""Make the app see the scheme the *client* used, not the last proxy hop. + +TEMPLATE FILE: satellites copy this verbatim and call it from `run.py`. + +The defect, measured on boilerplate.2plot.dev on 2026-08-01:: + + <meta property="twitter:url" content="http://boilerplate.2plot.dev/"> + ^^^^ + +Dash builds that tag from ``request.url`` for every page +(``dash/_pages.py:_page_meta_tags``), and on Flask ``request.url`` is +assembled from ``wsgi.url_scheme``. The request reaches the app over +Cloudflare → Render → gunicorn, and the last hop is plain HTTP, so the app +sees ``http`` and advertises it. Social scrapers do not run JavaScript, so +that string is what they record — and ``og:url`` looked fine the whole time +because ``templates/index.html`` hard-codes it. + +Why gunicorn does not already fix this +-------------------------------------- +It tries to. gunicorn rewrites ``wsgi.url_scheme`` from ``X-Forwarded-Proto``, +but only when the *immediate peer* is in ``forwarded_allow_ips``, which +defaults to ``127.0.0.1``. On Render's native Python runtime the proxy is not +on loopback, so gunicorn declines and the header is left sitting in the +environ, unread. (The sibling satellite leaflet.2plot.dev serves ``https`` in +the same tag from the same Cloudflare/Render/gunicorn stack with no proxy +configuration of its own — the difference we could observe is that it deploys +as a Docker service rather than a native one. That is a plausible explanation +for why one honours the header and the other does not, but it is inference: +we cannot read Render's internal topology. The fix below does not depend on +which is true, which is the point of doing it in the app.) + +Reading the header ourselves, one layer above gunicorn, sidesteps the whole +question: ``HTTP_X_FORWARDED_PROTO`` is in the environ either way. + +Trust +----- +This trusts ``X-Forwarded-Proto`` from whoever connected. That is correct +*here* and would not be everywhere: Render terminates TLS and overwrites the +header on every inbound request, so a client cannot forge it. An app exposed +directly to the internet must not do this — a spoofed header would let a +plaintext request claim to be secure. ``TRUST_PROXY_HEADERS=0`` turns it off +for such a deployment. + +Only the scheme is taken. Host is deliberately NOT rewritten from +``X-Forwarded-Host``: ``lib/constants.BASE_URL`` is already this project's +single source of truth for the public origin (canonical tags, sitemap.xml, +llms.txt), it is guarded by ``require_owned_base_url()``, and a second, +header-derived notion of "what host am I" is exactly how a fork ends up +serving two. +""" + +from __future__ import annotations + +import os + +_SECURE_VALUES = ("https", "on", "ssl", "1") + + +def enabled() -> bool: + """Off only when explicitly disabled — see the Trust note above.""" + return os.environ.get("TRUST_PROXY_HEADERS", "1") != "0" + + +def _scheme_from(value: str) -> str | None: + """The scheme a forwarding header is claiming, or None. + + ``X-Forwarded-Proto`` is a comma-separated list when several proxies each + append to it; the CLIENT's hop is the first, exactly as with + ``X-Forwarded-For``. Taking the last would report the scheme of the hop + nearest the app, which is the plaintext one we are trying to see past. + """ + first = (value or "").split(",")[0].strip().lower() + if not first: + return None + if first in _SECURE_VALUES: + return "https" + return "http" if first == "http" else None + + +# ------------------------------------------------------------------- WSGI -- + + +def _wsgi_proxy_fix(wsgi_app): + def middleware(environ, start_response): + scheme = _scheme_from(environ.get("HTTP_X_FORWARDED_PROTO", "")) + if scheme is None and environ.get("HTTP_X_FORWARDED_SSL", "").lower() == "on": + scheme = "https" + if scheme: + environ["wsgi.url_scheme"] = scheme + return wsgi_app(environ, start_response) + + return middleware + + +# ------------------------------------------------------------------- ASGI -- + + +def _asgi_proxy_fix(asgi_app): + async def middleware(scope, receive, send): + # Lifespan and websocket scopes carry no forwarding headers worth + # rewriting; touching them risks breaking startup for no gain. + if scope.get("type") == "http": + headers = {k.decode("latin-1").lower(): v.decode("latin-1") + for k, v in scope.get("headers") or []} + scheme = _scheme_from(headers.get("x-forwarded-proto", "")) + if scheme is None and headers.get("x-forwarded-ssl", "").lower() == "on": + scheme = "https" + if scheme: + scope = dict(scope) + scope["scheme"] = scheme + return await asgi_app(scope, receive, send) + + return middleware + + +# ------------------------------------------------------------------ apply -- + + +def apply(app, backend: str) -> bool: + """Wrap ``app.server`` so the request scheme survives the proxy hop. + + Returns whether it was applied, so ``run.py`` can say so at boot — the + failure this prevents is silent, and a line in the log is the only way + anyone finds out it was switched off. + + Wrapping the server callable rather than registering a `before_request` + hook is deliberate and the same reasoning as ``lib/analytics_tracker``'s + placement: dash-improve-my-llms installs bot middleware that answers some + crawler requests itself, and a hook registered after it never runs for + them. A social scraper is precisely the traffic that must not be missed. + """ + if not enabled(): + return False + + # NEVER rebind `app.server` itself. It is the Flask/FastAPI/Quart object + # that `run.py` hangs `before_request` off and that gunicorn imports as + # `run:server`; replacing it with a bare callable breaks both. Wrap the + # inner `wsgi_app` / `asgi_app` attribute the frameworks expose for exactly + # this purpose. + if backend == "fastapi": + app.server.add_middleware(_StarletteProxyFix) + return True + + if backend == "quart": + # Quart mirrors Flask's `wsgi_app` with `asgi_app`. + if not hasattr(app.server, "asgi_app"): # pragma: no cover - old Quart + return False + app.server.asgi_app = _asgi_proxy_fix(app.server.asgi_app) + return True + + app.server.wsgi_app = _wsgi_proxy_fix(app.server.wsgi_app) + return True + + +class _StarletteProxyFix: + """`_asgi_proxy_fix` in the shape Starlette's `add_middleware` expects.""" + + def __init__(self, app): + self._inner = _asgi_proxy_fix(app) + + async def __call__(self, scope, receive, send): + return await self._inner(scope, receive, send) diff --git a/lib/traffic_report.py b/lib/traffic_report.py new file mode 100644 index 0000000..9d61733 --- /dev/null +++ b/lib/traffic_report.py @@ -0,0 +1,350 @@ +"""Satellite traffic reporting — dash-mui-charts → the 2plot.ai hub. + +2plot.ai is the analytics home for the whole network: its owner-only +/traffic dashboard charts every app's daily humans/bots, visitors, +sessions, top pages and countries. Each satellite POSTs a signed rollup to +``POST {hub}/api/satellite/traffic`` hourly; re-POSTing the same +(app, date) overwrites, so today's numbers just firm up through the day. +Contract: 2plotai/docs/network/satellite-analytics.md (v1 required fields +plus every v2 optional field are sent). + +Pieces here: +- ``build_rollup(date)`` — fold lib/analytics' per-day hit log into the + payload. Session rule matches the hub's: hits grouped per unique + (ip, user-agent) human visitor, split on 30-minute gaps; + median_session_s covers MULTI-HIT sessions only (never padded). +- ``report_traffic(rollup)`` — HMAC-SHA256 sender (the wallet-provision + scheme: ``X-AI-Canvas-Timestamp`` + ``X-AI-Canvas-Signature`` over + ``f"{ts}." + raw_body`` keyed by CROSS_APP_WEBHOOK_SECRET). The secret is + never logged. +- ``start_traffic_reporter()`` — hourly daemon thread. Reports today AND + yesterday each cycle so a deploy near midnight can't strand yesterday's + tail. GATED to prod (``RENDER`` env) unless ``TRAFFIC_REPORT=1`` — local + dev holds the same shared secret, and a dev POST would OVERWRITE the + hub's real (charts, date) row with dev counts. +- ``register_healthz(server)`` — the tiny Flask liveness probe the hub's + hourly satellite sweep GETs (it must not render the whole Dash index). + +THE COUNTING RULE (this app is a single-page app — see lib/analytics): + + human_hits = "spa" rows with a human UA (one per rendered page, + initial load included) + bot_hits = "doc" rows with a bot UA (crawlers run no JS, so + they never produce a spa row) + +Human "doc" rows and bot "spa" rows are recorded but deliberately left out +of the sums. That is what stops a human's first page load being counted +twice — once as the document request, once as the page view — and it is +also what keeps a JS-executing crawler out of the human sessions. Every +other field (visitors, sessions, median, pages, countries) derives from the +human spa rows, which is why `pages` shows the real doc pages people read +instead of a single `/`. + +Known limitation: Render gives this service no persistent disk, so a deploy +or restart wipes the day's hit log and the next hourly POST overwrites the +hub row with a smaller number for that day (the hub is last-report-wins and +offers no read-back). Point ``ANALYTICS_DIR`` at a mounted disk to fix it. +""" +from __future__ import annotations + +import hashlib +import hmac +import ipaddress +import json +import logging +import os +import random +import threading +import time +import urllib.request +from datetime import datetime, timedelta +from statistics import median + +from lib import analytics + +logger = logging.getLogger(__name__) + +# Our key on every hub surface — the subdomain slug, per STANDARD §5. The +# pip-docs+ hub already keys this app "muicharts" (legacy "dash-mui-charts" +# folds in at ingest); the 2plot.ai traffic sink must gain the same fold +# before this ships, or its /traffic series forks from the old "charts" row. +APP_KEY = "muicharts" +SESSION_GAP_S = 30 * 60 # the hub's session-split rule — keep in sync +REPORT_INTERVAL_S = 60 * 60 +_STARTUP_DELAY_S = 90 # let the app settle before the first POST +_GEO_LOOKUPS_PER_PASS = 60 # ip-api.com is free at ~45 req/min + +_started = False + + +def _secret() -> str: + return (os.environ.get("CROSS_APP_WEBHOOK_SECRET") or "").strip() + + +def hub_url() -> str: + """TRAFFIC_HUB_URL → PRIMARY_HOST → the hub's canonical domain.""" + base = (os.environ.get("TRAFFIC_HUB_URL") + or os.environ.get("PRIMARY_HOST") + or "https://2plot.ai") + return base.rstrip("/") + + +def reporting_enabled() -> bool: + """Prod-only unless forced: dev machines hold the same shared secret, and + the hub OVERWRITES per (app, date) — a local run must never clobber the + real numbers. TRAFFIC_REPORT=0 is the prod kill switch.""" + if not _secret(): + return False + forced = os.environ.get("TRAFFIC_REPORT") + if forced is not None: + return forced == "1" + return bool(os.environ.get("RENDER")) + + +# --------------------------------------------------------------------------- # +# Geo — resolved off the request path, in the reporter thread # +# --------------------------------------------------------------------------- # + +def _geo_cache_path(): + return analytics.analytics_dir() / "geo_cache.json" + + +def _load_geo_cache() -> dict: + try: + with open(_geo_cache_path(), encoding="utf-8") as fh: + data = json.load(fh) + return data if isinstance(data, dict) else {} + except Exception: # noqa: BLE001 — missing/corrupt cache → start empty + return {} + + +def _save_geo_cache(cache: dict) -> None: + try: + path = _geo_cache_path() + path.parent.mkdir(parents=True, exist_ok=True) + tmp = path.with_suffix(".tmp") + tmp.write_text(json.dumps(cache), encoding="utf-8") + tmp.replace(path) + except Exception: # noqa: BLE001 + logger.debug("geo cache write failed", exc_info=True) + + +def _is_public_ip(ip: str) -> bool: + try: + addr = ipaddress.ip_address(ip) + except ValueError: + return False + return not (addr.is_private or addr.is_loopback or addr.is_link_local + or addr.is_reserved or addr.is_multicast) + + +def _lookup_country(ip: str) -> str | None: + """One ip-api.com lookup (free, no key). Failures cache as unknown so a + dead lookup isn't retried every hour.""" + try: + import requests + + r = requests.get(f"http://ip-api.com/json/{ip}", + params={"fields": "status,countryCode"}, timeout=2) + if r.status_code == 200: + data = r.json() + if data.get("status") == "success": + cc = (data.get("countryCode") or "").strip().upper() + return cc if len(cc) == 2 else None + except Exception: # noqa: BLE001 — geo is optional, never fatal + logger.debug("geo lookup failed for %s", ip, exc_info=True) + return None + + +def resolve_countries(ips, budget: int = _GEO_LOOKUPS_PER_PASS) -> dict: + """ip → ISO country for the given addresses, cached on disk. Only public + IPs are looked up, and at most ``budget`` new ones per call.""" + cache = _load_geo_cache() + dirty = False + for ip in ips: + if not ip or ip in cache or not _is_public_ip(ip): + continue + if budget <= 0: + break + budget -= 1 + cache[ip] = _lookup_country(ip) or "" # "" = looked up, unknown + dirty = True + if dirty: + _save_geo_cache(cache) + return cache + + +# --------------------------------------------------------------------------- # +# Rollup # +# --------------------------------------------------------------------------- # + +def build_rollup(date: str | None = None, rows: list[dict] | None = None, + geo: bool = True) -> dict: + """The full v1+v2 payload for one local day (default: today). + + ``rows`` (test seam) defaults to that day's hit log; ``geo=False`` skips + the ip-api enrichment so unit checks stay offline. + """ + if date is None: + date = datetime.now().strftime("%Y-%m-%d") + if rows is None: + rows = analytics.load_day(date) + + # See THE COUNTING RULE in the module docstring. + humans = [r for r in rows if r.get("source") == "spa" and not r.get("bot")] + bot_hits = sum(1 for r in rows if r.get("source") == "doc" and r.get("bot")) + + rollup: dict = { + "app": APP_KEY, + "date": date, + "human_hits": len(humans), + "bot_hits": bot_hits, + } + + # visitors — unique (ip, browser) pairs, humans only + by_visitor: dict[str, list[float]] = {} + for r in humans: + try: + ts = datetime.fromisoformat(r["ts"]).timestamp() + except (KeyError, ValueError): + continue + by_visitor.setdefault( + analytics.visitor_key(r.get("ip"), r.get("ua")), []).append(ts) + rollup["visitors"] = len(by_visitor) + + # sessions — per-visitor hit groups split on 30-minute gaps (hub rule); + # median_session_s from multi-hit sessions ONLY. + session_count = 0 + spans: list[float] = [] + for stamps in by_visitor.values(): + stamps.sort() + start = prev = stamps[0] + hits = 1 + for ts in stamps[1:]: + if ts - prev > SESSION_GAP_S: + session_count += 1 + if hits > 1: + spans.append(prev - start) + start, hits = ts, 1 + else: + hits += 1 + prev = ts + session_count += 1 + if hits > 1: + spans.append(prev - start) + rollup["sessions"] = session_count + if spans: + rollup["median_session_s"] = round(median(spans), 1) + + # pages — human page views per path, top 20 + page_hits: dict[str, int] = {} + for r in humans: + p = r.get("path") or "/" + page_hits[p] = page_hits.get(p, 0) + 1 + rollup["pages"] = [{"path": p, "hits": n} for p, n in + sorted(page_hits.items(), key=lambda kv: -kv[1])[:20]] + + # countries — humans only, top 20. CF-IPCountry when a Cloudflare-fronted + # domain ever supplies it; otherwise the cached ip-api lookup. + cache = resolve_countries({r.get("ip") for r in humans}) if geo else {} + country_hits: dict[str, int] = {} + for r in humans: + cc = (r.get("country") or cache.get(r.get("ip") or "") or "").upper() + if len(cc) == 2: + country_hits[cc] = country_hits.get(cc, 0) + 1 + if country_hits: + rollup["countries"] = dict( + sorted(country_hits.items(), key=lambda kv: -kv[1])[:20]) + + return rollup + + +# --------------------------------------------------------------------------- # +# Sender # +# --------------------------------------------------------------------------- # + +def sign(body: bytes, ts: str, secret: str) -> str: + """HMAC_SHA256(secret, f"{ts}." + raw_body) — the network's shared scheme.""" + return hmac.new(secret.encode(), f"{ts}.".encode() + body, + hashlib.sha256).hexdigest() + + +def report_traffic(rollup: dict, *, secret: str | None = None, + hub: str | None = None, timeout: float = 10.0) -> dict: + """POST one rollup to the hub. Returns the hub's JSON reply; raises on + network/HTTP errors (the daemon catches — a down hub must never hurt us).""" + secret = secret or _secret() + if not secret: + raise RuntimeError("CROSS_APP_WEBHOOK_SECRET unset") + body = json.dumps(rollup).encode() + ts = str(int(time.time())) + from lib.constants import internal_ua + + req = urllib.request.Request( + f"{hub or hub_url()}/api/satellite/traffic", data=body, + headers={"Content-Type": "application/json", + # Internal-traffic contract: the hub drops this from its + # own analytics instead of counting us as a bot. + "User-Agent": internal_ua("traffic-report"), + "X-AI-Canvas-Timestamp": ts, + "X-AI-Canvas-Signature": sign(body, ts, secret)}) + with urllib.request.urlopen(req, timeout=timeout) as r: + return json.load(r) + + +def report_pass() -> None: + """One reporting cycle: today + yesterday (self-heals deploy gaps and the + midnight rollover — re-POSTs overwrite on the hub).""" + today = datetime.now() + for day in (today, today - timedelta(days=1)): + date = day.strftime("%Y-%m-%d") + try: + rollup = build_rollup(date) + res = report_traffic(rollup) + logger.info("traffic report %s: %s human / %s bot → %s", + date, rollup["human_hits"], rollup["bot_hits"], + res.get("ok")) + except Exception as e: # noqa: BLE001 — reporting must never crash us + logger.warning("traffic report %s failed: %r", date, e) + analytics.prune() + + +def start_traffic_reporter() -> None: + """Hourly reporter daemon. No-op when gated off. + + Both gunicorn workers run one: they read the same shared hit log, so the + rollups are identical and last-write-wins makes the duplicate harmless. + The jitter just keeps the two POSTs from landing at the same instant. + """ + global _started + if _started: + return + if not reporting_enabled(): + print("[traffic] satellite reporting OFF " + "(needs CROSS_APP_WEBHOOK_SECRET + RENDER, or TRAFFIC_REPORT=1)") + return + _started = True + + def _loop(): + time.sleep(_STARTUP_DELAY_S + random.uniform(0, 60)) + while True: + report_pass() + time.sleep(REPORT_INTERVAL_S) + + threading.Thread(target=_loop, daemon=True, name="traffic-report").start() + print(f"[traffic] satellite reporter ON → {hub_url()}/api/satellite/traffic " + f"(hourly, app={APP_KEY!r})") + + +# --------------------------------------------------------------------------- # +# Health probe # +# --------------------------------------------------------------------------- # + +def register_healthz(server) -> None: + """GET /healthz — the network liveness convention the hub's hourly + satellite sweep polls. Tiny JSON, no Dash render, untracked by analytics.""" + from flask import jsonify + + @server.get("/healthz") + def healthz(): + return jsonify({"ok": True, "app": APP_KEY}) diff --git a/package-lock.json b/package-lock.json index 9eb41a2..103d231 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dash_mui_charts", - "version": "1.3.0", + "version": "1.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dash_mui_charts", - "version": "1.3.0", + "version": "1.4.0", "license": "MIT", "dependencies": { "@emotion/react": "^11.14.0", @@ -32,6 +32,7 @@ "css-loader": "^6.8.1", "prop-types": "^15.8.1", "react": "^18.2.0", + "react-docgen": "^5.4.3", "react-dom": "^18.2.0", "style-loader": "^3.3.3", "webpack": "^5.88.2", @@ -1591,6 +1592,12 @@ } } }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -1751,6 +1758,15 @@ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.11.tgz", "integrity": "sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg==" }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.6.tgz", + "integrity": "sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", @@ -3101,6 +3117,12 @@ "@types/node": "*" } }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", @@ -3536,6 +3558,30 @@ "ansi-html": "bin/ansi-html" } }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", @@ -3555,6 +3601,18 @@ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", "dev": true }, + "node_modules/ast-types": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.14.2.tgz", + "integrity": "sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==", + "dev": true, + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/atomically": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/atomically/-/atomically-2.1.0.tgz", @@ -3791,6 +3849,114 @@ "node": ">= 0.8" } }, + "node_modules/c8": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-7.14.0.tgz", + "integrity": "sha512-i04rtkkcNcCf7zsQcSv/T9EbUn4RXQ6mropeMcjFOsQXQ0iGLAr/xT6TImQg4+U9hmNpN9XdvPkjUL1IzbgxJw==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^2.0.0", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-reports": "^3.1.4", + "rimraf": "^3.0.2", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^9.0.0", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9" + }, + "bin": { + "c8": "bin/c8.js" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/c8/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/c8/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", @@ -3895,6 +4061,17 @@ "node": ">=8" } }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, "node_modules/clone-deep": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", @@ -3917,6 +4094,24 @@ "node": ">=6" } }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "node_modules/colorette": { "version": "2.0.20", "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", @@ -4393,6 +4588,18 @@ "node": ">=6" } }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/dom-helpers": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", @@ -4442,6 +4649,12 @@ "integrity": "sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==", "dev": true }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, "node_modules/encodeurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", @@ -4600,6 +4813,20 @@ "node": ">=4.0" } }, + "node_modules/estree-to-babel": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/estree-to-babel/-/estree-to-babel-3.2.1.tgz", + "integrity": "sha512-YNF+mZ/Wu2FU/gvmzuWtYc8rloubL7wfXCTgouFrnjGVXPA/EeYYA7pupXWrb3Iv1cTBeSSxxJIbK23l4MRNqg==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.1.6", + "@babel/types": "^7.2.0", + "c8": "^7.6.0" + }, + "engines": { + "node": ">=8.3.0" + } + }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -4874,6 +5101,19 @@ } } }, + "node_modules/foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -4935,6 +5175,15 @@ "node": ">=6.9.0" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -5150,6 +5399,12 @@ } ] }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, "node_modules/http-deceiver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", @@ -5468,6 +5723,15 @@ "node": ">=0.10.0" } }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -5558,6 +5822,54 @@ "node": ">=0.10.0" } }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-reports": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/jest-worker": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", @@ -5693,6 +6005,33 @@ "yallist": "^3.0.2" } }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -5802,6 +6141,15 @@ "node": ">=6" } }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -5871,6 +6219,18 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "node_modules/node-dir": { + "version": "0.1.17", + "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.17.tgz", + "integrity": "sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg==", + "dev": true, + "dependencies": { + "minimatch": "^3.0.2" + }, + "engines": { + "node": ">= 0.10.5" + } + }, "node_modules/node-forge": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.3.tgz", @@ -6398,6 +6758,30 @@ "node": ">=0.10.0" } }, + "node_modules/react-docgen": { + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/react-docgen/-/react-docgen-5.4.3.tgz", + "integrity": "sha512-xlLJyOlnfr8lLEEeaDZ+X2J/KJoe6Nr9AzxnkdQWush5hz2ZSu66w6iLMOScMmxoSHWpWMn+k3v5ZiyCfcWsOA==", + "dev": true, + "dependencies": { + "@babel/core": "^7.7.5", + "@babel/generator": "^7.12.11", + "@babel/runtime": "^7.7.6", + "ast-types": "^0.14.2", + "commander": "^2.19.0", + "doctrine": "^3.0.0", + "estree-to-babel": "^3.1.0", + "neo-async": "^2.6.1", + "node-dir": "^0.1.10", + "strip-indent": "^3.0.0" + }, + "bin": { + "react-docgen": "bin/react-docgen.js" + }, + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/react-dom": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", @@ -6521,6 +6905,15 @@ "regjsparser": "bin/parser" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", @@ -7065,6 +7458,32 @@ "safe-buffer": "~5.2.0" } }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -7074,6 +7493,18 @@ "node": ">=6" } }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/stubborn-fs": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/stubborn-fs/-/stubborn-fs-2.0.0.tgz", @@ -7199,6 +7630,20 @@ } } }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/thunky": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", @@ -7385,6 +7830,20 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -7672,6 +8131,23 @@ "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", "dev": true }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -7705,6 +8181,15 @@ "integrity": "sha512-FNb0eEqqUUbnuvxuHqNuKH8qCGKqxu+558Zi8UzOoQk8Z9LdvpONK+v7m3gpKVHrk5Aq+0nNLsKxu/6OYh7Umw==", "optional": true }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", @@ -7719,6 +8204,33 @@ "node": ">= 6" } }, + "node_modules/yargs": { + "version": "16.2.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.2.tgz", + "integrity": "sha512-Nt9ZJjXTv5R8MHbqby/wXQ6Gi0Bb3TcYZkR1bzuL4yB2OxWPkXknz513gEF0GoA6tn00UpbPvERW8rzCuWCA6w==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/yocto-queue": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz", diff --git a/package.json b/package.json index 3da794f..c2fbf41 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dash_mui_charts", - "version": "1.3.0", + "version": "1.4.0", "description": "Dash components wrapping MUI X Charts for creating interactive data visualizations", "main": "build/index.js", "repository": { @@ -14,7 +14,7 @@ "scripts": { "start": "webpack serve --config webpack.serve.config.js --open", "build:js": "webpack --mode production", - "build:backends": "dash-generate-components ./src/lib/components dash_mui_charts -p dash_mui_charts --ignore \\.test\\.", + "build:backends": "dash-generate-components ./src/lib/components dash_mui_charts -p package-info.json --ignore \\.test\\.", "build": "npm run build:js && npm run build:backends", "validate-init": "python _validate_init.py" }, @@ -44,6 +44,7 @@ "css-loader": "^6.8.1", "prop-types": "^15.8.1", "react": "^18.2.0", + "react-docgen": "^5.4.3", "react-dom": "^18.2.0", "style-loader": "^3.3.3", "webpack": "^5.88.2", diff --git a/pages/barchart_basic.py b/pages/barchart_basic.py deleted file mode 100644 index 888a8dc..0000000 --- a/pages/barchart_basic.py +++ /dev/null @@ -1,131 +0,0 @@ -""" -BarChart Demo - Basic -Vertical, horizontal, stacked bar charts, border radius, and bar labels. -""" - -import json -import random - -import dash -from dash import html, callback, Input, Output - -dash.register_page(__name__, path='/barchart-basic', name='Bar Chart - Basic') - -from dash_mui_charts import BarChart - -random.seed(42) - -months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'] -revenue = [random.randint(30, 90) for _ in months] -expenses = [random.randint(20, 65) for _ in months] -profit = [r - e for r, e in zip(revenue, expenses)] - -CARD = 'page-card' - -layout = html.Div([ - html.H2("Bar Chart — Basic Examples"), - html.P("Vertical, horizontal, stacked bars, border radius, and bar labels.", - style={'color': 'var(--mantine-color-dimmed)', 'marginBottom': '24px'}), - - # --- 1. Multi-Series Vertical --- - html.Div([ - html.H4("Multi-Series Vertical"), - html.P("Revenue, expenses, and profit by month.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-basic-multi', - series=[ - {'data': revenue, 'label': 'Revenue ($k)', 'color': '#1976d2'}, - {'data': expenses, 'label': 'Expenses ($k)', 'color': '#f57c00'}, - {'data': profit, 'label': 'Profit ($k)', 'color': '#388e3c'}, - ], - xAxis=[{'data': months, 'scaleType': 'band', 'label': 'Month'}], - yAxis=[{'label': 'Amount ($k)'}], - grid={'horizontal': True}, - height=350, - ), - ], className=CARD), - - # --- 2. Stacked --- - html.Div([ - html.H4("Stacked Bar Chart"), - html.P("Traffic sources stacked per month.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-basic-stacked', - series=[ - {'data': [random.randint(10, 30) for _ in months], 'label': 'Organic', 'color': '#66bb6a', 'stack': 'traffic'}, - {'data': [random.randint(8, 25) for _ in months], 'label': 'Paid', 'color': '#42a5f5', 'stack': 'traffic'}, - {'data': [random.randint(5, 15) for _ in months], 'label': 'Referral', 'color': '#ab47bc', 'stack': 'traffic'}, - ], - xAxis=[{'data': months, 'scaleType': 'band'}], - yAxis=[{'label': 'Visitors (k)'}], - grid={'horizontal': True}, - height=300, - ), - ], className=CARD), - - # --- 3. Horizontal with Border Radius --- - html.Div([ - html.H4("Horizontal Bar Chart"), - html.P("Revenue displayed horizontally with rounded corners.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-basic-horizontal', - series=[{'data': revenue, 'label': 'Revenue ($k)', 'color': '#1976d2'}], - yAxis=[{'data': months, 'scaleType': 'band'}], - xAxis=[{'label': 'Amount ($k)'}], - layout='horizontal', - borderRadius=6, - grid={'vertical': True}, - height=300, - ), - ], className=CARD), - - # --- 4. Bar Labels --- - html.Div([ - html.H4("Bar Labels"), - html.P("Display values on bars with center and outside placement.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-basic-labels', - series=[ - {'data': [4, 3, 5], 'barLabel': 'value', 'barLabelPlacement': 'outside', 'label': 'Outside'}, - {'data': [2, 5, 6], 'barLabel': 'value', 'barLabelPlacement': 'center', 'label': 'Center'}, - {'data': [3, 4, 2], 'label': 'No label'}, - ], - xAxis=[{'data': ['Group A', 'Group B', 'Group C'], 'scaleType': 'band'}], - height=300, - grid={'horizontal': True}, - ), - ], className=CARD), - - # --- 5. Border Radius + Colors --- - html.Div([ - html.H4("Rounded Bars with Custom Colors"), - html.P("Border radius and custom color palette.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-basic-rounded', - series=[ - {'data': [25, 50, 35, 70, 45], 'label': 'Sales'}, - ], - xAxis=[{'data': ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'], 'scaleType': 'band'}], - borderRadius=10, - colors=['#7c4dff'], - grid={'horizontal': True}, - height=280, - ), - ], className=CARD), - - # --- 6. Negative Values --- - html.Div([ - html.H4("Negative Values"), - html.P("Bars with negative values extend below the zero baseline.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-basic-negative', - series=[ - {'data': [35, -20, 45, -15, 55, -30], 'label': 'Net Change', 'color': '#00897b'}, - ], - xAxis=[{'data': months, 'scaleType': 'band'}], - grid={'horizontal': True}, - height=300, - ), - ], className=CARD), - -], style={'maxWidth': '900px', 'margin': '0 auto'}) diff --git a/pages/barchart_candlestick.py b/pages/barchart_candlestick.py deleted file mode 100644 index f129547..0000000 --- a/pages/barchart_candlestick.py +++ /dev/null @@ -1,240 +0,0 @@ -""" -CandlestickChart Demo - OHLC Charts -Static candlestick charts with array and dataset modes, volume overlay, click events. -""" - -import json -import random - -import dash -from dash import html, callback, Input, Output - -dash.register_page(__name__, path='/candlestick', name='Candlestick Chart') - -from dash_mui_charts import CandlestickChart - -random.seed(42) - -CARD = 'page-card' - -PRE_STYLE = { - 'fontSize': '12px', - 'margin': 0, - 'padding': '10px 14px', - 'borderRadius': '6px', - 'background': 'var(--mantine-color-body)', - 'border': '1px solid var(--mantine-color-default-border)', - 'maxHeight': '120px', - 'overflow': 'auto', - 'color': 'var(--mantine-color-text)', -} - -# --- Generate realistic-looking OHLC data --- -def generate_ohlc(start_price=100, n=30, seed=42): - random.seed(seed) - data = [] - price = start_price - for _ in range(n): - change = random.gauss(0, 2) - open_p = round(price + random.uniform(-0.5, 0.5), 2) - close_p = round(open_p + change, 2) - high_p = round(max(open_p, close_p) + random.uniform(0.5, 3), 2) - low_p = round(min(open_p, close_p) - random.uniform(0.5, 3), 2) - vol = random.randint(500, 5000) - data.append({'open': open_p, 'high': high_p, 'low': low_p, 'close': close_p, 'volume': vol}) - price = close_p - return data - -ohlc_data = generate_ohlc(100, 25) - -# Date labels -dates = [f'Apr {i+1}' for i in range(25)] - -# Array format (tuples) -ohlc_tuples = [[d['open'], d['high'], d['low'], d['close']] for d in ohlc_data] - -# Dataset format -ohlc_dataset = [{**d, 'date': dates[i]} for i, d in enumerate(ohlc_data)] - -# Larger dataset for zoom demo -big_ohlc = generate_ohlc(150, 60, seed=99) -big_dates = [f'Day {i+1}' for i in range(60)] - -layout = html.Div([ - html.H2("Candlestick Chart — OHLC"), - html.P("Static candlestick charts for financial data visualization.", - style={'color': 'var(--mantine-color-dimmed)', 'marginBottom': '24px'}), - - # --- 1. Basic Array Format --- - html.Div([ - html.H4("Basic Candlestick (Array Format)"), - html.P("OHLC data as [open, high, low, close] tuples.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - CandlestickChart( - id='candle-basic', - series=[{ - 'data': ohlc_tuples, - 'upColor': '#4caf50', - 'downColor': '#f44336', - }], - xAxis=[{'data': dates, 'label': 'Date'}], - yAxis=[{'label': 'Price ($)'}], - grid={'horizontal': True}, - height=400, - ), - ], className=CARD), - - # --- 2. Dataset Mode --- - html.Div([ - html.H4("Dataset Mode"), - html.P("Data as row objects with datasetKeys mapping.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - CandlestickChart( - id='candle-dataset', - dataset=ohlc_dataset, - series=[{ - 'datasetKeys': {'open': 'open', 'high': 'high', 'low': 'low', 'close': 'close'}, - 'upColor': '#26a69a', - 'downColor': '#ef5350', - }], - xAxis=[{'dataKey': 'date', 'label': 'Date'}], - yAxis=[{'label': 'Price ($)'}], - grid={'horizontal': True}, - height=400, - ), - ], className=CARD), - - # --- 3. With Volume --- - html.Div([ - html.H4("Candlestick + Volume"), - html.P("Volume bars overlaid below candles (30% of chart height).", - style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - CandlestickChart( - id='candle-volume', - dataset=ohlc_dataset, - series=[{ - 'datasetKeys': {'open': 'open', 'high': 'high', 'low': 'low', 'close': 'close'}, - 'volumeKey': 'volume', - 'upColor': '#4caf50', - 'downColor': '#f44336', - }], - xAxis=[{'dataKey': 'date'}], - yAxis=[{'label': 'Price ($)'}], - showVolume=True, - volumeHeightRatio=0.3, - grid={'horizontal': True}, - height=450, - ), - ], className=CARD), - - # --- 4. Custom Candle Styling --- - html.Div([ - html.H4("Custom Styling"), - html.P("Wider candle bodies and thicker wicks with custom colors.", - style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - CandlestickChart( - id='candle-styled', - series=[{ - 'data': ohlc_tuples[:15], - 'upColor': '#00bcd4', - 'downColor': '#ff5722', - }], - xAxis=[{'data': dates[:15]}], - yAxis=[{'label': 'Price'}], - bodyWidthRatio=0.8, - wickWidth=3, - grid={'horizontal': True, 'vertical': True}, - height=380, - ), - ], className=CARD), - - # --- 5. Reference Lines --- - html.Div([ - html.H4("Support & Resistance Lines"), - html.P("Reference lines marking key price levels.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - CandlestickChart( - id='candle-refs', - series=[{ - 'data': ohlc_tuples, - 'upColor': '#4caf50', - 'downColor': '#f44336', - }], - xAxis=[{'data': dates}], - yAxis=[{'label': 'Price ($)'}], - referenceLines=[ - { - 'y': max(d[1] for d in ohlc_tuples), - 'label': 'Resistance', - 'labelAlign': 'end', - 'lineStyle': {'stroke': '#f44336', 'strokeWidth': 1.5, 'strokeDasharray': '6 4'}, - 'labelStyle': {'fill': '#f44336', 'fontSize': 11}, - }, - { - 'y': min(d[2] for d in ohlc_tuples), - 'label': 'Support', - 'labelAlign': 'end', - 'lineStyle': {'stroke': '#4caf50', 'strokeWidth': 1.5, 'strokeDasharray': '6 4'}, - 'labelStyle': {'fill': '#4caf50', 'fontSize': 11}, - }, - { - 'y': sum(d[3] for d in ohlc_tuples) / len(ohlc_tuples), - 'label': 'Avg Close', - 'labelAlign': 'start', - 'lineStyle': {'stroke': '#ff9800', 'strokeWidth': 1}, - 'labelStyle': {'fill': '#ff9800', 'fontSize': 11}, - }, - ], - grid={'horizontal': True}, - height=420, - ), - ], className=CARD), - - # --- 6. Click Events --- - html.Div([ - html.H4("Click Events"), - html.P("Click a candle to see its OHLC data.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - CandlestickChart( - id='candle-click', - series=[{ - 'data': ohlc_tuples[:15], - 'upColor': '#1976d2', - 'downColor': '#c62828', - }], - xAxis=[{'data': dates[:15]}], - yAxis=[{'label': 'Price ($)'}], - grid={'horizontal': True}, - height=380, - ), - html.P("clickData:", style={'fontSize': '12px', 'color': 'var(--mantine-color-dimmed)', 'marginTop': '12px', 'marginBottom': '4px'}), - html.Pre(id='candle-click-out', children='Click a candle...', style=PRE_STYLE), - ], className=CARD), - - # --- 7. Tooltip disabled --- - html.Div([ - html.H4("Tooltip Disabled"), - html.P("Set tooltip trigger to 'none' to hide the OHLC tooltip.", - style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - CandlestickChart( - id='candle-no-tooltip', - series=[{ - 'data': ohlc_tuples[:10], - 'upColor': '#7b1fa2', - 'downColor': '#e65100', - }], - xAxis=[{'data': dates[:10]}], - tooltip={'trigger': 'none'}, - grid={'horizontal': True}, - height=300, - ), - ], className=CARD), - -], style={'maxWidth': '900px', 'margin': '0 auto'}) - - -@callback( - Output('candle-click-out', 'children'), - Input('candle-click', 'clickData'), - prevent_initial_call=True, -) -def show_candle_click(data): - if not data: - return 'Click a candle...' - return json.dumps(data, indent=2) diff --git a/pages/barchart_dataset.py b/pages/barchart_dataset.py deleted file mode 100644 index fafdd96..0000000 --- a/pages/barchart_dataset.py +++ /dev/null @@ -1,110 +0,0 @@ -""" -BarChart Demo - Dataset Mode -Using the dataset prop with dataKey references for clean data management. -""" - -import dash -from dash import html - -dash.register_page(__name__, path='/barchart-dataset', name='Bar Chart - Dataset') - -from dash_mui_charts import BarChart - -CARD = 'page-card' - -# City temperature data -temp_dataset = [ - {'month': 'Jan', 'london': 5, 'paris': 4, 'nyc': 0, 'tokyo': 6}, - {'month': 'Feb', 'london': 6, 'paris': 5, 'nyc': 1, 'tokyo': 7}, - {'month': 'Mar', 'london': 9, 'paris': 10, 'nyc': 7, 'tokyo': 11}, - {'month': 'Apr', 'london': 13, 'paris': 14, 'nyc': 13, 'tokyo': 17}, - {'month': 'May', 'london': 16, 'paris': 18, 'nyc': 18, 'tokyo': 21}, - {'month': 'Jun', 'london': 20, 'paris': 22, 'nyc': 24, 'tokyo': 25}, - {'month': 'Jul', 'london': 22, 'paris': 25, 'nyc': 28, 'tokyo': 29}, - {'month': 'Aug', 'london': 21, 'paris': 24, 'nyc': 27, 'tokyo': 30}, - {'month': 'Sep', 'london': 18, 'paris': 20, 'nyc': 22, 'tokyo': 26}, - {'month': 'Oct', 'london': 14, 'paris': 15, 'nyc': 16, 'tokyo': 20}, - {'month': 'Nov', 'london': 9, 'paris': 9, 'nyc': 9, 'tokyo': 14}, - {'month': 'Dec', 'london': 6, 'paris': 5, 'nyc': 2, 'tokyo': 8}, -] - -# Product sales data -product_dataset = [ - {'product': 'Widget A', 'q1': 120, 'q2': 150, 'q3': 180, 'q4': 200}, - {'product': 'Widget B', 'q1': 90, 'q2': 110, 'q3': 95, 'q4': 130}, - {'product': 'Widget C', 'q1': 200, 'q2': 180, 'q3': 220, 'q4': 250}, - {'product': 'Widget D', 'q1': 60, 'q2': 85, 'q3': 100, 'q4': 90}, -] - -layout = html.Div([ - html.H2("Bar Chart — Dataset Mode"), - html.P("Using dataset prop with dataKey references — no data duplication across series.", - style={'color': 'var(--mantine-color-dimmed)', 'marginBottom': '24px'}), - - # --- 1. Basic Dataset --- - html.Div([ - html.H4("City Temperatures (Dataset Mode)"), - html.P("Data is passed once via dataset, series reference columns by dataKey.", - style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-ds-temps', - dataset=temp_dataset, - xAxis=[{'dataKey': 'month', 'scaleType': 'band'}], - series=[ - {'dataKey': 'london', 'label': 'London', 'color': '#1976d2'}, - {'dataKey': 'paris', 'label': 'Paris', 'color': '#f57c00'}, - {'dataKey': 'nyc', 'label': 'New York', 'color': '#388e3c'}, - {'dataKey': 'tokyo', 'label': 'Tokyo', 'color': '#d32f2f'}, - ], - yAxis=[{'label': '°C'}], - height=380, - grid={'horizontal': True}, - ), - ], className=CARD), - - # --- 2. Stacked Dataset --- - html.Div([ - html.H4("Stacked Quarterly Sales"), - html.P("Stacked bars from dataset with horizontal layout.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-ds-stacked', - dataset=product_dataset, - yAxis=[{'dataKey': 'product', 'scaleType': 'band'}], - series=[ - {'dataKey': 'q1', 'label': 'Q1', 'stack': 'annual', 'color': '#5c6bc0'}, - {'dataKey': 'q2', 'label': 'Q2', 'stack': 'annual', 'color': '#42a5f5'}, - {'dataKey': 'q3', 'label': 'Q3', 'stack': 'annual', 'color': '#26c6da'}, - {'dataKey': 'q4', 'label': 'Q4', 'stack': 'annual', 'color': '#66bb6a'}, - ], - layout='horizontal', - borderRadius=4, - grid={'vertical': True}, - height=300, - ), - ], className=CARD), - - # --- 3. Two cities, side-by-side with bar gap control --- - html.Div([ - html.H4("Bar Gap & Category Gap"), - html.P("Control spacing with categoryGapRatio and barGapRatio on the band axis.", - style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-ds-gaps', - dataset=temp_dataset, - xAxis=[{ - 'dataKey': 'month', - 'scaleType': 'band', - 'categoryGapRatio': 0.4, - 'barGapRatio': 0.1, - }], - series=[ - {'dataKey': 'london', 'label': 'London', 'color': '#1565c0'}, - {'dataKey': 'tokyo', 'label': 'Tokyo', 'color': '#c62828'}, - ], - yAxis=[{'label': '°C'}], - height=320, - grid={'horizontal': True}, - ), - ], className=CARD), - -], style={'maxWidth': '900px', 'margin': '0 auto'}) diff --git a/pages/barchart_interaction.py b/pages/barchart_interaction.py deleted file mode 100644 index a2c3d41..0000000 --- a/pages/barchart_interaction.py +++ /dev/null @@ -1,207 +0,0 @@ -""" -BarChart Demo - Interaction -Click events, highlighting, axis highlight, and tooltip modes. -""" - -import json -import random - -import dash -from dash import html, callback, Input, Output - -dash.register_page(__name__, path='/barchart-interaction', name='Bar Chart - Interaction') - -from dash_mui_charts import BarChart - -random.seed(42) - -CARD = 'page-card' - -PRE_STYLE = { - 'fontSize': '12px', - 'margin': 0, - 'padding': '10px 14px', - 'borderRadius': '6px', - 'background': 'var(--mantine-color-body)', - 'border': '1px solid var(--mantine-color-default-border)', - 'maxHeight': '120px', - 'overflow': 'auto', - 'color': 'var(--mantine-color-text)', -} - -months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'] -revenue = [random.randint(30, 90) for _ in months] -expenses = [random.randint(20, 65) for _ in months] - -layout = html.Div([ - html.H2("Bar Chart — Interaction"), - html.P("Click events, highlighting, axis highlight modes, and tooltip triggers.", - style={'color': 'var(--mantine-color-dimmed)', 'marginBottom': '24px'}), - - # --- 1. Click Events --- - html.Div([ - html.H4("Click Events"), - html.P("Click any bar to capture seriesId and dataIndex.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-int-click', - series=[ - {'data': revenue, 'label': 'Revenue', 'color': '#1976d2'}, - {'data': expenses, 'label': 'Expenses', 'color': '#f57c00'}, - ], - xAxis=[{'data': months, 'scaleType': 'band'}], - grid={'horizontal': True}, - height=300, - ), - html.P("clickData:", style={'fontSize': '12px', 'color': 'var(--mantine-color-dimmed)', 'marginTop': '12px', 'marginBottom': '4px'}), - html.Pre(id='bar-int-click-out', children='Click a bar...', style=PRE_STYLE), - ], className=CARD), - - # --- 2. Axis Click --- - html.Div([ - html.H4("Axis Click"), - html.P("Click on the chart area to capture the axis value and all series values at that point.", - style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-int-axis-click', - series=[ - {'data': revenue, 'label': 'Revenue', 'color': '#1976d2'}, - {'data': expenses, 'label': 'Expenses', 'color': '#f57c00'}, - ], - xAxis=[{'data': months, 'scaleType': 'band'}], - grid={'horizontal': True}, - height=300, - ), - html.P("axisClickData:", style={'fontSize': '12px', 'color': 'var(--mantine-color-dimmed)', 'marginTop': '12px', 'marginBottom': '4px'}), - html.Pre(id='bar-int-axis-click-out', children='Click on the chart...', style=PRE_STYLE), - ], className=CARD), - - # --- 3. Series Highlighting --- - html.Div([ - html.H4("Series Highlighting"), - html.P("Hover over a bar to highlight the entire series and fade others.", - style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-int-highlight', - series=[ - {'data': [4, 3, 5, 7, 6], 'label': 'Alpha', - 'highlightScope': {'highlight': 'series', 'fade': 'global'}, 'color': '#5c6bc0'}, - {'data': [2, 5, 6, 3, 4], 'label': 'Beta', - 'highlightScope': {'highlight': 'series', 'fade': 'global'}, 'color': '#26a69a'}, - {'data': [3, 4, 2, 5, 3], 'label': 'Gamma', - 'highlightScope': {'highlight': 'series', 'fade': 'global'}, 'color': '#ef5350'}, - ], - xAxis=[{'data': ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'], 'scaleType': 'band'}], - grid={'horizontal': True}, - height=300, - ), - html.P("highlightedItem:", style={'fontSize': '12px', 'color': 'var(--mantine-color-dimmed)', 'marginTop': '12px', 'marginBottom': '4px'}), - html.Pre(id='bar-int-highlight-out', children='Hover over a bar...', style=PRE_STYLE), - ], className=CARD), - - # --- 4. Axis Highlight Modes --- - html.Div([ - html.H4("Axis Highlight: Band vs Line vs None"), - html.P("Control the hover band/line on each axis.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - html.Div([ - html.Div([ - html.P("x: 'band' (default)", style={'fontWeight': 600, 'fontSize': '13px'}), - BarChart( - id='bar-int-ax-band', - series=[{'data': revenue, 'label': 'Revenue', 'color': '#1976d2'}], - xAxis=[{'data': months, 'scaleType': 'band'}], - axisHighlight={'x': 'band', 'y': 'none'}, - height=200, - ), - ], style={'flex': 1}), - html.Div([ - html.P("x: 'line'", style={'fontWeight': 600, 'fontSize': '13px'}), - BarChart( - id='bar-int-ax-line', - series=[{'data': revenue, 'label': 'Revenue', 'color': '#f57c00'}], - xAxis=[{'data': months, 'scaleType': 'band'}], - axisHighlight={'x': 'line', 'y': 'none'}, - height=200, - ), - ], style={'flex': 1}), - html.Div([ - html.P("x: 'none'", style={'fontWeight': 600, 'fontSize': '13px'}), - BarChart( - id='bar-int-ax-none', - series=[{'data': revenue, 'label': 'Revenue', 'color': '#388e3c'}], - xAxis=[{'data': months, 'scaleType': 'band'}], - axisHighlight={'x': 'none', 'y': 'none'}, - height=200, - ), - ], style={'flex': 1}), - ], style={'display': 'flex', 'gap': '16px'}), - ], className=CARD), - - # --- 5. Tooltip Modes --- - html.Div([ - html.H4("Tooltip Triggers"), - html.P("'axis' shows all series at hover position; 'item' shows only the hovered bar.", - style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - html.Div([ - html.Div([ - html.P("trigger: 'axis' (default)", style={'fontWeight': 600, 'fontSize': '13px'}), - BarChart( - id='bar-int-tt-axis', - series=[ - {'data': revenue, 'label': 'Revenue', 'color': '#1976d2'}, - {'data': expenses, 'label': 'Expenses', 'color': '#f57c00'}, - ], - xAxis=[{'data': months, 'scaleType': 'band'}], - tooltip={'trigger': 'axis'}, - height=250, - ), - ], style={'flex': 1}), - html.Div([ - html.P("trigger: 'item'", style={'fontWeight': 600, 'fontSize': '13px'}), - BarChart( - id='bar-int-tt-item', - series=[ - {'data': revenue, 'label': 'Revenue', 'color': '#1976d2'}, - {'data': expenses, 'label': 'Expenses', 'color': '#f57c00'}, - ], - xAxis=[{'data': months, 'scaleType': 'band'}], - tooltip={'trigger': 'item'}, - height=250, - ), - ], style={'flex': 1}), - ], style={'display': 'flex', 'gap': '16px'}), - ], className=CARD), - -], style={'maxWidth': '900px', 'margin': '0 auto'}) - - -@callback( - Output('bar-int-click-out', 'children'), - Input('bar-int-click', 'clickData'), - prevent_initial_call=True, -) -def show_click(data): - if not data: - return 'Click a bar...' - return json.dumps(data, indent=2) - - -@callback( - Output('bar-int-axis-click-out', 'children'), - Input('bar-int-axis-click', 'axisClickData'), - prevent_initial_call=True, -) -def show_axis_click(data): - if not data: - return 'Click on the chart...' - return json.dumps(data, indent=2) - - -@callback( - Output('bar-int-highlight-out', 'children'), - Input('bar-int-highlight', 'highlightedItem'), - prevent_initial_call=True, -) -def show_highlight(data): - if not data: - return 'Hover over a bar...' - return json.dumps(data, indent=2) diff --git a/pages/barchart_pro.py b/pages/barchart_pro.py deleted file mode 100644 index cdc2722..0000000 --- a/pages/barchart_pro.py +++ /dev/null @@ -1,114 +0,0 @@ -""" -BarChart Demo - Pro Features -Zoom, toolbar, slider, and brush (requires MUI Pro license key). -""" - -import os -import random - -import dash -from dash import html - -dash.register_page(__name__, path='/barchart-pro', name='Bar Chart - Pro') - -from dash_mui_charts import BarChart - -random.seed(42) - -CARD = 'page-card' - -MUI_KEY = os.getenv('MUI_PRO_API_KEY', '') - -# Large dataset for zoom demos -categories = [f'W{i+1}' for i in range(52)] -weekly_sales = [random.randint(20, 100) for _ in categories] -weekly_returns = [random.randint(2, 20) for _ in categories] - -layout = html.Div([ - html.H2("Bar Chart — Pro Features"), - html.P("Zoom, slider, toolbar, and brush selection. Requires MUI_PRO_API_KEY env variable.", - style={'color': 'var(--mantine-color-dimmed)', 'marginBottom': '24px'}), - - html.Div( - html.P( - "⚠️ Set MUI_PRO_API_KEY environment variable to enable Pro features." if not MUI_KEY - else "✓ Pro license key detected.", - style={'color': 'var(--mantine-color-orange-6)' if not MUI_KEY else 'var(--mantine-color-green-7)', 'fontWeight': 600}, - ), - className=CARD, - style={'background': 'var(--mantine-color-body)' if not MUI_KEY else 'var(--mantine-color-body)'}, - ), - - # --- 1. Zoom with Slider --- - html.Div([ - html.H4("Zoom with Slider"), - html.P("52 weeks of data with a zoom slider. Drag the slider or use mouse wheel to zoom.", - style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-pro-slider', - licenseKey=MUI_KEY, - series=[ - {'data': weekly_sales, 'label': 'Sales', 'color': '#1976d2'}, - ], - xAxis=[{ - 'data': categories, - 'scaleType': 'band', - 'zoom': {'minSpan': 8}, - 'label': 'Week', - }], - yAxis=[{'label': 'Units'}], - showSlider=True, - initialZoom=[{'axisId': 'auto-generated-id-0', 'start': 0, 'end': 40}], - grid={'horizontal': True}, - height=400, - ), - ], className=CARD), - - # --- 2. Multi-Series Zoom + Toolbar --- - html.Div([ - html.H4("Zoom + Toolbar"), - html.P("Toolbar with zoom in/out buttons and export options.", - style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-pro-toolbar', - licenseKey=MUI_KEY, - series=[ - {'data': weekly_sales, 'label': 'Sales', 'color': '#1565c0'}, - {'data': weekly_returns, 'label': 'Returns', 'color': '#c62828'}, - ], - xAxis=[{ - 'data': categories, - 'scaleType': 'band', - 'zoom': {'minSpan': 5}, - }], - showSlider=True, - showToolbar=True, - grid={'horizontal': True}, - height=420, - ), - ], className=CARD), - - # --- 3. Stacked Zoom --- - html.Div([ - html.H4("Stacked with Zoom"), - html.P("Stacked bars with zoom and slider.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-pro-stacked-zoom', - licenseKey=MUI_KEY, - series=[ - {'data': [random.randint(10, 40) for _ in categories], 'label': 'Online', 'stack': 'channel', 'color': '#1976d2'}, - {'data': [random.randint(5, 30) for _ in categories], 'label': 'Retail', 'stack': 'channel', 'color': '#42a5f5'}, - {'data': [random.randint(3, 15) for _ in categories], 'label': 'Wholesale', 'stack': 'channel', 'color': '#90caf9'}, - ], - xAxis=[{ - 'data': categories, - 'scaleType': 'band', - 'zoom': {'minSpan': 6}, - }], - showSlider=True, - grid={'horizontal': True}, - height=380, - ), - ], className=CARD), - -], style={'maxWidth': '900px', 'margin': '0 auto'}) diff --git a/pages/barchart_reference.py b/pages/barchart_reference.py deleted file mode 100644 index e393194..0000000 --- a/pages/barchart_reference.py +++ /dev/null @@ -1,169 +0,0 @@ -""" -BarChart Demo - Reference Lines & Styling -Reference lines for thresholds/targets, custom colors, animations, and legend control. -""" - -import random - -import dash -from dash import html - -dash.register_page(__name__, path='/barchart-reference', name='Bar Chart - Reference Lines') - -from dash_mui_charts import BarChart - -random.seed(42) - -CARD = 'page-card' - -months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug'] -sales = [45, 52, 48, 61, 55, 70, 65, 72] - -layout = html.Div([ - html.H2("Bar Chart — Reference Lines & Styling"), - html.P("Reference lines, animation control, custom rendering, and legend options.", - style={'color': 'var(--mantine-color-dimmed)', 'marginBottom': '24px'}), - - # --- 1. Horizontal Reference Line (Target) --- - html.Div([ - html.H4("Target Line"), - html.P("Horizontal reference line showing a sales target.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-ref-target', - series=[ - {'data': sales, 'label': 'Monthly Sales', 'color': '#1976d2'}, - ], - xAxis=[{'data': months, 'scaleType': 'band'}], - yAxis=[{'label': 'Units Sold'}], - referenceLines=[ - { - 'y': 60, - 'label': 'Target (60)', - 'labelAlign': 'end', - 'lineStyle': {'stroke': '#f44336', 'strokeWidth': 2, 'strokeDasharray': '6 4'}, - 'labelStyle': {'fill': '#f44336', 'fontWeight': 'bold', 'fontSize': 12}, - }, - ], - grid={'horizontal': True}, - height=350, - ), - ], className=CARD), - - # --- 2. Multiple Reference Lines --- - html.Div([ - html.H4("Multiple Reference Lines"), - html.P("Show min, avg, and max thresholds.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-ref-multi', - series=[ - {'data': sales, 'label': 'Sales', 'color': '#5c6bc0'}, - ], - xAxis=[{'data': months, 'scaleType': 'band'}], - referenceLines=[ - { - 'y': min(sales), - 'label': f'Min ({min(sales)})', - 'labelAlign': 'start', - 'lineStyle': {'stroke': '#f44336', 'strokeWidth': 1.5, 'strokeDasharray': '4 4'}, - 'labelStyle': {'fill': '#f44336', 'fontSize': 11}, - }, - { - 'y': sum(sales) / len(sales), - 'label': f'Avg ({sum(sales) / len(sales):.0f})', - 'labelAlign': 'middle', - 'lineStyle': {'stroke': '#ff9800', 'strokeWidth': 2}, - 'labelStyle': {'fill': '#ff9800', 'fontSize': 11}, - }, - { - 'y': max(sales), - 'label': f'Max ({max(sales)})', - 'labelAlign': 'end', - 'lineStyle': {'stroke': '#4caf50', 'strokeWidth': 1.5, 'strokeDasharray': '4 4'}, - 'labelStyle': {'fill': '#4caf50', 'fontSize': 11}, - }, - ], - grid={'horizontal': True}, - height=350, - ), - ], className=CARD), - - # --- 3. Vertical Reference Line --- - html.Div([ - html.H4("Vertical Reference Line"), - html.P("Mark a specific category (e.g., policy change date).", - style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-ref-vertical', - series=[ - {'data': sales, 'label': 'Sales', 'color': '#00897b'}, - ], - xAxis=[{'data': months, 'scaleType': 'band'}], - referenceLines=[ - { - 'x': 'May', - 'label': 'New Policy', - 'labelAlign': 'start', - 'lineStyle': {'stroke': '#9c27b0', 'strokeWidth': 2}, - 'labelStyle': {'fill': '#9c27b0', 'fontWeight': 'bold', 'fontSize': 12}, - }, - ], - grid={'horizontal': True}, - height=350, - ), - ], className=CARD), - - # --- 4. No Animation --- - html.Div([ - html.H4("Skip Animation"), - html.P("Bars render instantly when skipAnimation=True.", - style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-ref-noanim', - series=[ - {'data': sales, 'label': 'Sales', 'color': '#ef6c00'}, - ], - xAxis=[{'data': months, 'scaleType': 'band'}], - skipAnimation=True, - grid={'horizontal': True}, - height=280, - ), - ], className=CARD), - - # --- 5. Hidden Legend --- - html.Div([ - html.H4("Hidden Legend"), - html.P("Use hideLegend=True when the legend is redundant.", - style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-ref-nolegend', - series=[ - {'data': sales, 'label': 'Sales', 'color': '#7b1fa2'}, - ], - xAxis=[{'data': months, 'scaleType': 'band'}], - hideLegend=True, - borderRadius=8, - grid={'horizontal': True}, - height=280, - ), - ], className=CARD), - - # --- 6. Custom Color Palette --- - html.Div([ - html.H4("Custom Color Palette"), - html.P("Override the default palette with the colors prop.", - style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-ref-colors', - series=[ - {'data': [30, 45, 35], 'label': 'East'}, - {'data': [25, 50, 40], 'label': 'West'}, - {'data': [40, 30, 55], 'label': 'Central'}, - ], - xAxis=[{'data': ['2023', '2024', '2025'], 'scaleType': 'band'}], - colors=['#ff6f00', '#00bfa5', '#6200ea'], - grid={'horizontal': True}, - height=300, - ), - ], className=CARD), - -], style={'maxWidth': '900px', 'margin': '0 auto'}) diff --git a/pages/barchart_stacking.py b/pages/barchart_stacking.py deleted file mode 100644 index 4ee430e..0000000 --- a/pages/barchart_stacking.py +++ /dev/null @@ -1,118 +0,0 @@ -""" -BarChart Demo - Stacking -Stack offsets, stack ordering, and diverging stacked bars. -""" - -import random - -import dash -from dash import html - -dash.register_page(__name__, path='/barchart-stacking', name='Bar Chart - Stacking') - -from dash_mui_charts import BarChart - -random.seed(99) - -CARD = 'page-card' - -categories = ['Q1', 'Q2', 'Q3', 'Q4'] - -layout = html.Div([ - html.H2("Bar Chart — Stacking Options"), - html.P("Stack offsets, ordering, and diverging stacked bars.", - style={'color': 'var(--mantine-color-dimmed)', 'marginBottom': '24px'}), - - # --- 1. Standard Stack --- - html.Div([ - html.H4("Standard Stack (offset: none)"), - html.P("Default stacking — bars accumulate from zero.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-stack-normal', - series=[ - {'data': [40, 35, 50, 45], 'label': 'Product A', 'stack': 'revenue', 'color': '#1976d2'}, - {'data': [30, 25, 35, 40], 'label': 'Product B', 'stack': 'revenue', 'color': '#42a5f5'}, - {'data': [20, 30, 25, 20], 'label': 'Product C', 'stack': 'revenue', 'color': '#90caf9'}, - ], - xAxis=[{'data': categories, 'scaleType': 'band'}], - yAxis=[{'label': 'Revenue ($k)'}], - grid={'horizontal': True}, - height=320, - ), - ], className=CARD), - - # --- 2. Expand (Normalized to 100%) --- - html.Div([ - html.H4("Normalized Stack (offset: expand)"), - html.P("All bars fill to 100% — shows proportions rather than absolute values.", - style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-stack-expand', - series=[ - {'data': [40, 35, 50, 45], 'label': 'Product A', 'stack': 'revenue', 'stackOffset': 'expand', 'color': '#e65100'}, - {'data': [30, 25, 35, 40], 'label': 'Product B', 'stack': 'revenue', 'stackOffset': 'expand', 'color': '#ff9800'}, - {'data': [20, 30, 25, 20], 'label': 'Product C', 'stack': 'revenue', 'stackOffset': 'expand', 'color': '#ffcc80'}, - ], - xAxis=[{'data': categories, 'scaleType': 'band'}], - grid={'horizontal': True}, - height=320, - ), - ], className=CARD), - - # --- 3. Diverging Stack --- - html.Div([ - html.H4("Diverging Stack"), - html.P("Positive values above zero, negative below — useful for sentiment or net scores.", - style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-stack-diverging', - series=[ - {'data': [20, -10, 30, -5], 'label': 'Gains', 'stack': 'net', 'stackOffset': 'diverging', 'color': '#4caf50'}, - {'data': [-15, 25, -20, 35], 'label': 'Losses', 'stack': 'net', 'stackOffset': 'diverging', 'color': '#f44336'}, - ], - xAxis=[{'data': categories, 'scaleType': 'band'}], - grid={'horizontal': True}, - height=320, - ), - ], className=CARD), - - # --- 4. Multiple Stack Groups --- - html.Div([ - html.H4("Multiple Stack Groups"), - html.P("Different stack IDs create separate stacked groups side by side.", - style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-stack-groups', - series=[ - {'data': [40, 35, 50, 45], 'label': '2024 Online', 'stack': 'year2024', 'color': '#1565c0'}, - {'data': [20, 15, 25, 30], 'label': '2024 Retail', 'stack': 'year2024', 'color': '#42a5f5'}, - {'data': [35, 40, 45, 55], 'label': '2025 Online', 'stack': 'year2025', 'color': '#2e7d32'}, - {'data': [25, 20, 30, 35], 'label': '2025 Retail', 'stack': 'year2025', 'color': '#66bb6a'}, - ], - xAxis=[{'data': categories, 'scaleType': 'band'}], - yAxis=[{'label': 'Sales ($k)'}], - grid={'horizontal': True}, - height=350, - ), - ], className=CARD), - - # --- 5. Horizontal Stacked --- - html.Div([ - html.H4("Horizontal Stacked"), - html.P("Stacked bars in horizontal layout with rounded corners.", style={'color': 'var(--mantine-color-dimmed)', 'fontSize': '14px'}), - BarChart( - id='bar-stack-horizontal', - series=[ - {'data': [60, 45, 70, 55], 'label': 'Completed', 'stack': 'tasks', 'color': '#4caf50'}, - {'data': [20, 25, 15, 30], 'label': 'In Progress', 'stack': 'tasks', 'color': '#ff9800'}, - {'data': [10, 15, 5, 10], 'label': 'Blocked', 'stack': 'tasks', 'color': '#f44336'}, - ], - yAxis=[{'data': ['Team A', 'Team B', 'Team C', 'Team D'], 'scaleType': 'band'}], - layout='horizontal', - borderRadius=4, - grid={'vertical': True}, - height=280, - ), - ], className=CARD), - -], style={'maxWidth': '900px', 'margin': '0 auto'}) diff --git a/pages/changelog.py b/pages/changelog.py index 69cb5b7..32ca247 100644 --- a/pages/changelog.py +++ b/pages/changelog.py @@ -7,7 +7,16 @@ import dash_mantine_components as dmc from dash import html, dcc -dash.register_page(__name__, path='/changelog', name='Changelog') +from lib.constants import OG_IMAGE_URL, PAGE_TITLE_PREFIX + +dash.register_page( + __name__, + path='/changelog', + name='Changelog', + title=PAGE_TITLE_PREFIX + 'Changelog', + description='Release history for dash-mui-charts: all notable changes by version, rendered from the project CHANGELOG.', + image_url=OG_IMAGE_URL, +) # Read the changelog file _changelog_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'CHANGELOG.md') diff --git a/pages/heatmap.py b/pages/heatmap.py deleted file mode 100644 index 5ecb7b9..0000000 --- a/pages/heatmap.py +++ /dev/null @@ -1,517 +0,0 @@ -""" -Heatmap - Matrix Visualization with Color Intensity - -This page demonstrates the Heatmap component for creating -matrix visualizations where color intensity represents values. -This is a Pro feature - requires MUI X Pro license key. -""" - -import os -import json -import dash -import dash_mantine_components as dmc -from dash import html, callback, Input, Output - -dash.register_page(__name__, path='/heatmap', name='Heatmap') - -from dash_mui_charts import Heatmap - -# Get license key from environment -MUI_LICENSE_KEY = os.environ.get('MUI_PRO_API_KEY', '') - -# Sample data - Weekly activity (7 days x 4 weeks) -days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] -weeks = ['Week 1', 'Week 2', 'Week 3', 'Week 4'] - -# Generate activity data as [x_index, y_index, value] -activity_data = [ - # Week 1 - [0, 0, 8], [1, 0, 7], [2, 0, 9], [3, 0, 6], [4, 0, 5], [5, 0, 2], [6, 0, 1], - # Week 2 - [0, 1, 7], [1, 1, 8], [2, 1, 8], [3, 1, 9], [4, 1, 6], [5, 1, 3], [6, 1, 2], - # Week 3 - [0, 2, 9], [1, 2, 8], [2, 2, 7], [3, 2, 8], [4, 2, 7], [5, 2, 4], [6, 2, 3], - # Week 4 - [0, 3, 6], [1, 3, 7], [2, 3, 8], [3, 3, 9], [4, 3, 8], [5, 3, 5], [6, 3, 2], -] - -# Correlation matrix data -variables = ['Revenue', 'Users', 'Sessions', 'Conversion', 'Bounce Rate'] -correlation_data = [ - [0, 0, 1.00], [1, 0, 0.85], [2, 0, 0.78], [3, 0, 0.65], [4, 0, -0.42], - [0, 1, 0.85], [1, 1, 1.00], [2, 1, 0.92], [3, 1, 0.58], [4, 1, -0.55], - [0, 2, 0.78], [1, 2, 0.92], [2, 2, 1.00], [3, 2, 0.48], [4, 2, -0.62], - [0, 3, 0.65], [1, 3, 0.58], [2, 3, 0.48], [3, 3, 1.00], [4, 3, -0.38], - [0, 4, -0.42], [1, 4, -0.55], [2, 4, -0.62], [3, 4, -0.38], [4, 4, 1.00], -] - -# Temperature data (hours x days) -hours = ['6am', '9am', '12pm', '3pm', '6pm', '9pm'] -temp_days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'] -temperature_data = [ - # Monday - [0, 0, 58], [0, 1, 65], [0, 2, 72], [0, 3, 75], [0, 4, 70], [0, 5, 62], - # Tuesday - [1, 0, 55], [1, 1, 62], [1, 2, 70], [1, 3, 73], [1, 4, 68], [1, 5, 60], - # Wednesday - [2, 0, 60], [2, 1, 68], [2, 2, 78], [2, 3, 82], [2, 4, 76], [2, 5, 65], - # Thursday - [3, 0, 62], [3, 1, 70], [3, 2, 80], [3, 3, 85], [3, 4, 78], [3, 5, 68], - # Friday - [4, 0, 58], [4, 1, 66], [4, 2, 74], [4, 3, 78], [4, 4, 72], [4, 5, 64], -] - -# Common styles -section_style = {'marginBottom': '50px'} -description_style = {'color': '#666', 'marginBottom': '15px'} -code_style = { - 'backgroundColor': '#f5f5f5', - 'padding': '15px', - 'borderRadius': '5px', - 'whiteSpace': 'pre-wrap', - 'fontSize': '12px', - 'overflow': 'auto', -} -pro_badge = html.Span( - "PRO", - style={ - 'backgroundColor': '#ff9800', - 'color': 'white', - 'padding': '2px 8px', - 'borderRadius': '4px', - 'fontSize': '10px', - 'fontWeight': 'bold', - 'marginLeft': '10px', - 'verticalAlign': 'middle', - } -) - -layout = html.Div([ - html.Div([ - html.H1("Heatmap", style={'display': 'inline'}), - pro_badge, - ]), - html.P( - "Heatmaps display data as a matrix where color intensity represents values. " - "Perfect for correlation matrices, activity tracking, and multi-dimensional data.", - style={'fontSize': '16px', 'color': '#666', 'marginBottom': '20px'} - ), - html.Div([ - html.P( - "This feature requires an MUI X Pro license key. " - "Set your license key in the MUI_PRO_API_KEY environment variable.", - style={ - 'backgroundColor': '#fff3e0', - 'padding': '12px 16px', - 'borderRadius': '4px', - 'borderLeft': '4px solid #ff9800', - 'marginBottom': '40px', - } - ), - ]) if not MUI_LICENSE_KEY else None, - - # ========================================================================== - # Basic Heatmap - # ========================================================================== - html.Div([ - html.H2("Basic Heatmap"), - html.P( - "A simple heatmap showing weekly activity levels. " - "Data is provided as [x_index, y_index, value] tuples.", - style=description_style - ), - Heatmap( - id='basic-heatmap', - licenseKey=MUI_LICENSE_KEY, - data=activity_data, - xAxis={'data': days, 'label': 'Day of Week'}, - yAxis={'data': weeks, 'label': 'Week'}, - height=300, - colorScale={ - 'type': 'continuous', - 'min': 0, - 'max': 10, - 'colors': ['#e3f2fd', '#1565c0'], - }, - ), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""Heatmap( - licenseKey=MUI_LICENSE_KEY, - data=[ - [0, 0, 8], [1, 0, 7], [2, 0, 9], ... # [x, y, value] - ], - xAxis={'data': ['Mon', 'Tue', 'Wed', ...], 'label': 'Day of Week'}, - yAxis={'data': ['Week 1', 'Week 2', ...], 'label': 'Week'}, - height=300, - colorScale={ - 'type': 'continuous', - 'min': 0, - 'max': 10, - 'colors': ['#e3f2fd', '#1565c0'], # Light blue to dark blue - }, -)""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # Correlation Matrix - # ========================================================================== - html.Div([ - html.H2("Correlation Matrix"), - html.P( - "Heatmaps are ideal for displaying correlation matrices. " - "Use a diverging color scale to show positive and negative correlations.", - style=description_style - ), - Heatmap( - id='correlation-heatmap', - licenseKey=MUI_LICENSE_KEY, - data=correlation_data, - xAxis={'data': variables}, - yAxis={'data': variables}, - height=400, - colorScale={ - 'type': 'continuous', - 'min': -1, - 'max': 1, - 'colors': ['#d32f2f', '#fff', '#1976d2'], # Red to White to Blue - }, - margin={'left': 100, 'right': 20, 'top': 20, 'bottom': 80}, - ), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""# Correlation values range from -1 to 1 -Heatmap( - data=correlation_data, # [[0, 0, 1.00], [1, 0, 0.85], ...] - xAxis={'data': ['Revenue', 'Users', 'Sessions', ...]}, - yAxis={'data': ['Revenue', 'Users', 'Sessions', ...]}, - height=400, - colorScale={ - 'type': 'continuous', - 'min': -1, - 'max': 1, - 'colors': ['#d32f2f', '#fff', '#1976d2'], # Diverging: red-white-blue - }, -)""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # Temperature Heatmap - # ========================================================================== - html.Div([ - html.H2("Temperature Heatmap"), - html.P( - "A practical example showing hourly temperatures across the week. " - "Uses a warm color scale from cool (blue) to hot (red).", - style=description_style - ), - Heatmap( - id='temperature-heatmap', - licenseKey=MUI_LICENSE_KEY, - data=temperature_data, - xAxis={'data': temp_days, 'label': 'Day'}, - yAxis={'data': hours, 'label': 'Time'}, - height=350, - colorScale={ - 'type': 'continuous', - 'min': 50, - 'max': 90, - 'colors': ['#42a5f5', '#ffeb3b', '#f44336'], # Blue-Yellow-Red - }, - ), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""Heatmap( - data=temperature_data, - xAxis={'data': ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'], 'label': 'Day'}, - yAxis={'data': ['6am', '9am', '12pm', '3pm', '6pm', '9pm'], 'label': 'Time'}, - height=350, - colorScale={ - 'type': 'continuous', - 'min': 50, - 'max': 90, - 'colors': ['#42a5f5', '#ffeb3b', '#f44336'], # Blue-Yellow-Red - }, -)""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # Custom Rounded Cells - # ========================================================================== - html.Div([ - html.H2("Custom Rounded Cells"), - html.P( - "Use cellStyle='rounded' for cells with gaps, rounded corners, and value labels. " - "Customize gap, borderRadius, fontSize, and text color.", - style=description_style - ), - Heatmap( - id='rounded-heatmap', - licenseKey=MUI_LICENSE_KEY, - data=activity_data, - xAxis={'data': days, 'label': 'Day of Week'}, - yAxis={'data': weeks, 'label': 'Week'}, - height=300, - colorScale={ - 'type': 'continuous', - 'min': 0, - 'max': 10, - 'colors': ['#e8f5e9', '#2e7d32'], - }, - cellStyle='rounded', - highlightScope={'highlight': 'item'}, - ), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""# Simple rounded cells with default settings -Heatmap( - data=activity_data, - xAxis={'data': days, 'label': 'Day of Week'}, - yAxis={'data': weeks, 'label': 'Week'}, - height=300, - colorScale={ - 'type': 'continuous', - 'min': 0, - 'max': 10, - 'colors': ['#e8f5e9', '#2e7d32'], - }, - cellStyle='rounded', # Enable rounded corners with gap - highlightScope={'highlight': 'item'}, # Highlight on hover -)""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # Custom Cell Configuration - # ========================================================================== - html.Div([ - html.H2("Custom Cell Configuration"), - html.P( - "Fine-tune cell appearance with custom gap, border radius, font size, and colors.", - style=description_style - ), - Heatmap( - id='custom-cell-heatmap', - licenseKey=MUI_LICENSE_KEY, - data=activity_data, - xAxis={'data': days}, - yAxis={'data': weeks}, - height=300, - colorScale={ - 'type': 'continuous', - 'min': 0, - 'max': 10, - 'colors': ['#fce4ec', '#c2185b'], - }, - cellStyle={ - 'gap': 6, - 'borderRadius': 8, - 'showValue': True, - 'fontSize': 14, - 'fontWeight': 600, - 'textColor': '#ffffff', - }, - highlightScope={'highlight': 'item'}, - ), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""# Detailed cell customization -Heatmap( - data=activity_data, - xAxis={'data': days}, - yAxis={'data': weeks}, - height=300, - colorScale={ - 'type': 'continuous', - 'min': 0, - 'max': 10, - 'colors': ['#fce4ec', '#c2185b'], # Pink gradient - }, - cellStyle={ - 'gap': 6, # Space between cells - 'borderRadius': 8, # Rounded corners - 'showValue': True, # Display value in cell - 'fontSize': 14, # Text size - 'fontWeight': 600, # Text weight - 'textColor': '#ffffff', # Text color - }, - highlightScope={'highlight': 'item'}, -)""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # Piecewise Color Scale - # ========================================================================== - html.Div([ - html.H2("Piecewise Color Scale"), - html.P( - "Use a piecewise color scale for discrete color bands. " - "Useful for categorizing values into ranges (e.g., Low, Medium, High).", - style=description_style - ), - Heatmap( - id='piecewise-heatmap', - licenseKey=MUI_LICENSE_KEY, - data=activity_data, - xAxis={'data': days}, - yAxis={'data': weeks}, - height=300, - colorScale={ - 'type': 'piecewise', - 'thresholds': [3, 5, 7], - 'colors': ['#e8f5e9', '#81c784', '#43a047', '#1b5e20'], # Light to dark green - }, - ), - html.Div([ - html.Span("Legend: ", style={'fontWeight': 'bold', 'marginRight': '10px'}), - html.Span("0-2 (Low) ", style={'backgroundColor': '#e8f5e9', 'padding': '2px 8px', 'marginRight': '5px'}), - html.Span("3-4 ", style={'backgroundColor': '#81c784', 'padding': '2px 8px', 'marginRight': '5px'}), - html.Span("5-6 ", style={'backgroundColor': '#43a047', 'padding': '2px 8px', 'marginRight': '5px', 'color': 'white'}), - html.Span("7+ (High)", style={'backgroundColor': '#1b5e20', 'padding': '2px 8px', 'color': 'white'}), - ], style={'marginTop': '15px'}), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""Heatmap( - data=activity_data, - xAxis={'data': days}, - yAxis={'data': weeks}, - height=300, - colorScale={ - 'type': 'piecewise', - 'thresholds': [3, 5, 7], # Creates 4 color bands - 'colors': ['#e8f5e9', '#81c784', '#43a047', '#1b5e20'], # Need n+1 colors - }, -) - -# Thresholds [3, 5, 7] create bands: -# - 0-2: color[0] -# - 3-4: color[1] -# - 5-6: color[2] -# - 7+: color[3] -""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # Interactive Heatmap - # ========================================================================== - html.Div([ - html.H2("Interactive Heatmap"), - html.P( - "Click on cells to see their data. " - "The heatmap reports click events with x, y coordinates and value.", - style=description_style - ), - Heatmap( - id='interactive-heatmap', - licenseKey=MUI_LICENSE_KEY, - data=activity_data, - xAxis={'data': days, 'label': 'Day'}, - yAxis={'data': weeks, 'label': 'Week'}, - height=300, - colorScale={ - 'type': 'continuous', - 'min': 0, - 'max': 10, - 'colors': ['#fff3e0', '#ff9800'], - }, - ), - html.Div([ - html.H4("Click Data:", style={'marginTop': '20px'}), - html.Pre( - id='heatmap-click-output', - children="Click on a cell to see its data", - style=code_style - ), - ]), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""Heatmap( - id='interactive-heatmap', - data=activity_data, - xAxis={'data': days, 'label': 'Day'}, - yAxis={'data': weeks, 'label': 'Week'}, - height=300, - colorScale={...}, -) - -@callback( - Output('heatmap-click-output', 'children'), - Input('interactive-heatmap', 'clickData'), - prevent_initial_call=True -) -def display_click(click_data): - if click_data: - return json.dumps(click_data, indent=2) - return "Click on a cell to see its data" -""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # Color Scale Reference - # ========================================================================== - html.Div([ - html.H2("Color Scale Reference"), - html.P( - "Quick reference for configuring color scales.", - style=description_style - ), - html.Table([ - html.Thead([ - html.Tr([ - html.Th("Type", style={'textAlign': 'left', 'padding': '8px', 'borderBottom': '1px solid #ddd'}), - html.Th("Configuration", style={'textAlign': 'left', 'padding': '8px', 'borderBottom': '1px solid #ddd'}), - html.Th("Use Case", style={'textAlign': 'left', 'padding': '8px', 'borderBottom': '1px solid #ddd'}), - ]), - ]), - html.Tbody([ - html.Tr([ - html.Td("Continuous", style={'padding': '8px', 'verticalAlign': 'top'}), - html.Td(html.Pre("{'type': 'continuous', 'min': 0, 'max': 100, 'colors': ['#low', '#high']}", style={'margin': 0, 'fontSize': '11px'}), style={'padding': '8px'}), - html.Td("Smooth gradient for numerical data", style={'padding': '8px'}), - ]), - html.Tr([ - html.Td("Diverging", style={'padding': '8px', 'verticalAlign': 'top'}), - html.Td(html.Pre("{'type': 'continuous', 'min': -1, 'max': 1, 'colors': ['#neg', '#mid', '#pos']}", style={'margin': 0, 'fontSize': '11px'}), style={'padding': '8px'}), - html.Td("Correlations, deviations from center", style={'padding': '8px'}), - ]), - html.Tr([ - html.Td("Piecewise", style={'padding': '8px', 'verticalAlign': 'top'}), - html.Td(html.Pre("{'type': 'piecewise', 'thresholds': [a, b, c], 'colors': ['#1', '#2', '#3', '#4']}", style={'margin': 0, 'fontSize': '11px'}), style={'padding': '8px'}), - html.Td("Categorical ranges (Low/Med/High)", style={'padding': '8px'}), - ]), - ]), - ], style={'width': '100%', 'borderCollapse': 'collapse', 'marginTop': '10px'}), - ], style=section_style), -]) - - -@callback( - Output('heatmap-click-output', 'children'), - Input('interactive-heatmap', 'clickData'), - prevent_initial_call=True -) -def display_click(click_data): - """Display clicked cell data from heatmap.""" - if click_data: - return json.dumps(click_data, indent=2) - return "Click on a cell to see its data" diff --git a/pages/home.py b/pages/home.py index 8abb95a..90009c7 100644 --- a/pages/home.py +++ b/pages/home.py @@ -6,7 +6,120 @@ import dash_mantine_components as dmc from dash import html, dcc -dash.register_page(__name__, path='/', name='Home') +from lib.constants import OG_IMAGE_URL, SITE_BRAND, SITE_DESCRIPTION + +dash.register_page( + __name__, + path='/', + name='Home', + title=SITE_BRAND, + description=SITE_DESCRIPTION, + image_url=OG_IMAGE_URL, +) + +LLMS_DOC = """\ +# dash-mui-charts + +dash-mui-charts is a Plotly Dash component library of 13 components wrapping +MUI X Charts, MUI X Tree View, and MUI X Date & Time Pickers for Python +developers. Every component ships with full Python type hints and exposes +its interactions (clicks, selections, zoom, edits) as Dash callback +properties. Built by Pip Install Python; MIT licensed. + +## Install + +```bash +pip install dash-mui-charts +``` + +## Components + +Charts (MUI X Charts): + +- **LineChart** — line/area charts, biaxial axes, zoom/pan, brush selection, + reference lines (Community / Pro). Docs: /linechart-basic +- **BarChart** — vertical/horizontal bars, stacking, bar labels, dataset + mode, zoom/brush (Community / Pro). Docs: /barchart-basic +- **CandlestickChart** — OHLC candlesticks with volume overlay, reference + lines, click events (Community / Pro). Docs: /candlestick +- **PieChart** — pie, donut, and nested pies (Community). Docs: /pie +- **ScatterChart** — scatter/point charts, z-axis color mapping, voronoi + interaction (Community). Docs: /scatter +- **CompositeChart** — layer scatter + line plots on one surface, multi-axis + (Community / Pro). Docs: /composite +- **Heatmap** — matrix/grid visualization with color scales (Pro). + Docs: /heatmap +- **SparklineChart** — compact inline charts for dashboards and tables + (Community). Docs: /sparkline +- **LiveTradingChart** — real-time streaming charts (Community / Pro). + Docs: /live-trading + +Tree View (MUI X Tree View): + +- **TreeView** — data-driven RichTreeView: selection, expansion, inline + label editing, disabling (Community). Docs: /tree-basic +- **SimpleTreeView** — lightweight JSX-driven tree for navigation sidebars + (Community). Docs: /tree-simple +- **TreeViewPro** — drag-and-drop reordering, lazy loading, per-item + slider + kebab menu controls (Pro). Docs: /tree-pro + +Date & Time Pickers (MUI X Date Pickers): + +- **TimeClock** — inline clock-face time picker, string in/out values + (Community). Docs: /time-clock + +## Community vs Pro + +Community features work with no license. MUI X Pro features — LineChart / +BarChart / CompositeChart zoom, pan, slider, brush and toolbar; Heatmap; +TreeViewPro reordering, lazy loading and per-item controls — require an +MUI X Pro license key passed via the `licenseKey` prop (the demo app reads +it from the `MUI_PRO_API_KEY` environment variable). + +## Quick start + +```python +from dash import Dash, html +from dash_mui_charts import LineChart + +app = Dash(__name__) + +app.layout = html.Div([ + LineChart( + id='my-chart', + height=400, + series=[ + {'data': [1, 4, 2, 5, 7], 'label': 'Series A'}, + ], + xAxis=[{'data': [1, 2, 3, 4, 5]}], + ) +]) + +if __name__ == '__main__': + app.run(debug=True) +``` + +## More documentation pages + +- LineChart: /linechart-pro, /linechart-brush, /linechart-referencelines, + /linechart-highlighting, /highlighting-sync, /linechart-zoom-preview, + /linechart-tick-hover, /crosshair +- BarChart: /barchart-dataset, /barchart-stacking, /barchart-interaction, + /barchart-reference, /barchart-pro +- Pie / Heatmap / Sparkline explorers: /pie-props, /heatmap-props, + /sparkline-style, /sparkline-style-advanced +- CompositeChart: /composite-v120, /composite-render-bp +- Tree View: /tree-selection, /tree-expansion, /tree-editing, /tree-icons, + /tree-disabled, /tree-pro +- TimeClock: /time-clock-lab +- Release history: /changelog + +## Links + +- GitHub: https://github.com/pip-install-python/dash-mui-charts +- PyPI: https://pypi.org/project/dash-mui-charts/ +- MUI X Charts: https://mui.com/x/react-charts/ +""" INSTALL_CODE = "pip install dash-mui-charts" diff --git a/pages/markdown.py b/pages/markdown.py new file mode 100644 index 0000000..3637b02 --- /dev/null +++ b/pages/markdown.py @@ -0,0 +1,171 @@ +import logging +import re +from pathlib import Path +from typing import List, Optional + +import dash +import dash_mantine_components as dmc +import frontmatter +from dash import html +from dash_improve_my_llms import register_page_metadata +from markdown2dash import Admonition, BlockExec, Divider, Image, create_parser +from pydantic import BaseModel + +from lib.ad_client import inject_ad_into_aside +from lib.constants import OG_IMAGE_URL, PAGE_TITLE_PREFIX, NAME_CONTENT_MAP +from lib import page_tiers +from lib.directives.headings import patch_renderer +from lib.directives.kwargs import Kwargs +from lib.directives.llms_copy import LlmsCopy +from lib.directives.source import SC +from lib.directives.toc import TOC + +logger = logging.getLogger(__name__) +logging.basicConfig(level=logging.INFO) + +directory = "docs" + +# read all markdown files +files = Path(directory).glob("**/*.md") + + +class Meta(BaseModel): + name: str + description: str + endpoint: str + package: str = "dash_mui_charts" + category: Optional[str] = None + icon: Optional[str] = None + # Who may read this page: public | auth | admin | hidden. Absent means + # public — see lib/page_tiers.py for the tier model and why the default + # is open. Enforced only when access control is wired in run.py. + tier: Optional[str] = None + + +_SOURCE_DIRECTIVE = re.compile(r'^\.\. source::(.+?)$', re.MULTILINE) +_LANG_MAP = { + 'py': 'python', 'pyi': 'python', + 'js': 'javascript', 'jsx': 'jsx', + 'ts': 'typescript', 'tsx': 'tsx', + 'css': 'css', 'scss': 'scss', 'sass': 'sass', 'less': 'less', + 'html': 'html', 'htm': 'html', 'xml': 'xml', + 'json': 'json', + 'yaml': 'yaml', 'yml': 'yaml', + 'md': 'markdown', 'rst': 'rst', 'txt': 'text', + 'sh': 'bash', 'bash': 'bash', + 'sql': 'sql', 'r': 'r', + 'toml': 'toml', 'ini': 'ini', 'conf': 'conf', +} + + +def _expand_source_directives(markdown_content: str) -> str: + """Inline `.. source::path` directives with the referenced file content. + + This produces the prose that dash-improve-my-llms 2.0 will serve at + `/<page>/llms.txt`. Replacing the directive with the real file content + is what makes the LLM output self-contained for the "paste into a chat + window" audience. + """ + def replace(match: re.Match) -> str: + file_path = match.group(1).strip() + try: + full = Path(file_path) + content = full.read_text() + ext = full.suffix.lstrip('.').lower() + lang = _LANG_MAP.get(ext, ext or 'text') + tail = '' if content.endswith('\n') else '\n' + return f'\n```{lang}\n# File: {file_path}\n\n{content}{tail}```\n' + except FileNotFoundError: + return f'\n<!-- Error: File not found: {file_path} -->\n' + except Exception as exc: + return f'\n<!-- Error reading {file_path}: {exc} -->\n' + + return _SOURCE_DIRECTIVE.sub(replace, markdown_content) + + +def _build_llms_doc(name: str, description: str, expanded_markdown: str, path: str) -> str: + """Wrap the expanded markdown with the heading/description preamble that + /llms.txt readers expect.""" + parts: List[str] = [f"# {name}\n"] + if description: + parts.append(f"> {description}\n") + parts.append("---\n") + parts.append(expanded_markdown.rstrip() + "\n") + parts.append("\n---\n") + parts.append(f"*Source: {path}*\n") + return "\n".join(parts) + + +# Headings containing inline code/emphasis crash markdown2dash's renderer and, +# when they don't, get an id their own TOC anchor doesn't match. Must run +# before create_parser() instantiates the renderer. See lib/directives/headings. +patch_renderer() + +directives = [Admonition(), BlockExec(), Divider(), Image(), Kwargs(), LlmsCopy(), SC(), TOC()] +parse = create_parser(directives) + +for file in files: + logger.info("Loading %s..", file) + metadata, content = frontmatter.parse(file.read_text()) + metadata = Meta(**metadata) + + # Store raw markdown content in NAME_CONTENT_MAP for the LLM copy button. + NAME_CONTENT_MAP[metadata.name] = content + + layout = parse(content) + + # add heading and description to the layout + section = [ + dmc.Title(metadata.name, order=2, className="m2d-heading"), + dmc.Text(metadata.description, className="m2d-paragraph"), + ] + layout = section + layout + + # 2plot.dev ad network: append the ad slot below the TOC links inside + # the page's aside (pages without `.. toc::` simply get no ad). + inject_ad_into_aside(layout, metadata.endpoint) + + # Wrap the whole page in ONE container with a page-unique id. dash-renderer + # keys React children by component id, and markdown2dash gives every heading + # an id derived from its text ("usage", "introduction", ...) so TOC anchors + # work. Those ids repeat within and across pages, so when fast navigation + # swaps _pages_content.children between two flat layout lists, React + # reconciles by colliding keys and splices stale headings from the previous + # page into the new one (TOC-only ghost page until you scroll). A single + # keyed wrapper per page makes every swap old-node -> new-node: atomic + # unmount/mount, no cross-page key matching. Do not flatten this back into + # a list. + layout = html.Div( + layout, id="m2d-page" + metadata.endpoint.replace("/", "-") + ) + + # register with dash + dash.register_page( + metadata.name, + metadata.endpoint, + name=metadata.name, + title=PAGE_TITLE_PREFIX + metadata.name, + description=metadata.description, + layout=layout, + category=metadata.category, + icon=metadata.icon, + # Without this Dash infers an image from assets/ and finds `logo.svg` — + # an SVG, which every social scraper rejects — then emits it ALONGSIDE + # the og:image in templates/index.html. See lib.constants.OG_IMAGE_URL. + image_url=OG_IMAGE_URL, + ) + + # Feed the expanded markdown into dash-improve-my-llms so /<page>/llms.txt + # serves the directive-expanded prose. This replaces the custom Flask + # route that used to live in run.py and works across all three backends. + # Record the declared tier before the prose is registered, so a gate can + # never be applied later than the content it is meant to gate. + page_tiers.register(metadata.endpoint, metadata.tier) + + expanded = _expand_source_directives(content) + register_page_metadata( + path=metadata.endpoint, + name=metadata.name, + description=metadata.description, + llms_doc=_build_llms_doc(metadata.name, metadata.description, expanded, metadata.endpoint), + ) diff --git a/pages/pie.py b/pages/pie.py deleted file mode 100644 index 22a74c3..0000000 --- a/pages/pie.py +++ /dev/null @@ -1,310 +0,0 @@ -""" -Pie Chart - Circular Data Visualization - -This page demonstrates the PieChart component for creating pie and donut charts -that express portions of a whole using arcs within a circle. -This is a free feature - no MUI X Pro license required. -""" - -import json -import dash -from dash import html, callback, Input, Output - -dash.register_page(__name__, path='/pie', name='Pie Chart') - -from dash_mui_charts import PieChart - -# Sample data - Budget allocation -budget_data = [ - {'id': 0, 'value': 35, 'label': 'Marketing'}, - {'id': 1, 'value': 25, 'label': 'Engineering'}, - {'id': 2, 'value': 20, 'label': 'Sales'}, - {'id': 3, 'value': 15, 'label': 'Support'}, - {'id': 4, 'value': 5, 'label': 'Other'}, -] - -# Browser market share data -browser_data = [ - {'id': 0, 'value': 63.5, 'label': 'Chrome'}, - {'id': 1, 'value': 19.2, 'label': 'Safari'}, - {'id': 2, 'value': 4.3, 'label': 'Firefox'}, - {'id': 3, 'value': 3.9, 'label': 'Edge'}, - {'id': 4, 'value': 9.1, 'label': 'Other'}, -] - -# Task completion data (for half-pie gauge) -task_data = [ - {'id': 0, 'value': 72, 'label': 'Completed'}, - {'id': 1, 'value': 28, 'label': 'Remaining'}, -] - -# Common styles -section_style = {'marginBottom': '50px'} -description_style = {'color': '#666', 'marginBottom': '15px'} -code_style = { - 'backgroundColor': '#f5f5f5', - 'padding': '15px', - 'borderRadius': '5px', - 'whiteSpace': 'pre-wrap', - 'fontSize': '12px', - 'overflow': 'auto', -} - -layout = html.Div([ - html.H1("Pie Chart"), - html.P( - "Pie charts express portions of a whole using arcs within a circle. " - "Create standard pies, donuts, or gauge-style visualizations with customizable styling.", - style={'fontSize': '16px', 'color': '#666', 'marginBottom': '30px'} - ), - - # Section 1: Basic Pie Chart - html.Div([ - html.H2("Basic Pie Chart"), - html.P( - "A simple pie chart showing budget allocation by department. " - "Hover over slices to see values, click to interact.", - style=description_style - ), - html.Div([ - PieChart( - id='basic-pie', - data=budget_data, - height=300, - ), - ], style={'display': 'flex', 'justifyContent': 'center'}), - html.Pre( - '''PieChart( - data=[ - {'id': 0, 'value': 35, 'label': 'Marketing'}, - {'id': 1, 'value': 25, 'label': 'Engineering'}, - {'id': 2, 'value': 20, 'label': 'Sales'}, - {'id': 3, 'value': 15, 'label': 'Support'}, - {'id': 4, 'value': 5, 'label': 'Other'}, - ], - height=300, -)''', - style=code_style - ), - ], style=section_style), - - # Section 2: Donut Chart - html.Div([ - html.H2("Donut Chart"), - html.P( - "Set innerRadius to create a donut chart. The hollow center can " - "be used for additional information or just aesthetic appeal.", - style=description_style - ), - html.Div([ - PieChart( - id='donut-pie', - data=browser_data, - innerRadius=60, - height=300, - ), - ], style={'display': 'flex', 'justifyContent': 'center'}), - html.Pre( - '''PieChart( - data=browser_data, - innerRadius=60, # Creates the donut hole - height=300, -)''', - style=code_style - ), - ], style=section_style), - - # Section 3: Pie with Arc Labels - html.Div([ - html.H2("Arc Labels"), - html.P( - "Display values directly on the arcs. Use arcLabelMinAngle to hide " - "labels on small slices that would be too crowded.", - style=description_style - ), - html.Div([ - PieChart( - id='labeled-pie', - data=budget_data, - arcLabel='value', - arcLabelMinAngle=30, - height=300, - ), - ], style={'display': 'flex', 'justifyContent': 'center'}), - html.Pre( - '''PieChart( - data=budget_data, - arcLabel='value', # Options: 'value', 'label', 'formattedValue' - arcLabelMinAngle=30, # Hide labels on slices < 30 degrees - height=300, -)''', - style=code_style - ), - ], style=section_style), - - # Section 4: Styled Pie - html.Div([ - html.H2("Styled Pie"), - html.P( - "Customize the appearance with padding between slices, rounded corners, " - "and custom color palettes.", - style=description_style - ), - html.Div([ - PieChart( - id='styled-pie', - data=budget_data, - paddingAngle=3, - cornerRadius=8, - colors=['#1976d2', '#dc004e', '#ff9800', '#4caf50', '#9c27b0'], - height=300, - ), - ], style={'display': 'flex', 'justifyContent': 'center'}), - html.Pre( - '''PieChart( - data=budget_data, - paddingAngle=3, # Gap between slices in degrees - cornerRadius=8, # Rounded corners on slices - colors=['#1976d2', '#dc004e', '#ff9800', '#4caf50', '#9c27b0'], - height=300, -)''', - style=code_style - ), - ], style=section_style), - - # Section 5: Half Pie / Gauge - html.Div([ - html.H2("Half Pie / Gauge"), - html.P( - "Create gauge-style visualizations by adjusting startAngle and endAngle. " - "Perfect for progress indicators or completion metrics.", - style=description_style - ), - html.Div([ - PieChart( - id='gauge-pie', - data=task_data, - startAngle=-90, - endAngle=90, - innerRadius=50, - colors=['#4caf50', '#e0e0e0'], - height=200, - ), - ], style={'display': 'flex', 'justifyContent': 'center'}), - html.Pre( - '''PieChart( - data=[ - {'id': 0, 'value': 72, 'label': 'Completed'}, - {'id': 1, 'value': 28, 'label': 'Remaining'}, - ], - startAngle=-90, # Start at 12 o'clock - endAngle=90, # End at 6 o'clock (half circle) - innerRadius=50, # Donut style - colors=['#4caf50', '#e0e0e0'], - height=200, -)''', - style=code_style - ), - ], style=section_style), - - # Section 6: Interactive Example - html.Div([ - html.H2("Interactive Example"), - html.P( - "Click on slices to see detailed click data. Hover to highlight slices " - "and see the highlight state update in real-time.", - style=description_style - ), - html.Div([ - html.Div([ - PieChart( - id='interactive-pie', - data=budget_data, - innerRadius=40, - paddingAngle=2, - cornerRadius=4, - highlightScope={'highlight': 'item', 'fade': 'global'}, - height=300, - ), - ], style={'flex': '1'}), - html.Div([ - html.Div([ - html.H4("Click Data", style={'marginTop': 0, 'marginBottom': '10px'}), - html.Pre( - id='pie-click-data', - children='Click on a slice', - style={ - 'backgroundColor': '#e3f2fd', - 'padding': '15px', - 'borderRadius': '8px', - 'minHeight': '80px', - 'fontSize': '13px', - 'margin': 0, - } - ), - ], style={'marginBottom': '20px'}), - html.Div([ - html.H4("Highlighted Item", style={'marginTop': 0, 'marginBottom': '10px'}), - html.Pre( - id='pie-highlight-data', - children='Hover over a slice', - style={ - 'backgroundColor': '#e8f5e9', - 'padding': '15px', - 'borderRadius': '8px', - 'minHeight': '80px', - 'fontSize': '13px', - 'margin': 0, - } - ), - ]), - ], style={'flex': '1', 'paddingLeft': '30px'}), - ], style={'display': 'flex', 'alignItems': 'flex-start'}), - html.Pre( - '''PieChart( - id='interactive-pie', - data=budget_data, - innerRadius=40, - paddingAngle=2, - cornerRadius=4, - highlightScope={'highlight': 'item', 'fade': 'global'}, - height=300, -) - -# Callbacks receive clickData and highlightedItem -@callback( - Output('pie-click-data', 'children'), - Input('interactive-pie', 'clickData') -) -def display_click(click_data): - if click_data: - return json.dumps(click_data, indent=2) - return 'Click on a slice' -''', - style=code_style - ), - ], style=section_style), - -], style={'maxWidth': '900px', 'margin': '0 auto', 'padding': '20px'}) - - -@callback( - Output('pie-click-data', 'children'), - Input('interactive-pie', 'clickData'), - prevent_initial_call=True -) -def display_click_data(click_data): - if click_data: - return json.dumps(click_data, indent=2) - return 'Click on a slice' - - -@callback( - Output('pie-highlight-data', 'children'), - Input('interactive-pie', 'highlightedItem'), - prevent_initial_call=True -) -def display_highlight_data(highlighted_item): - if highlighted_item: - return json.dumps(highlighted_item, indent=2) - return 'Hover over a slice' diff --git a/pages/scatter.py b/pages/scatter.py deleted file mode 100644 index 8c86938..0000000 --- a/pages/scatter.py +++ /dev/null @@ -1,533 +0,0 @@ -""" -ScatterChart Demo - 0.0.8 -Showcases scatter chart features: multi-series, z-axis color maps, -voronoi interaction, marker sizes, click events, and axis styling. -""" - -import json -import math -import random - -import dash -import dash_mantine_components as dmc -from dash import html, callback, Input, Output - -dash.register_page(__name__, path='/scatter', name='Scatter Chart (0.0.8)') - -from dash_mui_charts import ScatterChart - -# --------------------------------------------------------------------------- -# Generate sample datasets -# --------------------------------------------------------------------------- -random.seed(42) - -# Dataset 1: Two clusters -cluster_a = [ - {'x': random.gauss(150, 40), 'y': random.gauss(300, 60), 'id': i} - for i in range(50) -] -cluster_b = [ - {'x': random.gauss(350, 50), 'y': random.gauss(150, 45), 'id': i} - for i in range(50) -] - -# Dataset 2: Correlated data with z-values -correlated = [] -for i in range(80): - x = random.uniform(0, 100) - noise = random.gauss(0, 10) - y = 2 * x + 20 + noise - z = x + y # z for color mapping - correlated.append({'x': round(x, 1), 'y': round(y, 1), 'z': round(z, 1), 'id': i}) - -# Dataset 3: Log-scale data (simulated processor data) -log_data_a = [] -log_data_b = [] -for i in range(40): - year = 1990 + i * 0.8 - density_a = 10 ** (random.uniform(1, 2) + (year - 1990) * 0.06) - density_b = 10 ** (random.uniform(0.8, 1.8) + (year - 1990) * 0.055) - log_data_a.append({'x': round(year, 1), 'y': round(density_a), 'id': i}) - log_data_b.append({'x': round(year, 1), 'y': round(density_b), 'id': i}) - -# Dataset 4: Small dataset for marker sizes -size_data_small = [ - {'x': random.uniform(10, 90), 'y': random.uniform(10, 90), 'id': i} - for i in range(15) -] -size_data_large = [ - {'x': random.uniform(10, 90), 'y': random.uniform(10, 90), 'id': i} - for i in range(20) -] - -# Common styles -section_style = {'marginBottom': '50px'} -description_style = {'color': '#666', 'marginBottom': '15px'} -code_style = { - 'backgroundColor': '#f5f5f5', - 'padding': '15px', - 'borderRadius': '5px', - 'whiteSpace': 'pre-wrap', - 'fontSize': '12px', - 'overflow': 'auto', -} -new_badge = html.Span( - "0.0.8", - style={ - 'backgroundColor': '#2e7d32', - 'color': 'white', - 'padding': '2px 8px', - 'borderRadius': '4px', - 'fontSize': '10px', - 'fontWeight': 'bold', - 'marginLeft': '8px', - 'verticalAlign': 'middle', - } -) - -layout = html.Div([ - html.Div([ - html.H1("Scatter Chart", style={'display': 'inline'}), - new_badge, - ]), - html.P( - "New in 0.0.8: ScatterChart for visualizing relationships between variables. " - "Supports multiple series, z-axis color mapping, voronoi interaction, " - "custom marker sizes, and interactive click/highlight callbacks.", - style={'fontSize': '16px', 'color': '#666', 'marginBottom': '30px'} - ), - - # ========================================================================== - # 1. Basic Scatter - # ========================================================================== - html.Div([ - html.H2("Basic Scatter - Two Series"), - html.P( - "Two data clusters plotted as separate series with grid lines.", - style=description_style - ), - ScatterChart( - id='scatter-basic', - height=350, - series=[ - { - 'id': 'cluster-a', - 'label': 'Cluster A', - 'data': cluster_a, - 'color': '#1976d2', - 'highlightScope': {'highlight': 'series', 'fade': 'global'}, - }, - { - 'id': 'cluster-b', - 'label': 'Cluster B', - 'data': cluster_b, - 'color': '#ff7043', - 'highlightScope': {'highlight': 'series', 'fade': 'global'}, - }, - ], - grid={'horizontal': True, 'vertical': True}, - xAxis=[{'label': 'X Value'}], - yAxis=[{'label': 'Y Value', 'width': 50}], - voronoiMaxRadius=30, - ), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""ScatterChart( - height=350, - series=[ - { - 'id': 'cluster-a', - 'label': 'Cluster A', - 'data': [{'x': 150, 'y': 300, 'id': 0}, ...], - 'color': '#1976d2', - 'highlightScope': {'highlight': 'series', 'fade': 'global'}, - }, - { - 'id': 'cluster-b', - 'label': 'Cluster B', - 'data': [{'x': 350, 'y': 150, 'id': 0}, ...], - 'color': '#ff7043', - 'highlightScope': {'highlight': 'series', 'fade': 'global'}, - }, - ], - grid={'horizontal': True, 'vertical': True}, - voronoiMaxRadius=30, -)""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # 2. Custom Marker Sizes - # ========================================================================== - html.Div([ - html.H2("Custom Marker Sizes"), - html.P( - "Use markerSize to differentiate series. Smaller markers for dense data, " - "larger for emphasis. markerSize is the radius in pixels.", - style=description_style - ), - ScatterChart( - id='scatter-sizes', - height=300, - series=[ - { - 'id': 'small-markers', - 'label': 'Background (r=3)', - 'data': size_data_large, - 'color': '#90caf9', - 'markerSize': 3, - }, - { - 'id': 'large-markers', - 'label': 'Focus Points (r=10)', - 'data': size_data_small, - 'color': '#e53935', - 'markerSize': 10, - 'highlightScope': {'highlight': 'item', 'fade': 'global'}, - }, - ], - xAxis=[{'label': 'X', 'min': 0, 'max': 100}], - yAxis=[{'label': 'Y', 'min': 0, 'max': 100, 'width': 40}], - ), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""ScatterChart( - series=[ - {'label': 'Background (r=3)', 'markerSize': 3, ...}, - {'label': 'Focus Points (r=10)', 'markerSize': 10, ...}, - ], -)""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # 3. Z-Axis Color Mapping - # ========================================================================== - html.Div([ - html.H2("Z-Axis Color Mapping"), - html.P( - "Use zAxis with colorMap to color scatter points by a third variable. " - "Color priority: z-axis > y-axis > x-axis > series color.", - style=description_style - ), - ScatterChart( - id='scatter-colormap', - height=400, - series=[ - { - 'id': 'correlated', - 'label': 'Data Points', - 'data': correlated, - 'markerSize': 5, - }, - ], - xAxis=[{ - 'label': 'X Value', - 'min': -5, - 'max': 105, - }], - yAxis=[{ - 'label': 'Y Value (2x + 20 + noise)', - 'width': 60, - 'domainLimit': 'nice', - }], - zAxis=[{ - 'colorMap': { - 'type': 'continuous', - 'min': 30, - 'max': 300, - 'color': ['#4fc3f7', '#e53935'], - }, - }], - grid={'horizontal': True, 'vertical': True}, - voronoiMaxRadius=40, - ), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""ScatterChart( - series=[{ - 'data': [{'x': 10, 'y': 42, 'z': 52, 'id': 0}, ...], - 'markerSize': 5, - }], - zAxis=[{ - 'colorMap': { - 'type': 'continuous', - 'min': 30, - 'max': 300, - 'color': ['#4fc3f7', '#e53935'], - }, - }], -)""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # 4. Log Scale Axis - # ========================================================================== - html.Div([ - html.H2("Log Scale Axis"), - html.P( - "Scatter charts support logarithmic axis scales for data spanning " - "multiple orders of magnitude.", - style=description_style - ), - ScatterChart( - id='scatter-log', - height=350, - series=[ - { - 'id': 'manufacturer-a', - 'label': 'Manufacturer A', - 'data': log_data_a, - 'markerSize': 4, - 'color': '#1565c0', - 'highlightScope': {'highlight': 'series', 'fade': 'global'}, - }, - { - 'id': 'manufacturer-b', - 'label': 'Manufacturer B', - 'data': log_data_b, - 'markerSize': 4, - 'color': '#e65100', - 'highlightScope': {'highlight': 'series', 'fade': 'global'}, - }, - ], - xAxis=[{ - 'label': 'Year', - 'tickLabelStyle': {'fontSize': 11}, - }], - yAxis=[{ - 'scaleType': 'log', - 'label': 'Density (units/mm\u00B2)', - 'width': 65, - 'tickLabelStyle': {'fontSize': 11}, - }], - grid={'horizontal': True}, - voronoiMaxRadius=25, - ), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""ScatterChart( - series=[...], - yAxis=[{ - 'scaleType': 'log', - 'label': 'Density (units/mm\u00B2)', - }], -)""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # 5. Click Events - # ========================================================================== - html.Div([ - html.H2("Click Events"), - html.P( - "Click on scatter points to capture event data in Dash callbacks. " - "Uses voronoiMaxRadius to control interaction distance.", - style=description_style - ), - ScatterChart( - id='scatter-click', - height=300, - series=[ - { - 'id': 'series-a', - 'label': 'A', - 'data': [ - {'x': 1, 'y': 5, 'id': 0}, - {'x': 2, 'y': 3, 'id': 1}, - {'x': 3, 'y': 8, 'id': 2}, - {'x': 4, 'y': 2, 'id': 3}, - {'x': 5, 'y': 7, 'id': 4}, - {'x': 6, 'y': 4, 'id': 5}, - {'x': 7, 'y': 9, 'id': 6}, - {'x': 8, 'y': 1, 'id': 7}, - ], - 'color': '#7e57c2', - 'markerSize': 8, - 'highlightScope': {'highlight': 'item'}, - }, - { - 'id': 'series-b', - 'label': 'B', - 'data': [ - {'x': 1.5, 'y': 6, 'id': 0}, - {'x': 2.5, 'y': 4, 'id': 1}, - {'x': 3.5, 'y': 7, 'id': 2}, - {'x': 4.5, 'y': 3, 'id': 3}, - {'x': 5.5, 'y': 8, 'id': 4}, - {'x': 6.5, 'y': 5, 'id': 5}, - {'x': 7.5, 'y': 6, 'id': 6}, - ], - 'color': '#26a69a', - 'markerSize': 8, - 'highlightScope': {'highlight': 'item'}, - }, - ], - grid={'horizontal': True}, - voronoiMaxRadius=50, - ), - html.H4("Click Data:", style={'marginTop': '15px'}), - html.Pre( - id='scatter-click-output', - children="Click on a scatter point to see event data", - style=code_style - ), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""@callback( - Output('scatter-click-output', 'children'), - Input('scatter-click', 'clickData'), - prevent_initial_call=True -) -def display_click(click_data): - return json.dumps(click_data, indent=2)""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # 6. Dataset-Driven Scatter - # ========================================================================== - html.Div([ - html.H2("Dataset-Driven Scatter"), - html.P( - "Use the dataset prop with datasetKeys to map columns to x/y axes. " - "This is useful when data comes from a shared table format.", - style=description_style - ), - ScatterChart( - id='scatter-dataset', - height=300, - dataset=[ - {'x1': 373, 'y1': 434, 'x2': 304, 'y2': 349}, - {'x1': 173, 'y1': 437, 'x2': 208, 'y2': 347}, - {'x1': 68, 'y1': 292, 'x2': 151, 'y2': 280}, - {'x1': 121, 'y1': 116, 'x2': 185, 'y2': 176}, - {'x1': 322, 'y1': 61, 'x2': 278, 'y2': 170}, - {'x1': 466, 'y1': 210, 'x2': 346, 'y2': 246}, - {'x1': 418, 'y1': 403, 'x2': 326, 'y2': 333}, - {'x1': 224, 'y1': 449, 'x2': 235, 'y2': 352}, - {'x1': 87, 'y1': 335, 'x2': 158, 'y2': 311}, - {'x1': 104, 'y1': 167, 'x2': 166, 'y2': 218}, - {'x1': 262, 'y1': 70, 'x2': 251, 'y2': 161}, - {'x1': 421, 'y1': 167, 'x2': 335, 'y2': 199}, - {'x1': 442, 'y1': 352, 'x2': 341, 'y2': 302}, - {'x1': 294, 'y1': 474, 'x2': 264, 'y2': 366}, - {'x1': 101, 'y1': 386, 'x2': 174, 'y2': 318}, - ], - series=[ - { - 'id': 'ds-a', - 'label': 'Series A', - 'datasetKeys': {'x': 'x1', 'y': 'y1'}, - }, - { - 'id': 'ds-b', - 'label': 'Series B', - 'datasetKeys': {'x': 'x2', 'y': 'y2'}, - }, - ], - yAxis=[{'label': 'Rainfall (mm)', 'width': 60}], - grid={'horizontal': True, 'vertical': True}, - ), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""ScatterChart( - dataset=[ - {'x1': 373, 'y1': 434, 'x2': 304, 'y2': 349}, - {'x1': 173, 'y1': 437, 'x2': 208, 'y2': 347}, - ... - ], - series=[ - {'label': 'Series A', 'datasetKeys': {'x': 'x1', 'y': 'y1'}}, - {'label': 'Series B', 'datasetKeys': {'x': 'x2', 'y': 'y2'}}, - ], -)""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # 7. Axis Styling - # ========================================================================== - html.Div([ - html.H2("Axis Styling (0.0.8)"), - html.P( - "Scatter charts support the full 0.0.8 axis API: tickLabelStyle, labelStyle, " - "tickSize, domainLimit, disableLine, and more.", - style=description_style - ), - ScatterChart( - id='scatter-axis-styling', - height=400, - series=[ - { - 'id': 'styled', - 'label': 'Measurements', - 'data': correlated[:40], - 'markerSize': 6, - 'color': '#00897b', - 'highlightScope': {'highlight': 'item', 'fade': 'global'}, - }, - ], - xAxis=[{ - 'label': 'Independent Variable', - 'min': -5, - 'max': 105, - 'tickSize': 8, - 'tickNumber': 10, - 'tickLabelStyle': { - 'fontSize': 11, - 'fontWeight': 'bold', - }, - 'labelStyle': { - 'fontSize': 14, - 'fontWeight': 'bold', - 'fill': '#00897b', - }, - 'domainLimit': 'nice', - }], - yAxis=[{ - 'label': 'Dependent Variable', - 'width': 65, - 'tickSize': 8, - 'tickLabelStyle': { - 'fontSize': 11, - 'fontWeight': 'bold', - }, - 'labelStyle': { - 'fontSize': 14, - 'fontWeight': 'bold', - 'fill': '#00897b', - }, - 'domainLimit': 'nice', - }], - grid={'horizontal': True, 'vertical': True}, - margin={'left': 75, 'bottom': 50, 'right': 20, 'top': 20}, - voronoiMaxRadius=40, - ), - ], style=section_style), -]) - - -@callback( - Output('scatter-click-output', 'children'), - Input('scatter-click', 'clickData'), - prevent_initial_call=True -) -def display_scatter_click(click_data): - if click_data: - return json.dumps(click_data, indent=2) - return "Click on a scatter point to see event data" \ No newline at end of file diff --git a/pages/sparkline.py b/pages/sparkline.py deleted file mode 100644 index 9be0b50..0000000 --- a/pages/sparkline.py +++ /dev/null @@ -1,761 +0,0 @@ -""" -SparklineChart - Compact Inline Charts - -This page demonstrates the SparklineChart component for creating -compact, inline visualizations perfect for dashboards and tables. -This is a Community feature - no license key required. -""" - -import json -import dash -import dash_mantine_components as dmc -from dash import html, callback, Input, Output, State, dcc - -dash.register_page(__name__, path='/sparkline', name='Sparkline') - -from dash_mui_charts import SparklineChart - -# Sample data -sales_trend = [10, 15, 8, 22, 18, 25, 30, 28, 35, 40, 38, 45] -stock_prices = [142.5, 145.2, 143.8, 148.9, 151.2, 149.5, 155.8, 158.2, 154.3, 160.1] -temperature_week = [72, 75, 78, 82, 79, 74, 71] -server_load = [45, 52, 48, 65, 72, 58, 42, 55, 61, 48] -error_rates = [2, 5, 3, 8, 4, 2, 1, 3, 2, 4] - -# Weekly downloads data (like npm) -weekly_downloads = [ - 125430, 142350, 138200, 156780, 162340, 158900, 171200, - 168500, 175600, 182300, 178900, 195400 -] -weeks = [ - 'Dec 1-7', 'Dec 8-14', 'Dec 15-21', 'Dec 22-28', - 'Dec 29-Jan 4', 'Jan 5-11', 'Jan 12-18', - 'Jan 19-25', 'Jan 26-Feb 1', 'Feb 2-8', 'Feb 9-15', 'Feb 16-22' -] - -# Multiple metrics for synced hover -revenue_data = [42, 45, 48, 52, 49, 55, 58, 62, 60, 65] -users_data = [1200, 1350, 1420, 1580, 1520, 1680, 1750, 1890, 1820, 1950] -sessions_data = [3500, 3800, 4100, 4500, 4200, 4800, 5100, 5400, 5200, 5600] -metric_labels = ['Week 1', 'Week 2', 'Week 3', 'Week 4', 'Week 5', 'Week 6', 'Week 7', 'Week 8', 'Week 9', 'Week 10'] - -# Common styles -section_style = {'marginBottom': '50px'} -description_style = {'color': '#666', 'marginBottom': '15px'} -code_style = { - 'backgroundColor': '#f5f5f5', - 'padding': '15px', - 'borderRadius': '5px', - 'whiteSpace': 'pre-wrap', - 'fontSize': '12px', - 'overflow': 'auto', -} - -# KPI Card style -kpi_card_style = { - 'backgroundColor': 'white', - 'borderRadius': '8px', - 'padding': '20px', - 'boxShadow': '0 2px 4px rgba(0,0,0,0.1)', - 'width': '280px', -} - -layout = html.Div([ - html.H1("SparklineChart"), - html.P( - "Sparklines are compact, inline charts that show data trends without axes or labels. " - "Perfect for dashboards, KPI cards, and tables. This is a Community feature - no license required.", - style={'fontSize': '16px', 'color': '#666', 'marginBottom': '30px'} - ), - - # ========================================================================== - # Basic Line Sparkline - # ========================================================================== - html.Div([ - html.H2("Basic Line Sparkline"), - html.P( - "The simplest sparkline - just pass an array of numbers. " - "Great for showing trends at a glance.", - style=description_style - ), - html.Div([ - html.Div([ - html.Span("Sales Trend: ", style={'marginRight': '10px', 'fontWeight': 'bold'}), - SparklineChart( - data=sales_trend, - width=150, - height=30, - color='#1976d2', - ), - ], style={'display': 'flex', 'alignItems': 'center', 'marginBottom': '15px'}), - html.Div([ - html.Span("Stock Price: ", style={'marginRight': '10px', 'fontWeight': 'bold'}), - SparklineChart( - data=stock_prices, - width=150, - height=30, - color='#4caf50', - ), - ], style={'display': 'flex', 'alignItems': 'center'}), - ]), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""SparklineChart( - data=[10, 15, 8, 22, 18, 25, 30, 28, 35, 40], - width=150, - height=30, - color='#1976d2', -)""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # NPM-Style Downloads Sparkline - # ========================================================================== - html.Div([ - html.H2("NPM-Style Downloads Sparkline"), - html.P( - "A rich interactive sparkline like npm's package download chart. " - "Hover over the chart to see weekly download counts update in real-time.", - style=description_style - ), - html.Div([ - html.Div([ - html.Div([ - html.Span("📦 ", style={'marginRight': '5px'}), - html.Span( - id='npm-week-label', - children="Weekly Downloads", - style={'color': '#666', 'fontSize': '14px'} - ), - ], style={'marginBottom': '8px'}), - html.Div([ - html.Span( - id='npm-download-count', - children=f"{weekly_downloads[-1]:,}", - style={'fontSize': '28px', 'fontWeight': 'bold', 'color': '#333'} - ), - html.Div([ - SparklineChart( - id='npm-sparkline', - data=weekly_downloads, - width=200, - height=45, - color='rgb(137, 86, 255)', - area=True, - showHighlight=True, - baseline='min', - margin={'top': 5, 'right': 0, 'bottom': 0, 'left': 4}, - xAxis={'id': 'week-axis', 'data': weeks}, - axisHighlight={'x': 'line'}, - slotProps={'lineHighlight': {'r': 4}}, - clipAreaOffset={'top': 2, 'bottom': 2}, - ), - ], style={'marginLeft': 'auto'}), - ], style={ - 'display': 'flex', - 'alignItems': 'flex-end', - 'justifyContent': 'space-between', - 'borderBottom': '2px solid rgba(137, 86, 255, 0.2)', - 'paddingBottom': '5px', - }), - ], style={ - 'width': '350px', - 'backgroundColor': 'white', - 'padding': '15px 20px', - 'borderRadius': '8px', - 'boxShadow': '0 2px 8px rgba(0,0,0,0.1)', - }), - ]), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""SparklineChart( - id='npm-sparkline', - data=weekly_downloads, - width=200, - height=45, - color='rgb(137, 86, 255)', - area=True, - showHighlight=True, - baseline='min', # Area fills from minimum value - margin={'top': 5, 'right': 0, 'bottom': 0, 'left': 4}, - xAxis={'id': 'week-axis', 'data': weeks}, - axisHighlight={'x': 'line'}, # Show vertical line on hover - slotProps={'lineHighlight': {'r': 4}}, # Smaller highlight dot - clipAreaOffset={'top': 2, 'bottom': 2}, -) - -@callback( - Output('npm-download-count', 'children'), - Output('npm-week-label', 'children'), - Input('npm-sparkline', 'hoverIndex'), - Input('npm-sparkline', 'hoverValue'), -) -def update_npm_display(hover_index, hover_value): - if hover_index is not None and hover_value is not None: - return f"{int(hover_value):,}", weeks[hover_index] - return f"{weekly_downloads[-1]:,}", "Weekly Downloads" -""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # Synchronized Multi-Metric Dashboard - # ========================================================================== - html.Div([ - html.H2("Synchronized Multi-Metric Dashboard"), - html.P( - "Multiple sparklines that sync their hover state. " - "Hover over any chart to see all metrics for that time period.", - style=description_style - ), - # Store for shared hover index - dcc.Store(id='shared-hover-index', data=None), - - html.Div([ - # Revenue Card - html.Div([ - html.Div("Revenue", style={'fontSize': '12px', 'color': '#666', 'marginBottom': '5px'}), - html.Div([ - html.Span(id='sync-revenue-value', children=f"${revenue_data[-1]}K", style={'fontSize': '24px', 'fontWeight': 'bold'}), - html.Span(id='sync-revenue-label', children="", style={'fontSize': '11px', 'color': '#999', 'marginLeft': '8px'}), - ]), - SparklineChart( - id='sync-revenue-spark', - data=revenue_data, - width=200, - height=35, - color='#4caf50', - area=True, - showHighlight=True, - xAxis={'id': 'rev-axis', 'data': metric_labels}, - ), - ], style={**kpi_card_style, 'borderTop': '3px solid #4caf50'}), - - # Users Card - html.Div([ - html.Div("Active Users", style={'fontSize': '12px', 'color': '#666', 'marginBottom': '5px'}), - html.Div([ - html.Span(id='sync-users-value', children=f"{users_data[-1]:,}", style={'fontSize': '24px', 'fontWeight': 'bold'}), - html.Span(id='sync-users-label', children="", style={'fontSize': '11px', 'color': '#999', 'marginLeft': '8px'}), - ]), - SparklineChart( - id='sync-users-spark', - data=users_data, - width=200, - height=35, - color='#2196f3', - area=True, - showHighlight=True, - xAxis={'id': 'users-axis', 'data': metric_labels}, - ), - ], style={**kpi_card_style, 'borderTop': '3px solid #2196f3'}), - - # Sessions Card - html.Div([ - html.Div("Sessions", style={'fontSize': '12px', 'color': '#666', 'marginBottom': '5px'}), - html.Div([ - html.Span(id='sync-sessions-value', children=f"{sessions_data[-1]:,}", style={'fontSize': '24px', 'fontWeight': 'bold'}), - html.Span(id='sync-sessions-label', children="", style={'fontSize': '11px', 'color': '#999', 'marginLeft': '8px'}), - ]), - SparklineChart( - id='sync-sessions-spark', - data=sessions_data, - width=200, - height=35, - color='#ff9800', - area=True, - showHighlight=True, - xAxis={'id': 'sessions-axis', 'data': metric_labels}, - ), - ], style={**kpi_card_style, 'borderTop': '3px solid #ff9800'}), - ], style={'display': 'flex', 'gap': '20px', 'flexWrap': 'wrap'}), - - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '15px'}), - dmc.CodeHighlight(code="""# Three sparklines with synchronized hover -SparklineChart( - id='sync-revenue-spark', - data=revenue_data, - showHighlight=True, - xAxis={'id': 'rev-axis', 'data': metric_labels}, - ... -) - -# Callback to sync hover across all sparklines -@callback( - Output('sync-revenue-value', 'children'), - Output('sync-users-value', 'children'), - Output('sync-sessions-value', 'children'), - Input('sync-revenue-spark', 'hoverIndex'), - Input('sync-users-spark', 'hoverIndex'), - Input('sync-sessions-spark', 'hoverIndex'), -) -def sync_hover(rev_idx, users_idx, sessions_idx): - # Find which chart triggered the callback - idx = rev_idx or users_idx or sessions_idx - if idx is not None: - return f"${revenue_data[idx]}K", f"{users_data[idx]:,}", f"{sessions_data[idx]:,}" - return f"${revenue_data[-1]}K", f"{users_data[-1]:,}", f"{sessions_data[-1]:,}" -""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # Area Sparkline - # ========================================================================== - html.Div([ - html.H2("Area Sparkline"), - html.P( - "Add 'area=True' to fill the area under the line. " - "Use 'baseline' to control where the fill starts.", - style=description_style - ), - html.Div([ - html.Div([ - html.Span("baseline='min': ", style={'width': '120px', 'display': 'inline-block'}), - SparklineChart( - data=temperature_week, - width=150, - height=40, - color='#ff9800', - area=True, - baseline='min', - ), - ], style={'marginBottom': '10px'}), - html.Div([ - html.Span("baseline='max': ", style={'width': '120px', 'display': 'inline-block'}), - SparklineChart( - data=temperature_week, - width=150, - height=40, - color='#2196f3', - area=True, - baseline='max', - ), - ], style={'marginBottom': '10px'}), - html.Div([ - html.Span("baseline=75: ", style={'width': '120px', 'display': 'inline-block'}), - SparklineChart( - data=temperature_week, - width=150, - height=40, - color='#9c27b0', - area=True, - baseline=75, - ), - ]), - ]), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""# baseline='min' - fills from minimum (default) -SparklineChart(data=data, area=True, baseline='min') - -# baseline='max' - fills from maximum (inverted) -SparklineChart(data=data, area=True, baseline='max') - -# baseline=75 - fills from a specific value -SparklineChart(data=data, area=True, baseline=75) -""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # Bar Sparkline - # ========================================================================== - html.Div([ - html.H2("Bar Sparkline"), - html.P( - "Use 'plotType=\"bar\"' for a bar chart sparkline. " - "Good for discrete values or comparing magnitudes.", - style=description_style - ), - html.Div([ - html.Div([ - html.Span("Daily Errors: ", style={'marginRight': '10px', 'fontWeight': 'bold'}), - SparklineChart( - data=error_rates, - width=150, - height=40, - plotType='bar', - color='#f44336', - ), - ], style={'display': 'flex', 'alignItems': 'center', 'marginBottom': '15px'}), - html.Div([ - html.Span("Weekly Sales: ", style={'marginRight': '10px', 'fontWeight': 'bold'}), - SparklineChart( - data=[120, 145, 132, 168, 155, 142, 178], - width=150, - height=40, - plotType='bar', - color='#2196f3', - ), - ], style={'display': 'flex', 'alignItems': 'center'}), - ]), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""SparklineChart( - data=[2, 5, 3, 8, 4, 2, 1, 3, 2, 4], - width=150, - height=40, - plotType='bar', # Bar chart instead of line - color='#f44336', -)""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # Sparklines in a Table - # ========================================================================== - html.Div([ - html.H2("Sparklines in a Table"), - html.P( - "Sparklines are perfect for embedding in data tables to show trends " - "alongside other metrics.", - style=description_style - ), - html.Table([ - html.Thead([ - html.Tr([ - html.Th("Metric", style={'textAlign': 'left', 'padding': '12px', 'borderBottom': '2px solid #ddd'}), - html.Th("Current", style={'textAlign': 'right', 'padding': '12px', 'borderBottom': '2px solid #ddd'}), - html.Th("Trend (7 days)", style={'textAlign': 'center', 'padding': '12px', 'borderBottom': '2px solid #ddd'}), - html.Th("Change", style={'textAlign': 'right', 'padding': '12px', 'borderBottom': '2px solid #ddd'}), - ]), - ]), - html.Tbody([ - html.Tr([ - html.Td("Revenue", style={'padding': '12px'}), - html.Td("$45,230", style={'textAlign': 'right', 'padding': '12px', 'fontWeight': 'bold'}), - html.Td( - SparklineChart(data=[38, 42, 40, 44, 43, 45, 45], width=100, height=25, color='#4caf50', area=True), - style={'textAlign': 'center', 'padding': '12px'} - ), - html.Td("+12%", style={'textAlign': 'right', 'padding': '12px', 'color': '#4caf50'}), - ]), - html.Tr([ - html.Td("Users", style={'padding': '12px'}), - html.Td("2,847", style={'textAlign': 'right', 'padding': '12px', 'fontWeight': 'bold'}), - html.Td( - SparklineChart(data=[2200, 2350, 2400, 2500, 2650, 2750, 2847], width=100, height=25, color='#2196f3', area=True), - style={'textAlign': 'center', 'padding': '12px'} - ), - html.Td("+29%", style={'textAlign': 'right', 'padding': '12px', 'color': '#4caf50'}), - ]), - html.Tr([ - html.Td("Errors", style={'padding': '12px'}), - html.Td("23", style={'textAlign': 'right', 'padding': '12px', 'fontWeight': 'bold'}), - html.Td( - SparklineChart(data=[45, 38, 42, 35, 30, 28, 23], width=100, height=25, color='#f44336'), - style={'textAlign': 'center', 'padding': '12px'} - ), - html.Td("-49%", style={'textAlign': 'right', 'padding': '12px', 'color': '#4caf50'}), - ]), - html.Tr([ - html.Td("Response Time", style={'padding': '12px'}), - html.Td("245ms", style={'textAlign': 'right', 'padding': '12px', 'fontWeight': 'bold'}), - html.Td( - SparklineChart(data=[220, 235, 242, 238, 250, 248, 245], width=100, height=25, color='#ff9800'), - style={'textAlign': 'center', 'padding': '12px'} - ), - html.Td("+11%", style={'textAlign': 'right', 'padding': '12px', 'color': '#f44336'}), - ]), - ]), - ], style={'width': '100%', 'borderCollapse': 'collapse', 'marginTop': '10px'}), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # Callback-Triggered Data Changes - # ========================================================================== - html.Div([ - html.H2("Callback-Triggered Data Changes"), - html.P( - "Change the sparkline data dynamically using callbacks. " - "Select a metric to see different trend data.", - style=description_style - ), - html.Div([ - html.Div([ - html.Label("Select Metric:", style={'marginRight': '10px', 'fontWeight': 'bold'}), - dcc.Dropdown( - id='metric-selector', - options=[ - {'label': 'Revenue', 'value': 'revenue'}, - {'label': 'Users', 'value': 'users'}, - {'label': 'Sessions', 'value': 'sessions'}, - {'label': 'Errors', 'value': 'errors'}, - ], - value='revenue', - style={'width': '200px'}, - clearable=False, - ), - ], style={'marginBottom': '20px'}), - html.Div([ - html.Div(id='dynamic-metric-label', children="Revenue Trend", style={'fontSize': '14px', 'color': '#666', 'marginBottom': '5px'}), - html.Div(id='dynamic-metric-value', children="$65K", style={'fontSize': '32px', 'fontWeight': 'bold', 'marginBottom': '10px'}), - html.Div(id='dynamic-sparkline-container'), - ], style={ - 'backgroundColor': 'white', - 'padding': '20px', - 'borderRadius': '8px', - 'boxShadow': '0 2px 4px rgba(0,0,0,0.1)', - 'width': '300px', - }), - ]), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '15px'}), - dmc.CodeHighlight(code="""@callback( - Output('dynamic-sparkline-container', 'children'), - Output('dynamic-metric-label', 'children'), - Output('dynamic-metric-value', 'children'), - Input('metric-selector', 'value') -) -def update_sparkline(metric): - data_map = { - 'revenue': (revenue_data, '#4caf50', 'Revenue Trend', f"${revenue_data[-1]}K"), - 'users': (users_data, '#2196f3', 'Active Users', f"{users_data[-1]:,}"), - 'sessions': (sessions_data, '#ff9800', 'Sessions', f"{sessions_data[-1]:,}"), - 'errors': (error_rates, '#f44336', 'Error Rate', f"{error_rates[-1]}"), - } - data, color, label, value = data_map[metric] - - return SparklineChart( - data=data, - width=260, - height=50, - color=color, - area=True, - showHighlight=True, - showTooltip=True, - ), label, value -""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # Custom Curves - # ========================================================================== - html.Div([ - html.H2("Custom Curves"), - html.P( - "Use different curve interpolation methods for different visual effects.", - style=description_style - ), - html.Div([ - html.Div([ - html.Span("Linear: ", style={'width': '100px', 'display': 'inline-block'}), - SparklineChart(data=sales_trend, width=120, height=30, color='#1976d2', curve='linear'), - ], style={'marginBottom': '10px'}), - html.Div([ - html.Span("Natural: ", style={'width': '100px', 'display': 'inline-block'}), - SparklineChart(data=sales_trend, width=120, height=30, color='#4caf50', curve='natural'), - ], style={'marginBottom': '10px'}), - html.Div([ - html.Span("Step: ", style={'width': '100px', 'display': 'inline-block'}), - SparklineChart(data=sales_trend, width=120, height=30, color='#ff9800', curve='step'), - ], style={'marginBottom': '10px'}), - html.Div([ - html.Span("MonotoneX: ", style={'width': '100px', 'display': 'inline-block'}), - SparklineChart(data=sales_trend, width=120, height=30, color='#9c27b0', curve='monotoneX'), - ], style={'marginBottom': '10px'}), - ]), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""# Available curves: 'linear', 'natural', 'step', 'stepBefore', -# 'stepAfter', 'monotoneX', 'monotoneY', 'catmullRom', 'bumpX', 'bumpY' - -SparklineChart( - data=sales_trend, - width=120, - height=30, - color='#4caf50', - curve='natural', # Smooth natural curve -)""", language="python"), - ]), - ], style=section_style), - - html.Hr(), - - # ========================================================================== - # Interactive Sparkline with Hover Details - # ========================================================================== - html.Div([ - html.H2("Interactive Sparkline with Hover Details"), - html.P( - "Enable tooltips and highlighting to make sparklines interactive. " - "Hover over the chart to see detailed information.", - style=description_style - ), - html.Div([ - html.Div([ - html.Div([ - html.Span("Stock Price: ", style={'fontWeight': 'bold'}), - html.Span(id='stock-price-display', children=f"${stock_prices[-1]:.2f}"), - ], style={'marginBottom': '10px'}), - SparklineChart( - id='interactive-stock-sparkline', - data=stock_prices, - width=300, - height=60, - color='#1976d2', - area=True, - showTooltip=True, - showHighlight=True, - xAxis={'id': 'stock-axis', 'data': ['Day 1', 'Day 2', 'Day 3', 'Day 4', 'Day 5', 'Day 6', 'Day 7', 'Day 8', 'Day 9', 'Day 10']}, - axisHighlight={'x': 'line'}, - ), - ]), - html.Div([ - html.Strong("Hover Data:"), - html.Pre( - id='stock-hover-output', - children="Hover over the chart to see details", - style={**code_style, 'marginTop': '10px', 'minHeight': '60px'} - ), - ], style={'marginTop': '15px'}), - ]), - html.Details([ - html.Summary("View Code", style={'cursor': 'pointer', 'marginTop': '10px'}), - dmc.CodeHighlight(code="""SparklineChart( - id='interactive-stock-sparkline', - data=stock_prices, - width=300, - height=60, - color='#1976d2', - area=True, - showTooltip=True, - showHighlight=True, - xAxis={'id': 'stock-axis', 'data': day_labels}, - axisHighlight={'x': 'line'}, # Vertical line on hover -) - -@callback( - Output('stock-price-display', 'children'), - Output('stock-hover-output', 'children'), - Input('interactive-stock-sparkline', 'hoverIndex'), - Input('interactive-stock-sparkline', 'hoverValue'), -) -def update_stock_display(index, value): - if index is not None and value is not None: - return f"${value:.2f}", json.dumps({ - 'index': index, - 'value': value, - 'day': f'Day {index + 1}' - }, indent=2) - return f"${stock_prices[-1]:.2f}", "Hover over the chart" -""", language="python"), - ]), - ], style=section_style), -]) - - -# ========================================================================== -# Callbacks -# ========================================================================== - -@callback( - Output('npm-download-count', 'children'), - Output('npm-week-label', 'children'), - Input('npm-sparkline', 'hoverIndex'), - Input('npm-sparkline', 'hoverValue'), - prevent_initial_call=True -) -def update_npm_display(hover_index, hover_value): - """Update npm-style display based on hover.""" - if hover_index is not None and hover_value is not None: - return f"{int(hover_value):,}", weeks[hover_index] - return f"{weekly_downloads[-1]:,}", "Weekly Downloads" - - -@callback( - Output('sync-revenue-value', 'children'), - Output('sync-revenue-label', 'children'), - Output('sync-users-value', 'children'), - Output('sync-users-label', 'children'), - Output('sync-sessions-value', 'children'), - Output('sync-sessions-label', 'children'), - Input('sync-revenue-spark', 'hoverIndex'), - Input('sync-users-spark', 'hoverIndex'), - Input('sync-sessions-spark', 'hoverIndex'), - prevent_initial_call=True -) -def sync_hover(rev_idx, users_idx, sessions_idx): - """Sync hover state across multiple sparklines.""" - # Find which index to use (any non-None value) - idx = None - for i in [rev_idx, users_idx, sessions_idx]: - if i is not None: - idx = i - break - - if idx is not None: - label = metric_labels[idx] - return ( - f"${revenue_data[idx]}K", label, - f"{users_data[idx]:,}", label, - f"{sessions_data[idx]:,}", label, - ) - return ( - f"${revenue_data[-1]}K", "", - f"{users_data[-1]:,}", "", - f"{sessions_data[-1]:,}", "", - ) - - -@callback( - Output('dynamic-sparkline-container', 'children'), - Output('dynamic-metric-label', 'children'), - Output('dynamic-metric-value', 'children'), - Input('metric-selector', 'value') -) -def update_dynamic_sparkline(metric): - """Update sparkline based on selected metric.""" - data_map = { - 'revenue': (revenue_data, '#4caf50', 'Revenue Trend', f"${revenue_data[-1]}K"), - 'users': (users_data, '#2196f3', 'Active Users', f"{users_data[-1]:,}"), - 'sessions': (sessions_data, '#ff9800', 'Sessions', f"{sessions_data[-1]:,}"), - 'errors': (error_rates, '#f44336', 'Error Rate', str(error_rates[-1])), - } - data, color, label, value = data_map[metric] - - return SparklineChart( - data=data, - width=260, - height=50, - color=color, - area=True, - showHighlight=True, - showTooltip=True, - ), label, value - - -@callback( - Output('stock-price-display', 'children'), - Output('stock-hover-output', 'children'), - Input('interactive-stock-sparkline', 'hoverIndex'), - Input('interactive-stock-sparkline', 'hoverValue'), - prevent_initial_call=True -) -def update_stock_display(index, value): - """Update stock price display based on hover.""" - if index is not None and value is not None: - return f"${value:.2f}", json.dumps({ - 'index': index, - 'value': value, - 'day': f'Day {index + 1}' - }, indent=2) - return f"${stock_prices[-1]:.2f}", "Hover over the chart to see details" diff --git a/render.yaml b/render.yaml index aca5196..6dc22da 100644 --- a/render.yaml +++ b/render.yaml @@ -4,12 +4,50 @@ services: runtime: python repo: https://github.com/pip-install-python/dash-mui-charts branch: main - buildCommand: pip install -r requirements.txt && pip install . - startCommand: gunicorn app:server -b 0.0.0.0:$PORT --workers 2 --timeout 120 + # markdown2dash installs --no-deps: it pins gunicorn<22 against the + # CVE-driven >=23 floor (LESSONS §8). Same pair as the Dockerfile and CI. + buildCommand: pip install -r requirements.txt && pip install --no-deps markdown2dash==0.1.2 && pip install . + startCommand: gunicorn run:server -b 0.0.0.0:$PORT --workers 2 --timeout 120 + # The canonical origin. The legacy dash-mui-charts.onrender.com hostname + # keeps resolving after this is attached — lib/constants.BASE_URL and the + # canonical tags all point here, so link equity consolidates on one host. + domains: + - muicharts.2plot.dev + # LESSONS §10: blueprint envVars apply on BLUEPRINT SYNC, not on git-push + # autodeploys. Everything below must ALSO be set on the service in the + # Render dashboard, or a value added here does nothing until the next + # manual sync. The declarations are the documentation of what this app + # reads; the dashboard is what the running service actually gets. envVars: - key: MUI_PRO_API_KEY sync: false + # Shared network secret — signs the hourly traffic rollup this app + # POSTs to https://2plot.ai/api/satellite/traffic (lib/traffic_report). + # Unset = reporting silently OFF. + - key: CROSS_APP_WEBHOOK_SECRET + sync: false + # Where the hit log lives. Default is <repo>/analytics, which Render + # wipes on every deploy; point this at a mounted disk to keep a day's + # numbers across deploys. + - key: ANALYTICS_DIR + sync: false + # Canonical origin override. The code default is already the value + # below (lib/constants.DEFAULT_BASE_URL); declared so the service + # documents its own identity and a fork cannot inherit this one's. + - key: APP_BASE_URL + value: "https://muicharts.2plot.dev" + # This app's ONE short id on every hub surface (STANDARD §5). Also the + # code default — declared for the same reason as APP_BASE_URL. + - key: AD_APP_ID + value: "muicharts" + # The hub's announcement feed for the llms.txt viewer header. Opt-in: + # lib/bulletin.py wires nothing without it. Detection of a missing + # value: the viewer shows one generic tip where the hub publishes more. + - key: NETWORK_BULLETIN_URL + value: "https://2plot.dev/api/network/bulletin" - key: PYTHON_VERSION value: "3.11.12" - healthCheckPath: / + # /healthz is the network liveness convention the hub's hourly sweep + # polls; "/" would render the whole Dash index on every probe. + healthCheckPath: /healthz autoDeploy: true diff --git a/requirements-deploy.txt b/requirements-deploy.txt deleted file mode 100644 index a59039c..0000000 --- a/requirements-deploy.txt +++ /dev/null @@ -1,6 +0,0 @@ -dash>=3.0.0 -dash-mantine-components>=2.6.0 -dash-iconify>=0.1.2 -dash-widgetbot>=0.1.0 -python-dotenv>=1.0.0 -gunicorn>=21.2.0,<23.0.0 diff --git a/requirements.txt b/requirements.txt index 981811f..41e04a7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,55 @@ -dash>=3.0.0 -python-dotenv>=1.0.0 -dash-mantine-components>=2.6.0 +# ============================================================================ +# dash-mui-charts — docs site requirements (the boilerplate docs stack). +# The component PACKAGE itself only depends on dash>=3.3.0 (see setup.py); +# everything below serves the documentation app. +# ============================================================================ + +# Core Dash 4.x — the boilerplate docs stack's floor (run.py enforces it at +# boot, warning-level on Flask). Production runs the Flask backend. +dash>=4.4.0 +flask>=3.0.0 + +# UI stack for the documentation app +dash-mantine-components>=2.7.0 dash-iconify>=0.1.2 -dash-widgetbot>=0.1.0 + +# Documentation & utilities +python-frontmatter>=1.0.0 +pydantic>=2.3.0 +python-dotenv>=1.0.0 requests>=2.27.1 # 2plot.dev ad-network client (lib/ad_client.py) -gunicorn>=21.2.0,<23.0.0 + +# markdown2dash 0.1.2 declares `gunicorn>=21.2.0,<22.0.0` — a markdown parser +# pinning a WSGI server, directly against the CVE-driven gunicorn>=23 floor +# below (CVE-2024-6827, CVE-2024-1135 — request smuggling). pip cannot +# resolve both, so markdown2dash is NOT listed here; it is installed on its +# own line, without its dependency graph: +# +# pip install -r requirements.txt +# pip install --no-deps markdown2dash==0.1.2 +# +# The Dockerfile and .github/workflows/ci.yml both do exactly that pair, and +# CI asserts the resulting gunicorn version INSIDE the built image. Its real +# runtime dependencies (dash, dash-iconify, dash-mantine-components, +# pydantic) are all pinned above; the only one that is not is mistune, +# listed here so nothing quietly relies on --no-deps having installed it: +mistune>=3.0.0 +# markdown2dash==0.1.2 <- installed --no-deps, see above + +# AI/LLM Integration & SEO. 2.3.4 is the network standard: below it +# `resolve_site_title` does not exist and this site's published identity +# (the /llms.txt H1, the llms viewer's brand chip) silently degrades to +# `app.title`. NOTE: dimll pins dash<5,>=4.1 — this is what makes the SITE's +# Dash floor higher than the package's. +dash-improve-my-llms>=2.3.4 + +# Clerk satellite auth for the HOSTED docs site only (lib/auth.py) — fully +# dormant without the CLERK_* env keys. Not on PyPI; vendored like the +# other satellites'. 0.9.1 floor: 0.9.0 ships a dead avatar on satellites. +./vendor/dash_clerk_auth-0.9.1.tar.gz +clerk-backend-api>=5.0.0,<6 + +# Production server. gunicorn fronts every deployment in this network, so +# the floor is the network's security baseline: 21.x carried two HTTP +# request-smuggling CVEs (CVE-2024-6827, CVE-2024-1135), fixed in 23.0. +gunicorn>=23.0.0 diff --git a/run.py b/run.py new file mode 100644 index 0000000..4d8885e --- /dev/null +++ b/run.py @@ -0,0 +1,345 @@ +""" +dash-mui-charts documentation site — MUI X charts for Dash, markdown-driven. + +Serves the component documentation (docs/**/*.md with live examples, plus +the Python pages still awaiting their boilerplate-migration phase) at +https://muicharts.2plot.dev, a 2plot network satellite. + +Run locally: + + python run.py # backend from .env (DASH_BACKEND) + +Production (Render/Docker): + + gunicorn run:server -b 0.0.0.0:8550 +""" +import inspect +import os +import sys + +from dotenv import load_dotenv + +# MUST come before the first-party imports below, and this is not style. +# Several modules read os.environ at *import* time — lib/constants.py +# (APP_BASE_URL), lib/ad_client.py (AD_SERVER_URL, AD_APP_ID) and +# lib/analytics.py (ANALYTICS_DIR). Loading the .env after importing them +# means every one of those silently falls back to its default no matter +# what the file says. +load_dotenv() + +import dash # noqa: E402 +from dash import Dash, Input, Output, callback, no_update # noqa: E402 + +from components.appshell import create_appshell # noqa: E402 + + +def _version(text: str) -> tuple: + """("4.4.1rc0") -> (4, 4, 1). Trailing rc/dev segments are dropped.""" + parts = [] + for chunk in text.split(".")[:3]: + digits = "" + for char in chunk: + if not char.isdigit(): + break + digits += char + if not digits: + break + parts.append(int(digits)) + return tuple(parts) + + +DASH_VERSION = _version(dash.__version__) + +# AI/LLM Integration & SEO — dash-improve-my-llms >= 2.3.4 from PyPI. +# 2.3.4 brings `resolve_site_title`, which is what carries SITE_BRAND into +# the /llms.txt H1 and the llms viewer's brand chip; 2.3.3 fixed the +# Anthropic bot taxonomy and directive stripping. +from dash_improve_my_llms import ( # noqa: E402 + __version__ as LLMS_PKG_VERSION, + add_llms_routes, + LLMSConfig, + RobotsConfig, + register_page_metadata, +) + +LLMS_PKG_FLOOR = (2, 3, 4) + +from dash_mui_charts import __version__ as _COMPONENT_VERSION # noqa: E402 + +# This repo's OWN analytics chain — the SPA-aware doc/spa recorder, NOT the +# boilerplate's request-level analytics_tracker. See lib/traffic_report.py +# THE COUNTING RULE and BOILERPLATE_MIGRATION_PLAN.md decision 3. +from lib import analytics, network_directory # noqa: E402 +from lib.constants import ( # noqa: E402 + APP_TITLE, + BASE_URL, + ORIGIN_PLACEHOLDER, + SITE_BRAND, + SITE_DESCRIPTION, + require_owned_base_url, +) +from lib.traffic_report import register_healthz, start_traffic_reporter # noqa: E402 + +# Backend selection (flask | fastapi | quart) — see lib/backend.py. The +# machinery is the boilerplate's; this app's analytics hooks and /healthz +# are Flask-first, so anything else refuses to boot rather than silently +# serving uncounted, unprobed traffic. +from lib.backend import resolve_backend, get_backend_info # noqa: E402 + +BACKEND = resolve_backend() +BACKEND_INFO = get_backend_info(BACKEND) + +if BACKEND != "flask": + raise RuntimeError( + f"DASH_BACKEND={BACKEND!r}: this site's analytics recorder, " + "/healthz and traffic reporter are wired for Flask only. Port " + "lib/analytics + lib/traffic_report hooks before flipping the " + "backend (BOILERPLATE_MIGRATION_PLAN.md, open question 4)." + ) + +print( + f"[muicharts] Starting Dash {dash.__version__} " + f"(dash-improve-my-llms {LLMS_PKG_VERSION}, dash_mui_charts " + f"{_COMPONENT_VERSION}) on backend='{BACKEND}'" +) + +# ---------------------------------------------------------------------------- +# Dependency floors — enforced, not advised. A version below the floor stops +# the boot and says what to do; the app is never wrong-but-running. Set +# ALLOW_STALE_DEPS=1 to downgrade to warnings when deliberately testing an +# older release. +# ---------------------------------------------------------------------------- + +ALLOW_STALE_DEPS = os.environ.get("ALLOW_STALE_DEPS", "0") == "1" + + +def _dependency_floor(message: str, fatal: bool) -> None: + detail = ( + f"{message}\n" + f" running from: {sys.executable}\n" + " fix: reinstall with `pip install -r requirements.txt && " + "pip install --no-deps markdown2dash==0.1.2`.\n" + " (set ALLOW_STALE_DEPS=1 to start anyway)" + ) + if fatal and not ALLOW_STALE_DEPS: + raise RuntimeError("\n[muicharts] " + detail) + print("[muicharts] WARNING: " + detail) + + +if LLMS_PKG_FLOOR > _version(LLMS_PKG_VERSION): + _dependency_floor( + f"dash-improve-my-llms {LLMS_PKG_VERSION} is below the " + f"{'.'.join(str(n) for n in LLMS_PKG_FLOOR)} floor in " + "requirements.txt. Below 2.3.4 this site's published identity " + "silently degrades to whatever `app.title` happens to be.", + fatal=True, + ) + +if DASH_VERSION < (4, 4): + _dependency_floor( + f"dash {dash.__version__} is below the 4.4.0 floor in " + "requirements.txt (the boilerplate docs stack's floor; the " + "dash_mui_charts PACKAGE itself still supports >=3.3).", + fatal=False, + ) + +# Dash 4.3+ MCP server: a live introspection surface on a public host, so +# off unless DASH_MCP_ENABLED=1. Constructor argument — Dash starts the +# server during __init__; there is no supported way to enable it later. +MCP_ENABLED = os.environ.get("DASH_MCP_ENABLED", "0") == "1" +MCP_PATH = os.environ.get("DASH_MCP_PATH", "_mcp") + +# ---------------------------------------------------------------------------- +# Clerk satellite auth. MUST run BEFORE Dash(...) — register_clerk_auth +# installs @dash.hooks callbacks that fire during app construction. Fully +# optional: a no-op with no CLERK_* keys, which is the default. +# ---------------------------------------------------------------------------- +from lib import auth as _auth # noqa: E402 + +CLERK_ENABLED = _auth.register() + +MCP_KWARGS = {} +if MCP_ENABLED: + if "enable_mcp" in inspect.signature(Dash.__init__).parameters: + MCP_KWARGS = {"enable_mcp": True, "mcp_path": MCP_PATH} + else: + print( + f"[muicharts] DASH_MCP_ENABLED=1 ignored: dash " + f"{dash.__version__} has no MCP server (needs >= 4.3)." + ) + +# Custom index template: GA4, favicon randomizer, and the site-level tags +# Dash does not emit. Its __CANONICAL_ORIGIN__ tokens become BASE_URL and +# __APP_VERSION__ becomes the package version here, so the canonical origin +# and every version string come from single sources of truth — a static +# file cannot import lib/constants, and hand-maintained copies are exactly +# how this template once carried five conflicting version strings. +with open(os.path.join(os.path.dirname(__file__), "templates", "index.html"), + encoding="utf-8") as _f: + _index_string = (_f.read() + .replace(ORIGIN_PLACEHOLDER, BASE_URL) + .replace("__APP_VERSION__", _COMPONENT_VERSION)) + +# NOTE: no `prevent_initial_callbacks=True` here, deliberately — unlike the +# boilerplate. The demo callbacks (both the unported Python pages and the +# exec example modules ported from them) rely on initial fires to render +# their first state; the canonical ad_client handles its own initial-call +# semantics explicitly per callback. +app = Dash( + __name__, + backend=BACKEND, + title=APP_TITLE, + use_pages=True, + suppress_callback_exceptions=True, + update_title=None, + index_string=_index_string, + **MCP_KWARGS, +) + +if MCP_KWARGS: + print(f"[muicharts] Dash MCP server enabled at /{MCP_PATH.lstrip('/')}") + +# dash-clerk-auth's post-construction half: sessions, /api/auth/* routes, +# per-request identity. No-op when off. +_auth.configure_app(app) + +server = app.server # WSGI entry point for gunicorn: gunicorn run:server + +# Trust the proxy's forwarded scheme — immediately after the server object +# exists, before anything serves a request. Dash builds `twitter:url` from +# `request.url`, and behind a CDN -> Render the last hop is plain HTTP, so +# production would advertise http:// URLs to every social scraper. +from lib import proxy as _proxy # noqa: E402 + +PROXY_FIX_APPLIED = _proxy.apply(app, BACKEND) +print( + "[muicharts] forwarded-scheme trust: " + + ("on" if PROXY_FIX_APPLIED else "OFF — request.url will report the " + "scheme of the last proxy hop") +) + +app._backend_info = BACKEND_INFO + +# ---------------------------------------------------------------------------- +# 2plot.ai satellite analytics — /healthz for the hub's hourly health sweep, +# a document-request recorder for crawlers, and the hourly traffic reporter. +# Page views themselves come from the url.pathname callback further down: +# this is a single-page app, so document requests alone would report one hit +# per visitor. See lib/traffic_report for the full counting rule. +# +# ORDER MATTERS: this before_request is registered BEFORE add_llms_routes, +# so crawler hits are recorded before the bot middleware answers them with +# prerendered HTML (a hook added after it never sees bot traffic). +# ---------------------------------------------------------------------------- +register_healthz(server) + + +@server.before_request +def _track_document_request(): + """Record every document request. Crawlers only ever land here (they run + no JS), which is exactly what `bot_hits` counts.""" + try: + from flask import request as freq + + if freq.method != 'GET': + return + analytics.record( + freq.path, + freq.headers.get('User-Agent', ''), + analytics.client_ip(freq.headers, freq.remote_addr), + source='doc', + country=analytics.cf_country(freq.headers), + ) + except Exception: + pass + + +start_traffic_reporter() + +# ============================================================================ +# AI/LLM & SEO surfaces +# ============================================================================ + +require_owned_base_url() +app._base_url = BASE_URL + +network_directory.apply(BASE_URL) + +# Training crawlers (GPTBot, ClaudeBot, CCBot, …) are disallowed; the +# user-triggered and search fetchers stay allowed — dimll >=2.3.3 buckets +# per vendor, so this split is exact. +app._robots_config = RobotsConfig( + block_ai_training=True, + allow_ai_search=True, + allow_traditional=True, + crawl_delay=10, + disallowed_paths=[], +) + +# `name` here is NOT a nav label — resolve_site_title reads it first, so it +# is the /llms.txt H1 and the llms viewer's brand chip. Markdown-driven +# pages register their own LLMS_DOC inside pages/markdown.py. +register_page_metadata( + path="/", + name=SITE_BRAND, + description=SITE_DESCRIPTION, +) + +# The hub's announcement feed, rendered in this site's llms.txt viewer +# header. Opt-in: with NETWORK_BULLETIN_URL unset it wires nothing. +from lib import bulletin as _bulletin # noqa: E402 + +BULLETIN_ENABLED = _bulletin.configure() +print( + f"[muicharts] network bulletin: wired -> {_bulletin.url()}" + if BULLETIN_ENABLED else + "[muicharts] network bulletin: off (NETWORK_BULLETIN_URL unset)" +) + +# Access control (dimll 2.3): reads the tiers pages declared, so it runs +# after page registration and before the routes attach. OFF unless some +# page declares a non-public tier. +from lib import access as _access # noqa: E402 + +ACCESS_ENABLED = _access.configure() + +add_llms_routes(app, LLMSConfig(warn_missing_llms_doc=True)) + +# ============================================================================ + +app.layout = create_appshell(dash.page_registry.values()) + + +# Page views for the satellite rollup. Fires on hard load AND on every +# navigation, so `pages`, `sessions` and `median_session_s` describe the doc +# pages people actually read — a request-level tracker would only ever see +# the one document GET this SPA makes. Runs inside the Flask request context +# of /_dash-update-component, so the forwarded IP and real user agent are +# both available. +@callback( + Output("analytics-sink", "data"), + Input("url", "pathname"), + prevent_initial_call=False, +) +def track_page_view(pathname): + try: + from flask import request as freq + + analytics.record( + pathname or "/", + freq.headers.get("User-Agent", ""), + analytics.client_ip(freq.headers, freq.remote_addr), + source="spa", + country=analytics.cf_country(freq.headers), + ) + except Exception: + pass + return no_update + + +if __name__ == "__main__": + app.run( + debug=os.environ.get("DASH_DEBUG", "0") == "1", + host="0.0.0.0", + port=int(os.environ.get("PORT", "7666")), + ) diff --git a/scripts/chart_parity_baseline.json b/scripts/chart_parity_baseline.json new file mode 100644 index 0000000..1a91b64 --- /dev/null +++ b/scripts/chart_parity_baseline.json @@ -0,0 +1,1031 @@ +{ + "chart_callbacks": [ + { + "chart_refs": [ + "controlled-zoom-chart" + ], + "output": "..controlled-zoom-chart.zoom...controlled-zoom-output.children.." + }, + { + "chart_refs": [ + "lab-color-clock" + ], + "output": "..lab-color-clock.sx...lab-color-face.value...lab-color-hand.value...lab-color-num.value.." + }, + { + "chart_refs": [ + "lab-dtp-clock" + ], + "output": "..lab-dtp-clock.value...lab-dtp.value...lab-dtp-out.children.." + }, + { + "chart_refs": [ + "lab-sw-clock" + ], + "output": "..lab-sw-store.data...lab-sw-interval.disabled...lab-sw-clock.value...lab-sw-clock.view...lab-sw-readout.children...lab-sw-unit.children...lab-sw-unit.color.." + }, + { + "chart_refs": [ + "lab-tg-clock" + ], + "output": "..lab-tg-clock.value...lab-tg.value...lab-tg-out.children.." + }, + { + "chart_refs": [ + "lab-ti-clock" + ], + "output": "..lab-ti-clock.value...lab-ti-input.value...lab-ti-out.children.." + }, + { + "chart_refs": [ + "lab-tp-clock" + ], + "output": "..lab-tp-clock.value...lab-tp-input.value...lab-tp-out.children.." + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "..lt-alert-count.children...lt-alert-log.children.." + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "..lt-price-display.children...lt-price-display.style...lt-tick-display.children...lt-status.children...lt-status.style.." + }, + { + "chart_refs": [ + "npm-sparkline" + ], + "output": "..npm-download-count.children...npm-week-label.children.." + }, + { + "chart_refs": [ + "sec2-chart" + ], + "output": "..sec2-chart.referenceLines...sec2-tags.children...sec2-count.children...sec2-alert-status.children.." + }, + { + "chart_refs": [ + "sec3-humidity", + "sec3-pressure", + "sec3-temp" + ], + "output": "..sec3-temp.highlightedAxis...sec3-pressure.highlightedAxis...sec3-humidity.highlightedAxis...sec3-temp.syncedTooltipIndex...sec3-pressure.syncedTooltipIndex...sec3-humidity.syncedTooltipIndex...sec3-coord.children.." + }, + { + "chart_refs": [ + "sec3-humidity", + "sec3-pressure", + "sec3-temp" + ], + "output": "..sec3-temp.referenceLines...sec3-pressure.referenceLines...sec3-humidity.referenceLines...sec3-tags-temp.children...sec3-tags-pressure.children...sec3-tags-humidity.children...sec3-count.children.." + }, + { + "chart_refs": [ + "glass-sparkline" + ], + "output": "..sparkline-container.style...sparkline-container.className...hover-value-display.children...hover-index-display.children...change-display.children...change-display.className...hover-instruction.className.." + }, + { + "chart_refs": [ + "interactive-stock-sparkline" + ], + "output": "..stock-price-display.children...stock-hover-output.children.." + }, + { + "chart_refs": [ + "sync-line-a", + "sync-line-b" + ], + "output": "..sync-line-a.highlightedItem...sync-line-b.highlightedItem...custom-tooltip-a.style...custom-tooltip-a.children...custom-tooltip-b.style...custom-tooltip-b.children...sync-axis-output.children...profit-display.children.." + }, + { + "chart_refs": [ + "sync-line-chart", + "sync-pie-chart" + ], + "output": "..sync-line-chart.highlightedItem...sync-pie-chart.highlightedItem...sync-highlight-output.children.." + }, + { + "chart_refs": [ + "sync-revenue-spark", + "sync-sessions-spark", + "sync-users-spark" + ], + "output": "..sync-revenue-value.children...sync-revenue-label.children...sync-users-value.children...sync-users-label.children...sync-sessions-value.children...sync-sessions-label.children.." + }, + { + "chart_refs": [ + "tree-exp-controlled" + ], + "output": "..tree-exp-controlled.expandedItems...tree-exp-controlled-out.children.." + }, + { + "chart_refs": [ + "tree-pro-combo" + ], + "output": "..tree-pro-combo-action-log.children...tps-last-kebab.data.." + }, + { + "chart_refs": [ + "tree-pro-combo" + ], + "output": "..tree-pro-combo-edit.children...tps-label-overrides.data.." + }, + { + "chart_refs": [ + "tree-pro-combo" + ], + "output": "..tree-pro-combo-sliders.children...tps-last-slider.data.." + }, + { + "chart_refs": [ + "tree-sel-controlled" + ], + "output": "..tree-sel-controlled.selectedItems...tree-sel-controlled-out.children.." + }, + { + "chart_refs": [ + "v120-stack-humidity", + "v120-stack-pressure", + "v120-stack-temp" + ], + "output": "..v120-stack-temp.highlightedAxis...v120-stack-humidity.highlightedAxis...v120-stack-pressure.highlightedAxis...v120-stack-temp.syncedTooltipIndex...v120-stack-humidity.syncedTooltipIndex...v120-stack-pressure.syncedTooltipIndex.." + }, + { + "chart_refs": [ + "v120-stack-humidity", + "v120-stack-pressure", + "v120-stack-temp" + ], + "output": "..v120-stack-temp.xAxis...v120-stack-humidity.xAxis...v120-stack-pressure.xAxis...v120-stack-temp.margin...v120-stack-humidity.margin...v120-stack-pressure.margin...v120-stack-temp.height...v120-stack-humidity.height...v120-stack-pressure.height.." + }, + { + "chart_refs": [ + "v120-sync-humidity", + "v120-sync-temp" + ], + "output": "..v120-sync-temp.highlightedAxis...v120-sync-humidity.highlightedAxis...v120-sync-temp.syncedTooltipIndex...v120-sync-humidity.syncedTooltipIndex...v120-sync-output.children.." + }, + { + "chart_refs": [ + "axis-highlight-chart" + ], + "output": "axis-highlight-chart.highlightedAxis" + }, + { + "chart_refs": [ + "axis-highlight-chart" + ], + "output": "axis-highlight-output.children" + }, + { + "chart_refs": [ + "bar-int-axis-click" + ], + "output": "bar-int-axis-click-out.children" + }, + { + "chart_refs": [ + "bar-int-click" + ], + "output": "bar-int-click-out.children" + }, + { + "chart_refs": [ + "bar-int-highlight" + ], + "output": "bar-int-highlight-out.children" + }, + { + "chart_refs": [ + "brush-toggle-chart" + ], + "output": "brush-toggle-chart.brushOverlay" + }, + { + "chart_refs": [ + "candle-click" + ], + "output": "candle-click-out.children" + }, + { + "chart_refs": [ + "interactive-linechart" + ], + "output": "click-output.children" + }, + { + "chart_refs": [ + "composite-zoom" + ], + "output": "composite-zoom-output.children" + }, + { + "chart_refs": [ + "composite-zoom" + ], + "output": "composite-zoom.series" + }, + { + "chart_refs": [ + "cross-basic" + ], + "output": "cross-coord-display.children" + }, + { + "chart_refs": [ + "dynamic-ref-chart" + ], + "output": "dynamic-ref-chart.referenceLines" + }, + { + "chart_refs": [ + "interactive-heatmap" + ], + "output": "heatmap-click-output.children" + }, + { + "chart_refs": [ + "item-highlight-chart" + ], + "output": "item-highlight-chart.highlightedItem" + }, + { + "chart_refs": [ + "item-highlight-chart" + ], + "output": "item-highlight-output.children" + }, + { + "chart_refs": [ + "lab-glass-clock" + ], + "output": "lab-glass-readout.children" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.drift" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.intervalMs" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.resetTrigger" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.running" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.showLabels" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.showSlider" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.showVolume" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.volatility" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.windowSize" + }, + { + "chart_refs": [ + "interactive-pie" + ], + "output": "pie-click-data.children" + }, + { + "chart_refs": [ + "interactive-pie" + ], + "output": "pie-highlight-data.children" + }, + { + "chart_refs": [ + "scatter-click" + ], + "output": "scatter-click-output.children" + }, + { + "chart_refs": [ + "sec2-chart" + ], + "output": "sec2-store.data" + }, + { + "chart_refs": [ + "sec3-humidity", + "sec3-pressure", + "sec3-temp" + ], + "output": "sec3-store.data" + }, + { + "chart_refs": [ + "tc-controlled" + ], + "output": "tc-controlled-out.children" + }, + { + "chart_refs": [ + "tc-controlled" + ], + "output": "tc-controlled.value" + }, + { + "chart_refs": [ + "tc-views-hms" + ], + "output": "tc-views-out.children" + }, + { + "chart_refs": [ + "tick-hover-interactive" + ], + "output": "tick-hover-click-output.children" + }, + { + "chart_refs": [ + "tree-basic-clicks" + ], + "output": "tree-basic-click-out.children" + }, + { + "chart_refs": [ + "tree-basic-focus" + ], + "output": "tree-basic-focus-out.children" + }, + { + "chart_refs": [ + "tree-dis-checkbox" + ], + "output": "tree-dis-checkbox-out.children" + }, + { + "chart_refs": [ + "tree-edit-all" + ], + "output": "tree-edit-all-out.children" + }, + { + "chart_refs": [ + "tree-edit-log" + ], + "output": "tree-edit-log-out.children" + }, + { + "chart_refs": [ + "tree-edit-specific" + ], + "output": "tree-edit-specific-out.children" + }, + { + "chart_refs": [ + "tree-exp-track" + ], + "output": "tree-exp-track-out.children" + }, + { + "chart_refs": [ + "tree-pro-combo" + ], + "output": "tree-pro-combo-sel.children" + }, + { + "chart_refs": [ + "tree-pro-reorder" + ], + "output": "tree-pro-reorder-out.children" + }, + { + "chart_refs": [ + "tree-sel-checkbox" + ], + "output": "tree-sel-checkbox-out.children" + }, + { + "chart_refs": [ + "tree-sel-multi" + ], + "output": "tree-sel-multi-out.children" + }, + { + "chart_refs": [ + "tree-sel-propagation" + ], + "output": "tree-sel-propagation-out.children" + }, + { + "chart_refs": [ + "tree-sel-single" + ], + "output": "tree-sel-single-out.children" + }, + { + "chart_refs": [ + "tree-simple-checkbox" + ], + "output": "tree-simple-checkbox-out.children" + }, + { + "chart_refs": [ + "tree-simple-select" + ], + "output": "tree-simple-select-out.children" + }, + { + "chart_refs": [ + "tree-simple-sidebar-demo" + ], + "output": "url.href@84a073d34077b424ad8b29fb2d77b7beba89e2ae5728c1701b364d8a66debb52" + }, + { + "chart_refs": [ + "v120-highlighted-axis" + ], + "output": "v120-axis-output.children" + }, + { + "chart_refs": [ + "zoom-preview-chart" + ], + "output": "zoom-preview-output.children" + }, + { + "chart_refs": [ + "zoom-slider-chart" + ], + "output": "zoom-slider-output.children" + } + ], + "healthz": [ + 200, + true + ], + "route_statuses": { + "/": 200, + "/api": 200, + "/barchart-basic": 200, + "/barchart-dataset": 200, + "/barchart-interaction": 200, + "/barchart-pro": 200, + "/barchart-reference": 200, + "/barchart-stacking": 200, + "/candlestick": 200, + "/changelog": 200, + "/composite": 200, + "/composite-render-bp": 200, + "/composite-v120": 200, + "/crosshair": 200, + "/heatmap": 200, + "/heatmap-props": 200, + "/highlighting-sync": 200, + "/linechart-basic": 200, + "/linechart-brush": 200, + "/linechart-highlighting": 200, + "/linechart-pro": 200, + "/linechart-referencelines": 200, + "/linechart-tick-hover": 200, + "/linechart-zoom-preview": 200, + "/live-trading": 200, + "/pie": 200, + "/pie-props": 200, + "/scatter": 200, + "/sparkline": 200, + "/sparkline-style": 200, + "/sparkline-style-advanced": 200, + "/time-clock": 200, + "/time-clock-lab": 200, + "/tree-basic": 200, + "/tree-disabled": 200, + "/tree-editing": 200, + "/tree-expansion": 200, + "/tree-icons": 200, + "/tree-pro": 200, + "/tree-selection": 200, + "/tree-simple": 200 + }, + "routes": { + "/": { + "mui_components": {}, + "mui_ids": [], + "mui_mounts": 0 + }, + "/api": { + "mui_components": {}, + "mui_ids": [], + "mui_mounts": 0 + }, + "/barchart-basic": { + "mui_components": { + "dash_mui_charts.BarChart": 6 + }, + "mui_ids": [ + "bar-basic-horizontal", + "bar-basic-labels", + "bar-basic-multi", + "bar-basic-negative", + "bar-basic-rounded", + "bar-basic-stacked" + ], + "mui_mounts": 6 + }, + "/barchart-dataset": { + "mui_components": { + "dash_mui_charts.BarChart": 3 + }, + "mui_ids": [ + "bar-ds-gaps", + "bar-ds-stacked", + "bar-ds-temps" + ], + "mui_mounts": 3 + }, + "/barchart-interaction": { + "mui_components": { + "dash_mui_charts.BarChart": 8 + }, + "mui_ids": [ + "bar-int-ax-band", + "bar-int-ax-line", + "bar-int-ax-none", + "bar-int-axis-click", + "bar-int-click", + "bar-int-highlight", + "bar-int-tt-axis", + "bar-int-tt-item" + ], + "mui_mounts": 8 + }, + "/barchart-pro": { + "mui_components": { + "dash_mui_charts.BarChart": 3 + }, + "mui_ids": [ + "bar-pro-slider", + "bar-pro-stacked-zoom", + "bar-pro-toolbar" + ], + "mui_mounts": 3 + }, + "/barchart-reference": { + "mui_components": { + "dash_mui_charts.BarChart": 6 + }, + "mui_ids": [ + "bar-ref-colors", + "bar-ref-multi", + "bar-ref-noanim", + "bar-ref-nolegend", + "bar-ref-target", + "bar-ref-vertical" + ], + "mui_mounts": 6 + }, + "/barchart-stacking": { + "mui_components": { + "dash_mui_charts.BarChart": 5 + }, + "mui_ids": [ + "bar-stack-diverging", + "bar-stack-expand", + "bar-stack-groups", + "bar-stack-horizontal", + "bar-stack-normal" + ], + "mui_mounts": 5 + }, + "/candlestick": { + "mui_components": { + "dash_mui_charts.CandlestickChart": 7 + }, + "mui_ids": [ + "candle-basic", + "candle-click", + "candle-dataset", + "candle-no-tooltip", + "candle-refs", + "candle-styled", + "candle-volume" + ], + "mui_mounts": 7 + }, + "/changelog": { + "mui_components": {}, + "mui_ids": [], + "mui_mounts": 0 + }, + "/composite": { + "mui_components": { + "dash_mui_charts.CompositeChart": 4 + }, + "mui_ids": [ + "composite-multiaxis", + "composite-reference", + "composite-trend", + "composite-zoom" + ], + "mui_mounts": 4 + }, + "/composite-render-bp": { + "mui_components": {}, + "mui_ids": [], + "mui_mounts": 0 + }, + "/composite-v120": { + "mui_components": { + "dash_mui_charts.CompositeChart": 7 + }, + "mui_ids": [ + "v120-axis-tooltip", + "v120-highlighted-axis", + "v120-stack-humidity", + "v120-stack-pressure", + "v120-stack-temp", + "v120-sync-humidity", + "v120-sync-temp" + ], + "mui_mounts": 7 + }, + "/crosshair": { + "mui_components": { + "dash_mui_charts.CompositeChart": 5 + }, + "mui_ids": [ + "cross-basic", + "sec2-chart", + "sec3-humidity", + "sec3-pressure", + "sec3-temp" + ], + "mui_mounts": 5 + }, + "/heatmap": { + "mui_components": { + "dash_mui_charts.Heatmap": 7 + }, + "mui_ids": [ + "basic-heatmap", + "correlation-heatmap", + "custom-cell-heatmap", + "interactive-heatmap", + "piecewise-heatmap", + "rounded-heatmap", + "temperature-heatmap" + ], + "mui_mounts": 7 + }, + "/heatmap-props": { + "mui_components": {}, + "mui_ids": [], + "mui_mounts": 0 + }, + "/highlighting-sync": { + "mui_components": { + "dash_mui_charts.LineChart": 3, + "dash_mui_charts.PieChart": 1 + }, + "mui_ids": [ + "sync-line-a", + "sync-line-b", + "sync-line-chart", + "sync-pie-chart" + ], + "mui_mounts": 4 + }, + "/linechart-basic": { + "mui_components": { + "dash_mui_charts.LineChart": 6 + }, + "mui_ids": [ + "area-linechart", + "basic-linechart", + "biaxial-linechart", + "custom-linechart", + "interactive-linechart", + "stacked-area-linechart" + ], + "mui_mounts": 6 + }, + "/linechart-brush": { + "mui_components": { + "dash_mui_charts.LineChart": 3 + }, + "mui_ids": [ + "axis-highlight-chart", + "brush-toggle-chart", + "brush-values-chart" + ], + "mui_mounts": 3 + }, + "/linechart-highlighting": { + "mui_components": { + "dash_mui_charts.LineChart": 3 + }, + "mui_ids": [ + "axis-highlight-chart", + "highlight-scope-chart", + "item-highlight-chart" + ], + "mui_mounts": 3 + }, + "/linechart-pro": { + "mui_components": { + "dash_mui_charts.LineChart": 4 + }, + "mui_ids": [ + "biaxial-zoom-chart", + "controlled-zoom-chart", + "zoom-config-chart", + "zoom-slider-chart" + ], + "mui_mounts": 4 + }, + "/linechart-referencelines": { + "mui_components": { + "dash_mui_charts.LineChart": 8 + }, + "mui_ids": [ + "combined-ref-chart", + "dynamic-ref-chart", + "horizontal-ref-chart", + "label-align-chart", + "line-style-chart", + "multiaxis-ref-chart", + "spacing-chart", + "vertical-ref-chart" + ], + "mui_mounts": 8 + }, + "/linechart-tick-hover": { + "mui_components": { + "dash_mui_charts.LineChart": 8 + }, + "mui_ids": [ + "tick-hover-config", + "tick-hover-interactive", + "tick-hover-quarter", + "tick-hover-week", + "tick-hover-year-linear", + "tick-hover-year-point", + "tick-hover-zoom-pro", + "tick-hover-zoom-slider" + ], + "mui_mounts": 8 + }, + "/linechart-zoom-preview": { + "mui_components": { + "dash_mui_charts.LineChart": 4 + }, + "mui_ids": [ + "axis-config-chart", + "zoom-interaction-chart", + "zoom-preview-biaxial", + "zoom-preview-chart" + ], + "mui_mounts": 4 + }, + "/live-trading": { + "mui_components": { + "dash_mui_charts.LiveTradingChart": 1 + }, + "mui_ids": [ + "lt-chart" + ], + "mui_mounts": 1 + }, + "/pie": { + "mui_components": { + "dash_mui_charts.PieChart": 6 + }, + "mui_ids": [ + "basic-pie", + "donut-pie", + "gauge-pie", + "interactive-pie", + "labeled-pie", + "styled-pie" + ], + "mui_mounts": 6 + }, + "/pie-props": { + "mui_components": {}, + "mui_ids": [], + "mui_mounts": 0 + }, + "/scatter": { + "mui_components": { + "dash_mui_charts.ScatterChart": 7 + }, + "mui_ids": [ + "scatter-axis-styling", + "scatter-basic", + "scatter-click", + "scatter-colormap", + "scatter-dataset", + "scatter-log", + "scatter-sizes" + ], + "mui_mounts": 7 + }, + "/sparkline": { + "mui_components": { + "dash_mui_charts.SparklineChart": 20 + }, + "mui_ids": [ + "interactive-stock-sparkline", + "npm-sparkline", + "sync-revenue-spark", + "sync-sessions-spark", + "sync-users-spark" + ], + "mui_mounts": 20 + }, + "/sparkline-style": { + "mui_components": {}, + "mui_ids": [], + "mui_mounts": 0 + }, + "/sparkline-style-advanced": { + "mui_components": { + "dash_mui_charts.SparklineChart": 1 + }, + "mui_ids": [ + "glass-sparkline" + ], + "mui_mounts": 1 + }, + "/time-clock": { + "mui_components": { + "dash_mui_charts.TimeClock": 11 + }, + "mui_ids": [ + "tc-ampm-default", + "tc-ampm-off", + "tc-ampm-on", + "tc-basic", + "tc-controlled", + "tc-disabled", + "tc-readonly", + "tc-uncontrolled", + "tc-views-h", + "tc-views-hms", + "tc-views-ms" + ], + "mui_mounts": 11 + }, + "/time-clock-lab": { + "mui_components": { + "dash_mui_charts.TimeClock": 7 + }, + "mui_ids": [ + "lab-color-clock", + "lab-dtp-clock", + "lab-glass-clock", + "lab-sw-clock", + "lab-tg-clock", + "lab-ti-clock", + "lab-tp-clock" + ], + "mui_mounts": 7 + }, + "/tree-basic": { + "mui_components": { + "dash_mui_charts.TreeView": 5 + }, + "mui_ids": [ + "tree-basic-clicks", + "tree-basic-custom-keys", + "tree-basic-expanded", + "tree-basic-focus", + "tree-basic-minimal" + ], + "mui_mounts": 5 + }, + "/tree-disabled": { + "mui_components": { + "dash_mui_charts.TreeView": 4 + }, + "mui_ids": [ + "tree-dis-basic", + "tree-dis-checkbox", + "tree-dis-focusable", + "tree-dis-parents" + ], + "mui_mounts": 4 + }, + "/tree-editing": { + "mui_components": { + "dash_mui_charts.TreeView": 3 + }, + "mui_ids": [ + "tree-edit-all", + "tree-edit-log", + "tree-edit-specific" + ], + "mui_mounts": 3 + }, + "/tree-expansion": { + "mui_components": { + "dash_mui_charts.TreeView": 4 + }, + "mui_ids": [ + "tree-exp-content", + "tree-exp-controlled", + "tree-exp-icon", + "tree-exp-track" + ], + "mui_mounts": 4 + }, + "/tree-icons": { + "mui_components": { + "dash_mui_charts.TreeView": 9 + }, + "mui_ids": [ + "tree-icon-addremove", + "tree-icon-arrow", + "tree-icon-default", + "tree-icon-file", + "tree-icon-height", + "tree-icon-indent-24", + "tree-icon-indent-48", + "tree-icon-indent-8", + "tree-icon-sx" + ], + "mui_mounts": 9 + }, + "/tree-pro": { + "mui_components": { + "dash_mui_charts.TreeViewPro": 3 + }, + "mui_ids": [ + "tree-pro-combo", + "tree-pro-reorder", + "tree-pro-reorder-subset" + ], + "mui_mounts": 3 + }, + "/tree-selection": { + "mui_components": { + "dash_mui_charts.TreeView": 6 + }, + "mui_ids": [ + "tree-sel-checkbox", + "tree-sel-controlled", + "tree-sel-disabled", + "tree-sel-multi", + "tree-sel-propagation", + "tree-sel-single" + ], + "mui_mounts": 6 + }, + "/tree-simple": { + "mui_components": { + "dash_mui_charts.SimpleTreeView": 7 + }, + "mui_ids": [ + "tree-simple-basic", + "tree-simple-checkbox", + "tree-simple-disabled", + "tree-simple-icon-trigger", + "tree-simple-icons", + "tree-simple-select", + "tree-simple-sidebar-demo" + ], + "mui_mounts": 7 + } + }, + "total_mui_mounts": 195 +} diff --git a/scripts/check_release.py b/scripts/check_release.py new file mode 100644 index 0000000..703ac47 --- /dev/null +++ b/scripts/check_release.py @@ -0,0 +1,291 @@ +#!/usr/bin/env python +"""Pre-release consistency check for dash-mui-charts. + +Run before cutting a tag (release.yml runs it on every tag, ci.yml's package +job on every push). It catches the release-shaped mistakes no functional test +can see, because the app runs perfectly with all of them — this repo shipped +FIVE conflicting version strings at once before the network-standard pass +(package.json 1.4.0, PyPI 1.2.3, header badge v1.3.0, JSON-LD 1.2.1, README +"9 components"): + +1. **Version drift across the two real sources.** setup.py reads the ROOT + package.json — that is what PyPI serves. `dash_mui_charts.__version__` + reads `dash_mui_charts/package-info.json`, a DIFFERENT file regenerated by + `npm run build`. Bump the root and skip the rebuild and the wheel's label + and its `__version__` disagree. (Every other surface — header badge, + JSON-LD, noscript — derives from these at boot; tests/test_version_parity + holds that side.) +2. **The committed bundle stale** relative to src/lib/components. +3. **CHANGELOG not mentioning the version being released.** +4. **Packaging drift** — the wheel picking up more than dash_mui_charts/, or + the Dash floor in setup.py disagreeing with what CI measures. + + python scripts/check_release.py # check + python scripts/check_release.py --version 1.4.0 # also assert the target + +Exit code 0 when clean, 1 otherwise. +""" +from __future__ import annotations + +import argparse +import json +import re +import subprocess +import sys +from pathlib import Path + +ROOT = Path(__file__).resolve().parent.parent + +# The Dash floor the PACKAGE promises. CI's package jobs measure it (a wheel +# install against dash==3.3.0 and against the current release); setup.py must +# agree, or the promise and the measurement have quietly diverged. The DOCS +# SITE floor is separate and higher — dash-improve-my-llms pins dash>=4.1 — +# and is asserted by ci.yml's docs jobs, not here. +DASH_PACKAGE_FLOOR = "3.3" + +COMPONENT_COUNT = 13 + +problems: list[str] = [] +notes: list[str] = [] + + +def strip_html_comments(html: str) -> str: + """`<!-- ... -->` removed, so a check cannot match its own explanation — + templates/index.html documents the tags it must NOT contain.""" + return re.sub(r"<!--.*?-->", "", html, flags=re.S) + + +def check(label: str, ok: bool, detail: str = "") -> None: + print(f" {'PASS' if ok else 'FAIL'} {label:<52} {detail}") + if not ok: + problems.append(f"{label}: {detail}") + + +def check_bundle_freshness(bundle: Path) -> None: + """Is the committed JS bundle older than the React source it is built + from? Git commit timestamps, not filesystem mtimes — git does not record + mtimes, so a fresh clone stamps every file with checkout time and the + comparison decays to sub-second write ordering. Equal timestamps are the + healthy case (bundle and source committed together).""" + def last_commit(path: str) -> int | None: + try: + out = subprocess.run( + ["git", "log", "-1", "--format=%ct", "--", path], + cwd=ROOT, capture_output=True, text=True, timeout=15, + ) + return int(out.stdout.strip()) if out.stdout.strip() else None + except Exception: # noqa: BLE001 — not a git checkout, or no git + return None + + bundle_at = last_commit(str(bundle.relative_to(ROOT))) + src_at = last_commit("src/lib/components") + + if bundle_at is None or src_at is None: + notes.append( + "bundle freshness not checked — no git history here (a tarball " + "install, or a shallow clone without the relevant commits)." + ) + print(f" SKIP {'bundle newer than src/lib/components':<52} no git history") + return + + check("bundle newer than src/lib/components", bundle_at >= src_at, + "up to date" if bundle_at >= src_at else + f"STALE — src committed {src_at - bundle_at}s after the bundle; " + "run npm run build and commit the result") + + +def versions() -> dict[str, str]: + out: dict[str, str] = {} + out["package.json (setup.py reads this)"] = json.loads( + (ROOT / "package.json").read_text() + )["version"] + shipped = ROOT / "dash_mui_charts" / "package-info.json" + if shipped.exists(): + out["dash_mui_charts/package-info.json (__version__)"] = json.loads( + shipped.read_text() + )["version"] + return out + + +def main() -> int: + ap = argparse.ArgumentParser(description=__doc__) + ap.add_argument("--version", help="assert every source reports this version") + args = ap.parse_args() + + print("\ndash-mui-charts release check\n" + "=" * 68) + + print("\n[versions]") + vs = versions() + for name, v in vs.items(): + print(f" {name:<52} {v}") + unique = set(vs.values()) + check("all version sources agree", len(unique) == 1, + "consistent" if len(unique) == 1 else f"differ: {sorted(unique)}") + target = args.version or vs["package.json (setup.py reads this)"] + if args.version: + check(f"every source is {args.version}", unique == {args.version}, + "ok" if unique == {args.version} else f"found {sorted(unique)}") + + print("\n[build artifacts]") + bundle = ROOT / "dash_mui_charts" / "dash_mui_charts.min.js" + check("JS bundle committed", bundle.exists(), + f"{bundle.stat().st_size // 1024} KB" if bundle.exists() + else "MISSING — run npm run build") + if bundle.exists(): + check_bundle_freshness(bundle) + + react = sorted(p.name.replace(".react.js", "") + for p in (ROOT / "src" / "lib" / "components").glob("*.react.js")) + generated = sorted(p.stem for p in (ROOT / "dash_mui_charts").glob("*.py") + if p.stem in react or p.stem[:1].isupper()) + check("a Python class per React component", + set(generated) == set(react), + f"{len(generated)} classes" + if set(generated) == set(react) + else f"drift: {sorted(set(react) ^ set(generated))} — run npm run build") + check(f"component count is {COMPONENT_COUNT}", len(react) == COMPONENT_COUNT, + f"{len(react)} React sources") + + print("\n[changelog]") + changelog_path = ROOT / "CHANGELOG.md" + if changelog_path.exists(): + changelog = changelog_path.read_text() + check(f"CHANGELOG mentions {target}", target in changelog, + "found" if target in changelog else f"add a [{target}] section") + if "## [Unreleased]" in changelog: + body = changelog.split("## [Unreleased]", 1)[1].split("## [", 1)[0] + if body.strip() and "Nothing yet" not in body: + notes.append( + "CHANGELOG still has content under [Unreleased] — move it " + f"under [{target}] before tagging." + ) + else: + check("CHANGELOG.md present", False, "MISSING") + + print("\n[packaging]") + setup_py = (ROOT / "setup.py").read_text() + pkg_name = json.loads((ROOT / "package.json").read_text())["name"] + check("package.json name is the import name", pkg_name == "dash_mui_charts", + pkg_name) + check("only the package_name is packaged", + "packages=[package_name]" in setup_py.replace(" ", ""), + "lib/, pages/ and assets/ stay out of the wheel") + # Anchored to install_requires — a bare "dash>=" search would match the + # comment explaining the two floors before it matched the requirement. + floor = re.search(r"install_requires=\[\s*['\"]dash>=([\d.]+)['\"]", setup_py) + check(f"setup.py Dash floor is {DASH_PACKAGE_FLOOR}", + floor is not None and floor.group(1).startswith(DASH_PACKAGE_FLOOR), + f"dash>={floor.group(1)}" if floor else "no dash requirement found") + check("dash is the only hard runtime dependency", + re.search(r"install_requires=\[\s*'dash>=[\d.]+',?\s*\]", setup_py) + is not None + or re.search(r'install_requires=\[\s*"dash>=[\d.]+",?\s*\]', setup_py) + is not None, + "site deps live in requirements.txt") + check("LICENSE present", (ROOT / "LICENSE").exists()) + check("README present", (ROOT / "README.md").exists()) + check("MANIFEST.in present", (ROOT / "MANIFEST.in").exists()) + manifest = (ROOT / "MANIFEST.in").read_text() + check("MANIFEST ships the version source", + "include package.json" in manifest, + "setup.py reads package.json — an sdist without it cannot build") + + print("\n[seo]") + # templates/index.html cannot import lib/constants (it is a static file), + # so its origin and version are TOKENS substituted at boot. A literal + # origin or version left in the template is the exact drift Phase 1 + # removed — five conflicting version strings, og tags pinned to + # onrender.com. + tpl = (ROOT / "templates" / "index.html").read_text() + base = re.search( + r'^DEFAULT_BASE_URL\s*=\s*"([^"]+)"', + (ROOT / "lib" / "constants.py").read_text(), re.M, + ).group(1).rstrip("/") + check("template takes its origin from constants.py", + "__CANONICAL_ORIGIN__" in tpl, + f"{tpl.count('__CANONICAL_ORIGIN__')} tokens → {base}") + check("template takes its version from the package", + "__APP_VERSION__" in tpl, + f"{tpl.count('__APP_VERSION__')} tokens") + tpl_markup = strip_html_comments(tpl) + hard_coded = sorted(set(re.findall( + r"https://[a-z0-9.-]*(?:onrender\.com|2plot\.dev)", tpl_markup))) + check("no hard-coded origin left in the template", not hard_coded, + "all tokenised" if not hard_coded else "found: " + ", ".join(hard_coded)) + # dash-improve-my-llms >= 2.3.3 prerenders <link rel="canonical"> per + # route; a literal tag in the template would be a SECOND canonical on + # every page, and two canonicals is worse than none. The `<` is what + # distinguishes a real tag from the querySelector string the client-side + # sync script legitimately contains. + check("template hard-codes no canonical", + '<link rel="canonical"' not in tpl_markup, + "the package prerenders it per route") + head = tpl.split("</head>")[0] + restated = [t for t in ('name="description"', 'property="og:title"', + 'property="og:description"', 'property="og:type"', + 'name="twitter:card"', 'name="twitter:title"', + 'name="twitter:description"') + if t in strip_html_comments(head)] + check("template does not restate per-page meta tags", not restated, + "only site-level tags" if not restated + else "duplicates Dash: " + ", ".join(restated)) + + print("\n[network]") + reqs = (ROOT / "requirements.txt").read_text() + floor = re.search(r"dash-improve-my-llms>=([\d.]+)", reqs) + ok_floor = floor is not None and tuple( + int(x) for x in floor.group(1).split(".") + ) >= (2, 3, 4) + check("dash-improve-my-llms floor >= 2.3.4", ok_floor, + f">={floor.group(1)}" if floor else "not pinned in requirements.txt") + # Anchored to line start: the requirements COMMENT quotes markdown2dash's + # spurious `gunicorn>=21.2.0,<22` pin, which a bare search matches first. + gunicorn_floor = re.search(r"^gunicorn>=([\d.]+)", reqs, re.M) + check("gunicorn floor >= 23 (CVE-2024-6827/-1135)", + gunicorn_floor is not None + and int(gunicorn_floor.group(1).split(".")[0]) >= 23, + f">={gunicorn_floor.group(1)}" if gunicorn_floor else "not pinned") + for mod in ("constants", "analytics", "traffic_report", "ad_client", + "bulletin", "network_directory"): + check(f"lib/{mod}.py present", (ROOT / "lib" / f"{mod}.py").exists()) + + render_yaml = (ROOT / "render.yaml").read_text() + host = base.split("://", 1)[-1] + if f"- {host}" in render_yaml: + check("render.yaml serves the canonical host", True, f"domains: {host}") + else: + # Phase 4 of the network-standard pass attaches the domain; until + # then this is informational, not a failed release. + notes.append( + f"render.yaml declares no `domains: [{host}]` yet — expected " + "until the Phase 4 cutover attaches the subdomain." + ) + print(f" NOTE {'render.yaml serves the canonical host':<52} pending Phase 4") + + print("\n[docs site]") + for f in ("Dockerfile", "render.yaml", "requirements.txt", "run.py", + "scripts/route_parity.py", "scripts/network_smoke.py", + "scripts/smoke_live.py"): + check(f"{f} present", (ROOT / f).exists()) + check("requirements use no absolute paths", "file:///" not in reqs, + "no absolute file:// URLs") + + print("\n[ci]") + for wf in ("ci.yml", "cd.yml", "release.yml"): + check(f".github/workflows/{wf}", (ROOT / ".github" / "workflows" / wf).exists()) + + print("\n" + "=" * 68) + for n in notes: + print(f"NOTE: {n}") + if problems: + print(f"\n{len(problems)} problem(s) — not ready to tag:") + for p in problems: + print(f" - {p}") + return 1 + print(f"\nClean. Ready to tag v{target} " + "(release.yml publishes on the tag push via PyPI trusted publishing).") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/make_social_card.py b/scripts/make_social_card.py new file mode 100644 index 0000000..a52bd0c --- /dev/null +++ b/scripts/make_social_card.py @@ -0,0 +1,225 @@ +#!/usr/bin/env python3 +"""Render the 1200x630 social card for muicharts.2plot.dev. + + python scripts/make_social_card.py # defaults, this site + python scripts/make_social_card.py --open # ...and preview it + +Adapted from the boilerplate's template copy (satellites pass their own +values so every card in the network is framed identically). Divergences for +this repo: the accent is this site's MUI blue (#1976d2, the template's +theme-color) instead of the boilerplate's manifest teal; artwork smaller +than the art box is upscaled to fit (this site's brand mark is the 180px +area-chart touch icon); and the default artwork/tagline are this site's. + +Output goes to `build/social-cards/<domain>.png`, which is gitignored. The +card is NOT served by the app — publish it BY HAND to the CDN: + + https://cdn.2plot.ai/github_assets/<domain>.png + +That is the network rule (STANDARD §3): a card served by the app itself is +fetched by the scraper at unfurl time, and on a cold free-tier container +that request times out — the preview renders blank, once, permanently, +because platforms cache the miss. The CDN has no cold start. HARD GATE: +verify the CDN object answers 200 with IHDR 1200x630 (read BYTES — a text +decode destroys the PNG header) BEFORE deploying code whose og:image points +there. + +Pillow is a build-time dependency only, deliberately absent from +requirements.txt: nothing at runtime renders images. +""" +from __future__ import annotations + +import argparse +import subprocess +import sys +from pathlib import Path + +REPO_ROOT = Path(__file__).resolve().parent.parent +sys.path.insert(0, str(REPO_ROOT)) + +try: + from PIL import Image, ImageDraw, ImageFont +except ImportError: # pragma: no cover - the one dependency, named clearly + sys.exit("This script needs Pillow:\n pip install Pillow") + +# Card geometry. WIDTH/HEIGHT are the contract; everything else is derived. +WIDTH, HEIGHT = 1200, 630 +PAD = 72 +ART_BOX = 430 # the square the artwork is fitted inside, right-hand side +RULE_W = 6 # the accent bar under the brand + +# Palette. Accent = the site's theme-color (templates/index.html), the MUI +# blue every chart demo defaults to — card, browser chrome and charts agree. +BG_TOP = (26, 27, 30) # #1a1b1e +BG_BOTTOM = (17, 20, 26) # a shade deeper, for a gradient with a direction +ACCENT = (25, 118, 210) # #1976d2 +TEXT = (245, 246, 247) +MUTED = (150, 158, 168) + +# Font families in preference order: macOS ships the first group, +# Debian/Ubuntu CI images the second. No bundled font on purpose. +FONT_CANDIDATES = { + "bold": [ + "/System/Library/Fonts/Supplemental/Arial Bold.ttf", + "/System/Library/Fonts/HelveticaNeue.ttc", + "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", + "/usr/share/fonts/truetype/liberation/LiberationSans-Bold.ttf", + ], + "regular": [ + "/System/Library/Fonts/Supplemental/Arial.ttf", + "/System/Library/Fonts/Helvetica.ttc", + "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", + "/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf", + ], + "mono": [ + "/System/Library/Fonts/Menlo.ttc", + "/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf", + "/usr/share/fonts/truetype/liberation/LiberationMono-Regular.ttf", + ], +} + + +def load_font(kind: str, size: int): + for path in FONT_CANDIDATES[kind]: + if Path(path).exists(): + try: + return ImageFont.truetype(path, size) + except OSError: + continue + print(f"[card] WARNING: no {kind} system font found — falling back to " + "Pillow's built-in, which will look wrong. Install DejaVu or " + "Liberation fonts.", file=sys.stderr) + try: + return ImageFont.load_default(size=size) + except TypeError: # pragma: no cover - Pillow < 10.1 + return ImageFont.load_default() + + +def vertical_gradient(size, top, bottom): + """A one-pixel-wide gradient stretched across the canvas.""" + w, h = size + strip = Image.new("RGB", (1, h)) + for y in range(h): + t = y / max(1, h - 1) + strip.putpixel((0, y), tuple( + round(top[i] + (bottom[i] - top[i]) * t) for i in range(3) + )) + return strip.resize((w, h), Image.BILINEAR) + + +def wrap(draw, text, font, max_width): + """Greedy word wrap against measured pixel width, not a character count.""" + words, lines, current = text.split(), [], "" + for word in words: + trial = f"{current} {word}".strip() + if draw.textlength(trial, font=font) <= max_width or not current: + current = trial + else: + lines.append(current) + current = word + if current: + lines.append(current) + return lines + + +def build_card(artwork: Path, brand: str, tagline: str, domain: str) -> Image.Image: + card = vertical_gradient((WIDTH, HEIGHT), BG_TOP, BG_BOTTOM).convert("RGBA") + draw = ImageDraw.Draw(card) + + # --- artwork, right ---------------------------------------------------- + art = Image.open(artwork).convert("RGBA") + bbox = art.getchannel("A").getbbox() + if bbox: + art = art.crop(bbox) + if max(art.size) < ART_BOX: + # thumbnail() only shrinks; this site's mark is a 180px icon, so + # scale UP to fill the box (flat artwork upscales cleanly). + scale = ART_BOX / max(art.size) + art = art.resize((round(art.width * scale), round(art.height * scale)), + Image.LANCZOS) + art.thumbnail((ART_BOX, ART_BOX), Image.LANCZOS) + art_x = WIDTH - PAD - ART_BOX + (ART_BOX - art.width) // 2 + art_y = (HEIGHT - art.height) // 2 + card.alpha_composite(art, (art_x, art_y)) + + # --- text, left -------------------------------------------------------- + text_width = WIDTH - (PAD * 2) - ART_BOX - 48 + + brand_font = load_font("bold", 62) + tagline_font = load_font("regular", 29) + domain_font = load_font("mono", 25) + + brand_lines = wrap(draw, brand, brand_font, text_width) + if len(brand_lines) > 2: + brand_font = load_font("bold", 50) + brand_lines = wrap(draw, brand, brand_font, text_width) + + tagline_lines = wrap(draw, tagline, tagline_font, text_width)[:3] + + brand_lh, tagline_lh = 74, 40 + block_h = (len(brand_lines) * brand_lh) + 26 + (len(tagline_lines) * tagline_lh) + y = (HEIGHT - block_h - 60) // 2 + + draw.rounded_rectangle( + [PAD, y + 6, PAD + RULE_W, y + block_h - 10], radius=RULE_W // 2, fill=ACCENT + ) + text_x = PAD + RULE_W + 28 + + for line in brand_lines: + draw.text((text_x, y), line, font=brand_font, fill=TEXT) + y += brand_lh + y += 26 + for line in tagline_lines: + draw.text((text_x, y), line, font=tagline_font, fill=MUTED) + y += tagline_lh + + draw.text((text_x, HEIGHT - PAD - 26), domain, font=domain_font, fill=ACCENT) + + return card.convert("RGB") + + +def main() -> int: + from lib.constants import BASE_URL, SITE_BRAND + + default_domain = BASE_URL.split("://", 1)[-1].rstrip("/") + + ap = argparse.ArgumentParser(description=__doc__.splitlines()[0]) + ap.add_argument("--artwork", default="assets/apple-touch-icon_areachart.png", + help="source image, transparent PNG (default: %(default)s)") + ap.add_argument("--brand", default=SITE_BRAND.split(" — ")[0], + help="headline (default: the brand, minus its tagline)") + ap.add_argument("--tagline", + default="13 MUI X chart, tree and picker components for " + "Plotly Dash — with live interactive docs.") + ap.add_argument("--domain", default=default_domain) + ap.add_argument("--out", default=None, + help="default: build/social-cards/<domain>.png") + ap.add_argument("--open", action="store_true", help="preview when done (macOS)") + args = ap.parse_args() + + artwork = (REPO_ROOT / args.artwork) if not Path(args.artwork).is_absolute() \ + else Path(args.artwork) + if not artwork.exists(): + return print(f"artwork not found: {artwork}", file=sys.stderr) or 1 + + out = Path(args.out) if args.out else \ + REPO_ROOT / "build" / "social-cards" / f"{args.domain}.png" + out.parent.mkdir(parents=True, exist_ok=True) + + card = build_card(artwork, args.brand, args.tagline, args.domain) + card.save(out, "PNG", optimize=True) + + kb = out.stat().st_size // 1024 + print(f"[card] {out.relative_to(REPO_ROOT)} {card.width}x{card.height} {kb} KB") + print(f"[card] ratio {card.width / card.height:.2f}:1") + print(f"[card] publish to: https://cdn.2plot.ai/github_assets/{args.domain}.png") + print("[card] HARD GATE: verify 200 + IHDR 1200x630 at that URL before " + "deploying code whose og:image points there.") + + if args.open and sys.platform == "darwin": + subprocess.run(["open", str(out)], check=False) + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/network_smoke.py b/scripts/network_smoke.py new file mode 100644 index 0000000..d30d273 --- /dev/null +++ b/scripts/network_smoke.py @@ -0,0 +1,291 @@ +#!/usr/bin/env python3 +"""Smoke battery for a 2plot satellite — CI container and production alike. + +One script, two seats, the SAME named checks either way, so a failure in CI +and a failure against production read identically: + + CI container python scripts/network_smoke.py --base-url http://localhost:8550 + Production python scripts/network_smoke.py --base-url https://boilerplate.2plot.dev + +Stdlib-only on purpose: CI runs it from the host against the booted container +with a bare `python3`, before anything is pip-installed. + +This is a TEMPLATE FILE. Every satellite forked from this repo copies it +verbatim and changes only the block marked "per-site" below — the expected +H1, the port, the paths that must 404. Everything else is the network +standard; if a check here is wrong, it is wrong on twenty hosts. + +What a satellite is to the network is what the battery proves: that it states +its identity, that its agent-facing document surfaces are real, that it runs +the intended dash-improve-my-llms artifact, and that no owner-only surface +leaks. A satellite holds no key material, so unlike the hub's copy of this +script there is no agent-key API to fail closed — the corresponding check +here is that this host's llms.txt points *back* at the hub that does. + +Every UA this script sends carries the internal-traffic token (the analytics +point of truth — https://2plot.ai/docs/satellite-analytics, "Internal +traffic"): a battery must never register as a visitor or a "bot" in any +network ledger. Even the deliberately crawler-shaped probe appends the token +— the target still exercises its bot path, but its analytics know the caller +is machinery. + +Exit code: 1 if any check fails, else 0. +""" +from __future__ import annotations + +import argparse +import json +import os +import sys +import time +import urllib.error +import urllib.request + +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + +TIMEOUT = 30 +try: + from lib.constants import INTERNAL_UA as _INTERNAL_UA +except Exception: # running outside a repo checkout — keep the token intact + _INTERNAL_UA = "2plot-internal/1.0 (+https://2plot.ai/docs/satellite-analytics)" +UA = _INTERNAL_UA + " network-smoke" +CRAWLER_UA = "Mozilla/5.0 (compatible; Googlebot/2.1) " + _INTERNAL_UA + +# The body dash-improve-my-llms serves when a page has no prose registered. +# Matched in full, deliberately: this app's own <noscript> block legitimately +# says "requires JavaScript", and a substring check on that phrase reports a +# perfectly healthy host as broken. (It did, the first time this ran.) +STUB_MARKER = "This page contains interactive content that requires JavaScript" + +# ---------------------------------------------------------------- per-site -- +# The three values a fork changes. Everything below this block is the network +# standard and is copied verbatim. + +# This app's one identity (lib/constants.SITE_BRAND). tests/test_site_identity +# asserts every local surface carries it; this pins the DEPLOYED artifact to +# it, which is the half no unit test can reach. +SITE_H1 = "# dash-mui-charts — MUI X charts for Dash" + +# The container port. Matches the Dockerfile's EXPOSE and CMD. +DEFAULT_BASE_URL = "http://localhost:8550" + +# A page with registered LLMS_DOC prose, used by the per-page document checks +# below. /sparkline is a Community page, so it renders identically with and +# without a MUI Pro key — the checks mean the same thing in secretless CI and +# against production. +PROSE_DOC_PATH = "/sparkline/llms.txt" + +# Owner-only surfaces that must 404 their llms.txt to an anonymous reader. +# This app ships no hidden pages, so the list is a canary rather than a +# census: `/admin` is what would be added first, and `mark_hidden("/admin")` +# has to keep working. Add real paths here in the same change that marks +# them hidden. +HIDDEN_DOC_PATHS = ( + "/admin/llms.txt", + "/analytics/llms.txt", +) + +# The hub one level up the chain. A satellite's llms.txt must name it — that +# is what lets an agent walk from any leaf to the network root. +HUB_URL = "https://2plot.dev" + +# --------------------------------------------------------------------------- + +PASS, FAIL, WARN, SKIP = "pass", "FAIL", "warn", "skip" +_RESULTS: list[tuple[str, str, str]] = [] # (name, verdict, detail) + + +class SmokeFailure(Exception): + pass + + +def fetch(url: str, ua: str = UA, method: str = "GET", + body: bytes | None = None, headers: dict | None = None, + timeout: int = TIMEOUT, retries: int = 3): + """(status, headers, text) — HTTP errors are results, not exceptions; + network errors raise AFTER retries. + + Response headers come back lower-cased: gunicorn sends `content-type`, + proxies often re-case it — callers must not care. (A CI-only failure in + the network root's battery was exactly that difference.) + """ + last_exc: Exception | None = None + for attempt in range(retries): + if attempt: + time.sleep(2 * attempt) + req = urllib.request.Request(url, data=body, method=method) + req.add_header("User-Agent", ua) + for k, v in (headers or {}).items(): + req.add_header(k, v) + try: + with urllib.request.urlopen(req, timeout=timeout) as r: + return (r.status, {k.lower(): v for k, v in r.headers.items()}, + r.read().decode("utf-8", "replace")) + except urllib.error.HTTPError as e: + return (e.code, {k.lower(): v for k, v in e.headers.items()}, + e.read().decode("utf-8", "replace")) + except Exception as exc: # timeout, reset, truncated read, … + last_exc = exc + raise last_exc + + +def record(name: str, verdict: str, detail: str = "") -> None: + _RESULTS.append((name, verdict, detail)) + print(f"[{verdict:>4}] {name}" + (f" — {detail}" if detail else ""), flush=True) + if verdict == WARN and os.getenv("GITHUB_ACTIONS"): + print(f"::warning title=network-smoke {name}::{detail}", flush=True) + + +def check(name: str, fn) -> None: + try: + fn() + record(name, PASS) + except SmokeFailure as exc: + record(name, FAIL, str(exc)) + except Exception as exc: # network/parse error → still a failure + record(name, FAIL, f"{type(exc).__name__}: {exc}") + + +def expect(cond: bool, msg: str) -> None: + if not cond: + raise SmokeFailure(msg) + + +# ------------------------------------------------------------- the battery -- + +def satellite_checks(base: str) -> None: + get = lambda path, **kw: fetch(base + path, **kw) # noqa: E731 + + def healthz_ok(): + status, _, text = get("/healthz") + expect(status == 200, f"/healthz {status}") + expect(json.loads(text).get("ok") is True, f"unexpected body {text[:120]!r}") + + def llms_txt_identity(): + # The check this whole standard exists for. The H1 is what an agent + # fetching /llms.txt cold reads as the name of this site, and a + # pre-2.3.4 artifact publishes `app.title` (or a bare "Dash") there + # with nothing else looking wrong. + status, headers, text = get("/llms.txt") + expect(status == 200, f"/llms.txt {status}") + ct = headers.get("content-type", "") + expect(ct.startswith("text/markdown"), f"content-type {ct!r}") + first = text.splitlines()[0] if text else "" + expect(first == SITE_H1, f"H1 {first!r} — identity regression?") + expect("## Pages" in text, "page index section missing") + expect("## Network" in text, "cross-host directory missing") + + def llms_txt_names_the_hub(): + _status, _, text = get("/llms.txt") + expect(HUB_URL in text, f"the directory does not name {HUB_URL}") + + def page_llms_nav(): + status, _, text = get(PROSE_DOC_PATH) + expect(status == 200, f"{PROSE_DOC_PATH} {status}") + expect("/llms.txt" in text, "llms_nav header missing — page doc is a dead end") + + def hidden_pages_404(): + for path in HIDDEN_DOC_PATHS: + status, _, _ = get(path) + expect(status == 404, f"{path} {status} (owner surface leaked)") + + def robots_artifact_fingerprint(): + # pip metadata is invisible from outside, so the robots.txt crawler + # split is how a live host is proven to run the intended package: + # 2.3.2 allowed OAI-SearchBot; 2.3.3 moved ClaudeBot (the training + # crawler) to Disallow while allowing Claude-User / Claude-SearchBot. + status, _, text = get("/robots.txt") + expect(status == 200, f"/robots.txt {status}") + lines = [ln.strip() for ln in text.splitlines()] + + def rule(agent): + marker = f"User-agent: {agent}" + expect(marker in lines, f"{marker} stanza missing") + return lines[lines.index(marker) + 1] + + for agent, expected, since in ( + ("OAI-SearchBot", "Allow: /", "2.3.2"), + ("ClaudeBot", "Disallow: /", "2.3.3"), + ("Claude-User", "Allow: /", "2.3.3"), + ("Claude-SearchBot", "Allow: /", "2.3.3"), + ): + got = rule(agent) + expect(got == expected, + f"{agent} -> {got!r}, expected {expected!r}: pre-{since} artifact") + expect(any(ln.startswith("Sitemap:") for ln in lines), "Sitemap line missing") + + def sitemap_absolute_and_on_this_host(): + status, _, text = get("/sitemap.xml") + expect(status == 200, f"/sitemap.xml {status}") + expect("<loc>https://" in text or "<loc>http://" in text, + "no absolute <loc> URLs") + for path in HIDDEN_DOC_PATHS: + leaked = path.rsplit("/llms.txt", 1)[0] + expect(leaked not in text, f"hidden path {leaked} leaked into sitemap") + + def crawler_gets_prose(): + # The prerender. A crawler that receives the JavaScript stub indexes + # nothing, and the page looks perfect in a browser the whole time. + status, _, text = get("/", ua=CRAWLER_UA) + expect(status == 200, f"/ {status}") + expect("<title>" in text, "crawler HTML has no <title>") + expect(STUB_MARKER not in text, + "the home page served the JavaScript stub to a crawler") + expect('rel="canonical"' in text, "no canonical tag for a crawler") + + def agents_and_browsers_get_different_types(): + # One URL, two audiences, and a `Vary` that stops a CDN mixing them. + status, md_headers, md = get(PROSE_DOC_PATH) + expect(status == 200, f"{PROSE_DOC_PATH} {status}") + expect(md_headers.get("content-type", "").startswith("text/markdown"), + f"agents got {md_headers.get('content-type')!r}") + expect("<!DOCTYPE html>" not in md, "viewer chrome reached an agent") + + _status, html_headers, html = get( + PROSE_DOC_PATH, + headers={"Accept": "text/html,application/xhtml+xml,*/*;q=0.8"}) + expect("text/html" in html_headers.get("content-type", ""), + f"browsers got {html_headers.get('content-type')!r}") + expect("mk-wordmark" in html, "the network wordmark is missing") + + for label, headers in (("markdown", md_headers), ("html", html_headers)): + expect("accept" in headers.get("vary", "").lower(), + f"no Vary: Accept on the {label} variant — a shared cache " + "may serve it to everyone") + + for name, fn in ( + ("healthz_ok", healthz_ok), + ("llms_txt_identity", llms_txt_identity), + ("llms_txt_names_the_hub", llms_txt_names_the_hub), + ("page_llms_nav", page_llms_nav), + ("hidden_pages_404", hidden_pages_404), + ("robots_artifact_fingerprint", robots_artifact_fingerprint), + ("sitemap_absolute_and_on_this_host", sitemap_absolute_and_on_this_host), + ("crawler_gets_prose", crawler_gets_prose), + ("agents_and_browsers_get_different_types", + agents_and_browsers_get_different_types), + ): + check(name, fn) + + +# ------------------------------------------------------------------- main -- + +def main() -> int: + ap = argparse.ArgumentParser(description=__doc__.splitlines()[0]) + ap.add_argument("--base-url", default=DEFAULT_BASE_URL, + help="the satellite under test (default: the CI container)") + args = ap.parse_args() + + base = args.base_url.rstrip("/") + print(f"network-smoke → {base}\n") + satellite_checks(base) + + counts = {v: sum(1 for _, verdict, _ in _RESULTS if verdict == v) + for v in (PASS, FAIL, WARN, SKIP)} + print(f"\n{counts[PASS]} passed, {counts[FAIL]} failed, " + f"{counts[WARN]} warnings, {counts[SKIP]} skipped") + return 1 if counts[FAIL] else 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/route_parity.py b/scripts/route_parity.py new file mode 100644 index 0000000..b894954 --- /dev/null +++ b/scripts/route_parity.py @@ -0,0 +1,319 @@ +"""Route-parity gate — proof that a migration phase changed no page. + +Two modes, two eras of this repo's migrations: + +EXACT mode (default) — the network-standard pass: identity, analytics, CI +and deploy plumbing may change, but every route must render exactly as +before. Fingerprints each route's fully-constructed layout tree plus the +app shell, and compares against a committed baseline. + + python scripts/route_parity.py --write-baseline # record current truth + python scripts/route_parity.py # gate: green or exit 1 + +CHARTS-ONLY mode — the boilerplate migration: the shell and page wrapping +change deliberately (markdown-driven pages, new appshell), but the LIVE +EXAMPLES must survive verbatim. The gate narrows to what re-wrapping cannot +touch: the route set, per-route dash_mui_charts.* component census, the +hand-prefixed chart component ids, and every callback that reads or writes +a chart id. A ported page passes iff its charts, their ids and their +callbacks all still exist. + + python scripts/route_parity.py --charts-only --write-baseline + python scripts/route_parity.py --charts-only + +What a fingerprint is (and deliberately is not): + +- per route: component counts by "namespace.Type", the sorted set of + component ids (all of them in exact mode, charts only in charts mode), + and the count of dash_mui_charts.* instances. Prop VALUES stay out + (pages may generate demo data), and page TITLES / descriptions stay out. +- app-wide: the route set, an HTTP status sweep of every route + /healthz; + exact mode adds the app-shell fingerprint and total callback count, + charts mode adds the chart-touching callback census instead. + +Needs MUI_PRO_API_KEY in the environment or .env (17 pages hard-require it +at import); analytics writes are redirected to a temp dir so a gate run +never lands in the real hit log. +""" +from __future__ import annotations + +import argparse +import json +import os +import sys +import tempfile +from pathlib import Path + +REPO = Path(__file__).resolve().parent.parent +BASELINE = Path(__file__).resolve().parent / "route_parity_baseline.json" +CHART_BASELINE = Path(__file__).resolve().parent / "chart_parity_baseline.json" + +sys.path.insert(0, str(REPO)) + +# Keep gate runs out of the real analytics log, and the reporter asleep. +os.environ["ANALYTICS_DIR"] = tempfile.mkdtemp(prefix="route-parity-") +os.environ.pop("CROSS_APP_WEBHOOK_SECRET", None) + + +def component_iter(node): + """Depth-first over every Dash component reachable from ``node`` — + through children AND through any component-valued prop (dmc uses + label=/leftSection=/etc. freely).""" + from dash.development.base_component import Component + + stack = [node] + while stack: + cur = stack.pop() + if isinstance(cur, Component): + yield cur + for name in cur._prop_names: + val = getattr(cur, name, None) + if val is not None and name != "id": + stack.append(val) + elif isinstance(cur, (list, tuple)): + stack.extend(cur) + elif isinstance(cur, dict): + stack.extend(cur.values()) + + +def fingerprint(layout) -> dict: + counts: dict[str, int] = {} + ids: list[str] = [] + mui_ids: list[str] = [] + mui_mounts = 0 + for comp in component_iter(layout): + key = f"{comp._namespace}.{comp._type}" + counts[key] = counts.get(key, 0) + 1 + cid = getattr(comp, "id", None) + if cid is not None: + cid = (cid if isinstance(cid, str) + else json.dumps(cid, sort_keys=True)) + ids.append(cid) + if comp._namespace == "dash_mui_charts": + mui_mounts += 1 + if cid is not None: + mui_ids.append(cid) + return { + "components": dict(sorted(counts.items())), + "ids": sorted(ids), + "mui_ids": sorted(mui_ids), + "mui_mounts": mui_mounts, + } + + +def _import_site(): + """The docs app, whichever entry point this era of the repo uses. + + The boilerplate migration renames app.py -> run.py; baselines recorded + from one must stay comparable against the other. + """ + if (REPO / "run.py").exists(): + import run as site + else: + import app as site + return site + + +def _callback_ids(spec) -> set: + """Every component id referenced by one callback_map entry.""" + ids = set() + for dep_list in (spec.get("inputs") or [], spec.get("state") or []): + for dep in dep_list: + cid = dep.get("id") + ids.add(cid if isinstance(cid, str) + else json.dumps(cid, sort_keys=True)) + return ids + + +def chart_callbacks(site, all_chart_ids: set) -> list[dict]: + """Census of callbacks that read or write any chart id. + + The output key encodes the outputs ("id.prop" forms); inputs/state come + from the spec. Shell callbacks come and go with a shell; these must not. + """ + census = [] + for out_key, spec in site.app.callback_map.items(): + refs = {cid for cid in _callback_ids(spec) + if cid in all_chart_ids} + refs |= {cid for cid in all_chart_ids if f"{cid}." in out_key} + if refs: + census.append({"output": out_key, "chart_refs": sorted(refs)}) + return sorted(census, key=lambda c: c["output"]) + + +def measure() -> dict: + import dash + + site = _import_site() # imports all pages, builds the shell + + routes = {} + for entry in dash.page_registry.values(): + layout = entry.get("layout") + if layout is None: + layout = getattr(sys.modules[entry["module"]], "layout", None) + if callable(layout): + layout = layout() + routes[entry["path"]] = fingerprint(layout) + + client = site.server.test_client() + statuses = {} + for path in routes: + statuses[path] = client.get(path).status_code + hz = client.get("/healthz") + plumbing = { + "/healthz": [hz.status_code, bool((hz.get_json() or {}).get("ok"))], + "/_dash-layout": client.get("/_dash-layout").status_code, + "/_dash-dependencies": client.get("/_dash-dependencies").status_code, + } + + all_chart_ids = {cid for r in routes.values() for cid in r["mui_ids"]} + + return { + "routes": routes, + "route_statuses": statuses, + "plumbing": plumbing, + "shell": fingerprint(site.app.layout), + "callback_count": len(site.app.callback_map), + "total_mui_mounts": sum(r["mui_mounts"] for r in routes.values()), + "chart_callbacks": chart_callbacks(site, all_chart_ids), + } + + +def charts_view(measurement: dict) -> dict: + """The migration-proof projection of a measurement: only what page + re-wrapping cannot legitimately change.""" + routes = {} + for path, fp in measurement["routes"].items(): + routes[path] = { + "mui_components": {k: v for k, v in fp["components"].items() + if k.startswith("dash_mui_charts.")}, + "mui_ids": fp["mui_ids"], + "mui_mounts": fp["mui_mounts"], + } + return { + "routes": routes, + "route_statuses": measurement["route_statuses"], + "healthz": measurement["plumbing"]["/healthz"], + "total_mui_mounts": measurement["total_mui_mounts"], + "chart_callbacks": measurement["chart_callbacks"], + } + + +def diff_charts(baseline: dict, current: dict) -> list[str]: + problems = [] + base_routes, cur_routes = baseline["routes"], current["routes"] + for path in sorted(set(base_routes) - set(cur_routes)): + problems.append(f"route GONE: {path}") + for path in sorted(set(cur_routes) - set(base_routes)): + problems.append(f"route ADDED (update baseline deliberately): {path}") + for path in sorted(set(base_routes) & set(cur_routes)): + b, c = base_routes[path], cur_routes[path] + if b["mui_components"] != c["mui_components"]: + problems.append(f"{path}: chart census changed " + f"(was {b['mui_components']} → " + f"now {c['mui_components']})") + if b["mui_ids"] != c["mui_ids"]: + problems.append( + f"{path}: chart ids changed " + f"(-{sorted(set(b['mui_ids']) - set(c['mui_ids']))} " + f"+{sorted(set(c['mui_ids']) - set(b['mui_ids']))})") + bad = {p: s for p, s in current["route_statuses"].items() if s != 200} + if bad: + problems.append(f"routes not serving 200: {bad}") + if current["healthz"] != baseline["healthz"]: + problems.append(f"healthz changed: {baseline['healthz']!r} → " + f"{current['healthz']!r}") + if baseline["total_mui_mounts"] != current["total_mui_mounts"]: + problems.append(f"total chart mounts {baseline['total_mui_mounts']} → " + f"{current['total_mui_mounts']}") + base_cbs = {json.dumps(c, sort_keys=True) + for c in baseline["chart_callbacks"]} + cur_cbs = {json.dumps(c, sort_keys=True) + for c in current["chart_callbacks"]} + for gone in sorted(base_cbs - cur_cbs): + problems.append(f"chart callback GONE: {gone}") + for new in sorted(cur_cbs - base_cbs): + problems.append(f"chart callback ADDED (update baseline " + f"deliberately): {new}") + return problems + + +def diff(baseline: dict, current: dict) -> list[str]: + problems = [] + base_routes, cur_routes = baseline["routes"], current["routes"] + for path in sorted(set(base_routes) - set(cur_routes)): + problems.append(f"route GONE: {path}") + for path in sorted(set(cur_routes) - set(base_routes)): + problems.append(f"route ADDED (update baseline deliberately): {path}") + for path in sorted(set(base_routes) & set(cur_routes)): + b, c = base_routes[path], cur_routes[path] + if b["components"] != c["components"]: + gone = {k: v for k, v in b["components"].items() + if c["components"].get(k) != v} + new = {k: v for k, v in c["components"].items() + if b["components"].get(k) != v} + problems.append(f"{path}: component tree changed " + f"(was {gone} → now {new})") + if b["ids"] != c["ids"]: + problems.append( + f"{path}: ids changed " + f"(-{sorted(set(b['ids']) - set(c['ids']))} " + f"+{sorted(set(c['ids']) - set(b['ids']))})") + if b["mui_mounts"] != c["mui_mounts"]: + problems.append(f"{path}: mui mounts {b['mui_mounts']} → " + f"{c['mui_mounts']}") + for surface in ("route_statuses", "plumbing", "shell", "callback_count", + "total_mui_mounts"): + if baseline[surface] != current[surface]: + problems.append(f"{surface} changed: {baseline[surface]!r} → " + f"{current[surface]!r}") + return problems + + +def main() -> int: + ap = argparse.ArgumentParser(description=__doc__.splitlines()[0]) + ap.add_argument("--write-baseline", action="store_true", + help="record the current state as the committed truth") + ap.add_argument("--charts-only", action="store_true", + help="gate only the live examples (boilerplate migration " + "mode): chart census, chart ids, chart callbacks") + args = ap.parse_args() + + current = measure() + n = len(current["routes"]) + print(f"measured {n} routes, {current['total_mui_mounts']} " + f"dash_mui_charts mounts, {current['callback_count']} callbacks, " + f"{len(current['chart_callbacks'])} chart-touching callbacks") + + baseline_path = CHART_BASELINE if args.charts_only else BASELINE + payload = charts_view(current) if args.charts_only else current + + if args.write_baseline: + baseline_path.write_text( + json.dumps(payload, indent=1, sort_keys=True) + "\n", + encoding="utf-8") + print(f"baseline written → {baseline_path.relative_to(REPO)}") + return 0 + + if not baseline_path.exists(): + print("no baseline — run with --write-baseline first", file=sys.stderr) + return 2 + baseline = json.loads(baseline_path.read_text(encoding="utf-8")) + if args.charts_only: + problems = diff_charts(baseline, payload) + label = "CHART PARITY" + else: + problems = diff(baseline, payload) + label = "ROUTE PARITY" + if problems: + print(f"\n{label} BROKEN — {len(problems)} problem(s):", + file=sys.stderr) + for p in problems: + print(f" ✗ {p}", file=sys.stderr) + return 1 + print(f"{label.lower()} GREEN — all {n} routes identical to baseline") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/route_parity_baseline.json b/scripts/route_parity_baseline.json new file mode 100644 index 0000000..85fbcfb --- /dev/null +++ b/scripts/route_parity_baseline.json @@ -0,0 +1,3098 @@ +{ + "callback_count": 117, + "chart_callbacks": [ + { + "chart_refs": [ + "controlled-zoom-chart" + ], + "output": "..controlled-zoom-chart.zoom...controlled-zoom-output.children.." + }, + { + "chart_refs": [ + "lab-color-clock" + ], + "output": "..lab-color-clock.sx...lab-color-face.value...lab-color-hand.value...lab-color-num.value.." + }, + { + "chart_refs": [ + "lab-dtp-clock" + ], + "output": "..lab-dtp-clock.value...lab-dtp.value...lab-dtp-out.children.." + }, + { + "chart_refs": [ + "lab-sw-clock" + ], + "output": "..lab-sw-store.data...lab-sw-interval.disabled...lab-sw-clock.value...lab-sw-clock.view...lab-sw-readout.children...lab-sw-unit.children...lab-sw-unit.color.." + }, + { + "chart_refs": [ + "lab-tg-clock" + ], + "output": "..lab-tg-clock.value...lab-tg.value...lab-tg-out.children.." + }, + { + "chart_refs": [ + "lab-ti-clock" + ], + "output": "..lab-ti-clock.value...lab-ti-input.value...lab-ti-out.children.." + }, + { + "chart_refs": [ + "lab-tp-clock" + ], + "output": "..lab-tp-clock.value...lab-tp-input.value...lab-tp-out.children.." + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "..lt-alert-count.children...lt-alert-log.children.." + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "..lt-price-display.children...lt-price-display.style...lt-tick-display.children...lt-status.children...lt-status.style.." + }, + { + "chart_refs": [ + "npm-sparkline" + ], + "output": "..npm-download-count.children...npm-week-label.children.." + }, + { + "chart_refs": [ + "sec2-chart" + ], + "output": "..sec2-chart.referenceLines...sec2-tags.children...sec2-count.children...sec2-alert-status.children.." + }, + { + "chart_refs": [ + "sec3-humidity", + "sec3-pressure", + "sec3-temp" + ], + "output": "..sec3-temp.highlightedAxis...sec3-pressure.highlightedAxis...sec3-humidity.highlightedAxis...sec3-temp.syncedTooltipIndex...sec3-pressure.syncedTooltipIndex...sec3-humidity.syncedTooltipIndex...sec3-coord.children.." + }, + { + "chart_refs": [ + "sec3-humidity", + "sec3-pressure", + "sec3-temp" + ], + "output": "..sec3-temp.referenceLines...sec3-pressure.referenceLines...sec3-humidity.referenceLines...sec3-tags-temp.children...sec3-tags-pressure.children...sec3-tags-humidity.children...sec3-count.children.." + }, + { + "chart_refs": [ + "glass-sparkline" + ], + "output": "..sparkline-container.style...sparkline-container.className...hover-value-display.children...hover-index-display.children...change-display.children...change-display.className...hover-instruction.className.." + }, + { + "chart_refs": [ + "interactive-stock-sparkline" + ], + "output": "..stock-price-display.children...stock-hover-output.children.." + }, + { + "chart_refs": [ + "sync-line-a", + "sync-line-b" + ], + "output": "..sync-line-a.highlightedItem...sync-line-b.highlightedItem...custom-tooltip-a.style...custom-tooltip-a.children...custom-tooltip-b.style...custom-tooltip-b.children...sync-axis-output.children...profit-display.children.." + }, + { + "chart_refs": [ + "sync-line-chart", + "sync-pie-chart" + ], + "output": "..sync-line-chart.highlightedItem...sync-pie-chart.highlightedItem...sync-highlight-output.children.." + }, + { + "chart_refs": [ + "sync-revenue-spark", + "sync-sessions-spark", + "sync-users-spark" + ], + "output": "..sync-revenue-value.children...sync-revenue-label.children...sync-users-value.children...sync-users-label.children...sync-sessions-value.children...sync-sessions-label.children.." + }, + { + "chart_refs": [ + "tree-exp-controlled" + ], + "output": "..tree-exp-controlled.expandedItems...tree-exp-controlled-out.children.." + }, + { + "chart_refs": [ + "tree-pro-combo" + ], + "output": "..tree-pro-combo-action-log.children...tps-last-kebab.data.." + }, + { + "chart_refs": [ + "tree-pro-combo" + ], + "output": "..tree-pro-combo-edit.children...tps-label-overrides.data.." + }, + { + "chart_refs": [ + "tree-pro-combo" + ], + "output": "..tree-pro-combo-sliders.children...tps-last-slider.data.." + }, + { + "chart_refs": [ + "tree-sel-controlled" + ], + "output": "..tree-sel-controlled.selectedItems...tree-sel-controlled-out.children.." + }, + { + "chart_refs": [ + "v120-stack-humidity", + "v120-stack-pressure", + "v120-stack-temp" + ], + "output": "..v120-stack-temp.highlightedAxis...v120-stack-humidity.highlightedAxis...v120-stack-pressure.highlightedAxis...v120-stack-temp.syncedTooltipIndex...v120-stack-humidity.syncedTooltipIndex...v120-stack-pressure.syncedTooltipIndex.." + }, + { + "chart_refs": [ + "v120-stack-humidity", + "v120-stack-pressure", + "v120-stack-temp" + ], + "output": "..v120-stack-temp.xAxis...v120-stack-humidity.xAxis...v120-stack-pressure.xAxis...v120-stack-temp.margin...v120-stack-humidity.margin...v120-stack-pressure.margin...v120-stack-temp.height...v120-stack-humidity.height...v120-stack-pressure.height.." + }, + { + "chart_refs": [ + "v120-sync-humidity", + "v120-sync-temp" + ], + "output": "..v120-sync-temp.highlightedAxis...v120-sync-humidity.highlightedAxis...v120-sync-temp.syncedTooltipIndex...v120-sync-humidity.syncedTooltipIndex...v120-sync-output.children.." + }, + { + "chart_refs": [ + "axis-highlight-chart" + ], + "output": "axis-highlight-chart.highlightedAxis" + }, + { + "chart_refs": [ + "axis-highlight-chart" + ], + "output": "axis-highlight-output.children" + }, + { + "chart_refs": [ + "bar-int-axis-click" + ], + "output": "bar-int-axis-click-out.children" + }, + { + "chart_refs": [ + "bar-int-click" + ], + "output": "bar-int-click-out.children" + }, + { + "chart_refs": [ + "bar-int-highlight" + ], + "output": "bar-int-highlight-out.children" + }, + { + "chart_refs": [ + "brush-toggle-chart" + ], + "output": "brush-toggle-chart.brushOverlay" + }, + { + "chart_refs": [ + "candle-click" + ], + "output": "candle-click-out.children" + }, + { + "chart_refs": [ + "interactive-linechart" + ], + "output": "click-output.children" + }, + { + "chart_refs": [ + "composite-zoom" + ], + "output": "composite-zoom-output.children" + }, + { + "chart_refs": [ + "composite-zoom" + ], + "output": "composite-zoom.series" + }, + { + "chart_refs": [ + "cross-basic" + ], + "output": "cross-coord-display.children" + }, + { + "chart_refs": [ + "dynamic-ref-chart" + ], + "output": "dynamic-ref-chart.referenceLines" + }, + { + "chart_refs": [ + "interactive-heatmap" + ], + "output": "heatmap-click-output.children" + }, + { + "chart_refs": [ + "item-highlight-chart" + ], + "output": "item-highlight-chart.highlightedItem" + }, + { + "chart_refs": [ + "item-highlight-chart" + ], + "output": "item-highlight-output.children" + }, + { + "chart_refs": [ + "lab-glass-clock" + ], + "output": "lab-glass-readout.children" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.drift" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.intervalMs" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.resetTrigger" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.running" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.showLabels" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.showSlider" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.showVolume" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.volatility" + }, + { + "chart_refs": [ + "lt-chart" + ], + "output": "lt-chart.windowSize" + }, + { + "chart_refs": [ + "interactive-pie" + ], + "output": "pie-click-data.children" + }, + { + "chart_refs": [ + "interactive-pie" + ], + "output": "pie-highlight-data.children" + }, + { + "chart_refs": [ + "scatter-click" + ], + "output": "scatter-click-output.children" + }, + { + "chart_refs": [ + "sec2-chart" + ], + "output": "sec2-store.data" + }, + { + "chart_refs": [ + "sec3-humidity", + "sec3-pressure", + "sec3-temp" + ], + "output": "sec3-store.data" + }, + { + "chart_refs": [ + "tc-controlled" + ], + "output": "tc-controlled-out.children" + }, + { + "chart_refs": [ + "tc-controlled" + ], + "output": "tc-controlled.value" + }, + { + "chart_refs": [ + "tc-views-hms" + ], + "output": "tc-views-out.children" + }, + { + "chart_refs": [ + "tick-hover-interactive" + ], + "output": "tick-hover-click-output.children" + }, + { + "chart_refs": [ + "tree-basic-clicks" + ], + "output": "tree-basic-click-out.children" + }, + { + "chart_refs": [ + "tree-basic-focus" + ], + "output": "tree-basic-focus-out.children" + }, + { + "chart_refs": [ + "tree-dis-checkbox" + ], + "output": "tree-dis-checkbox-out.children" + }, + { + "chart_refs": [ + "tree-edit-all" + ], + "output": "tree-edit-all-out.children" + }, + { + "chart_refs": [ + "tree-edit-log" + ], + "output": "tree-edit-log-out.children" + }, + { + "chart_refs": [ + "tree-edit-specific" + ], + "output": "tree-edit-specific-out.children" + }, + { + "chart_refs": [ + "tree-exp-track" + ], + "output": "tree-exp-track-out.children" + }, + { + "chart_refs": [ + "tree-pro-combo" + ], + "output": "tree-pro-combo-sel.children" + }, + { + "chart_refs": [ + "tree-pro-reorder" + ], + "output": "tree-pro-reorder-out.children" + }, + { + "chart_refs": [ + "tree-sel-checkbox" + ], + "output": "tree-sel-checkbox-out.children" + }, + { + "chart_refs": [ + "tree-sel-multi" + ], + "output": "tree-sel-multi-out.children" + }, + { + "chart_refs": [ + "tree-sel-propagation" + ], + "output": "tree-sel-propagation-out.children" + }, + { + "chart_refs": [ + "tree-sel-single" + ], + "output": "tree-sel-single-out.children" + }, + { + "chart_refs": [ + "tree-simple-checkbox" + ], + "output": "tree-simple-checkbox-out.children" + }, + { + "chart_refs": [ + "tree-simple-select" + ], + "output": "tree-simple-select-out.children" + }, + { + "chart_refs": [ + "tree-simple-sidebar-demo" + ], + "output": "url.href@84a073d34077b424ad8b29fb2d77b7beba89e2ae5728c1701b364d8a66debb52" + }, + { + "chart_refs": [ + "v120-highlighted-axis" + ], + "output": "v120-axis-output.children" + }, + { + "chart_refs": [ + "zoom-preview-chart" + ], + "output": "zoom-preview-output.children" + }, + { + "chart_refs": [ + "zoom-slider-chart" + ], + "output": "zoom-slider-output.children" + } + ], + "plumbing": { + "/_dash-dependencies": 200, + "/_dash-layout": 200, + "/healthz": [ + 200, + true + ] + }, + "route_statuses": { + "/": 200, + "/api": 200, + "/barchart-basic": 200, + "/barchart-dataset": 200, + "/barchart-interaction": 200, + "/barchart-pro": 200, + "/barchart-reference": 200, + "/barchart-stacking": 200, + "/candlestick": 200, + "/changelog": 200, + "/composite": 200, + "/composite-render-bp": 200, + "/composite-v120": 200, + "/crosshair": 200, + "/heatmap": 200, + "/heatmap-props": 200, + "/highlighting-sync": 200, + "/linechart-basic": 200, + "/linechart-brush": 200, + "/linechart-highlighting": 200, + "/linechart-pro": 200, + "/linechart-referencelines": 200, + "/linechart-tick-hover": 200, + "/linechart-zoom-preview": 200, + "/live-trading": 200, + "/pie": 200, + "/pie-props": 200, + "/scatter": 200, + "/sparkline": 200, + "/sparkline-style": 200, + "/sparkline-style-advanced": 200, + "/time-clock": 200, + "/time-clock-lab": 200, + "/tree-basic": 200, + "/tree-disabled": 200, + "/tree-editing": 200, + "/tree-expansion": 200, + "/tree-icons": 200, + "/tree-pro": 200, + "/tree-selection": 200, + "/tree-simple": 200 + }, + "routes": { + "/": { + "components": { + "dash_core_components.Link": 9, + "dash_html_components.Div": 1, + "dash_mantine_components.Badge": 43, + "dash_mantine_components.CodeHighlight": 4, + "dash_mantine_components.Group": 19, + "dash_mantine_components.Paper": 12, + "dash_mantine_components.SimpleGrid": 2, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 21, + "dash_mantine_components.Title": 8 + }, + "ids": [], + "mui_ids": [], + "mui_mounts": 0 + }, + "/api": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 15, + "dash_html_components.Div": 2, + "dash_html_components.Img": 1, + "dash_iconify.DashIconify": 2, + "dash_mantine_components.Anchor": 13, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 1, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 9, + "dash_mantine_components.Divider": 14, + "dash_mantine_components.Group": 1, + "dash_mantine_components.Paper": 1, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Table": 13, + "dash_mantine_components.TableTbody": 13, + "dash_mantine_components.TableTd": 1113, + "dash_mantine_components.TableTh": 39, + "dash_mantine_components.TableThead": 13, + "dash_mantine_components.TableTr": 384, + "dash_mantine_components.Text": 32, + "dash_mantine_components.Title": 15, + "dash_mantine_components.Tooltip": 1 + }, + "ids": [ + "barchart", + "candlestickchart", + "compositechart", + "heatmap", + "linechart", + "livetradingchart", + "llm-copy-button-api-reference", + "m2d-page-api", + "overview", + "piechart", + "scatterchart", + "simpletreeview", + "sparklinechart", + "timeclock", + "treeview", + "treeviewpro", + "{\"page\": \"/api\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/api\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/api\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/api\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [], + "mui_mounts": 0 + }, + "/barchart-basic": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 9, + "dash_html_components.Div": 2, + "dash_html_components.Img": 1, + "dash_iconify.DashIconify": 8, + "dash_mantine_components.Anchor": 5, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 7, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 12, + "dash_mantine_components.CodeHighlight": 1, + "dash_mantine_components.CodeHighlightTabs": 6, + "dash_mantine_components.Divider": 8, + "dash_mantine_components.Group": 1, + "dash_mantine_components.List": 1, + "dash_mantine_components.ListItem": 1, + "dash_mantine_components.Paper": 7, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 19, + "dash_mantine_components.Title": 9, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.BarChart": 6 + }, + "ids": [ + "bar-basic-horizontal", + "bar-basic-labels", + "bar-basic-multi", + "bar-basic-negative", + "bar-basic-rounded", + "bar-basic-stacked", + "bar-labels", + "horizontal-bar-chart", + "llm-copy-button-bar-chart---basic", + "m2d-page-barchart-basic", + "multi-series-vertical", + "negative-values", + "overview", + "related-pages", + "rounded-bars-with-custom-colors", + "stacked-bar-chart", + "{\"page\": \"/barchart-basic\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/barchart-basic\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/barchart-basic\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/barchart-basic\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "bar-basic-horizontal", + "bar-basic-labels", + "bar-basic-multi", + "bar-basic-negative", + "bar-basic-rounded", + "bar-basic-stacked" + ], + "mui_mounts": 6 + }, + "/barchart-dataset": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 6, + "dash_html_components.Div": 2, + "dash_html_components.Img": 1, + "dash_iconify.DashIconify": 5, + "dash_mantine_components.Anchor": 5, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 4, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 6, + "dash_mantine_components.CodeHighlight": 1, + "dash_mantine_components.CodeHighlightTabs": 3, + "dash_mantine_components.Divider": 5, + "dash_mantine_components.Group": 1, + "dash_mantine_components.List": 1, + "dash_mantine_components.ListItem": 1, + "dash_mantine_components.Paper": 4, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 12, + "dash_mantine_components.Title": 6, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.BarChart": 3 + }, + "ids": [ + "bar-ds-gaps", + "bar-ds-stacked", + "bar-ds-temps", + "bar-gap-&-category-gap", + "city-temperatures-(dataset-mode)", + "llm-copy-button-bar-chart---dataset", + "m2d-page-barchart-dataset", + "overview", + "related-pages", + "stacked-quarterly-sales", + "{\"page\": \"/barchart-dataset\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/barchart-dataset\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/barchart-dataset\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/barchart-dataset\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "bar-ds-gaps", + "bar-ds-stacked", + "bar-ds-temps" + ], + "mui_mounts": 3 + }, + "/barchart-interaction": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 8, + "dash_html_components.Div": 12, + "dash_html_components.Img": 1, + "dash_html_components.P": 8, + "dash_html_components.Pre": 3, + "dash_iconify.DashIconify": 7, + "dash_mantine_components.Anchor": 5, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 6, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 11, + "dash_mantine_components.CodeHighlightTabs": 5, + "dash_mantine_components.Divider": 7, + "dash_mantine_components.Group": 1, + "dash_mantine_components.List": 1, + "dash_mantine_components.ListItem": 1, + "dash_mantine_components.Paper": 6, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 16, + "dash_mantine_components.Title": 8, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.BarChart": 8 + }, + "ids": [ + "axis-click", + "axis-highlight:-band-vs-line-vs-none", + "bar-int-ax-band", + "bar-int-ax-line", + "bar-int-ax-none", + "bar-int-axis-click", + "bar-int-axis-click-out", + "bar-int-click", + "bar-int-click-out", + "bar-int-highlight", + "bar-int-highlight-out", + "bar-int-tt-axis", + "bar-int-tt-item", + "click-events", + "llm-copy-button-bar-chart---interaction", + "m2d-page-barchart-interaction", + "overview", + "related-pages", + "series-highlighting", + "tooltip-triggers", + "{\"page\": \"/barchart-interaction\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/barchart-interaction\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/barchart-interaction\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/barchart-interaction\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "bar-int-ax-band", + "bar-int-ax-line", + "bar-int-ax-none", + "bar-int-axis-click", + "bar-int-click", + "bar-int-highlight", + "bar-int-tt-axis", + "bar-int-tt-item" + ], + "mui_mounts": 8 + }, + "/barchart-pro": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 6, + "dash_html_components.Div": 3, + "dash_html_components.Img": 1, + "dash_html_components.P": 1, + "dash_iconify.DashIconify": 6, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.Anchor": 5, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 4, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 2, + "dash_mantine_components.CodeHighlight": 1, + "dash_mantine_components.CodeHighlightTabs": 3, + "dash_mantine_components.Divider": 5, + "dash_mantine_components.Group": 1, + "dash_mantine_components.List": 1, + "dash_mantine_components.ListItem": 1, + "dash_mantine_components.Paper": 4, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 12, + "dash_mantine_components.Title": 6, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.BarChart": 3 + }, + "ids": [ + "bar-pro-slider", + "bar-pro-stacked-zoom", + "bar-pro-toolbar", + "llm-copy-button-bar-chart---pro", + "m2d-page-barchart-pro", + "overview", + "related-pages", + "stacked-with-zoom", + "zoom-+-toolbar", + "zoom-with-slider", + "{\"page\": \"/barchart-pro\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/barchart-pro\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/barchart-pro\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/barchart-pro\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "bar-pro-slider", + "bar-pro-stacked-zoom", + "bar-pro-toolbar" + ], + "mui_mounts": 3 + }, + "/barchart-reference": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 9, + "dash_html_components.Div": 2, + "dash_html_components.Img": 1, + "dash_iconify.DashIconify": 8, + "dash_mantine_components.Anchor": 5, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 7, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 13, + "dash_mantine_components.CodeHighlightTabs": 6, + "dash_mantine_components.Divider": 8, + "dash_mantine_components.Group": 1, + "dash_mantine_components.List": 1, + "dash_mantine_components.ListItem": 1, + "dash_mantine_components.Paper": 7, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 18, + "dash_mantine_components.Title": 9, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.BarChart": 6 + }, + "ids": [ + "bar-ref-colors", + "bar-ref-multi", + "bar-ref-noanim", + "bar-ref-nolegend", + "bar-ref-target", + "bar-ref-vertical", + "custom-color-palette", + "hidden-legend", + "llm-copy-button-bar-chart---reference-lines", + "m2d-page-barchart-reference", + "multiple-reference-lines", + "overview", + "related-pages", + "skip-animation", + "target-line", + "vertical-reference-line", + "{\"page\": \"/barchart-reference\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/barchart-reference\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/barchart-reference\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/barchart-reference\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "bar-ref-colors", + "bar-ref-multi", + "bar-ref-noanim", + "bar-ref-nolegend", + "bar-ref-target", + "bar-ref-vertical" + ], + "mui_mounts": 6 + }, + "/barchart-stacking": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 8, + "dash_html_components.Div": 2, + "dash_html_components.Img": 1, + "dash_iconify.DashIconify": 7, + "dash_mantine_components.Anchor": 5, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 6, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 6, + "dash_mantine_components.CodeHighlight": 1, + "dash_mantine_components.CodeHighlightTabs": 5, + "dash_mantine_components.Divider": 7, + "dash_mantine_components.Group": 1, + "dash_mantine_components.List": 1, + "dash_mantine_components.ListItem": 1, + "dash_mantine_components.Paper": 6, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 16, + "dash_mantine_components.Title": 8, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.BarChart": 5 + }, + "ids": [ + "bar-stack-diverging", + "bar-stack-expand", + "bar-stack-groups", + "bar-stack-horizontal", + "bar-stack-normal", + "diverging-stack", + "horizontal-stacked", + "llm-copy-button-bar-chart---stacking", + "m2d-page-barchart-stacking", + "multiple-stack-groups", + "normalized-stack-(offset:-expand)", + "overview", + "related-pages", + "standard-stack-(offset:-none)", + "{\"page\": \"/barchart-stacking\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/barchart-stacking\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/barchart-stacking\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/barchart-stacking\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "bar-stack-diverging", + "bar-stack-expand", + "bar-stack-groups", + "bar-stack-horizontal", + "bar-stack-normal" + ], + "mui_mounts": 5 + }, + "/candlestick": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 10, + "dash_html_components.Div": 3, + "dash_html_components.Img": 1, + "dash_html_components.P": 1, + "dash_html_components.Pre": 1, + "dash_iconify.DashIconify": 9, + "dash_mantine_components.Anchor": 3, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 8, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 21, + "dash_mantine_components.CodeHighlight": 1, + "dash_mantine_components.CodeHighlightTabs": 7, + "dash_mantine_components.Divider": 9, + "dash_mantine_components.Group": 1, + "dash_mantine_components.List": 1, + "dash_mantine_components.ListItem": 2, + "dash_mantine_components.Paper": 8, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 22, + "dash_mantine_components.Title": 10, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.CandlestickChart": 7 + }, + "ids": [ + "basic-candlestick-(array-format)", + "candle-basic", + "candle-click", + "candle-click-out", + "candle-dataset", + "candle-no-tooltip", + "candle-refs", + "candle-styled", + "candle-volume", + "candlestick-+-volume", + "click-events", + "custom-styling", + "dataset-mode", + "llm-copy-button-candlestick-chart", + "m2d-page-candlestick", + "overview", + "related-pages", + "support-&-resistance-lines", + "tooltip-disabled", + "{\"page\": \"/candlestick\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/candlestick\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/candlestick\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/candlestick\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "candle-basic", + "candle-click", + "candle-dataset", + "candle-no-tooltip", + "candle-refs", + "candle-styled", + "candle-volume" + ], + "mui_mounts": 7 + }, + "/changelog": { + "components": { + "dash_core_components.Markdown": 1, + "dash_html_components.Div": 1, + "dash_mantine_components.Paper": 1, + "dash_mantine_components.Text": 1, + "dash_mantine_components.Title": 1 + }, + "ids": [], + "mui_ids": [], + "mui_mounts": 0 + }, + "/composite": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 8, + "dash_html_components.Details": 4, + "dash_html_components.Div": 10, + "dash_html_components.H2": 4, + "dash_html_components.H4": 1, + "dash_html_components.Hr": 3, + "dash_html_components.Img": 1, + "dash_html_components.Label": 2, + "dash_html_components.P": 4, + "dash_html_components.Pre": 1, + "dash_html_components.Span": 1, + "dash_html_components.Summary": 4, + "dash_iconify.DashIconify": 4, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 11, + "dash_mantine_components.CodeHighlight": 8, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.List": 1, + "dash_mantine_components.ListItem": 4, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Slider": 2, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 15, + "dash_mantine_components.Title": 8, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.CompositeChart": 4 + }, + "ids": [ + "anomaly-marker-slider", + "basic-scatter-+-line-overlay", + "composite-multiaxis", + "composite-reference", + "composite-trend", + "composite-zoom", + "composite-zoom-output", + "live-examples", + "llm-copy-button-composite-chart-(0.0.8)", + "m2d-page-composite", + "multi-axis", + "overview", + "preview-marker-slider", + "reference-lines", + "related-pages", + "zoom-with-slider-preview-(pro)", + "{\"page\": \"/composite\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/composite\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/composite\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/composite\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "composite-multiaxis", + "composite-reference", + "composite-trend", + "composite-zoom" + ], + "mui_mounts": 4 + }, + "/composite-render-bp": { + "components": { + "dash_core_components.Store": 2, + "dash_html_components.A": 3, + "dash_html_components.Div": 7, + "dash_html_components.H1": 1, + "dash_html_components.Hr": 1, + "dash_html_components.Img": 2, + "dash_html_components.Li": 4, + "dash_html_components.P": 1, + "dash_html_components.Span": 1, + "dash_html_components.Ul": 1, + "dash_iconify.DashIconify": 4, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 3, + "dash_mantine_components.Button": 1, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.LoadingOverlay": 1, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 2, + "dash_mantine_components.Text": 7, + "dash_mantine_components.Title": 3, + "dash_mantine_components.Tooltip": 1 + }, + "ids": [ + "bp-deferred-content", + "bp-loading-overlay", + "bp-page-loaded", + "live-examples", + "llm-copy-button-composite-render-bp", + "m2d-page-composite-render-bp", + "overview", + "{\"page\": \"/composite-render-bp\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/composite-render-bp\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/composite-render-bp\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/composite-render-bp\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [], + "mui_mounts": 0 + }, + "/composite-v120": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 3, + "dash_html_components.Details": 3, + "dash_html_components.Div": 15, + "dash_html_components.H2": 4, + "dash_html_components.H4": 5, + "dash_html_components.Hr": 3, + "dash_html_components.Img": 1, + "dash_html_components.P": 4, + "dash_html_components.Pre": 2, + "dash_html_components.Summary": 3, + "dash_iconify.DashIconify": 4, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.CodeHighlight": 3, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Switch": 2, + "dash_mantine_components.Text": 6, + "dash_mantine_components.Title": 3, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.CompositeChart": 7 + }, + "ids": [ + "live-examples", + "llm-copy-button-compositechart-v1.2.0", + "m2d-page-composite-v120", + "overview", + "v120-axis-output", + "v120-axis-tooltip", + "v120-compact-switch", + "v120-highlighted-axis", + "v120-stack-container", + "v120-stack-humidity", + "v120-stack-pressure", + "v120-stack-temp", + "v120-sync-humidity", + "v120-sync-output", + "v120-sync-switch", + "v120-sync-temp", + "{\"page\": \"/composite-v120\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/composite-v120\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/composite-v120\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/composite-v120\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "v120-axis-tooltip", + "v120-highlighted-axis", + "v120-stack-humidity", + "v120-stack-pressure", + "v120-stack-temp", + "v120-sync-humidity", + "v120-sync-temp" + ], + "mui_mounts": 7 + }, + "/crosshair": { + "components": { + "dash_core_components.Store": 3, + "dash_html_components.A": 3, + "dash_html_components.Details": 1, + "dash_html_components.Div": 26, + "dash_html_components.H2": 3, + "dash_html_components.Hr": 2, + "dash_html_components.Img": 1, + "dash_html_components.P": 3, + "dash_html_components.Span": 8, + "dash_html_components.Summary": 1, + "dash_iconify.DashIconify": 6, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 3, + "dash_mantine_components.CodeHighlight": 1, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 6, + "dash_mantine_components.Title": 3, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.CompositeChart": 5 + }, + "ids": [ + "cross-basic", + "cross-coord-display", + "live-examples", + "llm-copy-button-crosshair-explorer", + "m2d-page-crosshair", + "overview", + "sec2-alert-status", + "sec2-chart", + "sec2-clear", + "sec2-count", + "sec2-store", + "sec2-tags", + "sec3-clear", + "sec3-coord", + "sec3-count", + "sec3-humidity", + "sec3-pressure", + "sec3-store", + "sec3-tags-humidity", + "sec3-tags-pressure", + "sec3-tags-temp", + "sec3-temp", + "{\"page\": \"/crosshair\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/crosshair\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/crosshair\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/crosshair\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "cross-basic", + "sec2-chart", + "sec3-humidity", + "sec3-pressure", + "sec3-temp" + ], + "mui_mounts": 5 + }, + "/heatmap": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 11, + "dash_html_components.Div": 6, + "dash_html_components.H4": 1, + "dash_html_components.Img": 1, + "dash_html_components.Pre": 1, + "dash_html_components.Span": 5, + "dash_iconify.DashIconify": 10, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.Anchor": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 8, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 9, + "dash_mantine_components.CodeHighlight": 1, + "dash_mantine_components.CodeHighlightTabs": 7, + "dash_mantine_components.Divider": 10, + "dash_mantine_components.Group": 1, + "dash_mantine_components.List": 1, + "dash_mantine_components.ListItem": 1, + "dash_mantine_components.Paper": 8, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Table": 1, + "dash_mantine_components.TableTbody": 1, + "dash_mantine_components.TableTd": 9, + "dash_mantine_components.TableTh": 3, + "dash_mantine_components.TableThead": 1, + "dash_mantine_components.TableTr": 4, + "dash_mantine_components.Text": 23, + "dash_mantine_components.Title": 11, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.Heatmap": 7 + }, + "ids": [ + "basic-heatmap", + "basic-heatmap", + "color-scale-reference", + "correlation-heatmap", + "correlation-matrix", + "custom-cell-configuration", + "custom-cell-heatmap", + "custom-rounded-cells", + "heatmap-click-output", + "interactive-heatmap", + "interactive-heatmap", + "llm-copy-button-heatmap", + "m2d-page-heatmap", + "overview", + "piecewise-color-scale", + "piecewise-heatmap", + "related-pages", + "rounded-heatmap", + "temperature-heatmap", + "temperature-heatmap", + "{\"page\": \"/heatmap\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/heatmap\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/heatmap\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/heatmap\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "basic-heatmap", + "correlation-heatmap", + "custom-cell-heatmap", + "interactive-heatmap", + "piecewise-heatmap", + "rounded-heatmap", + "temperature-heatmap" + ], + "mui_mounts": 7 + }, + "/heatmap-props": { + "components": { + "dash_core_components.Clipboard": 1, + "dash_core_components.Store": 1, + "dash_html_components.A": 4, + "dash_html_components.Div": 7, + "dash_html_components.Img": 1, + "dash_html_components.Pre": 1, + "dash_iconify.DashIconify": 4, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.Anchor": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 2, + "dash_mantine_components.Code": 2, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.ColorInput": 3, + "dash_mantine_components.Divider": 3, + "dash_mantine_components.Group": 3, + "dash_mantine_components.List": 1, + "dash_mantine_components.ListItem": 1, + "dash_mantine_components.NumberInput": 6, + "dash_mantine_components.Paper": 11, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.SegmentedControl": 2, + "dash_mantine_components.SimpleGrid": 3, + "dash_mantine_components.Slider": 5, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 6, + "dash_mantine_components.Switch": 3, + "dash_mantine_components.Text": 23, + "dash_mantine_components.Title": 4, + "dash_mantine_components.Tooltip": 1 + }, + "ids": [ + "ctrl-border-radius", + "ctrl-cell-style", + "ctrl-font-size", + "ctrl-gap", + "ctrl-height", + "ctrl-hide-legend", + "ctrl-highlight", + "ctrl-margin-bottom", + "ctrl-margin-left", + "ctrl-margin-right", + "ctrl-margin-top", + "ctrl-max-color", + "ctrl-max-value", + "ctrl-min-color", + "ctrl-min-value", + "ctrl-scale-type", + "ctrl-show-values", + "ctrl-text-color", + "ctrl-width", + "generated-heatmap-code", + "heatmap-click-info", + "heatmap-hover-info", + "heatmap-preview", + "heatmap-preview-container", + "llm-copy-button-heatmap-props", + "m2d-page-heatmap-props", + "overview", + "playground", + "related-pages", + "reset-heatmap-btn", + "{\"page\": \"/heatmap-props\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/heatmap-props\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/heatmap-props\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/heatmap-props\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [], + "mui_mounts": 0 + }, + "/highlighting-sync": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 3, + "dash_html_components.Details": 2, + "dash_html_components.Div": 23, + "dash_html_components.H2": 3, + "dash_html_components.H4": 10, + "dash_html_components.Hr": 2, + "dash_html_components.Img": 1, + "dash_html_components.P": 6, + "dash_html_components.Pre": 2, + "dash_html_components.Summary": 2, + "dash_iconify.DashIconify": 4, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.CodeHighlight": 2, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 6, + "dash_mantine_components.Title": 3, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.LineChart": 3, + "dash_mui_charts.PieChart": 1 + }, + "ids": [ + "chart-wrapper-a", + "chart-wrapper-b", + "custom-tooltip-a", + "custom-tooltip-b", + "live-examples", + "llm-copy-button-highlighting-sync", + "m2d-page-highlighting-sync", + "overview", + "profit-display", + "sync-axis-output", + "sync-highlight-output", + "sync-line-a", + "sync-line-b", + "sync-line-chart", + "sync-pie-chart", + "{\"page\": \"/highlighting-sync\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/highlighting-sync\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/highlighting-sync\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/highlighting-sync\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "sync-line-a", + "sync-line-b", + "sync-line-chart", + "sync-pie-chart" + ], + "mui_mounts": 4 + }, + "/linechart-basic": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 11, + "dash_html_components.Details": 6, + "dash_html_components.Div": 9, + "dash_html_components.H2": 6, + "dash_html_components.H4": 1, + "dash_html_components.Hr": 5, + "dash_html_components.Img": 1, + "dash_html_components.P": 6, + "dash_html_components.Pre": 1, + "dash_html_components.Summary": 6, + "dash_iconify.DashIconify": 4, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 37, + "dash_mantine_components.CodeHighlight": 11, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.List": 1, + "dash_mantine_components.ListItem": 8, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 21, + "dash_mantine_components.Title": 11, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.LineChart": 6 + }, + "ids": [ + "area-linechart", + "basic-linechart", + "basic-usage", + "biaxial-linechart", + "click-events", + "click-output", + "custom-linechart", + "date-formatting-and-functions-as-props", + "highlighting", + "interactive-linechart", + "live-examples", + "llm-copy-button-linechart-basics", + "m2d-page-linechart-basic", + "overview", + "pro:-zoom-and-brush", + "reference-lines", + "related-pages", + "series-options", + "stacked-area-linechart", + "{\"page\": \"/linechart-basic\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/linechart-basic\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/linechart-basic\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/linechart-basic\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "area-linechart", + "basic-linechart", + "biaxial-linechart", + "custom-linechart", + "interactive-linechart", + "stacked-area-linechart" + ], + "mui_mounts": 6 + }, + "/linechart-brush": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 3, + "dash_html_components.Button": 3, + "dash_html_components.Details": 3, + "dash_html_components.Div": 11, + "dash_html_components.H2": 4, + "dash_html_components.H4": 3, + "dash_html_components.Hr": 3, + "dash_html_components.Img": 1, + "dash_html_components.Label": 1, + "dash_html_components.P": 4, + "dash_html_components.Summary": 3, + "dash_html_components.Table": 3, + "dash_html_components.Tbody": 3, + "dash_html_components.Td": 24, + "dash_html_components.Th": 9, + "dash_html_components.Thead": 3, + "dash_html_components.Tr": 11, + "dash_iconify.DashIconify": 4, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.CodeHighlight": 3, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 6, + "dash_mantine_components.Title": 3, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.LineChart": 3 + }, + "ids": [ + "axis-highlight-chart", + "brush-toggle-chart", + "brush-values-chart", + "live-examples", + "llm-copy-button-linechart-brush", + "m2d-page-linechart-brush", + "overlay-default-btn", + "overlay-none-btn", + "overlay-values-btn", + "overview", + "{\"page\": \"/linechart-brush\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/linechart-brush\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/linechart-brush\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/linechart-brush\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "axis-highlight-chart", + "brush-toggle-chart", + "brush-values-chart" + ], + "mui_mounts": 3 + }, + "/linechart-highlighting": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 3, + "dash_html_components.Button": 6, + "dash_html_components.Div": 9, + "dash_html_components.H4": 4, + "dash_html_components.Img": 1, + "dash_html_components.P": 7, + "dash_html_components.Pre": 2, + "dash_iconify.DashIconify": 4, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.CodeHighlight": 3, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.Paper": 7, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.SimpleGrid": 2, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 23, + "dash_mantine_components.Title": 3, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.LineChart": 3 + }, + "ids": [ + "axis-highlight-chart", + "axis-highlight-output", + "clear-axis-btn", + "clear-highlight-btn", + "highlight-jan-btn", + "highlight-jun-btn", + "highlight-mar-axis-btn", + "highlight-scope-chart", + "highlight-sep-axis-btn", + "item-highlight-chart", + "item-highlight-output", + "live-examples", + "llm-copy-button-linechart-highlighting", + "m2d-page-linechart-highlighting", + "overview", + "{\"page\": \"/linechart-highlighting\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/linechart-highlighting\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/linechart-highlighting\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/linechart-highlighting\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "axis-highlight-chart", + "highlight-scope-chart", + "item-highlight-chart" + ], + "mui_mounts": 3 + }, + "/linechart-pro": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 3, + "dash_html_components.Button": 2, + "dash_html_components.Details": 2, + "dash_html_components.Div": 9, + "dash_html_components.H2": 4, + "dash_html_components.H4": 3, + "dash_html_components.Hr": 3, + "dash_html_components.Img": 1, + "dash_html_components.Li": 3, + "dash_html_components.P": 5, + "dash_html_components.Pre": 2, + "dash_html_components.Strong": 3, + "dash_html_components.Summary": 2, + "dash_html_components.Table": 1, + "dash_html_components.Tbody": 1, + "dash_html_components.Td": 18, + "dash_html_components.Th": 3, + "dash_html_components.Thead": 1, + "dash_html_components.Tr": 7, + "dash_html_components.Ul": 1, + "dash_iconify.DashIconify": 4, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.CodeHighlight": 2, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 6, + "dash_mantine_components.Title": 3, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.LineChart": 4 + }, + "ids": [ + "biaxial-zoom-chart", + "controlled-zoom-chart", + "controlled-zoom-output", + "live-examples", + "llm-copy-button-linechart-pro", + "m2d-page-linechart-pro", + "overview", + "reset-zoom-btn", + "zoom-config-chart", + "zoom-decade-btn", + "zoom-slider-chart", + "zoom-slider-output", + "{\"page\": \"/linechart-pro\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/linechart-pro\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/linechart-pro\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/linechart-pro\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "biaxial-zoom-chart", + "controlled-zoom-chart", + "zoom-config-chart", + "zoom-slider-chart" + ], + "mui_mounts": 4 + }, + "/linechart-referencelines": { + "components": { + "dash_core_components.Input": 1, + "dash_core_components.Store": 1, + "dash_html_components.A": 3, + "dash_html_components.Button": 2, + "dash_html_components.Details": 7, + "dash_html_components.Div": 14, + "dash_html_components.H2": 9, + "dash_html_components.H4": 1, + "dash_html_components.Hr": 8, + "dash_html_components.Img": 1, + "dash_html_components.Label": 1, + "dash_html_components.P": 9, + "dash_html_components.Summary": 7, + "dash_html_components.Table": 2, + "dash_html_components.Tbody": 2, + "dash_html_components.Td": 41, + "dash_html_components.Th": 7, + "dash_html_components.Thead": 2, + "dash_html_components.Tr": 13, + "dash_iconify.DashIconify": 4, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.CodeHighlight": 7, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 6, + "dash_mantine_components.Title": 3, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.LineChart": 8 + }, + "ids": [ + "combined-ref-chart", + "dynamic-ref-chart", + "hide-avg-btn", + "horizontal-ref-chart", + "label-align-chart", + "line-style-chart", + "live-examples", + "llm-copy-button-linechart-reference-lines", + "m2d-page-linechart-referencelines", + "multiaxis-ref-chart", + "overview", + "show-avg-btn", + "spacing-chart", + "threshold-input", + "vertical-ref-chart", + "{\"page\": \"/linechart-referencelines\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/linechart-referencelines\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/linechart-referencelines\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/linechart-referencelines\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "combined-ref-chart", + "dynamic-ref-chart", + "horizontal-ref-chart", + "label-align-chart", + "line-style-chart", + "multiaxis-ref-chart", + "spacing-chart", + "vertical-ref-chart" + ], + "mui_mounts": 8 + }, + "/linechart-tick-hover": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 3, + "dash_html_components.Details": 8, + "dash_html_components.Div": 17, + "dash_html_components.H2": 7, + "dash_html_components.H3": 3, + "dash_html_components.H4": 2, + "dash_html_components.Hr": 6, + "dash_html_components.Img": 1, + "dash_html_components.P": 9, + "dash_html_components.Pre": 1, + "dash_html_components.Summary": 8, + "dash_html_components.Table": 2, + "dash_html_components.Tbody": 2, + "dash_html_components.Td": 55, + "dash_html_components.Th": 5, + "dash_html_components.Thead": 2, + "dash_html_components.Tr": 23, + "dash_iconify.DashIconify": 4, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.CodeHighlight": 8, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 6, + "dash_mantine_components.Title": 3, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.LineChart": 8 + }, + "ids": [ + "live-examples", + "llm-copy-button-linechart-ticks-&-hover", + "m2d-page-linechart-tick-hover", + "overview", + "tick-hover-click-output", + "tick-hover-config", + "tick-hover-interactive", + "tick-hover-quarter", + "tick-hover-week", + "tick-hover-year-linear", + "tick-hover-year-point", + "tick-hover-zoom-pro", + "tick-hover-zoom-slider", + "{\"page\": \"/linechart-tick-hover\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/linechart-tick-hover\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/linechart-tick-hover\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/linechart-tick-hover\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "tick-hover-config", + "tick-hover-interactive", + "tick-hover-quarter", + "tick-hover-week", + "tick-hover-year-linear", + "tick-hover-year-point", + "tick-hover-zoom-pro", + "tick-hover-zoom-slider" + ], + "mui_mounts": 8 + }, + "/linechart-zoom-preview": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 3, + "dash_html_components.Details": 2, + "dash_html_components.Div": 9, + "dash_html_components.H2": 4, + "dash_html_components.H4": 3, + "dash_html_components.Hr": 3, + "dash_html_components.Img": 1, + "dash_html_components.P": 5, + "dash_html_components.Pre": 1, + "dash_html_components.Summary": 2, + "dash_html_components.Table": 2, + "dash_html_components.Tbody": 2, + "dash_html_components.Td": 72, + "dash_html_components.Th": 6, + "dash_html_components.Thead": 2, + "dash_html_components.Tr": 26, + "dash_iconify.DashIconify": 4, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.CodeHighlight": 2, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 6, + "dash_mantine_components.Title": 3, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.LineChart": 4 + }, + "ids": [ + "axis-config-chart", + "live-examples", + "llm-copy-button-zoom-preview-(0.0.8)", + "m2d-page-linechart-zoom-preview", + "overview", + "zoom-interaction-chart", + "zoom-preview-biaxial", + "zoom-preview-chart", + "zoom-preview-output", + "{\"page\": \"/linechart-zoom-preview\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/linechart-zoom-preview\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/linechart-zoom-preview\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/linechart-zoom-preview\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "axis-config-chart", + "zoom-interaction-chart", + "zoom-preview-biaxial", + "zoom-preview-chart" + ], + "mui_mounts": 4 + }, + "/live-trading": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 4, + "dash_html_components.Div": 24, + "dash_html_components.H4": 1, + "dash_html_components.Img": 1, + "dash_html_components.Label": 4, + "dash_html_components.Pre": 1, + "dash_iconify.DashIconify": 4, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.Anchor": 3, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 4, + "dash_mantine_components.Code": 15, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 3, + "dash_mantine_components.Group": 1, + "dash_mantine_components.List": 1, + "dash_mantine_components.ListItem": 3, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Slider": 4, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Switch": 3, + "dash_mantine_components.Text": 10, + "dash_mantine_components.Title": 4, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.LiveTradingChart": 1 + }, + "ids": [ + "live-simulation", + "llm-copy-button-live-trading-chart", + "lt-alert-count", + "lt-alert-log", + "lt-chart", + "lt-drift", + "lt-labels-toggle", + "lt-price-display", + "lt-reset-btn", + "lt-slider-toggle", + "lt-speed", + "lt-start-btn", + "lt-status", + "lt-stop-btn", + "lt-tick-display", + "lt-volatility", + "lt-volume-toggle", + "lt-window", + "m2d-page-live-trading", + "overview", + "related-pages", + "{\"page\": \"/live-trading\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/live-trading\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/live-trading\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/live-trading\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "lt-chart" + ], + "mui_mounts": 1 + }, + "/pie": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 9, + "dash_html_components.Div": 12, + "dash_html_components.H4": 2, + "dash_html_components.Img": 1, + "dash_html_components.Pre": 2, + "dash_iconify.DashIconify": 9, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.Anchor": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 7, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 16, + "dash_mantine_components.CodeHighlight": 1, + "dash_mantine_components.CodeHighlightTabs": 6, + "dash_mantine_components.Divider": 8, + "dash_mantine_components.Group": 1, + "dash_mantine_components.List": 1, + "dash_mantine_components.ListItem": 1, + "dash_mantine_components.Paper": 7, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 20, + "dash_mantine_components.Title": 9, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.PieChart": 6 + }, + "ids": [ + "arc-labels", + "basic-pie", + "basic-pie-chart", + "donut-chart", + "donut-pie", + "gauge-pie", + "half-pie-/-gauge", + "interactive-example", + "interactive-pie", + "labeled-pie", + "llm-copy-button-pie-chart", + "m2d-page-pie", + "overview", + "pie-click-data", + "pie-highlight-data", + "related-pages", + "styled-pie", + "styled-pie", + "{\"page\": \"/pie\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/pie\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/pie\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/pie\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "basic-pie", + "donut-pie", + "gauge-pie", + "interactive-pie", + "labeled-pie", + "styled-pie" + ], + "mui_mounts": 6 + }, + "/pie-props": { + "components": { + "dash_core_components.Clipboard": 1, + "dash_core_components.Store": 1, + "dash_html_components.A": 4, + "dash_html_components.Div": 7, + "dash_html_components.Img": 1, + "dash_html_components.Pre": 1, + "dash_iconify.DashIconify": 3, + "dash_mantine_components.Anchor": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 2, + "dash_mantine_components.Code": 3, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 3, + "dash_mantine_components.Group": 4, + "dash_mantine_components.List": 2, + "dash_mantine_components.ListItem": 6, + "dash_mantine_components.NumberInput": 4, + "dash_mantine_components.Paper": 12, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.SegmentedControl": 1, + "dash_mantine_components.Select": 1, + "dash_mantine_components.SimpleGrid": 3, + "dash_mantine_components.Slider": 12, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 7, + "dash_mantine_components.Switch": 5, + "dash_mantine_components.Text": 37, + "dash_mantine_components.Title": 4, + "dash_mantine_components.Tooltip": 1 + }, + "ids": [ + "llm-copy-button-pie-chart-props", + "m2d-page-pie-props", + "overview", + "pie-click-info", + "pie-ctrl-arc-label", + "pie-ctrl-arc-label-min-angle", + "pie-ctrl-fade-others", + "pie-ctrl-height", + "pie-ctrl-hide-legend", + "pie-ctrl-highlight", + "pie-ctrl-inner-corner-radius", + "pie-ctrl-inner-inner-radius", + "pie-ctrl-inner-outer-radius", + "pie-ctrl-inner-padding-angle", + "pie-ctrl-margin-bottom", + "pie-ctrl-margin-left", + "pie-ctrl-margin-right", + "pie-ctrl-margin-top", + "pie-ctrl-outer-corner-radius", + "pie-ctrl-outer-inner-radius", + "pie-ctrl-outer-outer-radius", + "pie-ctrl-outer-padding-angle", + "pie-ctrl-ring-gap", + "pie-ctrl-show-tooltip", + "pie-ctrl-skip-animation", + "pie-ctrl-width", + "pie-generated-code", + "pie-hover-info", + "pie-preview", + "pie-preview-container", + "pie-reset-btn", + "pie-view-toggle", + "playground", + "related-pages", + "{\"page\": \"/pie-props\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/pie-props\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/pie-props\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/pie-props\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [], + "mui_mounts": 0 + }, + "/scatter": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 10, + "dash_html_components.Div": 3, + "dash_html_components.H4": 1, + "dash_html_components.Img": 1, + "dash_html_components.Pre": 1, + "dash_iconify.DashIconify": 10, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.Anchor": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 8, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 17, + "dash_mantine_components.CodeHighlight": 1, + "dash_mantine_components.CodeHighlightTabs": 7, + "dash_mantine_components.Divider": 9, + "dash_mantine_components.Group": 1, + "dash_mantine_components.List": 1, + "dash_mantine_components.ListItem": 1, + "dash_mantine_components.Paper": 8, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 22, + "dash_mantine_components.Title": 10, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.ScatterChart": 7 + }, + "ids": [ + "axis-styling", + "basic-scatter-\u2014-two-series", + "click-events", + "custom-marker-sizes", + "dataset-driven-scatter", + "llm-copy-button-scatter-chart", + "log-scale-axis", + "m2d-page-scatter", + "overview", + "related-pages", + "scatter-axis-styling", + "scatter-basic", + "scatter-click", + "scatter-click-output", + "scatter-colormap", + "scatter-dataset", + "scatter-log", + "scatter-sizes", + "z-axis-color-mapping", + "{\"page\": \"/scatter\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/scatter\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/scatter\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/scatter\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "scatter-axis-styling", + "scatter-basic", + "scatter-click", + "scatter-colormap", + "scatter-dataset", + "scatter-log", + "scatter-sizes" + ], + "mui_mounts": 7 + }, + "/sparkline": { + "components": { + "dash_core_components.Dropdown": 1, + "dash_core_components.Store": 1, + "dash_html_components.A": 12, + "dash_html_components.Div": 45, + "dash_html_components.Img": 1, + "dash_html_components.Label": 1, + "dash_html_components.Pre": 1, + "dash_html_components.Span": 22, + "dash_html_components.Strong": 1, + "dash_html_components.Table": 1, + "dash_html_components.Tbody": 1, + "dash_html_components.Td": 16, + "dash_html_components.Th": 4, + "dash_html_components.Thead": 1, + "dash_html_components.Tr": 5, + "dash_iconify.DashIconify": 11, + "dash_mantine_components.Anchor": 2, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 10, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 37, + "dash_mantine_components.CodeHighlight": 1, + "dash_mantine_components.CodeHighlightTabs": 9, + "dash_mantine_components.Divider": 11, + "dash_mantine_components.Group": 1, + "dash_mantine_components.List": 2, + "dash_mantine_components.ListItem": 10, + "dash_mantine_components.Paper": 10, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 26, + "dash_mantine_components.Title": 12, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.SparklineChart": 20 + }, + "ids": [ + "area-sparkline", + "bar-sparkline", + "basic-line-sparkline", + "callback-triggered-data-changes", + "custom-curves", + "dynamic-metric-label", + "dynamic-metric-value", + "dynamic-sparkline-container", + "interactive-sparkline-with-hover-details", + "interactive-stock-sparkline", + "llm-copy-button-sparklinechart", + "m2d-page-sparkline", + "metric-selector", + "npm-download-count", + "npm-sparkline", + "npm-style-downloads-sparkline", + "npm-week-label", + "overview", + "related-pages", + "sparklines-in-a-table", + "stock-hover-output", + "stock-price-display", + "sync-revenue-label", + "sync-revenue-spark", + "sync-revenue-value", + "sync-sessions-label", + "sync-sessions-spark", + "sync-sessions-value", + "sync-users-label", + "sync-users-spark", + "sync-users-value", + "synchronized-multi-metric-dashboard", + "{\"page\": \"/sparkline\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/sparkline\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/sparkline\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/sparkline\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "interactive-stock-sparkline", + "npm-sparkline", + "sync-revenue-spark", + "sync-sessions-spark", + "sync-users-spark" + ], + "mui_mounts": 20 + }, + "/sparkline-style": { + "components": { + "dash_core_components.Clipboard": 1, + "dash_core_components.Store": 1, + "dash_html_components.A": 4, + "dash_html_components.Div": 6, + "dash_html_components.Img": 1, + "dash_iconify.DashIconify": 3, + "dash_mantine_components.Anchor": 2, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 2, + "dash_mantine_components.Code": 2, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.ColorInput": 2, + "dash_mantine_components.Divider": 3, + "dash_mantine_components.Group": 3, + "dash_mantine_components.List": 2, + "dash_mantine_components.ListItem": 7, + "dash_mantine_components.NumberInput": 8, + "dash_mantine_components.Paper": 10, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.SegmentedControl": 1, + "dash_mantine_components.Select": 3, + "dash_mantine_components.SimpleGrid": 3, + "dash_mantine_components.Slider": 4, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 7, + "dash_mantine_components.Switch": 4, + "dash_mantine_components.Text": 29, + "dash_mantine_components.Title": 4, + "dash_mantine_components.Tooltip": 1 + }, + "ids": [ + "axis-highlight-x", + "baseline", + "chart-height", + "chart-width", + "clip-bottom", + "clip-left", + "clip-right", + "clip-top", + "color-background", + "color-line", + "curve-type", + "disable-clipping", + "generated-code", + "highlight-dot-size", + "hover-info", + "llm-copy-button-sparkline-style", + "m2d-page-sparkline-style", + "margin-bottom", + "margin-left", + "margin-right", + "margin-top", + "overview", + "playground", + "plot-type", + "preview-container", + "related-pages", + "reset-button", + "show-area", + "show-highlight", + "show-tooltip", + "sparkline-preview", + "stroke-width", + "{\"page\": \"/sparkline-style\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/sparkline-style\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/sparkline-style\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/sparkline-style\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [], + "mui_mounts": 0 + }, + "/sparkline-style-advanced": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 4, + "dash_html_components.Div": 16, + "dash_html_components.H1": 1, + "dash_html_components.Img": 1, + "dash_html_components.P": 2, + "dash_html_components.Span": 2, + "dash_iconify.DashIconify": 4, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.Anchor": 2, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 5, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 3, + "dash_mantine_components.Group": 1, + "dash_mantine_components.List": 2, + "dash_mantine_components.ListItem": 7, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 7, + "dash_mantine_components.Title": 4, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.SparklineChart": 1 + }, + "ids": [ + "change-display", + "glass-sparkline", + "hover-index-display", + "hover-instruction", + "hover-value-display", + "live-example", + "llm-copy-button-sparkline-advanced", + "m2d-page-sparkline-style-advanced", + "overview", + "related-pages", + "sparkline-container", + "{\"page\": \"/sparkline-style-advanced\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/sparkline-style-advanced\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/sparkline-style-advanced\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/sparkline-style-advanced\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "glass-sparkline" + ], + "mui_mounts": 1 + }, + "/time-clock": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 7, + "dash_html_components.Div": 2, + "dash_html_components.Img": 1, + "dash_iconify.DashIconify": 3, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 4, + "dash_mantine_components.Code": 30, + "dash_mantine_components.CodeHighlight": 2, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Container": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 6, + "dash_mantine_components.List": 2, + "dash_mantine_components.ListItem": 4, + "dash_mantine_components.Paper": 13, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 16, + "dash_mantine_components.Text": 31, + "dash_mantine_components.Title": 12, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.TimeClock": 11 + }, + "ids": [ + "live-examples", + "llm-copy-button-time-clock", + "m2d-page-time-clock", + "notes", + "outputs", + "overview", + "related-pages", + "tc-ampm-default", + "tc-ampm-off", + "tc-ampm-on", + "tc-basic", + "tc-controlled", + "tc-controlled-out", + "tc-disabled", + "tc-readonly", + "tc-set-0900", + "tc-set-1430", + "tc-set-1845", + "tc-uncontrolled", + "tc-views-h", + "tc-views-hms", + "tc-views-ms", + "tc-views-out", + "usage", + "{\"page\": \"/time-clock\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/time-clock\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/time-clock\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/time-clock\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "tc-ampm-default", + "tc-ampm-off", + "tc-ampm-on", + "tc-basic", + "tc-controlled", + "tc-disabled", + "tc-readonly", + "tc-uncontrolled", + "tc-views-h", + "tc-views-hms", + "tc-views-ms" + ], + "mui_mounts": 11 + }, + "/time-clock-lab": { + "components": { + "dash_core_components.Interval": 1, + "dash_core_components.Store": 2, + "dash_html_components.A": 3, + "dash_html_components.Div": 3, + "dash_html_components.Img": 1, + "dash_iconify.DashIconify": 37, + "dash_mantine_components.Accordion": 6, + "dash_mantine_components.AccordionControl": 6, + "dash_mantine_components.AccordionItem": 6, + "dash_mantine_components.AccordionPanel": 6, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Badge": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 9, + "dash_mantine_components.Card": 7, + "dash_mantine_components.Code": 4, + "dash_mantine_components.CodeHighlightTabs": 8, + "dash_mantine_components.ColorInput": 2, + "dash_mantine_components.ColorPicker": 1, + "dash_mantine_components.Container": 1, + "dash_mantine_components.DateTimePicker": 1, + "dash_mantine_components.Divider": 9, + "dash_mantine_components.Group": 19, + "dash_mantine_components.Paper": 8, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 8, + "dash_mantine_components.Text": 17, + "dash_mantine_components.ThemeIcon": 7, + "dash_mantine_components.TimeGrid": 1, + "dash_mantine_components.TimeInput": 1, + "dash_mantine_components.TimePicker": 1, + "dash_mantine_components.Title": 12, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.TimeClock": 7 + }, + "ids": [ + "lab-color-clock", + "lab-color-face", + "lab-color-hand", + "lab-color-num", + "lab-color-reset", + "lab-dtp", + "lab-dtp-clock", + "lab-dtp-out", + "lab-glass-clock", + "lab-glass-readout", + "lab-sw-clock", + "lab-sw-interval", + "lab-sw-readout", + "lab-sw-restart", + "lab-sw-start", + "lab-sw-stop", + "lab-sw-store", + "lab-sw-unit", + "lab-tg", + "lab-tg-clock", + "lab-tg-out", + "lab-ti-0900", + "lab-ti-1730", + "lab-ti-clock", + "lab-ti-input", + "lab-ti-now", + "lab-ti-out", + "lab-ti-reset", + "lab-tp-clock", + "lab-tp-input", + "lab-tp-out", + "live-examples", + "llm-copy-button-timeclock-lab", + "m2d-page-time-clock-lab", + "overview", + "{\"page\": \"/time-clock-lab\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/time-clock-lab\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/time-clock-lab\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/time-clock-lab\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "lab-color-clock", + "lab-dtp-clock", + "lab-glass-clock", + "lab-sw-clock", + "lab-tg-clock", + "lab-ti-clock", + "lab-tp-clock" + ], + "mui_mounts": 7 + }, + "/tree-basic": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 8, + "dash_html_components.Div": 8, + "dash_html_components.H3": 5, + "dash_html_components.Img": 1, + "dash_html_components.P": 7, + "dash_html_components.Pre": 2, + "dash_iconify.DashIconify": 3, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 23, + "dash_mantine_components.CodeHighlight": 3, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.List": 3, + "dash_mantine_components.ListItem": 16, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 13, + "dash_mantine_components.Title": 9, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.TreeView": 5 + }, + "ids": [ + "basic-usage", + "item-shape", + "key-props", + "live-examples", + "llm-copy-button-tree-basic", + "m2d-page-tree-basic", + "outputs-(use-as-callback-inputs)", + "overview", + "related-pages", + "tree-basic-click-out", + "tree-basic-clicks", + "tree-basic-custom-keys", + "tree-basic-expanded", + "tree-basic-focus", + "tree-basic-focus-out", + "tree-basic-minimal", + "treeview", + "{\"page\": \"/tree-basic\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/tree-basic\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/tree-basic\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/tree-basic\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "tree-basic-clicks", + "tree-basic-custom-keys", + "tree-basic-expanded", + "tree-basic-focus", + "tree-basic-minimal" + ], + "mui_mounts": 5 + }, + "/tree-disabled": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 3, + "dash_html_components.Div": 7, + "dash_html_components.H3": 4, + "dash_html_components.Img": 1, + "dash_html_components.P": 4, + "dash_html_components.Pre": 1, + "dash_iconify.DashIconify": 3, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 6, + "dash_mantine_components.Title": 3, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.TreeView": 4 + }, + "ids": [ + "live-examples", + "llm-copy-button-tree-disabled", + "m2d-page-tree-disabled", + "overview", + "tree-dis-basic", + "tree-dis-checkbox", + "tree-dis-checkbox-out", + "tree-dis-focusable", + "tree-dis-parents", + "{\"page\": \"/tree-disabled\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/tree-disabled\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/tree-disabled\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/tree-disabled\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "tree-dis-basic", + "tree-dis-checkbox", + "tree-dis-focusable", + "tree-dis-parents" + ], + "mui_mounts": 4 + }, + "/tree-editing": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 3, + "dash_html_components.Div": 6, + "dash_html_components.H3": 3, + "dash_html_components.Img": 1, + "dash_html_components.P": 6, + "dash_html_components.Pre": 3, + "dash_iconify.DashIconify": 3, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 6, + "dash_mantine_components.Title": 3, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.TreeView": 3 + }, + "ids": [ + "live-examples", + "llm-copy-button-tree-editing", + "m2d-page-tree-editing", + "overview", + "tree-edit-all", + "tree-edit-all-out", + "tree-edit-log", + "tree-edit-log-out", + "tree-edit-specific", + "tree-edit-specific-out", + "{\"page\": \"/tree-editing\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/tree-editing\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/tree-editing\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/tree-editing\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "tree-edit-all", + "tree-edit-log", + "tree-edit-specific" + ], + "mui_mounts": 3 + }, + "/tree-expansion": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 3, + "dash_html_components.Button": 3, + "dash_html_components.Div": 8, + "dash_html_components.H3": 4, + "dash_html_components.Img": 1, + "dash_html_components.P": 6, + "dash_html_components.Pre": 2, + "dash_iconify.DashIconify": 3, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 6, + "dash_mantine_components.Title": 3, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.TreeView": 4 + }, + "ids": [ + "live-examples", + "llm-copy-button-tree-expansion", + "m2d-page-tree-expansion", + "overview", + "tree-exp-btn-all", + "tree-exp-btn-none", + "tree-exp-btn-root", + "tree-exp-content", + "tree-exp-controlled", + "tree-exp-controlled-out", + "tree-exp-icon", + "tree-exp-track", + "tree-exp-track-out", + "{\"page\": \"/tree-expansion\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/tree-expansion\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/tree-expansion\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/tree-expansion\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "tree-exp-content", + "tree-exp-controlled", + "tree-exp-icon", + "tree-exp-track" + ], + "mui_mounts": 4 + }, + "/tree-icons": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 3, + "dash_html_components.Div": 14, + "dash_html_components.H3": 7, + "dash_html_components.Img": 1, + "dash_html_components.P": 10, + "dash_iconify.DashIconify": 3, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 6, + "dash_mantine_components.Title": 3, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.TreeView": 9 + }, + "ids": [ + "live-examples", + "llm-copy-button-tree-icons", + "m2d-page-tree-icons", + "overview", + "tree-icon-addremove", + "tree-icon-arrow", + "tree-icon-default", + "tree-icon-file", + "tree-icon-height", + "tree-icon-indent-24", + "tree-icon-indent-48", + "tree-icon-indent-8", + "tree-icon-sx", + "{\"page\": \"/tree-icons\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/tree-icons\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/tree-icons\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/tree-icons\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "tree-icon-addremove", + "tree-icon-arrow", + "tree-icon-default", + "tree-icon-file", + "tree-icon-height", + "tree-icon-indent-24", + "tree-icon-indent-48", + "tree-icon-indent-8", + "tree-icon-sx" + ], + "mui_mounts": 9 + }, + "/tree-pro": { + "components": { + "dash_core_components.Store": 4, + "dash_html_components.A": 8, + "dash_html_components.Div": 2, + "dash_html_components.Img": 1, + "dash_html_components.Pre": 4, + "dash_iconify.DashIconify": 6, + "dash_mantine_components.Alert": 1, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Badge": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 31, + "dash_mantine_components.CodeHighlight": 2, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 3, + "dash_mantine_components.Grid": 1, + "dash_mantine_components.GridCol": 2, + "dash_mantine_components.Group": 4, + "dash_mantine_components.List": 3, + "dash_mantine_components.ListItem": 13, + "dash_mantine_components.Paper": 6, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 11, + "dash_mantine_components.Text": 31, + "dash_mantine_components.ThemeIcon": 2, + "dash_mantine_components.Title": 12, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.TreeViewPro": 3 + }, + "ids": [ + "also-supported-(inherited-patterns)", + "kebab-submenus,-dividers,-and-per-node-menus-(v1.4.0)", + "live-examples", + "llm-copy-button-tree-pro", + "m2d-page-tree-pro", + "overview", + "per-item-slider-+-kebab-controls-(showitemcontrolstrue)", + "pro-features", + "related-pages", + "tps-label-overrides", + "tps-last-kebab", + "tps-last-slider", + "tree-pro-combo", + "tree-pro-combo-action-log", + "tree-pro-combo-edit", + "tree-pro-combo-menu-label", + "tree-pro-combo-sel", + "tree-pro-combo-slider-label", + "tree-pro-combo-sliders", + "tree-pro-reorder", + "tree-pro-reorder-out", + "tree-pro-reorder-subset", + "treeviewpro", + "{\"page\": \"/tree-pro\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/tree-pro\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/tree-pro\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/tree-pro\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "tree-pro-combo", + "tree-pro-reorder", + "tree-pro-reorder-subset" + ], + "mui_mounts": 3 + }, + "/tree-selection": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 3, + "dash_html_components.Button": 3, + "dash_html_components.Div": 10, + "dash_html_components.H3": 6, + "dash_html_components.Img": 1, + "dash_html_components.P": 6, + "dash_html_components.Pre": 5, + "dash_iconify.DashIconify": 3, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 2, + "dash_mantine_components.Button": 1, + "dash_mantine_components.CodeHighlightTabs": 1, + "dash_mantine_components.Divider": 2, + "dash_mantine_components.Group": 1, + "dash_mantine_components.Paper": 2, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 6, + "dash_mantine_components.Title": 3, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.TreeView": 6 + }, + "ids": [ + "live-examples", + "llm-copy-button-tree-selection", + "m2d-page-tree-selection", + "overview", + "tree-sel-btn-clear", + "tree-sel-btn-grid", + "tree-sel-btn-pickers", + "tree-sel-checkbox", + "tree-sel-checkbox-out", + "tree-sel-controlled", + "tree-sel-controlled-out", + "tree-sel-disabled", + "tree-sel-multi", + "tree-sel-multi-out", + "tree-sel-propagation", + "tree-sel-propagation-out", + "tree-sel-single", + "tree-sel-single-out", + "{\"page\": \"/tree-selection\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/tree-selection\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/tree-selection\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/tree-selection\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "tree-sel-checkbox", + "tree-sel-controlled", + "tree-sel-disabled", + "tree-sel-multi", + "tree-sel-propagation", + "tree-sel-single" + ], + "mui_mounts": 6 + }, + "/tree-simple": { + "components": { + "dash_core_components.Store": 1, + "dash_html_components.A": 9, + "dash_html_components.Div": 10, + "dash_html_components.H3": 6, + "dash_html_components.Img": 1, + "dash_html_components.P": 7, + "dash_html_components.Pre": 2, + "dash_iconify.DashIconify": 4, + "dash_mantine_components.AppShellAside": 1, + "dash_mantine_components.Box": 3, + "dash_mantine_components.Button": 1, + "dash_mantine_components.Code": 19, + "dash_mantine_components.CodeHighlight": 3, + "dash_mantine_components.CodeHighlightTabs": 2, + "dash_mantine_components.Divider": 3, + "dash_mantine_components.Group": 1, + "dash_mantine_components.List": 4, + "dash_mantine_components.ListItem": 14, + "dash_mantine_components.Paper": 3, + "dash_mantine_components.ScrollArea": 1, + "dash_mantine_components.Space": 1, + "dash_mantine_components.Stack": 1, + "dash_mantine_components.Text": 16, + "dash_mantine_components.Title": 10, + "dash_mantine_components.Tooltip": 1, + "dash_mui_charts.SimpleTreeView": 7 + }, + "ids": [ + "basic-usage", + "item-shape-\u2014-itemid,-not-id", + "key-props", + "live-examples", + "llm-copy-button-tree-simple", + "m2d-page-tree-simple", + "outputs-(use-as-callback-inputs)", + "overview", + "related-pages", + "simpletreeview", + "the-docs-sidebar,-dogfooded", + "tree-simple-basic", + "tree-simple-checkbox", + "tree-simple-checkbox-out", + "tree-simple-disabled", + "tree-simple-icon-trigger", + "tree-simple-icons", + "tree-simple-select", + "tree-simple-select-out", + "tree-simple-sidebar-demo", + "{\"page\": \"/tree-simple\", \"type\": \"net-ad-container\"}", + "{\"page\": \"/tree-simple\", \"type\": \"net-ad-data\"}", + "{\"page\": \"/tree-simple\", \"type\": \"net-ad-img\"}", + "{\"page\": \"/tree-simple\", \"type\": \"net-ad-link\"}" + ], + "mui_ids": [ + "tree-simple-basic", + "tree-simple-checkbox", + "tree-simple-disabled", + "tree-simple-icon-trigger", + "tree-simple-icons", + "tree-simple-select", + "tree-simple-sidebar-demo" + ], + "mui_mounts": 7 + } + }, + "shell": { + "components": { + "dash_core_components.Location": 2, + "dash_core_components.Store": 4, + "dash_html_components.Div": 3, + "dash_iconify.DashIconify": 100, + "dash_mantine_components.ActionIcon": 4, + "dash_mantine_components.Anchor": 95, + "dash_mantine_components.AppShell": 1, + "dash_mantine_components.AppShellHeader": 1, + "dash_mantine_components.AppShellMain": 1, + "dash_mantine_components.AppShellNavbar": 1, + "dash_mantine_components.Avatar": 1, + "dash_mantine_components.Badge": 2, + "dash_mantine_components.Box": 4, + "dash_mantine_components.Burger": 1, + "dash_mantine_components.Divider": 7, + "dash_mantine_components.Drawer": 1, + "dash_mantine_components.Group": 96, + "dash_mantine_components.MantineProvider": 1, + "dash_mantine_components.NotificationContainer": 1, + "dash_mantine_components.ScrollArea": 2, + "dash_mantine_components.Select": 2, + "dash_mantine_components.Stack": 59, + "dash_mantine_components.Text": 121, + "dash_mantine_components.Tooltip": 1 + }, + "ids": [ + "_pages_content", + "_pages_dummy", + "_pages_location", + "_pages_store", + "analytics-sink", + "color-scheme-storage", + "color-scheme-toggle", + "components-navbar-drawer", + "dark-theme-icon", + "dash-docs-title", + "desktop-navbar-collapsed", + "desktop-navbar-toggle", + "drawer-hamburger-button", + "header-avatar", + "light-theme-icon", + "m2d-appshell", + "m2d-mantine-provider", + "mobile-select-component", + "select-component", + "url" + ], + "mui_ids": [], + "mui_mounts": 0 + }, + "total_mui_mounts": 195 +} diff --git a/scripts/smoke_live.py b/scripts/smoke_live.py new file mode 100644 index 0000000..499f4b8 --- /dev/null +++ b/scripts/smoke_live.py @@ -0,0 +1,492 @@ +#!/usr/bin/env python3 +"""Post-deploy checks against a *live* satellite. + + python scripts/smoke_live.py https://boilerplate.2plot.dev + +Everything here fails silently in production if it isn't checked. A wrong +canonical host doesn't error, it deindexes; a stub body doesn't error, it +serves crawlers nothing; a dead peer link doesn't error, it just teaches an +agent that this network's directory isn't worth following. + +Run in CD after every deploy, and by hand against any satellite you're +upgrading. Exit code is the number of failed checks, capped at 125. + +Much of the fleet runs on Render's free tier, which sleeps after ~15 minutes +idle and answers the first probe with a loading page or a hang — so the +battery wakes the host up first (a `/healthz` poll, LESSONS §21) and `fetch` +retries transport errors and 5xx. Both are tunable without editing this file: + + SMOKE_WAKE_ATTEMPTS /healthz probes before giving up (default 24) + SMOKE_WAKE_INTERVAL_S seconds between probes (default 10) + SMOKE_FETCH_RETRIES attempts per request inside fetch (default 3) + +Only the standard library, so it runs anywhere without an install step. +""" + +from __future__ import annotations + +import os +import re +import sys +import ssl +import time +import urllib.error +import urllib.request +from typing import Dict, List, Optional, Tuple +from urllib.parse import urlparse + +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + +# Every UA below carries the network's internal-traffic token (the analytics +# point of truth — https://2plot.ai/docs/satellite-analytics, "Internal +# traffic"). A post-deploy battery runs on every push and sweeps every peer in +# the directory; without the token it registers as a burst of visitors, and +# the crawler-shaped probes register as crawler interest. The Googlebot and +# Chrome tokens are still there, so the target exercises exactly the path +# being tested — it just knows the caller is machinery. +try: + from lib.constants import INTERNAL_UA as _INTERNAL_UA +except Exception: # pragma: no cover — running outside a repo checkout + _INTERNAL_UA = "2plot-internal/1.0 (+https://2plot.ai/docs/satellite-analytics)" + +CRAWLER_UA = ( + "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) " + + _INTERNAL_UA +) +BROWSER_UA = ( + "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 " + "(KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 " + _INTERNAL_UA +) +# `/<page>/llms.txt` negotiates on Accept, not on the User-Agent. +BROWSER_ACCEPT = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" +STUB_MARKER = "This page contains interactive content that requires JavaScript" +# Rendered chrome, not the bare class name — a Markdown page may legitimately +# discuss `dv-banner` (this network has one that does); it can never contain +# the element. +CHROME = re.compile(r'<[a-z]+ class="dv-banner') +TIMEOUT = 30 +# Generous on purpose: a free-tier cold start routinely takes 60-90s, and the +# only cost of a wide window is paid when the host is actually down — a warm +# host passes the first probe. 24 x 10s covers the slow tail with room; a +# satellite on an even slower tier stretches it via the env vars above. +RETRIES = max(1, int(os.getenv("SMOKE_FETCH_RETRIES") or 3)) +WAKE_ATTEMPTS = max(1, int(os.getenv("SMOKE_WAKE_ATTEMPTS") or 24)) +WAKE_INTERVAL_S = max(0.0, float(os.getenv("SMOKE_WAKE_INTERVAL_S") or 10)) + + +def _ssl_context() -> ssl.SSLContext: + """Verify certificates via certifi when available. + + macOS Python ships without OS trust-store integration, so bare urllib + fails every https fetch with CERTIFICATE_VERIFY_FAILED — which reads as + "the whole site is down" (every check 0s). Same fix as audit_links.py. + Verification stays ON either way; certifi only supplies the CA bundle. + """ + try: + import certifi + + return ssl.create_default_context(cafile=certifi.where()) + except ImportError: + return ssl.create_default_context() + + +SSL_CONTEXT = _ssl_context() + +failures: List[str] = [] +warnings: List[str] = [] +checks_run = 0 + + +def fetch( + url: str, + user_agent: str = BROWSER_UA, + accept: Optional[str] = None, + retries: Optional[int] = None, + timeout: float = TIMEOUT, +) -> Tuple[int, str, Dict[str, str]]: + """Returns (status, body, headers). + + Headers are part of the contract from 2.2.0 on: `/<page>/llms.txt` + content-negotiates, so which *type* came back is the thing being checked, + and `Vary` is what stops a CDN handing cached HTML to the next agent. + + TRANSPORT errors and 5xx are retried with backoff; other statuses are + verdicts and are not. The distinction matters because this script makes + ~40 requests in a burst against hosts on Render's free tier — one dropped + connection used to surface as `FAIL canonical on /<page>`, a check that + had never actually run, sending you to look at canonical tags that were + correct all along (LESSONS §21; same ladder as network_smoke.py). A 404 is + a real answer, and retrying it would only slow the battery down; a check + still failing after every attempt is a real failure. + + `errors="surrogateescape"`, not `"replace"`: this function also fetches + the social card, and the card check reads the PNG's IHDR chunk for the + real pixel dimensions. `"replace"` substitutes U+FFFD for every invalid + byte and is one-way, so the header would be gone before it could be read. + surrogateescape round-trips exactly through + `body.encode("utf-8", "surrogateescape")`, and behaves identically to a + plain decode for text. + """ + headers = {"User-Agent": user_agent} + if accept is not None: + headers["Accept"] = accept + request = urllib.request.Request(url, headers=headers) + attempts = RETRIES if retries is None else max(1, retries) + last: Tuple[int, str, Dict[str, str]] = (0, "no attempt was made", {}) + for attempt in range(attempts): + if attempt: + time.sleep(2 * attempt) + try: + with urllib.request.urlopen( + request, timeout=timeout, context=SSL_CONTEXT + ) as response: + body = response.read().decode("utf-8", "surrogateescape") + return response.status, body, dict(response.headers) + except urllib.error.HTTPError as exc: + # The STATUS is the answer; the body is a bonus. Reading it can + # itself raise — a host that 502s mid-body raises IncompleteRead + # here — and an exception escaping `fetch` takes the whole script + # down, turning one sick response into a dead CD run. + try: + body = exc.read().decode("utf-8", "surrogateescape") + except Exception: # noqa: BLE001 - truncated or already-closed body + body = "" + last = (exc.code, body, dict(exc.headers or {})) + if exc.code < 500: + return last + reason = f"HTTP {exc.code}" + except Exception as exc: # noqa: BLE001 - DNS, TLS, timeouts all land here + last = (0, f"{type(exc).__name__}: {exc}", {}) + reason = type(exc).__name__ + if attempt + 1 < attempts: + # Visible on purpose: a green run whose log shows retries is a + # host worth watching, and CD output is the only place that shows. + print(f" retry {attempt + 1}/{attempts - 1} for {url} — {reason}", + flush=True) + return last + + +def header(headers: Dict[str, str], name: str) -> str: + """Case-insensitive header lookup — proxies rewrite the casing.""" + for key, value in headers.items(): + if key.lower() == name.lower(): + return value + return "" + + +def check(name: str, passed: bool, detail: str = "", fatal: bool = True) -> None: + """Record one check. ``fatal=False`` warns instead of failing the deploy. + + The distinction is a policy, not a convenience: **a check about THIS host + is fatal; a check about somebody else's host is a warning.** + + Peer reachability is the only thing in this script that fails on someone + else's infrastructure, and gating a deploy on it is shared fate — one peer + with an expired certificate turns every satellite in the network red, none + of them can ship, and the people who see it learn that red CD means + nothing. The information is still worth having (a directory of dead links + degrades silently and nothing else reports it), so it is surfaced as a + warning and, under Actions, as an annotation on the run summary. + """ + global checks_run + checks_run += 1 + if passed: + print(f" ok {name}") + elif fatal: + print(f" FAIL {name}" + (f" — {detail}" if detail else "")) + failures.append(name) + else: + print(f" warn {name}" + (f" — {detail}" if detail else "")) + warnings.append(f"{name}" + (f" — {detail}" if detail else "")) + if os.getenv("GITHUB_ACTIONS"): + print(f"::warning title=peer unreachable::{name} — {detail}") + + +def wake(base: str) -> bool: + """Poll `/healthz` until the host actually answers. LESSONS §21. + + A sleeping free-tier host greets its first visitor with Render's loading + page or a hang, and the first visitor after a deploy is this battery — so + without this loop the opening checks fail on a perfectly healthy site. + Requiring `ok: true` rather than any 200 keeps the loading page (and a + CDN error page, which can also be a 200) from counting as awake. + + Each probe is single-shot with a short timeout: the loop IS the retry + ladder here, and per-probe printing is what makes a slow start readable + in the CD log rather than a silent multi-minute stall. + """ + url = f"{base}/healthz" + for attempt in range(1, WAKE_ATTEMPTS + 1): + status, body, _ = fetch(url, retries=1, timeout=10) + if status == 200 and re.search(r'"ok"\s*:\s*true', body): + print(f" wake attempt {attempt}/{WAKE_ATTEMPTS}: up") + return True + detail = f"HTTP {status}" if status else body[:80] + print(f" wake attempt {attempt}/{WAKE_ATTEMPTS}: {detail}", flush=True) + if attempt < WAKE_ATTEMPTS: + time.sleep(WAKE_INTERVAL_S) + return False + + +def main(base: str) -> int: + base = base.rstrip("/") + host = urlparse(base).netloc + print(f"Smoke-testing {base}\n") + + # --- 0. Wake the host before asserting anything about it --------------- + print("Wake-up") + if not wake(base): + # ONE clear failure, not a cascade: forty per-check failures against a + # host that never answered all say the same thing and bury it. + check( + "host answered /healthz", + False, + f"never woke after {WAKE_ATTEMPTS} probes ~{WAKE_INTERVAL_S:g}s " + "apart — nothing else was tested", + ) + print(f"\n0/{checks_run} checks passed") + print("\nFailed:") + for name in failures: + print(f" - {name}") + return min(len(failures), 125) + + # --- 1. The site is up, and llms.txt is the index it should be --------- + print("Core surfaces") + status, home, _ = fetch(f"{base}/") + check("home page responds 200", status == 200, f"got {status}") + + status, llms, llms_headers = fetch(f"{base}/llms.txt") + check("/llms.txt responds 200", status == 200, f"got {status}") + check("/llms.txt lists pages", "## Pages" in llms or "# " in llms) + check("/llms.txt publishes the network directory", "## Network" in llms) + + status, robots, _ = fetch(f"{base}/robots.txt") + check("/robots.txt responds 200", status == 200, f"got {status}") + check( + "/robots.txt points at this host's sitemap", + f"Sitemap: {base}/sitemap.xml" in robots, + "sitemap line missing or pointing elsewhere", + ) + # The artifact fingerprint. pip metadata is invisible from outside, so + # these robots.txt pairs are how a live host is proven to run the intended + # dash-improve-my-llms: 2.3.2 allowed OAI-SearchBot; 2.3.3 moved ClaudeBot + # (the training crawler) to Disallow while allowing the user-triggered and + # search fetchers Claude-User / Claude-SearchBot. + robots_lines = robots.splitlines() + + def robots_rule(agent: str) -> str: + marker = f"User-agent: {agent}" + if marker not in robots_lines: + return "(missing)" + idx = robots_lines.index(marker) + following = robots_lines[idx + 1: idx + 2] + return following[0] if following else "(missing)" + + for agent, expected, since in ( + ("OAI-SearchBot", "Allow: /", "2.3.2"), + ("ClaudeBot", "Disallow: /", "2.3.3"), + ("Claude-User", "Allow: /", "2.3.3"), + ("Claude-SearchBot", "Allow: /", "2.3.3"), + ): + got = robots_rule(agent) + check( + f"/robots.txt {agent} -> {expected.split(':')[0]} ({since} artifact fingerprint)", + got == expected, + f"got {got}: this host runs a pre-{since} artifact", + ) + + status, sitemap, _ = fetch(f"{base}/sitemap.xml") + check("/sitemap.xml responds 200", status == 200, f"got {status}") + page_urls = re.findall(r"<loc>([^<]+)</loc>", sitemap) + check("/sitemap.xml lists pages", bool(page_urls), "no <loc> entries") + foreign = [u for u in page_urls if urlparse(u).netloc != host] + check("/sitemap.xml stays on this host", not foreign, f"foreign URLs: {foreign[:3]}") + + status, health, _ = fetch(f"{base}/healthz") + check("/healthz responds 200", status == 200, f"got {status}") + + # --- 2. Canonical host — the failure that deindexes a satellite -------- + print("\nCanonical tags") + for url in [f"{base}/"] + page_urls[:8]: + _status, html, _ = fetch(url, CRAWLER_UA) + found = re.findall(r'rel="canonical"\s+href="([^"]*)"', html) + check( + f"canonical on {urlparse(url).path or '/'}", + len(found) == 1 and urlparse(found[0]).netloc == host, + f"got {found}", + ) + + # --- 3. No page serves the JavaScript stub ---------------------------- + print("\nCrawler bodies") + for url in [f"{base}/"] + page_urls[:8]: + _status, html, _ = fetch(url, CRAWLER_UA) + check( + f"real content on {urlparse(url).path or '/'}", + STUB_MARKER not in html, + "served the JavaScript stub", + ) + + # --- 3b. The social card actually exists, and is the shape we claim ---- + # This is the ONLY check that can see either failure. The card is on the + # CDN, so no offline test can fetch it; and its dimensions are hard-coded + # in three places (lib/constants.py, index.html, the CDN object), so + # replacing the uploaded file with a different shape leaves every test + # green while the platform reserves the wrong box and crops into it. + # + # A blank preview is also self-inflicting: platforms cache a failed scrape, + # so the first share after a bad upload poisons the link for everyone. + print("\nSocial card") + card_urls = re.findall(r'<meta[^>]+property="og:image"[^>]+content="([^"]*)"', home) + check("og:image is declared exactly once", len(card_urls) == 1, f"got {card_urls}") + if card_urls and card_urls[0]: + card_url = card_urls[0] + check("og:image is not served by the app", "/assets/" not in card_url, + f"{card_url} — a cold container blanks the preview, cached") + status, body, headers = fetch(card_url) + check("og:image resolves", status == 200, f"got {status}") + ctype = header(headers, "Content-Type") + check("og:image is a real image", ctype.startswith("image/"), ctype or "none") + + declared = { + prop: re.findall( + rf'<meta[^>]+property="{prop}"[^>]+content="([^"]*)"', home) + for prop in ("og:image:width", "og:image:height") + } + # PNG stores its dimensions in the IHDR chunk: bytes 16..24 of the + # file. Read from the RESPONSE, so what is checked is what a scraper + # would actually receive rather than what the repo believes. + raw = body.encode("utf-8", "surrogateescape") + if raw[1:4] == b"PNG" and len(raw) > 24: + actual_w = int.from_bytes(raw[16:20], "big") + actual_h = int.from_bytes(raw[20:24], "big") + check( + "og:image dimensions match the declared width/height", + declared["og:image:width"] == [str(actual_w)] + and declared["og:image:height"] == [str(actual_h)], + f"file is {actual_w}x{actual_h}, tags say " + f"{declared['og:image:width']}x{declared['og:image:height']}", + ) + ratio = actual_w / actual_h if actual_h else 0 + check("og:image suits summary_large_image (~1.91:1)", + 1.7 <= ratio <= 2.05, f"{actual_w}x{actual_h} is {ratio:.2f}:1") + else: + check("og:image is not empty", False, + "an EMPTY og:image renders a blank card — worse than none") + + # --- 4. Content negotiation on llms.txt ------------------------------- + # Production is where this can break in ways development cannot show: a + # CDN sitting in front of the app is free to ignore `Vary` and serve one + # cached variant to everyone. Chrome leaking into the Markdown makes every + # agent in the network pay tokens for decoration and appears in no + # dashboard; the Markdown leaking into a browser just looks unfinished. + print("\nContent negotiation") + check( + "/llms.txt serves Markdown to a plain request", + not CHROME.search(llms) and "<!DOCTYPE html>" not in llms, + "the viewer chrome reached an agent", + ) + + page_doc = next( + (f"{u.rstrip('/')}/llms.txt" for u in page_urls if urlparse(u).path not in ("", "/")), + f"{base}/llms.txt", + ) + + status, doc, doc_headers = fetch(page_doc) + check(f"{urlparse(page_doc).path} responds 200", status == 200, f"got {status}") + check( + "agents get text/markdown", + "text/markdown" in header(doc_headers, "Content-Type"), + header(doc_headers, "Content-Type") or "no Content-Type", + ) + check( + "agents get no viewer chrome", + not CHROME.search(doc) and "<!DOCTYPE html>" not in doc, + "the viewer chrome reached an agent", + ) + check( + "page document is not a dead end", + f"{base}/llms.txt" in doc, + "no route back to the site index", + ) + + status, view, view_headers = fetch(page_doc, accept=BROWSER_ACCEPT) + check( + "browsers get text/html", + "text/html" in header(view_headers, "Content-Type"), + header(view_headers, "Content-Type") or "no Content-Type", + ) + check("the viewer renders the network wordmark", "mk-wordmark" in view) + check( + "the viewer is noindex", + bool(re.search(r'<meta[^>]+name="robots"[^>]+noindex', view)), + "the rendered view would compete with the page it documents", + ) + + # Both variants, because a cache keys on the request that populated it. + for label, headers in (("markdown", doc_headers), ("html", view_headers)): + check( + f"Vary: Accept on the {label} variant", + "accept" in header(headers, "Vary").lower(), + f"Vary: {header(headers, 'Vary') or '(absent)'} — a shared cache " + "may serve this variant to everyone", + ) + + # --- 5. Every peer in the directory resolves -------------------------- + # A directory of dead links degrades quietly, and nothing else will tell + # you — so this is still worth checking on every deploy. But it is the ONE + # section that tests hosts this deployment does not control, so it warns + # rather than fails. See `check()` for why. That the directory is + # *published at all* is this host's job, so that check stays fatal. + print("\nNetwork directory") + # `[` `]` `(` are excluded, not just whitespace: the 2.2.0 nav block writes + # links as `[https://host/llms.txt](https://host/llms.txt)`, and a class + # that stops only at `)` swallows the label and the opening paren into one + # malformed URL — which then 404s and fails a perfectly good deploy. + peer_docs = sorted(set(re.findall(r"https://[^\s()\[\]\"'<>]+/llms\.txt", llms))) + check("directory lists peer llms.txt URLs", bool(peer_docs), "none found") + for url in peer_docs: + if url.startswith(base): + continue + status, body, headers = fetch(url) + # A 200 is not enough. A Dash app answers its catch-all with the SPA + # shell for *any* unmatched path, so a host that does not serve + # llms.txt at all still returns 200 text/html — and a status-only + # check passes on every one of them. Verified on 2plot.dev, where + # /api/this-endpoint-cannot-exist also returns 200 text/html. + is_html = "text/html" in header(headers, "Content-Type").lower() or ( + body.lstrip()[:15].lower().startswith("<!doctype html") + ) + if status != 200: + check(f"peer reachable: {url}", False, f"got {status}", fatal=False) + else: + check( + f"peer serves a document: {url}", + not is_html, + "200, but HTML — that host's catch-all, not an llms.txt", + fatal=False, + ) + + passed = checks_run - len(failures) - len(warnings) + summary = f"\n{passed}/{checks_run} checks passed" + if warnings: + summary += f", {len(warnings)} warnings (peers — not this deployment)" + print(summary) + + if warnings: + print("\nWarned:") + for name in warnings: + print(f" - {name}") + + if failures: + print("\nFailed:") + for name in failures: + print(f" - {name}") + return min(len(failures), 125) + return 0 + + +if __name__ == "__main__": + if len(sys.argv) != 2: + print(__doc__) + sys.exit(2) + sys.exit(main(sys.argv[1])) diff --git a/scripts/smoke_test.py b/scripts/smoke_test.py new file mode 100644 index 0000000..fe94e4c --- /dev/null +++ b/scripts/smoke_test.py @@ -0,0 +1,148 @@ +#!/usr/bin/env python3 +"""Compatibility smoke — does this docs site actually work on THIS Dash? + +ci.yml runs it across the supported Dash range (the matrix installs +`dash==X` first, then requirements). It answers the question the version +matrix exists for: with this exact Dash resolved, do all 41 pages +register, do their layouts construct, does every route serve 200, and is the +component bundle the browser will load syntactically whole? + +This is deliberately NOT scripts/route_parity.py: the parity gate compares +exact layout trees against a baseline recorded WITH a MUI Pro key, and CI is +secretless by design — the 17 Pro pages render their license banners here, +which is a different (and correct) tree. What must hold on every Dash +version is the structure this script asserts, not the exact tree. + + python scripts/smoke_test.py # exit 1 on any failure + python scripts/smoke_test.py --json out.json # also write a report + +Needs the site requirements installed; uses node for the JS checks when +available and reports them skipped when not (CI always installs node — a +skip there means the setup step broke). +""" +from __future__ import annotations + +import argparse +import importlib.util +import json +import os +import shutil +import subprocess +import sys +import tempfile +from pathlib import Path + +REPO = Path(__file__).resolve().parent.parent +sys.path.insert(0, str(REPO)) + +EXPECTED_ROUTES = 41 # 40 originals + /api +# dash_mui_charts component instances across all pages: 194 on 2026-08-02, +# with and without a Pro key (Pro pages mount their charts unlicensed and add +# a banner). The floor has slack for demo edits but fails on "a whole +# component family stopped mounting". +MIN_MUI_MOUNTS = 150 +MIN_CALLBACKS = 90 + +failures: list[str] = [] + + +def check(name: str, ok: bool, detail: str = "") -> None: + print(f" {'ok ' if ok else 'FAIL'} {name}" + (f" — {detail}" if detail else "")) + if not ok: + failures.append(f"{name}: {detail}") + + +def js_checks() -> dict: + """`node --check` over the committed bundle and every asset script. + + The bundle is a build artifact nobody reviews line by line; parsing it is + the cheapest guard against committing a truncated build. The assets are + load-bearing at runtime (muiChartsFunctions.js is the functions-as-props + registry) and only ever fail in the browser console. + """ + node = shutil.which("node") + targets = sorted((REPO / "dash_mui_charts").glob("*.js")) + \ + sorted((REPO / "assets").glob("*.js")) + if node is None: + print(" skip JS syntax checks — node not on PATH") + return {"ran": False, "files": len(targets)} + for path in targets: + proc = subprocess.run([node, "--check", str(path)], + capture_output=True, text=True) + check(f"node --check {path.relative_to(REPO)}", proc.returncode == 0, + proc.stderr.strip().splitlines()[0] if proc.returncode else "") + return {"ran": True, "files": len(targets)} + + +def main() -> int: + ap = argparse.ArgumentParser(description=__doc__.splitlines()[0]) + ap.add_argument("--json", help="write the measurement report to this path") + args = ap.parse_args() + + # Keep a smoke run out of the real hit log wherever it runs. + os.environ.setdefault("ANALYTICS_DIR", + tempfile.mkdtemp(prefix="smoke-test-")) + os.environ.pop("CROSS_APP_WEBHOOK_SECRET", None) + + import dash + + print(f"smoke test — dash {dash.__version__}, " + f"python {sys.version.split()[0]}\n") + + # route_parity.py owns the measurement (fingerprints, status sweep, + # healthz); this script reuses it and asserts structure instead of + # diffing against the Pro-key baseline. + spec = importlib.util.spec_from_file_location( + "route_parity", REPO / "scripts" / "route_parity.py") + route_parity = importlib.util.module_from_spec(spec) + spec.loader.exec_module(route_parity) + + try: + current = route_parity.measure() + except Exception as exc: # noqa: BLE001 — the failure IS the finding + check("app imports and measures", False, f"{type(exc).__name__}: {exc}") + raise SystemExit(1) + + routes = current["routes"] + statuses = current["route_statuses"] + check(f"{EXPECTED_ROUTES} routes registered", len(routes) == EXPECTED_ROUTES, + f"got {len(routes)}") + bad = {p: s for p, s in statuses.items() if s != 200} + check("every route serves 200", not bad, str(bad) if bad else "") + hz_status, hz_ok = current["plumbing"]["/healthz"] + check("/healthz returns ok:true", hz_status == 200 and hz_ok, + f"status={hz_status} ok={hz_ok}") + check("dash plumbing answers", + current["plumbing"]["/_dash-layout"] == 200 + and current["plumbing"]["/_dash-dependencies"] == 200) + check(f"charts mount (>= {MIN_MUI_MOUNTS} dash_mui_charts instances)", + current["total_mui_mounts"] >= MIN_MUI_MOUNTS, + f"got {current['total_mui_mounts']}") + check(f"callbacks registered (>= {MIN_CALLBACKS})", + current["callback_count"] >= MIN_CALLBACKS, + f"got {current['callback_count']}") + + print() + js = js_checks() + + if args.json: + report = { + "dash": dash.__version__, + "python": sys.version.split()[0], + "routes": len(routes), + "mui_mounts": current["total_mui_mounts"], + "callbacks": current["callback_count"], + "js_checks": js, + "failures": failures, + } + Path(args.json).write_text(json.dumps(report, indent=1) + "\n") + + print(f"\n{'PASS' if not failures else 'FAIL'} — " + f"{len(failures)} failure(s)") + for f in failures: + print(f" - {f}") + return 1 if failures else 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/setup.py b/setup.py index ce717c6..4cf3a03 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,12 @@ 'Source': 'https://github.com/pip-install-python/dash-mui-charts', 'Documentation': 'https://github.com/pip-install-python/dash-mui-charts#readme', }, - install_requires=['dash>=3.0.0'], + # The MEASURED floor, not an aspiration: ci.yml's package jobs install + # the wheel against dash==3.3.0 and against the current release. The + # earlier `>=3.0.0` claim was never tested on 3.0-3.2. (The docs SITE + # needs dash>=4.1 — dash-improve-my-llms pins it — but that constrains + # requirements.txt, not the package.) + install_requires=['dash>=3.3.0'], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Framework :: Dash', @@ -33,13 +38,15 @@ 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Topic :: Scientific/Engineering :: Visualization', ], keywords='dash plotly charts mui material-ui visualization', - python_requires='>=3.8', + # Every interpreter ci.yml's package-python-range job measures — the + # 3.8 claim was dropped with the untested dash 3.0-3.2 range. + python_requires='>=3.9', ) \ No newline at end of file diff --git a/src/lib/components/SimpleTreeView.react.js b/src/lib/components/SimpleTreeView.react.js index 356c9e7..ed05b08 100644 --- a/src/lib/components/SimpleTreeView.react.js +++ b/src/lib/components/SimpleTreeView.react.js @@ -4,12 +4,40 @@ * Converts a nested items array into TreeItem JSX children. * Lighter alternative to TreeView for static/simple trees. */ -import React, {useCallback, useMemo} from 'react'; +import React, {useCallback, useEffect, useMemo, useState} from 'react'; import PropTypes from 'prop-types'; import {SimpleTreeView as MuiSimpleTreeView} from '@mui/x-tree-view/SimpleTreeView'; +import {ThemeProvider, createTheme} from '@mui/material/styles'; import {TreeItem} from '@mui/x-tree-view/TreeItem'; import {resolveIcon} from '../fragments/iconResolver'; +// --- Color scheme: watch <html data-mantine-color-scheme="..."> --------------- +const readMantineScheme = () => { + if (typeof document === 'undefined') return 'light'; + const v = document.documentElement.getAttribute('data-mantine-color-scheme'); + return v === 'dark' ? 'dark' : 'light'; +}; + +const useMantineColorScheme = () => { + const [scheme, setScheme] = useState(readMantineScheme); + useEffect(() => { + if (typeof document === 'undefined') return undefined; + const html = document.documentElement; + const sync = () => setScheme(readMantineScheme()); + const obs = new MutationObserver(sync); + obs.observe(html, { + attributes: true, + attributeFilter: ['data-mantine-color-scheme'], + }); + sync(); + return () => obs.disconnect(); + }, []); + return scheme; +}; + +const lightTheme = createTheme({palette: {mode: 'light'}}); +const darkTheme = createTheme({palette: {mode: 'dark'}}); + /** Recursively render items as TreeItem children, with optional per-item icons */ const renderItems = (items) => { if (!items || items.length === 0) return null; @@ -97,12 +125,22 @@ const SimpleTreeView = ({ const containerStyle = useMemo(() => { const s = {}; - if (height) s.height = typeof height === 'number' ? `${height}px` : height; + if (height) { + s.height = typeof height === 'number' ? `${height}px` : height; + // A fixed height must CONTAIN the tree: block children grow past + // a fixed-height parent and divs do not clip by default, so + // without this the tree renders full-length over whatever + // follows (seen on /tree-icons' height=200 demo). + s.overflow = 'auto'; + } return s; }, [height]); + const scheme = useMantineColorScheme(); + return ( <div id={id} style={containerStyle}> + <ThemeProvider theme={scheme === 'dark' ? darkTheme : lightTheme}> <MuiSimpleTreeView selectedItems={selectedItems} defaultSelectedItems={defaultSelectedItems} @@ -124,6 +162,7 @@ const SimpleTreeView = ({ > {renderItems(items)} </MuiSimpleTreeView> + </ThemeProvider> </div> ); }; diff --git a/src/lib/components/TreeView.react.js b/src/lib/components/TreeView.react.js index ace9323..a758038 100644 --- a/src/lib/components/TreeView.react.js +++ b/src/lib/components/TreeView.react.js @@ -3,11 +3,39 @@ * * Data-driven tree with selection, expansion, editing, focus callbacks. */ -import React, {useCallback, useMemo} from 'react'; +import React, {useCallback, useEffect, useMemo, useState} from 'react'; import PropTypes from 'prop-types'; import {RichTreeView} from '@mui/x-tree-view/RichTreeView'; +import {ThemeProvider, createTheme} from '@mui/material/styles'; import {resolveIcon} from '../fragments/iconResolver'; +// --- Color scheme: watch <html data-mantine-color-scheme="..."> --------------- +const readMantineScheme = () => { + if (typeof document === 'undefined') return 'light'; + const v = document.documentElement.getAttribute('data-mantine-color-scheme'); + return v === 'dark' ? 'dark' : 'light'; +}; + +const useMantineColorScheme = () => { + const [scheme, setScheme] = useState(readMantineScheme); + useEffect(() => { + if (typeof document === 'undefined') return undefined; + const html = document.documentElement; + const sync = () => setScheme(readMantineScheme()); + const obs = new MutationObserver(sync); + obs.observe(html, { + attributes: true, + attributeFilter: ['data-mantine-color-scheme'], + }); + sync(); + return () => obs.disconnect(); + }, []); + return scheme; +}; + +const lightTheme = createTheme({palette: {mode: 'light'}}); +const darkTheme = createTheme({palette: {mode: 'dark'}}); + const TreeView = (props) => { const { id, @@ -129,12 +157,22 @@ const TreeView = (props) => { // --- Container style --- const containerStyle = useMemo(() => { const s = {}; - if (height) s.height = typeof height === 'number' ? `${height}px` : height; + if (height) { + s.height = typeof height === 'number' ? `${height}px` : height; + // A fixed height must CONTAIN the tree: block children grow past + // a fixed-height parent and divs do not clip by default, so + // without this the tree renders full-length over whatever + // follows (seen on /tree-icons' height=200 demo). + s.overflow = 'auto'; + } return s; }, [height]); + const scheme = useMantineColorScheme(); + return ( <div id={id} style={containerStyle}> + <ThemeProvider theme={scheme === 'dark' ? darkTheme : lightTheme}> <RichTreeView items={items || []} getItemId={getItemId} @@ -170,6 +208,7 @@ const TreeView = (props) => { aria-label={ariaLabel} aria-labelledby={ariaLabelledBy} /> + </ThemeProvider> </div> ); }; diff --git a/src/lib/components/TreeViewPro.react.js b/src/lib/components/TreeViewPro.react.js index ffce87f..048f412 100644 --- a/src/lib/components/TreeViewPro.react.js +++ b/src/lib/components/TreeViewPro.react.js @@ -27,9 +27,11 @@ import Slider from '@mui/material/Slider'; import IconButton from '@mui/material/IconButton'; import Menu from '@mui/material/Menu'; import MenuItem from '@mui/material/MenuItem'; +import Divider from '@mui/material/Divider'; import ListItemIcon from '@mui/material/ListItemIcon'; import ListItemText from '@mui/material/ListItemText'; import MoreVertIcon from '@mui/icons-material/MoreVert'; +import ChevronRightIcon from '@mui/icons-material/ChevronRight'; import {resolveIcon} from '../fragments/iconResolver'; let licenseKeySet = false; @@ -136,6 +138,92 @@ const applyReorder = (items, change, idField, childrenField) => { // --- Shared context for per-item slider + kebab ------------------------------ const ItemControlsContext = React.createContext(null); +// --- Kebab menu entries (recursive: leaves, dividers, hover submenus) -------- +// An entry is one of: +// {label, value, icon} — a leaf; picking it fires kebabAction +// {divider: true} — a horizontal rule +// {label, icon, children: [entries]} — a submenu (opens on hover or click) +const KebabSubMenu = ({entry, onLeaf}) => { + const [anchor, setAnchor] = useState(null); + const IconComp = entry.icon ? resolveIcon(entry.icon) : null; + return ( + <React.Fragment> + <MenuItem + onClick={(e) => { + e.stopPropagation(); + setAnchor(e.currentTarget); + }} + onMouseEnter={(e) => setAnchor(e.currentTarget)} + > + {IconComp ? ( + <ListItemIcon> + <IconComp fontSize="small" /> + </ListItemIcon> + ) : null} + <ListItemText>{entry.label}</ListItemText> + <ChevronRightIcon fontSize="small" sx={{ml: 1, opacity: 0.6}} /> + </MenuItem> + <Menu + anchorEl={anchor} + open={Boolean(anchor)} + onClose={() => setAnchor(null)} + onClick={(e) => e.stopPropagation()} + anchorOrigin={{vertical: 'top', horizontal: 'right'}} + transformOrigin={{vertical: 'top', horizontal: 'left'}} + // hover-opened: let the pointer travel into the submenu + sx={{pointerEvents: 'auto'}} + MenuListProps={{onMouseLeave: () => setAnchor(null)}} + > + <KebabEntries + entries={entry.children || []} + onLeaf={(v) => { + setAnchor(null); + onLeaf(v); + }} + /> + </Menu> + </React.Fragment> + ); +}; + +KebabSubMenu.propTypes = { + entry: PropTypes.object, + onLeaf: PropTypes.func, +}; + +const KebabEntries = ({entries, onLeaf}) => { + return (entries || []).map((m, i) => { + if (m.divider) { + return <Divider key={`div-${i}`} />; + } + if (m.children && m.children.length) { + return <KebabSubMenu key={`sub-${i}`} entry={m} onLeaf={onLeaf} />; + } + const IconComp = m.icon ? resolveIcon(m.icon) : null; + return ( + <MenuItem + key={m.value != null ? m.value : `item-${i}`} + onClick={(e) => { + e.stopPropagation(); + onLeaf(m.value); + }} + > + {IconComp ? ( + <ListItemIcon> + <IconComp fontSize="small" /> + </ListItemIcon> + ) : null} + <ListItemText>{m.label}</ListItemText> + </MenuItem> + ); + }); +}; + +KebabEntries.propTypes = { + entries: PropTypes.array, + onLeaf: PropTypes.func, +}; + // Rendered as the TreeItem `label` *slot* (not the `label` prop). MUI passes // the real string label as `children`, plus `onDoubleClick`/`className` that // drive the built-in editing flow — we forward those untouched so editing and @@ -182,9 +270,14 @@ const ItemLabelWithControls = ({ sliderColor, onSliderChange, kebabMenuItems, + kebabMenuItemsById, onKebabAction, } = ctx; + // per-node menu override wins over the global menu + const menuEntries = + (kebabMenuItemsById && kebabMenuItemsById[itemId]) || kebabMenuItems; + const showControls = !controlsItemSet || controlsItemSet.has(itemId); if (!showControls) { return ( @@ -312,26 +405,13 @@ const ItemLabelWithControls = ({ onClose={() => setMenuAnchor(null)} onClick={stopReact} > - {(kebabMenuItems || []).map((m) => { - const IconComp = m.icon ? resolveIcon(m.icon) : null; - return ( - <MenuItem - key={m.value} - onClick={(e) => { - e.stopPropagation(); - setMenuAnchor(null); - onKebabAction(itemId, m.value); - }} - > - {IconComp ? ( - <ListItemIcon> - <IconComp fontSize="small" /> - </ListItemIcon> - ) : null} - <ListItemText>{m.label}</ListItemText> - </MenuItem> - ); - })} + <KebabEntries + entries={menuEntries || []} + onLeaf={(value) => { + setMenuAnchor(null); + onKebabAction(itemId, value); + }} + /> </Menu> </div> ); @@ -488,6 +568,7 @@ const TreeViewPro = ({ sliderStep = 1, sliderColor, kebabMenuItems, + kebabMenuItemsById, // Dash setProps, }) => { @@ -618,6 +699,7 @@ const TreeViewPro = ({ sliderColor: resolvedSliderColor, onSliderChange: handleSliderChange, kebabMenuItems: kebabMenuItems || [], + kebabMenuItemsById: kebabMenuItemsById || null, onKebabAction: handleKebabAction, }), [ @@ -628,6 +710,7 @@ const TreeViewPro = ({ sliderStep, resolvedSliderColor, kebabMenuItems, + kebabMenuItemsById, handleSliderChange, handleKebabAction, ] @@ -945,15 +1028,30 @@ TreeViewPro.propTypes = { */ sliderColor: PropTypes.string, - /** Kebab menu options: [{label, value, icon?}]. `value` is sent back as `action`. */ + /** + * Kebab menu entries. Each entry is one of: + * a LEAF {label, value, icon?} — picking it fires `kebabAction` with + * `action` = its `value`; a DIVIDER {divider: true}; or a SUBMENU + * {label, icon?, children: [entries]} that opens on hover/click + * (nesting is recursive). + */ kebabMenuItems: PropTypes.arrayOf( - PropTypes.exact({ - label: PropTypes.string.isRequired, - value: PropTypes.string.isRequired, + PropTypes.shape({ + label: PropTypes.string, + value: PropTypes.string, icon: PropTypes.string, + divider: PropTypes.bool, + children: PropTypes.array, }) ), + /** + * Per-node kebab menus: {itemId: [entries]} (same entry shape as + * `kebabMenuItems`, submenus/dividers included). A node listed here gets + * its own menu; all other nodes fall back to `kebabMenuItems`. + */ + kebabMenuItemsById: PropTypes.objectOf(PropTypes.array), + /** Output: fires once on each commit (mouse-up) of a slider drag. {itemId, value, event_timestamp} */ sliderChange: PropTypes.exact({ itemId: PropTypes.string, diff --git a/templates/index.html b/templates/index.html index 2cde350..2a7c67a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,9 +1,19 @@ <!DOCTYPE html> <html lang="en"> <head> - <!-- ======================================================================== - ANALYTICS - ======================================================================== --> + <!-- CHARSET MUST BE FIRST: the HTML spec requires the encoding + declaration entirely within the first 1024 bytes, and the per-page + meta block Dash prepends inside its placeholder grows with every + description. Declaring it here pins it near byte 60. The duplicate + charset Dash emits later is deliberate and harmless. + + NEVER NAME A DASH PLACEHOLDER INSIDE A COMMENT: Dash substitutes + placeholders by plain string replacement over the whole template, + comments included, and a named one duplicates its entire block on + every response — invisible in a browser, fully visible to + scrapers. --> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-6WYY9JHMP2"></script> @@ -14,69 +24,115 @@ gtag('config', 'G-6WYY9JHMP2'); </script> - <!-- ======================================================================== - BASIC META TAGS - ======================================================================== --> - - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <!-- Dash emits, per page, from register_page(): description, og:type, + og:title, og:description, og:image and the full twitter set. Do NOT + restate any of those below — a second, site-level copy is strictly + worse than the page-level one, and which duplicate a scraper honours + is undefined (in practice the later tag wins). The hardcoded title, + og/twitter block, canonical and stale JSON-LD that used to live here + were exactly that failure. --> + {%metas%} + <title>{%title%} + {%css%} - - Dash MUI Charts - Interactive MUI X Charts for Python Dash - - - + - - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + - - + - + + + - - + - - - {%metas%} - {%title%} - {%css%} + + + {%app_entry%} - +
+ {%config%} + {%scripts%} + {%renderer%} +
- - - - - - {%app_entry%} - - - -
- {%config%} - {%scripts%} - {%renderer%} -
diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..1ea664f --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,202 @@ +"""Shared fixtures — boot the real app once, with ZERO secrets, and interrogate it. + +The suite deliberately exercises `run.py` itself rather than a stripped-down +app assembled for testing: nearly everything worth catching lives in the +wiring — registration order, which before_request runs first, whether a page's +metadata survived to the response. A test app that re-implements that wiring +tests the re-implementation. + +SECRETLESS, AND ORDER MATTERS. This suite runs against the app exactly as +CI's zero-secret container does: no MUI_PRO_API_KEY (the 17 Pro pages must +degrade to their license banners — that degradation IS a test, in +test_pages_smoke.py), no CROSS_APP_WEBHOOK_SECRET (the traffic reporter never +starts a thread), no NETWORK_BULLETIN_URL (the llms viewer falls back to +built-in tips), and the analytics hit log in a temp dir so a test run never +lands in the real ledger or the next hourly rollup. + +The env block below has to run BEFORE anything imports `run.py`, because +run.py calls `load_dotenv()` during import and the developer's local `.env` +(which holds a real MUI_PRO_API_KEY) would otherwise flip the app into a +configured posture. `load_dotenv()` never overrides an existing key, so +pinning each secret to `""` here (falsy to every `os.environ.get(...)` +reader) neutralises the file without deleting it. In CI there is no `.env` +at all and this is belt-and-braces. Same pattern as the boilerplate, +dash-email and pip-docs+. +""" +from __future__ import annotations + +import importlib.util +import os +import sys +import tempfile +from pathlib import Path + +import pytest + +REPO_ROOT = Path(__file__).resolve().parent.parent +sys.path.insert(0, str(REPO_ROOT)) + +# --- 1. Neutralise every secret (must precede any import of run.py) --------- +SECRET_ENV_KEYS = ( + "MUI_PRO_API_KEY", + "CROSS_APP_WEBHOOK_SECRET", + "NETWORK_BULLETIN_URL", +) +for _key in SECRET_ENV_KEYS: + os.environ[_key] = "" + +# --- 2. Keep app state out of the repo, and identity deterministic ---------- +_TMP_STATE = tempfile.mkdtemp(prefix="muicharts-tests-") +os.environ["ANALYTICS_DIR"] = _TMP_STATE +# Reporting is already off (no secret); the explicit kill switch documents it. +os.environ["TRAFFIC_REPORT"] = "0" +# A dev .env pointing APP_BASE_URL elsewhere must not change what the suite +# measures — every canonical/og assertion is against the network domain. +os.environ["APP_BASE_URL"] = "https://muicharts.2plot.dev" +os.environ.setdefault("APP_ENV", "test") + +BROWSER_UA = ( + "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 " + "(KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" +) +CRAWLER_UA = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" + +# What a real browser sends. `//llms.txt` negotiates on this header — +# not on the User-Agent — so it is what separates "a person opened the URL" +# from "an agent fetched it". +BROWSER_ACCEPT = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" + +# The body dash-improve-my-llms serves when a page has no prose registered. +STUB_MARKER = "This page contains interactive content that requires JavaScript" + + +@pytest.fixture(scope="session") +def app_module(): + """Import run.py as a module, from the repo root. + + run.py opens templates/index.html relative to its own file, but + pages/changelog.py reads CHANGELOG.md from disk, so the process CWD has + to be the repo root regardless of where pytest was invoked from. + """ + os.chdir(REPO_ROOT) + spec = importlib.util.spec_from_file_location("appmod", REPO_ROOT / "run.py") + module = importlib.util.module_from_spec(spec) + sys.modules["appmod"] = module + spec.loader.exec_module(module) + return module + + +@pytest.fixture(scope="session") +def app(app_module): + return app_module.app + + +class Response: + __slots__ = ("status", "text", "headers") + + def __init__(self, status: int, text: str, headers=None) -> None: + self.status = status + self.text = text + # Lowercased: gunicorn sends `content-type`, Werkzeug `Content-Type`; + # assertions must not care. + self.headers = {k.lower(): v for k, v in (headers or {}).items()} + + @property + def ok(self) -> bool: + return self.status == 200 + + def header(self, name: str, default: str = "") -> str: + return self.headers.get(name.lower(), default) + + @property + def content_type(self) -> str: + return self.header("Content-Type") + + def __repr__(self) -> str: # pragma: no cover - assertion output only + return f"" + + +class Client: + """`.get(path, user_agent=..., accept=...) -> Response` over Werkzeug.""" + + def __init__(self, raw) -> None: + self._raw = raw + + def get(self, path: str, user_agent: str = BROWSER_UA, + accept: str | None = None) -> Response: + headers = {"User-Agent": user_agent} + if accept is not None: + headers["Accept"] = accept + r = self._raw.get(path, headers=headers) + # errors="replace", not `as_text=True`: strict decoding raises on any + # binary response, so a test that merely checks a favicon RESOLVES + # would blow up on the icon's first byte. + return Response(r.status_code, r.get_data().decode("utf-8", "replace"), + dict(r.headers)) + + +@pytest.fixture(scope="session") +def client(app): + return Client(app.server.test_client()) + + +@pytest.fixture(scope="session") +def tmp_state_dir(): + """Where the analytics hit log lives for this run.""" + return _TMP_STATE + + +@pytest.fixture(scope="session") +def pages(app_module): + """Every registered page as (path, entry), sorted by path.""" + import dash + + return sorted(((entry["path"], entry) for entry in dash.page_registry.values()), + key=lambda item: item[0]) + + +@pytest.fixture(scope="session") +def page_paths(pages): + return [path for path, _entry in pages] + + +def component_iter(node): + """Depth-first over every Dash component reachable from ``node`` — + through children AND through any component-valued prop (dmc uses + label=/leftSection=/etc. freely). Same walker as scripts/route_parity.py.""" + from dash.development.base_component import Component + + stack = [node] + while stack: + cur = stack.pop() + if isinstance(cur, Component): + yield cur + for name in cur._prop_names: + val = getattr(cur, name, None) + if val is not None and name != "id": + stack.append(val) + elif isinstance(cur, (list, tuple)): + stack.extend(cur) + elif isinstance(cur, dict): + stack.extend(cur.values()) + + +def layout_text(layout) -> str: + """Every string prop value in a layout tree, joined — a haystack for + asserting that rendered copy (a license banner, a version badge) exists + without caring where in the tree it sits.""" + parts: list[str] = [] + for comp in component_iter(layout): + for name in comp._prop_names: + val = getattr(comp, name, None) + if isinstance(val, str): + parts.append(val) + return "\n".join(parts) + + +def page_layout(entry): + """A page's constructed layout, whether registered as a value or a callable.""" + layout = entry.get("layout") + if layout is None: + layout = getattr(sys.modules[entry["module"]], "layout", None) + return layout() if callable(layout) else layout diff --git a/tests/test_internal_traffic.py b/tests/test_internal_traffic.py new file mode 100644 index 0000000..e35796e --- /dev/null +++ b/tests/test_internal_traffic.py @@ -0,0 +1,173 @@ +"""The network's internal-traffic contract — the analytics point of truth. + +The rule (https://2plot.ai/docs/satellite-analytics, "Internal traffic"): a +request whose User-Agent contains `2plot-internal` is 2plot machinery talking +to itself — the hub's hourly health sweep, CI smoke batteries, this app's own +server-to-server calls — and is counted NOWHERE. Dropped at WRITE time, +before bot classification. `/healthz` is never a visit either. + +Both halves are tested, because a contract kept on only one side is not kept +at all: + +*inbound* token-carrying requests never reach the hit log, and therefore + never reach human_hits/bot_hits in the hourly rollup; +*outbound* every call this host makes to another network host sends + INTERNAL_UA, so the far side can apply the same rule. That half + was the Phase 2 fix: the ad client fetched a campaign from + 2plot.dev on every page view, arriving as `python-requests/2.x`, + and the hub counted this satellite's readers as its own bots. +""" +from __future__ import annotations + +import urllib.request + +import pytest + +from conftest import BROWSER_UA, CRAWLER_UA, REPO_ROOT +from lib import analytics +from lib.constants import INTERNAL_UA, INTERNAL_UA_TOKEN, internal_ua + +# A real doc page: analytics.trackable_path drops infrastructure paths +# (/healthz, /llms.txt, ...), so an assertion against one of those would +# pass no matter what the recorder did. +PAGE = "/sparkline" + + +def _ledger(): + return analytics.load_day() + + +# --------------------------------------------------------------- the token -- + + +def test_token_is_the_network_wide_string(): + """The contract only works if every host agrees on the byte sequence.""" + assert INTERNAL_UA_TOKEN == "2plot-internal" + assert INTERNAL_UA.startswith(INTERNAL_UA_TOKEN) + + +def test_caller_suffix_never_breaks_the_token(): + ua = internal_ua("traffic-report") + assert INTERNAL_UA_TOKEN in ua + assert ua.endswith("traffic-report") + assert internal_ua() == INTERNAL_UA + assert internal_ua(" ") == INTERNAL_UA + + +# ------------------------------------------------------------------ inbound -- + + +def test_the_tests_can_see_the_ledger_at_all(client, tmp_state_dir): + """Guard for every delta assertion below: if the ledger path were wrong + (or the suite were writing into the repo's own analytics/), every + "count did not change" test would pass vacuously.""" + assert str(analytics.analytics_dir()) == tmp_state_dir + before = len(_ledger()) + client.get(PAGE, user_agent=BROWSER_UA) + assert len(_ledger()) == before + 1 + + +def test_internal_ua_is_counted_nowhere(client): + before = len(_ledger()) + client.get(PAGE, user_agent=internal_ua("network-smoke")) + client.get("/", user_agent=INTERNAL_UA) + assert len(_ledger()) == before + + +def test_a_crawler_shaped_probe_carrying_the_token_stays_internal(client): + """The battery's crawler probe exercises the bot path deliberately. It + must still not be counted — which is precisely why the drop happens + BEFORE bot classification; after it, the probe files under bot_hits.""" + before = len(_ledger()) + client.get(PAGE, user_agent=f"{CRAWLER_UA} {INTERNAL_UA}") + assert len(_ledger()) == before + + +def test_the_token_is_matched_case_insensitively(client): + before = len(_ledger()) + client.get(PAGE, user_agent="2PLOT-INTERNAL/1.0 Health-Sweep") + assert len(_ledger()) == before + + +def test_healthz_is_never_a_visit(client): + before = len(_ledger()) + client.get("/healthz", user_agent="Render/1.0 health-check") + client.get("/healthz", user_agent=BROWSER_UA) + assert len(_ledger()) == before + + +def test_real_traffic_is_still_counted(client): + """The exclusions must not have lobotomised the recorder: a rule that + drops everything also satisfies every assertion above.""" + before = len(_ledger()) + client.get(PAGE, user_agent=BROWSER_UA) + client.get(PAGE, user_agent=CRAWLER_UA) + rows = _ledger() + assert len(rows) == before + 2 + assert rows[-2]["bot"] is False + assert rows[-1]["bot"] is True + assert all(r["source"] == "doc" for r in rows[-2:]) + + +# ----------------------------------------------------------------- outbound -- + + +class _Captured(Exception): + """Abort the request once the headers have been seen.""" + + +def test_the_traffic_rollup_post_sends_the_token(monkeypatch): + from lib import traffic_report + + seen = {} + + def fake_urlopen(req, timeout=None): + seen["ua"] = req.get_header("User-agent") or "" + raise _Captured + + monkeypatch.setattr(urllib.request, "urlopen", fake_urlopen) + with pytest.raises(_Captured): + traffic_report.report_traffic( + {"app": "muicharts", "date": "2026-08-01"}, secret="test-secret" + ) + assert INTERNAL_UA_TOKEN in seen["ua"] + + +def test_the_ad_fetch_sends_the_token(monkeypatch): + """One fetch per docs page view — the loudest outbound call this app + makes. The canonical ad_client sends the UA per request (headers= in + fetch_ad), so the capture happens at the session.get seam.""" + from lib import ad_client + + seen = {} + + def fake_get(url, params=None, timeout=None, headers=None): + seen.update(headers or {}) + raise _Captured + + monkeypatch.setattr(ad_client._session, "get", fake_get) + monkeypatch.setattr(ad_client, "_last_failure", 0.0) + assert ad_client.fetch_ad("/sparkline") is None + assert INTERNAL_UA_TOKEN in seen.get("User-Agent", "") + + +@pytest.mark.parametrize("script", ["network_smoke", "smoke_live"]) +def test_every_battery_script_sends_the_token(script): + """A post-deploy battery sweeps every peer; it must not register + anywhere as a visitor or a crawler.""" + import importlib.util + + spec = importlib.util.spec_from_file_location( + f"_ua_{script}", REPO_ROOT / "scripts" / f"{script}.py" + ) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + + agents = [ + value + for name, value in vars(module).items() + if (name == "UA" or name.endswith("_UA")) and isinstance(value, str) + ] + assert agents, f"scripts/{script}.py declares no User-Agent constant" + missing = [ua for ua in agents if INTERNAL_UA_TOKEN not in ua] + assert missing == [], f"scripts/{script}.py sends untokened UAs: {missing}" diff --git a/tests/test_pages_smoke.py b/tests/test_pages_smoke.py new file mode 100644 index 0000000..530057f --- /dev/null +++ b/tests/test_pages_smoke.py @@ -0,0 +1,248 @@ +"""Route smoke + the preservation invariants of the network-standard pass. + +The exact-tree route-parity gate lives in scripts/route_parity.py and needs +the real MUI_PRO_API_KEY (its baseline was recorded with Pro charts mounted). +CI is secretless BY DESIGN (LESSONS §18), so this suite asserts the layer +below exact parity: every page module imports, every layout constructs, +every route serves 200, and the 17 Pro pages DEGRADE rather than die — the +zero-secret posture is the test, not a limitation. + +The second half pins the app-shell invariants the kickoff names: the three +subsystems hanging off `dcc.Location(id="url")`, the SimpleTreeView sidebar +(the library dogfooding itself), and the asset contracts that fail silently +(muiChartsFunctions.js, the 00- asset ordering, the liquid-glass CSS two +pages die without). +""" +from __future__ import annotations + +import json + +from conftest import CRAWLER_UA, REPO_ROOT, STUB_MARKER, layout_text, page_layout + +EXPECTED_ROUTES = 41 # 40 originals + /api (added in M5) + +# Routes whose demos read MUI_PRO_API_KEY (17, measured 2026-08-02). Pinned +# by ROUTE, not by source file: the boilerplate migration moves a page's +# key-reading code from pages/.py into N exec modules under docs/, but +# the route's degradation obligation never moves. +PRO_ROUTES = [ + "/barchart-pro", "/composite", "/composite-render-bp", "/composite-v120", + "/crosshair", "/heatmap", "/heatmap-props", "/highlighting-sync", + "/linechart-basic", "/linechart-brush", "/linechart-highlighting", + "/linechart-pro", "/linechart-referencelines", "/linechart-tick-hover", + "/linechart-zoom-preview", "/live-trading", "/tree-pro", +] + +# Since M3, EVERY Pro route explains the key requirement in-page — a +# keyless-only banner, or (on markdown-driven pages) a Pro admonition that +# names MUI_PRO_API_KEY permanently. Silent degradation to a watermarked +# chart with no explanation is no longer an allowed posture. +BANNER_ROUTES = set(PRO_ROUTES) + + +# ------------------------------------------------------------- route smoke -- + + +def test_the_full_route_set_is_registered(page_paths): + assert len(page_paths) == EXPECTED_ROUTES, ( + f"{len(page_paths)} routes registered — a page module failed to " + f"import, or one was added without updating this gate: {page_paths}" + ) + assert "/" in page_paths + assert "/changelog" in page_paths + + +def test_every_layout_constructs_without_secrets(pages): + """Module-level layouts are built at import with whatever env exists — + this proves all 40 build with NONE.""" + broken = [] + for path, entry in pages: + layout = page_layout(entry) + if layout is None: + broken.append(path) + assert broken == [], f"pages with no constructible layout: {broken}" + + +def test_every_route_serves_200(client, page_paths): + failing = {} + for path in page_paths: + status = client.get(path).status + if status != 200: + failing[path] = status + assert failing == {}, failing + + +def test_healthz_returns_ok_true(client): + """A 200 with different JSON is a deploy-blocking "unhealthy" to the + network battery (LESSONS §11) — the field, not just the status.""" + response = client.get("/healthz") + assert response.ok + body = json.loads(response.text) + assert body.get("ok") is True + assert body.get("app") == "muicharts" + + +def test_dash_plumbing_answers(client): + assert client.get("/_dash-layout").ok + assert client.get("/_dash-dependencies").ok + + +def test_the_changelog_page_reads_its_file(client, pages): + """pages/changelog.py is the only module in pages/ with a filesystem + dependency (it renders CHANGELOG.md from disk) — the page that breaks + first when the working directory or the file moves.""" + entry = dict(pages)["/changelog"] + text = layout_text(page_layout(entry)) + assert "Changelog" in text or "changelog" in text + assert client.get("/changelog").ok + + +def test_a_crawler_gets_prose_not_the_stub(client): + """The dimll prerender path: a crawler that receives the JavaScript stub + indexes nothing, while the page looks perfect in a browser.""" + response = client.get("/", user_agent=CRAWLER_UA) + assert response.ok + assert STUB_MARKER not in response.text + + +# --------------------------------------------------------- Pro degradation -- + + +def test_every_pro_route_is_still_registered(page_paths): + missing = sorted(set(PRO_ROUTES) - set(page_paths)) + assert missing == [], f"Pro routes gone from the registry: {missing}" + + +def test_pro_routes_degrade_not_die(client, pages): + """With no license key every Pro route must still construct and serve — + showing its license banner or an unlicensed chart, never a traceback. + This posture is what lets CI run with zero secrets.""" + by_path = dict(pages) + for path in PRO_ROUTES: + assert page_layout(by_path[path]) is not None, f"{path} has no layout" + assert client.get(path).ok, f"{path} does not serve without a key" + + +def test_banner_routes_show_their_banner(pages): + """The routes that explain the missing key must actually say so when it + is missing — the banner is the difference between "degraded" and + "silently broken" for a reader. Set equality both ways: a banner + disappearing is a regression, a banner appearing is a deliberate + improvement that updates BANNER_ROUTES.""" + by_path = dict(pages) + showing = { + path for path in PRO_ROUTES + if "MUI_PRO_API_KEY" in layout_text(page_layout(by_path[path])) + } + assert showing == BANNER_ROUTES, ( + f"missing banner: {sorted(BANNER_ROUTES - showing)}; " + f"new banner (update BANNER_ROUTES): {sorted(showing - BANNER_ROUTES)}" + ) + + +# ------------------------------------------------------ shell invariants ---- + + +def test_the_url_location_contract(app): + """`dcc.Location(id="url", refresh="callback-nav")` is load-bearing for + THREE subsystems — navigation, register_shell_ad, and the SPA page-view + counter. The id changing breaks all three at once, silently.""" + from conftest import component_iter + + locations = [c for c in component_iter(app.layout) + if getattr(c, "id", None) == "url"] + assert len(locations) == 1, "the url dcc.Location is gone or duplicated" + assert getattr(locations[0], "refresh", None) == "callback-nav" + + +def test_the_navbar_families_cover_the_registry_exactly(page_paths): + """The family map in components/navbar.py is the nav order authority + (what page_order is to the boilerplate). Every mapped path must be a + registered route (or a sidebar click 404s), and every registered route + must be mapped (or it renders in the unsorted "Other" section).""" + from components.navbar import FAMILIES, TOP_LINKS + + mapped = {p for _t, entries in FAMILIES for p, _label, _icon in entries} + mapped |= {p for p, _label, _icon in TOP_LINKS} + dead = sorted(mapped - set(page_paths)) + assert dead == [], f"nav entries with no registered route: {dead}" + unmapped = sorted(set(page_paths) - mapped) + assert unmapped == [], ( + f"registered routes missing from the navbar family map: {unmapped}" + ) + + +def test_the_analytics_sink_exists(app): + """The SPA page-view recorder's output target. (The old shell's + license-key-store retired with it — pages read MUI_PRO_API_KEY from the + environment directly; the store was dead plumbing.)""" + from conftest import component_iter + + # String ids only — ad slots' pattern-matching dict ids are unhashable. + ids = {c.id for c in component_iter(app.layout) + if isinstance(getattr(c, "id", None), str)} + assert "analytics-sink" in ids, "the SPA page-view callback lost its sink" + + +def test_ad_slots_are_per_page_asides_not_a_shell_slot(app, pages): + """The boilerplate ad architecture: pages/markdown.py injects one slot + into each markdown page's TOC aside, attributed to that page's endpoint; + the mount-fired MATCH callback serves it per view. The old floating + shell slot (and the fork that existed to de-duplicate it) is retired — + a "__floating__" slot reappearing means the fork came back too.""" + from conftest import component_iter + + shell_slots = [c for c in component_iter(app.layout) + if isinstance(getattr(c, "id", None), dict) + and c.id.get("type") == "net-ad-container"] + assert shell_slots == [], "a static shell ad slot is back" + + # markdown.py registers pages under their display NAME (not a pages.* + # module path) — that asymmetry is the marker for markdown-driven pages. + ported = [(path, entry) for path, entry in pages + if not entry["module"].startswith("pages.")] + assert ported, "no markdown-driven pages registered yet?" + for path, entry in ported: + slots = [c for c in component_iter(page_layout(entry)) + if isinstance(getattr(c, "id", None), dict) + and c.id.get("type") == "net-ad-container"] + assert len(slots) == 1, f"{path}: expected one aside ad slot" + assert slots[0].id.get("page") == path, ( + f"{path}: ad slot attributed to {slots[0].id.get('page')!r}" + ) + + +# ---------------------------------------------------------- asset contracts -- + + +def test_the_functions_registry_is_intact(): + """assets/muiChartsFunctions.js is the runtime contract for every + `valueFormatter={'function': 'formatDate', ...}` example — deleting or + renaming it breaks chart axes on a dozen pages with no server error.""" + src = (REPO_ROOT / "assets" / "muiChartsFunctions.js").read_text() + assert "dashMuiChartsFunctions" in src + assert "formatDate" in src + + +def test_the_old_shell_assets_stay_deleted(app): + """00-loading-theme.js and 01-nav-restore.js served the RETIRED shell: + the theme script applied a stale `mantine-color-scheme-value` + localStorage key that would fight the boilerplate shell's + color-scheme-storage system on every load, and nav-restore set props on + a nav-tree that no longer exists. Their return means two theme systems + disagreeing about dark mode.""" + from conftest import component_iter + + scripts = {p.name for p in (REPO_ROOT / "assets").glob("*.js")} + assert "00-loading-theme.js" not in scripts + assert "01-nav-restore.js" not in scripts + # The replacement: the appshell's persisted color-scheme store. + ids = {c.id for c in component_iter(app.layout) + if isinstance(getattr(c, "id", None), str)} + assert "color-scheme-storage" in ids, "the theme persistence store is gone" + + +def test_the_liquid_glass_styles_exist(): + """Two pages (TimeClock Lab among them) die silently without these.""" + for name in ("liquid_glass.css", "liquid_glass_clock.css"): + assert (REPO_ROOT / "assets" / name).exists(), f"assets/{name} missing" diff --git a/tests/test_site_identity.py b/tests/test_site_identity.py new file mode 100644 index 0000000..235e683 --- /dev/null +++ b/tests/test_site_identity.py @@ -0,0 +1,185 @@ +"""Site identity: one brand, every surface, verbatim. + +The network standard (STANDARD.md §1) says a site states what it is in the +same words everywhere an agent or a reader can reach. The failure this pins +is silent, which is why it needs tests rather than a code review: nothing +errors when a surface falls back to a default. Before Phase 1 of the +network-standard pass this host published its identity from a hardcoded +template block — with two elements, og tags pinned to +dash-mui-charts.onrender.com, and a JSON-LD version two releases stale. +""" +from __future__ import annotations + +import re + +from conftest import BROWSER_ACCEPT, REPO_ROOT +from lib.constants import ( + PAGE_TITLE_PREFIX, + SITE_BRAND, + SITE_DESCRIPTION, + SITE_SHORT_NAME, +) + +# Spelled out rather than imported, so that renaming the constant cannot +# silently rename the site. Changing the brand should require changing this +# line, deliberately. +EXPECTED_BRAND = "dash-mui-charts — MUI X charts for Dash" + +# A community page with registered LLMS_DOC prose — its /llms.txt viewer is +# where the brand chip renders. +PROSE_PAGE = "/sparkline" + + +def test_brand_constant_is_the_agreed_identity(): + assert SITE_BRAND == EXPECTED_BRAND + + +def test_app_title_is_the_brand(app): + """`Dash(title=...)` — the <title> and `resolve_site_title`'s fallback.""" + assert app.title == EXPECTED_BRAND + + +def test_llms_index_h1_is_the_brand(client): + """The single most-read line of this site, and the one nobody looks at.""" + response = client.get("/llms.txt") + assert response.ok + assert response.content_type.startswith("text/markdown") + assert response.text.splitlines()[0] == f"# {EXPECTED_BRAND}" + + +def test_llms_index_tagline_is_the_description(client): + body = client.get("/llms.txt").text + assert f"> {SITE_DESCRIPTION}" in body + + +def test_the_viewer_brand_chip_is_not_a_framework_default(client): + """The chip that reads a bare "Dash" on a pre-2.3.4 artifact. + + Rendered from the same `resolve_site_title` call as the /llms.txt H1, so + asserting the brand is present catches both a stale package and a + regressed constant. The brand arrives HTML-escaped (the em dash and any + apostrophes), so compare the escaped form. + """ + import html as html_module + + page = client.get(f"{PROSE_PAGE}/llms.txt", accept=BROWSER_ACCEPT) + assert page.ok + assert "text/html" in page.content_type + assert html_module.escape(EXPECTED_BRAND) in page.text or EXPECTED_BRAND in page.text, ( + "the viewer banner does not name this site" + ) + + +def test_the_package_name_is_first_in_the_brand(): + """The LIBRARY rule (STANDARD §1): people install `dash-mui-charts`, so + the brand must lead with the package name — unlike the boilerplate, + which keeps its package name out because nobody installs a template.""" + assert SITE_BRAND.startswith("dash-mui-charts") + + +def test_the_byline_is_in_the_description_not_the_brand(): + """"Pip Install Python" is who made it, never what the site is called. + A brand of "Pip Install Python" would make every satellite in the + network share one name.""" + assert "Pip Install Python" in SITE_DESCRIPTION + assert "Pip Install Python" not in SITE_BRAND + + +def test_no_surface_falls_back_to_a_generic_title(): + """The values `resolve_site_title` is designed to skip. If the brand were + ever set to one of these, the package would silently fall through to the + next candidate and this repo would have no idea which string it was + publishing.""" + from dash_improve_my_llms.handlers import _GENERIC_SITE_TITLES + + assert SITE_BRAND.strip().lower() not in _GENERIC_SITE_TITLES + + +def test_llms_package_floor_is_the_network_standard(): + """Identity resolution lives in the package; the floor is what delivers it.""" + import dash_improve_my_llms as pkg + + parts = tuple(int(p) for p in pkg.__version__.split(".")[:3] if p.isdigit()) + assert parts >= (2, 3, 4), ( + f"dash-improve-my-llms {pkg.__version__} predates resolve_site_title; " + "the viewer chip and the /llms.txt H1 would fall back to app.title" + ) + + +# --------------------------------------------------------------------------- +# The per-page title — a share-card surface, not just a browser tab. +# Dash passes each page's `title` straight into og:title and twitter:title +# (dash/_pages.py _page_meta_tags), so PAGE_TITLE_PREFIX sets the headline +# of every unfurl this site produces. +# --------------------------------------------------------------------------- + + +def test_the_page_title_prefix_is_this_site(): + assert PAGE_TITLE_PREFIX == f"{SITE_SHORT_NAME} | " + + +def test_the_short_name_cannot_drift_from_the_brand(): + """Two constants, one identity. Derived, so this should be automatic.""" + assert SITE_BRAND.startswith(SITE_SHORT_NAME) + + +def test_the_share_card_headline_names_this_site(client): + """og:title and twitter:title, as a scraper reads them.""" + html = client.get("/").text + for tag in ("og:title", "twitter:title"): + found = re.findall( + rf'<meta[^>]*property="{tag}"[^>]*content="([^"]*)"', html + ) + assert found, f"no {tag} on the home page" + for value in found: + assert SITE_SHORT_NAME in value, f"{tag}={value!r} does not name this site" + + +def test_og_site_name_is_the_brand(client): + html = client.get("/").text + found = re.findall( + r'<meta[^>]*property="og:site_name"[^>]*content="([^"]*)"', html + ) + assert found == [EXPECTED_BRAND], found + + +# --------------------------------------------------------------------------- +# The canonical origin — the failure that deindexes a satellite +# --------------------------------------------------------------------------- + + +def test_base_url_defaults_to_the_network_domain(): + from lib.constants import DEFAULT_BASE_URL + + assert DEFAULT_BASE_URL == "https://muicharts.2plot.dev" + + +def test_production_refuses_a_platform_hostname(monkeypatch): + """*.onrender.com keeps resolving after the custom domain is attached; + canonicals pointing there split link equity across two hosts while + nothing about the running site looks wrong.""" + import pytest + + from lib.constants import require_owned_base_url + + monkeypatch.setenv("RENDER", "true") + with pytest.raises(RuntimeError): + require_owned_base_url("https://dash-mui-charts.onrender.com") + # The owned domain boots fine under the same flag. + require_owned_base_url("https://muicharts.2plot.dev") + + +def test_identity_files_do_not_publish_the_legacy_host(): + """Scoped to files that PUBLISH identity (LESSONS §7) — a whole-repo + grep hits legitimate strings (CHANGELOG history, .claude notes). The + needle is the FULL legacy hostname: the bare "onrender.com" is + legitimately part of require_owned_base_url's platform blocklist.""" + offenders = [] + for path in ("lib/constants.py", "templates/index.html", + "scripts/network_smoke.py"): + text = (REPO_ROOT / path).read_text() + stripped = re.sub(r"#.*", "", text) if path.endswith(".py") else text + stripped = re.sub(r"<!--.*?-->", "", stripped, flags=re.S) + if "dash-mui-charts.onrender.com" in stripped: + offenders.append(path) + assert offenders == [], f"the legacy host survives in {offenders}" diff --git a/tests/test_social_card.py b/tests/test_social_card.py new file mode 100644 index 0000000..e1e591c --- /dev/null +++ b/tests/test_social_card.py @@ -0,0 +1,259 @@ +"""The social card — the surface that fails silently and OUTSIDE the app. + +Nobody sees their own unfurls, which is why this needs tests rather than a +look at the page. The two failure classes, both shipped somewhere on this +network before the standard existed: + +1. **An empty og:image later in the document wins** (LESSONS §1). Dash emits + `content=""` for any register_page missing `image_url=`/`description=`, + and scrapers take the LAST tag. One page missing either and its card + renders blank while every test of the template passes. +2. **A duplicate og:image, one of them unusable.** The template restating a + tag Dash also emits gives scrapers two to choose from — and which + duplicate wins is undefined. + +Where each tag comes from decides which file to open when a check fails: +`description`, `og:type/title/description/image` and the `twitter:*` set are +DASH's (per page, from register_page); `og:site_name`, `og:url`, the +`og:image:*` auxiliaries and the icon links are `templates/index.html`'s. +dash-improve-my-llms adds a third set on the prerender path only, marked +`data-dimll-prerender` — social scrapers do not take that path, which is why +deleting the template would silently kill every unfurl. +""" +from __future__ import annotations + +import re + +from conftest import REPO_ROOT +from lib.constants import ( + OG_IMAGE_ALT, + OG_IMAGE_HEIGHT, + OG_IMAGE_TYPE, + OG_IMAGE_URL, + OG_IMAGE_WIDTH, +) + +TEMPLATE = REPO_ROOT / "templates" / "index.html" + + +def _visible(html: str) -> str: + """The document with HTML comments removed — the template documents + itself with example tags a regex cannot tell from live ones.""" + return re.sub(r"<!--.*?-->", "", html, flags=re.S) + + +def _meta(html: str, value: str) -> list[str]: + """Every `content` for a property/name — a list, so duplicates show up. + + Tags carrying `data-dimll-prerender` are excluded: dash-improve-my-llms + injects its own OG block on the prerender path and marks each tag + precisely so it can be told apart. Counting those would make this fail + on package behaviour nothing in this repo controls. + """ + pattern = ( + rf'<meta[^>]*(?:property|name)="{re.escape(value)}"[^>]*content="([^"]*)"' + rf'|<meta[^>]*content="([^"]*)"[^>]*(?:property|name)="{re.escape(value)}"' + ) + body = re.sub(r'<meta[^>]*data-dimll-prerender[^>]*>', "", _visible(html)) + return ["".join(m) for m in re.findall(pattern, body)] + + +# --------------------------------------------------------- the registrations -- + + +def test_every_page_registers_the_card_image_and_a_description(pages): + """The root cause of LESSONS §1, asserted at the source: 40 pages, 40 + `image_url=`, 40 non-empty descriptions. One missing and Dash emits an + empty tag that, later in document order, wins with scrapers.""" + missing = [] + for path, entry in pages: + if entry.get("image_url") != OG_IMAGE_URL: + missing.append(f"{path}: image_url={entry.get('image_url')!r}") + if not (entry.get("description") or "").strip(): + missing.append(f"{path}: empty description") + assert missing == [], missing + + +# ------------------------------------------------------------- the og image -- + + +def test_the_og_image_is_never_empty_and_declared_exactly_once(client, page_paths): + for path in page_paths: + html = client.get(path).text + images = _meta(html, "og:image") + assert len(images) == 1, ( + f"{path} has og:image {images} — a scraper picks one, and it " + "will not be the one you meant" + ) + assert images[0].strip(), f"{path} serves an EMPTY og:image — blank card" + assert len(_meta(html, "twitter:image")) == 1 + + +def test_the_image_is_not_an_svg(client): + """SVG is rejected by Facebook, Twitter/X, LinkedIn and Slack alike, and + Dash's asset inference emits one the moment a register_page loses its + image_url= while assets/ holds a logo.""" + for prop in ("og:image", "twitter:image"): + for src in _meta(client.get("/").text, prop): + assert not src.lower().endswith(".svg"), f"{prop} is an SVG: {src}" + + +def test_the_image_is_absolute_and_matches_the_constant(client): + for prop in ("og:image", "twitter:image"): + values = _meta(client.get("/").text, prop) + assert values, f"no {prop} on the home page" + for src in values: + assert src.startswith("http"), f"{prop}={src!r} is not absolute" + assert src == OG_IMAGE_URL + + +def test_the_image_is_hosted_off_the_app(): + """The card must be on the CDN, not served by this app: a card the app + serves is fetched at unfurl time, and on a cold free-tier container that + request times out and the platform caches the miss — the first person to + share the link poisons it for everyone. + + That the URL RESOLVES is deliberately not checked here — reaching a + third party would make this suite depend on Cloudflare being up. + `scripts/smoke_live.py` fetches the real file after every deploy and + checks its actual pixels against these constants. + """ + assert OG_IMAGE_URL.startswith("https://cdn.2plot.ai/github_assets/"), ( + f"{OG_IMAGE_URL} is not on the network CDN" + ) + assert "/assets/" not in OG_IMAGE_URL, "the app is serving its own card again" + + +def test_the_auxiliary_image_tags_match_the_constants(client): + """index.html hard-codes the dimensions; lib/constants.py is the source. + A declared width/height that disagrees with the file is worse than + declaring none — the platform reserves the wrong box and crops.""" + html = client.get("/").text + assert _meta(html, "og:image:width") == [str(OG_IMAGE_WIDTH)] + assert _meta(html, "og:image:height") == [str(OG_IMAGE_HEIGHT)] + assert _meta(html, "og:image:alt") == [OG_IMAGE_ALT] + assert _meta(html, "og:image:type") == [OG_IMAGE_TYPE] + assert _meta(html, "og:image:secure_url") == [OG_IMAGE_URL], ( + "secure_url must be the same file as og:image, not a stale copy" + ) + + +def test_the_declared_ratio_suits_a_large_image_card(): + """`summary_large_image` wants roughly 1.91:1 — narrower letterboxes, + wider gets cropped.""" + ratio = OG_IMAGE_WIDTH / OG_IMAGE_HEIGHT + assert 1.7 <= ratio <= 2.05, f"{OG_IMAGE_WIDTH}x{OG_IMAGE_HEIGHT} is {ratio:.2f}:1" + + +def test_the_twitter_card_is_a_large_image(client): + assert _meta(client.get("/").text, "twitter:card") == ["summary_large_image"] + + +# --------------------------------------------------- template division rules -- + + +def test_no_meta_tag_dash_emits_is_also_declared_statically(client): + """The rule the whole template rebuild was built on: Dash emits all of + these per page. A static copy makes two of each, and the static one + describes the SITE where Dash's describes the PAGE — redundant and the + less accurate of the two.""" + html = client.get("/").text + for tag in ("description", "og:type", "og:title", "og:description", + "og:image", "twitter:card", "twitter:url", "twitter:title", + "twitter:description", "twitter:image"): + found = _meta(html, tag) + assert len(found) <= 1, f"{tag} is declared {len(found)} times: {found}" + + +def test_the_tags_dash_omits_are_declared_here(client): + """The other half of the rule — do not delete these thinking Dash covers + them.""" + html = client.get("/").text + for tag in ("og:site_name", "og:url", "og:image:alt", "twitter:image:alt", + "og:image:secure_url", "og:image:type", + "og:image:width", "og:image:height"): + assert _meta(html, tag), f"{tag} is missing and Dash does not emit it" + + +def test_exactly_one_title_element(client): + """The pre-Phase-1 template shipped a hardcoded <title> NEXT TO the Dash + placeholder — two title elements on every response, and which one a + scraper honours is undefined.""" + html = _visible(client.get("/").text) + assert len(re.findall(r"<title[ >]", html)) == 1 + + +# -------------------------------------------------------------- the template -- + + +def test_the_index_template_is_still_wired_in(app): + """`templates/index.html` looks removable and is not: dash-improve-my-llms + appears to cover OG, but its injection runs only on the prerender path, + which social scrapers do not take. Deleting the template kills every + unfurl, the GA4 tag and the noscript surface at once.""" + index = TEMPLATE.read_text() + for placeholder in ("{%metas%}", "{%title%}", "{%css%}", "{%app_entry%}", + "{%config%}", "{%scripts%}", "{%renderer%}"): + assert placeholder in index, f"{placeholder} missing from the template" + assert app.index_string.startswith("<!DOCTYPE html>") + + +def test_no_dash_placeholder_is_named_inside_a_comment(): + """Dash resolves `{%…%}` by plain string replacement over the whole + index_string, comments included (LESSONS §2). dash-email's charset + comment spelled the metas placeholder and every response carried the + per-page meta block twice — invisible in a browser, fully visible to + scrapers. Every `{%` in a comment must be broken or absent.""" + text = TEMPLATE.read_text() + for comment in re.findall(r"<!--(.*?)-->", text, flags=re.S): + hits = re.findall(r"\{%\w+%\}", comment) + assert hits == [], ( + f"placeholder(s) {hits} named inside an HTML comment — Dash will " + "substitute them there too, duplicating the block on every response" + ) + + +def test_the_template_carries_no_hardcoded_origin_or_version(): + """The origin and version are substituted at boot from lib/constants.py + and the package — this template carried five conflicting version strings + and og tags pinned to onrender.com before Phase 1.""" + text = _visible(TEMPLATE.read_text()) + assert "__CANONICAL_ORIGIN__" in text + assert "__APP_VERSION__" in text + assert "onrender.com" not in text + assert not re.search(r'"version":\s*"\d', text), ( + "a literal version is back in the JSON-LD block" + ) + + +def test_every_asset_the_template_references_resolves(client): + """The half-landed-commit guard: a template pointing at files that exist + on disk but are untracked ships 404s from a deploy that builds from git, + while every local boot looks perfect. A checkout is what CI tests, so + this fails there the moment a referenced asset is not committed.""" + html = _visible(client.get("/").text) + referenced = sorted(set(re.findall(r'(?:href|content|src)="(/assets/[^"]+)"', html))) + assert referenced, "no /assets/ references found — did the template change?" + missing = [ref for ref in referenced if not client.get(ref).ok] + assert missing == [], ( + f"templates/index.html references assets that do not resolve: {missing}. " + "If they exist on disk, they are untracked — the deploy builds from git." + ) + + +def test_the_apple_touch_icon_is_declared_and_resolves(client): + """iOS uses this for Add to Home Screen.""" + html = _visible(client.get("/").text) + match = re.search(r'<link[^>]*rel="apple-touch-icon"[^>]*href="([^"]+)"', html) + assert match, "no apple-touch-icon link" + assert client.get(match.group(1)).ok, f"{match.group(1)} does not resolve" + + +def test_both_favicon_variants_resolve(client): + """The random favicon swapper flips between the area-chart and bar-chart + icon sets per load (brand quirk, kept deliberately). Both halves of each + pair must exist or half the loads 404 their icon.""" + for suffix in ("areachart", "barchart"): + for asset in (f"/assets/favicon_{suffix}.ico", + f"/assets/apple-touch-icon_{suffix}.png"): + assert client.get(asset).ok, f"{asset} does not resolve" diff --git a/tests/test_traffic_counting.py b/tests/test_traffic_counting.py new file mode 100644 index 0000000..437fa9c --- /dev/null +++ b/tests/test_traffic_counting.py @@ -0,0 +1,123 @@ +"""THE COUNTING RULE — the invariant any navigation change invalidates. + +This app is a single-page app: every sidebar click is a `dcc.Location` +navigation, so document requests alone would report one hit per visitor with +`/` as the only page. The recorder therefore writes two kinds of row +(lib/analytics.py) and the rollup (lib/traffic_report.build_rollup) counts +them asymmetrically: + + human_hits = rows with source="spa" and bot=False (rendered views) + bot_hits = rows with source="doc" and bot=True (crawlers run no JS) + +A human's hard load produces BOTH a doc row and a spa row — counting rule +means it lands in human_hits exactly once. A JS-executing crawler's spa rows +count nowhere. These tests pin that arithmetic with synthetic rows through +the real `build_rollup` (geo=False keeps the suite offline), because the rule +is documented prose in traffic_report.py and prose does not fail CI. + +If a navigation refactor moves page views off the url callback, the spa rows +stop and `human_hits` silently collapses to zero while the site looks fine — +kickoff preservation invariant #5. +""" +from __future__ import annotations + +from lib.traffic_report import APP_KEY, SESSION_GAP_S, build_rollup + +BROWSER = "Mozilla/5.0 (Macintosh) Chrome/120.0" +GOOGLEBOT = "Mozilla/5.0 (compatible; Googlebot/2.1)" + + +def _row(source, *, bot, path="/sparkline", ip="203.0.113.7", ua=BROWSER, + ts="2026-08-01T10:00:00"): + return {"ts": ts, "path": path, "ua": ua, "ip": ip, "bot": bot, + "source": source} + + +def _rollup(rows): + return build_rollup("2026-08-01", rows=rows, geo=False) + + +def test_the_app_key_is_the_short_directory_id(): + """STANDARD §5: one short app id on every hub surface.""" + assert APP_KEY == "muicharts" + assert build_rollup("2026-08-01", rows=[], geo=False)["app"] == "muicharts" + + +def test_a_hard_load_counts_exactly_once(): + """One person, one hard load: a doc row (the HTTP GET) plus a spa row + (the url callback). human_hits must be 1, not 2.""" + rows = [_row("doc", bot=False), _row("spa", bot=False)] + rollup = _rollup(rows) + assert rollup["human_hits"] == 1 + assert rollup["bot_hits"] == 0 + + +def test_spa_navigation_is_the_page_view_stream(): + """Three sidebar clicks after a hard load = four page views.""" + rows = [_row("doc", bot=False)] + [ + _row("spa", bot=False, path=p, ts=f"2026-08-01T10:0{i}:00") + for i, p in enumerate(["/", "/sparkline", "/pie", "/heatmap"]) + ] + rollup = _rollup(rows) + assert rollup["human_hits"] == 4 + assert {p["path"] for p in rollup["pages"]} == {"/", "/sparkline", "/pie", + "/heatmap"} + + +def test_crawlers_only_ever_count_as_doc_bots(): + """A crawler runs no JS, so it appears only as doc rows → bot_hits. A + JS-executing crawler that DOES reach the spa callback still counts + nowhere — the bot flag keeps it out of human_hits.""" + rows = [ + _row("doc", bot=True, ua=GOOGLEBOT), + _row("doc", bot=True, ua=GOOGLEBOT, path="/pie"), + _row("spa", bot=True, ua="HeadlessChrome bot"), + ] + rollup = _rollup(rows) + assert rollup["bot_hits"] == 2 + assert rollup["human_hits"] == 0 + assert rollup["visitors"] == 0 + + +def test_a_humans_doc_rows_never_reach_bot_hits(): + rows = [_row("doc", bot=False), _row("doc", bot=False, path="/pie")] + rollup = _rollup(rows) + assert rollup["bot_hits"] == 0 + assert rollup["human_hits"] == 0 # no JS ran — no rendered page view + + +def test_visitors_are_ip_browser_pairs_from_human_spa_rows(): + rows = [ + _row("spa", bot=False, ip="203.0.113.7"), + _row("spa", bot=False, ip="203.0.113.7", ts="2026-08-01T10:01:00"), + _row("spa", bot=False, ip="198.51.100.2"), + _row("doc", bot=True, ua=GOOGLEBOT, ip="66.249.66.1"), + ] + assert _rollup(rows)["visitors"] == 2 + + +def test_sessions_split_on_the_thirty_minute_gap(): + """SESSION_GAP_S mirrors the hub's session rule — the numbers only + compare across the network if both sides split identically.""" + assert SESSION_GAP_S == 30 * 60 + base = "2026-08-01T{:02d}:{:02d}:00" + rows = [ + _row("spa", bot=False, ts=base.format(10, 0)), + _row("spa", bot=False, ts=base.format(10, 10)), + # 50 minutes later — a new session + _row("spa", bot=False, ts=base.format(11, 0)), + ] + rollup = _rollup(rows) + assert rollup["sessions"] == 2 + # median_session_s comes from multi-hit sessions only: the 10-minute one. + assert rollup["median_session_s"] == 600.0 + + +def test_the_shell_wires_the_spa_recorder(app): + """The url→analytics-sink callback is the spa stream's only source. Its + registration disappearing is exactly the silent collapse this file + exists to catch.""" + wired = any( + "analytics-sink" in key for key in app.callback_map + ) + assert wired, "no callback outputs to analytics-sink — spa rows have no writer" diff --git a/tests/test_version_parity.py b/tests/test_version_parity.py new file mode 100644 index 0000000..e25f6ed --- /dev/null +++ b/tests/test_version_parity.py @@ -0,0 +1,125 @@ +"""Version and component-count parity — THE fix for the five-way drift. + +The 2026-08-01 survey found this repo advertising FIVE different versions at +once: package.json said 1.4.0, PyPI served 1.2.3, the header badge said +v1.3.0, the JSON-LD said 1.2.1, and README/CLAUDE.md said "9 components" (it +has 13). Phase 1 rewired every surface to substitute from single sources of +truth at boot; these tests are what keeps that true. Every assertion here is +against a surface a READER meets, traced back to the one source it must now +derive from. + +The two sources that remain (root package.json for setup.py, and +dash_mui_charts/package-info.json for __version__) are regenerated together +by `npm run build` — their equality is the "did you rebuild after bumping" +check. scripts/check_release.py makes the same checks at release time with +git-history context; this copy runs on every CI push. +""" +from __future__ import annotations + +import json +import re + +from conftest import REPO_ROOT, layout_text + +COMPONENT_COUNT = 13 +COMPONENTS = { + "BarChart", "CandlestickChart", "CompositeChart", "Heatmap", "LineChart", + "LiveTradingChart", "PieChart", "ScatterChart", "SimpleTreeView", + "SparklineChart", "TimeClock", "TreeView", "TreeViewPro", +} + + +def _root_version() -> str: + return json.loads((REPO_ROOT / "package.json").read_text())["version"] + + +def _package_version() -> str: + import dash_mui_charts + + return dash_mui_charts.__version__ + + +# ------------------------------------------------------------- the versions -- + + +def test_the_two_version_sources_agree(): + """package.json is what PyPI serves (setup.py reads it); + dash_mui_charts/package-info.json is what __version__ reports. They are + different files, synchronized only by `npm run build` — bump the root + and skip the rebuild and you ship a wheel whose label and __version__ + disagree.""" + assert _root_version() == _package_version() + + +def test_the_header_badge_derives_from_the_package(app): + """The badge shipped as a hardcoded "v1.3.0" for a full release cycle.""" + assert f"v{_package_version()}" in layout_text(app.layout) + + +def test_the_served_html_carries_the_real_version(client): + """JSON-LD and the noscript block — both substituted from + __APP_VERSION__ at boot. The JSON-LD carried a hardcoded 1.2.1 two + releases after it stopped being true.""" + html = client.get("/").text + version = _package_version() + assert f'"version": "{version}"' in html, "JSON-LD version drifted" + assert f"v{version}" in html, "noscript version drifted" + assert "__APP_VERSION__" not in html, "the substitution did not run" + + +def test_the_changelog_knows_this_version(): + changelog = (REPO_ROOT / "CHANGELOG.md").read_text() + assert _root_version() in changelog, ( + f"CHANGELOG.md has no section for {_root_version()}" + ) + + +# ------------------------------------------------------- the component count -- + + +def test_the_package_exports_exactly_the_thirteen_components(): + import dash_mui_charts + + assert set(dash_mui_charts.__all__) == COMPONENTS, ( + sorted(set(dash_mui_charts.__all__) ^ COMPONENTS) + ) + assert len(COMPONENTS) == COMPONENT_COUNT + + +def test_the_validate_init_gate_agrees(): + """_validate_init.py is the post-build gate; its EXPECTED set drifting + from the real export list would let a build drop a component silently.""" + text = (REPO_ROOT / "_validate_init.py").read_text() + listed = set(re.findall(r'"([A-Z]\w+)"', text)) + assert COMPONENTS <= listed, sorted(COMPONENTS - listed) + + +def test_the_site_description_counts_thirteen(): + from lib.constants import SITE_DESCRIPTION + + assert f"{COMPONENT_COUNT} " in SITE_DESCRIPTION + for name in COMPONENTS: + assert name in SITE_DESCRIPTION, f"{name} missing from SITE_DESCRIPTION" + + +def test_the_noscript_surface_counts_thirteen(client): + html = client.get("/").text + assert f"{COMPONENT_COUNT} Components" in html + + +def test_no_surface_still_claims_nine_components(): + """The stale count survived in three places at once. The sweep is scoped + to reader-facing files IN the repo — git history legitimately remembers, + and .claude/ is untracked local state a CI checkout does not have.""" + offenders = [] + for path in ("README.md", "templates/index.html", "lib/constants.py"): + text = (REPO_ROOT / path).read_text() + if re.search(r"\b9 components\b|\bnine components\b", text, re.I): + offenders.append(path) + assert offenders == [], f"the stale component count survives in {offenders}" + + +def test_the_readme_names_every_component(): + readme = (REPO_ROOT / "README.md").read_text() + missing = sorted(name for name in COMPONENTS if name not in readme) + assert missing == [], f"README.md does not mention {missing}" diff --git a/vendor/dash_clerk_auth-0.9.1.tar.gz b/vendor/dash_clerk_auth-0.9.1.tar.gz new file mode 100644 index 0000000..adb8d6b Binary files /dev/null and b/vendor/dash_clerk_auth-0.9.1.tar.gz differ diff --git a/verify_traffic.py b/verify_traffic.py new file mode 100644 index 0000000..64b54f7 --- /dev/null +++ b/verify_traffic.py @@ -0,0 +1,258 @@ +"""Headless verification for the satellite-analytics pipeline +(lib/analytics + lib/traffic_report + the app.py wiring). No server boot, +no outbound network. + +Three things are checked, in order of how badly they'd bite: + +1. THE COUNTING RULE — this app is a single-page app, so page views come + from the url.pathname callback and document requests only supply the + crawlers. The rollup must not double-count a human's first load. +2. THE APP WIRING — the Flask test client proves /healthz answers, that a + document GET is recorded, and that the real Dash callback round-trip + (POST /_dash-update-component) writes a page view. +3. THE SIGNATURE — the signed request our sender emits is fed through the + HUB's own verifier (2plotai/lib/satellite_ingest.verify_and_record, + loaded by file path). A pass there means 2plot.ai accepts our rollups + verbatim. Without the sibling repo it degrades to a local recompute. + +Run: python verify_traffic.py +""" +import importlib.util +import json +import os +import sys +import tempfile +from datetime import datetime, timedelta +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).resolve().parent)) + +# Isolate every write from the real hit log, and keep the reporter asleep. +os.environ["ANALYTICS_DIR"] = tempfile.mkdtemp(prefix="charts-analytics-") +os.environ.pop("CROSS_APP_WEBHOOK_SECRET", None) + +PASS, FAIL = "\033[32m✓\033[0m", "\033[31m✗\033[0m" +failures = [] + + +def check(name, cond, detail=""): + print(f"{PASS if cond else FAIL} {name}" + + (f" — {detail}" if detail and not cond else "")) + if not cond: + failures.append(name) + + +# --------------------------------------------------------------------------- # +# 1. Recorder: skip rules, bot detection, proxied client IP # +# --------------------------------------------------------------------------- # +from lib import analytics # noqa: E402 + +for noisy in ("/healthz", "/assets/app.css", "/_dash-update-component", + "/_reload-hash", "/favicon.ico", "/robots.txt"): + analytics.record(noisy, "Mozilla/5.0", "1.2.3.4", source="doc") +check("recorder skips probes, assets and Dash plumbing", + analytics.load_day() == [], analytics.load_day()) + +from lib.constants import INTERNAL_UA # noqa: E402 + +analytics.record("/scatter", INTERNAL_UA, "10.0.0.9", source="spa") +analytics.record("/scatter", f"{INTERNAL_UA} smoke-battery", "10.0.0.9", + source="doc") +check("internal-UA traffic is dropped at write time (network contract)", + analytics.load_day() == [], analytics.load_day()) + +check("bot UAs classified like the hub", + all(analytics.is_bot(ua) for ua in + ("Googlebot/2.1", "ClaudeBot/1.0", "python-requests/2.31", "curl/8")) + and not analytics.is_bot("Mozilla/5.0 (Macintosh) Safari/605")) + +check("client_ip prefers CF-Connecting-IP, then X-Forwarded-For", + analytics.client_ip({"CF-Connecting-IP": "203.0.113.9"}, "10.0.0.1") + == "203.0.113.9" + and analytics.client_ip({"X-Forwarded-For": "198.51.100.7, 10.0.0.2"}, + "10.0.0.1") == "198.51.100.7") + +check("visitor identity is the hub's (ip, browser) pair", + analytics.visitor_key("1.2.3.4", "UA-a") + == analytics.visitor_key("1.2.3.4", "UA-a") + != analytics.visitor_key("1.2.3.4", "UA-b")) + + +# --------------------------------------------------------------------------- # +# 2. Rollup: the counting rule, sessions, median, pages # +# --------------------------------------------------------------------------- # +from lib import traffic_report as tr # noqa: E402 + +TODAY = datetime.now().replace(hour=9, minute=0, second=0, microsecond=0) + + +def row(minutes, path, source="spa", ua="Mozilla/5.0 (Macintosh)", + ip="203.0.113.9"): + return {"ts": (TODAY + timedelta(minutes=minutes)).isoformat( + timespec="seconds"), + "path": path, "ua": ua, "ip": ip, + "bot": analytics.is_bot(ua), "source": source} + + +rows = [ + # one human: a hard load on / (doc + spa), then three SPA navigations + row(0, "/", source="doc"), + row(0, "/"), + row(2, "/scatter"), + row(5, "/heatmap"), + row(9, "/tree-pro"), + # …returns after a 45-minute gap: a second session, single hit + row(54, "/candlestick"), + # a second human, one page + row(20, "/pie", ip="198.51.100.7", ua="Mozilla/5.0 (Windows)"), + # a crawler: document requests only, never a page view + row(30, "/", source="doc", ua="Googlebot/2.1", ip="66.249.66.1"), + row(31, "/linechart-basic", source="doc", ua="Googlebot/2.1", + ip="66.249.66.1"), + # a JS-executing crawler: recorded, but kept out of the human numbers + row(40, "/scatter", ua="ClaudeBot/1.0", ip="160.79.104.10"), +] +r = tr.build_rollup(TODAY.strftime("%Y-%m-%d"), rows=rows, geo=False) + +check("human_hits counts page views, not the duplicate document request", + r["human_hits"] == 6, r["human_hits"]) +check("bot_hits counts crawler document requests only", + r["bot_hits"] == 2, r["bot_hits"]) +check("visitors = unique human (ip, browser) pairs", + r["visitors"] == 2, r["visitors"]) +check("sessions split on the hub's 30-minute gap", + r["sessions"] == 3, r["sessions"]) +check("median_session_s from multi-hit sessions only " + "(single-hit visits never padded in)", + r["median_session_s"] == 9 * 60, r.get("median_session_s")) +check("pages lists the real doc pages, not just /", + [p["path"] for p in r["pages"]][:1] == ["/"] + and {"/scatter", "/heatmap", "/tree-pro", "/pie"} + <= {p["path"] for p in r["pages"]}, + r["pages"]) +check("bot page views stay out of pages", + all(p["path"] != "/scatter" or p["hits"] == 1 for p in r["pages"]), + r["pages"]) +check("payload carries app=muicharts and a YYYY-MM-DD date", + r["app"] == "muicharts" and len(r["date"]) == 10, r) + +empty = tr.build_rollup("1999-01-01", geo=False) +check("a day with no traffic is a valid zero rollup", + empty["human_hits"] == 0 and empty["bot_hits"] == 0 + and "median_session_s" not in empty and "countries" not in empty) + +check("reporting is OFF without the shared secret (dev can't clobber prod)", + tr.reporting_enabled() is False) + + +# --------------------------------------------------------------------------- # +# 3. App wiring: healthz, document hit, and the real callback round-trip # +# --------------------------------------------------------------------------- # +import app as demo_app # noqa: E402 (boots the Dash app; reporter stays off) + +client = demo_app.server.test_client() + +hz = client.get("/healthz") +check("GET /healthz answers the hub's sweep without a Dash render", + hz.status_code == 200 + and hz.get_json() == {"ok": True, "app": "muicharts"}, + hz.data[:80]) + +before = len(analytics.load_day()) +client.get("/", headers={"User-Agent": "Googlebot/2.1", + "X-Forwarded-For": "66.249.66.1"}) +docs = [h for h in analytics.load_day()[before:] if h["source"] == "doc"] +check("a crawler's document GET is recorded as a bot doc hit", + len(docs) == 1 and docs[0]["bot"] and docs[0]["ip"] == "66.249.66.1", + docs) + +before = len(analytics.load_day()) +resp = client.post( + "/_dash-update-component", + json={"output": "analytics-sink.data", + "outputs": {"id": "analytics-sink", "property": "data"}, + "inputs": [{"id": "url", "property": "pathname", + "value": "/tree-pro"}], + "changedPropIds": ["url.pathname"]}, + headers={"User-Agent": "Mozilla/5.0 (Macintosh)", + "X-Forwarded-For": "198.51.100.7"}) +spa = [h for h in analytics.load_day()[before:] if h["source"] == "spa"] +check("the url.pathname callback records a real SPA page view", + resp.status_code == 200 and len(spa) == 1 + and spa[0]["path"] == "/tree-pro" and spa[0]["ip"] == "198.51.100.7", + (resp.status_code, spa)) + +check("the /healthz probe itself never lands in the traffic numbers", + all(h["path"] != "/healthz" for h in analytics.load_day())) + + +# --------------------------------------------------------------------------- # +# 4. Signature: fed through the hub's own verifier # +# --------------------------------------------------------------------------- # +SECRET = "verify-only-secret" +body = json.dumps(r).encode() +ts = str(int(datetime.now().timestamp())) +sig = tr.sign(body, ts, SECRET) + +hub_ingest = Path("/Users/pip/PycharmProjects/2plotai/lib/satellite_ingest.py") +if hub_ingest.exists(): + import types + + os.environ["CROSS_APP_WEBHOOK_SECRET"] = SECRET + # Stand in for the hub's heartbeat store (its real one needs Postgres / + # the JSONL event dir) and capture what it would persist. + stored = {} + pulse = types.ModuleType("lib.pulse") + hb_stub = types.ModuleType("lib.pulse.heartbeat") + hb_stub.record_note = lambda *a, **k: None + hb_stub.record_api_call = lambda **kw: stored.update(kw.get("extras") or {}) + pulse.heartbeat = hb_stub + sys.modules.setdefault("lib.pulse", pulse) + sys.modules.setdefault("lib.pulse.heartbeat", hb_stub) + + # The ingest folds app ids through the hub's OWN lib.network_directory — + # an absolute import that would otherwise resolve to THIS repo's lib + # package and turn every payload into "bad payload". Load the real one + # (pure data, no further imports) under the name the hub expects. + nd_spec = importlib.util.spec_from_file_location( + "lib.network_directory", hub_ingest.parent / "network_directory.py") + nd_mod = importlib.util.module_from_spec(nd_spec) + nd_spec.loader.exec_module(nd_mod) + sys.modules["lib.network_directory"] = nd_mod + + spec = importlib.util.spec_from_file_location("hub_ingest", hub_ingest) + hub = importlib.util.module_from_spec(spec) + spec.loader.exec_module(hub) + + reply, status = hub.verify_and_record( + body, {"X-AI-Canvas-Timestamp": ts, "X-AI-Canvas-Signature": sig}) + check("the hub's verifier accepts our signed rollup", + status == 200 and reply.get("ok"), (status, reply)) + check("every v2 field survives the hub's validation and caps", + stored.get("app") == "muicharts" + and stored.get("human_hits") == r["human_hits"] + and stored.get("visitors") == r["visitors"] + and stored.get("sessions") == r["sessions"] + and stored.get("median_session_s") == r["median_session_s"] + and len(stored.get("pages") or []) == len(r["pages"]), + stored) + + bad_reply, bad_status = hub.verify_and_record( + body, {"X-AI-Canvas-Timestamp": ts, "X-AI-Canvas-Signature": "deadbeef"}) + check("the hub rejects a bad signature (the check is real)", + bad_status == 400, (bad_status, bad_reply)) + del os.environ["CROSS_APP_WEBHOOK_SECRET"] +else: + import hashlib + import hmac + check("signature matches the documented scheme (hub repo absent)", + hmac.new(SECRET.encode(), f"{ts}.".encode() + body, + hashlib.sha256).hexdigest() == sig) + + +print() +if failures: + print(f"\033[31m{len(failures)} check(s) failed:\033[0m " + + ", ".join(failures)) + sys.exit(1) +print("\033[32mAll satellite-analytics checks passed.\033[0m")