@iota-uz/sdk 0.20.0 → 0.22.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/chat-ui/PHOSPHOR-LICENSE +21 -0
- package/dist/chat-ui/animations/index.d.ts +4 -0
- package/dist/chat-ui/animations/variants.d.ts +322 -0
- package/dist/chat-ui/api/csrf.d.ts +20 -0
- package/dist/chat-ui/components/ActivityTrace.d.ts +12 -0
- package/dist/chat-ui/components/Alert.d.ts +13 -0
- package/dist/chat-ui/components/AllChatsList.d.ts +9 -0
- package/dist/chat-ui/components/ArchiveBanner.d.ts +9 -0
- package/dist/chat-ui/components/ArchivedChatList.d.ts +12 -0
- package/dist/chat-ui/components/AssistantMessage.d.ts +149 -0
- package/dist/chat-ui/components/AssistantTurnView.d.ts +25 -0
- package/dist/chat-ui/components/AttachmentGrid.d.ts +19 -0
- package/dist/chat-ui/components/AttachmentPreview.d.ts +14 -0
- package/dist/chat-ui/components/AttachmentUpload.d.ts +14 -0
- package/dist/chat-ui/components/AvatarStack.d.ts +21 -0
- package/dist/chat-ui/components/BiChatLayout.d.ts +19 -0
- package/dist/chat-ui/components/ChartCard.d.ts +17 -0
- package/dist/chat-ui/components/ChatHeader.d.ts +31 -0
- package/dist/chat-ui/components/ChatSession.d.ts +51 -0
- package/dist/chat-ui/components/CodeBlock.d.ts +26 -0
- package/dist/chat-ui/components/CodeOutputsPanel.d.ts +8 -0
- package/dist/chat-ui/components/CompactionDoodle.d.ts +7 -0
- package/dist/chat-ui/components/ConfirmModal.d.ts +23 -0
- package/dist/chat-ui/components/ConfirmationStep.d.ts +13 -0
- package/dist/chat-ui/components/DataTableCell.d.ts +11 -0
- package/dist/chat-ui/components/DataTableFooter.d.ts +9 -0
- package/dist/chat-ui/components/DataTableHeader.d.ts +15 -0
- package/dist/chat-ui/components/DataTableToolbar.d.ts +17 -0
- package/dist/chat-ui/components/DateGroupHeader.d.ts +11 -0
- package/dist/chat-ui/components/DateSeparator.d.ts +6 -0
- package/dist/chat-ui/components/DebugPanel.d.ts +7 -0
- package/dist/chat-ui/components/DownloadCard.d.ts +7 -0
- package/dist/chat-ui/components/EditableText.d.ts +30 -0
- package/dist/chat-ui/components/EmptyState.d.ts +19 -0
- package/dist/chat-ui/components/ErrorBoundary.d.ts +23 -0
- package/dist/chat-ui/components/FullscreenOverlay.d.ts +9 -0
- package/dist/chat-ui/components/ImageModal.d.ts +13 -0
- package/dist/chat-ui/components/InlineDialog.d.ts +16 -0
- package/dist/chat-ui/components/InlineQuestionForm.d.ts +7 -0
- package/dist/chat-ui/components/InteractiveTableCard.d.ts +18 -0
- package/dist/chat-ui/components/LoadingSpinner.d.ts +11 -0
- package/dist/chat-ui/components/MarkdownRenderer.d.ts +13 -0
- package/dist/chat-ui/components/Menu.d.ts +29 -0
- package/dist/chat-ui/components/MessageActions.d.ts +17 -0
- package/dist/chat-ui/components/MessageInput.d.ts +39 -0
- package/dist/chat-ui/components/MessageList.d.ts +12 -0
- package/dist/chat-ui/components/MessageQueueList.d.ts +9 -0
- package/dist/chat-ui/components/ModelSelector.d.ts +2 -0
- package/dist/chat-ui/components/PermissionGuard.d.ts +47 -0
- package/dist/chat-ui/components/QuestionForm.d.ts +10 -0
- package/dist/chat-ui/components/QuestionStep.d.ts +15 -0
- package/dist/chat-ui/components/RetryActionArea.d.ts +7 -0
- package/dist/chat-ui/components/ScreenReaderAnnouncer.d.ts +22 -0
- package/dist/chat-ui/components/ScrollToBottomButton.d.ts +12 -0
- package/dist/chat-ui/components/SearchInput.d.ts +27 -0
- package/dist/chat-ui/components/SessionArtifactList.d.ts +9 -0
- package/dist/chat-ui/components/SessionArtifactPreview.d.ts +7 -0
- package/dist/chat-ui/components/SessionArtifactPreviewModal.d.ts +13 -0
- package/dist/chat-ui/components/SessionArtifactsPanel.d.ts +13 -0
- package/dist/chat-ui/components/SessionItem.d.ts +18 -0
- package/dist/chat-ui/components/SessionMembersModal.d.ts +10 -0
- package/dist/chat-ui/components/SessionSkeleton.d.ts +6 -0
- package/dist/chat-ui/components/Sidebar.d.ts +22 -0
- package/dist/chat-ui/components/Skeleton.d.ts +63 -0
- package/dist/chat-ui/components/SkipLink.d.ts +2 -0
- package/dist/chat-ui/components/SourcesPanel.d.ts +7 -0
- package/dist/chat-ui/components/StreamError.d.ts +15 -0
- package/dist/chat-ui/components/StreamingCursor.d.ts +4 -0
- package/dist/chat-ui/components/SystemMessage.d.ts +10 -0
- package/dist/chat-ui/components/TabBar.d.ts +15 -0
- package/dist/chat-ui/components/TabbedChartGroup.d.ts +6 -0
- package/dist/chat-ui/components/TabbedTableGroup.d.ts +8 -0
- package/dist/chat-ui/components/TableExportButton.d.ts +13 -0
- package/dist/chat-ui/components/TableWithExport.d.ts +15 -0
- package/dist/chat-ui/components/Toast.d.ts +15 -0
- package/dist/chat-ui/components/ToastContainer.d.ts +10 -0
- package/dist/chat-ui/components/TouchContextMenu.d.ts +18 -0
- package/dist/chat-ui/components/Transition.d.ts +11 -0
- package/dist/chat-ui/components/TurnBubble.d.ts +51 -0
- package/dist/chat-ui/components/TypingIndicator.d.ts +13 -0
- package/dist/chat-ui/components/UserAvatar.d.ts +21 -0
- package/dist/chat-ui/components/UserFilter.d.ts +12 -0
- package/dist/chat-ui/components/UserMessage.d.ts +86 -0
- package/dist/chat-ui/components/UserTurnView.d.ts +25 -0
- package/dist/chat-ui/components/WelcomeContent.d.ts +17 -0
- package/dist/chat-ui/config/ConfigContext.d.ts +61 -0
- package/dist/chat-ui/context/ChatContext.d.ts +42 -0
- package/dist/chat-ui/context/IotaContext.d.ts +21 -0
- package/dist/chat-ui/context/chatHelpers.d.ts +18 -0
- package/dist/chat-ui/context/externalSnapshot.d.ts +4 -0
- package/dist/chat-ui/data/ArtifactManager.d.ts +23 -0
- package/dist/chat-ui/data/AttachmentUploader.d.ts +25 -0
- package/dist/chat-ui/data/HttpDataSource.d.ts +109 -0
- package/dist/chat-ui/data/ManagedHttpDataSource.d.ts +26 -0
- package/dist/chat-ui/data/MessageTransport.d.ts +88 -0
- package/dist/chat-ui/data/SessionManager.d.ts +52 -0
- package/dist/chat-ui/data/applet-rpc.d.ts +29 -0
- package/dist/chat-ui/data/mappers.d.ts +33 -0
- package/dist/chat-ui/data/openManagedEventSource.d.ts +54 -0
- package/dist/chat-ui/data/rpc.generated.d.ts +421 -0
- package/dist/chat-ui/hooks/createHorizontalSwipe.d.ts +27 -0
- package/dist/chat-ui/hooks/createReducedMotion.d.ts +1 -0
- package/dist/chat-ui/hooks/useActiveRuns.d.ts +47 -0
- package/dist/chat-ui/hooks/useAttachments.d.ts +80 -0
- package/dist/chat-ui/hooks/useAutoScroll.d.ts +51 -0
- package/dist/chat-ui/hooks/useBichatRouter.d.ts +40 -0
- package/dist/chat-ui/hooks/useBranding.d.ts +16 -0
- package/dist/chat-ui/hooks/useDataTable.d.ts +54 -0
- package/dist/chat-ui/hooks/useFocusTrap.d.ts +17 -0
- package/dist/chat-ui/hooks/useHttpDataSourceConfigFromApplet.d.ts +19 -0
- package/dist/chat-ui/hooks/useImageGallery.d.ts +67 -0
- package/dist/chat-ui/hooks/useKeyboardShortcuts.d.ts +23 -0
- package/dist/chat-ui/hooks/useLongPress.d.ts +22 -0
- package/dist/chat-ui/hooks/useMarkdownCopy.d.ts +46 -0
- package/dist/chat-ui/hooks/useMessageActions.d.ts +53 -0
- package/dist/chat-ui/hooks/useMessageListScroll.d.ts +22 -0
- package/dist/chat-ui/hooks/useModalLock.d.ts +1 -0
- package/dist/chat-ui/hooks/useScrollToBottom.d.ts +22 -0
- package/dist/chat-ui/hooks/useSidebarState.d.ts +8 -0
- package/dist/chat-ui/hooks/useToast.d.ts +43 -0
- package/dist/chat-ui/hooks/useTranslation.d.ts +4 -0
- package/dist/chat-ui/icons/index.d.ts +93 -0
- package/dist/chat-ui/icons.js +975 -0
- package/dist/chat-ui/index.d.ts +122 -0
- package/dist/chat-ui/index.js +51821 -0
- package/dist/chat-ui/machine/ChatMachine.d.ts +191 -0
- package/dist/chat-ui/machine/hitlLifecycle.d.ts +7 -0
- package/dist/chat-ui/machine/index.d.ts +2 -0
- package/dist/chat-ui/machine/selectors.d.ts +5 -0
- package/dist/chat-ui/machine/types.d.ts +127 -0
- package/dist/chat-ui/styles.css +1 -0
- package/dist/chat-ui/theme/themes.d.ts +6 -0
- package/dist/chat-ui/theme/types.d.ts +38 -0
- package/dist/chat-ui/types/applet/index.d.ts +82 -0
- package/dist/chat-ui/types/data-source.d.ts +81 -0
- package/dist/chat-ui/types/index.d.ts +719 -0
- package/dist/chat-ui/types/iota.d.ts +76 -0
- package/dist/chat-ui/utils/RateLimiter.d.ts +28 -0
- package/dist/chat-ui/utils/activitySteps.d.ts +15 -0
- package/dist/chat-ui/utils/artifactHelpers.d.ts +7 -0
- package/dist/chat-ui/utils/assistantTurnState.d.ts +4 -0
- package/dist/chat-ui/utils/chartSpec.d.ts +15 -0
- package/dist/chat-ui/utils/citationProcessor.d.ts +38 -0
- package/dist/chat-ui/utils/columnTypes.d.ts +9 -0
- package/dist/chat-ui/utils/cssLength.d.ts +1 -0
- package/dist/chat-ui/utils/dateFormatting.d.ts +13 -0
- package/dist/chat-ui/utils/debugMetrics.d.ts +5 -0
- package/dist/chat-ui/utils/debugModeStorage.d.ts +2 -0
- package/dist/chat-ui/utils/debugTrace.d.ts +4 -0
- package/dist/chat-ui/utils/errorDisplay.d.ts +23 -0
- package/dist/chat-ui/utils/eventNames.d.ts +27 -0
- package/dist/chat-ui/utils/fileUtils.d.ts +48 -0
- package/dist/chat-ui/utils/markdownMath.d.ts +9 -0
- package/dist/chat-ui/utils/markdownStream.d.ts +8 -0
- package/dist/chat-ui/utils/questionFormUtils.d.ts +18 -0
- package/dist/chat-ui/utils/queueStorage.d.ts +4 -0
- package/dist/chat-ui/utils/reasoningEffortStorage.d.ts +3 -0
- package/dist/chat-ui/utils/sessionGrouping.d.ts +7 -0
- package/dist/chat-ui/utils/sseParser.d.ts +34 -0
- package/dist/chat-ui/utils/tableSpec.d.ts +6 -0
- package/dist/chat-ui/utils/textBlocks.d.ts +43 -0
- package/dist/chat-ui/utils/toolLabels.d.ts +17 -0
- package/dist/client-host/{applet.d.ts → bichat-config.d.ts} +2 -16
- package/dist/client-host/bichat-config.d.ts.map +1 -0
- package/dist/client-host/{applet.js → bichat-config.js} +0 -8
- package/dist/client-host/identity.d.ts +4 -4
- package/dist/client-host/identity.js +2 -2
- package/dist/client-host/index.d.ts +7 -4
- package/dist/client-host/index.d.ts.map +1 -1
- package/dist/client-host/index.js +7 -4
- package/dist/client-host/solid-index.d.ts +1 -0
- package/dist/client-host/solid-index.d.ts.map +1 -1
- package/dist/client-host/solid-index.js +1 -0
- package/dist/client-host/solid-streaming.d.ts.map +1 -1
- package/dist/lens/CascadePanel-BXaSLD9I.js +700 -0
- package/dist/lens/ChartDataEquivalent-Uo4RCCqz.js +92 -0
- package/dist/lens/ChartPanel-BYIblvtO.js +981 -0
- package/dist/lens/CoveragePanel-CBxW7l_N.js +195 -0
- package/dist/lens/DashboardPanels.d.ts +4 -1
- package/dist/lens/DashboardPanels.d.ts.map +1 -1
- package/dist/lens/GaugePanel-Gm3y4QBi.js +39 -0
- package/dist/lens/LensDashboard.d.ts +7 -2
- package/dist/lens/LensDashboard.d.ts.map +1 -1
- package/dist/lens/MapPanel-Fr67rBRo.js +256 -0
- package/dist/lens/MetricFlowPanel-DFGBh3hI.js +135 -0
- package/dist/lens/MetricHierarchyPanel-DKiQ8e3m.js +121 -0
- package/dist/lens/MetricRelationshipPanel-YC3Cg9Id.js +120 -0
- package/dist/lens/PrintReport-BPI_jNyw.js +1876 -0
- package/dist/lens/TablePanel-Bh8dWK4d.js +946 -0
- package/dist/lens/{adapter-BwEwcw2W.js → adapter-DIzUDxuh.js} +384 -384
- package/dist/lens/contract/schemas.d.ts.map +1 -1
- package/dist/lens/contract/types.d.ts +1 -1
- package/dist/lens/contract/types.d.ts.map +1 -1
- package/dist/lens/controls/Calendar.d.ts +1 -1
- package/dist/lens/controls/Calendar.d.ts.map +1 -1
- package/dist/lens/controls/CompareFilterControl.d.ts +2 -2
- package/dist/lens/controls/CompareFilterControl.d.ts.map +1 -1
- package/dist/lens/controls/FacetFilterMenu.d.ts +2 -2
- package/dist/lens/controls/FacetFilterMenu.d.ts.map +1 -1
- package/dist/lens/controls/FilterBar.d.ts +3 -3
- package/dist/lens/controls/FilterBar.d.ts.map +1 -1
- package/dist/lens/controls/PeriodFilterControl.d.ts +2 -1
- package/dist/lens/controls/PeriodFilterControl.d.ts.map +1 -1
- package/dist/lens/controls/SegmentedFilterControl.d.ts +2 -2
- package/dist/lens/controls/SegmentedFilterControl.d.ts.map +1 -1
- package/dist/lens/controls/facetOptions.d.ts +5 -5
- package/dist/lens/controls/facetOptions.d.ts.map +1 -1
- package/dist/lens/element.d.ts +1 -1
- package/dist/lens/element.d.ts.map +1 -1
- package/dist/lens/explore/ContextMiniChart.d.ts +2 -1
- package/dist/lens/explore/ContextMiniChart.d.ts.map +1 -1
- package/dist/lens/explore/DrillOverlay.d.ts +2 -1
- package/dist/lens/explore/DrillOverlay.d.ts.map +1 -1
- package/dist/lens/explore/ExplorePanel.d.ts +2 -1
- package/dist/lens/explore/ExplorePanel.d.ts.map +1 -1
- package/dist/lens/explore/FocusContextHeader.d.ts +2 -1
- package/dist/lens/explore/FocusContextHeader.d.ts.map +1 -1
- package/dist/lens/explore/LensSelector.d.ts +2 -1
- package/dist/lens/explore/LensSelector.d.ts.map +1 -1
- package/dist/lens/explore/SourceDataDisclosure.d.ts +3 -3
- package/dist/lens/explore/SourceDataDisclosure.d.ts.map +1 -1
- package/dist/lens/icons.d.ts +36 -35
- package/dist/lens/icons.d.ts.map +1 -1
- package/dist/lens/{index-B6anZ5Pr.js → index-2qUA4koZ.js} +1 -1
- package/dist/lens/index-DW4iQi93.js +13171 -0
- package/dist/lens/index.d.ts +3 -1
- package/dist/lens/index.d.ts.map +1 -1
- package/dist/lens/index.js +14 -9
- package/dist/lens/{install-D5OiGDnd.js → install-C-b2Bm4Y.js} +1 -1
- package/dist/lens/{install-CsNOaFxV.js → install-C7rGzRvO.js} +1 -1
- package/dist/lens/{install-CumkiUJn.js → install-Ce8R_Bl2.js} +1 -1
- package/dist/lens/{install-VEXJv-Wi.js → install-Czhlaw4u.js} +1 -1
- package/dist/lens/keys-BC7G1vyT.js +91 -0
- package/dist/lens/metricViews-DSoDe0GU.js +210 -0
- package/dist/lens/panels/CascadePanel.d.ts +1 -1
- package/dist/lens/panels/CascadePanel.d.ts.map +1 -1
- package/dist/lens/panels/ChartDataEquivalent.d.ts +1 -1
- package/dist/lens/panels/ChartDataEquivalent.d.ts.map +1 -1
- package/dist/lens/panels/ChartHost.d.ts +1 -1
- package/dist/lens/panels/ChartHost.d.ts.map +1 -1
- package/dist/lens/panels/ChartPanel.d.ts +2 -1
- package/dist/lens/panels/ChartPanel.d.ts.map +1 -1
- package/dist/lens/panels/CopyValueButton.d.ts +1 -1
- package/dist/lens/panels/CopyValueButton.d.ts.map +1 -1
- package/dist/lens/panels/CoveragePanel.d.ts +1 -1
- package/dist/lens/panels/CoveragePanel.d.ts.map +1 -1
- package/dist/lens/panels/ExportMenu.d.ts +1 -1
- package/dist/lens/panels/ExportMenu.d.ts.map +1 -1
- package/dist/lens/panels/GaugePanel.d.ts +1 -1
- package/dist/lens/panels/GaugePanel.d.ts.map +1 -1
- package/dist/lens/panels/InfoTip.d.ts +2 -1
- package/dist/lens/panels/InfoTip.d.ts.map +1 -1
- package/dist/lens/panels/MapPanel.d.ts +1 -1
- package/dist/lens/panels/MapPanel.d.ts.map +1 -1
- package/dist/lens/panels/MetricFlowPanel.d.ts +1 -1
- package/dist/lens/panels/MetricFlowPanel.d.ts.map +1 -1
- package/dist/lens/panels/MetricHierarchyPanel.d.ts +2 -1
- package/dist/lens/panels/MetricHierarchyPanel.d.ts.map +1 -1
- package/dist/lens/panels/MetricRelationshipPanel.d.ts +1 -1
- package/dist/lens/panels/MetricRelationshipPanel.d.ts.map +1 -1
- package/dist/lens/panels/PanelExportMenu.d.ts +2 -2
- package/dist/lens/panels/PanelExportMenu.d.ts.map +1 -1
- package/dist/lens/panels/PanelFrame.d.ts +6 -6
- package/dist/lens/panels/PanelFrame.d.ts.map +1 -1
- package/dist/lens/panels/PanelOverlay.d.ts +4 -4
- package/dist/lens/panels/PanelOverlay.d.ts.map +1 -1
- package/dist/lens/panels/QualityChip.d.ts +8 -4
- package/dist/lens/panels/QualityChip.d.ts.map +1 -1
- package/dist/lens/panels/ShareSliceButton.d.ts +1 -1
- package/dist/lens/panels/ShareSliceButton.d.ts.map +1 -1
- package/dist/lens/panels/Skeleton.d.ts +13 -13
- package/dist/lens/panels/Skeleton.d.ts.map +1 -1
- package/dist/lens/panels/StatPanel.d.ts +11 -11
- package/dist/lens/panels/StatPanel.d.ts.map +1 -1
- package/dist/lens/panels/StatValueTicker.d.ts +2 -2
- package/dist/lens/panels/StatValueTicker.d.ts.map +1 -1
- package/dist/lens/panels/TablePanel.d.ts +2 -1
- package/dist/lens/panels/TablePanel.d.ts.map +1 -1
- package/dist/lens/panels/WaterfallPlot.d.ts +3 -3
- package/dist/lens/panels/WaterfallPlot.d.ts.map +1 -1
- package/dist/lens/panels/actions.d.ts +16 -13
- package/dist/lens/panels/actions.d.ts.map +1 -1
- package/dist/lens/panels/context.d.ts +5 -5
- package/dist/lens/panels/context.d.ts.map +1 -1
- package/dist/lens/panels/focusTrap.d.ts +4 -0
- package/dist/lens/panels/focusTrap.d.ts.map +1 -0
- package/dist/lens/panels/overlayContainer.d.ts +18 -0
- package/dist/lens/panels/overlayContainer.d.ts.map +1 -0
- package/dist/lens/panels/registry.d.ts +23 -23
- package/dist/lens/panels/registry.d.ts.map +1 -1
- package/dist/lens/panels/useIsClamped.d.ts +2 -2
- package/dist/lens/panels/useIsClamped.d.ts.map +1 -1
- package/dist/lens/panels/useMenuButton.d.ts +21 -14
- package/dist/lens/panels/useMenuButton.d.ts.map +1 -1
- package/dist/lens/{prefetch-C_qYKOTU.js → prefetch-Caqfl7sC.js} +2 -2
- package/dist/lens/{prefetchPanels-CD4C-A5q.js → prefetchPanels-B-09akeK.js} +1 -1
- package/dist/lens/print/PrintReport.d.ts +4 -3
- package/dist/lens/print/PrintReport.d.ts.map +1 -1
- package/dist/lens/print/formula.d.ts +3 -2
- package/dist/lens/print/formula.d.ts.map +1 -1
- package/dist/lens/print/quality.d.ts +3 -2
- package/dist/lens/print/quality.d.ts.map +1 -1
- package/dist/lens/{print-Iu804kRb.js → print-CcDZyjFC.js} +1 -1
- package/dist/lens/reports/contract/schemas.d.ts +17 -0
- package/dist/lens/reports/contract/schemas.d.ts.map +1 -0
- package/dist/lens/reports/contract/types.d.ts +42 -0
- package/dist/lens/reports/contract/types.d.ts.map +1 -0
- package/dist/lens/reports/draft.d.ts +28 -0
- package/dist/lens/reports/draft.d.ts.map +1 -0
- package/dist/lens/runtime/drawer.d.ts +3 -3
- package/dist/lens/runtime/drawer.d.ts.map +1 -1
- package/dist/lens/runtime/overlayContainer.d.ts +2 -2
- package/dist/lens/runtime/overlayContainer.d.ts.map +1 -1
- package/dist/lens/runtime/provider.d.ts +23 -23
- package/dist/lens/runtime/provider.d.ts.map +1 -1
- package/dist/lens/{scales-CWTA0tSQ.js → scales-DOCY7Afr.js} +1 -1
- package/dist/lens/style.css +1 -1
- package/dist/sdk-identity.cjs +3 -3
- package/dist/sdk-identity.js +3 -3
- package/dist/sdk-identity.json +2 -2
- package/package.json +11 -10
- package/dist/client-host/applet.d.ts.map +0 -1
- package/dist/client-host/portals.d.ts +0 -30
- package/dist/client-host/portals.d.ts.map +0 -1
- package/dist/client-host/portals.js +0 -84
- package/dist/client-host/route.d.ts +0 -17
- package/dist/client-host/route.d.ts.map +0 -1
- package/dist/client-host/route.js +0 -19
- package/dist/client-host/rpc.d.ts +0 -15
- package/dist/client-host/rpc.d.ts.map +0 -1
- package/dist/client-host/rpc.js +0 -28
- package/dist/lens/CascadePanel-Sd2OKQx-.js +0 -574
- package/dist/lens/ChartDataEquivalent-DgCAb4Ov.js +0 -53
- package/dist/lens/ChartPanel-CiAahY9O.js +0 -709
- package/dist/lens/CoveragePanel-DeeKg8gF.js +0 -131
- package/dist/lens/GaugePanel-8rsf_XHS.js +0 -43
- package/dist/lens/MapPanel-Bq0mfVCB.js +0 -179
- package/dist/lens/MetricFlowPanel-ZBJqPFpc.js +0 -70
- package/dist/lens/MetricHierarchyPanel-DStGwvVU.js +0 -72
- package/dist/lens/MetricRelationshipPanel-D6ItmGCS.js +0 -54
- package/dist/lens/PrintReport-Dr-6xXVr.js +0 -1367
- package/dist/lens/TablePanel-CzLP8gG0.js +0 -619
- package/dist/lens/index-R9mnOHaj.js +0 -11000
- package/dist/lens/keys-6_gqLhcv.js +0 -78
- package/dist/lens/metricViews-De-9pff-.js +0 -170
- package/dist/lens/runtime/focusTrap.d.ts +0 -4
- package/dist/lens/runtime/focusTrap.d.ts.map +0 -1
|
@@ -1,1367 +0,0 @@
|
|
|
1
|
-
import { jsx as s, jsxs as u } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as A, createContext as Me, useCallback as ae, useContext as Se, Fragment as Ce } from "react";
|
|
3
|
-
import { createPortal as De } from "react-dom";
|
|
4
|
-
import { W as Te, b as Pe, a as Ke } from "./CascadePanel-Sd2OKQx-.js";
|
|
5
|
-
import { C as Ae, m as H, f as Re } from "./keys-6_gqLhcv.js";
|
|
6
|
-
import { u as P, r as Le, f as D, b as Ve, a as qe, c as Ie, d as de, e as Ee, g as ue, h as me, i as pe, j as he } from "./index-R9mnOHaj.js";
|
|
7
|
-
import "@iota-uz/sdk/client-host";
|
|
8
|
-
import { r as _, a as re, c as Be, b as _e, f as ie, d as Oe, h as je } from "./metricViews-De-9pff-.js";
|
|
9
|
-
import { relationshipSentence as Ue } from "./MetricRelationshipPanel-D6ItmGCS.js";
|
|
10
|
-
function We(e, t) {
|
|
11
|
-
const n = _(e);
|
|
12
|
-
return n ? t(n.meta.labelKey, n.meta.fallback) : void 0;
|
|
13
|
-
}
|
|
14
|
-
function ze(e, t) {
|
|
15
|
-
const n = _(e);
|
|
16
|
-
if (n) {
|
|
17
|
-
if (n.axis === "availability")
|
|
18
|
-
return t(
|
|
19
|
-
"print.noteUnavailable",
|
|
20
|
-
"Not available: the source is not calculated or not configured, so the figure is shown as a dash rather than as a zero."
|
|
21
|
-
);
|
|
22
|
-
if (n.value === "proxy")
|
|
23
|
-
return t(
|
|
24
|
-
"print.noteProxy",
|
|
25
|
-
"Proxy: a management estimate derived from adjacent data, not a figure taken from the accounting system."
|
|
26
|
-
);
|
|
27
|
-
if (n.value === "requires_reconciliation")
|
|
28
|
-
return t(
|
|
29
|
-
"print.noteReconciliation",
|
|
30
|
-
"Requires reconciliation: a known difference against the accounting system has not been resolved."
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
const se = {
|
|
35
|
-
verified: {
|
|
36
|
-
labelKey: "print.defVerified",
|
|
37
|
-
fallback: "Verified — the figure is taken from the accounting system as recorded, without derivation."
|
|
38
|
-
},
|
|
39
|
-
calculated: {
|
|
40
|
-
labelKey: "print.defCalculated",
|
|
41
|
-
fallback: "Calculated — derived from recorded data by a stated rule; the rule, not the figure, is what to check."
|
|
42
|
-
},
|
|
43
|
-
proxy: {
|
|
44
|
-
labelKey: "print.defProxy",
|
|
45
|
-
fallback: "Proxy — a management estimate from adjacent data, used where the direct source does not exist."
|
|
46
|
-
},
|
|
47
|
-
requires_reconciliation: {
|
|
48
|
-
labelKey: "print.defReconciliation",
|
|
49
|
-
fallback: "Requires reconciliation — a known difference against the accounting system is still open."
|
|
50
|
-
},
|
|
51
|
-
config_required: {
|
|
52
|
-
labelKey: "print.defConfigRequired",
|
|
53
|
-
fallback: "Configuration required — the calculation exists but its parameters have not been set for this period."
|
|
54
|
-
},
|
|
55
|
-
empty_source: {
|
|
56
|
-
labelKey: "print.defEmptySource",
|
|
57
|
-
fallback: "No source data — the source holds no rows for this period, which is not the same as a zero."
|
|
58
|
-
},
|
|
59
|
-
unavailable: {
|
|
60
|
-
labelKey: "print.defUnavailable",
|
|
61
|
-
fallback: "Unavailable — the figure could not be produced, and is shown as a dash rather than as a zero."
|
|
62
|
-
}
|
|
63
|
-
}, He = /* @__PURE__ */ new Set(["config_required", "empty_source", "unavailable"]);
|
|
64
|
-
function Ge(e, t) {
|
|
65
|
-
const n = /* @__PURE__ */ new Set(), a = Object.keys(se);
|
|
66
|
-
for (const r of e) {
|
|
67
|
-
const i = _(r);
|
|
68
|
-
i && n.add(i.value);
|
|
69
|
-
}
|
|
70
|
-
return a.filter((r) => n.has(r)).map((r) => {
|
|
71
|
-
const i = se[r], o = He.has(r) ? { availability: r } : { confidence: r };
|
|
72
|
-
return {
|
|
73
|
-
value: r,
|
|
74
|
-
label: We(o, t) ?? r,
|
|
75
|
-
definition: t(i.labelKey, i.fallback)
|
|
76
|
-
};
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
function O({ confidence: e, availability: t }) {
|
|
80
|
-
const n = P(), a = _({ confidence: e, availability: t });
|
|
81
|
-
return a ? /* @__PURE__ */ s("span", { className: "lens-print-chip", "data-quality": a.value, children: n(a.meta.labelKey, a.meta.fallback) }) : null;
|
|
82
|
-
}
|
|
83
|
-
const fe = /* @__PURE__ */ new Set(["pie", "donut", "radial", "bar", "hbar", "line", "area"]), ge = /* @__PURE__ */ new Set(["metric_flow", "metric_hierarchy", "metric_relationship"]);
|
|
84
|
-
function E(e) {
|
|
85
|
-
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
86
|
-
if (typeof e == "string" && e.trim() !== "") {
|
|
87
|
-
const t = Number(e);
|
|
88
|
-
if (Number.isFinite(t)) return t;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
function V(e) {
|
|
92
|
-
return e == null ? "—" : typeof e == "string" ? e || "—" : typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" ? String(e) : "—";
|
|
93
|
-
}
|
|
94
|
-
function C(e, t) {
|
|
95
|
-
return t ? e.columns.findIndex(({ name: n }) => n === t) : -1;
|
|
96
|
-
}
|
|
97
|
-
function Qe(e, t) {
|
|
98
|
-
const n = { ...e.format };
|
|
99
|
-
for (const [a, r] of Object.entries(t)) {
|
|
100
|
-
const i = e.encoding[a];
|
|
101
|
-
r && i && e.format[i] && !n[r] && (n[r] = e.format[i]);
|
|
102
|
-
}
|
|
103
|
-
return n;
|
|
104
|
-
}
|
|
105
|
-
function Je(e, t) {
|
|
106
|
-
return e === "partition" ? ["pie", "donut", "bar", "hbar"].includes(t) ? t : "donut" : e === "reconciliation" ? "cascade" : e === "series" ? "line" : "table";
|
|
107
|
-
}
|
|
108
|
-
function T(e) {
|
|
109
|
-
var i;
|
|
110
|
-
const t = ((i = e.perspective) == null ? void 0 : i.semantics) ?? e.panel.semantics, n = e.level.encoding ?? e.panel.encoding, r = e.root || e.path.length === 0 ? e.panel.kind : e.level.view ?? Je(t, e.panel.kind);
|
|
111
|
-
return {
|
|
112
|
-
...Le(e.panel, r),
|
|
113
|
-
title: e.level.label.trim() || e.panel.title,
|
|
114
|
-
semantics: t,
|
|
115
|
-
encoding: n,
|
|
116
|
-
format: Qe(e.panel, n),
|
|
117
|
-
presentation: e.level.presentation ?? e.panel.presentation
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
function Ye(e) {
|
|
121
|
-
if (!(!e || e.rows.length === 0))
|
|
122
|
-
return JSON.stringify([e.columns.map(({ name: t }) => t), e.rows]);
|
|
123
|
-
}
|
|
124
|
-
function Xe(e) {
|
|
125
|
-
var a, r;
|
|
126
|
-
const t = T(e.section), n = [t];
|
|
127
|
-
for (const i of ((a = t.metricFlow) == null ? void 0 : a.stages) ?? []) n.push(i);
|
|
128
|
-
for (const i of ((r = t.metricHierarchy) == null ? void 0 : r.rows) ?? []) n.push(i);
|
|
129
|
-
return t.metricRelationship && n.push(t.metricRelationship.source, t.metricRelationship.target), n;
|
|
130
|
-
}
|
|
131
|
-
function Ze(e) {
|
|
132
|
-
var r;
|
|
133
|
-
const t = T(e.section), n = e.section.frame;
|
|
134
|
-
if (!n || !((r = t.columns) != null && r.length)) return [];
|
|
135
|
-
const a = [];
|
|
136
|
-
for (const i of t.columns) {
|
|
137
|
-
const o = C(n, i.badgeField);
|
|
138
|
-
if (!(o < 0))
|
|
139
|
-
for (const l of n.rows) {
|
|
140
|
-
const d = V(l[o]).trim();
|
|
141
|
-
d && d !== "—" && a.push(d);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
return a;
|
|
145
|
-
}
|
|
146
|
-
function et(e, t) {
|
|
147
|
-
var r;
|
|
148
|
-
const n = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
|
|
149
|
-
for (const i of e) {
|
|
150
|
-
const o = T(i.section), l = [], d = (r = o.info) == null ? void 0 : r.trim();
|
|
151
|
-
d && l.push(d);
|
|
152
|
-
for (const p of Xe(i)) {
|
|
153
|
-
const h = ze(p, t);
|
|
154
|
-
h && l.push(h);
|
|
155
|
-
}
|
|
156
|
-
l.push(...Ze(i));
|
|
157
|
-
const c = { markers: [], notes: [] };
|
|
158
|
-
for (const p of l) {
|
|
159
|
-
const h = n.get(p);
|
|
160
|
-
if (h !== void 0) {
|
|
161
|
-
c.markers.includes(h) || c.markers.push(h);
|
|
162
|
-
continue;
|
|
163
|
-
}
|
|
164
|
-
const k = n.size + 1;
|
|
165
|
-
n.set(p, k), c.markers.push(k), c.notes.push({ number: k, text: p });
|
|
166
|
-
}
|
|
167
|
-
c.markers.length > 0 && a.set(i.section.id, c);
|
|
168
|
-
}
|
|
169
|
-
return a;
|
|
170
|
-
}
|
|
171
|
-
const tt = 1e4, nt = [1e9, 1e6, 1e3];
|
|
172
|
-
function G(e, t) {
|
|
173
|
-
if (e == null || e === "") return;
|
|
174
|
-
const n = typeof e == "number" ? e : Number(e);
|
|
175
|
-
if (Number.isFinite(n))
|
|
176
|
-
return t.minorUnits && t.kind === "money" ? n / 100 : n;
|
|
177
|
-
}
|
|
178
|
-
function at(e, t) {
|
|
179
|
-
var r;
|
|
180
|
-
return ((r = new Intl.NumberFormat(t, { notation: "compact", compactDisplay: "short" }).formatToParts(e).find((i) => i.type === "compact")) == null ? void 0 : r.value.trim()) || void 0;
|
|
181
|
-
}
|
|
182
|
-
function rt(e, t, n, a) {
|
|
183
|
-
return D(e, {
|
|
184
|
-
...n,
|
|
185
|
-
kind: "number",
|
|
186
|
-
minorUnits: !1,
|
|
187
|
-
compact: !1,
|
|
188
|
-
currency: void 0,
|
|
189
|
-
symbol: void 0,
|
|
190
|
-
precision: a
|
|
191
|
-
}, t);
|
|
192
|
-
}
|
|
193
|
-
function W(e, t, n) {
|
|
194
|
-
const a = { format: (h) => D(h, t, n) };
|
|
195
|
-
if (!t || t.kind !== "money" && t.kind !== "number") return a;
|
|
196
|
-
const r = e.map((h) => G(h, t)).filter((h) => h !== void 0 && h !== 0);
|
|
197
|
-
if (r.length === 0) return a;
|
|
198
|
-
const i = t.kind === "money" ? (t.currency ?? "").trim() : "", o = r.map((h) => Math.abs(h)), l = Math.max(...o), d = Math.min(...o), c = l / d <= tt ? nt.find((h) => l >= h) : void 0, p = c ? at(c, n) : void 0;
|
|
199
|
-
return c && p ? {
|
|
200
|
-
note: [p, i].filter(Boolean).join(" "),
|
|
201
|
-
format: (h) => {
|
|
202
|
-
const k = G(h, t);
|
|
203
|
-
return k === void 0 ? D(h, t, n) : rt(k / c, n, t, 2);
|
|
204
|
-
}
|
|
205
|
-
} : i ? {
|
|
206
|
-
note: i,
|
|
207
|
-
format: (h) => {
|
|
208
|
-
const k = G(h, t);
|
|
209
|
-
return k === void 0 ? D(h, t, n) : D(k, {
|
|
210
|
-
...t,
|
|
211
|
-
kind: "number",
|
|
212
|
-
minorUnits: !1,
|
|
213
|
-
currency: void 0,
|
|
214
|
-
symbol: void 0
|
|
215
|
-
}, n);
|
|
216
|
-
}
|
|
217
|
-
} : a;
|
|
218
|
-
}
|
|
219
|
-
function it(e, t) {
|
|
220
|
-
const n = P();
|
|
221
|
-
return A(() => {
|
|
222
|
-
if (t.frame)
|
|
223
|
-
return Ve(e, t.frame, {
|
|
224
|
-
missingColumn: (a) => n("panel.missingColumn", "Panel data is missing the “{column}” column.", { column: a }),
|
|
225
|
-
duplicateKey: (a) => n("panel.duplicateKey", "Panel data has a duplicate key “{key}”.", { key: a })
|
|
226
|
-
});
|
|
227
|
-
}, [e, t.frame, n]);
|
|
228
|
-
}
|
|
229
|
-
function U(e, t, n = "value") {
|
|
230
|
-
const a = e.encoding[n];
|
|
231
|
-
return A(
|
|
232
|
-
() => (r) => D(r, a ? e.format[a] : void 0, t),
|
|
233
|
-
[a, t, e.format]
|
|
234
|
-
);
|
|
235
|
-
}
|
|
236
|
-
function st({ join: e, panel: t, locale: n }) {
|
|
237
|
-
const a = P(), r = U(t, n), i = A(() => {
|
|
238
|
-
const d = [];
|
|
239
|
-
return ie(t, e, (c) => (d.push(c), "")), W(d, t.encoding.value ? t.format[t.encoding.value] : void 0, n);
|
|
240
|
-
}, [e, n, t]), o = ie(t, e, (d) => i.format(d)), l = Oe(t, e);
|
|
241
|
-
return o.length === 0 ? null : /* @__PURE__ */ u("div", { className: "lens-print-formula", children: [
|
|
242
|
-
i.note && /* @__PURE__ */ s("p", { className: "lens-print-formula-unit", children: i.note }),
|
|
243
|
-
/* @__PURE__ */ s("ol", { className: "lens-print-flow", children: o.map((d, c) => /* @__PURE__ */ u(
|
|
244
|
-
"li",
|
|
245
|
-
{
|
|
246
|
-
className: "lens-print-flow-stage",
|
|
247
|
-
"data-result": d.role === "result" || void 0,
|
|
248
|
-
children: [
|
|
249
|
-
/* @__PURE__ */ s("span", { className: "lens-print-flow-op", children: d.operator }),
|
|
250
|
-
/* @__PURE__ */ u("span", { className: "lens-print-flow-label", children: [
|
|
251
|
-
d.stage.label,
|
|
252
|
-
d.stage.caption && /* @__PURE__ */ s("small", { children: d.stage.caption })
|
|
253
|
-
] }),
|
|
254
|
-
/* @__PURE__ */ u("span", { className: "lens-print-flow-value", children: [
|
|
255
|
-
d.showDash ? "—" : d.text,
|
|
256
|
-
/* @__PURE__ */ s(O, { confidence: d.confidence, availability: d.availability })
|
|
257
|
-
] })
|
|
258
|
-
]
|
|
259
|
-
},
|
|
260
|
-
`${d.stage.key}-${c}`
|
|
261
|
-
)) }),
|
|
262
|
-
l !== void 0 && /* @__PURE__ */ s("p", { className: "lens-print-formula-note", children: a("flow.difference", "Difference: {delta}", { delta: r(l) }) })
|
|
263
|
-
] });
|
|
264
|
-
}
|
|
265
|
-
function lt({ join: e, panel: t, locale: n }) {
|
|
266
|
-
const a = P(), r = U(t, n), i = U(t, n, "share"), o = je(t, e, r, i);
|
|
267
|
-
return o.length === 0 ? null : /* @__PURE__ */ s("div", { className: "lens-print-formula", children: /* @__PURE__ */ s("ul", { className: "lens-print-hierarchy", children: o.map((l) => /* @__PURE__ */ u(
|
|
268
|
-
"li",
|
|
269
|
-
{
|
|
270
|
-
className: "lens-print-hierarchy-row",
|
|
271
|
-
"data-parent": l.isParent || void 0,
|
|
272
|
-
style: { "--lens-depth": l.depth },
|
|
273
|
-
children: [
|
|
274
|
-
/* @__PURE__ */ u("span", { className: "lens-print-hierarchy-label", children: [
|
|
275
|
-
l.row.label,
|
|
276
|
-
l.row.unallocated && /* @__PURE__ */ s("em", { children: a("hierarchy.unallocated", "Unallocated") }),
|
|
277
|
-
l.row.description && /* @__PURE__ */ s("small", { children: l.row.description })
|
|
278
|
-
] }),
|
|
279
|
-
/* @__PURE__ */ u("span", { className: "lens-print-hierarchy-value", children: [
|
|
280
|
-
l.showDash ? "—" : l.valueText,
|
|
281
|
-
/* @__PURE__ */ s(O, { confidence: l.confidence, availability: l.availability })
|
|
282
|
-
] }),
|
|
283
|
-
/* @__PURE__ */ s("span", { className: "lens-print-hierarchy-share", children: l.shareText ?? "" }),
|
|
284
|
-
l.reconcile && /* @__PURE__ */ s("span", { className: "lens-print-hierarchy-reconcile", children: l.reconcile.balanced ? a("hierarchy.allocated", "Allocated 100%") : a("hierarchy.difference", "Difference: {delta}", {
|
|
285
|
-
delta: r(l.reconcile.delta)
|
|
286
|
-
}) })
|
|
287
|
-
]
|
|
288
|
-
},
|
|
289
|
-
l.row.key
|
|
290
|
-
)) }) });
|
|
291
|
-
}
|
|
292
|
-
function ot({ join: e, panel: t, locale: n }) {
|
|
293
|
-
const a = P(), r = U(t, n), i = t.metricRelationship;
|
|
294
|
-
if (!i) return null;
|
|
295
|
-
const o = re(t, e, i.source, r), l = re(t, e, i.target, r), d = Be(i).horizontal;
|
|
296
|
-
return /* @__PURE__ */ u("div", { className: "lens-print-formula lens-print-relationship", children: [
|
|
297
|
-
/* @__PURE__ */ s("p", { className: "lens-print-relationship-claim", children: Ue(a, i, (o == null ? void 0 : o.end.label) ?? "", (l == null ? void 0 : l.end.label) ?? "") }),
|
|
298
|
-
/* @__PURE__ */ s("div", { className: "lens-print-relationship-ends", children: [o, l].map((c, p) => /* @__PURE__ */ u("div", { className: "lens-print-relationship-end", children: [
|
|
299
|
-
/* @__PURE__ */ s("span", { className: "lens-print-relationship-label", children: (c == null ? void 0 : c.end.label) ?? "—" }),
|
|
300
|
-
/* @__PURE__ */ u("span", { className: "lens-print-relationship-value", children: [
|
|
301
|
-
!c || c.showDash ? "—" : c.valueText,
|
|
302
|
-
/* @__PURE__ */ s(O, { confidence: c == null ? void 0 : c.confidence, availability: c == null ? void 0 : c.availability })
|
|
303
|
-
] }),
|
|
304
|
-
p === 0 && /* @__PURE__ */ s("span", { "aria-hidden": "true", className: "lens-print-relationship-glyph", children: d })
|
|
305
|
-
] }, (c == null ? void 0 : c.end.key) ?? p)) }),
|
|
306
|
-
/* @__PURE__ */ u("p", { className: "lens-print-formula-note", children: [
|
|
307
|
-
a(`relationship.type.${i.type}`, _e[i.type]),
|
|
308
|
-
i.note ? ` · ${i.note}` : ""
|
|
309
|
-
] })
|
|
310
|
-
] });
|
|
311
|
-
}
|
|
312
|
-
function be({ section: e }) {
|
|
313
|
-
const t = A(() => T(e), [e]), n = it(t, e), a = e.document.meta.locale;
|
|
314
|
-
return t.kind === "metric_relationship" ? /* @__PURE__ */ s(ot, { join: n, locale: a, panel: t }) : !n || n.kind !== "ok" ? null : t.kind === "metric_flow" ? /* @__PURE__ */ s(st, { join: n, locale: a, panel: t }) : t.kind === "metric_hierarchy" ? /* @__PURE__ */ s(lt, { join: n, locale: a, panel: t }) : null;
|
|
315
|
-
}
|
|
316
|
-
function j(e, t, n) {
|
|
317
|
-
const a = C(t, e.encoding.label ?? e.encoding.category ?? e.encoding.id), r = C(t, e.encoding.value), i = C(t, e.encoding.series);
|
|
318
|
-
if (r < 0) return [];
|
|
319
|
-
const o = e.encoding.value ? e.format[e.encoding.value] : void 0, l = [];
|
|
320
|
-
return t.rows.forEach((d, c) => {
|
|
321
|
-
const p = E(d[r]);
|
|
322
|
-
p !== void 0 && l.push({
|
|
323
|
-
row: c,
|
|
324
|
-
group: i >= 0 ? V(d[i]) : "",
|
|
325
|
-
label: a >= 0 ? V(d[a]) : V(d[r]),
|
|
326
|
-
value: p,
|
|
327
|
-
formatted: D(d[r], o, n)
|
|
328
|
-
});
|
|
329
|
-
}), l;
|
|
330
|
-
}
|
|
331
|
-
function I(e, t) {
|
|
332
|
-
return new Intl.NumberFormat(e, {
|
|
333
|
-
style: "percent",
|
|
334
|
-
minimumFractionDigits: t >= 0.1 ? 0 : 1,
|
|
335
|
-
maximumFractionDigits: 1
|
|
336
|
-
}).format(t);
|
|
337
|
-
}
|
|
338
|
-
function ct(e, t, n) {
|
|
339
|
-
const a = j(e, t, n).filter(({ value: p }) => p > 0);
|
|
340
|
-
if (a.length < 2) return;
|
|
341
|
-
const r = [...a].sort((p, h) => h.value - p.value)[0], i = a.filter(({ group: p }) => p === r.group);
|
|
342
|
-
if (i.length < 2) return;
|
|
343
|
-
const o = i.reduce((p, { value: h }) => p + h, 0);
|
|
344
|
-
if (o <= 0) return;
|
|
345
|
-
const l = [...i].sort((p, h) => h.value - p.value), d = l[0];
|
|
346
|
-
if (l.length === 2)
|
|
347
|
-
return {
|
|
348
|
-
labelKey: "print.factPair",
|
|
349
|
-
fallback: "{label} carries {share} of the total; the remainder is {rest}.",
|
|
350
|
-
vars: {
|
|
351
|
-
label: d.label,
|
|
352
|
-
share: I(n, d.value / o),
|
|
353
|
-
rest: l[1].label
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
const c = l.slice(0, 3).reduce((p, { value: h }) => p + h, 0);
|
|
357
|
-
return l.length === 3 ? {
|
|
358
|
-
labelKey: "print.factPartitionAll",
|
|
359
|
-
fallback: "{label} is the largest of the three at {share}; together they make the whole.",
|
|
360
|
-
vars: {
|
|
361
|
-
label: d.label,
|
|
362
|
-
share: I(n, d.value / o)
|
|
363
|
-
}
|
|
364
|
-
} : {
|
|
365
|
-
labelKey: "print.factPartition",
|
|
366
|
-
fallback: "{label} is the largest share at {share}; the three largest together make {top}, ahead of {rest} smaller categories.",
|
|
367
|
-
vars: {
|
|
368
|
-
label: d.label,
|
|
369
|
-
share: I(n, d.value / o),
|
|
370
|
-
top: I(n, c / o),
|
|
371
|
-
rest: l.length - 3
|
|
372
|
-
}
|
|
373
|
-
};
|
|
374
|
-
}
|
|
375
|
-
function dt(e, t, n) {
|
|
376
|
-
var l;
|
|
377
|
-
const a = (l = e.radial) == null ? void 0 : l.max;
|
|
378
|
-
if (!a || a <= 0) return;
|
|
379
|
-
const i = j(e, t, n).reduce((d, { value: c }) => d + Math.max(0, c), 0);
|
|
380
|
-
if (i <= 0) return;
|
|
381
|
-
const o = e.encoding.value ? e.format[e.encoding.value] : void 0;
|
|
382
|
-
return {
|
|
383
|
-
labelKey: "print.factProgress",
|
|
384
|
-
fallback: "{value} of {max} — {share} covered.",
|
|
385
|
-
vars: {
|
|
386
|
-
value: D(i, o, n),
|
|
387
|
-
max: D(a, o, n),
|
|
388
|
-
share: I(n, Math.min(i / a, 1))
|
|
389
|
-
}
|
|
390
|
-
};
|
|
391
|
-
}
|
|
392
|
-
function ut(e, t, n) {
|
|
393
|
-
const a = j(e, t, n);
|
|
394
|
-
if (a.length < 2) return;
|
|
395
|
-
const r = C(t, e.encoding.final), i = a[0], o = a.find(({ row: c }) => {
|
|
396
|
-
var p;
|
|
397
|
-
return r >= 0 && ((p = t.rows[c]) == null ? void 0 : p[r]) === !0;
|
|
398
|
-
}) ?? a[a.length - 1], l = a.filter((c) => c !== i && c !== o && c.value < 0).sort((c, p) => c.value - p.value)[0];
|
|
399
|
-
if (!l)
|
|
400
|
-
return {
|
|
401
|
-
labelKey: "print.factBridgeEnds",
|
|
402
|
-
fallback: "{start} becomes {end}.",
|
|
403
|
-
vars: { start: i.formatted, end: o.formatted }
|
|
404
|
-
};
|
|
405
|
-
const d = {
|
|
406
|
-
start: i.formatted,
|
|
407
|
-
end: o.formatted,
|
|
408
|
-
label: l.label,
|
|
409
|
-
amount: l.formatted
|
|
410
|
-
};
|
|
411
|
-
return i.value <= 0 ? {
|
|
412
|
-
labelKey: "print.factBridgeBare",
|
|
413
|
-
fallback: "{start} becomes {end}; the largest deduction is {label} at {amount}.",
|
|
414
|
-
vars: d
|
|
415
|
-
} : {
|
|
416
|
-
labelKey: "print.factBridge",
|
|
417
|
-
fallback: "{start} becomes {end}; the largest deduction is {label} at {amount} — {share} of the opening amount.",
|
|
418
|
-
vars: { ...d, share: I(n, Math.abs(l.value) / i.value) }
|
|
419
|
-
};
|
|
420
|
-
}
|
|
421
|
-
function mt(e, t, n) {
|
|
422
|
-
const a = j(e, t, n);
|
|
423
|
-
if (a.length < 2) return;
|
|
424
|
-
const r = a[0], i = a[a.length - 1], o = [...a].sort((c, p) => p.value - c.value)[0], l = {
|
|
425
|
-
first: r.formatted,
|
|
426
|
-
firstLabel: r.label,
|
|
427
|
-
last: i.formatted,
|
|
428
|
-
lastLabel: i.label,
|
|
429
|
-
peak: o.formatted,
|
|
430
|
-
peakLabel: o.label
|
|
431
|
-
};
|
|
432
|
-
if (r.value === 0)
|
|
433
|
-
return {
|
|
434
|
-
labelKey: "print.factSeriesBare",
|
|
435
|
-
fallback: "{first} at {firstLabel}, {last} at {lastLabel}; the peak is {peak} at {peakLabel}.",
|
|
436
|
-
vars: l
|
|
437
|
-
};
|
|
438
|
-
const d = (i.value - r.value) / Math.abs(r.value);
|
|
439
|
-
return {
|
|
440
|
-
labelKey: "print.factSeries",
|
|
441
|
-
fallback: "{first} at {firstLabel} to {last} at {lastLabel} ({change}); the peak is {peak} at {peakLabel}.",
|
|
442
|
-
vars: { ...l, change: `${d >= 0 ? "+" : "−"}${I(n, Math.abs(d))}` }
|
|
443
|
-
};
|
|
444
|
-
}
|
|
445
|
-
function pt(e, t, n) {
|
|
446
|
-
if (t.rows.length < 2) return;
|
|
447
|
-
const r = [...j(e, t, n)].sort((i, o) => o.value - i.value)[0];
|
|
448
|
-
return r ? {
|
|
449
|
-
labelKey: "print.factTable",
|
|
450
|
-
fallback: "{rows} rows; the largest is {label} at {value}.",
|
|
451
|
-
vars: { rows: t.rows.length, label: r.label, value: r.formatted }
|
|
452
|
-
} : {
|
|
453
|
-
labelKey: "print.factRows",
|
|
454
|
-
fallback: "{rows} rows.",
|
|
455
|
-
vars: { rows: t.rows.length }
|
|
456
|
-
};
|
|
457
|
-
}
|
|
458
|
-
function ht(e, t, n = 4) {
|
|
459
|
-
var r;
|
|
460
|
-
const a = [];
|
|
461
|
-
for (const i of e) {
|
|
462
|
-
if (a.length >= n) break;
|
|
463
|
-
const { panel: o, frame: l } = i, d = o.encoding.value, c = d ? o.format[d] : void 0, p = l ? C(l, d) : -1, h = (l == null ? void 0 : l.rows.length) === 1 && p >= 0 ? (r = l.rows[0]) == null ? void 0 : r[p] : void 0, k = h !== void 0 ? D(h, c, t) : o.total !== void 0 ? D(o.total, c, t) : void 0;
|
|
464
|
-
k && a.push({ id: i.id, label: o.title, value: k });
|
|
465
|
-
}
|
|
466
|
-
return a.length >= 2 ? a : [];
|
|
467
|
-
}
|
|
468
|
-
function ft(e, t, n) {
|
|
469
|
-
var a;
|
|
470
|
-
if (!(!t || t.rows.length === 0))
|
|
471
|
-
return ((a = e.radial) == null ? void 0 : a.mode) === "progress" ? dt(e, t, n) : e.semantics === "partition" ? ct(e, t, n) : e.semantics === "reconciliation" ? ut(e, t, n) : e.semantics === "series" && (e.kind === "line" || e.kind === "area") ? mt(e, t, n) : pt(e, t, n);
|
|
472
|
-
}
|
|
473
|
-
function gt(e) {
|
|
474
|
-
var n, a;
|
|
475
|
-
const t = [];
|
|
476
|
-
for (const r of e.panels) {
|
|
477
|
-
t.push(r);
|
|
478
|
-
for (const i of ((n = r.metricFlow) == null ? void 0 : n.stages) ?? []) t.push(i);
|
|
479
|
-
for (const i of ((a = r.metricHierarchy) == null ? void 0 : a.rows) ?? []) t.push(i);
|
|
480
|
-
r.metricRelationship && t.push(r.metricRelationship.source, r.metricRelationship.target);
|
|
481
|
-
}
|
|
482
|
-
return t;
|
|
483
|
-
}
|
|
484
|
-
const bt = /* @__PURE__ */ new Set(["stat", "metric_relationship"]);
|
|
485
|
-
function vt(e) {
|
|
486
|
-
return e.kind === "stat" || e.kind === "metric_relationship" || e.kind === "pie" || e.kind === "donut" || e.kind === "radial" ? "half" : "full";
|
|
487
|
-
}
|
|
488
|
-
function yt(e) {
|
|
489
|
-
return [...e.groups ?? []].reverse().find((t) => t.label || t.caption);
|
|
490
|
-
}
|
|
491
|
-
function kt(e, t, n) {
|
|
492
|
-
const a = t == null ? void 0 : t.trim();
|
|
493
|
-
return a || (e === 0 ? n : "");
|
|
494
|
-
}
|
|
495
|
-
function Nt(e, t, n) {
|
|
496
|
-
const a = e.document, r = [], i = [], o = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set();
|
|
497
|
-
let d = 0;
|
|
498
|
-
const c = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map();
|
|
499
|
-
for (const m of e.sections) {
|
|
500
|
-
if (m.owner) {
|
|
501
|
-
const y = h.get(m.owner) ?? [];
|
|
502
|
-
y.push(m), h.set(m.owner, y);
|
|
503
|
-
continue;
|
|
504
|
-
}
|
|
505
|
-
const g = m.root ? c : p, b = g.get(m.panel.id) ?? [];
|
|
506
|
-
b.push(m), g.set(m.panel.id, b);
|
|
507
|
-
}
|
|
508
|
-
const k = (m, g) => {
|
|
509
|
-
const b = T(m), y = Ye(m.frame);
|
|
510
|
-
if (!y)
|
|
511
|
-
return i.push(b.title), !1;
|
|
512
|
-
if (g === "owned") return !0;
|
|
513
|
-
const f = o.get(y);
|
|
514
|
-
return f !== void 0 && (g === "detail" || f === m.panel.id) ? !1 : (f === void 0 && o.set(y, m.panel.id), !0);
|
|
515
|
-
}, v = (m, g) => {
|
|
516
|
-
const b = r[r.length - 1];
|
|
517
|
-
if (!m && b) return b;
|
|
518
|
-
if (b && b.title === m)
|
|
519
|
-
return !b.caption && g && (b.caption = g), b;
|
|
520
|
-
const y = {
|
|
521
|
-
id: `chapter-${r.length + 1}`,
|
|
522
|
-
number: r.length + 1,
|
|
523
|
-
title: m,
|
|
524
|
-
...g ? { caption: g } : {},
|
|
525
|
-
figures: [],
|
|
526
|
-
details: []
|
|
527
|
-
};
|
|
528
|
-
return r.push(y), y;
|
|
529
|
-
}, N = (m, g, b) => {
|
|
530
|
-
var S;
|
|
531
|
-
if (!k(g, "figure")) return;
|
|
532
|
-
const y = T(g), f = (((S = g.frame) == null ? void 0 : S.rows.length) ?? 0) <= 1, w = (h.get(g.panel.id) ?? []).filter((R) => k(R, "owned") ? (l.add(R), !0) : !1);
|
|
533
|
-
m.figures.push({
|
|
534
|
-
section: g,
|
|
535
|
-
number: `${m.number}.${m.figures.length + 1}`,
|
|
536
|
-
chart: fe.has(y.kind) && !f,
|
|
537
|
-
metric: f,
|
|
538
|
-
// A reading that prints its calculation needs the width to hold it; half
|
|
539
|
-
// a page beside another figure is where the two collide.
|
|
540
|
-
width: w.length > 0 ? "full" : f ? "half" : vt(y),
|
|
541
|
-
...b && (b.label || b.caption) ? { group: { id: b.id, ...b.label ? { label: b.label } : {}, ...b.caption ? { caption: b.caption } : {} } } : {},
|
|
542
|
-
// The opening chapter's single-value readings are the dashboard's
|
|
543
|
-
// headline; the cover carries them so page one is already informative.
|
|
544
|
-
kpi: m.number === 1 && f && bt.has(y.kind) && d++ < 6,
|
|
545
|
-
breakdown: w
|
|
546
|
-
});
|
|
547
|
-
}, K = (m, g) => {
|
|
548
|
-
k(g, "detail") && m.details.push({
|
|
549
|
-
section: g,
|
|
550
|
-
number: `A${m.number}.${m.details.length + 1}`,
|
|
551
|
-
// The first segments of the trail repeat the appendix group's own title
|
|
552
|
-
// on every one of its nine details. What locates a detail is where it
|
|
553
|
-
// ends, not the path it shares with its neighbours.
|
|
554
|
-
trail: g.breadcrumb.filter((b, y, f) => b && b !== f[y - 1]).slice(-2).join(" › ")
|
|
555
|
-
});
|
|
556
|
-
}, x = (m, g, b) => {
|
|
557
|
-
for (const y of c.get(g) ?? [])
|
|
558
|
-
l.add(y), N(m, y, b);
|
|
559
|
-
for (const y of p.get(g) ?? [])
|
|
560
|
-
l.add(y), K(m, y);
|
|
561
|
-
};
|
|
562
|
-
for (const m of a.layout.rows) {
|
|
563
|
-
const g = kt(r.length, m.heading, t), b = m.panels.flatMap((f) => f.groups ?? []).map((f) => {
|
|
564
|
-
var w;
|
|
565
|
-
return (w = f.caption) == null ? void 0 : w.trim();
|
|
566
|
-
}).find((f) => !!f), y = v(g, b);
|
|
567
|
-
for (const f of m.panels) x(y, f.panelId, yt(f));
|
|
568
|
-
}
|
|
569
|
-
const $ = e.sections.filter((m) => !l.has(m));
|
|
570
|
-
if ($.length > 0) {
|
|
571
|
-
const m = v(n, void 0);
|
|
572
|
-
for (const g of $)
|
|
573
|
-
g.root ? N(m, g) : K(m, g);
|
|
574
|
-
}
|
|
575
|
-
const F = r.flatMap((m) => m.figures.filter(({ kpi: g }) => g)), M = r.map((m) => ({ ...m, figures: m.figures.filter(({ kpi: g }) => !g) })).filter((m) => m.figures.length > 0 || m.details.length > 0);
|
|
576
|
-
M.forEach((m, g) => {
|
|
577
|
-
m.number = g + 1, m.figures.forEach((b, y) => {
|
|
578
|
-
b.number = `${m.number}.${y + 1}`;
|
|
579
|
-
}), m.details.forEach((b, y) => {
|
|
580
|
-
b.number = `A${m.number}.${y + 1}`;
|
|
581
|
-
});
|
|
582
|
-
});
|
|
583
|
-
const L = [...F, ...M.flatMap((m) => m.figures)].filter(({ section: m }) => {
|
|
584
|
-
const g = T(m), b = _(g);
|
|
585
|
-
return b !== void 0 && b.value !== "verified";
|
|
586
|
-
});
|
|
587
|
-
return {
|
|
588
|
-
chapters: M,
|
|
589
|
-
appendix: M.filter((m) => m.details.length > 0),
|
|
590
|
-
kpis: F,
|
|
591
|
-
notes: wt(a),
|
|
592
|
-
missing: i,
|
|
593
|
-
estimated: L.length,
|
|
594
|
-
qualities: gt(a),
|
|
595
|
-
figureCount: M.reduce((m, g) => m + g.figures.length, 0),
|
|
596
|
-
detailCount: M.reduce((m, g) => m + g.details.length, 0)
|
|
597
|
-
};
|
|
598
|
-
}
|
|
599
|
-
function wt(e) {
|
|
600
|
-
var r, i, o;
|
|
601
|
-
const t = [], n = /* @__PURE__ */ new Set(), a = (l, d) => {
|
|
602
|
-
const c = `${l}::${d ?? ""}`;
|
|
603
|
-
!l.trim() || n.has(c) || (n.add(c), t.push({ id: `note-${t.length + 1}`, label: l, ...d ? { detail: d } : {} }));
|
|
604
|
-
};
|
|
605
|
-
for (const l of e.panels) {
|
|
606
|
-
(r = l.status) != null && r.label && a(l.title, l.status.label), (i = l.metricRelationship) != null && i.note && a(l.title, l.metricRelationship.note);
|
|
607
|
-
for (const d of ((o = l.metricFlow) == null ? void 0 : o.stages) ?? [])
|
|
608
|
-
d.caption && a(`${l.title} · ${d.label}`, d.caption);
|
|
609
|
-
}
|
|
610
|
-
return t;
|
|
611
|
-
}
|
|
612
|
-
function xt(e) {
|
|
613
|
-
const t = e.document.theme, n = Object.values(t.palette).filter((i) => i.trim() !== ""), a = /* @__PURE__ */ new Map();
|
|
614
|
-
if (n.length === 0) return a;
|
|
615
|
-
let r = 0;
|
|
616
|
-
for (const i of e.sections)
|
|
617
|
-
for (const o of Ft(i)) {
|
|
618
|
-
if (!o || a.has(o)) continue;
|
|
619
|
-
const l = t.series[o];
|
|
620
|
-
if (l) {
|
|
621
|
-
a.set(o, t.palette[l] ?? l);
|
|
622
|
-
continue;
|
|
623
|
-
}
|
|
624
|
-
a.set(o, n[r % n.length]), r += 1;
|
|
625
|
-
}
|
|
626
|
-
return a;
|
|
627
|
-
}
|
|
628
|
-
function Ft(e) {
|
|
629
|
-
const t = e.frame;
|
|
630
|
-
if (!t) return [];
|
|
631
|
-
const n = T(e), a = C(t, n.encoding.label ?? n.encoding.category ?? n.encoding.id);
|
|
632
|
-
return a < 0 ? [] : t.rows.map((r) => V(r[a]).trim());
|
|
633
|
-
}
|
|
634
|
-
function $t(e, t) {
|
|
635
|
-
if (t.size === 0) return e;
|
|
636
|
-
const n = {};
|
|
637
|
-
for (const [a, r] of Object.entries(e.series))
|
|
638
|
-
a.includes(":") || (n[a] = r);
|
|
639
|
-
for (const [a, r] of t) n[a] = r;
|
|
640
|
-
return { ...e, series: n };
|
|
641
|
-
}
|
|
642
|
-
const ve = Me(/* @__PURE__ */ new Map());
|
|
643
|
-
function ye(e) {
|
|
644
|
-
const t = Se(ve);
|
|
645
|
-
return A(() => $t(e.document.theme, t), [t, e.document.theme]);
|
|
646
|
-
}
|
|
647
|
-
function Mt(e, t, n) {
|
|
648
|
-
var y;
|
|
649
|
-
const a = e.frame;
|
|
650
|
-
if (!a) return { rows: [] };
|
|
651
|
-
const r = T(e), i = C(a, r.encoding.label ?? r.encoding.category ?? r.encoding.id), o = C(a, r.encoding.value), l = C(a, r.encoding.series), d = C(a, r.encoding.id), c = r.encoding.value, p = c ? r.format[c] : void 0, h = a.rows.map((f) => E(f[o])), k = /* @__PURE__ */ new Map(), v = r.encoding.series ? r.format[r.encoding.series] : void 0;
|
|
652
|
-
a.rows.forEach((f, w) => {
|
|
653
|
-
const S = l >= 0 ? V(f[l]) : "", R = h[w];
|
|
654
|
-
R !== void 0 && R >= 0 && k.set(S, (k.get(S) ?? 0) + R);
|
|
655
|
-
});
|
|
656
|
-
for (const f of ((y = r.radial) == null ? void 0 : y.mode) === "partition" ? r.radial.rings ?? [] : [])
|
|
657
|
-
k.has(f.key) && k.set(f.key, f.total);
|
|
658
|
-
const N = r.semantics === "reconciliation" && C(a, r.encoding.cut) >= 0, K = C(a, r.encoding.final), x = (f, w) => {
|
|
659
|
-
const S = o >= 0 ? f[o] : void 0;
|
|
660
|
-
if (!N || w === 0 || K >= 0 && f[K] === !0) return S;
|
|
661
|
-
const R = h[w], q = h[w - 1];
|
|
662
|
-
return R === void 0 || q === void 0 ? S : R - q;
|
|
663
|
-
}, $ = C(a, r.encoding.category), F = r.kind === "pie" || r.kind === "donut" || r.kind === "radial", M = a.rows.map((f) => {
|
|
664
|
-
var q;
|
|
665
|
-
const w = H(f[$ >= 0 ? $ : i]), S = d >= 0 ? H(f[d]) : "", R = l >= 0 ? H(f[l]) : "";
|
|
666
|
-
return { category: w, nodeKey: S || Re(w, ((q = r.radial) == null ? void 0 : q.mode) === "partition" ? "" : R) };
|
|
667
|
-
}), L = /* @__PURE__ */ new Map();
|
|
668
|
-
M.forEach(({ nodeKey: f, category: w }) => {
|
|
669
|
-
const S = f ?? w;
|
|
670
|
-
L.has(S) || L.set(S, L.size);
|
|
671
|
-
});
|
|
672
|
-
const m = pe(n, r, a, e.root), g = ue(n, r, { colors: a.colors, positional: e.root, labels: me(a, r) }), b = W(a.rows.map((f, w) => x(f, w)), p, t);
|
|
673
|
-
return { unit: b.note, rows: a.rows.map((f, w) => {
|
|
674
|
-
var ee, te, ne;
|
|
675
|
-
const S = x(f, w), R = h[w], q = l >= 0 ? V(f[l]) : "", z = ((ee = r.radial) == null ? void 0 : ee.mode) === "progress" ? r.radial.max : k.get(q), B = (r.semantics === "partition" || ((te = r.radial) == null ? void 0 : te.mode) === "progress") && R !== void 0 && R >= 0 && z && z > 0 ? R / z : void 0, Y = i >= 0 ? V(f[i]) : V(f[d]), { category: X, nodeKey: Z } = M[w], $e = ((ne = r.radial) == null ? void 0 : ne.mode) === "partition" ? L.get(Z ?? X) : w;
|
|
676
|
-
return {
|
|
677
|
-
key: `${q}:${d >= 0 ? V(f[d]) : w}`,
|
|
678
|
-
...q && v ? { series: D(f[l], v, t) } : {},
|
|
679
|
-
label: Y,
|
|
680
|
-
value: o >= 0 ? b.format(S) : "—",
|
|
681
|
-
exact: o >= 0 ? he(S, p, t) : void 0,
|
|
682
|
-
...B === void 0 ? {} : {
|
|
683
|
-
ratio: B,
|
|
684
|
-
// A row worth 1.5 million printed as «0,0 %» reads as nothing at all.
|
|
685
|
-
// Below the resolution of the column, the share says it is below it.
|
|
686
|
-
share: B > 0 && B < 1e-3 ? `< ${new Intl.NumberFormat(t, { style: "percent", minimumFractionDigits: 1 }).format(1e-3)}` : new Intl.NumberFormat(t, {
|
|
687
|
-
style: "percent",
|
|
688
|
-
minimumFractionDigits: 1,
|
|
689
|
-
maximumFractionDigits: 1
|
|
690
|
-
}).format(B)
|
|
691
|
-
},
|
|
692
|
-
color: F ? g(X, $e, Z) : l >= 0 ? m(q, w) : g(Y, w)
|
|
693
|
-
};
|
|
694
|
-
}) };
|
|
695
|
-
}
|
|
696
|
-
function ke({ section: e, height: t }) {
|
|
697
|
-
var l;
|
|
698
|
-
const n = A(() => T(e), [e]), a = ye(e), r = ae(
|
|
699
|
-
(d, c) => D(c, n.format[d], e.document.meta.locale),
|
|
700
|
-
[n.format, e.document.meta.locale]
|
|
701
|
-
), i = ae(
|
|
702
|
-
(d, c) => Ee(c, n.format[d], e.document.meta.locale),
|
|
703
|
-
[n.format, e.document.meta.locale]
|
|
704
|
-
);
|
|
705
|
-
if (!e.frame || e.frame.rows.length <= 1 || !fe.has(n.kind)) return null;
|
|
706
|
-
const o = n.kind === "pie" || n.kind === "donut" || n.kind === "radial" ? {
|
|
707
|
-
...n.presentation,
|
|
708
|
-
sliceLabels: ((l = n.presentation) == null ? void 0 : l.sliceLabels) ?? "percent",
|
|
709
|
-
// A wider band on paper: the share is written inside the ring, and a
|
|
710
|
-
// thin ring cannot hold five characters.
|
|
711
|
-
fill: !0
|
|
712
|
-
} : n.presentation;
|
|
713
|
-
return /* @__PURE__ */ s("div", { className: "lens-print-chart", style: { height: t }, children: /* @__PURE__ */ s(
|
|
714
|
-
Ae,
|
|
715
|
-
{
|
|
716
|
-
input: {
|
|
717
|
-
kind: n.kind,
|
|
718
|
-
frame: e.frame,
|
|
719
|
-
encoding: n.encoding,
|
|
720
|
-
seriesColor: pe(a, n, e.frame, e.root),
|
|
721
|
-
rowColor: ue(a, n, { colors: e.frame.colors, positional: e.root, labels: me(e.frame, n) }),
|
|
722
|
-
labels: {
|
|
723
|
-
noData: e.document.i18n["panel.empty"] ?? "No data",
|
|
724
|
-
current: e.document.i18n["chart.series.current"] ?? "Current period",
|
|
725
|
-
previous: e.document.i18n["chart.series.previous"] ?? "Previous"
|
|
726
|
-
},
|
|
727
|
-
format: r,
|
|
728
|
-
formatAxis: i,
|
|
729
|
-
locale: e.document.meta.locale,
|
|
730
|
-
theme: a,
|
|
731
|
-
presentation: o,
|
|
732
|
-
radial: n.radial
|
|
733
|
-
},
|
|
734
|
-
label: n.title,
|
|
735
|
-
panelId: `print:${e.id}`
|
|
736
|
-
}
|
|
737
|
-
) });
|
|
738
|
-
}
|
|
739
|
-
function Ne(e) {
|
|
740
|
-
const t = T(e), n = e.document.meta.locale;
|
|
741
|
-
return A(() => {
|
|
742
|
-
if (!e.frame) return;
|
|
743
|
-
const a = t.encoding.value ?? "value", r = t.encoding.cut ?? "cut", i = (l) => D(l, t.format[a], n), o = (l) => D(
|
|
744
|
-
l,
|
|
745
|
-
t.format[r] ?? t.format[a],
|
|
746
|
-
n
|
|
747
|
-
);
|
|
748
|
-
return Pe(Ke(t, e.frame, i, o), i);
|
|
749
|
-
}, [n, t, e.frame]);
|
|
750
|
-
}
|
|
751
|
-
function St({ section: e }) {
|
|
752
|
-
const t = P(), n = T(e), a = Ne(e), r = e.document.meta.locale, i = A(() => {
|
|
753
|
-
if (!a) return;
|
|
754
|
-
const l = a.ticks.length > 5 ? a.ticks.filter((c, p) => p % 2 === 0) : a.ticks, d = new Intl.NumberFormat(r, { notation: "compact", maximumFractionDigits: 1 });
|
|
755
|
-
return {
|
|
756
|
-
...a,
|
|
757
|
-
ticks: l.map((c, p) => p === 0 ? c : { ...c, label: d.format(c.value) })
|
|
758
|
-
};
|
|
759
|
-
}, [r, a]), o = A(
|
|
760
|
-
() => Array.from(new Set(((i == null ? void 0 : i.items) ?? []).map((l) => l.tone).filter(Boolean))),
|
|
761
|
-
[i]
|
|
762
|
-
);
|
|
763
|
-
return !i || i.items.length === 0 ? null : /* @__PURE__ */ u("div", { className: "lens-print-chart lens-print-chart-waterfall", children: [
|
|
764
|
-
/* @__PURE__ */ s(Te, { label: n.title, model: i, splitCallout: "always" }),
|
|
765
|
-
o.length > 1 && /* @__PURE__ */ s("p", { className: "lens-print-tone-key", children: o.map((l) => /* @__PURE__ */ u("span", { children: [
|
|
766
|
-
/* @__PURE__ */ s("i", { "aria-hidden": "true", "data-tone": l }),
|
|
767
|
-
l === "positive" ? t("print.toneFavourable", "favourable") : l === "negative" ? t("print.toneAdverse", "adverse") : t("print.toneNeutral", "neutral")
|
|
768
|
-
] }, l)) })
|
|
769
|
-
] });
|
|
770
|
-
}
|
|
771
|
-
function Ct({ section: e }) {
|
|
772
|
-
const t = P(), n = T(e), a = Ne(e), r = A(
|
|
773
|
-
() => W(
|
|
774
|
-
((a == null ? void 0 : a.items) ?? []).map((i) => i.value),
|
|
775
|
-
n.encoding.value ? n.format[n.encoding.value] : void 0,
|
|
776
|
-
e.document.meta.locale
|
|
777
|
-
),
|
|
778
|
-
[a, n, e.document.meta.locale]
|
|
779
|
-
);
|
|
780
|
-
return !a || a.items.length === 0 ? null : /* @__PURE__ */ u("table", { className: "lens-print-data", children: [
|
|
781
|
-
/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ u("tr", { children: [
|
|
782
|
-
/* @__PURE__ */ s("th", { children: t("print.stage", "Stage") }),
|
|
783
|
-
/* @__PURE__ */ u("th", { "data-align": "right", children: [
|
|
784
|
-
t("print.value", "Value"),
|
|
785
|
-
r.note && /* @__PURE__ */ s("small", { children: r.note })
|
|
786
|
-
] })
|
|
787
|
-
] }) }),
|
|
788
|
-
/* @__PURE__ */ s("tbody", { children: a.items.map((i, o) => /* @__PURE__ */ u(Ce, { children: [
|
|
789
|
-
/* @__PURE__ */ u("tr", { "data-role": i.kind, children: [
|
|
790
|
-
/* @__PURE__ */ s("td", { children: i.label }),
|
|
791
|
-
/* @__PURE__ */ s("td", { "data-align": "right", children: r.format(i.value) })
|
|
792
|
-
] }),
|
|
793
|
-
i.formattedSplit && /* @__PURE__ */ u("tr", { "data-role": "split", children: [
|
|
794
|
-
/* @__PURE__ */ s("td", { children: i.splitLabel || t("print.splitPart", "of which") }),
|
|
795
|
-
/* @__PURE__ */ s("td", { "data-align": "right", children: i.formattedSplit })
|
|
796
|
-
] })
|
|
797
|
-
] }, `${i.label}:${o}`)) })
|
|
798
|
-
] });
|
|
799
|
-
}
|
|
800
|
-
function Dt(e, t) {
|
|
801
|
-
return e.kind === "cascade" && !!t.frame && C(t.frame, e.encoding.cut) >= 0;
|
|
802
|
-
}
|
|
803
|
-
function J({ section: e, dense: t, exact: n }) {
|
|
804
|
-
var d;
|
|
805
|
-
const a = P(), r = ye(e), i = A(
|
|
806
|
-
() => Mt(e, e.document.meta.locale, r),
|
|
807
|
-
[e, r]
|
|
808
|
-
);
|
|
809
|
-
if (!e.frame) return /* @__PURE__ */ s("p", { className: "lens-print-empty", children: a("print.noData", "No data") });
|
|
810
|
-
const o = T(e);
|
|
811
|
-
if (o.kind === "table" && ((d = o.columns) != null && d.length)) {
|
|
812
|
-
const c = e.frame, p = o.columns, h = p.map(({ field: x }) => C(c, x)), k = e.document.meta.locale, v = p.map((x, $) => {
|
|
813
|
-
const F = h[$];
|
|
814
|
-
return W(
|
|
815
|
-
F >= 0 ? c.rows.map((M) => M[F]) : [],
|
|
816
|
-
o.format[x.field],
|
|
817
|
-
k
|
|
818
|
-
);
|
|
819
|
-
}), N = p.map((x) => {
|
|
820
|
-
var F;
|
|
821
|
-
if (x.align) return x.align;
|
|
822
|
-
const $ = (F = o.format[x.field]) == null ? void 0 : F.kind;
|
|
823
|
-
return $ === "money" || $ === "number" || $ === "percent" ? "right" : "left";
|
|
824
|
-
}), K = /* @__PURE__ */ new Map();
|
|
825
|
-
return p.forEach((x, $) => {
|
|
826
|
-
if (x.cell.kind !== "bar") return;
|
|
827
|
-
const F = h[$];
|
|
828
|
-
F < 0 || K.set(x.field, c.rows.reduce((M, L) => {
|
|
829
|
-
const m = E(L[F]);
|
|
830
|
-
return m === void 0 ? M : Math.max(M, Math.abs(m));
|
|
831
|
-
}, 0));
|
|
832
|
-
}), /* @__PURE__ */ u("table", { className: "lens-print-data lens-print-data-wide", children: [
|
|
833
|
-
/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ s("tr", { children: p.map((x, $) => {
|
|
834
|
-
var F, M;
|
|
835
|
-
return /* @__PURE__ */ u("th", { "data-align": N[$], children: [
|
|
836
|
-
x.label,
|
|
837
|
-
((F = v[$]) == null ? void 0 : F.note) && /* @__PURE__ */ s("small", { children: (M = v[$]) == null ? void 0 : M.note })
|
|
838
|
-
] }, x.field);
|
|
839
|
-
}) }) }),
|
|
840
|
-
/* @__PURE__ */ s("tbody", { children: c.rows.map((x, $) => /* @__PURE__ */ s("tr", { children: p.map((F, M) => {
|
|
841
|
-
const L = h[M] >= 0 ? x[h[M]] : void 0, m = v[M].format(L), g = n ? he(L, o.format[F.field], k) : void 0, b = E(L), y = V(x[C(c, F.cell.toneField)]), f = K.get(F.field), w = C(c, F.cell.secondaryField), S = w >= 0 ? E(x[w]) : void 0;
|
|
842
|
-
return /* @__PURE__ */ u(
|
|
843
|
-
"td",
|
|
844
|
-
{
|
|
845
|
-
"data-align": N[M],
|
|
846
|
-
"data-negative": b !== void 0 && b < 0 ? "" : void 0,
|
|
847
|
-
"data-tone": y === "pos" || y === "warn" || y === "neg" ? y : void 0,
|
|
848
|
-
children: [
|
|
849
|
-
m,
|
|
850
|
-
S !== void 0 && /* @__PURE__ */ s("em", { className: "lens-print-cell-secondary", "data-negative": S < 0 ? "" : void 0, children: de(S) ?? `${S > 0 ? "+" : ""}${D(
|
|
851
|
-
x[w],
|
|
852
|
-
F.cell.secondaryField ? o.format[F.cell.secondaryField] : void 0,
|
|
853
|
-
k
|
|
854
|
-
)}` }),
|
|
855
|
-
f !== void 0 && f > 0 && b !== void 0 && /* @__PURE__ */ s(
|
|
856
|
-
"span",
|
|
857
|
-
{
|
|
858
|
-
"aria-hidden": "true",
|
|
859
|
-
className: "lens-print-cell-bar",
|
|
860
|
-
"data-negative": b < 0 ? "" : void 0,
|
|
861
|
-
style: { width: `${Math.min(100, Math.round(Math.abs(b) / f * 100))}%` }
|
|
862
|
-
}
|
|
863
|
-
),
|
|
864
|
-
g && g !== m && /* @__PURE__ */ s("small", { children: g })
|
|
865
|
-
]
|
|
866
|
-
},
|
|
867
|
-
F.field
|
|
868
|
-
);
|
|
869
|
-
}) }, $)) })
|
|
870
|
-
] });
|
|
871
|
-
}
|
|
872
|
-
const l = i.rows.some(({ share: c }) => c !== void 0);
|
|
873
|
-
return /* @__PURE__ */ u("table", { className: `lens-print-data${t ? " lens-print-data-dense" : ""}`, children: [
|
|
874
|
-
/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ u("tr", { children: [
|
|
875
|
-
/* @__PURE__ */ s("th", { children: a("print.category", "Category") }),
|
|
876
|
-
/* @__PURE__ */ u("th", { "data-align": "right", children: [
|
|
877
|
-
a("print.value", "Value"),
|
|
878
|
-
i.unit && /* @__PURE__ */ s("small", { children: i.unit })
|
|
879
|
-
] }),
|
|
880
|
-
l && /* @__PURE__ */ s("th", { "data-align": "right", children: a("print.share", "Share") })
|
|
881
|
-
] }) }),
|
|
882
|
-
/* @__PURE__ */ s("tbody", { children: i.rows.map((c) => /* @__PURE__ */ u("tr", { children: [
|
|
883
|
-
/* @__PURE__ */ u("td", { children: [
|
|
884
|
-
/* @__PURE__ */ s("span", { className: "lens-print-swatch", style: { backgroundColor: c.color } }),
|
|
885
|
-
c.series && /* @__PURE__ */ u("span", { className: "lens-print-series", children: [
|
|
886
|
-
c.series,
|
|
887
|
-
" · "
|
|
888
|
-
] }),
|
|
889
|
-
c.label
|
|
890
|
-
] }),
|
|
891
|
-
/* @__PURE__ */ u("td", { "data-align": "right", children: [
|
|
892
|
-
c.value,
|
|
893
|
-
n && c.exact && c.exact !== c.value && /* @__PURE__ */ s("small", { children: c.exact })
|
|
894
|
-
] }),
|
|
895
|
-
l && /* @__PURE__ */ u("td", { className: "lens-print-share", "data-align": "right", children: [
|
|
896
|
-
c.ratio !== void 0 && /* @__PURE__ */ s(
|
|
897
|
-
"span",
|
|
898
|
-
{
|
|
899
|
-
"aria-hidden": "true",
|
|
900
|
-
className: "lens-print-share-bar",
|
|
901
|
-
style: { width: `${Math.min(100, Math.round(c.ratio * 100))}%` }
|
|
902
|
-
}
|
|
903
|
-
),
|
|
904
|
-
/* @__PURE__ */ s("span", { children: c.share ?? "—" })
|
|
905
|
-
] })
|
|
906
|
-
] }, c.key)) })
|
|
907
|
-
] });
|
|
908
|
-
}
|
|
909
|
-
function we({ section: e }) {
|
|
910
|
-
const t = P();
|
|
911
|
-
return !e.hasMore || !e.frame ? null : /* @__PURE__ */ s("p", { className: "lens-print-truncated", children: t("print.truncated", "First {rows} rows shown; the level continues in the dashboard.", {
|
|
912
|
-
rows: e.frame.rows.length
|
|
913
|
-
}) });
|
|
914
|
-
}
|
|
915
|
-
function Tt({ section: e }) {
|
|
916
|
-
var i;
|
|
917
|
-
const t = P(), n = T(e), a = (i = n.caption) == null ? void 0 : i.trim(), r = A(
|
|
918
|
-
() => ft(n, e.frame, e.document.meta.locale),
|
|
919
|
-
[n, e.document.meta.locale, e.frame]
|
|
920
|
-
);
|
|
921
|
-
return !a && !r ? null : /* @__PURE__ */ u("p", { className: "lens-print-figure-note", children: [
|
|
922
|
-
a && /* @__PURE__ */ s("span", { className: "lens-print-figure-authored", children: a }),
|
|
923
|
-
r && /* @__PURE__ */ s("span", { children: t(r.labelKey, r.fallback, r.vars) })
|
|
924
|
-
] });
|
|
925
|
-
}
|
|
926
|
-
function xe({ footnotes: e }) {
|
|
927
|
-
return !e || e.markers.length === 0 ? null : /* @__PURE__ */ s("sup", { className: "lens-print-footnote-marker", children: e.markers.join(", ") });
|
|
928
|
-
}
|
|
929
|
-
function le({ footnotes: e }) {
|
|
930
|
-
return !e || e.notes.length === 0 ? null : /* @__PURE__ */ s("ol", { className: "lens-print-footnotes", children: e.notes.map((t) => (
|
|
931
|
-
// The number is drawn rather than left to the list marker: a marker is
|
|
932
|
-
// the one glyph a print engine feels free to drop, and a note nobody
|
|
933
|
-
// can tie back to its figure is a note nobody reads.
|
|
934
|
-
/* @__PURE__ */ u("li", { value: t.number, children: [
|
|
935
|
-
/* @__PURE__ */ s("span", { className: "lens-print-footnote-index", children: t.number }),
|
|
936
|
-
t.text
|
|
937
|
-
] }, t.number)
|
|
938
|
-
)) });
|
|
939
|
-
}
|
|
940
|
-
const Q = 8;
|
|
941
|
-
function oe({ sections: e }) {
|
|
942
|
-
const t = P();
|
|
943
|
-
return e.length === 0 ? null : /* @__PURE__ */ u("div", { className: "lens-print-breakdown", children: [
|
|
944
|
-
/* @__PURE__ */ s("p", { className: "lens-print-breakdown-head", children: t("print.breakdown", "How it is calculated") }),
|
|
945
|
-
e.map((n) => {
|
|
946
|
-
var h, k, v, N, K, x;
|
|
947
|
-
const a = T(n), r = n.frame, i = a.kind === "table" && ((h = a.columns) != null && h.length) ? a.columns.length : (r == null ? void 0 : r.columns.length) ?? 0;
|
|
948
|
-
if (r && i <= 1) return null;
|
|
949
|
-
if (ge.has(a.kind))
|
|
950
|
-
return /* @__PURE__ */ s(be, { section: n }, n.id);
|
|
951
|
-
const o = r ? C(r, a.encoding.value) : -1;
|
|
952
|
-
if (r && r.rows.length === 1 && o >= 0)
|
|
953
|
-
return /* @__PURE__ */ u("p", { className: "lens-print-breakdown-term", children: [
|
|
954
|
-
/* @__PURE__ */ s("span", { children: a.title }),
|
|
955
|
-
/* @__PURE__ */ s("span", { children: D(
|
|
956
|
-
(k = r.rows[0]) == null ? void 0 : k[o],
|
|
957
|
-
a.encoding.value ? a.format[a.encoding.value] : void 0,
|
|
958
|
-
n.document.meta.locale
|
|
959
|
-
) })
|
|
960
|
-
] }, n.id);
|
|
961
|
-
const l = r && r.rows.length > Q, d = l && r ? { ...n, frame: { ...r, rows: r.rows.slice(0, Q) } } : n, c = ((v = n.perspective) == null ? void 0 : v.label.trim()) || a.title, p = ((x = (K = (N = a.columns) == null ? void 0 : N[0]) == null ? void 0 : K.label) == null ? void 0 : x.trim().toLowerCase()) === c.trim().toLowerCase();
|
|
962
|
-
return /* @__PURE__ */ u("div", { className: "lens-print-breakdown-part", children: [
|
|
963
|
-
!p && /* @__PURE__ */ s("p", { className: "lens-print-breakdown-title", children: c }),
|
|
964
|
-
/* @__PURE__ */ s(J, { dense: !0, section: d }),
|
|
965
|
-
l && r && // Here the whole term is in hand, so the reader is told what
|
|
966
|
-
// share of it the page keeps rather than merely that it was cut.
|
|
967
|
-
/* @__PURE__ */ s("p", { className: "lens-print-truncated", children: t("print.truncatedOf", "{rows} of {total} rows shown.", {
|
|
968
|
-
rows: Q,
|
|
969
|
-
total: r.rows.length
|
|
970
|
-
}) })
|
|
971
|
-
] }, n.id);
|
|
972
|
-
})
|
|
973
|
-
] });
|
|
974
|
-
}
|
|
975
|
-
function Pt({ figure: e, footnotes: t }) {
|
|
976
|
-
var d;
|
|
977
|
-
const n = P(), { section: a } = e, r = T(a), i = Dt(r, a), o = ge.has(r.kind);
|
|
978
|
-
if (e.metric)
|
|
979
|
-
return /* @__PURE__ */ u("figure", { className: `lens-print-figure lens-print-figure-${e.width} lens-print-figure-metric`, children: [
|
|
980
|
-
/* @__PURE__ */ s(Fe, { figure: e, footnotes: t, numbered: !0 }),
|
|
981
|
-
/* @__PURE__ */ s(oe, { sections: e.breakdown }),
|
|
982
|
-
/* @__PURE__ */ s(le, { footnotes: t })
|
|
983
|
-
] });
|
|
984
|
-
const l = r.total !== void 0 && r.encoding.value ? D(r.total, r.format[r.encoding.value], a.document.meta.locale) : void 0;
|
|
985
|
-
return /* @__PURE__ */ u("figure", { className: `lens-print-figure lens-print-figure-${i || o ? "full" : e.width}`, children: [
|
|
986
|
-
/* @__PURE__ */ u("figcaption", { className: "lens-print-figure-head", children: [
|
|
987
|
-
/* @__PURE__ */ u("p", { className: "lens-print-figure-title", children: [
|
|
988
|
-
/* @__PURE__ */ s("span", { className: "lens-print-figure-number", children: n("print.figure", "Fig. {number}", { number: e.number }) }),
|
|
989
|
-
/* @__PURE__ */ u("h3", { children: [
|
|
990
|
-
r.title,
|
|
991
|
-
/* @__PURE__ */ s(xe, { footnotes: t })
|
|
992
|
-
] })
|
|
993
|
-
] }),
|
|
994
|
-
/* @__PURE__ */ u("p", { className: "lens-print-figure-meta", children: [
|
|
995
|
-
((d = r.status) == null ? void 0 : d.label) && /* @__PURE__ */ s("span", { className: "lens-print-chip", "data-tone": r.status.tone ?? "neutral", children: r.status.label }),
|
|
996
|
-
/* @__PURE__ */ s(O, { availability: r.availability, confidence: r.confidence }),
|
|
997
|
-
a.perspective && /* @__PURE__ */ u("span", { className: "lens-print-chip", "data-tone": "neutral", children: [
|
|
998
|
-
n("print.view", "View"),
|
|
999
|
-
": ",
|
|
1000
|
-
a.perspective.label
|
|
1001
|
-
] }),
|
|
1002
|
-
l && /* @__PURE__ */ u("span", { className: "lens-print-figure-total", children: [
|
|
1003
|
-
n("print.total", "Total"),
|
|
1004
|
-
": ",
|
|
1005
|
-
l
|
|
1006
|
-
] })
|
|
1007
|
-
] })
|
|
1008
|
-
] }),
|
|
1009
|
-
o ? /* @__PURE__ */ s(be, { section: a }) : i ? /* @__PURE__ */ s(St, { section: a }) : e.chart && /* @__PURE__ */ s(ke, { height: e.width === "half" ? 225 : 235, section: a }),
|
|
1010
|
-
/* @__PURE__ */ s(Tt, { section: a }),
|
|
1011
|
-
!o && (i ? /* @__PURE__ */ s(Ct, { section: a }) : /* @__PURE__ */ s(J, { section: a })),
|
|
1012
|
-
/* @__PURE__ */ s(we, { section: a }),
|
|
1013
|
-
/* @__PURE__ */ s(oe, { sections: e.breakdown }),
|
|
1014
|
-
/* @__PURE__ */ s(le, { footnotes: t })
|
|
1015
|
-
] });
|
|
1016
|
-
}
|
|
1017
|
-
function Kt({ values: e }) {
|
|
1018
|
-
const t = e.filter((l) => Number.isFinite(l));
|
|
1019
|
-
if (t.length < 2) return null;
|
|
1020
|
-
const n = Math.min(...t), r = Math.max(...t) - n || 1, i = 100 / (t.length - 1), o = t.map((l, d) => `${(d * i).toFixed(2)},${(24 - (l - n) / r * 22).toFixed(2)}`).join(" ");
|
|
1021
|
-
return /* @__PURE__ */ s("svg", { "aria-hidden": "true", className: "lens-print-sparkline", preserveAspectRatio: "none", viewBox: "0 0 100 26", children: /* @__PURE__ */ s("polyline", { fill: "none", points: o, strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
1022
|
-
}
|
|
1023
|
-
function Fe({ figure: e, footnotes: t, numbered: n }) {
|
|
1024
|
-
var x, $, F;
|
|
1025
|
-
const a = P(), { section: r } = e, i = T(r), o = r.document.meta.locale, l = r.frame, d = l ? C(l, i.encoding.value) : -1, c = l && d >= 0 ? (x = l.rows[0]) == null ? void 0 : x[d] : void 0, p = i.encoding.value ? i.format[i.encoding.value] : void 0, h = l ? C(l, i.encoding.final) : -1, k = l && h >= 0 ? ($ = l.rows[0]) == null ? void 0 : $[h] : void 0, v = E(k), N = i.encoding.final ? i.format[i.encoding.final] : p, K = i.target;
|
|
1026
|
-
return /* @__PURE__ */ u("div", { className: "lens-print-kpi", children: [
|
|
1027
|
-
/* @__PURE__ */ u("p", { className: "lens-print-kpi-label", children: [
|
|
1028
|
-
n && /* @__PURE__ */ s("span", { className: "lens-print-figure-number", children: a("print.figure", "Fig. {number}", { number: e.number }) }),
|
|
1029
|
-
i.title,
|
|
1030
|
-
/* @__PURE__ */ s(xe, { footnotes: t })
|
|
1031
|
-
] }),
|
|
1032
|
-
/* @__PURE__ */ u("p", { className: "lens-print-kpi-value", children: [
|
|
1033
|
-
D(c, p, o),
|
|
1034
|
-
v !== void 0 && /* @__PURE__ */ u("span", { className: "lens-print-kpi-delta", "data-negative": v < 0 ? "" : void 0, children: [
|
|
1035
|
-
v > 0 ? "+" : "",
|
|
1036
|
-
D(k, N, o)
|
|
1037
|
-
] })
|
|
1038
|
-
] }),
|
|
1039
|
-
i.sparkline && /* @__PURE__ */ s(Kt, { values: i.sparkline.values }),
|
|
1040
|
-
i.trend && /* @__PURE__ */ u("p", { className: "lens-print-kpi-trend", "data-negative": i.trend.percent < 0 ? "" : void 0, children: [
|
|
1041
|
-
i.trend.percent > 0 ? "+" : "",
|
|
1042
|
-
de(i.trend.percent) ?? `${new Intl.NumberFormat(o, { maximumFractionDigits: 1 }).format(i.trend.percent)}%`,
|
|
1043
|
-
i.trend.label ? ` ${i.trend.label}` : ""
|
|
1044
|
-
] }),
|
|
1045
|
-
K && /* @__PURE__ */ u("p", { className: "lens-print-kpi-target", children: [
|
|
1046
|
-
a("print.target", "Target"),
|
|
1047
|
-
": ",
|
|
1048
|
-
D(K.value, p, o),
|
|
1049
|
-
K.label ? ` · ${K.label}` : ""
|
|
1050
|
-
] }),
|
|
1051
|
-
i.caption && /* @__PURE__ */ s("p", { className: "lens-print-kpi-caption", children: i.caption }),
|
|
1052
|
-
/* @__PURE__ */ u("p", { className: "lens-print-kpi-chips", children: [
|
|
1053
|
-
((F = i.status) == null ? void 0 : F.label) && /* @__PURE__ */ s("span", { className: "lens-print-chip", "data-tone": i.status.tone ?? "neutral", children: i.status.label }),
|
|
1054
|
-
/* @__PURE__ */ s(O, { availability: i.availability, confidence: i.confidence })
|
|
1055
|
-
] })
|
|
1056
|
-
] });
|
|
1057
|
-
}
|
|
1058
|
-
function At(e, t) {
|
|
1059
|
-
var o, l;
|
|
1060
|
-
const n = (l = (o = e.filters) == null ? void 0 : o.find((d) => d.kind === "period")) == null ? void 0 : l.period;
|
|
1061
|
-
if (!n) return;
|
|
1062
|
-
const { start: a, end: r } = n.value;
|
|
1063
|
-
if (!a && !r) return t;
|
|
1064
|
-
const i = (d) => {
|
|
1065
|
-
const c = new Date(d);
|
|
1066
|
-
return Number.isNaN(c.getTime()) ? d : new Intl.DateTimeFormat(e.meta.locale, { dateStyle: "medium" }).format(c);
|
|
1067
|
-
};
|
|
1068
|
-
return a && r ? `${i(a)} — ${i(r)}` : i(a || r);
|
|
1069
|
-
}
|
|
1070
|
-
function Rt({
|
|
1071
|
-
document: e,
|
|
1072
|
-
outline: t,
|
|
1073
|
-
report: n
|
|
1074
|
-
}) {
|
|
1075
|
-
var o, l;
|
|
1076
|
-
const a = P(), r = t.kpis, i = At(e, a("filter.period.allTime", "All time"));
|
|
1077
|
-
return /* @__PURE__ */ u("header", { className: "lens-print-cover", children: [
|
|
1078
|
-
/* @__PURE__ */ u("div", { className: "lens-print-cover-head", children: [
|
|
1079
|
-
/* @__PURE__ */ s("p", { className: "lens-print-kicker", children: a("print.kicker", "Management audit report") }),
|
|
1080
|
-
/* @__PURE__ */ s("h1", { children: ((o = e.header) == null ? void 0 : o.title) || e.meta.title }),
|
|
1081
|
-
((l = e.header) == null ? void 0 : l.subtitle) && /* @__PURE__ */ s("p", { className: "lens-print-cover-subtitle", children: e.header.subtitle })
|
|
1082
|
-
] }),
|
|
1083
|
-
/* @__PURE__ */ u("dl", { className: "lens-print-cover-meta", children: [
|
|
1084
|
-
i && /* @__PURE__ */ u("div", { children: [
|
|
1085
|
-
/* @__PURE__ */ s("dt", { children: a("print.period", "Period") }),
|
|
1086
|
-
/* @__PURE__ */ s("dd", { children: i })
|
|
1087
|
-
] }),
|
|
1088
|
-
/* @__PURE__ */ u("div", { children: [
|
|
1089
|
-
/* @__PURE__ */ s("dt", { children: a("print.generated", "Generated") }),
|
|
1090
|
-
/* @__PURE__ */ s("dd", { children: new Intl.DateTimeFormat(e.meta.locale, {
|
|
1091
|
-
dateStyle: "long",
|
|
1092
|
-
timeStyle: "short"
|
|
1093
|
-
}).format(new Date(e.meta.generatedAt)) })
|
|
1094
|
-
] }),
|
|
1095
|
-
/* @__PURE__ */ u("div", { children: [
|
|
1096
|
-
/* @__PURE__ */ s("dt", { children: a("print.sections", "Detailed views") }),
|
|
1097
|
-
/* @__PURE__ */ s("dd", { children: t.figureCount + t.detailCount })
|
|
1098
|
-
] }),
|
|
1099
|
-
(t.estimated > 0 || t.missing.length > 0) && /* @__PURE__ */ u("div", { children: [
|
|
1100
|
-
/* @__PURE__ */ s("dt", { children: a("print.quality", "Data quality") }),
|
|
1101
|
-
/* @__PURE__ */ s("dd", { children: a("print.qualityCount", "{estimated} estimated · {missing} not calculated", {
|
|
1102
|
-
estimated: t.estimated,
|
|
1103
|
-
missing: t.missing.length
|
|
1104
|
-
}) })
|
|
1105
|
-
] })
|
|
1106
|
-
] }),
|
|
1107
|
-
r.length > 0 && /* @__PURE__ */ s("div", { className: "lens-print-kpis", children: r.map((d) => /* @__PURE__ */ s(Fe, { figure: d }, d.section.id)) }),
|
|
1108
|
-
(n.truncated || n.warnings.length > 0 || t.missing.length > 0) && /* @__PURE__ */ s("p", { className: "lens-print-cover-flag", children: a(
|
|
1109
|
-
"print.limitationsFlag",
|
|
1110
|
-
"This report discloses gaps in its data; see the closing appendix."
|
|
1111
|
-
) })
|
|
1112
|
-
] });
|
|
1113
|
-
}
|
|
1114
|
-
function Lt({ outline: e }) {
|
|
1115
|
-
const t = P();
|
|
1116
|
-
return /* @__PURE__ */ u("section", { className: "lens-print-contents", children: [
|
|
1117
|
-
/* @__PURE__ */ s("h2", { children: t("print.contents", "Contents") }),
|
|
1118
|
-
/* @__PURE__ */ u("ol", { children: [
|
|
1119
|
-
e.chapters.filter(({ figures: n }) => n.length > 0).map((n) => /* @__PURE__ */ u("li", { children: [
|
|
1120
|
-
/* @__PURE__ */ s("span", { className: "lens-print-contents-number", children: n.number }),
|
|
1121
|
-
/* @__PURE__ */ s("span", { className: "lens-print-contents-title", children: n.title }),
|
|
1122
|
-
n.caption && /* @__PURE__ */ s("span", { className: "lens-print-contents-caption", children: n.caption })
|
|
1123
|
-
] }, n.id)),
|
|
1124
|
-
e.appendix.length > 0 && /* @__PURE__ */ u("li", { children: [
|
|
1125
|
-
/* @__PURE__ */ s("span", { className: "lens-print-contents-number", children: "A" }),
|
|
1126
|
-
/* @__PURE__ */ s("span", { className: "lens-print-contents-title", children: t("print.appendix", "Appendix A. Detailed breakdowns") })
|
|
1127
|
-
] }),
|
|
1128
|
-
/* @__PURE__ */ u("li", { children: [
|
|
1129
|
-
/* @__PURE__ */ s("span", { className: "lens-print-contents-number", children: "B" }),
|
|
1130
|
-
/* @__PURE__ */ s("span", { className: "lens-print-contents-title", children: t("print.method", "Appendix B. Sources and definitions") })
|
|
1131
|
-
] })
|
|
1132
|
-
] }),
|
|
1133
|
-
/* @__PURE__ */ s("p", { className: "lens-print-contents-note", children: t(
|
|
1134
|
-
"print.note",
|
|
1135
|
-
"Every interactive view is expanded below. Values and shares accompany each chart so the report remains self-contained on paper."
|
|
1136
|
-
) })
|
|
1137
|
-
] });
|
|
1138
|
-
}
|
|
1139
|
-
function Vt({ chapter: e, title: t }) {
|
|
1140
|
-
const n = P(), a = A(
|
|
1141
|
-
() => {
|
|
1142
|
-
var v;
|
|
1143
|
-
return ht(
|
|
1144
|
-
e.figures.map((N) => ({
|
|
1145
|
-
id: N.section.id,
|
|
1146
|
-
panel: T(N.section),
|
|
1147
|
-
frame: N.section.frame
|
|
1148
|
-
})),
|
|
1149
|
-
((v = e.figures[0]) == null ? void 0 : v.section.document.meta.locale) ?? "en"
|
|
1150
|
-
);
|
|
1151
|
-
},
|
|
1152
|
-
[e.figures]
|
|
1153
|
-
), r = et(e.figures, n);
|
|
1154
|
-
if (e.figures.length === 0) return null;
|
|
1155
|
-
const i = /* @__PURE__ */ new Set([e.caption ?? ""]), o = [];
|
|
1156
|
-
let l, d;
|
|
1157
|
-
const c = (v) => /* @__PURE__ */ s(Pt, { figure: v, footnotes: r.get(v.section.id) }, v.section.id), p = (v) => {
|
|
1158
|
-
if (!d) {
|
|
1159
|
-
o.push(v);
|
|
1160
|
-
return;
|
|
1161
|
-
}
|
|
1162
|
-
const N = d;
|
|
1163
|
-
d = void 0, o.push(
|
|
1164
|
-
/* @__PURE__ */ u("div", { className: "lens-print-lead-group", children: [
|
|
1165
|
-
N,
|
|
1166
|
-
v
|
|
1167
|
-
] }, `lead-${v.key}`)
|
|
1168
|
-
);
|
|
1169
|
-
}, h = () => {
|
|
1170
|
-
l && (p(c(l)), l = void 0);
|
|
1171
|
-
}, k = (v) => {
|
|
1172
|
-
if (v.width !== "half") {
|
|
1173
|
-
h(), p(c(v));
|
|
1174
|
-
return;
|
|
1175
|
-
}
|
|
1176
|
-
if (!l) {
|
|
1177
|
-
l = v;
|
|
1178
|
-
return;
|
|
1179
|
-
}
|
|
1180
|
-
const N = l;
|
|
1181
|
-
l = void 0, p(
|
|
1182
|
-
/* @__PURE__ */ u("div", { className: "lens-print-pair", children: [
|
|
1183
|
-
c(N),
|
|
1184
|
-
c(v)
|
|
1185
|
-
] }, `pair-${N.section.id}`)
|
|
1186
|
-
);
|
|
1187
|
-
};
|
|
1188
|
-
for (const v of e.figures) {
|
|
1189
|
-
const N = v.group, K = `${(N == null ? void 0 : N.label) ?? ""}::${(N == null ? void 0 : N.caption) ?? ""}`;
|
|
1190
|
-
N && !i.has(K) && (i.add(K), h(), d = /* @__PURE__ */ u("div", { className: "lens-print-strip", children: [
|
|
1191
|
-
N.label && /* @__PURE__ */ s("h3", { children: N.label }),
|
|
1192
|
-
N.caption && N.caption !== e.caption && /* @__PURE__ */ s("p", { children: N.caption })
|
|
1193
|
-
] }, `strip-${v.section.id}`)), k(v);
|
|
1194
|
-
}
|
|
1195
|
-
return h(), d && o.push(d), /* @__PURE__ */ u("section", { className: "lens-print-chapter", children: [
|
|
1196
|
-
/* @__PURE__ */ u("header", { className: "lens-print-chapter-head", children: [
|
|
1197
|
-
/* @__PURE__ */ u("p", { className: "lens-print-runninghead", children: [
|
|
1198
|
-
t,
|
|
1199
|
-
" · ",
|
|
1200
|
-
e.number,
|
|
1201
|
-
". ",
|
|
1202
|
-
e.title
|
|
1203
|
-
] }),
|
|
1204
|
-
/* @__PURE__ */ u("h2", { children: [
|
|
1205
|
-
/* @__PURE__ */ s("span", { className: "lens-print-chapter-number", children: e.number }),
|
|
1206
|
-
e.title
|
|
1207
|
-
] }),
|
|
1208
|
-
e.caption && /* @__PURE__ */ s("p", { className: "lens-print-lead", children: e.caption }),
|
|
1209
|
-
a.length > 0 && /* @__PURE__ */ s("p", { className: "lens-print-chapter-headline", children: a.map((v) => /* @__PURE__ */ u("span", { children: [
|
|
1210
|
-
/* @__PURE__ */ s("span", { className: "lens-print-chapter-headline-label", children: v.label }),
|
|
1211
|
-
v.value
|
|
1212
|
-
] }, v.id)) })
|
|
1213
|
-
] }),
|
|
1214
|
-
/* @__PURE__ */ s("div", { className: "lens-print-grid", children: o })
|
|
1215
|
-
] });
|
|
1216
|
-
}
|
|
1217
|
-
const qt = 12, ce = 8;
|
|
1218
|
-
function It({ detail: e }) {
|
|
1219
|
-
var o;
|
|
1220
|
-
const t = P(), n = T(e.section), a = ((o = e.section.frame) == null ? void 0 : o.rows.length) ?? 0, r = n.semantics === "series" && a > qt, i = r && e.section.frame ? {
|
|
1221
|
-
...e.section,
|
|
1222
|
-
frame: { ...e.section.frame, rows: e.section.frame.rows.slice(-ce) }
|
|
1223
|
-
} : e.section;
|
|
1224
|
-
return /* @__PURE__ */ u("article", { className: "lens-print-detail", children: [
|
|
1225
|
-
/* @__PURE__ */ u("header", { children: [
|
|
1226
|
-
/* @__PURE__ */ s("span", { className: "lens-print-detail-number", children: e.number }),
|
|
1227
|
-
/* @__PURE__ */ s("h4", { children: n.title }),
|
|
1228
|
-
/* @__PURE__ */ s("p", { className: "lens-print-detail-trail", children: e.trail })
|
|
1229
|
-
] }),
|
|
1230
|
-
r && /* @__PURE__ */ s(ke, { height: 110, section: e.section }),
|
|
1231
|
-
/* @__PURE__ */ s(J, { dense: !0, exact: !0, section: i }),
|
|
1232
|
-
/* @__PURE__ */ s(we, { section: e.section }),
|
|
1233
|
-
r && /* @__PURE__ */ s("p", { className: "lens-print-detail-note", children: t("print.seriesTail", "The chart carries all {rows} periods; the table keeps the most recent {kept}.", {
|
|
1234
|
-
rows: a,
|
|
1235
|
-
kept: ce
|
|
1236
|
-
}) })
|
|
1237
|
-
] });
|
|
1238
|
-
}
|
|
1239
|
-
function Et({ outline: e, title: t }) {
|
|
1240
|
-
const n = P();
|
|
1241
|
-
return e.appendix.length === 0 ? null : /* @__PURE__ */ u("section", { className: "lens-print-appendix", children: [
|
|
1242
|
-
/* @__PURE__ */ u("header", { className: "lens-print-chapter-head", children: [
|
|
1243
|
-
/* @__PURE__ */ u("p", { className: "lens-print-runninghead", children: [
|
|
1244
|
-
t,
|
|
1245
|
-
" · ",
|
|
1246
|
-
n("print.appendix", "Appendix A. Detailed breakdowns")
|
|
1247
|
-
] }),
|
|
1248
|
-
/* @__PURE__ */ u("h2", { children: [
|
|
1249
|
-
/* @__PURE__ */ s("span", { className: "lens-print-chapter-number", children: "A" }),
|
|
1250
|
-
n("print.appendix", "Appendix A. Detailed breakdowns")
|
|
1251
|
-
] }),
|
|
1252
|
-
/* @__PURE__ */ s("p", { className: "lens-print-lead", children: n(
|
|
1253
|
-
"print.appendixNote",
|
|
1254
|
-
"Each reading below is one step of the drill path printed above it, kept for verification rather than for reading in order."
|
|
1255
|
-
) })
|
|
1256
|
-
] }),
|
|
1257
|
-
e.appendix.map((a) => /* @__PURE__ */ u("div", { className: "lens-print-appendix-chapter", children: [
|
|
1258
|
-
/* @__PURE__ */ u("h3", { children: [
|
|
1259
|
-
"A",
|
|
1260
|
-
a.number,
|
|
1261
|
-
". ",
|
|
1262
|
-
a.title
|
|
1263
|
-
] }),
|
|
1264
|
-
/* @__PURE__ */ s("div", { className: "lens-print-grid lens-print-grid-dense", children: a.details.map((r) => /* @__PURE__ */ s(It, { detail: r }, r.section.id)) })
|
|
1265
|
-
] }, a.id))
|
|
1266
|
-
] });
|
|
1267
|
-
}
|
|
1268
|
-
function Bt({
|
|
1269
|
-
document: e,
|
|
1270
|
-
outline: t,
|
|
1271
|
-
report: n,
|
|
1272
|
-
title: a
|
|
1273
|
-
}) {
|
|
1274
|
-
const r = P(), i = A(
|
|
1275
|
-
() => Ge(t.qualities, r),
|
|
1276
|
-
[t.qualities, r]
|
|
1277
|
-
);
|
|
1278
|
-
return /* @__PURE__ */ u("section", { className: "lens-print-method", children: [
|
|
1279
|
-
/* @__PURE__ */ u("header", { className: "lens-print-chapter-head", children: [
|
|
1280
|
-
/* @__PURE__ */ u("p", { className: "lens-print-runninghead", children: [
|
|
1281
|
-
a,
|
|
1282
|
-
" · ",
|
|
1283
|
-
r("print.method", "Appendix B. Sources and definitions")
|
|
1284
|
-
] }),
|
|
1285
|
-
/* @__PURE__ */ u("h2", { children: [
|
|
1286
|
-
/* @__PURE__ */ s("span", { className: "lens-print-chapter-number", children: "B" }),
|
|
1287
|
-
r("print.method", "Appendix B. Sources and definitions")
|
|
1288
|
-
] })
|
|
1289
|
-
] }),
|
|
1290
|
-
i.length > 0 && /* @__PURE__ */ u("div", { className: "lens-print-glossary", children: [
|
|
1291
|
-
/* @__PURE__ */ s("h3", { children: r("print.qualityTerms", "What the quality marks mean") }),
|
|
1292
|
-
/* @__PURE__ */ s("dl", { children: i.map((o) => /* @__PURE__ */ u("div", { children: [
|
|
1293
|
-
/* @__PURE__ */ s("dt", { children: /* @__PURE__ */ s("span", { className: "lens-print-chip", "data-quality": o.value, children: o.label }) }),
|
|
1294
|
-
/* @__PURE__ */ s("dd", { children: o.definition })
|
|
1295
|
-
] }, o.value)) })
|
|
1296
|
-
] }),
|
|
1297
|
-
t.notes.length > 0 && /* @__PURE__ */ s("dl", { className: "lens-print-notes", children: t.notes.map((o) => /* @__PURE__ */ u("div", { children: [
|
|
1298
|
-
/* @__PURE__ */ s("dt", { children: o.label }),
|
|
1299
|
-
/* @__PURE__ */ s("dd", { children: o.detail })
|
|
1300
|
-
] }, o.id)) }),
|
|
1301
|
-
(t.missing.length > 0 || n.truncated || n.warnings.length > 0) && /* @__PURE__ */ u("div", { className: "lens-print-limits", children: [
|
|
1302
|
-
/* @__PURE__ */ s("h3", { children: r("print.limitations", "Data limitations") }),
|
|
1303
|
-
/* @__PURE__ */ s("p", { children: r(
|
|
1304
|
-
"print.limitationsNote",
|
|
1305
|
-
"The report remains usable, but the following detail views could not be calculated and are explicitly disclosed:"
|
|
1306
|
-
) }),
|
|
1307
|
-
/* @__PURE__ */ u("ul", { children: [
|
|
1308
|
-
t.missing.length > 0 && /* @__PURE__ */ s("li", { children: r("print.missing", "Not calculated: {names}", { names: t.missing.join(", ") }) }),
|
|
1309
|
-
n.truncated && /* @__PURE__ */ s("li", { children: r(
|
|
1310
|
-
"print.timeLimit",
|
|
1311
|
-
"Further detail was stopped at the preparation time limit; all sections calculated by then are included."
|
|
1312
|
-
) }),
|
|
1313
|
-
n.warnings.map((o, l) => /* @__PURE__ */ s("li", { children: o }, `${l}:${o}`))
|
|
1314
|
-
] })
|
|
1315
|
-
] }),
|
|
1316
|
-
/* @__PURE__ */ u("p", { className: "lens-print-provenance", children: [
|
|
1317
|
-
r("print.snapshot", "Snapshot"),
|
|
1318
|
-
": ",
|
|
1319
|
-
e.snapshotId,
|
|
1320
|
-
" · ",
|
|
1321
|
-
e.meta.dashboardId,
|
|
1322
|
-
" · ",
|
|
1323
|
-
e.meta.locale
|
|
1324
|
-
] })
|
|
1325
|
-
] });
|
|
1326
|
-
}
|
|
1327
|
-
function _t({ report: e }) {
|
|
1328
|
-
var o;
|
|
1329
|
-
const t = P(), n = e.document, a = ((o = n.header) == null ? void 0 : o.title) || n.meta.title, r = A(() => xt(e), [e]), i = A(
|
|
1330
|
-
() => Nt(
|
|
1331
|
-
e,
|
|
1332
|
-
t("print.summary", "Summary"),
|
|
1333
|
-
t("print.other", "Other readings")
|
|
1334
|
-
),
|
|
1335
|
-
[e, t]
|
|
1336
|
-
);
|
|
1337
|
-
return /* @__PURE__ */ u(ve.Provider, { value: r, children: [
|
|
1338
|
-
/* @__PURE__ */ s(Rt, { document: n, outline: i, report: e }),
|
|
1339
|
-
/* @__PURE__ */ s(Lt, { outline: i }),
|
|
1340
|
-
i.chapters.map((l) => /* @__PURE__ */ s(Vt, { chapter: l, title: a }, l.id)),
|
|
1341
|
-
/* @__PURE__ */ s(Et, { outline: i, title: a }),
|
|
1342
|
-
/* @__PURE__ */ s(Bt, { document: n, outline: i, report: e, title: a })
|
|
1343
|
-
] });
|
|
1344
|
-
}
|
|
1345
|
-
function Yt() {
|
|
1346
|
-
const { document: e } = qe(), t = Ie();
|
|
1347
|
-
if (!t.report || typeof globalThis.document > "u") return null;
|
|
1348
|
-
const n = e.theme.palette.accent ?? e.theme.palette.primary;
|
|
1349
|
-
return De(
|
|
1350
|
-
/* @__PURE__ */ s(
|
|
1351
|
-
"article",
|
|
1352
|
-
{
|
|
1353
|
-
"aria-hidden": !t.active,
|
|
1354
|
-
className: "lens-print-report",
|
|
1355
|
-
"data-preview": t.preview ? "true" : void 0,
|
|
1356
|
-
lang: e.meta.locale,
|
|
1357
|
-
style: n ? { "--lens-accent-500": n } : void 0,
|
|
1358
|
-
children: /* @__PURE__ */ s(_t, { report: t.report })
|
|
1359
|
-
}
|
|
1360
|
-
),
|
|
1361
|
-
globalThis.document.body
|
|
1362
|
-
);
|
|
1363
|
-
}
|
|
1364
|
-
export {
|
|
1365
|
-
Yt as PrintReport,
|
|
1366
|
-
_t as PrintReportView
|
|
1367
|
-
};
|