xmlui 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Pdf-DeGhSMXe.mjs +19537 -0
- package/dist/Pdf.css +1 -0
- package/dist/apiInterceptorWorker-CwuUhYyc.mjs +9229 -0
- package/dist/array-USo-Szhp.mjs +12 -0
- package/dist/index-C24dkfpd.mjs +1434 -0
- package/dist/index-ao27SnVp.mjs +145185 -0
- package/dist/index.css +1 -0
- package/dist/nivo-bar.es-CWh0ZlxB.mjs +1666 -0
- package/dist/nivo-geo.es-BTqNt5Db.mjs +1579 -0
- package/dist/nivo-legends.es-BuIxHGSU.mjs +6916 -0
- package/dist/nivo-pie.es-BvCBFA0L.mjs +700 -0
- package/dist/react-apexcharts.min-DqWuDOyO.mjs +8881 -0
- package/dist/scripts/bin/bootstrap.js +11 -0
- package/dist/scripts/bin/build.js +256 -0
- package/dist/scripts/bin/index.js +88 -0
- package/dist/scripts/bin/preview.js +27 -0
- package/dist/scripts/bin/start.js +41 -0
- package/dist/scripts/bin/vite-ueml-plugin.js +113 -0
- package/dist/scripts/bin/viteConfig.js +112 -0
- package/dist/scripts/src/abstractions/ActionDefs.js +2 -0
- package/dist/scripts/src/abstractions/AppContextDefs.js +2 -0
- package/dist/scripts/src/abstractions/BlockScope.js +4 -0
- package/dist/scripts/src/abstractions/ComponentDefs.js +2 -0
- package/dist/scripts/src/abstractions/ComponentDescriptorDefs.js +2 -0
- package/dist/scripts/src/abstractions/ContainerDefs.js +2 -0
- package/dist/scripts/src/abstractions/FunctionDefs.js +2 -0
- package/dist/scripts/src/abstractions/RendererDefs.js +2 -0
- package/dist/scripts/src/abstractions/scripting/ScriptParserError.js +2 -0
- package/dist/scripts/src/abstractions/scripting/ScriptingSourceTree.js +2 -0
- package/dist/scripts/src/abstractions/scripting/Token.js +110 -0
- package/dist/scripts/src/components/App/App.js +253 -0
- package/dist/scripts/src/components/App/AppLayoutContext.js +9 -0
- package/dist/scripts/src/components/App/AppStateContext.js +9 -0
- package/dist/scripts/src/components/App/Sheet.js +89 -0
- package/dist/scripts/src/components/AppHeader/AppHeader.js +121 -0
- package/dist/scripts/src/components/AppState/AppState.js +29 -0
- package/dist/scripts/src/components/Avatar/Avatar.js +81 -0
- package/dist/scripts/src/components/Badge/Badge.js +56 -0
- package/dist/scripts/src/components/BarChart/BarChart.js +199 -0
- package/dist/scripts/src/components/Bookmark/Bookmark.js +11 -0
- package/dist/scripts/src/components/Button/Button.js +196 -0
- package/dist/scripts/src/components/Card/Card.js +65 -0
- package/dist/scripts/src/components/ChangeListener/ChangeListener.js +43 -0
- package/dist/scripts/src/components/Chart/Chart.js +158 -0
- package/dist/scripts/src/components/Checkbox/Checkbox.js +43 -0
- package/dist/scripts/src/components/Combobox/Combobox.js +145 -0
- package/dist/scripts/src/components/ComponentProvider.js +357 -0
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +40 -0
- package/dist/scripts/src/components/DatePicker/DatePicker.js +196 -0
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +175 -0
- package/dist/scripts/src/components/EmojiSelector/EmojiSelector.js +56 -0
- package/dist/scripts/src/components/FileInput/FileInput.js +127 -0
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +106 -0
- package/dist/scripts/src/components/FlowLayout/FlowLayout.js +139 -0
- package/dist/scripts/src/components/Footer/Footer.js +42 -0
- package/dist/scripts/src/components/Form/Form.js +320 -0
- package/dist/scripts/src/components/Form/FormContext.js +9 -0
- package/dist/scripts/src/components/Form/formActions.js +86 -0
- package/dist/scripts/src/components/FormItem/FormItem.js +204 -0
- package/dist/scripts/src/components/FormItem/HelperText.js +27 -0
- package/dist/scripts/src/components/FormItem/ItemWithLabel.js +39 -0
- package/dist/scripts/src/components/FormItem/Validations.js +346 -0
- package/dist/scripts/src/components/FormSection/FormSection.js +45 -0
- package/dist/scripts/src/components/Heading/Heading.js +206 -0
- package/dist/scripts/src/components/HoverCard/HoverCard.js +45 -0
- package/dist/scripts/src/components/Icon/ApiIcon.js +10 -0
- package/dist/scripts/src/components/Icon/Attach.js +10 -0
- package/dist/scripts/src/components/Icon/Binding.js +11 -0
- package/dist/scripts/src/components/Icon/BoardIcon.js +7 -0
- package/dist/scripts/src/components/Icon/BoxIcon.js +10 -0
- package/dist/scripts/src/components/Icon/CheckIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ChevronDownIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ChevronLeft.js +7 -0
- package/dist/scripts/src/components/Icon/ChevronRight.js +7 -0
- package/dist/scripts/src/components/Icon/ChevronUpIcon.js +7 -0
- package/dist/scripts/src/components/Icon/CodeFileIcon.js +10 -0
- package/dist/scripts/src/components/Icon/CodeSandbox.js +10 -0
- package/dist/scripts/src/components/Icon/CompactListIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ContentCopyIcon.js +7 -0
- package/dist/scripts/src/components/Icon/DatabaseIcon.js +11 -0
- package/dist/scripts/src/components/Icon/DocFileIcon.js +10 -0
- package/dist/scripts/src/components/Icon/DocIcon.js +10 -0
- package/dist/scripts/src/components/Icon/DotMenuHorizontalIcon.js +7 -0
- package/dist/scripts/src/components/Icon/DotMenuIcon.js +7 -0
- package/dist/scripts/src/components/Icon/EmailIcon.js +7 -0
- package/dist/scripts/src/components/Icon/EmptyFolderIcon.js +10 -0
- package/dist/scripts/src/components/Icon/ErrorIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ExpressionIcon.js +10 -0
- package/dist/scripts/src/components/Icon/FillPlusCricleIcon.js +7 -0
- package/dist/scripts/src/components/Icon/FilterIcon.js +10 -0
- package/dist/scripts/src/components/Icon/FolderIcon.js +10 -0
- package/dist/scripts/src/components/Icon/GlobeIcon.js +7 -0
- package/dist/scripts/src/components/Icon/HomeIcon.js +7 -0
- package/dist/scripts/src/components/Icon/HyperLinkIcon.js +7 -0
- package/dist/scripts/src/components/Icon/Icon.js +101 -0
- package/dist/scripts/src/components/Icon/ImageFileIcon.js +10 -0
- package/dist/scripts/src/components/Icon/LinkIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ListIcon.js +7 -0
- package/dist/scripts/src/components/Icon/LooseListIcon.js +7 -0
- package/dist/scripts/src/components/Icon/MoonIcon.js +10 -0
- package/dist/scripts/src/components/Icon/MoreOptionsIcon.js +7 -0
- package/dist/scripts/src/components/Icon/PDFIcon.js +10 -0
- package/dist/scripts/src/components/Icon/PenIcon.js +7 -0
- package/dist/scripts/src/components/Icon/PhoneIcon.js +7 -0
- package/dist/scripts/src/components/Icon/PhotoIcon.js +10 -0
- package/dist/scripts/src/components/Icon/PlusIcon.js +7 -0
- package/dist/scripts/src/components/Icon/SearchIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ShareIcon.js +10 -0
- package/dist/scripts/src/components/Icon/SunIcon.js +10 -0
- package/dist/scripts/src/components/Icon/TrashIcon.js +7 -0
- package/dist/scripts/src/components/Icon/TxtIcon.js +10 -0
- package/dist/scripts/src/components/Icon/UnknownFileIcon.js +10 -0
- package/dist/scripts/src/components/Icon/UnlinkIcon.js +10 -0
- package/dist/scripts/src/components/Icon/UserIcon.js +7 -0
- package/dist/scripts/src/components/Icon/WarningIcon.js +7 -0
- package/dist/scripts/src/components/Icon/XlsIcon.js +10 -0
- package/dist/scripts/src/components/IconProvider.js +249 -0
- package/dist/scripts/src/components/IconRegistryContext.js +307 -0
- package/dist/scripts/src/components/Image/Image.js +34 -0
- package/dist/scripts/src/components/Input/InputAdornment.js +14 -0
- package/dist/scripts/src/components/Input/input-abstractions.js +44 -0
- package/dist/scripts/src/components/Items/Items.js +48 -0
- package/dist/scripts/src/components/Link/Link.js +72 -0
- package/dist/scripts/src/components/List/List.js +442 -0
- package/dist/scripts/src/components/Logo/Logo.js +25 -0
- package/dist/scripts/src/components/Map/Map.js +60 -0
- package/dist/scripts/src/components/Map/world_countries.json +45307 -0
- package/dist/scripts/src/components/Markdown/Markdown.js +120 -0
- package/dist/scripts/src/components/ModalDialog/ConfirmationModalContextProvider.js +106 -0
- package/dist/scripts/src/components/ModalDialog/Dialog.js +20 -0
- package/dist/scripts/src/components/ModalDialog/ModalDialog.js +145 -0
- package/dist/scripts/src/components/MultiCombobox/MultiCombobox.js +249 -0
- package/dist/scripts/src/components/MultiSelect/MultiSelect.js +192 -0
- package/dist/scripts/src/components/NavGroup/NavGroup.js +113 -0
- package/dist/scripts/src/components/NavLink/NavLink.js +115 -0
- package/dist/scripts/src/components/NavPanel/NavPanel.js +101 -0
- package/dist/scripts/src/components/NoResult/NoResult.js +39 -0
- package/dist/scripts/src/components/NumberBox/NumberBox.js +373 -0
- package/dist/scripts/src/components/Option/Option.js +41 -0
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +22 -0
- package/dist/scripts/src/components/Pages/Pages.js +74 -0
- package/dist/scripts/src/components/Pdf/LazyPdf.js +44 -0
- package/dist/scripts/src/components/Pdf/Pdf.js +19 -0
- package/dist/scripts/src/components/PieChart/PieChart.js +184 -0
- package/dist/scripts/src/components/PositionedContainer/PositionedContainer.js +29 -0
- package/dist/scripts/src/components/ProgressBar/ProgressBar.js +38 -0
- package/dist/scripts/src/components/Queue/Queue.js +286 -0
- package/dist/scripts/src/components/Queue/queueActions.js +87 -0
- package/dist/scripts/src/components/RadioGroup/RadioGroup.js +144 -0
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapter.js +147 -0
- package/dist/scripts/src/components/Redirect/Redirect.js +10 -0
- package/dist/scripts/src/components/Select/Select.js +139 -0
- package/dist/scripts/src/components/Select/SelectContext.js +45 -0
- package/dist/scripts/src/components/SelectionStore/SelectionStore.js +88 -0
- package/dist/scripts/src/components/SpaceFiller/SpaceFiller.js +22 -0
- package/dist/scripts/src/components/Spinner/Spinner.js +59 -0
- package/dist/scripts/src/components/Splitter/Splitter.js +205 -0
- package/dist/scripts/src/components/Splitter/utils.js +17 -0
- package/dist/scripts/src/components/Stack/Stack.js +117 -0
- package/dist/scripts/src/components/StickyBox/StickyBox.js +33 -0
- package/dist/scripts/src/components/Switch/Switch.js +50 -0
- package/dist/scripts/src/components/Table/Table.js +499 -0
- package/dist/scripts/src/components/Table/useRowSelection.js +169 -0
- package/dist/scripts/src/components/TableColumnDef/TableColumnDef.js +44 -0
- package/dist/scripts/src/components/TableColumnDef/TableContext.js +12 -0
- package/dist/scripts/src/components/Tabs/Tabs.js +85 -0
- package/dist/scripts/src/components/Text/Text.js +175 -0
- package/dist/scripts/src/components/TextArea/TextArea.js +194 -0
- package/dist/scripts/src/components/TextArea/TextAreaResizable.js +63 -0
- package/dist/scripts/src/components/TextArea/useComposedRef.js +50 -0
- package/dist/scripts/src/components/TextBox/TextBox.js +145 -0
- package/dist/scripts/src/components/Theme/NotificationToast.js +39 -0
- package/dist/scripts/src/components/Theme/Theme.js +153 -0
- package/dist/scripts/src/components/ThemeChanger/ThemeChanger.js +125 -0
- package/dist/scripts/src/components/Toggle/Toggle.js +88 -0
- package/dist/scripts/src/components/Tree/TreeComponent.js +79 -0
- package/dist/scripts/src/components/ValidationSummary/ValidationSummary.js +59 -0
- package/dist/scripts/src/components/ViewComponentRegistryContext.js +34 -0
- package/dist/scripts/src/components/abstractions.js +2 -0
- package/dist/scripts/src/components/chart-color-schemes.js +43 -0
- package/dist/scripts/src/components/component-utils.js +32 -0
- package/dist/scripts/src/components/container-helpers.js +18 -0
- package/dist/scripts/src/components-core/ApiBoundComponent.js +189 -0
- package/dist/scripts/src/components-core/AppContext.js +17 -0
- package/dist/scripts/src/components-core/ChildrenSlot.js +10 -0
- package/dist/scripts/src/components-core/Component.js +280 -0
- package/dist/scripts/src/components-core/ComponentDecorator.js +63 -0
- package/dist/scripts/src/components-core/CompoundComponent.js +132 -0
- package/dist/scripts/src/components-core/EngineError.js +91 -0
- package/dist/scripts/src/components-core/ErrorBoundary.js +58 -0
- package/dist/scripts/src/components-core/Fragment.js +14 -0
- package/dist/scripts/src/components-core/InvalidComponent.js +15 -0
- package/dist/scripts/src/components-core/LoaderComponent.js +78 -0
- package/dist/scripts/src/components-core/RestApiProxy.js +341 -0
- package/dist/scripts/src/components-core/RootComponent.js +272 -0
- package/dist/scripts/src/components-core/RouteContext.js +45 -0
- package/dist/scripts/src/components-core/ScrollContext.js +9 -0
- package/dist/scripts/src/components-core/UnknownComponent.js +15 -0
- package/dist/scripts/src/components-core/abstractions/ComponentRenderer.js +2 -0
- package/dist/scripts/src/components-core/abstractions/LoaderRenderer.js +2 -0
- package/dist/scripts/src/components-core/abstractions/containers.js +18 -0
- package/dist/scripts/src/components-core/abstractions/treeAbstractions.js +2 -0
- package/dist/scripts/src/components-core/action/ApiAction.js +276 -0
- package/dist/scripts/src/components-core/action/DownloadFileAction.js +80 -0
- package/dist/scripts/src/components-core/action/NavigateAction.js +20 -0
- package/dist/scripts/src/components-core/action/TimedAction.js +21 -0
- package/dist/scripts/src/components-core/action/UploadAction.js +88 -0
- package/dist/scripts/src/components-core/action/actions.js +15 -0
- package/dist/scripts/src/components-core/appContext/date-functions.js +19 -0
- package/dist/scripts/src/components-core/appContext/misc-utils.js +12 -0
- package/dist/scripts/src/components-core/component-hooks.js +25 -0
- package/dist/scripts/src/components-core/constants.js +18 -0
- package/dist/scripts/src/components-core/container/Container.js +1110 -0
- package/dist/scripts/src/components-core/container/ContainerComponentDef.js +16 -0
- package/dist/scripts/src/components-core/container/buildProxy.js +54 -0
- package/dist/scripts/src/components-core/container/collectFnVarDeps.js +26 -0
- package/dist/scripts/src/components-core/container/valueExtractor.js +195 -0
- package/dist/scripts/src/components-core/descriptorHelper.js +75 -0
- package/dist/scripts/src/components-core/interception/abstractions.js +2 -0
- package/dist/scripts/src/components-core/interception/useApiInterceptorContext.js +9 -0
- package/dist/scripts/src/components-core/loader/ApiLoader.js +46 -0
- package/dist/scripts/src/components-core/loader/DataLoader.js +160 -0
- package/dist/scripts/src/components-core/loader/ExternalDataLoader.js +52 -0
- package/dist/scripts/src/components-core/loader/Loader.js +115 -0
- package/dist/scripts/src/components-core/loader/MockLoaderRenderer.js +32 -0
- package/dist/scripts/src/components-core/loader/PageableLoader.js +240 -0
- package/dist/scripts/src/components-core/renderers.js +45 -0
- package/dist/scripts/src/components-core/reportEngineError.js +59 -0
- package/dist/scripts/src/components-core/script-runner/BindingTreeEvaluationContext.js +35 -0
- package/dist/scripts/src/components-core/script-runner/ICustomOperations.js +34 -0
- package/dist/scripts/src/components-core/script-runner/LogicalThread.js +2 -0
- package/dist/scripts/src/components-core/script-runner/LoopScope.js +2 -0
- package/dist/scripts/src/components-core/script-runner/ParameterParser.js +117 -0
- package/dist/scripts/src/components-core/script-runner/TryScope.js +2 -0
- package/dist/scripts/src/components-core/script-runner/asyncProxy.js +96 -0
- package/dist/scripts/src/components-core/script-runner/bannedFunctions.js +34 -0
- package/dist/scripts/src/components-core/script-runner/custom-operations-registry.js +40 -0
- package/dist/scripts/src/components-core/script-runner/custom-ui-data.js +40 -0
- package/dist/scripts/src/components-core/script-runner/eval-tree-async.js +551 -0
- package/dist/scripts/src/components-core/script-runner/eval-tree-common.js +498 -0
- package/dist/scripts/src/components-core/script-runner/eval-tree-sync.js +434 -0
- package/dist/scripts/src/components-core/script-runner/modules.js +250 -0
- package/dist/scripts/src/components-core/script-runner/process-statement-async.js +818 -0
- package/dist/scripts/src/components-core/script-runner/process-statement-common.js +193 -0
- package/dist/scripts/src/components-core/script-runner/process-statement-sync.js +740 -0
- package/dist/scripts/src/components-core/script-runner/statement-queue.js +62 -0
- package/dist/scripts/src/components-core/script-runner/visitors.js +352 -0
- package/dist/scripts/src/components-core/theming/ThemeContext.js +43 -0
- package/dist/scripts/src/components-core/theming/ThemeProvider.js +334 -0
- package/dist/scripts/src/components-core/theming/abstractions.js +11 -0
- package/dist/scripts/src/components-core/theming/extendThemeUtils.js +114 -0
- package/dist/scripts/src/components-core/theming/hvar.js +105 -0
- package/dist/scripts/src/components-core/theming/themeVars.js +62 -0
- package/dist/scripts/src/components-core/theming/themes/base-utils.js +31 -0
- package/dist/scripts/src/components-core/theming/themes/palette.js +53 -0
- package/dist/scripts/src/components-core/theming/themes/root.js +257 -0
- package/dist/scripts/src/components-core/theming/themes/solid.js +16 -0
- package/dist/scripts/src/components-core/theming/themes/theme-colors.js +407 -0
- package/dist/scripts/src/components-core/theming/themes/xmlui.js +32 -0
- package/dist/scripts/src/components-core/theming/transformThemeVars.js +286 -0
- package/dist/scripts/src/components-core/utils/DataLoaderQueryKeyGenerator.js +34 -0
- package/dist/scripts/src/components-core/utils/LruCache.js +184 -0
- package/dist/scripts/src/components-core/utils/actionUtils.js +32 -0
- package/dist/scripts/src/components-core/utils/classnames.js +58 -0
- package/dist/scripts/src/components-core/utils/css-utils.js +127 -0
- package/dist/scripts/src/components-core/utils/date-utils.js +78 -0
- package/dist/scripts/src/components-core/utils/extractParam.js +148 -0
- package/dist/scripts/src/components-core/utils/hooks.js +221 -0
- package/dist/scripts/src/components-core/utils/mergeProps.js +45 -0
- package/dist/scripts/src/components-core/utils/misc.js +460 -0
- package/dist/scripts/src/components-core/utils/statementUtils.js +205 -0
- package/dist/scripts/src/components-core/utils/treeUtils.js +48 -0
- package/dist/scripts/src/components-core/xmlui-parser.js +52 -0
- package/dist/scripts/src/parsers/scripting/InputStream.js +59 -0
- package/dist/scripts/src/parsers/scripting/Lexer.js +1028 -0
- package/dist/scripts/src/parsers/scripting/Parser.js +2647 -0
- package/dist/scripts/src/parsers/scripting/ParserError.js +46 -0
- package/dist/scripts/src/parsers/scripting/TokenTrait.js +109 -0
- package/dist/scripts/src/parsers/scripting/code-behind-collect.js +118 -0
- package/dist/scripts/src/parsers/scripting/tree-visitor.js +602 -0
- package/dist/scripts/src/parsers/style-parser/StyleInputStream.js +39 -0
- package/dist/scripts/src/parsers/style-parser/StyleLexer.js +621 -0
- package/dist/scripts/src/parsers/style-parser/StyleParser.js +1000 -0
- package/dist/scripts/src/parsers/style-parser/errors.js +37 -0
- package/dist/scripts/src/parsers/style-parser/source-tree.js +2 -0
- package/dist/scripts/src/parsers/style-parser/style-compiler.js +513 -0
- package/dist/scripts/src/parsers/style-parser/tokens.js +42 -0
- package/dist/scripts/src/parsers/ueml/ParserError.js +54 -0
- package/dist/scripts/src/parsers/ueml/UemlHelper.js +579 -0
- package/dist/scripts/src/parsers/ueml/UemlInputStream.js +59 -0
- package/dist/scripts/src/parsers/ueml/UemlLexer.js +868 -0
- package/dist/scripts/src/parsers/ueml/UemlParser.js +1439 -0
- package/dist/scripts/src/parsers/ueml/UemlToken.js +24 -0
- package/dist/scripts/src/parsers/ueml/fileExtensions.js +6 -0
- package/dist/scripts/src/parsers/ueml/source-tree.js +2 -0
- package/dist/scripts/src/parsers/ueml/ueml-tree.js +2 -0
- package/dist/scripts/src/parsers/xmlui-parser/CharacterCodes.js +136 -0
- package/dist/scripts/src/parsers/xmlui-parser/diagnostics.js +100 -0
- package/dist/scripts/src/parsers/xmlui-parser/parser.js +476 -0
- package/dist/scripts/src/parsers/xmlui-parser/scanner.js +415 -0
- package/dist/scripts/src/parsers/xmlui-parser/syntax-kind.js +106 -0
- package/dist/scripts/src/parsers/xmlui-parser/syntax-node.js +2 -0
- package/dist/scripts/src/parsers/xmlui-parser/transform.js +922 -0
- package/dist/scripts/src/parsers/xmlui-parser/utils.js +83 -0
- package/dist/xmlui.es.d.ts +1667 -0
- package/dist/xmlui.es.js +17 -0
- package/dist/xmlui.umd.js +1589 -0
- package/package.json +175 -0
|
@@ -0,0 +1,700 @@
|
|
|
1
|
+
import { k, A as w } from "./index-ao27SnVp.mjs";
|
|
2
|
+
import { h as jn, e as Z, t as vn, c as Re, s as ie, m as Cn, a as En, b as Pn, p as Wn, d as nt, f as Ce, g as H, i as tt, j as rt, W as $e, z as ve, X as he, N as pn, r as it, J as Ie, U as $n, u as wn, K as ge, V as at, k as Ve, P as ot, l as Oe, M as st, w as ut, O as lt, n as dt, S as Dn, I as Vn, o as Bn, q as ct, v as ft, H as gt, x as Fn, y as ht, A as vt } from "./nivo-legends.es-BuIxHGSU.mjs";
|
|
3
|
+
import { c as _, a as Gn } from "./array-USo-Szhp.mjs";
|
|
4
|
+
const In = Math.PI, On = 2 * In, ye = 1e-6, pt = On - ye;
|
|
5
|
+
function Hn(e) {
|
|
6
|
+
this._ += e[0];
|
|
7
|
+
for (let n = 1, t = e.length; n < t; ++n)
|
|
8
|
+
this._ += arguments[n] + e[n];
|
|
9
|
+
}
|
|
10
|
+
function At(e) {
|
|
11
|
+
let n = Math.floor(e);
|
|
12
|
+
if (!(n >= 0))
|
|
13
|
+
throw new Error(`invalid digits: ${e}`);
|
|
14
|
+
if (n > 15)
|
|
15
|
+
return Hn;
|
|
16
|
+
const t = 10 ** n;
|
|
17
|
+
return function(r) {
|
|
18
|
+
this._ += r[0];
|
|
19
|
+
for (let a = 1, s = r.length; a < s; ++a)
|
|
20
|
+
this._ += Math.round(arguments[a] * t) / t + r[a];
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
class Lt {
|
|
24
|
+
constructor(n) {
|
|
25
|
+
this._x0 = this._y0 = // start of current subpath
|
|
26
|
+
this._x1 = this._y1 = null, this._ = "", this._append = n == null ? Hn : At(n);
|
|
27
|
+
}
|
|
28
|
+
moveTo(n, t) {
|
|
29
|
+
this._append`M${this._x0 = this._x1 = +n},${this._y0 = this._y1 = +t}`;
|
|
30
|
+
}
|
|
31
|
+
closePath() {
|
|
32
|
+
this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._append`Z`);
|
|
33
|
+
}
|
|
34
|
+
lineTo(n, t) {
|
|
35
|
+
this._append`L${this._x1 = +n},${this._y1 = +t}`;
|
|
36
|
+
}
|
|
37
|
+
quadraticCurveTo(n, t, r, a) {
|
|
38
|
+
this._append`Q${+n},${+t},${this._x1 = +r},${this._y1 = +a}`;
|
|
39
|
+
}
|
|
40
|
+
bezierCurveTo(n, t, r, a, s, o) {
|
|
41
|
+
this._append`C${+n},${+t},${+r},${+a},${this._x1 = +s},${this._y1 = +o}`;
|
|
42
|
+
}
|
|
43
|
+
arcTo(n, t, r, a, s) {
|
|
44
|
+
if (n = +n, t = +t, r = +r, a = +a, s = +s, s < 0)
|
|
45
|
+
throw new Error(`negative radius: ${s}`);
|
|
46
|
+
let o = this._x1, i = this._y1, u = r - n, d = a - t, l = o - n, g = i - t, f = l * l + g * g;
|
|
47
|
+
if (this._x1 === null)
|
|
48
|
+
this._append`M${this._x1 = n},${this._y1 = t}`;
|
|
49
|
+
else if (f > ye)
|
|
50
|
+
if (!(Math.abs(g * u - d * l) > ye) || !s)
|
|
51
|
+
this._append`L${this._x1 = n},${this._y1 = t}`;
|
|
52
|
+
else {
|
|
53
|
+
let v = r - o, A = a - i, m = u * u + d * d, b = v * v + A * A, L = Math.sqrt(m), h = Math.sqrt(f), p = s * Math.tan((In - Math.acos((m + f - b) / (2 * L * h))) / 2), y = p / h, x = p / L;
|
|
54
|
+
Math.abs(y - 1) > ye && this._append`L${n + y * l},${t + y * g}`, this._append`A${s},${s},0,0,${+(g * v > l * A)},${this._x1 = n + x * u},${this._y1 = t + x * d}`;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
arc(n, t, r, a, s, o) {
|
|
58
|
+
if (n = +n, t = +t, r = +r, o = !!o, r < 0)
|
|
59
|
+
throw new Error(`negative radius: ${r}`);
|
|
60
|
+
let i = r * Math.cos(a), u = r * Math.sin(a), d = n + i, l = t + u, g = 1 ^ o, f = o ? a - s : s - a;
|
|
61
|
+
this._x1 === null ? this._append`M${d},${l}` : (Math.abs(this._x1 - d) > ye || Math.abs(this._y1 - l) > ye) && this._append`L${d},${l}`, r && (f < 0 && (f = f % On + On), f > pt ? this._append`A${r},${r},0,1,${g},${n - i},${t - u}A${r},${r},0,1,${g},${this._x1 = d},${this._y1 = l}` : f > ye && this._append`A${r},${r},0,${+(f >= In)},${g},${this._x1 = n + r * Math.cos(s)},${this._y1 = t + r * Math.sin(s)}`);
|
|
62
|
+
}
|
|
63
|
+
rect(n, t, r, a) {
|
|
64
|
+
this._append`M${this._x0 = this._x1 = +n},${this._y0 = this._y1 = +t}h${r = +r}v${+a}h${-r}Z`;
|
|
65
|
+
}
|
|
66
|
+
toString() {
|
|
67
|
+
return this._;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function Xn(e) {
|
|
71
|
+
let n = 3;
|
|
72
|
+
return e.digits = function(t) {
|
|
73
|
+
if (!arguments.length)
|
|
74
|
+
return n;
|
|
75
|
+
if (t == null)
|
|
76
|
+
n = null;
|
|
77
|
+
else {
|
|
78
|
+
const r = Math.floor(t);
|
|
79
|
+
if (!(r >= 0))
|
|
80
|
+
throw new RangeError(`invalid digits: ${t}`);
|
|
81
|
+
n = r;
|
|
82
|
+
}
|
|
83
|
+
return e;
|
|
84
|
+
}, () => new Lt(n);
|
|
85
|
+
}
|
|
86
|
+
function mt(e) {
|
|
87
|
+
return e.innerRadius;
|
|
88
|
+
}
|
|
89
|
+
function xt(e) {
|
|
90
|
+
return e.outerRadius;
|
|
91
|
+
}
|
|
92
|
+
function bt(e) {
|
|
93
|
+
return e.startAngle;
|
|
94
|
+
}
|
|
95
|
+
function Rt(e) {
|
|
96
|
+
return e.endAngle;
|
|
97
|
+
}
|
|
98
|
+
function yt(e) {
|
|
99
|
+
return e && e.padAngle;
|
|
100
|
+
}
|
|
101
|
+
function kt(e, n, t, r, a, s, o, i) {
|
|
102
|
+
var u = t - e, d = r - n, l = o - a, g = i - s, f = g * u - l * d;
|
|
103
|
+
if (!(f * f < Z))
|
|
104
|
+
return f = (l * (n - s) - g * (e - a)) / f, [e + f * u, n + f * d];
|
|
105
|
+
}
|
|
106
|
+
function hn(e, n, t, r, a, s, o) {
|
|
107
|
+
var i = e - t, u = n - r, d = (o ? s : -s) / Ce(i * i + u * u), l = d * u, g = -d * i, f = e + l, v = n + g, A = t + l, m = r + g, b = (f + A) / 2, L = (v + m) / 2, h = A - f, p = m - v, y = h * h + p * p, x = a - s, C = f * m - A * v, T = (p < 0 ? -1 : 1) * Ce(tt(0, x * x * y - C * C)), j = (C * p - h * T) / y, S = (-C * h - p * T) / y, I = (C * p + h * T) / y, E = (-C * h + p * T) / y, P = j - b, R = S - L, M = I - b, B = E - L;
|
|
108
|
+
return P * P + R * R > M * M + B * B && (j = I, S = E), {
|
|
109
|
+
cx: j,
|
|
110
|
+
cy: S,
|
|
111
|
+
x01: -l,
|
|
112
|
+
y01: -g,
|
|
113
|
+
x11: j * (a / x - 1),
|
|
114
|
+
y11: S * (a / x - 1)
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function Mt() {
|
|
118
|
+
var e = mt, n = xt, t = _(0), r = null, a = bt, s = Rt, o = yt, i = null, u = Xn(d);
|
|
119
|
+
function d() {
|
|
120
|
+
var l, g, f = +e.apply(this, arguments), v = +n.apply(this, arguments), A = a.apply(this, arguments) - jn, m = s.apply(this, arguments) - jn, b = En(m - A), L = m > A;
|
|
121
|
+
if (i || (i = l = u()), v < f && (g = v, v = f, f = g), !(v > Z))
|
|
122
|
+
i.moveTo(0, 0);
|
|
123
|
+
else if (b > vn - Z)
|
|
124
|
+
i.moveTo(v * Re(A), v * ie(A)), i.arc(0, 0, v, A, m, !L), f > Z && (i.moveTo(f * Re(m), f * ie(m)), i.arc(0, 0, f, m, A, L));
|
|
125
|
+
else {
|
|
126
|
+
var h = A, p = m, y = A, x = m, C = b, T = b, j = o.apply(this, arguments) / 2, S = j > Z && (r ? +r.apply(this, arguments) : Ce(f * f + v * v)), I = Cn(En(v - f) / 2, +t.apply(this, arguments)), E = I, P = I, R, M;
|
|
127
|
+
if (S > Z) {
|
|
128
|
+
var B = Pn(S / f * ie(j)), F = Pn(S / v * ie(j));
|
|
129
|
+
(C -= B * 2) > Z ? (B *= L ? 1 : -1, y += B, x -= B) : (C = 0, y = x = (A + m) / 2), (T -= F * 2) > Z ? (F *= L ? 1 : -1, h += F, p -= F) : (T = 0, h = p = (A + m) / 2);
|
|
130
|
+
}
|
|
131
|
+
var Y = v * Re(h), J = v * ie(h), X = f * Re(x), D = f * ie(x);
|
|
132
|
+
if (I > Z) {
|
|
133
|
+
var U = v * Re(p), z = v * ie(p), Q = f * Re(y), ee = f * ie(y), q;
|
|
134
|
+
if (b < Wn)
|
|
135
|
+
if (q = kt(Y, J, Q, ee, U, z, X, D)) {
|
|
136
|
+
var W = Y - q[0], N = J - q[1], G = U - q[0], pe = z - q[1], Ae = 1 / ie(nt((W * G + N * pe) / (Ce(W * W + N * N) * Ce(G * G + pe * pe))) / 2), ue = Ce(q[0] * q[0] + q[1] * q[1]);
|
|
137
|
+
E = Cn(I, (f - ue) / (Ae - 1)), P = Cn(I, (v - ue) / (Ae + 1));
|
|
138
|
+
} else
|
|
139
|
+
E = P = 0;
|
|
140
|
+
}
|
|
141
|
+
T > Z ? P > Z ? (R = hn(Q, ee, Y, J, v, P, L), M = hn(U, z, X, D, v, P, L), i.moveTo(R.cx + R.x01, R.cy + R.y01), P < I ? i.arc(R.cx, R.cy, P, H(R.y01, R.x01), H(M.y01, M.x01), !L) : (i.arc(R.cx, R.cy, P, H(R.y01, R.x01), H(R.y11, R.x11), !L), i.arc(0, 0, v, H(R.cy + R.y11, R.cx + R.x11), H(M.cy + M.y11, M.cx + M.x11), !L), i.arc(M.cx, M.cy, P, H(M.y11, M.x11), H(M.y01, M.x01), !L))) : (i.moveTo(Y, J), i.arc(0, 0, v, h, p, !L)) : i.moveTo(Y, J), !(f > Z) || !(C > Z) ? i.lineTo(X, D) : E > Z ? (R = hn(X, D, U, z, f, -E, L), M = hn(Y, J, Q, ee, f, -E, L), i.lineTo(R.cx + R.x01, R.cy + R.y01), E < I ? i.arc(R.cx, R.cy, E, H(R.y01, R.x01), H(M.y01, M.x01), !L) : (i.arc(R.cx, R.cy, E, H(R.y01, R.x01), H(R.y11, R.x11), !L), i.arc(0, 0, f, H(R.cy + R.y11, R.cx + R.x11), H(M.cy + M.y11, M.cx + M.x11), L), i.arc(M.cx, M.cy, E, H(M.y11, M.x11), H(M.y01, M.x01), !L))) : i.arc(0, 0, f, x, y, L);
|
|
142
|
+
}
|
|
143
|
+
if (i.closePath(), l)
|
|
144
|
+
return i = null, l + "" || null;
|
|
145
|
+
}
|
|
146
|
+
return d.centroid = function() {
|
|
147
|
+
var l = (+e.apply(this, arguments) + +n.apply(this, arguments)) / 2, g = (+a.apply(this, arguments) + +s.apply(this, arguments)) / 2 - Wn / 2;
|
|
148
|
+
return [Re(g) * l, ie(g) * l];
|
|
149
|
+
}, d.innerRadius = function(l) {
|
|
150
|
+
return arguments.length ? (e = typeof l == "function" ? l : _(+l), d) : e;
|
|
151
|
+
}, d.outerRadius = function(l) {
|
|
152
|
+
return arguments.length ? (n = typeof l == "function" ? l : _(+l), d) : n;
|
|
153
|
+
}, d.cornerRadius = function(l) {
|
|
154
|
+
return arguments.length ? (t = typeof l == "function" ? l : _(+l), d) : t;
|
|
155
|
+
}, d.padRadius = function(l) {
|
|
156
|
+
return arguments.length ? (r = l == null ? null : typeof l == "function" ? l : _(+l), d) : r;
|
|
157
|
+
}, d.startAngle = function(l) {
|
|
158
|
+
return arguments.length ? (a = typeof l == "function" ? l : _(+l), d) : a;
|
|
159
|
+
}, d.endAngle = function(l) {
|
|
160
|
+
return arguments.length ? (s = typeof l == "function" ? l : _(+l), d) : s;
|
|
161
|
+
}, d.padAngle = function(l) {
|
|
162
|
+
return arguments.length ? (o = typeof l == "function" ? l : _(+l), d) : o;
|
|
163
|
+
}, d.context = function(l) {
|
|
164
|
+
return arguments.length ? (i = l ?? null, d) : i;
|
|
165
|
+
}, d;
|
|
166
|
+
}
|
|
167
|
+
function Ct(e) {
|
|
168
|
+
return e[0];
|
|
169
|
+
}
|
|
170
|
+
function It(e) {
|
|
171
|
+
return e[1];
|
|
172
|
+
}
|
|
173
|
+
function Ot(e, n) {
|
|
174
|
+
var t = _(!0), r = null, a = rt, s = null, o = Xn(i);
|
|
175
|
+
e = typeof e == "function" ? e : e === void 0 ? Ct : _(e), n = typeof n == "function" ? n : n === void 0 ? It : _(n);
|
|
176
|
+
function i(u) {
|
|
177
|
+
var d, l = (u = Gn(u)).length, g, f = !1, v;
|
|
178
|
+
for (r == null && (s = a(v = o())), d = 0; d <= l; ++d)
|
|
179
|
+
!(d < l && t(g = u[d], d, u)) === f && ((f = !f) ? s.lineStart() : s.lineEnd()), f && s.point(+e(g, d, u), +n(g, d, u));
|
|
180
|
+
if (v)
|
|
181
|
+
return s = null, v + "" || null;
|
|
182
|
+
}
|
|
183
|
+
return i.x = function(u) {
|
|
184
|
+
return arguments.length ? (e = typeof u == "function" ? u : _(+u), i) : e;
|
|
185
|
+
}, i.y = function(u) {
|
|
186
|
+
return arguments.length ? (n = typeof u == "function" ? u : _(+u), i) : n;
|
|
187
|
+
}, i.defined = function(u) {
|
|
188
|
+
return arguments.length ? (t = typeof u == "function" ? u : _(!!u), i) : t;
|
|
189
|
+
}, i.curve = function(u) {
|
|
190
|
+
return arguments.length ? (a = u, r != null && (s = a(r)), i) : a;
|
|
191
|
+
}, i.context = function(u) {
|
|
192
|
+
return arguments.length ? (u == null ? r = s = null : s = a(r = u), i) : r;
|
|
193
|
+
}, i;
|
|
194
|
+
}
|
|
195
|
+
function $t(e, n) {
|
|
196
|
+
return n < e ? -1 : n > e ? 1 : n >= e ? 0 : NaN;
|
|
197
|
+
}
|
|
198
|
+
function wt(e) {
|
|
199
|
+
return e;
|
|
200
|
+
}
|
|
201
|
+
function Tt() {
|
|
202
|
+
var e = wt, n = $t, t = null, r = _(0), a = _(vn), s = _(0);
|
|
203
|
+
function o(i) {
|
|
204
|
+
var u, d = (i = Gn(i)).length, l, g, f = 0, v = new Array(d), A = new Array(d), m = +r.apply(this, arguments), b = Math.min(vn, Math.max(-vn, a.apply(this, arguments) - m)), L, h = Math.min(Math.abs(b) / d, s.apply(this, arguments)), p = h * (b < 0 ? -1 : 1), y;
|
|
205
|
+
for (u = 0; u < d; ++u)
|
|
206
|
+
(y = A[v[u] = u] = +e(i[u], u, i)) > 0 && (f += y);
|
|
207
|
+
for (n != null ? v.sort(function(x, C) {
|
|
208
|
+
return n(A[x], A[C]);
|
|
209
|
+
}) : t != null && v.sort(function(x, C) {
|
|
210
|
+
return t(i[x], i[C]);
|
|
211
|
+
}), u = 0, g = f ? (b - d * p) / f : 0; u < d; ++u, m = L)
|
|
212
|
+
l = v[u], y = A[l], L = m + (y > 0 ? y * g : 0) + p, A[l] = {
|
|
213
|
+
data: i[l],
|
|
214
|
+
index: u,
|
|
215
|
+
value: y,
|
|
216
|
+
startAngle: m,
|
|
217
|
+
endAngle: L,
|
|
218
|
+
padAngle: h
|
|
219
|
+
};
|
|
220
|
+
return A;
|
|
221
|
+
}
|
|
222
|
+
return o.value = function(i) {
|
|
223
|
+
return arguments.length ? (e = typeof i == "function" ? i : _(+i), o) : e;
|
|
224
|
+
}, o.sortValues = function(i) {
|
|
225
|
+
return arguments.length ? (n = i, t = null, o) : n;
|
|
226
|
+
}, o.sort = function(i) {
|
|
227
|
+
return arguments.length ? (t = i, n = null, o) : t;
|
|
228
|
+
}, o.startAngle = function(i) {
|
|
229
|
+
return arguments.length ? (r = typeof i == "function" ? i : _(+i), o) : r;
|
|
230
|
+
}, o.endAngle = function(i) {
|
|
231
|
+
return arguments.length ? (a = typeof i == "function" ? i : _(+i), o) : a;
|
|
232
|
+
}, o.padAngle = function(i) {
|
|
233
|
+
return arguments.length ? (s = typeof i == "function" ? i : _(+i), o) : s;
|
|
234
|
+
}, o;
|
|
235
|
+
}
|
|
236
|
+
function $() {
|
|
237
|
+
return $ = Object.assign ? Object.assign.bind() : function(e) {
|
|
238
|
+
for (var n = 1; n < arguments.length; n++) {
|
|
239
|
+
var t = arguments[n];
|
|
240
|
+
for (var r in t)
|
|
241
|
+
Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
|
|
242
|
+
}
|
|
243
|
+
return e;
|
|
244
|
+
}, $.apply(this, arguments);
|
|
245
|
+
}
|
|
246
|
+
var St = { pointerEvents: "none" }, jt = function(e) {
|
|
247
|
+
var n = e.label, t = e.style, r = ve();
|
|
248
|
+
return w.jsx(Oe.g, { transform: t.transform, opacity: t.progress, style: St, children: w.jsx(Oe.text, { textAnchor: "middle", dominantBaseline: "central", style: $({}, r.labels.text, { fill: t.textColor }), children: n }) });
|
|
249
|
+
}, zn = function(e) {
|
|
250
|
+
var n = e % (2 * Math.PI);
|
|
251
|
+
return n < 0 && (n += 2 * Math.PI), n;
|
|
252
|
+
}, qn = function(e, n) {
|
|
253
|
+
return e.filter(function(t) {
|
|
254
|
+
return Math.abs(pn(t.arc.endAngle - t.arc.startAngle)) >= n;
|
|
255
|
+
});
|
|
256
|
+
}, Et = { startAngle: { enter: function(e) {
|
|
257
|
+
return $({}, e, { endAngle: e.startAngle });
|
|
258
|
+
}, update: function(e) {
|
|
259
|
+
return e;
|
|
260
|
+
}, leave: function(e) {
|
|
261
|
+
return $({}, e, { startAngle: e.endAngle });
|
|
262
|
+
} }, middleAngle: { enter: function(e) {
|
|
263
|
+
var n = e.startAngle + (e.endAngle - e.startAngle) / 2;
|
|
264
|
+
return $({}, e, { startAngle: n, endAngle: n });
|
|
265
|
+
}, update: function(e) {
|
|
266
|
+
return e;
|
|
267
|
+
}, leave: function(e) {
|
|
268
|
+
var n = e.startAngle + (e.endAngle - e.startAngle) / 2;
|
|
269
|
+
return $({}, e, { startAngle: n, endAngle: n });
|
|
270
|
+
} }, endAngle: { enter: function(e) {
|
|
271
|
+
return $({}, e, { startAngle: e.endAngle });
|
|
272
|
+
}, update: function(e) {
|
|
273
|
+
return e;
|
|
274
|
+
}, leave: function(e) {
|
|
275
|
+
return $({}, e, { endAngle: e.startAngle });
|
|
276
|
+
} }, innerRadius: { enter: function(e) {
|
|
277
|
+
return $({}, e, { outerRadius: e.innerRadius });
|
|
278
|
+
}, update: function(e) {
|
|
279
|
+
return e;
|
|
280
|
+
}, leave: function(e) {
|
|
281
|
+
return $({}, e, { innerRadius: e.outerRadius });
|
|
282
|
+
} }, centerRadius: { enter: function(e) {
|
|
283
|
+
var n = e.innerRadius + (e.outerRadius - e.innerRadius) / 2;
|
|
284
|
+
return $({}, e, { innerRadius: n, outerRadius: n });
|
|
285
|
+
}, update: function(e) {
|
|
286
|
+
return e;
|
|
287
|
+
}, leave: function(e) {
|
|
288
|
+
var n = e.innerRadius + (e.outerRadius - e.innerRadius) / 2;
|
|
289
|
+
return $({}, e, { innerRadius: n, outerRadius: n });
|
|
290
|
+
} }, outerRadius: { enter: function(e) {
|
|
291
|
+
return $({}, e, { innerRadius: e.outerRadius });
|
|
292
|
+
}, update: function(e) {
|
|
293
|
+
return e;
|
|
294
|
+
}, leave: function(e) {
|
|
295
|
+
return $({}, e, { outerRadius: e.innerRadius });
|
|
296
|
+
} }, pushIn: { enter: function(e) {
|
|
297
|
+
return $({}, e, { innerRadius: e.innerRadius - e.outerRadius + e.innerRadius, outerRadius: e.innerRadius });
|
|
298
|
+
}, update: function(e) {
|
|
299
|
+
return e;
|
|
300
|
+
}, leave: function(e) {
|
|
301
|
+
return $({}, e, { innerRadius: e.outerRadius, outerRadius: e.outerRadius + e.outerRadius - e.innerRadius });
|
|
302
|
+
} }, pushOut: { enter: function(e) {
|
|
303
|
+
return $({}, e, { innerRadius: e.outerRadius, outerRadius: e.outerRadius + e.outerRadius - e.innerRadius });
|
|
304
|
+
}, update: function(e) {
|
|
305
|
+
return e;
|
|
306
|
+
}, leave: function(e) {
|
|
307
|
+
return $({}, e, { innerRadius: e.innerRadius - e.outerRadius + e.innerRadius, outerRadius: e.innerRadius });
|
|
308
|
+
} } }, Nn = function(e, n) {
|
|
309
|
+
return k.useMemo(function() {
|
|
310
|
+
var t = Et[e];
|
|
311
|
+
return { enter: function(r) {
|
|
312
|
+
return $({ progress: 0 }, t.enter(r.arc), n ? n.enter(r) : {});
|
|
313
|
+
}, update: function(r) {
|
|
314
|
+
return $({ progress: 1 }, t.update(r.arc), n ? n.update(r) : {});
|
|
315
|
+
}, leave: function(r) {
|
|
316
|
+
return $({ progress: 0 }, t.leave(r.arc), n ? n.leave(r) : {});
|
|
317
|
+
} };
|
|
318
|
+
}, [e, n]);
|
|
319
|
+
}, Yn = function(e, n) {
|
|
320
|
+
var t = at(e) - Math.PI / 2, r = e.innerRadius + (e.outerRadius - e.innerRadius) * n;
|
|
321
|
+
return Ie(t, r);
|
|
322
|
+
}, Pt = function(e) {
|
|
323
|
+
return function(n, t, r, a) {
|
|
324
|
+
return Ve([n, t, r, a], function(s, o, i, u) {
|
|
325
|
+
var d = Yn({ startAngle: s, endAngle: o, innerRadius: i, outerRadius: u }, e);
|
|
326
|
+
return "translate(" + d.x + "," + d.y + ")";
|
|
327
|
+
});
|
|
328
|
+
};
|
|
329
|
+
}, Wt = function(e, n, t, r) {
|
|
330
|
+
n === void 0 && (n = 0.5), t === void 0 && (t = "innerRadius");
|
|
331
|
+
var a = $n(), s = a.animate, o = a.config, i = Nn(t, r);
|
|
332
|
+
return { transition: wn(e, { keys: function(u) {
|
|
333
|
+
return u.id;
|
|
334
|
+
}, initial: i.update, from: i.enter, enter: i.update, update: i.update, leave: i.leave, config: o, immediate: !s }), interpolate: Pt(n) };
|
|
335
|
+
}, _t = function(e) {
|
|
336
|
+
var n = e.data, t = e.offset, r = t === void 0 ? 0.5 : t, a = e.skipAngle, s = a === void 0 ? 0 : a, o = e.computeExtraProps, i = o === void 0 ? function() {
|
|
337
|
+
return {};
|
|
338
|
+
} : o;
|
|
339
|
+
return k.useMemo(function() {
|
|
340
|
+
return qn(n, s).map(function(u) {
|
|
341
|
+
var d = Yn(u.arc, r);
|
|
342
|
+
return $({}, i(u), { x: d.x, y: d.y, data: u });
|
|
343
|
+
});
|
|
344
|
+
}, [n, r, s, i]);
|
|
345
|
+
}, Dt = function(e) {
|
|
346
|
+
var n = e.center, t = e.data, r = e.transitionMode, a = e.label, s = e.radiusOffset, o = e.skipAngle, i = e.textColor, u = e.component, d = u === void 0 ? jt : u, l = $e(a), g = ve(), f = he(i, g), v = k.useMemo(function() {
|
|
347
|
+
return t.filter(function(h) {
|
|
348
|
+
return Math.abs(pn(h.arc.endAngle - h.arc.startAngle)) >= o;
|
|
349
|
+
});
|
|
350
|
+
}, [t, o]), A = Wt(v, s, r), m = A.transition, b = A.interpolate, L = d;
|
|
351
|
+
return w.jsx("g", { transform: "translate(" + n[0] + "," + n[1] + ")", children: m(function(h, p) {
|
|
352
|
+
return k.createElement(L, { key: p.id, datum: p, label: l(p), style: $({}, h, { transform: b(h.startAngle, h.endAngle, h.innerRadius, h.outerRadius), textColor: f(p) }) });
|
|
353
|
+
}) });
|
|
354
|
+
}, Vt = function(e, n, t) {
|
|
355
|
+
e.textAlign = "center", e.textBaseline = "middle", e.font = t.labels.text.fontSize + "px " + t.labels.text.fontFamily, n.forEach(function(r) {
|
|
356
|
+
e.fillStyle = r.textColor, e.fillText("" + r.label, r.x, r.y);
|
|
357
|
+
});
|
|
358
|
+
}, Bt = function(e) {
|
|
359
|
+
var n = e.data, t = e.offset, r = e.skipAngle, a = e.label, s = e.textColor, o = $e(a), i = ve(), u = he(s, i), d = k.useCallback(function(l) {
|
|
360
|
+
return { label: o(l), textColor: u(l) };
|
|
361
|
+
}, [o, u]);
|
|
362
|
+
return _t({ data: n, offset: t, skipAngle: r, computeExtraProps: d });
|
|
363
|
+
}, Ft = function(e) {
|
|
364
|
+
var n = e.label, t = e.style, r = ve();
|
|
365
|
+
return w.jsxs(Oe.g, { opacity: t.opacity, children: [w.jsx(Oe.path, { fill: "none", stroke: t.linkColor, strokeWidth: t.thickness, d: t.path }), w.jsx(Oe.text, { transform: t.textPosition, textAnchor: t.textAnchor, dominantBaseline: "central", style: $({}, r.labels.text, { fill: t.textColor }), children: n })] });
|
|
366
|
+
}, Gt = function(e) {
|
|
367
|
+
var n = zn(e.startAngle + (e.endAngle - e.startAngle) / 2 - Math.PI / 2);
|
|
368
|
+
return n < Math.PI / 2 || n > 1.5 * Math.PI ? "start" : "end";
|
|
369
|
+
}, Tn = function(e, n, t, r) {
|
|
370
|
+
var a, s, o = zn(e.startAngle + (e.endAngle - e.startAngle) / 2 - Math.PI / 2), i = Ie(o, e.outerRadius + n), u = Ie(o, e.outerRadius + n + t);
|
|
371
|
+
return o < Math.PI / 2 || o > 1.5 * Math.PI ? (a = "after", s = { x: u.x + r, y: u.y }) : (a = "before", s = { x: u.x - r, y: u.y }), { side: a, points: [i, u, s] };
|
|
372
|
+
}, Ht = Ot().x(function(e) {
|
|
373
|
+
return e.x;
|
|
374
|
+
}).y(function(e) {
|
|
375
|
+
return e.y;
|
|
376
|
+
}), Xt = function(e, n, t, r, a, s, o) {
|
|
377
|
+
return Ve([e, n, t, r, a, s, o], function(i, u, d, l, g, f, v) {
|
|
378
|
+
var A = Tn({ startAngle: i, endAngle: u, innerRadius: d, outerRadius: l }, g, f, v).points;
|
|
379
|
+
return Ht(A);
|
|
380
|
+
});
|
|
381
|
+
}, zt = function(e, n, t, r) {
|
|
382
|
+
return Ve([e, n, t, r], function(a, s, o, i) {
|
|
383
|
+
return Gt({ startAngle: a, endAngle: s, innerRadius: o, outerRadius: i });
|
|
384
|
+
});
|
|
385
|
+
}, qt = function(e, n, t, r, a, s, o, i) {
|
|
386
|
+
return Ve([e, n, t, r, a, s, o, i], function(u, d, l, g, f, v, A, m) {
|
|
387
|
+
var b = Tn({ startAngle: u, endAngle: d, innerRadius: l, outerRadius: g }, f, v, A), L = b.points, h = b.side, p = L[2];
|
|
388
|
+
return h === "before" ? p.x -= m : p.x += m, "translate(" + p.x + "," + p.y + ")";
|
|
389
|
+
});
|
|
390
|
+
}, Nt = function(e) {
|
|
391
|
+
var n = e.data, t = e.offset, r = t === void 0 ? 0 : t, a = e.diagonalLength, s = e.straightLength, o = e.skipAngle, i = o === void 0 ? 0 : o, u = e.textOffset, d = e.linkColor, l = e.textColor, g = $n(), f = g.animate, v = g.config, A = ve(), m = he(d, A), b = he(l, A), L = function(p, y) {
|
|
392
|
+
return k.useMemo(function() {
|
|
393
|
+
return qn(p, y);
|
|
394
|
+
}, [p, y]);
|
|
395
|
+
}(n, i), h = function(p) {
|
|
396
|
+
var y = p.offset, x = p.diagonalLength, C = p.straightLength, T = p.textOffset, j = p.getLinkColor, S = p.getTextColor;
|
|
397
|
+
return k.useMemo(function() {
|
|
398
|
+
return { enter: function(I) {
|
|
399
|
+
return { startAngle: I.arc.startAngle, endAngle: I.arc.endAngle, innerRadius: I.arc.innerRadius, outerRadius: I.arc.outerRadius, offset: y, diagonalLength: 0, straightLength: 0, textOffset: T, linkColor: j(I), textColor: S(I), opacity: 0 };
|
|
400
|
+
}, update: function(I) {
|
|
401
|
+
return { startAngle: I.arc.startAngle, endAngle: I.arc.endAngle, innerRadius: I.arc.innerRadius, outerRadius: I.arc.outerRadius, offset: y, diagonalLength: x, straightLength: C, textOffset: T, linkColor: j(I), textColor: S(I), opacity: 1 };
|
|
402
|
+
}, leave: function(I) {
|
|
403
|
+
return { startAngle: I.arc.startAngle, endAngle: I.arc.endAngle, innerRadius: I.arc.innerRadius, outerRadius: I.arc.outerRadius, offset: y, diagonalLength: 0, straightLength: 0, textOffset: T, linkColor: j(I), textColor: S(I), opacity: 0 };
|
|
404
|
+
} };
|
|
405
|
+
}, [x, C, T, j, S, y]);
|
|
406
|
+
}({ offset: r, diagonalLength: a, straightLength: s, textOffset: u, getLinkColor: m, getTextColor: b });
|
|
407
|
+
return { transition: wn(L, { keys: function(p) {
|
|
408
|
+
return p.id;
|
|
409
|
+
}, initial: h.update, from: h.enter, enter: h.update, update: h.update, leave: h.leave, config: v, immediate: !f }), interpolateLink: Xt, interpolateTextAnchor: zt, interpolateTextPosition: qt };
|
|
410
|
+
}, Yt = function(e) {
|
|
411
|
+
var n = e.center, t = e.data, r = e.label, a = e.skipAngle, s = e.offset, o = e.diagonalLength, i = e.straightLength, u = e.strokeWidth, d = e.textOffset, l = e.textColor, g = e.linkColor, f = e.component, v = f === void 0 ? Ft : f, A = $e(r), m = Nt({ data: t, skipAngle: a, offset: s, diagonalLength: o, straightLength: i, textOffset: d, linkColor: g, textColor: l }), b = m.transition, L = m.interpolateLink, h = m.interpolateTextAnchor, p = m.interpolateTextPosition, y = v;
|
|
412
|
+
return w.jsx("g", { transform: "translate(" + n[0] + "," + n[1] + ")", children: b(function(x, C) {
|
|
413
|
+
return k.createElement(y, { key: C.id, datum: C, label: A(C), style: $({}, x, { thickness: u, path: L(x.startAngle, x.endAngle, x.innerRadius, x.outerRadius, x.offset, x.diagonalLength, x.straightLength), textAnchor: h(x.startAngle, x.endAngle, x.innerRadius, x.outerRadius), textPosition: p(x.startAngle, x.endAngle, x.innerRadius, x.outerRadius, x.offset, x.diagonalLength, x.straightLength, x.textOffset) }) });
|
|
414
|
+
}) });
|
|
415
|
+
}, Jt = function(e, n, t, r) {
|
|
416
|
+
e.textBaseline = "middle", e.font = t.labels.text.fontSize + "px " + t.labels.text.fontFamily, n.forEach(function(a) {
|
|
417
|
+
e.fillStyle = a.textColor, e.textAlign = it.canvas.align[a.textAnchor], e.fillText("" + a.label, a.x, a.y), e.beginPath(), e.strokeStyle = a.linkColor, e.lineWidth = r, a.points.forEach(function(s, o) {
|
|
418
|
+
o === 0 ? e.moveTo(s.x, s.y) : e.lineTo(s.x, s.y);
|
|
419
|
+
}), e.stroke();
|
|
420
|
+
});
|
|
421
|
+
}, Ut = function(e) {
|
|
422
|
+
var n = e.data, t = e.skipAngle, r = t === void 0 ? 0 : t, a = e.offset, s = a === void 0 ? 0.5 : a, o = e.diagonalLength, i = e.straightLength, u = e.computeExtraProps, d = u === void 0 ? function() {
|
|
423
|
+
return {};
|
|
424
|
+
} : u, l = k.useMemo(function() {
|
|
425
|
+
return n.filter(function(g) {
|
|
426
|
+
return Math.abs(pn(g.arc.endAngle - g.arc.startAngle)) >= r;
|
|
427
|
+
}).map(function(g) {
|
|
428
|
+
return $({}, Tn(g.arc, s, o, i), { data: g });
|
|
429
|
+
});
|
|
430
|
+
}, [n, r, s, o, i]);
|
|
431
|
+
return k.useMemo(function() {
|
|
432
|
+
return l.map(function(g) {
|
|
433
|
+
return $({}, d(g), g);
|
|
434
|
+
});
|
|
435
|
+
}, [l, d]);
|
|
436
|
+
}, Zt = function(e) {
|
|
437
|
+
var n = e.data, t = e.skipAngle, r = e.offset, a = e.diagonalLength, s = e.straightLength, o = e.textOffset, i = o === void 0 ? 0 : o, u = e.label, d = e.linkColor, l = e.textColor, g = $e(u), f = ve(), v = he(d, f), A = he(l, f), m = k.useCallback(function(b) {
|
|
438
|
+
var L, h = { x: b.points[2].x, y: b.points[2].y };
|
|
439
|
+
return b.side === "before" ? (h.x -= i, L = "end") : (h.x += i, L = "start"), $({}, h, { label: g(b.data), linkColor: v(b.data), textAnchor: L, textColor: A(b.data) });
|
|
440
|
+
}, [g, v, A, i]);
|
|
441
|
+
return Ut({ data: n, skipAngle: t, offset: r, diagonalLength: a, straightLength: s, computeExtraProps: m });
|
|
442
|
+
}, Kt = function(e) {
|
|
443
|
+
var n = e.datum, t = e.style, r = e.onClick, a = e.onMouseEnter, s = e.onMouseMove, o = e.onMouseLeave, i = k.useCallback(function(g) {
|
|
444
|
+
return r == null ? void 0 : r(n, g);
|
|
445
|
+
}, [r, n]), u = k.useCallback(function(g) {
|
|
446
|
+
return a == null ? void 0 : a(n, g);
|
|
447
|
+
}, [a, n]), d = k.useCallback(function(g) {
|
|
448
|
+
return s == null ? void 0 : s(n, g);
|
|
449
|
+
}, [s, n]), l = k.useCallback(function(g) {
|
|
450
|
+
return o == null ? void 0 : o(n, g);
|
|
451
|
+
}, [o, n]);
|
|
452
|
+
return w.jsx(Oe.path, { d: t.path, opacity: t.opacity, fill: n.fill || t.color, stroke: t.borderColor, strokeWidth: t.borderWidth, onClick: r ? i : void 0, onMouseEnter: a ? u : void 0, onMouseMove: s ? d : void 0, onMouseLeave: o ? l : void 0 });
|
|
453
|
+
}, Qt = function(e, n, t, r, a) {
|
|
454
|
+
return Ve([e, n, t, r], function(s, o, i, u) {
|
|
455
|
+
return a({ startAngle: s, endAngle: o, innerRadius: Math.max(0, i), outerRadius: Math.max(0, u) });
|
|
456
|
+
});
|
|
457
|
+
}, er = function(e, n, t) {
|
|
458
|
+
n === void 0 && (n = "innerRadius");
|
|
459
|
+
var r = $n(), a = r.animate, s = r.config, o = Nn(n, t);
|
|
460
|
+
return { transition: wn(e, { keys: function(i) {
|
|
461
|
+
return i.id;
|
|
462
|
+
}, initial: o.update, from: o.enter, enter: o.update, update: o.update, leave: o.leave, config: s, immediate: !a }), interpolate: Qt };
|
|
463
|
+
}, nr = function(e) {
|
|
464
|
+
var n = e.center, t = e.data, r = e.arcGenerator, a = e.borderWidth, s = e.borderColor, o = e.onClick, i = e.onMouseEnter, u = e.onMouseMove, d = e.onMouseLeave, l = e.transitionMode, g = e.component, f = g === void 0 ? Kt : g, v = ve(), A = he(s, v), m = er(t, l, { enter: function(p) {
|
|
465
|
+
return { opacity: 0, color: p.color, borderColor: A(p) };
|
|
466
|
+
}, update: function(p) {
|
|
467
|
+
return { opacity: 1, color: p.color, borderColor: A(p) };
|
|
468
|
+
}, leave: function(p) {
|
|
469
|
+
return { opacity: 0, color: p.color, borderColor: A(p) };
|
|
470
|
+
} }), b = m.transition, L = m.interpolate, h = f;
|
|
471
|
+
return w.jsx("g", { transform: "translate(" + n[0] + "," + n[1] + ")", children: b(function(p, y) {
|
|
472
|
+
return k.createElement(h, { key: y.id, datum: y, style: $({}, p, { borderWidth: a, path: L(p.startAngle, p.endAngle, p.innerRadius, p.outerRadius, r) }), onClick: o, onMouseEnter: i, onMouseMove: u, onMouseLeave: d });
|
|
473
|
+
}) });
|
|
474
|
+
}, tr = function(e, n, t, r, a, s) {
|
|
475
|
+
s === void 0 && (s = !0);
|
|
476
|
+
var o = [], i = Ie(ge(r), t);
|
|
477
|
+
o.push([i.x, i.y]);
|
|
478
|
+
var u = Ie(ge(a), t);
|
|
479
|
+
o.push([u.x, u.y]);
|
|
480
|
+
for (var d = Math.round(Math.min(r, a)); d <= Math.round(Math.max(r, a)); d++)
|
|
481
|
+
if (d % 90 == 0) {
|
|
482
|
+
var l = Ie(ge(d), t);
|
|
483
|
+
o.push([l.x, l.y]);
|
|
484
|
+
}
|
|
485
|
+
o = o.map(function(b) {
|
|
486
|
+
var L = b[0], h = b[1];
|
|
487
|
+
return [e + L, n + h];
|
|
488
|
+
}), s && o.push([e, n]);
|
|
489
|
+
var g = o.map(function(b) {
|
|
490
|
+
return b[0];
|
|
491
|
+
}), f = o.map(function(b) {
|
|
492
|
+
return b[1];
|
|
493
|
+
}), v = Math.min.apply(Math, g), A = Math.max.apply(Math, g), m = Math.min.apply(Math, f);
|
|
494
|
+
return { points: o, x: v, y: m, width: A - v, height: Math.max.apply(Math, f) - m };
|
|
495
|
+
}, rr = function(e, n, t, r, a, s) {
|
|
496
|
+
var o = st(a, s, e, n);
|
|
497
|
+
return o < t && o > r;
|
|
498
|
+
}, ir = function(e, n, t, r, a, s, o) {
|
|
499
|
+
if (rr(e, n, t, r, s, o)) {
|
|
500
|
+
var i = ot(s, o, e, n);
|
|
501
|
+
return a.find(function(u) {
|
|
502
|
+
var d = u.startAngle, l = u.endAngle;
|
|
503
|
+
return i >= d && i < l;
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
}, Jn = function(e) {
|
|
507
|
+
var n = e === void 0 ? {} : e, t = n.cornerRadius, r = t === void 0 ? 0 : t, a = n.padAngle, s = a === void 0 ? 0 : a;
|
|
508
|
+
return k.useMemo(function() {
|
|
509
|
+
return Mt().innerRadius(function(o) {
|
|
510
|
+
return o.innerRadius;
|
|
511
|
+
}).outerRadius(function(o) {
|
|
512
|
+
return o.outerRadius;
|
|
513
|
+
}).cornerRadius(r).padAngle(s);
|
|
514
|
+
}, [r, s]);
|
|
515
|
+
};
|
|
516
|
+
function K() {
|
|
517
|
+
return K = Object.assign ? Object.assign.bind() : function(e) {
|
|
518
|
+
for (var n = 1; n < arguments.length; n++) {
|
|
519
|
+
var t = arguments[n];
|
|
520
|
+
for (var r in t)
|
|
521
|
+
Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
|
|
522
|
+
}
|
|
523
|
+
return e;
|
|
524
|
+
}, K.apply(this, arguments);
|
|
525
|
+
}
|
|
526
|
+
function Sn(e, n) {
|
|
527
|
+
if (e == null)
|
|
528
|
+
return {};
|
|
529
|
+
var t, r, a = {}, s = Object.keys(e);
|
|
530
|
+
for (r = 0; r < s.length; r++)
|
|
531
|
+
t = s[r], n.indexOf(t) >= 0 || (a[t] = e[t]);
|
|
532
|
+
return a;
|
|
533
|
+
}
|
|
534
|
+
var _n, ar = function(e) {
|
|
535
|
+
var n = e.width, t = e.height, r = e.legends, a = e.data, s = e.toggleSerie;
|
|
536
|
+
return w.jsx(w.Fragment, { children: r.map(function(o, i) {
|
|
537
|
+
var u;
|
|
538
|
+
return w.jsx(ht, K({}, o, { containerWidth: n, containerHeight: t, data: (u = o.data) != null ? u : a, toggleSerie: o.toggleSerie ? s : void 0 }), i);
|
|
539
|
+
}) });
|
|
540
|
+
}, c = { id: "id", value: "value", sortByValue: !1, innerRadius: 0, padAngle: 0, cornerRadius: 0, layers: ["arcs", "arcLinkLabels", "arcLabels", "legends"], startAngle: 0, endAngle: 360, fit: !0, activeInnerRadiusOffset: 0, activeOuterRadiusOffset: 0, borderWidth: 0, borderColor: { from: "color", modifiers: [["darker", 1]] }, enableArcLabels: !0, arcLabel: "formattedValue", arcLabelsSkipAngle: 0, arcLabelsRadiusOffset: 0.5, arcLabelsTextColor: { theme: "labels.text.fill" }, enableArcLinkLabels: !0, arcLinkLabel: "id", arcLinkLabelsSkipAngle: 0, arcLinkLabelsOffset: 0, arcLinkLabelsDiagonalLength: 16, arcLinkLabelsStraightLength: 24, arcLinkLabelsThickness: 1, arcLinkLabelsTextOffset: 6, arcLinkLabelsTextColor: { theme: "labels.text.fill" }, arcLinkLabelsColor: { theme: "axis.ticks.line.stroke" }, colors: { scheme: "nivo" }, defs: [], fill: [], isInteractive: !0, animate: !0, motionConfig: "gentle", transitionMode: "innerRadius", tooltip: function(e) {
|
|
541
|
+
var n = e.datum;
|
|
542
|
+
return w.jsx(ut, { id: n.id, value: n.formattedValue, enableChip: !0, color: n.color });
|
|
543
|
+
}, legends: [], role: "img", pixelRatio: typeof window < "u" && (_n = window.devicePixelRatio) != null ? _n : 1 }, or = ["points"], Un = function(e) {
|
|
544
|
+
var n = e.data, t = e.id, r = t === void 0 ? c.id : t, a = e.value, s = a === void 0 ? c.value : a, o = e.valueFormat, i = e.colors, u = i === void 0 ? c.colors : i, d = $e(r), l = $e(s), g = lt(o), f = dt(u, "id");
|
|
545
|
+
return k.useMemo(function() {
|
|
546
|
+
return n.map(function(v) {
|
|
547
|
+
var A, m = d(v), b = l(v), L = { id: m, label: (A = v.label) != null ? A : m, hidden: !1, value: b, formattedValue: g(b), data: v };
|
|
548
|
+
return K({}, L, { color: f(L) });
|
|
549
|
+
});
|
|
550
|
+
}, [n, d, l, g, f]);
|
|
551
|
+
}, Zn = function(e) {
|
|
552
|
+
var n = e.data, t = e.startAngle, r = e.endAngle, a = e.innerRadius, s = e.outerRadius, o = e.padAngle, i = e.sortByValue, u = e.activeId, d = e.activeInnerRadiusOffset, l = e.activeOuterRadiusOffset, g = e.hiddenIds, f = e.forwardLegendData, v = k.useMemo(function() {
|
|
553
|
+
var L = Tt().value(function(h) {
|
|
554
|
+
return h.value;
|
|
555
|
+
}).startAngle(ge(t)).endAngle(ge(r)).padAngle(ge(o));
|
|
556
|
+
return i || L.sortValues(null), L;
|
|
557
|
+
}, [t, r, o, i]), A = k.useMemo(function() {
|
|
558
|
+
var L = n.filter(function(h) {
|
|
559
|
+
return !g.includes(h.id);
|
|
560
|
+
});
|
|
561
|
+
return { dataWithArc: v(L).map(function(h) {
|
|
562
|
+
var p = Math.abs(h.endAngle - h.startAngle);
|
|
563
|
+
return K({}, h.data, { arc: { index: h.index, startAngle: h.startAngle, endAngle: h.endAngle, innerRadius: u === h.data.id ? a - d : a, outerRadius: u === h.data.id ? s + l : s, thickness: s - a, padAngle: h.padAngle, angle: p, angleDeg: pn(p) } });
|
|
564
|
+
}), legendData: n.map(function(h) {
|
|
565
|
+
return { id: h.id, label: h.label, color: h.color, hidden: g.includes(h.id), data: h };
|
|
566
|
+
}) };
|
|
567
|
+
}, [v, n, g, u, a, d, s, l]), m = A.legendData, b = k.useRef(f);
|
|
568
|
+
return k.useEffect(function() {
|
|
569
|
+
typeof b.current == "function" && b.current(m);
|
|
570
|
+
}, [b, m]), A;
|
|
571
|
+
}, Kn = function(e) {
|
|
572
|
+
var n = e.activeId, t = e.onActiveIdChange, r = e.defaultActiveId, a = n !== void 0, s = k.useState(a || r === void 0 ? null : r), o = s[0], i = s[1];
|
|
573
|
+
return { activeId: a ? n : o, setActiveId: k.useCallback(function(u) {
|
|
574
|
+
t && t(u), a || i(u);
|
|
575
|
+
}, [a, t, i]) };
|
|
576
|
+
}, Lr = function(e) {
|
|
577
|
+
var n = e.data, t = e.radius, r = e.innerRadius, a = e.startAngle, s = a === void 0 ? c.startAngle : a, o = e.endAngle, i = o === void 0 ? c.endAngle : o, u = e.padAngle, d = u === void 0 ? c.padAngle : u, l = e.sortByValue, g = l === void 0 ? c.sortByValue : l, f = e.cornerRadius, v = f === void 0 ? c.cornerRadius : f, A = e.activeInnerRadiusOffset, m = A === void 0 ? c.activeInnerRadiusOffset : A, b = e.activeOuterRadiusOffset, L = b === void 0 ? c.activeOuterRadiusOffset : b, h = e.activeId, p = e.onActiveIdChange, y = e.defaultActiveId, x = e.forwardLegendData, C = Kn({ activeId: h, onActiveIdChange: p, defaultActiveId: y }), T = C.activeId, j = C.setActiveId, S = k.useState([]), I = S[0], E = S[1], P = Zn({ data: n, startAngle: s, endAngle: i, innerRadius: r, outerRadius: t, padAngle: d, sortByValue: g, activeId: T, activeInnerRadiusOffset: m, activeOuterRadiusOffset: L, hiddenIds: I, forwardLegendData: x }), R = k.useCallback(function(M) {
|
|
578
|
+
E(function(B) {
|
|
579
|
+
return B.indexOf(M) > -1 ? B.filter(function(F) {
|
|
580
|
+
return F !== M;
|
|
581
|
+
}) : [].concat(B, [M]);
|
|
582
|
+
});
|
|
583
|
+
}, []);
|
|
584
|
+
return K({}, P, { arcGenerator: Jn({ cornerRadius: v, padAngle: ge(d) }), setActiveId: j, toggleSerie: R });
|
|
585
|
+
}, Qn = function(e) {
|
|
586
|
+
var n = e.data, t = e.width, r = e.height, a = e.innerRadius, s = a === void 0 ? c.innerRadius : a, o = e.startAngle, i = o === void 0 ? c.startAngle : o, u = e.endAngle, d = u === void 0 ? c.endAngle : u, l = e.padAngle, g = l === void 0 ? c.padAngle : l, f = e.sortByValue, v = f === void 0 ? c.sortByValue : f, A = e.cornerRadius, m = A === void 0 ? c.cornerRadius : A, b = e.fit, L = b === void 0 ? c.fit : b, h = e.activeInnerRadiusOffset, p = h === void 0 ? c.activeInnerRadiusOffset : h, y = e.activeOuterRadiusOffset, x = y === void 0 ? c.activeOuterRadiusOffset : y, C = e.activeId, T = e.onActiveIdChange, j = e.defaultActiveId, S = e.forwardLegendData, I = Kn({ activeId: C, onActiveIdChange: T, defaultActiveId: j }), E = I.activeId, P = I.setActiveId, R = k.useState([]), M = R[0], B = R[1], F = k.useMemo(function() {
|
|
587
|
+
var X, D = Math.min(t, r) / 2, U = D * Math.min(s, 1), z = t / 2, Q = r / 2;
|
|
588
|
+
if (L) {
|
|
589
|
+
var ee = tr(z, Q, D, i - 90, d - 90), q = ee.points, W = Sn(ee, or), N = Math.min(t / W.width, r / W.height), G = { width: W.width * N, height: W.height * N };
|
|
590
|
+
G.x = (t - G.width) / 2, G.y = (r - G.height) / 2, z = (z - W.x) / W.width * W.width * N + G.x, Q = (Q - W.y) / W.height * W.height * N + G.y, X = { box: W, ratio: N, points: q }, D *= N, U *= N;
|
|
591
|
+
}
|
|
592
|
+
return { centerX: z, centerY: Q, radius: D, innerRadius: U, debug: X };
|
|
593
|
+
}, [t, r, s, i, d, L]), Y = Zn({ data: n, startAngle: i, endAngle: d, innerRadius: F.innerRadius, outerRadius: F.radius, padAngle: g, sortByValue: v, activeId: E, activeInnerRadiusOffset: p, activeOuterRadiusOffset: x, hiddenIds: M, forwardLegendData: S }), J = k.useCallback(function(X) {
|
|
594
|
+
B(function(D) {
|
|
595
|
+
return D.indexOf(X) > -1 ? D.filter(function(U) {
|
|
596
|
+
return U !== X;
|
|
597
|
+
}) : [].concat(D, [X]);
|
|
598
|
+
});
|
|
599
|
+
}, []);
|
|
600
|
+
return K({ arcGenerator: Jn({ cornerRadius: m, padAngle: ge(g) }), activeId: E, setActiveId: P, toggleSerie: J }, Y, F);
|
|
601
|
+
}, sr = function(e) {
|
|
602
|
+
var n = e.dataWithArc, t = e.arcGenerator, r = e.centerX, a = e.centerY, s = e.radius, o = e.innerRadius;
|
|
603
|
+
return k.useMemo(function() {
|
|
604
|
+
return { dataWithArc: n, arcGenerator: t, centerX: r, centerY: a, radius: s, innerRadius: o };
|
|
605
|
+
}, [n, t, r, a, s, o]);
|
|
606
|
+
}, ur = function(e) {
|
|
607
|
+
var n = e.center, t = e.data, r = e.arcGenerator, a = e.borderWidth, s = e.borderColor, o = e.isInteractive, i = e.onClick, u = e.onMouseEnter, d = e.onMouseMove, l = e.onMouseLeave, g = e.setActiveId, f = e.tooltip, v = e.transitionMode, A = Fn(), m = A.showTooltipFromEvent, b = A.hideTooltip, L = k.useMemo(function() {
|
|
608
|
+
if (o)
|
|
609
|
+
return function(x, C) {
|
|
610
|
+
i == null || i(x, C);
|
|
611
|
+
};
|
|
612
|
+
}, [o, i]), h = k.useMemo(function() {
|
|
613
|
+
if (o)
|
|
614
|
+
return function(x, C) {
|
|
615
|
+
m(k.createElement(f, { datum: x }), C), g(x.id), u == null || u(x, C);
|
|
616
|
+
};
|
|
617
|
+
}, [o, m, g, u, f]), p = k.useMemo(function() {
|
|
618
|
+
if (o)
|
|
619
|
+
return function(x, C) {
|
|
620
|
+
m(k.createElement(f, { datum: x }), C), d == null || d(x, C);
|
|
621
|
+
};
|
|
622
|
+
}, [o, m, d, f]), y = k.useMemo(function() {
|
|
623
|
+
if (o)
|
|
624
|
+
return function(x, C) {
|
|
625
|
+
b(), g(null), l == null || l(x, C);
|
|
626
|
+
};
|
|
627
|
+
}, [o, b, g, l]);
|
|
628
|
+
return w.jsx(nr, { center: n, data: t, arcGenerator: r, borderWidth: a, borderColor: s, transitionMode: v, onClick: L, onMouseEnter: h, onMouseMove: p, onMouseLeave: y });
|
|
629
|
+
}, lr = ["isInteractive", "animate", "motionConfig", "theme", "renderWrapper"], dr = function(e) {
|
|
630
|
+
var n = e.data, t = e.id, r = t === void 0 ? c.id : t, a = e.value, s = a === void 0 ? c.value : a, o = e.valueFormat, i = e.sortByValue, u = i === void 0 ? c.sortByValue : i, d = e.layers, l = d === void 0 ? c.layers : d, g = e.startAngle, f = g === void 0 ? c.startAngle : g, v = e.endAngle, A = v === void 0 ? c.endAngle : v, m = e.padAngle, b = m === void 0 ? c.padAngle : m, L = e.fit, h = L === void 0 ? c.fit : L, p = e.innerRadius, y = p === void 0 ? c.innerRadius : p, x = e.cornerRadius, C = x === void 0 ? c.cornerRadius : x, T = e.activeInnerRadiusOffset, j = T === void 0 ? c.activeInnerRadiusOffset : T, S = e.activeOuterRadiusOffset, I = S === void 0 ? c.activeOuterRadiusOffset : S, E = e.width, P = e.height, R = e.margin, M = e.colors, B = M === void 0 ? c.colors : M, F = e.borderWidth, Y = F === void 0 ? c.borderWidth : F, J = e.borderColor, X = J === void 0 ? c.borderColor : J, D = e.enableArcLabels, U = D === void 0 ? c.enableArcLabels : D, z = e.arcLabel, Q = z === void 0 ? c.arcLabel : z, ee = e.arcLabelsSkipAngle, q = ee === void 0 ? c.arcLabelsSkipAngle : ee, W = e.arcLabelsTextColor, N = W === void 0 ? c.arcLabelsTextColor : W, G = e.arcLabelsRadiusOffset, pe = G === void 0 ? c.arcLabelsRadiusOffset : G, Ae = e.arcLabelsComponent, ue = e.enableArcLinkLabels, Be = ue === void 0 ? c.enableArcLinkLabels : ue, Fe = e.arcLinkLabel, Ge = Fe === void 0 ? c.arcLinkLabel : Fe, He = e.arcLinkLabelsSkipAngle, Xe = He === void 0 ? c.arcLinkLabelsSkipAngle : He, ze = e.arcLinkLabelsOffset, qe = ze === void 0 ? c.arcLinkLabelsOffset : ze, Ne = e.arcLinkLabelsDiagonalLength, Ye = Ne === void 0 ? c.arcLinkLabelsDiagonalLength : Ne, Je = e.arcLinkLabelsStraightLength, Ue = Je === void 0 ? c.arcLinkLabelsStraightLength : Je, we = e.arcLinkLabelsThickness, Ze = we === void 0 ? c.arcLinkLabelsThickness : we, Ke = e.arcLinkLabelsTextOffset, Qe = Ke === void 0 ? c.arcLinkLabelsTextOffset : Ke, en = e.arcLinkLabelsTextColor, nn = en === void 0 ? c.arcLinkLabelsTextColor : en, tn = e.arcLinkLabelsColor, rn = tn === void 0 ? c.arcLinkLabelsColor : tn, Le = e.arcLinkLabelComponent, Te = e.defs, an = Te === void 0 ? c.defs : Te, Se = e.fill, An = Se === void 0 ? c.fill : Se, on = e.isInteractive, Ln = on === void 0 ? c.isInteractive : on, mn = e.onClick, sn = e.onMouseEnter, un = e.onMouseMove, xn = e.onMouseLeave, te = e.tooltip, le = te === void 0 ? c.tooltip : te, me = e.activeId, de = e.onActiveIdChange, je = e.defaultActiveId, ke = e.transitionMode, ce = ke === void 0 ? c.transitionMode : ke, fe = e.legends, ln = fe === void 0 ? c.legends : fe, ae = e.forwardLegendData, re = e.role, Ee = re === void 0 ? c.role : re, oe = Bn(E, P, R), Pe = oe.outerWidth, bn = oe.outerHeight, Rn = oe.margin, We = oe.innerWidth, _e = oe.innerHeight, dn = Un({ data: n, id: r, value: s, valueFormat: o, colors: B }), ne = Qn({ data: dn, width: We, height: _e, fit: h, innerRadius: y, startAngle: f, endAngle: A, padAngle: b, sortByValue: u, cornerRadius: C, activeInnerRadiusOffset: j, activeOuterRadiusOffset: I, activeId: me, onActiveIdChange: de, defaultActiveId: je, forwardLegendData: ae }), xe = ne.dataWithArc, cn = ne.legendData, De = ne.arcGenerator, Me = ne.centerX, be = ne.centerY, fn = ne.radius, O = ne.innerRadius, V = ne.setActiveId, yn = ne.toggleSerie, kn = ct(an, xe, An), se = { arcs: null, arcLinkLabels: null, arcLabels: null, legends: null };
|
|
631
|
+
l.includes("arcs") && (se.arcs = w.jsx(ur, { center: [Me, be], data: xe, arcGenerator: De, borderWidth: Y, borderColor: X, isInteractive: Ln, onClick: mn, onMouseEnter: sn, onMouseMove: un, onMouseLeave: xn, setActiveId: V, tooltip: le, transitionMode: ce }, "arcs")), Be && l.includes("arcLinkLabels") && (se.arcLinkLabels = w.jsx(Yt, { center: [Me, be], data: xe, label: Ge, skipAngle: Xe, offset: qe, diagonalLength: Ye, straightLength: Ue, strokeWidth: Ze, textOffset: Qe, textColor: nn, linkColor: rn, component: Le }, "arcLinkLabels")), U && l.includes("arcLabels") && (se.arcLabels = w.jsx(Dt, { center: [Me, be], data: xe, label: Q, radiusOffset: pe, skipAngle: q, textColor: N, transitionMode: ce, component: Ae }, "arcLabels")), ln.length > 0 && l.includes("legends") && (se.legends = w.jsx(ar, { width: We, height: _e, data: cn, legends: ln, toggleSerie: yn }, "legends"));
|
|
632
|
+
var Mn = sr({ dataWithArc: xe, arcGenerator: De, centerX: Me, centerY: be, radius: fn, innerRadius: O });
|
|
633
|
+
return w.jsx(ft, { width: Pe, height: bn, margin: Rn, defs: kn, role: Ee, children: l.map(function(gn, et) {
|
|
634
|
+
return se[gn] !== void 0 ? se[gn] : typeof gn == "function" ? w.jsx(k.Fragment, { children: k.createElement(gn, Mn) }, et) : null;
|
|
635
|
+
}) });
|
|
636
|
+
}, cr = function(e) {
|
|
637
|
+
var n = e.isInteractive, t = n === void 0 ? c.isInteractive : n, r = e.animate, a = r === void 0 ? c.animate : r, s = e.motionConfig, o = s === void 0 ? c.motionConfig : s, i = e.theme, u = e.renderWrapper, d = Sn(e, lr);
|
|
638
|
+
return w.jsx(Dn, { animate: a, isInteractive: t, motionConfig: o, renderWrapper: u, theme: i, children: w.jsx(dr, K({ isInteractive: t }, d)) });
|
|
639
|
+
}, mr = function(e) {
|
|
640
|
+
return w.jsx(Vn, { children: function(n) {
|
|
641
|
+
var t = n.width, r = n.height;
|
|
642
|
+
return w.jsx(cr, K({ width: t, height: r }, e));
|
|
643
|
+
} });
|
|
644
|
+
}, fr = ["isInteractive", "theme", "renderWrapper"], gr = function(e) {
|
|
645
|
+
var n = e.data, t = e.id, r = t === void 0 ? c.id : t, a = e.value, s = a === void 0 ? c.value : a, o = e.valueFormat, i = e.sortByValue, u = i === void 0 ? c.sortByValue : i, d = e.startAngle, l = d === void 0 ? c.startAngle : d, g = e.endAngle, f = g === void 0 ? c.endAngle : g, v = e.padAngle, A = v === void 0 ? c.padAngle : v, m = e.fit, b = m === void 0 ? c.fit : m, L = e.innerRadius, h = L === void 0 ? c.innerRadius : L, p = e.cornerRadius, y = p === void 0 ? c.cornerRadius : p, x = e.activeInnerRadiusOffset, C = x === void 0 ? c.activeInnerRadiusOffset : x, T = e.activeOuterRadiusOffset, j = T === void 0 ? c.activeOuterRadiusOffset : T, S = e.width, I = e.height, E = e.margin, P = e.pixelRatio, R = P === void 0 ? c.pixelRatio : P, M = e.colors, B = M === void 0 ? c.colors : M, F = e.borderWidth, Y = F === void 0 ? c.borderWidth : F, J = e.borderColor, X = J === void 0 ? c.borderColor : J, D = e.enableArcLabels, U = D === void 0 ? c.enableArcLabels : D, z = e.arcLabel, Q = z === void 0 ? c.arcLabel : z, ee = e.arcLabelsSkipAngle, q = ee === void 0 ? c.arcLabelsSkipAngle : ee, W = e.arcLabelsTextColor, N = W === void 0 ? c.arcLabelsTextColor : W, G = e.arcLabelsRadiusOffset, pe = G === void 0 ? c.arcLabelsRadiusOffset : G, Ae = e.enableArcLinkLabels, ue = Ae === void 0 ? c.enableArcLinkLabels : Ae, Be = e.arcLinkLabel, Fe = Be === void 0 ? c.arcLinkLabel : Be, Ge = e.arcLinkLabelsSkipAngle, He = Ge === void 0 ? c.arcLinkLabelsSkipAngle : Ge, Xe = e.arcLinkLabelsOffset, ze = Xe === void 0 ? c.arcLinkLabelsOffset : Xe, qe = e.arcLinkLabelsDiagonalLength, Ne = qe === void 0 ? c.arcLinkLabelsDiagonalLength : qe, Ye = e.arcLinkLabelsStraightLength, Je = Ye === void 0 ? c.arcLinkLabelsStraightLength : Ye, Ue = e.arcLinkLabelsThickness, we = Ue === void 0 ? c.arcLinkLabelsThickness : Ue, Ze = e.arcLinkLabelsTextOffset, Ke = Ze === void 0 ? c.arcLinkLabelsTextOffset : Ze, Qe = e.arcLinkLabelsTextColor, en = Qe === void 0 ? c.arcLinkLabelsTextColor : Qe, nn = e.arcLinkLabelsColor, tn = nn === void 0 ? c.arcLinkLabelsColor : nn, rn = e.isInteractive, Le = rn === void 0 ? c.isInteractive : rn, Te = e.onClick, an = e.onMouseMove, Se = e.tooltip, An = Se === void 0 ? c.tooltip : Se, on = e.activeId, Ln = e.onActiveIdChange, mn = e.defaultActiveId, sn = e.legends, un = sn === void 0 ? c.legends : sn, xn = e.forwardLegendData, te = k.useRef(null), le = ve(), me = Bn(S, I, E), de = me.margin, je = me.innerWidth, ke = me.innerHeight, ce = me.outerWidth, fe = me.outerHeight, ln = Un({ data: n, id: r, value: s, valueFormat: o, colors: B }), ae = Qn({ data: ln, width: je, height: ke, fit: b, innerRadius: h, startAngle: l, endAngle: f, padAngle: A, sortByValue: u, cornerRadius: y, activeInnerRadiusOffset: C, activeOuterRadiusOffset: j, activeId: on, onActiveIdChange: Ln, defaultActiveId: mn, forwardLegendData: xn }), re = ae.dataWithArc, Ee = ae.arcGenerator, oe = ae.centerX, Pe = ae.centerY, bn = ae.radius, Rn = ae.innerRadius, We = ae.setActiveId, _e = he(X, le), dn = Bt({ data: re, label: Q, skipAngle: q, offset: pe, textColor: N }), ne = Zt({ data: re, skipAngle: He, offset: ze, diagonalLength: Ne, straightLength: Je, label: Fe, linkColor: tn, textOffset: Ke, textColor: en });
|
|
646
|
+
k.useEffect(function() {
|
|
647
|
+
if (te.current) {
|
|
648
|
+
te.current.width = ce * R, te.current.height = fe * R;
|
|
649
|
+
var O = te.current.getContext("2d");
|
|
650
|
+
O.scale(R, R), O.fillStyle = le.background, O.fillRect(0, 0, ce, fe), O.save(), O.translate(de.left, de.top), Ee.context(O), O.save(), O.translate(oe, Pe), re.forEach(function(V) {
|
|
651
|
+
O.beginPath(), O.fillStyle = V.color, O.strokeStyle = _e(V), O.lineWidth = Y, Ee(V.arc), O.fill(), Y > 0 && O.stroke();
|
|
652
|
+
}), ue === !0 && Jt(O, ne, le, we), U === !0 && Vt(O, dn, le), O.restore(), un.forEach(function(V) {
|
|
653
|
+
gt(O, K({}, V, { data: re, containerWidth: je, containerHeight: ke, theme: le }));
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
}, [te, je, ke, ce, fe, de.top, de.left, R, oe, Pe, Ee, re, Y, _e, U, dn, ue, ne, we, un, le]);
|
|
657
|
+
var xe = k.useMemo(function() {
|
|
658
|
+
return re.map(function(O) {
|
|
659
|
+
return K({ id: O.id }, O.arc);
|
|
660
|
+
});
|
|
661
|
+
}, [re]), cn = function(O) {
|
|
662
|
+
if (!te.current)
|
|
663
|
+
return null;
|
|
664
|
+
var V = vt(te.current, O), yn = V[0], kn = V[1], se = ir(de.left + oe, de.top + Pe, bn, Rn, xe, yn, kn);
|
|
665
|
+
return se ? re.find(function(Mn) {
|
|
666
|
+
return Mn.id === se.id;
|
|
667
|
+
}) : null;
|
|
668
|
+
}, De = Fn(), Me = De.showTooltipFromEvent, be = De.hideTooltip, fn = function(O) {
|
|
669
|
+
var V = cn(O);
|
|
670
|
+
V ? (an == null || an(V, O), We(V.id), Me(k.createElement(An, { datum: V }), O)) : (We(null), be());
|
|
671
|
+
};
|
|
672
|
+
return w.jsx("canvas", { ref: te, width: ce * R, height: fe * R, style: { width: ce, height: fe, cursor: Le ? "auto" : "normal" }, onMouseEnter: Le ? fn : void 0, onMouseMove: Le ? fn : void 0, onMouseLeave: Le ? function() {
|
|
673
|
+
be();
|
|
674
|
+
} : void 0, onClick: Le ? function(O) {
|
|
675
|
+
if (Te) {
|
|
676
|
+
var V = cn(O);
|
|
677
|
+
V && Te(V, O);
|
|
678
|
+
}
|
|
679
|
+
} : void 0 });
|
|
680
|
+
}, hr = function(e) {
|
|
681
|
+
var n = e.isInteractive, t = n === void 0 ? c.isInteractive : n, r = e.theme, a = e.renderWrapper, s = Sn(e, fr);
|
|
682
|
+
return w.jsx(Dn, { isInteractive: t, renderWrapper: a, theme: r, children: w.jsx(gr, K({ isInteractive: t }, s)) });
|
|
683
|
+
}, xr = function(e) {
|
|
684
|
+
return w.jsx(Vn, { children: function(n) {
|
|
685
|
+
var t = n.width, r = n.height;
|
|
686
|
+
return w.jsx(hr, K({ width: t, height: r }, e));
|
|
687
|
+
} });
|
|
688
|
+
};
|
|
689
|
+
export {
|
|
690
|
+
cr as Pie,
|
|
691
|
+
hr as PieCanvas,
|
|
692
|
+
mr as ResponsivePie,
|
|
693
|
+
xr as ResponsivePieCanvas,
|
|
694
|
+
c as defaultProps,
|
|
695
|
+
Un as useNormalizedData,
|
|
696
|
+
Lr as usePie,
|
|
697
|
+
Zn as usePieArcs,
|
|
698
|
+
Qn as usePieFromBox,
|
|
699
|
+
sr as usePieLayerContext
|
|
700
|
+
};
|