courthive-components 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/team-logos/index.d.ts +9 -0
- package/dist/components/burstChart/burstChart.d.ts +108 -0
- package/dist/components/burstChart/matchUpTransform.d.ts +11 -0
- package/dist/components/burstChart/textHelpers.d.ts +11 -0
- package/dist/components/button/barButton.d.ts +1 -0
- package/dist/components/button/cvaButton.d.ts +8 -0
- package/dist/components/button/dropDownButton.d.ts +5 -0
- package/dist/components/categories/ageCategory/ageCategory.d.ts +54 -0
- package/dist/components/categories/ageCategory/ageCategoryLogic.d.ts +55 -0
- package/dist/components/categories/category/category.d.ts +47 -0
- package/dist/components/composition-editor/compositionEditor.d.ts +6 -0
- package/dist/components/composition-editor/compositionEditorStore.d.ts +24 -0
- package/dist/components/composition-editor/compositionEditorTypes.d.ts +37 -0
- package/dist/components/composition-editor/compositionPreview.d.ts +2 -0
- package/dist/components/composition-editor/scaleConstants.d.ts +7 -0
- package/dist/components/composition-editor/sections/displaySection.d.ts +3 -0
- package/dist/components/composition-editor/sections/fieldBuilders.d.ts +20 -0
- package/dist/components/composition-editor/sections/layoutSection.d.ts +3 -0
- package/dist/components/composition-editor/sections/participantSection.d.ts +3 -0
- package/dist/components/composition-editor/sections/placeholderSection.d.ts +3 -0
- package/dist/components/composition-editor/sections/scaleSection.d.ts +3 -0
- package/dist/components/composition-editor/sections/scoreSection.d.ts +3 -0
- package/dist/components/composition-editor/sections/sectionBuilder.d.ts +8 -0
- package/dist/components/composition-editor/sections/themeSection.d.ts +3 -0
- package/dist/components/composition-editor/styles.d.ts +26 -0
- package/dist/components/controlBar/controlBar.d.ts +11 -0
- package/dist/components/controlBar/toggleOverlay.d.ts +3 -0
- package/dist/components/courts/courts.d.ts +7 -0
- package/dist/components/courts/index.d.ts +1 -0
- package/dist/components/drawer/drawer.d.ts +14 -0
- package/dist/components/flightProfile/flightProfileLogic.d.ts +51 -0
- package/dist/components/flightProfile/flightProfileNew.d.ts +34 -0
- package/dist/components/flightProfile/getFlightProfileFormItems.d.ts +13 -0
- package/dist/components/flightProfile/getFlightProfileFormRelationships.d.ts +1 -0
- package/dist/components/forms/createMultiSelect.d.ts +34 -0
- package/dist/components/forms/renderButtons.d.ts +3 -0
- package/dist/components/forms/renderField.d.ts +7 -0
- package/dist/components/forms/renderForm.d.ts +1 -0
- package/dist/components/forms/renderMenu.d.ts +3 -0
- package/dist/components/forms/renderValidator.d.ts +113 -0
- package/dist/components/forms/styles.d.ts +0 -0
- package/dist/components/generateRound.d.ts +6 -0
- package/dist/components/inline-scoring/engineToMatchUp.d.ts +6 -0
- package/dist/components/inline-scoring/index.d.ts +5 -0
- package/dist/components/inline-scoring/inlineScoringFooter.d.ts +18 -0
- package/dist/components/inline-scoring/inlineScoringManager.d.ts +49 -0
- package/dist/components/inline-scoring/inlineScoringTypes.d.ts +40 -0
- package/dist/components/inline-scoring/renderInlineMatchUp.d.ts +27 -0
- package/dist/components/interactive-scoring/buildInteractiveScoringShell.d.ts +28 -0
- package/dist/components/interactive-scoring/index.d.ts +2 -0
- package/dist/components/interactive-scoring/types.d.ts +60 -0
- package/dist/components/matchUpFormat/matchUpFormat.d.ts +81 -0
- package/dist/components/matchUpFormat/matchUpFormatLogic.d.ts +112 -0
- package/dist/components/modal/cmodal.d.ts +30 -0
- package/dist/components/modal/cmodalStyles.d.ts +8 -0
- package/dist/components/modal/compositionEditorModal.d.ts +46 -0
- package/dist/components/modal/generateTeamsModal.d.ts +26 -0
- package/dist/components/modal/mockParticipants.d.ts +91 -0
- package/dist/components/modal/scheduleCellConfigModal.d.ts +44 -0
- package/dist/components/modal/selectItem.d.ts +24 -0
- package/dist/components/notes-toolbar/notesToolbar.d.ts +20 -0
- package/dist/components/policy-catalog/controller/policyCatalogControl.d.ts +18 -0
- package/dist/components/policy-catalog/domain/catalogProjections.d.ts +11 -0
- package/dist/components/policy-catalog/domain/policyDefaults.d.ts +26 -0
- package/dist/components/policy-catalog/domain/utils.d.ts +4 -0
- package/dist/components/policy-catalog/editors/ranking/domain/emptyRankingPolicy.d.ts +2 -0
- package/dist/components/policy-catalog/editors/ranking/domain/rankingProjections.d.ts +32 -0
- package/dist/components/policy-catalog/editors/ranking/index.d.ts +9 -0
- package/dist/components/policy-catalog/editors/ranking/rankingPointsEditorControl.d.ts +27 -0
- package/dist/components/policy-catalog/editors/ranking/rankingPointsEditorPanel.d.ts +8 -0
- package/dist/components/policy-catalog/editors/ranking/rankingPointsEditorStore.d.ts +53 -0
- package/dist/components/policy-catalog/editors/ranking/sections/aggregationSection.d.ts +6 -0
- package/dist/components/policy-catalog/editors/ranking/sections/bonusPointsRow.d.ts +6 -0
- package/dist/components/policy-catalog/editors/ranking/sections/metadataSection.d.ts +6 -0
- package/dist/components/policy-catalog/editors/ranking/sections/perWinPointsRow.d.ts +6 -0
- package/dist/components/policy-catalog/editors/ranking/sections/positionPointsTable.d.ts +6 -0
- package/dist/components/policy-catalog/editors/ranking/sections/profileCard.d.ts +6 -0
- package/dist/components/policy-catalog/editors/ranking/sections/qualityWinSection.d.ts +6 -0
- package/dist/components/policy-catalog/editors/ranking/sections/scopeBadges.d.ts +2 -0
- package/dist/components/policy-catalog/editors/ranking/sections/scopeEditor.d.ts +6 -0
- package/dist/components/policy-catalog/editors/ranking/styles.d.ts +25 -0
- package/dist/components/policy-catalog/editors/ranking/types.d.ts +146 -0
- package/dist/components/policy-catalog/editors/scheduling/domain/schedulingProjections.d.ts +5 -0
- package/dist/components/policy-catalog/editors/scheduling/domain/schedulingValidation.d.ts +2 -0
- package/dist/components/policy-catalog/editors/scheduling/index.d.ts +11 -0
- package/dist/components/policy-catalog/editors/scheduling/schedulingEditorControl.d.ts +26 -0
- package/dist/components/policy-catalog/editors/scheduling/schedulingEditorPanel.d.ts +6 -0
- package/dist/components/policy-catalog/editors/scheduling/schedulingEditorStore.d.ts +32 -0
- package/dist/components/policy-catalog/editors/scheduling/sections/averageTimesSection.d.ts +6 -0
- package/dist/components/policy-catalog/editors/scheduling/sections/dailyLimitsSection.d.ts +6 -0
- package/dist/components/policy-catalog/editors/scheduling/sections/defaultTimesSection.d.ts +6 -0
- package/dist/components/policy-catalog/editors/scheduling/sections/formatTimeRow.d.ts +22 -0
- package/dist/components/policy-catalog/editors/scheduling/sections/modificationFlagsSection.d.ts +6 -0
- package/dist/components/policy-catalog/editors/scheduling/sections/recoveryTimesSection.d.ts +6 -0
- package/dist/components/policy-catalog/editors/scheduling/styles.d.ts +27 -0
- package/dist/components/policy-catalog/editors/scheduling/types.d.ts +65 -0
- package/dist/components/policy-catalog/engine/policyCatalogStore.d.ts +25 -0
- package/dist/components/policy-catalog/index.d.ts +22 -0
- package/dist/components/policy-catalog/types.d.ts +57 -0
- package/dist/components/policy-catalog/ui/editorShell.d.ts +11 -0
- package/dist/components/policy-catalog/ui/jsonEditor.d.ts +5 -0
- package/dist/components/policy-catalog/ui/policyCatalogLayout.d.ts +6 -0
- package/dist/components/policy-catalog/ui/policyCatalogPanel.d.ts +10 -0
- package/dist/components/policy-catalog/ui/styles.d.ts +28 -0
- package/dist/components/popover/tipster.d.ts +14 -0
- package/dist/components/print-composition-editor/printCompositionEditor.d.ts +2 -0
- package/dist/components/print-composition-editor/printCompositionEditorTypes.d.ts +77 -0
- package/dist/components/renderSchematicStructure/index.d.ts +4 -0
- package/dist/components/renderSchematicStructure/renderSchematicMatchUp.d.ts +26 -0
- package/dist/components/renderSchematicStructure/renderSchematicRound.d.ts +15 -0
- package/dist/components/renderSchematicStructure/renderSchematicStructure.d.ts +12 -0
- package/dist/components/renderStructure/isLuckyDraw.d.ts +9 -0
- package/dist/components/renderStructure/renderAddress.d.ts +5 -0
- package/dist/components/renderStructure/renderCenterInfo.d.ts +10 -0
- package/dist/components/renderStructure/renderContainer.d.ts +4 -0
- package/dist/components/renderStructure/renderFlag.d.ts +6 -0
- package/dist/components/renderStructure/renderFrill.d.ts +10 -0
- package/dist/components/renderStructure/renderGameScore.d.ts +3 -0
- package/dist/components/renderStructure/renderIndividual.d.ts +12 -0
- package/dist/components/renderStructure/renderMatchUp.d.ts +14 -0
- package/dist/components/renderStructure/renderParticipant.d.ts +11 -0
- package/dist/components/renderStructure/renderParticipantDetail.d.ts +7 -0
- package/dist/components/renderStructure/renderParticipantInput.d.ts +10 -0
- package/dist/components/renderStructure/renderPersonAttribute.d.ts +6 -0
- package/dist/components/renderStructure/renderRound.d.ts +17 -0
- package/dist/components/renderStructure/renderRoundHeader.d.ts +8 -0
- package/dist/components/renderStructure/renderScale.d.ts +8 -0
- package/dist/components/renderStructure/renderSchedule.d.ts +5 -0
- package/dist/components/renderStructure/renderSeeding.d.ts +6 -0
- package/dist/components/renderStructure/renderSide.d.ts +9 -0
- package/dist/components/renderStructure/renderSideScore.d.ts +16 -0
- package/dist/components/renderStructure/renderStatusPill.d.ts +3 -0
- package/dist/components/renderStructure/renderStructure.d.ts +13 -0
- package/dist/components/renderStructure/renderTeam.d.ts +5 -0
- package/dist/components/renderStructure/renderTeamLogo.d.ts +4 -0
- package/dist/components/renderStructure/renderTick.d.ts +3 -0
- package/dist/components/schedule-page/controller/schedulePageControl.d.ts +18 -0
- package/dist/components/schedule-page/domain/matchUpCatalogProjections.d.ts +4 -0
- package/dist/components/schedule-page/domain/scheduleIssues.d.ts +2 -0
- package/dist/components/schedule-page/domain/utils.d.ts +5 -0
- package/dist/components/schedule-page/engine/schedulePageStore.d.ts +34 -0
- package/dist/components/schedule-page/index.d.ts +24 -0
- package/dist/components/schedule-page/types.d.ts +218 -0
- package/dist/components/schedule-page/ui/courtGridSlot.d.ts +8 -0
- package/dist/components/schedule-page/ui/dateStrip.d.ts +5 -0
- package/dist/components/schedule-page/ui/inspectorPanel.d.ts +2 -0
- package/dist/components/schedule-page/ui/issuesPanel.d.ts +2 -0
- package/dist/components/schedule-page/ui/matchUpCard.d.ts +5 -0
- package/dist/components/schedule-page/ui/matchUpCatalog.d.ts +11 -0
- package/dist/components/schedule-page/ui/scheduleCellTypeAhead.d.ts +23 -0
- package/dist/components/schedule-page/ui/scheduleGridCell.d.ts +8 -0
- package/dist/components/schedule-page/ui/schedulePageLayout.d.ts +18 -0
- package/dist/components/schedule-page/ui/styles.d.ts +41 -0
- package/dist/components/scheduling-profile/controller/schedulingProfileControl.d.ts +14 -0
- package/dist/components/scheduling-profile/domain/catalogProjections.d.ts +16 -0
- package/dist/components/scheduling-profile/domain/dndApply.d.ts +2 -0
- package/dist/components/scheduling-profile/domain/issueIndex.d.ts +2 -0
- package/dist/components/scheduling-profile/domain/profileProjections.d.ts +6 -0
- package/dist/components/scheduling-profile/domain/utils.d.ts +7 -0
- package/dist/components/scheduling-profile/domain/validateProfile.d.ts +13 -0
- package/dist/components/scheduling-profile/engine/profileStore.d.ts +27 -0
- package/dist/components/scheduling-profile/index.d.ts +25 -0
- package/dist/components/scheduling-profile/types.d.ts +197 -0
- package/dist/components/scheduling-profile/ui/cardPopover.d.ts +11 -0
- package/dist/components/scheduling-profile/ui/dateStrip.d.ts +5 -0
- package/dist/components/scheduling-profile/ui/inspectorPanel.d.ts +2 -0
- package/dist/components/scheduling-profile/ui/issuesPanel.d.ts +5 -0
- package/dist/components/scheduling-profile/ui/roundCard.d.ts +12 -0
- package/dist/components/scheduling-profile/ui/roundCatalog.d.ts +8 -0
- package/dist/components/scheduling-profile/ui/schedulingProfileLayout.d.ts +15 -0
- package/dist/components/scheduling-profile/ui/styles.d.ts +46 -0
- package/dist/components/scheduling-profile/ui/venueBoard.d.ts +7 -0
- package/dist/components/scorecard/index.d.ts +2 -0
- package/dist/components/scorecard/renderScorecard.d.ts +26 -0
- package/dist/components/scoring/approaches/dialPadApproach.d.ts +2 -0
- package/dist/components/scoring/approaches/dialPadLogic.d.ts +12 -0
- package/dist/components/scoring/approaches/dynamicSetsApproach.d.ts +2 -0
- package/dist/components/scoring/approaches/freeScoreApproach.d.ts +2 -0
- package/dist/components/scoring/approaches/inlineScoringApproach.d.ts +2 -0
- package/dist/components/scoring/config.d.ts +28 -0
- package/dist/components/scoring/index.d.ts +6 -0
- package/dist/components/scoring/logic/dynamicSetsLogic.d.ts +124 -0
- package/dist/components/scoring/scoringModal.d.ts +2 -0
- package/dist/components/scoring/types.d.ts +60 -0
- package/dist/components/scoring/utils/scoreFormatters.d.ts +12 -0
- package/dist/components/scoring/utils/scoreValidator.d.ts +16 -0
- package/dist/components/scoring/utils/setExpansionLogic.d.ts +24 -0
- package/dist/components/temporal-grid/controller/temporalGridControl.d.ts +137 -0
- package/dist/components/temporal-grid/controller/viewProjections.d.ts +220 -0
- package/dist/components/temporal-grid/engine/viewState.d.ts +34 -0
- package/dist/components/temporal-grid/index.d.ts +18 -0
- package/dist/components/temporal-grid/timeline/CourtTimeline.d.ts +77 -0
- package/dist/components/temporal-grid/timeline/InteractionManager.d.ts +59 -0
- package/dist/components/temporal-grid/timeline/ItemRenderer.d.ts +35 -0
- package/dist/components/temporal-grid/timeline/RowLayout.d.ts +38 -0
- package/dist/components/temporal-grid/timeline/TimeAxis.d.ts +41 -0
- package/dist/components/temporal-grid/timeline/TimeScale.d.ts +106 -0
- package/dist/components/temporal-grid/timeline/types.d.ts +124 -0
- package/dist/components/temporal-grid/ui/blockPopover.d.ts +29 -0
- package/dist/components/temporal-grid/ui/courtAvailabilityModal.d.ts +29 -0
- package/dist/components/temporal-grid/ui/modernTimePicker.d.ts +46 -0
- package/dist/components/temporal-grid/ui/statsBar.d.ts +21 -0
- package/dist/components/temporal-grid/ui/temporalGrid.d.ts +149 -0
- package/dist/components/temporal-grid/ui/viewToolbar.d.ts +37 -0
- package/dist/components/topology-builder/controller/topologyBuilderControl.d.ts +19 -0
- package/dist/components/topology-builder/domain/feedRounds.d.ts +42 -0
- package/dist/components/topology-builder/domain/generateDrawFromTopology.d.ts +16 -0
- package/dist/components/topology-builder/domain/playoffProfilesCache.d.ts +16 -0
- package/dist/components/topology-builder/domain/previewGenerator.d.ts +9 -0
- package/dist/components/topology-builder/domain/templates.d.ts +2 -0
- package/dist/components/topology-builder/domain/topologyToDrawOptions.d.ts +6 -0
- package/dist/components/topology-builder/domain/topologyValidator.d.ts +8 -0
- package/dist/components/topology-builder/engine/topologyStore.d.ts +30 -0
- package/dist/components/topology-builder/index.d.ts +23 -0
- package/dist/components/topology-builder/types.d.ts +59 -0
- package/dist/components/topology-builder/ui/edgeEditor.d.ts +7 -0
- package/dist/components/topology-builder/ui/nodeEditor.d.ts +9 -0
- package/dist/components/topology-builder/ui/structureCard.d.ts +39 -0
- package/dist/components/topology-builder/ui/toolbar.d.ts +15 -0
- package/dist/components/topology-builder/ui/topologyBuilderLayout.d.ts +7 -0
- package/dist/components/topology-builder/ui/topologyCanvas.d.ts +10 -0
- package/dist/components/validators/numericRange.d.ts +1 -0
- package/dist/components/validators/numericValidator.d.ts +1 -0
- package/dist/compositions/compositions.d.ts +2 -0
- package/dist/compositions/lineHeights.d.ts +5 -0
- package/dist/compositions/resolvePublishedComposition.d.ts +12 -0
- package/dist/constants/matchUpFormats.d.ts +34 -0
- package/dist/courthive-components.css +1 -1
- package/dist/courthive-components.es.js +4 -4
- package/dist/courthive-components.umd.js +1 -1
- package/dist/data/componentConstants.d.ts +1 -0
- package/dist/data/generateEventData.d.ts +15 -0
- package/dist/data/generateMatchUps.d.ts +25 -0
- package/dist/helpers/createTypeAhead.d.ts +14 -0
- package/dist/helpers/drawStateManager.d.ts +91 -0
- package/dist/helpers/getAttr.d.ts +4 -0
- package/dist/helpers/typeOf.d.ts +4 -0
- package/dist/index.d.ts +80 -4006
- package/dist/styles/centerInfoStyle.d.ts +6 -0
- package/dist/styles/containerStyle.d.ts +1 -0
- package/dist/styles/flagStyle.d.ts +3 -0
- package/dist/styles/getChevronStyle.d.ts +4 -0
- package/dist/styles/getLinkStyle.d.ts +25 -0
- package/dist/styles/getMatchUpStyle.d.ts +4 -0
- package/dist/styles/getSelectedMatchUpStyle.d.ts +1 -0
- package/dist/styles/groupNameStyle.d.ts +1 -0
- package/dist/styles/groupSeparatorStyle.d.ts +4 -0
- package/dist/styles/matchUpContainerStyle.d.ts +1 -0
- package/dist/styles/participantDetailStyle.d.ts +1 -0
- package/dist/styles/participantStyle.d.ts +17 -0
- package/dist/styles/pillStyle.d.ts +3 -0
- package/dist/styles/resultStyles.d.ts +4 -0
- package/dist/styles/roundContainerStyle.d.ts +1 -0
- package/dist/styles/roundHeaderStyle.d.ts +1 -0
- package/dist/styles/roundStyle.d.ts +3 -0
- package/dist/styles/scaleStyle.d.ts +3 -0
- package/dist/styles/schedulingStyle.d.ts +1 -0
- package/dist/styles/scoreStyles.d.ts +9 -0
- package/dist/styles/scoreWrapperStyle.d.ts +4 -0
- package/dist/styles/seedStyle.d.ts +1 -0
- package/dist/styles/sideStyles.d.ts +3 -0
- package/dist/styles/structureStyle.d.ts +1 -0
- package/dist/styles/teamLogoStyle.d.ts +1 -0
- package/dist/styles/themes/australianTheme.d.ts +1 -0
- package/dist/styles/themes/basicCardTheme.d.ts +1 -0
- package/dist/styles/themes/basicTheme.d.ts +1 -0
- package/dist/styles/themes/createTheme.d.ts +5 -0
- package/dist/styles/themes/frenchTheme.d.ts +1 -0
- package/dist/styles/themes/index.d.ts +7 -0
- package/dist/styles/themes/itfTheme.d.ts +1 -0
- package/dist/styles/themes/usOpenTheme.d.ts +1 -0
- package/dist/styles/themes/wimbledonTheme.d.ts +1 -0
- package/dist/tools/freeScore/freeScore.d.ts +79 -0
- package/dist/types.d.ts +321 -0
- package/dist/utilities/isElement.d.ts +1 -0
- package/dist/validators/dateValidator.d.ts +1 -0
- package/dist/validators/emailValidator.d.ts +1 -0
- package/dist/validators/index.d.ts +7 -0
- package/dist/validators/nameValidator.d.ts +1 -0
- package/dist/validators/numericRange.d.ts +1 -0
- package/dist/validators/numericValidator.d.ts +1 -0
- package/dist/validators/passwordValidator.d.ts +1 -0
- package/dist/validators/wordValidator.d.ts +1 -0
- package/dist/version.d.ts +1 -0
- package/package.json +4 -4
|
@@ -12707,7 +12707,7 @@ function fh(e) {
|
|
|
12707
12707
|
}
|
|
12708
12708
|
var ph = {
|
|
12709
12709
|
name: "courthive-components",
|
|
12710
|
-
version: "1.1.
|
|
12710
|
+
version: "1.1.1",
|
|
12711
12711
|
engines: { node: ">=22" },
|
|
12712
12712
|
description: "Components for competitions projects",
|
|
12713
12713
|
files: ["dist"],
|
|
@@ -12768,8 +12768,8 @@ var ph = {
|
|
|
12768
12768
|
},
|
|
12769
12769
|
devDependencies: {
|
|
12770
12770
|
"@chromatic-com/storybook": "^5.0.0",
|
|
12771
|
-
"@commitlint/cli": "20.5.
|
|
12772
|
-
"@commitlint/config-conventional": "20.5.
|
|
12771
|
+
"@commitlint/cli": "20.5.3",
|
|
12772
|
+
"@commitlint/config-conventional": "20.5.3",
|
|
12773
12773
|
"@eslint/js": "^10.0.1",
|
|
12774
12774
|
"@fortawesome/fontawesome-free": "^7.2.0",
|
|
12775
12775
|
"@storybook/addon-docs": "^10.2.17",
|
|
@@ -12796,7 +12796,7 @@ var ph = {
|
|
|
12796
12796
|
"tabulator-tables": "6.4.0",
|
|
12797
12797
|
typescript: "^6.0.2",
|
|
12798
12798
|
vite: "8.0.10",
|
|
12799
|
-
"vite-plugin-dts": "^
|
|
12799
|
+
"vite-plugin-dts": "^5.0.0",
|
|
12800
12800
|
vitest: "^4.0.16"
|
|
12801
12801
|
},
|
|
12802
12802
|
dependencies: {
|
|
@@ -211,7 +211,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
211
211
|
`,`Instead, pass the .innerHTML of the element, or use a function that`,`returns a cloned version of the element instead.`,`
|
|
212
212
|
|
|
213
213
|
`,`1) content: element.innerHTML
|
|
214
|
-
`,`2) content: () => element.cloneNode(true)`].join(` `))}var s=i.reduce(function(e,t){var n=t&&mm(t,r);return n&&e.push(n),e},[]);return wp(e)?s[0]:s}hm.defaultProps=Qp,hm.setDefaultProps=em,hm.currentInput=Fp,Object.assign({},Od,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),hm.setDefaultProps({render:um});var gm=`#000000.#434343.#666666.#999999.#b7b7b7.#cccccc.#d9d9d9.#ffffff.#980000.#ff0000.#ff9900.#ffff00.#00ff00.#00ffff.#4a86e8.#0000ff.#9900ff.#ff00ff.#e6b8af.#f4cccc.#fce5cd.#fff2cc.#d9ead3.#d0e0e3.#c9daf8.#cfe2f3.#d9d2e9.#ead1dc`.split(`.`),_m=`notes-toolbar-recent-colors`,vm=8;function ym(){try{return JSON.parse(localStorage.getItem(_m)||`[]`)}catch{return[]}}function bm(e){let t=ym().filter(t=>t!==e);t.unshift(e),t.length>vm&&(t=t.slice(0,vm)),localStorage.setItem(_m,JSON.stringify(t))}function xm(e={}){let t=document.createElement(`div`);return t.className=`notes-toolbar`,t.appendChild(Em(e)),t.appendChild(Dm(e)),t.appendChild(Om(e)),t.appendChild(Mm(e)),t.appendChild(Fm(e)),t.appendChild(Im(e)),t.appendChild(Rm(e)),t}function Sm(e,t){for(let[n,r]of Object.entries(t)){let t=e.querySelector(`[data-action="${n}"]`);t&&t.classList.toggle(`is-active`,r)}}function Cm(e,t){let n=e.querySelector(`[data-action="heading"]`);n&&(n.value=t===!1?`0`:String(t))}function wm(){let e=document.createElement(`div`);return e.className=`notes-toolbar-group`,e}function Tm(e,t,n,r){let i=document.createElement(`button`);return i.className=`notes-toolbar-btn`,i.dataset.action=e,i.title=n,i.type=`button`,i.innerHTML=t,r&&i.addEventListener(`click`,r),i}function Em(e){let t=wm(),n=document.createElement(`select`);n.dataset.action=`heading`,n.title=`Text style`;for(let e of[{value:`0`,label:`Paragraph`},{value:`1`,label:`Heading 1`},{value:`2`,label:`Heading 2`},{value:`3`,label:`Heading 3`},{value:`4`,label:`Heading 4`},{value:`5`,label:`Heading 5`},{value:`6`,label:`Heading 6`}]){let t=document.createElement(`option`);t.value=e.value,t.textContent=e.label,n.appendChild(t)}return n.addEventListener(`change`,()=>{let t=parseInt(n.value,10);e.onHeading?.(t===0?!1:t)}),t.appendChild(n),t}function Dm(e){let t=wm();return t.appendChild(Tm(`bold`,`<b>B</b>`,`Bold`,e.onBold)),t.appendChild(Tm(`italic`,`<i>I</i>`,`Italic`,e.onItalic)),t.appendChild(Tm(`underline`,`<u>U</u>`,`Underline`,e.onUnderline)),t.appendChild(Tm(`strike`,`<s>S</s>`,`Strikethrough`,e.onStrike)),t}function Om(e){let t=wm();return t.appendChild(km(`color`,`A`,`Text color`,`#000000`,t=>{bm(t),e.onColor?.(t)})),t.appendChild(km(`background`,`A`,`Background color`,`#ffff00`,t=>{bm(t),e.onBackground?.(t)})),t}function km(e,t,n,r,i){let a=document.createElement(`button`);a.className=`notes-toolbar-btn notes-toolbar-color-btn`,a.dataset.action=e,a.title=n,a.type=`button`;let o=document.createElement(`span`);o.className=`notes-toolbar-color-letter`,o.textContent=t,a.appendChild(o);let s=document.createElement(`span`);s.className=`notes-toolbar-color-bar`,s.style.backgroundColor=r,a.appendChild(s);let c;return a.addEventListener(`click`,()=>{if(c){c.destroy(),c=void 0;return}c=hm(a,{content:Am(r,e=>{s.style.backgroundColor=e,i(e),c?.destroy(),c=void 0}),theme:`light-border`,trigger:`manual`,interactive:!0,placement:`bottom-start`,onHidden:()=>{c?.destroy(),c=void 0}}),c.show()}),a}function Am(e,t){let n=document.createElement(`div`);n.className=`notes-color-panel`;let r=document.createElement(`div`);r.className=`notes-color-swatches`;for(let n of gm)r.appendChild(jm(n,n===e,t));n.appendChild(r);let i=ym();if(i.length){let r=document.createElement(`div`);r.className=`notes-color-section-label`,r.textContent=`Recent`,n.appendChild(r);let a=document.createElement(`div`);a.className=`notes-color-swatches`;for(let n of i)a.appendChild(jm(n,n===e,t));n.appendChild(a)}let a=document.createElement(`div`);a.className=`notes-color-custom-row`;let o=document.createElement(`input`);o.type=`color`,o.value=e,o.className=`notes-color-custom-input`;let s=document.createElement(`label`);return s.className=`notes-color-custom-label`,s.textContent=`Custom...`,s.addEventListener(`click`,()=>o.click()),o.addEventListener(`input`,()=>t(o.value)),a.appendChild(o),a.appendChild(s),n.appendChild(a),n}function jm(e,t,n){let r=document.createElement(`button`);return r.type=`button`,r.className=`notes-color-swatch`,t&&r.classList.add(`is-selected`),r.style.backgroundColor=e,(e===`#ffffff`||e===`#fff`)&&(r.style.border=`1px solid var(--chc-border-secondary)`),r.title=e,r.addEventListener(`click`,()=>n(e)),r}function Mm(e){let t=wm();return t.appendChild(Tm(`orderedList`,Nm(16,16,`<path d="M3 2h12v2H3zm0 5h12v2H3zm0 5h12v2H3z" fill="currentColor"/><text x="0" y="4" font-size="3.5" fill="currentColor">1</text><text x="0" y="9" font-size="3.5" fill="currentColor">2</text><text x="0" y="14" font-size="3.5" fill="currentColor">3</text>`),`Ordered list`,e.onOrderedList)),t.appendChild(Tm(`bulletList`,Nm(16,16,`<circle cx="1.5" cy="3" r="1.5" fill="currentColor"/><circle cx="1.5" cy="8" r="1.5" fill="currentColor"/><circle cx="1.5" cy="13" r="1.5" fill="currentColor"/><path d="M5 2h10v2H5zm0 5h10v2H5zm0 5h10v2H5z" fill="currentColor"/>`),`Bullet list`,e.onBulletList)),t}function Nm(e,t,n){return`<svg width="${e}" height="${t}" viewBox="0 0 ${e} ${t}" xmlns="http://www.w3.org/2000/svg">${n}</svg>`}var Pm={alignLeft:Nm(16,16,`<path d="M1 2h14v2H1zm0 4h9v2H1zm0 4h14v2H1zm0 4h9v2H1z" fill="currentColor"/>`),alignCenter:Nm(16,16,`<path d="M1 2h14v2H1zm3.5 4h7v2h-7zM1 10h14v2H1zm3.5 4h7v2h-7z" fill="currentColor"/>`),alignRight:Nm(16,16,`<path d="M1 2h14v2H1zm6 4h8v2H7zM1 10h14v2H1zm6 4h8v2H7z" fill="currentColor"/>`),alignJustify:Nm(16,16,`<path d="M1 2h14v2H1zm0 4h14v2H1zm0 4h14v2H1zm0 4h14v2H1z" fill="currentColor"/>`)};function Fm(e){let t=wm();return t.appendChild(Tm(`alignLeft`,Pm.alignLeft,`Align left`,()=>e.onAlign?.(`left`))),t.appendChild(Tm(`alignCenter`,Pm.alignCenter,`Align center`,()=>e.onAlign?.(`center`))),t.appendChild(Tm(`alignRight`,Pm.alignRight,`Align right`,()=>e.onAlign?.(`right`))),t.appendChild(Tm(`alignJustify`,Pm.alignJustify,`Justify`,()=>e.onAlign?.(`justify`))),t}function Im(e){let t=wm();t.appendChild(Tm(`blockquote`,`“`,`Blockquote`,e.onBlockquote)),t.appendChild(Tm(`codeBlock`,`</>`,`Code block`,e.onCodeBlock));let n=Tm(`link`,`⇗`,`Insert link`);Lm(n,`Enter URL`,`https://`,t=>e.onLink?.(t)),t.appendChild(n);let r=Tm(`video`,`▷`,`Insert video`);return Lm(r,`YouTube URL`,`https://youtube.com/...`,t=>e.onVideo?.(t)),t.appendChild(r),t}function Lm(e,t,n,r){let i;e.addEventListener(`click`,()=>{if(i){i.destroy(),i=void 0;return}let a=document.createElement(`div`);a.className=`notes-url-panel`;let o=document.createElement(`div`);o.className=`notes-url-label`,o.textContent=t,a.appendChild(o);let s=document.createElement(`input`);s.type=`url`,s.className=`notes-url-input`,s.placeholder=n,a.appendChild(s);let c=document.createElement(`div`);c.className=`notes-url-actions`;let l=document.createElement(`button`);l.type=`button`,l.className=`button notes-url-cancel`,l.textContent=`Cancel`,l.addEventListener(`click`,()=>{i?.destroy(),i=void 0});let u=document.createElement(`button`);u.type=`button`,u.className=`button is-info notes-url-confirm`,u.textContent=`Insert`,u.addEventListener(`click`,()=>{let e=s.value.trim();e&&r(e),i?.destroy(),i=void 0}),c.appendChild(l),c.appendChild(u),a.appendChild(c),s.addEventListener(`keydown`,e=>{e.key===`Enter`?(e.preventDefault(),u.click()):e.key===`Escape`&&l.click()}),i=hm(e,{content:a,theme:`light-border`,trigger:`manual`,interactive:!0,placement:`bottom-start`,onShown:()=>setTimeout(()=>s.focus(),0),onHidden:()=>{i?.destroy(),i=void 0}}),i.show()})}function Rm(e){let t=wm();return t.appendChild(Tm(`clearFormatting`,`⊘`,`Clear formatting`,e.onClearFormatting)),t}function zm(e,t,n){if(!e)return{};let r=document.createElement(`aside`);r.classList.add(`menu`);let i={},a=e=>n&&e.close!==!1?t=>{t.stopPropagation(),n(),e.onClick()}:t=>{t.stopPropagation(),e.onClick()},o=0,s=()=>(o+=1,o),c=e=>e?.heading||e?.text||e?.label||`Item ${s()}`,l=e=>{let t=document.createElement(`li`);if(t.className=`font-medium`,e.style&&(t.style.cssText=e.style),e.onClick){let n=e.fontSize||`1em`;if(e.divider){let e=document.createElement(`hr`);e.classList.add(`dropdown-divider`),t.appendChild(e)}else{let r=document.createElement(`a`),i=e.disabled?`0.4`:`1`;r.style.cssText=`text-decoration: none; opacity: ${i}; font-size: ${n}`,e.class&&r.classList.add(e.class),e.color&&(r.style.color=e.color),e.heading&&(r.style.fontWeight=`bold`),e.disabled||(r.onclick=a(e)),r.innerHTML=c(e),t.appendChild(r)}}else t.innerHTML=c(e),e.disabled||(t.onclick=e.onClick);return t},u;for(let e of t||[])if(!e.hide){if(e.items){if(e.text){let t=document.createElement(`p`);t.className=`menu-label font-medium`,t.innerHTML=e.text,r.appendChild(t)}let t=document.createElement(`ul`);t.className=`menu-list`;for(let n of e.items)n.hide||t.appendChild(l(n));r.appendChild(t)}else if(e.type===`input`){let{field:t,inputElement:n}=un(e);e.focus&&(u=n),i[e.field]=n,r.appendChild(t)}else if(e.type===`divider`){let e=document.createElement(`hr`);e.classList.add(`dropdown-divider`),r.appendChild(e)}}return e.appendChild(r),{focusElement:u}}function Bm(e){return typeof e==`function`}var Vm;function Hm(e){Vm&&=(Vm?.destroy(!0),void 0),e?.remove&&e.remove()}function Um(e){let{title:t,options:n,menuItems:r=[],coords:i,callback:a,config:o}=e,{target:s,items:c}=e;if(!n?.length&&!c?.length&&!r)return;Hm();let l=document.createElement(`div`),u;return s||=i?.evt?.target,s&&(Vm=hm(s,{content:()=>(c=c?.filter(e=>!e.hide&&!e.disabled).map(e=>({...e,onClick:()=>{Hm(l),Bm(e.onClick)&&e.onClick()}}))||n?.filter(e=>!e.hide&&!e.disabled).map(e=>({text:typeof e==`object`?e.option:e,style:e.style,onClick:()=>{e.subMenu?Vm.setContent(`IMPLEMENT SUB MENU`):Bm(e.onClick)?(Hm(l),e.onClick()):Bm(a)&&a&&(Hm(l),a(typeof e==`object`?{...e,coords:i}:e))}})),u=zm(l,[{text:t,items:c},...r]).focusElement,l),theme:`light-border`,trigger:`click`,onShown:()=>{u&&setTimeout(()=>u?.focus(),0)},...o}),Vm.show(),Vm.setProps({interactive:!0})),Vm}var Y=`court-line`;function X(e,t){let n=document.createElementNS(`http://www.w3.org/2000/svg`,e);for(let[e,r]of Object.entries(t))n.setAttribute(e,r);return n}function Wm(e,t){let n=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);return n.setAttribute(`viewBox`,e),n.setAttribute(`class`,t),n.setAttribute(`fill`,`none`),n.style.width=`100%`,n.style.height=`auto`,n.style.display=`block`,n}function Gm(e){let t=Wm(`0 0 360 780`,e);for(let e of[`M 0 0 L 360 0 L 360 780 L 0 780 Z`,`M 45 0 L 45 780`,`M 315 0 L 315 780`,`M 0 390 L 360 390`,`M 45 210 L 315 210`,`M 45 570 L 315 570`,`M 180 210 L 180 570`,`M 180 0 L 180 20`,`M 180 760 L 180 780`])t.appendChild(X(`path`,{d:e,class:Y}));return t}function Km(e){let t=Wm(`0 0 500 470`,e),n=[X(`rect`,{x:`0`,y:`0`,width:`500`,height:`470`,class:Y}),X(`circle`,{cx:`250`,cy:`470`,r:`60`,class:Y}),X(`line`,{x1:`0`,y1:`470`,x2:`500`,y2:`470`,class:Y}),X(`rect`,{x:`170`,y:`0`,width:`160`,height:`190`,class:Y}),X(`circle`,{cx:`250`,cy:`190`,r:`60`,class:Y}),X(`line`,{x1:`220`,y1:`40`,x2:`280`,y2:`40`,class:Y}),X(`circle`,{cx:`250`,cy:`52`,r:`12`,class:Y}),X(`path`,{d:`M 30 0 L 30 90 A 220 220 0 0 0 470 90 L 470 0`,class:Y})];for(let e of n)t.appendChild(e);return t}function qm(e){let t=Wm(`0 0 500 440`,e),n=[X(`path`,{d:`M 20 170 A 350 400 0 0 1 480 170`,class:Y}),X(`line`,{x1:`250`,y1:`400`,x2:`20`,y2:`170`,class:Y}),X(`line`,{x1:`250`,y1:`400`,x2:`480`,y2:`170`,class:Y}),X(`path`,{d:`M 250 400 L 314 336 L 250 273 L 186 336 Z`,class:Y}),X(`path`,{d:`M 340 355 A 100 100 0 0 1 160 355`,class:Y}),X(`line`,{x1:`340`,y1:`355`,x2:`265`,y2:`405`,class:Y}),X(`line`,{x1:`160`,y1:`355`,x2:`235`,y2:`405`,class:Y}),X(`path`,{d:`M 235 405 A 18 18 0 0 1 265 405`,class:Y}),X(`circle`,{cx:`250`,cy:`340`,r:`9`,class:Y}),X(`line`,{x1:`247`,y1:`339`,x2:`253`,y2:`339`,class:Y}),X(`path`,{d:`M 244 398 L 244 404 L 250 408 L 256 404 L 256 398 Z`,class:Y}),X(`rect`,{x:`310`,y:`332`,width:`8`,height:`8`,transform:`rotate(45 314 336)`,class:Y}),X(`rect`,{x:`246`,y:`269`,width:`8`,height:`8`,transform:`rotate(45 250 273)`,class:Y}),X(`rect`,{x:`182`,y:`332`,width:`8`,height:`8`,transform:`rotate(45 186 336)`,class:Y}),X(`rect`,{x:`230`,y:`393`,width:`8`,height:`18`,class:Y}),X(`rect`,{x:`262`,y:`393`,width:`8`,height:`18`,class:Y})];for(let e of n)t.appendChild(e);return t}function Jm(e){let t=Wm(`0 0 850 2000`,e),n=[X(`rect`,{x:`0`,y:`0`,width:`850`,height:`2000`,rx:`280`,ry:`280`,class:Y}),X(`line`,{x1:`0`,y1:`1000`,x2:`850`,y2:`1000`,class:Y}),X(`circle`,{cx:`425`,cy:`1000`,r:`60`,class:Y}),X(`line`,{x1:`0`,y1:`650`,x2:`850`,y2:`650`,class:Y}),X(`line`,{x1:`0`,y1:`1350`,x2:`850`,y2:`1350`,class:Y}),X(`line`,{x1:`140`,y1:`300`,x2:`710`,y2:`300`,class:Y}),X(`line`,{x1:`140`,y1:`1700`,x2:`710`,y2:`1700`,class:Y}),X(`path`,{d:`M 395 300 A 40 40 0 0 1 455 300`,class:Y}),X(`path`,{d:`M 395 1700 A 40 40 0 0 0 455 1700`,class:Y}),X(`circle`,{cx:`270`,cy:`650`,r:`50`,class:Y}),X(`circle`,{cx:`580`,cy:`650`,r:`50`,class:Y}),X(`circle`,{cx:`270`,cy:`1350`,r:`50`,class:Y}),X(`circle`,{cx:`580`,cy:`1350`,r:`50`,class:Y})];for(let e of n)t.appendChild(e);return t}function Ym(e){let t=Wm(`0 0 200 440`,e);for(let e of[`M 0 0 L 200 0 L 200 440 L 0 440 Z`,`M 0 220 L 200 220`,`M 0 150 L 200 150`,`M 0 290 L 200 290`,`M 100 0 L 100 150`,`M 100 290 L 100 440`])t.appendChild(X(`path`,{d:e,class:Y}));return t}function Xm(e){let t=Wm(`0 0 200 440`,e);for(let e of[`M 0 0 L 200 0 L 200 440 L 0 440 Z`,`M 18 0 L 18 440`,`M 182 0 L 182 440`,`M 0 220 L 200 220`,`M 0 146 L 200 146`,`M 0 294 L 200 294`,`M 0 30 L 200 30`,`M 0 410 L 200 410`,`M 100 146 L 100 220`,`M 100 220 L 100 294`])t.appendChild(X(`path`,{d:e,class:Y}));return t}function Zm(e){let t=Wm(`0 0 100 200`,e);for(let e of[`M 0 0 L 100 0 L 100 200 L 0 200 Z`,`M 0 100 L 100 100`,`M 0 69.5 L 100 69.5`,`M 0 130.5 L 100 130.5`,`M 50 69.5 L 50 67.5`,`M 50 130.5 L 50 132.5`])t.appendChild(X(`path`,{d:e,class:Y}));return t}var Qm={name:`courthive-components`,version:`1.1.0`,engines:{node:`>=22`},description:`Components for competitions projects`,files:[`dist`],main:`./dist/courthive-components.umd.js`,module:`./dist/courthive-components.es.js`,types:`./dist/index.d.ts`,exports:{".":{types:`./dist/index.d.ts`,import:`./dist/courthive-components.es.js`,require:`./dist/courthive-components.umd.js`},"./dist/*":`./dist/*`},repository:{type:`git`,url:`git+https://github.com/CourtHive/courthive-components.git`},keywords:[`tournament`,`match`,`score`,`vanillajs`,`bracket`],author:`Charles Allen`,license:`MIT`,bugs:{url:`https://github.com/CourtHive/courthive-components/issues`},homepage:`https://courthive.github.io/courthive-component`,scripts:{commits:`git log $(git describe --tags --abbrev=0)..HEAD --oneline --no-merges --pretty=format:'%s: %h' | sed '/courthive-components/d'`,release:`npm run release:patch`,test:`vitest run`,"test:watch":`vitest`,"test:ui":`vitest --ui`,dev:`vite`,build:`vite build`,prepublishOnly:`npm run build`,preview:`vite preview`,storybook:`storybook dev -p 6006`,"build-storybook":`storybook build`,"deploy-storybook":`gh-pages -d storybook-static`,"pre-commit":`lint-staged`,predeploy:`npm run build-storybook`,prebuild:`rm -rf dist/*`,lint:`eslint src --fix --cache`,"lint:report":`eslint src & eslint --cache src -f json > eslint-report.json`,format:`prettier --write src`,"release:major":`npm run commits && npm version $(semver $npm_package_version -i major) && git push && git push --tags`,"release:minor":`npm run commits && npm version $(semver $npm_package_version -i minor) && git push && git push --tags`,"release:patch":`npm run commits && npm version $(semver $npm_package_version -i patch) && git push && git push --tags`,"release:beta":`npm run commits && npm version $(semver $npm_package_version -i prerelease --preid beta) && git push && git push --tags`,"patch:beta":`npm run commits && npm version $(semver $npm_package_version -i prerelease --preid beta) && npm publish --tag beta`},"lint-staged":{"*.{js,ts}":`eslint --cache --fix`,"*":`prettier --ignore-unknown --write`},devDependencies:{"@chromatic-com/storybook":`^5.0.0`,"@commitlint/cli":`20.5.2`,"@commitlint/config-conventional":`20.5.0`,"@eslint/js":`^10.0.1`,"@fortawesome/fontawesome-free":`^7.2.0`,"@storybook/addon-docs":`^10.2.17`,"@storybook/html-vite":`^10.2.17`,"@storybook/test-runner":`^0.24.0`,"@types/d3":`^7.4.3`,"@types/vanillajs-datepicker":`^1.3.5`,"@typescript-eslint/eslint-plugin":`8.59.1`,"@typescript-eslint/parser":`8.59.1`,"@vitest/browser-playwright":`^4.0.16`,"@vitest/coverage-v8":`^4.0.16`,eslint:`10.2.1`,"eslint-plugin-sonarjs":`4.0.3`,"eslint-plugin-storybook":`^10.2.17`,"gh-pages":`6.3.0`,globals:`^17.3.0`,"happy-dom":`^20.8.3`,husky:`9.1.7`,"lint-staged":`16.4.0`,playwright:`^1.57.0`,prettier:`^3.8.1`,semver:`7.7.4`,storybook:`^10.2.17`,"tabulator-tables":`6.4.0`,typescript:`^6.0.2`,vite:`8.0.10`,"vite-plugin-dts":`^4.5.4`,vitest:`^4.0.16`},dependencies:{awesomplete:`1.1.7`,"class-variance-authority":`0.7.1`,classnames:`2.5.1`,d3:`^7.9.0`,dayjs:`1.11.20`,"focus-trap":`^8.0.0`,"timepicker-ui":`^4.1.2`,"tippy.js":`6.3.7`,"tods-competition-factory":`^3.1.3`,"vanillajs-datepicker":`1.3.4`}};function $m(){return Qm.version}var eh={SET3_S6_TB7:`SET3-S:6/TB7`,SET3_S6_TB7_F_TB10:`SET3-S:6/TB7-F:TB10`,SET3_S6_TB10:`SET3-S:6/TB10`,SET3_S6_F_TB10:`SET3-S:6-F:TB10`,SET3_S6_TB7_NOAD:`SET3-S:6/TB7NOAD`,SET3_S8_TB7:`SET3-S:8/TB7`,SET3_S8_TB7_AT7:`SET3-S:8/TB7@7`,SET3_S4_TB7:`SET3-S:4/TB7`,SET3_S4_TB7_F_TB10:`SET3-S:4/TB7-F:TB10`,SET3_S4_TB5_AT3_F_TB10:`SET3-S:4/TB5@3-F:TB10`,SET5_S6_TB7:`SET5-S:6/TB7`,SET5_S6_TB7_F_TB10:`SET5-S:6/TB7-F:TB10`,SET1_S6_TB7:`SET1-S:6/TB7`,SET1_S6_TB10:`SET1-S:6/TB10`,SET1_S6_TB7_AT5:`SET1-S:6/TB7@5`,SET1_S8_TB7:`SET1-S:8/TB7`,SET1_S4_TB7:`SET1-S:4/TB7`,SET1_S5_TB9_AT4:`SET1-S:5/TB9@4`,SET1_S_TB7:`SET1-S:T7`,SET1_S_TB10:`SET1-S:TB10`,SET1_S_TB21:`SET1-S:T21`,SET1_S8:`SET1-S:8`,SET1_S10:`SET1-S:10`,FAST4:`SET5-S:4/NOAD`,SET3X_T10A_TB1:`SET3XA-S:T10-F:TB1`,SET3X_T10A_TB1_NOAD:`SET3XA-S:T10-F:TB1NOAD`,SET4X_T10A_TB1:`SET4XA-S:T10-F:TB1`};function th(e,t,n){if(!e)return{elements:{}};let r={};for(let i of t||[]){if(!i?.label||i.hide)continue;let t=document.createElement(`button`);i.id&&(r[i.id]=t,t.id=i.id),t.style.marginRight=`.5em`,t.className=`button font-medium`,i.intent&&t.classList.add(i.intent),t.innerHTML=i.label,i.disabled&&(t.disabled=!0),t.onclick=e=>{e.stopPropagation(),!e.target.disabled&&z(i.onClick)&&i.onClick(),n&&z(n)&&n()},e.appendChild(t)}return{elements:r}}var nh=(e,t)=>n=>n?.trim().length>=e&&(!t||n?.trim().length<=t);function rh(e){return t.tools.isConvertableInteger(e)&&parseInt(e.toString())>=0}var ih=(e,t)=>n=>rh(n)&&Number(n)>=e&&Number(n)<=t,ah=e=>/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?\d)(?=.*?[#?!@$%^&*-]).{8,12}$/.test(e);function oh(e){return t.tools.dateTime.dateValidation.test(e)}var sh=(e,t)=>n=>{let r=(n||``).trim().split(` `).length;return r>=e&&(!t||r<=t)},ch=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,lh=e=>ch.exec(e),uh=u({dateValidator:()=>oh,emailValidator:()=>lh,nameValidator:()=>nh,numericRange:()=>ih,numericValidator:()=>rh,passwordValidator:()=>ah,wordValidator:()=>sh}),dh=class{constructor({tournamentRecord:e,drawId:n,structureId:r,eventId:i}){this.tournamentRecord=e,this.drawId=n,this.structureId=r,this.eventId=i||e.events?.[0]?.eventId,t.tournamentEngine.setState(e)}setRenderCallback(e){this.renderCallback=e}getDrawEntryParticipantIds(){let{event:e,drawDefinition:n}=t.tournamentEngine.getEvent({drawId:this.drawId})||{};if(!e)return[];let{flightProfile:r}=t.tournamentEngine.getFlightProfile({eventId:this.eventId})||{};return(r?.flights?.find(e=>e.drawId===this.drawId)?.drawEntries||n?.entries||[]).map(e=>e.participantId).filter(Boolean)}getAllParticipants(){t.tournamentEngine.setState(this.tournamentRecord);let e=this.getDrawEntryParticipantIds();if(!e.length)return[];let{participants:n=[]}=t.tournamentEngine.getParticipants({participantFilters:{participantIds:e}})||{};return n.map(e=>({participantId:e.participantId,participantName:e.participantName,participantType:e.participantType,person:e.person,individualParticipants:e.individualParticipants}))}getAvailableParticipants(){t.tournamentEngine.setState(this.tournamentRecord);let e=this.getAllParticipants(),{assignedParticipantIds:n=[]}=t.tournamentEngine.getAssignedParticipantIds({drawId:this.drawId})||{};return e.filter(e=>!n.includes(e.participantId))}removeAssignment({drawPosition:e}){t.tournamentEngine.setState(this.tournamentRecord);let n=this.getMatchUps().find(t=>t.sides?.some(t=>t.drawPosition===e))?.sides?.find(t=>t.drawPosition===e)?.bye===!0,r=t.tournamentEngine.removeDrawPositionAssignment({drawId:this.drawId,structureId:this.structureId,drawPosition:e});if(r.error)return{success:!1,error:r.error};let{tournamentRecord:i}=t.tournamentEngine.getState()||{};return this.tournamentRecord=i,n&&this.renderCallback&&this.renderCallback(),{success:!0}}assignParticipant({drawPosition:e,participantId:n}){t.tournamentEngine.setState(this.tournamentRecord);let r=t.tournamentEngine.assignDrawPosition({drawId:this.drawId,structureId:this.structureId,drawPosition:e,participantId:n});if(r.error)return{success:!1,error:r.error};let{tournamentRecord:i}=t.tournamentEngine.getState()||{};return this.tournamentRecord=i,this.focusDrawPosition=e+1,this.renderCallback&&this.renderCallback(),{success:!0}}getAndClearFocusDrawPosition(){let e=this.focusDrawPosition;return this.focusDrawPosition=void 0,e}assignBye({drawPosition:e}){t.tournamentEngine.setState(this.tournamentRecord);let n=t.tournamentEngine.assignDrawPositionBye({drawId:this.drawId,structureId:this.structureId,drawPosition:e});if(n.error)return{success:!1,error:n.error};let{tournamentRecord:r}=t.tournamentEngine.getState()||{};return this.tournamentRecord=r,this.focusDrawPosition=e+1,this.renderCallback&&this.renderCallback(),{success:!0}}assignQualifier({drawPosition:e}){t.tournamentEngine.setState(this.tournamentRecord);let n=t.tournamentEngine.assignDrawPosition({drawId:this.drawId,structureId:this.structureId,drawPosition:e,qualifier:!0});if(n.error)return{success:!1,error:n.error};let{tournamentRecord:r}=t.tournamentEngine.getState()||{};return this.tournamentRecord=r,this.focusDrawPosition=e+1,this.renderCallback&&this.renderCallback(),{success:!0}}getMatchUps(){t.tournamentEngine.setState(this.tournamentRecord);let{eventData:e}=t.tournamentEngine.getEventData({eventId:this.eventId})||{},n=(e?.drawsData?.find(e=>e.drawId===this.drawId))?.structures?.find(e=>e.structureId===this.structureId)?.roundMatchUps;return n?Object.values(n).flat():[]}getState(){return this.tournamentRecord}getContext(){return{drawId:this.drawId,structureId:this.structureId}}};function fh(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ph(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function mh(e){let t,n,r;e.length===2?(t=e===fh||e===ph?e:hh,n=e,r=e):(t=fh,n=(t,n)=>fh(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function hh(){return 0}function gh(e){return e===null?NaN:+e}var _h=mh(fh),vh=_h.right;_h.left,mh(gh).center;var yh=Math.sqrt(50),bh=Math.sqrt(10),xh=Math.sqrt(2);function Sh(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=yh?10:a>=bh?5:a>=xh?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?Sh(e,t,n*2):[s,c,l]}function Ch(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?Sh(t,e,n):Sh(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function wh(e,t,n){return t=+t,e=+e,n=+n,Sh(e,t,n)[2]}function Th(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?wh(t,e,n):wh(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Eh(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}var Dh={value:()=>{}};function Oh(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new kh(n)}function kh(e){this._=e}function Ah(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}kh.prototype=Oh.prototype={constructor:kh,on:function(e,t){var n=this._,r=Ah(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=jh(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=Mh(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Mh(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new kh(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function jh(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Mh(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Dh,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Nh={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function Ph(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),Nh.hasOwnProperty(t)?{space:Nh[t],local:e}:e}function Fh(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function Ih(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Lh(e){var t=Ph(e);return(t.local?Ih:Fh)(t)}function Rh(){}function zh(e){return e==null?Rh:function(){return this.querySelector(e)}}function Bh(e){typeof e!=`function`&&(e=zh(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new O_(r,this._parents)}function Vh(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Hh(){return[]}function Uh(e){return e==null?Hh:function(){return this.querySelectorAll(e)}}function Wh(e){return function(){return Vh(e.apply(this,arguments))}}function Gh(e){e=typeof e==`function`?Wh(e):Uh(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new O_(r,i)}function Kh(e){return function(){return this.matches(e)}}function qh(e){return function(t){return t.matches(e)}}var Jh=Array.prototype.find;function Yh(e){return function(){return Jh.call(this.children,e)}}function Xh(){return this.firstElementChild}function Zh(e){return this.select(e==null?Xh:Yh(typeof e==`function`?e:qh(e)))}var Qh=Array.prototype.filter;function $h(){return Array.from(this.children)}function eg(e){return function(){return Qh.call(this.children,e)}}function tg(e){return this.selectAll(e==null?$h:eg(typeof e==`function`?e:qh(e)))}function ng(e){typeof e!=`function`&&(e=Kh(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new O_(r,this._parents)}function rg(e){return Array(e.length)}function ig(){return new O_(this._enter||this._groups.map(rg),this._parents)}function ag(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ag.prototype={constructor:ag,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function og(e){return function(){return e}}function sg(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new ag(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function cg(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new ag(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function lg(e){return e.__data__}function ug(e,t){if(!arguments.length)return Array.from(this,lg);var n=t?cg:sg,r=this._parents,i=this._groups;typeof e!=`function`&&(e=og(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=dg(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new O_(o,r),o._enter=s,o._exit=c,o}function dg(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function fg(){return new O_(this._exit||this._groups.map(rg),this._parents)}function pg(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function mg(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new O_(s,this._parents)}function hg(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function gg(e){e||=_g;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new O_(i,this._parents).order()}function _g(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function vg(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function yg(){return Array.from(this)}function bg(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function xg(){let e=0;for(let t of this)++e;return e}function Sg(){return!this.node()}function Cg(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function wg(e){return function(){this.removeAttribute(e)}}function Tg(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Eg(e,t){return function(){this.setAttribute(e,t)}}function Dg(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Og(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function kg(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Ag(e,t){var n=Ph(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Tg:wg:typeof t==`function`?n.local?kg:Og:n.local?Dg:Eg)(n,t))}function jg(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Mg(e){return function(){this.style.removeProperty(e)}}function Ng(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Pg(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Fg(e,t,n){return arguments.length>1?this.each((t==null?Mg:typeof t==`function`?Pg:Ng)(e,t,n??``)):Ig(this.node(),e)}function Ig(e,t){return e.style.getPropertyValue(t)||jg(e).getComputedStyle(e,null).getPropertyValue(t)}function Lg(e){return function(){delete this[e]}}function Rg(e,t){return function(){this[e]=t}}function zg(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Bg(e,t){return arguments.length>1?this.each((t==null?Lg:typeof t==`function`?zg:Rg)(e,t)):this.node()[e]}function Vg(e){return e.trim().split(/^|\s+/)}function Hg(e){return e.classList||new Ug(e)}function Ug(e){this._node=e,this._names=Vg(e.getAttribute(`class`)||``)}Ug.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function Wg(e,t){for(var n=Hg(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Gg(e,t){for(var n=Hg(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Kg(e){return function(){Wg(this,e)}}function qg(e){return function(){Gg(this,e)}}function Jg(e,t){return function(){(t.apply(this,arguments)?Wg:Gg)(this,e)}}function Yg(e,t){var n=Vg(e+``);if(arguments.length<2){for(var r=Hg(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?Jg:t?Kg:qg)(n,t))}function Xg(){this.textContent=``}function Zg(e){return function(){this.textContent=e}}function Qg(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function $g(e){return arguments.length?this.each(e==null?Xg:(typeof e==`function`?Qg:Zg)(e)):this.node().textContent}function e_(){this.innerHTML=``}function t_(e){return function(){this.innerHTML=e}}function n_(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function r_(e){return arguments.length?this.each(e==null?e_:(typeof e==`function`?n_:t_)(e)):this.node().innerHTML}function i_(){this.nextSibling&&this.parentNode.appendChild(this)}function a_(){return this.each(i_)}function o_(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function s_(){return this.each(o_)}function c_(e){var t=typeof e==`function`?e:Lh(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function l_(){return null}function u_(e,t){var n=typeof e==`function`?e:Lh(e),r=t==null?l_:typeof t==`function`?t:zh(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function d_(){var e=this.parentNode;e&&e.removeChild(this)}function f_(){return this.each(d_)}function p_(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function m_(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function h_(e){return this.select(e?m_:p_)}function g_(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function __(e){return function(t){e.call(this,t,this.__data__)}}function v_(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function y_(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function b_(e,t,n){return function(){var r=this.__on,i,a=__(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function x_(e,t,n){var r=v_(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?b_:y_,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function S_(e,t,n){var r=jg(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function C_(e,t){return function(){return S_(this,e,t)}}function w_(e,t){return function(){return S_(this,e,t.apply(this,arguments))}}function T_(e,t){return this.each((typeof t==`function`?w_:C_)(e,t))}function*E_(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var D_=[null];function O_(e,t){this._groups=e,this._parents=t}function k_(){return new O_([[document.documentElement]],D_)}function A_(){return this}O_.prototype=k_.prototype={constructor:O_,select:Bh,selectAll:Gh,selectChild:Zh,selectChildren:tg,filter:ng,data:ug,enter:ig,exit:fg,join:pg,merge:mg,selection:A_,order:hg,sort:gg,call:vg,nodes:yg,node:bg,size:xg,empty:Sg,each:Cg,attr:Ag,style:Fg,property:Bg,classed:Yg,text:$g,html:r_,raise:a_,lower:s_,append:c_,insert:u_,remove:f_,clone:h_,datum:g_,on:x_,dispatch:T_,[Symbol.iterator]:E_};function j_(e){return typeof e==`string`?new O_([[document.querySelector(e)]],[document.documentElement]):new O_([[e]],D_)}function M_(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function N_(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function P_(){}var F_=.7,I_=1/F_,L_=`\\s*([+-]?\\d+)\\s*`,R_=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,z_=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,B_=/^#([0-9a-f]{3,8})$/,V_=RegExp(`^rgb\\(${L_},${L_},${L_}\\)$`),H_=RegExp(`^rgb\\(${z_},${z_},${z_}\\)$`),U_=RegExp(`^rgba\\(${L_},${L_},${L_},${R_}\\)$`),W_=RegExp(`^rgba\\(${z_},${z_},${z_},${R_}\\)$`),G_=RegExp(`^hsl\\(${R_},${z_},${z_}\\)$`),K_=RegExp(`^hsla\\(${R_},${z_},${z_},${R_}\\)$`),q_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};M_(P_,Q_,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:J_,formatHex:J_,formatHex8:Y_,formatHsl:X_,formatRgb:Z_,toString:Z_});function J_(){return this.rgb().formatHex()}function Y_(){return this.rgb().formatHex8()}function X_(){return dv(this).formatHsl()}function Z_(){return this.rgb().formatRgb()}function Q_(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=B_.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?$_(t):n===3?new rv(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ev(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ev(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=V_.exec(e))?new rv(t[1],t[2],t[3],1):(t=H_.exec(e))?new rv(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=U_.exec(e))?ev(t[1],t[2],t[3],t[4]):(t=W_.exec(e))?ev(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=G_.exec(e))?uv(t[1],t[2]/100,t[3]/100,1):(t=K_.exec(e))?uv(t[1],t[2]/100,t[3]/100,t[4]):q_.hasOwnProperty(e)?$_(q_[e]):e===`transparent`?new rv(NaN,NaN,NaN,0):null}function $_(e){return new rv(e>>16&255,e>>8&255,e&255,1)}function ev(e,t,n,r){return r<=0&&(e=t=n=NaN),new rv(e,t,n,r)}function tv(e){return e instanceof P_||(e=Q_(e)),e?(e=e.rgb(),new rv(e.r,e.g,e.b,e.opacity)):new rv}function nv(e,t,n,r){return arguments.length===1?tv(e):new rv(e,t,n,r??1)}function rv(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}M_(rv,nv,N_(P_,{brighter(e){return e=e==null?I_:I_**+e,new rv(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?F_:F_**+e,new rv(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new rv(cv(this.r),cv(this.g),cv(this.b),sv(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:iv,formatHex:iv,formatHex8:av,formatRgb:ov,toString:ov}));function iv(){return`#${lv(this.r)}${lv(this.g)}${lv(this.b)}`}function av(){return`#${lv(this.r)}${lv(this.g)}${lv(this.b)}${lv((isNaN(this.opacity)?1:this.opacity)*255)}`}function ov(){let e=sv(this.opacity);return`${e===1?`rgb(`:`rgba(`}${cv(this.r)}, ${cv(this.g)}, ${cv(this.b)}${e===1?`)`:`, ${e})`}`}function sv(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function cv(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function lv(e){return e=cv(e),(e<16?`0`:``)+e.toString(16)}function uv(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new pv(e,t,n,r)}function dv(e){if(e instanceof pv)return new pv(e.h,e.s,e.l,e.opacity);if(e instanceof P_||(e=Q_(e)),!e)return new pv;if(e instanceof pv)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new pv(o,s,c,e.opacity)}function fv(e,t,n,r){return arguments.length===1?dv(e):new pv(e,t,n,r??1)}function pv(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}M_(pv,fv,N_(P_,{brighter(e){return e=e==null?I_:I_**+e,new pv(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?F_:F_**+e,new pv(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new rv(gv(e>=240?e-240:e+120,i,r),gv(e,i,r),gv(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new pv(mv(this.h),hv(this.s),hv(this.l),sv(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=sv(this.opacity);return`${e===1?`hsl(`:`hsla(`}${mv(this.h)}, ${hv(this.s)*100}%, ${hv(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function mv(e){return e=(e||0)%360,e<0?e+360:e}function hv(e){return Math.max(0,Math.min(1,e||0))}function gv(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var _v=e=>()=>e;function vv(e,t){return function(n){return e+n*t}}function yv(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function bv(e){return(e=+e)==1?xv:function(t,n){return n-t?yv(t,n,e):_v(isNaN(t)?n:t)}}function xv(e,t){var n=t-e;return n?vv(e,n):_v(isNaN(e)?t:e)}var Sv=(function e(t){var n=bv(t);function r(e,t){var r=n((e=nv(e)).r,(t=nv(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=xv(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function Cv(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function wv(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Tv(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=Pv(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function Ev(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Dv(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Ov(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=Pv(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var kv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Av=new RegExp(kv.source,`g`);function jv(e){return function(){return e}}function Mv(e){return function(t){return e(t)+``}}function Nv(e,t){var n=kv.lastIndex=Av.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=kv.exec(e))&&(i=Av.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Dv(r,i)})),n=Av.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?Mv(c[0].x):jv(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function Pv(e,t){var n=typeof t,r;return t==null||n===`boolean`?_v(t):(n===`number`?Dv:n===`string`?(r=Q_(t))?(t=r,Sv):Nv:t instanceof Q_?Sv:t instanceof Date?Ev:wv(t)?Cv:Array.isArray(t)?Tv:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?Ov:Dv)(e,t)}function Fv(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Iv=180/Math.PI,Lv={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Rv(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Iv,skewX:Math.atan(c)*Iv,scaleX:o,scaleY:s}}var zv;function Bv(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Lv:Rv(t.a,t.b,t.c,t.d,t.e,t.f)}function Vv(e){return e==null||(zv||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),zv.setAttribute(`transform`,e),!(e=zv.transform.baseVal.consolidate()))?Lv:(e=e.matrix,Rv(e.a,e.b,e.c,e.d,e.e,e.f))}function Hv(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:Dv(e,i)},{i:c-2,x:Dv(r,a)})}else (i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:Dv(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:Dv(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:Dv(e,n)},{i:s-2,x:Dv(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Uv=Hv(Bv,`px, `,`px)`,`deg)`),Wv=Hv(Vv,`, `,`)`,`)`),Gv=0,Kv=0,qv=0,Jv=1e3,Yv,Xv,Zv=0,Qv=0,$v=0,ey=typeof performance==`object`&&performance.now?performance:Date,ty=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ny(){return Qv||=(ty(ry),ey.now()+$v)}function ry(){Qv=0}function iy(){this._call=this._time=this._next=null}iy.prototype=ay.prototype={constructor:iy,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?ny():+n)+(t==null?0:+t),!this._next&&Xv!==this&&(Xv?Xv._next=this:Yv=this,Xv=this),this._call=e,this._time=n,uy()},stop:function(){this._call&&(this._call=null,this._time=1/0,uy())}};function ay(e,t,n){var r=new iy;return r.restart(e,t,n),r}function oy(){ny(),++Gv;for(var e=Yv,t;e;)(t=Qv-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Gv}function sy(){Qv=(Zv=ey.now())+$v,Gv=Kv=0;try{oy()}finally{Gv=0,ly(),Qv=0}}function cy(){var e=ey.now(),t=e-Zv;t>Jv&&($v-=t,Zv=e)}function ly(){for(var e,t=Yv,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Yv=n);Xv=e,uy(r)}function uy(e){Gv||(Kv&&=clearTimeout(Kv),e-Qv>24?(e<1/0&&(Kv=setTimeout(sy,e-ey.now()-$v)),qv&&=clearInterval(qv)):(qv||=(Zv=ey.now(),setInterval(cy,Jv)),Gv=1,ty(sy)))}function dy(e,t,n){var r=new iy;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var fy=Oh(`start`,`end`,`cancel`,`interrupt`),py=[];function my(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;vy(e,n,{name:t,index:r,group:i,on:fy,tween:py,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function hy(e,t){var n=_y(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function gy(e,t){var n=_y(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function _y(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function vy(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=ay(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return dy(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(dy(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function yy(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function by(e){return this.each(function(){yy(this,e)})}function xy(e,t){var n,r;return function(){var i=gy(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Sy(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=gy(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function Cy(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=_y(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?xy:Sy)(n,e,t))}function wy(e,t,n){var r=e._id;return e.each(function(){var e=gy(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return _y(e,r).value[t]}}function Ty(e,t){var n;return(typeof t==`number`?Dv:t instanceof Q_?Sv:(n=Q_(t))?(t=n,Sv):Nv)(e,t)}function Ey(e){return function(){this.removeAttribute(e)}}function Dy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Oy(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function ky(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function Ay(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function jy(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function My(e,t){var n=Ph(e),r=n===`transform`?Wv:Ty;return this.attrTween(e,typeof t==`function`?(n.local?jy:Ay)(n,r,wy(this,`attr.`+e,t)):t==null?(n.local?Dy:Ey)(n):(n.local?ky:Oy)(n,r,t))}function Ny(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Py(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Fy(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Py(e,i)),n}return i._value=t,i}function Iy(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Ny(e,i)),n}return i._value=t,i}function Ly(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=Ph(e);return this.tween(n,(r.local?Fy:Iy)(r,t))}function Ry(e,t){return function(){hy(this,e).delay=+t.apply(this,arguments)}}function zy(e,t){return t=+t,function(){hy(this,e).delay=t}}function By(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Ry:zy)(t,e)):_y(this.node(),t).delay}function Vy(e,t){return function(){gy(this,e).duration=+t.apply(this,arguments)}}function Hy(e,t){return t=+t,function(){gy(this,e).duration=t}}function Uy(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Vy:Hy)(t,e)):_y(this.node(),t).duration}function Wy(e,t){if(typeof t!=`function`)throw Error();return function(){gy(this,e).ease=t}}function Gy(e){var t=this._id;return arguments.length?this.each(Wy(t,e)):_y(this.node(),t).ease}function Ky(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();gy(this,e).ease=n}}function qy(e){if(typeof e!=`function`)throw Error();return this.each(Ky(this._id,e))}function Jy(e){typeof e!=`function`&&(e=Kh(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Cb(r,this._parents,this._name,this._id)}function Yy(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new Cb(o,this._parents,this._name,this._id)}function Xy(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function Zy(e,t,n){var r,i,a=Xy(t)?hy:gy;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Qy(e,t){var n=this._id;return arguments.length<2?_y(this.node(),n).on.on(e):this.each(Zy(n,e,t))}function $y(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function eb(){return this.on(`end.remove`,$y(this._id))}function tb(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=zh(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,my(l[f],t,n,f,l,_y(u,n)));return new Cb(a,this._parents,t,n)}function nb(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=Uh(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=_y(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&my(p,t,n,h,f,m);a.push(f),o.push(u)}return new Cb(a,o,t,n)}var rb=k_.prototype.constructor;function ib(){return new rb(this._groups,this._parents)}function ab(e,t){var n,r,i;return function(){var a=Ig(this,e),o=(this.style.removeProperty(e),Ig(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function ob(e){return function(){this.style.removeProperty(e)}}function sb(e,t,n){var r,i=n+``,a;return function(){var o=Ig(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function cb(e,t,n){var r,i,a;return function(){var o=Ig(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),Ig(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function lb(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=gy(this,e),l=c.on,u=c.value[a]==null?s||=ob(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function ub(e,t,n){var r=(e+=``)==`transform`?Uv:Ty;return t==null?this.styleTween(e,ab(e,r)).on(`end.style.`+e,ob(e)):typeof t==`function`?this.styleTween(e,cb(e,r,wy(this,`style.`+e,t))).each(lb(this._id,e)):this.styleTween(e,sb(e,r,t),n).on(`end.style.`+e,null)}function db(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function fb(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&db(e,a,n)),r}return a._value=t,a}function pb(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,fb(e,t,n??``))}function mb(e){return function(){this.textContent=e}}function hb(e){return function(){var t=e(this);this.textContent=t??``}}function gb(e){return this.tween(`text`,typeof e==`function`?hb(wy(this,`text`,e)):mb(e==null?``:e+``))}function _b(e){return function(t){this.textContent=e.call(this,t)}}function vb(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&_b(r)),t}return r._value=e,r}function yb(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,vb(e))}function bb(){for(var e=this._name,t=this._id,n=Tb(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=_y(c,t);my(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Cb(r,this._parents,e,n)}function xb(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=gy(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var Sb=0;function Cb(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function wb(e){return k_().transition(e)}function Tb(){return++Sb}var Eb=k_.prototype;Cb.prototype=wb.prototype={constructor:Cb,select:tb,selectAll:nb,selectChild:Eb.selectChild,selectChildren:Eb.selectChildren,filter:Jy,merge:Yy,selection:ib,transition:bb,call:Eb.call,nodes:Eb.nodes,node:Eb.node,size:Eb.size,empty:Eb.empty,each:Eb.each,on:Qy,attr:My,attrTween:Ly,style:ub,styleTween:pb,text:gb,textTween:yb,remove:eb,tween:Cy,delay:By,duration:Uy,ease:Gy,easeVarying:qy,end:xb,[Symbol.iterator]:Eb[Symbol.iterator]};function Db(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Ob={time:null,delay:0,duration:250,ease:Db};function kb(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function Ab(e){var t,n;e instanceof Cb?(t=e._id,e=e._name):(t=Tb(),(n=Ob).time=ny(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&my(c,e,t,l,o,n||kb(c,t));return new Cb(r,this._parents,e,t)}k_.prototype.interrupt=by,k_.prototype.transition=Ab;var{abs:jb,max:Mb,min:Nb}=Math;[`w`,`e`].map(Pb),[`n`,`s`].map(Pb),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(Pb);function Pb(e){return{type:e}}var Fb=Math.PI,Ib=2*Fb,Lb=1e-6,Rb=Ib-Lb;function zb(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Bb(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return zb;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var Vb=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?zb:Bb(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Lb)if(!(Math.abs(u*s-c*l)>Lb)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Fb-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Lb&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Lb||Math.abs(this._y1-l)>Lb)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%Ib+Ib),d>Rb?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Lb&&this._append`A${n},${n},0,${+(d>=Fb)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function Hb(){return new Vb}Hb.prototype=Vb.prototype;function Ub(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function Wb(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Gb(e){return e=Wb(Math.abs(e)),e?e[1]:NaN}function Kb(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function qb(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var Jb=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Yb(e){if(!(t=Jb.exec(e)))throw Error(`invalid format: `+e);var t;return new Xb({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Yb.prototype=Xb.prototype;function Xb(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}Xb.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function Zb(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Qb;function $b(e,t){var n=Wb(e,t);if(!n)return Qb=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Qb=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+Wb(e,Math.max(0,t+a-1))[0]}function ex(e,t){var n=Wb(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var tx={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:Ub,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>ex(e*100,t),r:ex,s:$b,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function nx(e){return e}var rx=Array.prototype.map,ix=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function ax(e){var t=e.grouping===void 0||e.thousands===void 0?nx:Kb(rx.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?nx:qb(rx.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=Yb(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):tx[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=tx[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=Zb(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&Qb!==void 0?ix[8+Qb/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r;break}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(Gb(t)/3)))*3,r=10**-n,i=l((e=Yb(e),e.type=`f`,e),{suffix:ix[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var ox,sx,cx;lx({thousands:`,`,grouping:[3],currency:[`$`,``]});function lx(e){return ox=ax(e),sx=ox.format,cx=ox.formatPrefix,ox}function ux(e){return Math.max(0,-Gb(Math.abs(e)))}function dx(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Gb(t)/3)))*3-Gb(Math.abs(e)))}function fx(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Gb(t)-Gb(e))+1}function px(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function mx(){return this.eachAfter(px)}function hx(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function gx(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function _x(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function vx(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function yx(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function bx(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function xx(e){for(var t=this,n=Sx(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function Sx(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function Cx(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function wx(){return Array.from(this)}function Tx(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Ex(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*Dx(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function Ox(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=jx)):t===void 0&&(t=Ax);for(var n=new Px(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new Px(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(Nx)}function kx(){return Ox(this).eachBefore(Mx)}function Ax(e){return e.children}function jx(e){return Array.isArray(e)?e[1]:null}function Mx(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Nx(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Px(e){this.data=e,this.depth=this.height=0,this.parent=null}Px.prototype=Ox.prototype={constructor:Px,count:mx,each:hx,eachAfter:_x,eachBefore:gx,find:vx,sum:yx,sort:bx,path:xx,ancestors:Cx,descendants:wx,leaves:Tx,links:Ex,copy:kx,[Symbol.iterator]:Dx};function Fx(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ix(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function Lx(){var e=1,t=1,n=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=n,i.x1=e,i.y1=t/o,i.eachBefore(a(t,o)),r&&i.eachBefore(Fx),i}function a(e,t){return function(r){r.children&&Ix(r,r.x0,e*(r.depth+1)/t,r.x1,e*(r.depth+2)/t);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}return i.round=function(e){return arguments.length?(r=!!e,i):r},i.size=function(n){return arguments.length?(e=+n[0],t=+n[1],i):[e,t]},i.padding=function(e){return arguments.length?(n=+e,i):n},i}function Rx(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function zx(e){return function(){return e}}function Bx(e){return+e}var Vx=[0,1];function Hx(e){return e}function Ux(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:zx(isNaN(t)?NaN:.5)}function Wx(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function Gx(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=Ux(i,r),a=n(o,a)):(r=Ux(r,i),a=n(a,o)),function(e){return a(r(e))}}function Kx(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=Ux(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=vh(e,t,1,r)-1;return a[n](i[n](t))}}function qx(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Jx(){var e=Vx,t=Vx,n=Pv,r,i,a,o=Hx,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==Hx&&(o=Wx(e[0],e[n-1])),s=n>2?Kx:Gx,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),Dv))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,Bx),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=Fv,u()},d.clamp=function(e){return arguments.length?(o=e?!0:Hx,u()):o!==Hx},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function Yx(){return Jx()(Hx,Hx)}function Xx(e,t,n,r){var i=Th(e,t,n),a;switch(r=Yb(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=dx(i,o))&&(r.precision=a),cx(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=fx(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=ux(i))&&(r.precision=a-(r.type===`%`)*2);break}return sx(r)}function Zx(e){var t=e.domain;return e.ticks=function(e){var n=t();return Ch(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return Xx(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=wh(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function Qx(){var e=Yx();return e.copy=function(){return qx(e,Qx())},Rx.apply(e,arguments),Zx(e)}function $x(e){return function(){return e}}var eS=Math.abs,tS=Math.atan2,nS=Math.cos,rS=Math.max,iS=Math.min,aS=Math.sin,oS=Math.sqrt,sS=Math.PI,cS=sS/2,lS=2*sS;function uS(e){return e>1?0:e<-1?sS:Math.acos(e)}function dS(e){return e>=1?cS:e<=-1?-cS:Math.asin(e)}function fS(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Vb(t)}function pS(e){return e.innerRadius}function mS(e){return e.outerRadius}function hS(e){return e.startAngle}function gS(e){return e.endAngle}function _S(e){return e&&e.padAngle}function vS(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function yS(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/oS(s*s+c*c),u=l*c,d=-l*s,f=e+u,p=t+d,m=n+u,h=r+d,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=v*v+y*y,x=i-a,S=f*h-m*p,C=(y<0?-1:1)*oS(rS(0,x*x*b-S*S)),w=(S*y-v*C)/b,T=(-S*v-y*C)/b,E=(S*y+v*C)/b,D=(-S*v+y*C)/b,O=w-g,k=T-_,A=E-g,j=D-_;return O*O+k*k>A*A+j*j&&(w=E,T=D),{cx:w,cy:T,x01:-u,y01:-d,x11:w*(i/x-1),y11:T*(i/x-1)}}function bS(){var e=pS,t=mS,n=$x(0),r=null,i=hS,a=gS,o=_S,s=null,c=fS(l);function l(){var l,u,d=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-cS,m=a.apply(this,arguments)-cS,h=eS(m-p),g=m>p;if(s||=l=c(),f<d&&(u=f,f=d,d=u),!(f>1e-12))s.moveTo(0,0);else if(h>lS-1e-12)s.moveTo(f*nS(p),f*aS(p)),s.arc(0,0,f,p,m,!g),d>1e-12&&(s.moveTo(d*nS(m),d*aS(m)),s.arc(0,0,d,m,p,g));else{var _=p,v=m,y=p,b=m,x=h,S=h,C=o.apply(this,arguments)/2,w=C>1e-12&&(r?+r.apply(this,arguments):oS(d*d+f*f)),T=iS(eS(f-d)/2,+n.apply(this,arguments)),E=T,D=T,O,k;if(w>1e-12){var A=dS(w/d*aS(C)),j=dS(w/f*aS(C));(x-=A*2)>1e-12?(A*=g?1:-1,y+=A,b-=A):(x=0,y=b=(p+m)/2),(S-=j*2)>1e-12?(j*=g?1:-1,_+=j,v-=j):(S=0,_=v=(p+m)/2)}var M=f*nS(_),N=f*aS(_),P=d*nS(b),F=d*aS(b);if(T>1e-12){var I=f*nS(v),L=f*aS(v),ee=d*nS(y),R=d*aS(y),z;if(h<sS)if(z=vS(M,N,ee,R,I,L,P,F)){var te=M-z[0],ne=N-z[1],re=I-z[0],B=L-z[1],ie=1/aS(uS((te*re+ne*B)/(oS(te*te+ne*ne)*oS(re*re+B*B)))/2),ae=oS(z[0]*z[0]+z[1]*z[1]);E=iS(T,(d-ae)/(ie-1)),D=iS(T,(f-ae)/(ie+1))}else E=D=0}S>1e-12?D>1e-12?(O=yS(ee,R,M,N,f,D,g),k=yS(I,L,P,F,f,D,g),s.moveTo(O.cx+O.x01,O.cy+O.y01),D<T?s.arc(O.cx,O.cy,D,tS(O.y01,O.x01),tS(k.y01,k.x01),!g):(s.arc(O.cx,O.cy,D,tS(O.y01,O.x01),tS(O.y11,O.x11),!g),s.arc(0,0,f,tS(O.cy+O.y11,O.cx+O.x11),tS(k.cy+k.y11,k.cx+k.x11),!g),s.arc(k.cx,k.cy,D,tS(k.y11,k.x11),tS(k.y01,k.x01),!g))):(s.moveTo(M,N),s.arc(0,0,f,_,v,!g)):s.moveTo(M,N),!(d>1e-12)||!(x>1e-12)?s.lineTo(P,F):E>1e-12?(O=yS(P,F,I,L,d,-E,g),k=yS(M,N,ee,R,d,-E,g),s.lineTo(O.cx+O.x01,O.cy+O.y01),E<T?s.arc(O.cx,O.cy,E,tS(O.y01,O.x01),tS(k.y01,k.x01),!g):(s.arc(O.cx,O.cy,E,tS(O.y01,O.x01),tS(O.y11,O.x11),!g),s.arc(0,0,d,tS(O.cy+O.y11,O.cx+O.x11),tS(k.cy+k.y11,k.cx+k.x11),g),s.arc(k.cx,k.cy,E,tS(k.y11,k.x11),tS(k.y01,k.x01),!g))):s.arc(0,0,d,b,y,g)}if(s.closePath(),l)return s=null,l+``||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-sS/2;return[nS(r)*n,aS(r)*n]},l.innerRadius=function(t){return arguments.length?(e=typeof t==`function`?t:$x(+t),l):e},l.outerRadius=function(e){return arguments.length?(t=typeof e==`function`?e:$x(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n=typeof e==`function`?e:$x(+e),l):n},l.padRadius=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:$x(+e),l):r},l.startAngle=function(e){return arguments.length?(i=typeof e==`function`?e:$x(+e),l):i},l.endAngle=function(e){return arguments.length?(a=typeof e==`function`?e:$x(+e),l):a},l.padAngle=function(e){return arguments.length?(o=typeof e==`function`?e:$x(+e),l):o},l.context=function(e){return arguments.length?(s=e??null,l):s},l}function xS(e,t,n){this.k=e,this.x=t,this.y=n}xS.prototype={constructor:xS,scale:function(e){return e===1?this:new xS(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new xS(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var SS=new xS(1,0,0);CS.prototype=xS.prototype;function CS(e){for(;!e.__zoom;)if(!(e=e.parentNode))return SS;return e.__zoom}function wS(e,t=15){let n=e.split(` `),r=[],i=[],a=0;return n.forEach(e=>{a+e.length>t?(i.length&&r.push(i.join(` `)),i=[e],a=e.length):(i.push(e),a+=e.length+ +(i.length>0))}),i.length&&r.push(i.join(` `)),r}var{WILDCARD:TS,QUALIFIER:ES,LUCKY_LOSER:DS}=t.entryStatusConstants,OS=`text-anchor`,kS=`dominant-baseline`,AS=`fill-opacity`,jS=Object.assign({},...t.fixtures.countries.filter(e=>e.ioc).map(e=>({[e.ioc]:e.iso2})),...t.fixtures.countries.filter(e=>e.iso).map(e=>({[e.iso]:e.iso2})));function MS(e){let t=Math.floor(e.length/2),n=e.slice(0,t),r=e.slice(t).reverse();return[...n,...r]}function NS(e){if(e)switch(e){case TS:return`WC`;case ES:return`Q`;case DS:return`LL`;default:return e}}function PS(e,t){let n=[];for(let r of e)for(let e of r.sides){let i=r.matchUpStatus===`BYE`&&!e.participantName;n.push({name:e.participantName||(i?`BYE`:``),participantName:e.participantName||(i?`BYE`:void 0),drawPosition:e.drawPosition,seedNumber:e.seedNumber,entryStatus:NS(e.entryStatus),nationalityCode:e.nationalityCode,matchUp:r,depth:t,value:1})}return n}function FS(e,t){let n=e.winningSide!==void 0&&e.winningSide!==null?e.sides.find(t=>t.sideNumber===e.winningSide):void 0;!n&&e.matchUpStatus===`BYE`&&(n=e.sides.find(e=>e.participantName));let r=n?.participantName,i=r?t.get(r):void 0;return{winnerName:r,winnerSide:n,winnerLookup:i}}function IS(e,t,n,r){return e.map((e,i)=>{let a=i*2,o=[t[a],t[a+1]].filter(Boolean),{winnerName:s,winnerSide:c,winnerLookup:l}=FS(e,r);return{name:s||``,participantName:s,drawPosition:l?.drawPosition??c?.drawPosition,seedNumber:c?.seedNumber??l?.seedNumber,entryStatus:NS(c?.entryStatus)??l?.entryStatus,nationalityCode:c?.nationalityCode??l?.nationalityCode,scoreString:e.scoreString,matchUpStatus:e.matchUpStatus,matchUp:e,depth:n,children:o.length>0?o:void 0}})}function LS(e){let{roundMatchUps:t}=e,n=Object.keys(t).map(Number).sort((e,t)=>e-t);if(n.length===0)throw Error(`No round data found in draw`);let r=t[n[0]],i=MS(PS(r,n.length)),a=new Map;for(let e of i)e.participantName&&e.participantName!==`BYE`&&a.set(e.participantName,e);let o=IS(MS(r),i,n.length-1,a);for(let e=1;e<n.length;e++)o=IS(MS(t[n[e]]),o,n.length-1-e,a);return o.length===1?o[0]:{name:`Tournament`,depth:0,children:o}}function RS(e,t){if(!e)return;let{seedNumber:n,entryStatus:r,drawPosition:i,participantName:a}=e,o;if(a?.trim().toUpperCase()===`BYE`)o=`#B0BEC5`;else if(n){let e=Number(n),t=Qx().domain([1,32]).range([`0`,`1`]);o=Qx().domain(Eh(0,1,1/7)).range([`#81D4FA`,`#42A5F5`,`#1E88E5`,`#1565C0`,`#5C6BC0`,`#673AB7`,`#9C27B0`])(Number(t(e)))}else if(r?.toUpperCase()===`WC`)o=`red`;else if(r&&(r===`Q`||r===`LL`))o=Qx().domain(Eh(0,1,1/3)).range([`#FFF176`,`#FBC02D`,`#FF9800`])(t(i));else{let e=[`#C8E6C9`,`#81C784`,`#66BB6A`,`#4CAF50`,`#43A047`,`#388E3C`,`#2E7D32`,`#1B5E20`,`#A5D6A7`,`#90CAF9`,`#64B5F6`,`#42A5F5`,`#2196F3`,`#1E88E5`,`#1976D2`,`#1565C0`];o=Qx().domain(Eh(0,1,1/e.length)).range(e)(t(i))}e.color=o,e.children&&e.children.forEach(n=>{n.participantName===e.participantName&&(n.color=o),RS(n,t)})}function zS(e,t){let n=[];return e.seedNumber?n.push(`Seed ${e.seedNumber}`):e.entryStatus&&n.push(e.entryStatus),t===7&&e.drawPosition&&n.push(`Draw ${e.drawPosition}`),n.length>0?n.join(` • `):void 0}function BS(e,t){let n=e.find(e=>e.data.participantName&&e.data.participantName!==t);return n?.data.participantName?n.data:void 0}function VS(e,t){let n=[e.participantName],r;if(t.children&&t.children.length>0)e.scoreString&&n.push(e.scoreString),r=BS(t.children,e.participantName),r&&n.push(r.participantName);else{let r=zS(e,t.depth);r&&n.push(r)}return{messageLines:n,opponentData:r}}function HS(e,t){return-(e*t/2)+t/2}function US(e,t,n){let r=j_(e).append(`svg`).attr(`width`,t).attr(`height`,n).style(`display`,`block`),i=r.append(`g`).attr(`transform`,`translate(${t/2}, ${n/2})`);return{svg:r,g:i,flagsGroup:i.append(`g`).attr(`class`,`flags-group`),winningFlagsGroup:i.append(`g`).attr(`class`,`winning-flags-group`),losingFlagsGroup:i.append(`g`).attr(`class`,`losing-flags-group`)}}function WS(e,t,n,r,i){let a=e.append(`text`).attr(`x`,t/2).attr(`y`,n/2).attr(OS,`middle`).attr(kS,`middle`).attr(`font-size`,`${r}px`).attr(`font-weight`,`bold`).style(`fill`,`var(--chc-text-primary, #333)`).attr(`pointer-events`,`none`),o=r+i*.5;return{centerText:a,centerText2:e.append(`text`).attr(`x`,t/2).attr(`y`,n/2+o).attr(OS,`middle`).attr(kS,`middle`).attr(`font-size`,`${i}px`).style(`fill`,`var(--chc-text-secondary, #666)`).attr(`pointer-events`,`none`)}}function GS(e,t,n,r,i,a,o){n&&(i?(t.flagsGroup.selectAll(`text`).remove(),t.winningFlagsGroup.selectAll(`text`).remove(),t.losingFlagsGroup.selectAll(`text`).remove()):e.selectAll(`text`).remove(),e.append(`text`).attr(`font-size`,`${o}px`).attr(OS,`middle`).attr(kS,`middle`).attr(`transform`,`translate(0, ${r*a})`).text(YS(n)))}function KS(e,n,r,i={}){let a=i.width||800,o=i.height||800,s=Math.min(a,o)/800*(i.textScaleFactor??1),c=28*s,l=24*s,u=30*s,d=r||i.title||`Tournament`,f=Object.assign({},...t.fixtures.countries.filter(e=>e.label).map(e=>({[e.ioc]:e.label}))),p=LS(n),m=Ox(p,e=>e.children).sum(e=>e.value||0),h=Math.min(a,o)/2,g=h/2,_=e=>e*h/200;Lx().size([2*Math.PI,h-g])(m),RS(p,Qx().domain([0,n.drawSize||128]).range([0,1]));let v=m.descendants(),y=bS().startAngle(e=>e.x0).endAngle(e=>e.x1).innerRadius(e=>e.y0+g).outerRadius(e=>e.y1+g),{svg:b,g:x,flagsGroup:S,winningFlagsGroup:C,losingFlagsGroup:w}=US(e,a,o),T=new Set,E=e=>{e.nationalityCode&&T.add(e.nationalityCode),e.children&&e.children.forEach(E)};E(p);let D=Array.from(T),{centerText:O,centerText2:k}=WS(b,a,o,c,l);function A(){let e=wS(d,15);O.text(``),O.selectAll(`tspan`).remove(),k.text(``),k.selectAll(`tspan`).remove(),O.selectAll(`tspan`).data(e).join(`tspan`).attr(`x`,a/2).attr(`dy`,(e,t)=>t===0?0:u).text(e=>e);let t=-(e.length*u/2)+u/2;O.attr(`y`,o/2+t),O.style(`display`,`block`),k.style(`display`,`none`)}function j(){if(S.selectAll(`text`).remove(),C.selectAll(`text`).remove(),w.selectAll(`text`).remove(),D.length===0)return;let e=Qx().domain([0,D.length]).range([0,Math.PI*2]),t=_(20),n=g-t+10;S.selectAll(`text`).data(D).join(`text`).attr(`font-size`,`${t}px`).attr(OS,`middle`).attr(kS,`middle`).attr(`transform`,(t,r)=>{let i=e(r);return`translate(${Math.cos(i)*n}, ${Math.sin(i)*n})`}).text(e=>YS(e)).style(`cursor`,`pointer`).on(`mouseover`,function(e,t){let n=f[t]||t;O.selectAll(`tspan`).remove(),O.attr(`y`,o/2),O.text(n).style(`display`,`block`),k.selectAll(`tspan`).remove(),k.text(``).style(`display`,`none`),N||x.selectAll(`path`).attr(AS,e=>e.data.nationalityCode===t?.9:.3)}).on(`mouseout`,function(){N||x.selectAll(`path`).attr(AS,.8),A()})}j(),A();let M=i.eventHandlers?.clickCenter;M&&x.insert(`circle`,`:first-child`).attr(`r`,g).attr(`fill`,`transparent`).style(`cursor`,`pointer`).on(`click`,M);let N=!1,P;function F(e,t){let n=t.data;if(n.participantName){let{messageLines:e,opponentData:r}=VS(n,t);r&&(n.opponent=r),O.selectAll(`tspan`).remove(),O.text(``),O.selectAll(`tspan`).data(e).join(`tspan`).attr(`x`,a/2).attr(`dy`,(e,t)=>t===0?0:u).text(e=>e);let i=HS(e.length,u);O.attr(`y`,o/2+i),O.style(`display`,`block`),k.style(`display`,`none`)}N?n.participantName?.toLowerCase()!==P?.toLowerCase()&&j_(e.currentTarget).attr(AS,.9):x.selectAll(`path`).attr(AS,e=>e.data.participantName===t.data.participantName?.9:.3);let r=_(30),i=g-r-10,s={flagsGroup:S,winningFlagsGroup:C,losingFlagsGroup:w};GS(C,s,n.nationalityCode,-1,!0,i,r),n.opponent&&GS(w,s,n.opponent.nationalityCode,1,!1,i,r)}function I(e,t){if(N){let n=t.data.participantName?.toLowerCase()===P?.toLowerCase();j_(e.currentTarget).attr(AS,n?1:.2)}else x.selectAll(`path`).attr(AS,.8);j(),A()}let L=i.eventHandlers?.clickSegment;function ee(e,t){if(!L)return;let n=t.data;L({participantName:n.participantName,drawPosition:n.drawPosition,seedNumber:n.seedNumber,entryStatus:n.entryStatus,nationalityCode:n.nationalityCode,scoreString:n.scoreString,matchUpStatus:n.matchUpStatus,roundName:n.roundName,depth:n.depth,matchUp:n.matchUp})}let R=x.selectAll(`path`).data(v).join(`path`).attr(`d`,e=>y(e)).attr(`fill`,e=>e.data.color||`#ccc`).attr(AS,.8).attr(`stroke`,`#fff`).attr(`stroke-width`,1).on(`mouseover`,F).on(`mouseout`,I);L&&R.style(`cursor`,`pointer`).on(`click`,ee),R.append(`title`).text(e=>{let t=e.data;return t.participantName?`${t.participantName}\nDraw: ${t.drawPosition||`N/A`}`:`${t.name}\nDepth: ${e.depth}`});function z(e){let t=0;return N=!!e,P=e,x.selectAll(`path`).attr(AS,n=>e?n.data.participantName?.toLowerCase()===e.toLowerCase()?(t+=1,1):.2:.8),t}function te(e){b.style(`display`,e?`none`:`block`)}return{highlightPlayer:z,hide:te}}function qS(e={}){return{render:(t,n,r)=>KS(t,n,r,e)}}function JS(e){return e?.length===2?e&&String.fromCodePoint!==void 0?e.toUpperCase().replaceAll(/./g,e=>String.fromCodePoint((e.codePointAt(0)??0)+127397)):e:``}function YS(e){return JS(jS[e]||e)}var{LUCKY_LOSER:XS,WILDCARD:ZS,QUALIFIER:QS}=t.entryStatusConstants;function $S(e){let t={};for(let[n,r]of Object.entries(e.roundMatchUps))t[Number(n)]=r.map(e=>({...e,winningSide:e.winningSide,drawPositions:e.drawPositions||[],scoreString:e.winningSide===1?e.score?.scoreStringSide1:e.winningSide===2?e.score?.scoreStringSide2:void 0,sides:(e.sides||[]).map(e=>({sideNumber:e.sideNumber,drawPosition:e.drawPosition,participantName:e.participant?.participantName,nationalityCode:e.participant?.person?.nationalityCode,seedNumber:e.seedNumber,entryStatus:e.participant?.entryStatus}))}));return{drawSize:(t[1]?.length||0)*2,roundMatchUps:t,seedAssignments:e.seedAssignments}}var eC={LL:XS,WC:ZS,Q:QS},tC=[`R128`,`R64`,`R32`,`R16`,`QF`,`SF`,`F`];function nC(e){let t=rC(e);if(t.length===0)return{drawSize:0,roundMatchUps:{}};let n=t[0].data,r=n.length,i=iC(n),a=aC(t,e),o={};o[1]=sC(n,a,t);for(let e=1;e<t.length;e++)o[e+1]=cC(e,t,a,i);return{drawSize:r,roundMatchUps:o}}function rC(e){let t=[],n=!1;for(let r of tC){let i=e[r];i&&i.length>0&&(n=!0),n&&i&&i.length>0&&t.push({key:r,data:i})}return t}function iC(e){let t=new Map;return e.forEach((e,n)=>{let r=lC(e.player);r&&r!==`BYE`&&t.set(r,{drawPosition:e.Draw??n+1,country:e.country,seed:e.seed,entry:e.entry})}),t}function aC(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=r+1<e.length?e[r+1].data:t.W||[],a=new Set;for(let e of i){let t=lC(e.player);t&&a.add(t)}n.set(e[r].key,a)}return n}function oC(e,t,n){if(e===`BYE`||t===`BYE`)return e===`BYE`?2:1;if(n.has(e))return 1;if(n.has(t))return 2}function sC(e,t,n){let r=[],i=t.get(n[0].key)||new Set;for(let t=0;t<e.length;t+=2){let a=e[t],o=e[t+1],s=lC(a?.player),c=lC(o?.player),l=s===`BYE`||c===`BYE`,u=oC(s,c,i),d;if(!l&&n.length>1){let e=n[1].data,t=u===1?s:c;d=e.find(e=>lC(e.player)===t)?.score}let f=l?`BYE`:u?`COMPLETED`:`TO_BE_PLAYED`;r.push({roundNumber:1,matchUpStatus:f,winningSide:u,drawPositions:[a?.Draw??t+1,o?.Draw??t+2],scoreString:d,sides:[dC(1,a,t+1),dC(2,o,t+2)]})}return r}function cC(e,t,n,r){let i=e+1,a=t[e].data,o=n.get(t[e].key)||new Set,s=[];for(let e=0;e<a.length;e+=2){let t=a[e],n=a[e+1],c=lC(t?.player),l=lC(n?.player),u=o.has(c)?1:o.has(l)?2:void 0,d=(u===1?t:u===2?n:void 0)?.score,f=u?`COMPLETED`:`TO_BE_PLAYED`;s.push({roundNumber:i,matchUpStatus:f,winningSide:u,drawPositions:[r.get(c)?.drawPosition??0,r.get(l)?.drawPosition??0],scoreString:d,sides:[fC(1,t,r),fC(2,n,r)]})}return s}function lC(e){if(!e)return``;let t=e.trim();return t.toUpperCase()===`BYE`?`BYE`:t}function uC(e){if(e)return eC[e.toUpperCase()]||e}function dC(e,t,n){if(!t)return{sideNumber:e,drawPosition:n};let r=lC(t.player);return{sideNumber:e,drawPosition:t.Draw??n,participantName:r||void 0,nationalityCode:t.country||void 0,seedNumber:t.seed?Number(t.seed):void 0,entryStatus:uC(t.entry)}}function fC(e,t,n){if(!t)return{sideNumber:e,drawPosition:0};let r=lC(t.player),i=n.get(r);return{sideNumber:e,drawPosition:i?.drawPosition??0,participantName:r||void 0,nationalityCode:t.country||i?.country||void 0,seedNumber:t.seed?Number(t.seed):i?.seed?Number(i.seed):void 0,entryStatus:uC(t.entry||i?.entry)}}var pC=`right`,mC=`font-medium`;function hC({target:e,button:t,stateChange:n}){let r=0,i=()=>(r+=1,`Item${r}`),a=document.createElement(`div`);t.class&&a.classList.add(t.class),a.classList.add(`dropdown`),t.id&&(a.id=t.id),t.align===pC&&a.classList.add(`is-right`);let o=e=>e.classList.contains(`is-active`),s=()=>{o(a)&&a.classList.remove(`is-active`)},c=e=>o(e)?(e.classList.remove(`is-active`),!1):(e.classList.add(`is-active`),!0);a.onmouseleave=s,a.onclick=()=>c(a);let l=document.createElement(`div`);l.classList.add(`dropdown-trigger`);let u=document.createElement(`button`);u.className=`button font-medium`,t.intent&&u.classList.add(t.intent),u.setAttribute(`aria-haspopup`,`true`);let d=document.createElement(`span`);z(t.onClick)&&(d.onclick=t.onClick),d.style.cssText=`margin-right: 1em`,d.innerHTML=t.label,u.appendChild(d);let f=document.createElement(`span`);z(t.onClick)&&(f.onclick=t.onClick),f.innerHTML=`
|
|
214
|
+
`,`2) content: () => element.cloneNode(true)`].join(` `))}var s=i.reduce(function(e,t){var n=t&&mm(t,r);return n&&e.push(n),e},[]);return wp(e)?s[0]:s}hm.defaultProps=Qp,hm.setDefaultProps=em,hm.currentInput=Fp,Object.assign({},Od,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),hm.setDefaultProps({render:um});var gm=`#000000.#434343.#666666.#999999.#b7b7b7.#cccccc.#d9d9d9.#ffffff.#980000.#ff0000.#ff9900.#ffff00.#00ff00.#00ffff.#4a86e8.#0000ff.#9900ff.#ff00ff.#e6b8af.#f4cccc.#fce5cd.#fff2cc.#d9ead3.#d0e0e3.#c9daf8.#cfe2f3.#d9d2e9.#ead1dc`.split(`.`),_m=`notes-toolbar-recent-colors`,vm=8;function ym(){try{return JSON.parse(localStorage.getItem(_m)||`[]`)}catch{return[]}}function bm(e){let t=ym().filter(t=>t!==e);t.unshift(e),t.length>vm&&(t=t.slice(0,vm)),localStorage.setItem(_m,JSON.stringify(t))}function xm(e={}){let t=document.createElement(`div`);return t.className=`notes-toolbar`,t.appendChild(Em(e)),t.appendChild(Dm(e)),t.appendChild(Om(e)),t.appendChild(Mm(e)),t.appendChild(Fm(e)),t.appendChild(Im(e)),t.appendChild(Rm(e)),t}function Sm(e,t){for(let[n,r]of Object.entries(t)){let t=e.querySelector(`[data-action="${n}"]`);t&&t.classList.toggle(`is-active`,r)}}function Cm(e,t){let n=e.querySelector(`[data-action="heading"]`);n&&(n.value=t===!1?`0`:String(t))}function wm(){let e=document.createElement(`div`);return e.className=`notes-toolbar-group`,e}function Tm(e,t,n,r){let i=document.createElement(`button`);return i.className=`notes-toolbar-btn`,i.dataset.action=e,i.title=n,i.type=`button`,i.innerHTML=t,r&&i.addEventListener(`click`,r),i}function Em(e){let t=wm(),n=document.createElement(`select`);n.dataset.action=`heading`,n.title=`Text style`;for(let e of[{value:`0`,label:`Paragraph`},{value:`1`,label:`Heading 1`},{value:`2`,label:`Heading 2`},{value:`3`,label:`Heading 3`},{value:`4`,label:`Heading 4`},{value:`5`,label:`Heading 5`},{value:`6`,label:`Heading 6`}]){let t=document.createElement(`option`);t.value=e.value,t.textContent=e.label,n.appendChild(t)}return n.addEventListener(`change`,()=>{let t=parseInt(n.value,10);e.onHeading?.(t===0?!1:t)}),t.appendChild(n),t}function Dm(e){let t=wm();return t.appendChild(Tm(`bold`,`<b>B</b>`,`Bold`,e.onBold)),t.appendChild(Tm(`italic`,`<i>I</i>`,`Italic`,e.onItalic)),t.appendChild(Tm(`underline`,`<u>U</u>`,`Underline`,e.onUnderline)),t.appendChild(Tm(`strike`,`<s>S</s>`,`Strikethrough`,e.onStrike)),t}function Om(e){let t=wm();return t.appendChild(km(`color`,`A`,`Text color`,`#000000`,t=>{bm(t),e.onColor?.(t)})),t.appendChild(km(`background`,`A`,`Background color`,`#ffff00`,t=>{bm(t),e.onBackground?.(t)})),t}function km(e,t,n,r,i){let a=document.createElement(`button`);a.className=`notes-toolbar-btn notes-toolbar-color-btn`,a.dataset.action=e,a.title=n,a.type=`button`;let o=document.createElement(`span`);o.className=`notes-toolbar-color-letter`,o.textContent=t,a.appendChild(o);let s=document.createElement(`span`);s.className=`notes-toolbar-color-bar`,s.style.backgroundColor=r,a.appendChild(s);let c;return a.addEventListener(`click`,()=>{if(c){c.destroy(),c=void 0;return}c=hm(a,{content:Am(r,e=>{s.style.backgroundColor=e,i(e),c?.destroy(),c=void 0}),theme:`light-border`,trigger:`manual`,interactive:!0,placement:`bottom-start`,onHidden:()=>{c?.destroy(),c=void 0}}),c.show()}),a}function Am(e,t){let n=document.createElement(`div`);n.className=`notes-color-panel`;let r=document.createElement(`div`);r.className=`notes-color-swatches`;for(let n of gm)r.appendChild(jm(n,n===e,t));n.appendChild(r);let i=ym();if(i.length){let r=document.createElement(`div`);r.className=`notes-color-section-label`,r.textContent=`Recent`,n.appendChild(r);let a=document.createElement(`div`);a.className=`notes-color-swatches`;for(let n of i)a.appendChild(jm(n,n===e,t));n.appendChild(a)}let a=document.createElement(`div`);a.className=`notes-color-custom-row`;let o=document.createElement(`input`);o.type=`color`,o.value=e,o.className=`notes-color-custom-input`;let s=document.createElement(`label`);return s.className=`notes-color-custom-label`,s.textContent=`Custom...`,s.addEventListener(`click`,()=>o.click()),o.addEventListener(`input`,()=>t(o.value)),a.appendChild(o),a.appendChild(s),n.appendChild(a),n}function jm(e,t,n){let r=document.createElement(`button`);return r.type=`button`,r.className=`notes-color-swatch`,t&&r.classList.add(`is-selected`),r.style.backgroundColor=e,(e===`#ffffff`||e===`#fff`)&&(r.style.border=`1px solid var(--chc-border-secondary)`),r.title=e,r.addEventListener(`click`,()=>n(e)),r}function Mm(e){let t=wm();return t.appendChild(Tm(`orderedList`,Nm(16,16,`<path d="M3 2h12v2H3zm0 5h12v2H3zm0 5h12v2H3z" fill="currentColor"/><text x="0" y="4" font-size="3.5" fill="currentColor">1</text><text x="0" y="9" font-size="3.5" fill="currentColor">2</text><text x="0" y="14" font-size="3.5" fill="currentColor">3</text>`),`Ordered list`,e.onOrderedList)),t.appendChild(Tm(`bulletList`,Nm(16,16,`<circle cx="1.5" cy="3" r="1.5" fill="currentColor"/><circle cx="1.5" cy="8" r="1.5" fill="currentColor"/><circle cx="1.5" cy="13" r="1.5" fill="currentColor"/><path d="M5 2h10v2H5zm0 5h10v2H5zm0 5h10v2H5z" fill="currentColor"/>`),`Bullet list`,e.onBulletList)),t}function Nm(e,t,n){return`<svg width="${e}" height="${t}" viewBox="0 0 ${e} ${t}" xmlns="http://www.w3.org/2000/svg">${n}</svg>`}var Pm={alignLeft:Nm(16,16,`<path d="M1 2h14v2H1zm0 4h9v2H1zm0 4h14v2H1zm0 4h9v2H1z" fill="currentColor"/>`),alignCenter:Nm(16,16,`<path d="M1 2h14v2H1zm3.5 4h7v2h-7zM1 10h14v2H1zm3.5 4h7v2h-7z" fill="currentColor"/>`),alignRight:Nm(16,16,`<path d="M1 2h14v2H1zm6 4h8v2H7zM1 10h14v2H1zm6 4h8v2H7z" fill="currentColor"/>`),alignJustify:Nm(16,16,`<path d="M1 2h14v2H1zm0 4h14v2H1zm0 4h14v2H1zm0 4h14v2H1z" fill="currentColor"/>`)};function Fm(e){let t=wm();return t.appendChild(Tm(`alignLeft`,Pm.alignLeft,`Align left`,()=>e.onAlign?.(`left`))),t.appendChild(Tm(`alignCenter`,Pm.alignCenter,`Align center`,()=>e.onAlign?.(`center`))),t.appendChild(Tm(`alignRight`,Pm.alignRight,`Align right`,()=>e.onAlign?.(`right`))),t.appendChild(Tm(`alignJustify`,Pm.alignJustify,`Justify`,()=>e.onAlign?.(`justify`))),t}function Im(e){let t=wm();t.appendChild(Tm(`blockquote`,`“`,`Blockquote`,e.onBlockquote)),t.appendChild(Tm(`codeBlock`,`</>`,`Code block`,e.onCodeBlock));let n=Tm(`link`,`⇗`,`Insert link`);Lm(n,`Enter URL`,`https://`,t=>e.onLink?.(t)),t.appendChild(n);let r=Tm(`video`,`▷`,`Insert video`);return Lm(r,`YouTube URL`,`https://youtube.com/...`,t=>e.onVideo?.(t)),t.appendChild(r),t}function Lm(e,t,n,r){let i;e.addEventListener(`click`,()=>{if(i){i.destroy(),i=void 0;return}let a=document.createElement(`div`);a.className=`notes-url-panel`;let o=document.createElement(`div`);o.className=`notes-url-label`,o.textContent=t,a.appendChild(o);let s=document.createElement(`input`);s.type=`url`,s.className=`notes-url-input`,s.placeholder=n,a.appendChild(s);let c=document.createElement(`div`);c.className=`notes-url-actions`;let l=document.createElement(`button`);l.type=`button`,l.className=`button notes-url-cancel`,l.textContent=`Cancel`,l.addEventListener(`click`,()=>{i?.destroy(),i=void 0});let u=document.createElement(`button`);u.type=`button`,u.className=`button is-info notes-url-confirm`,u.textContent=`Insert`,u.addEventListener(`click`,()=>{let e=s.value.trim();e&&r(e),i?.destroy(),i=void 0}),c.appendChild(l),c.appendChild(u),a.appendChild(c),s.addEventListener(`keydown`,e=>{e.key===`Enter`?(e.preventDefault(),u.click()):e.key===`Escape`&&l.click()}),i=hm(e,{content:a,theme:`light-border`,trigger:`manual`,interactive:!0,placement:`bottom-start`,onShown:()=>setTimeout(()=>s.focus(),0),onHidden:()=>{i?.destroy(),i=void 0}}),i.show()})}function Rm(e){let t=wm();return t.appendChild(Tm(`clearFormatting`,`⊘`,`Clear formatting`,e.onClearFormatting)),t}function zm(e,t,n){if(!e)return{};let r=document.createElement(`aside`);r.classList.add(`menu`);let i={},a=e=>n&&e.close!==!1?t=>{t.stopPropagation(),n(),e.onClick()}:t=>{t.stopPropagation(),e.onClick()},o=0,s=()=>(o+=1,o),c=e=>e?.heading||e?.text||e?.label||`Item ${s()}`,l=e=>{let t=document.createElement(`li`);if(t.className=`font-medium`,e.style&&(t.style.cssText=e.style),e.onClick){let n=e.fontSize||`1em`;if(e.divider){let e=document.createElement(`hr`);e.classList.add(`dropdown-divider`),t.appendChild(e)}else{let r=document.createElement(`a`),i=e.disabled?`0.4`:`1`;r.style.cssText=`text-decoration: none; opacity: ${i}; font-size: ${n}`,e.class&&r.classList.add(e.class),e.color&&(r.style.color=e.color),e.heading&&(r.style.fontWeight=`bold`),e.disabled||(r.onclick=a(e)),r.innerHTML=c(e),t.appendChild(r)}}else t.innerHTML=c(e),e.disabled||(t.onclick=e.onClick);return t},u;for(let e of t||[])if(!e.hide){if(e.items){if(e.text){let t=document.createElement(`p`);t.className=`menu-label font-medium`,t.innerHTML=e.text,r.appendChild(t)}let t=document.createElement(`ul`);t.className=`menu-list`;for(let n of e.items)n.hide||t.appendChild(l(n));r.appendChild(t)}else if(e.type===`input`){let{field:t,inputElement:n}=un(e);e.focus&&(u=n),i[e.field]=n,r.appendChild(t)}else if(e.type===`divider`){let e=document.createElement(`hr`);e.classList.add(`dropdown-divider`),r.appendChild(e)}}return e.appendChild(r),{focusElement:u}}function Bm(e){return typeof e==`function`}var Vm;function Hm(e){Vm&&=(Vm?.destroy(!0),void 0),e?.remove&&e.remove()}function Um(e){let{title:t,options:n,menuItems:r=[],coords:i,callback:a,config:o}=e,{target:s,items:c}=e;if(!n?.length&&!c?.length&&!r)return;Hm();let l=document.createElement(`div`),u;return s||=i?.evt?.target,s&&(Vm=hm(s,{content:()=>(c=c?.filter(e=>!e.hide&&!e.disabled).map(e=>({...e,onClick:()=>{Hm(l),Bm(e.onClick)&&e.onClick()}}))||n?.filter(e=>!e.hide&&!e.disabled).map(e=>({text:typeof e==`object`?e.option:e,style:e.style,onClick:()=>{e.subMenu?Vm.setContent(`IMPLEMENT SUB MENU`):Bm(e.onClick)?(Hm(l),e.onClick()):Bm(a)&&a&&(Hm(l),a(typeof e==`object`?{...e,coords:i}:e))}})),u=zm(l,[{text:t,items:c},...r]).focusElement,l),theme:`light-border`,trigger:`click`,onShown:()=>{u&&setTimeout(()=>u?.focus(),0)},...o}),Vm.show(),Vm.setProps({interactive:!0})),Vm}var Y=`court-line`;function X(e,t){let n=document.createElementNS(`http://www.w3.org/2000/svg`,e);for(let[e,r]of Object.entries(t))n.setAttribute(e,r);return n}function Wm(e,t){let n=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);return n.setAttribute(`viewBox`,e),n.setAttribute(`class`,t),n.setAttribute(`fill`,`none`),n.style.width=`100%`,n.style.height=`auto`,n.style.display=`block`,n}function Gm(e){let t=Wm(`0 0 360 780`,e);for(let e of[`M 0 0 L 360 0 L 360 780 L 0 780 Z`,`M 45 0 L 45 780`,`M 315 0 L 315 780`,`M 0 390 L 360 390`,`M 45 210 L 315 210`,`M 45 570 L 315 570`,`M 180 210 L 180 570`,`M 180 0 L 180 20`,`M 180 760 L 180 780`])t.appendChild(X(`path`,{d:e,class:Y}));return t}function Km(e){let t=Wm(`0 0 500 470`,e),n=[X(`rect`,{x:`0`,y:`0`,width:`500`,height:`470`,class:Y}),X(`circle`,{cx:`250`,cy:`470`,r:`60`,class:Y}),X(`line`,{x1:`0`,y1:`470`,x2:`500`,y2:`470`,class:Y}),X(`rect`,{x:`170`,y:`0`,width:`160`,height:`190`,class:Y}),X(`circle`,{cx:`250`,cy:`190`,r:`60`,class:Y}),X(`line`,{x1:`220`,y1:`40`,x2:`280`,y2:`40`,class:Y}),X(`circle`,{cx:`250`,cy:`52`,r:`12`,class:Y}),X(`path`,{d:`M 30 0 L 30 90 A 220 220 0 0 0 470 90 L 470 0`,class:Y})];for(let e of n)t.appendChild(e);return t}function qm(e){let t=Wm(`0 0 500 440`,e),n=[X(`path`,{d:`M 20 170 A 350 400 0 0 1 480 170`,class:Y}),X(`line`,{x1:`250`,y1:`400`,x2:`20`,y2:`170`,class:Y}),X(`line`,{x1:`250`,y1:`400`,x2:`480`,y2:`170`,class:Y}),X(`path`,{d:`M 250 400 L 314 336 L 250 273 L 186 336 Z`,class:Y}),X(`path`,{d:`M 340 355 A 100 100 0 0 1 160 355`,class:Y}),X(`line`,{x1:`340`,y1:`355`,x2:`265`,y2:`405`,class:Y}),X(`line`,{x1:`160`,y1:`355`,x2:`235`,y2:`405`,class:Y}),X(`path`,{d:`M 235 405 A 18 18 0 0 1 265 405`,class:Y}),X(`circle`,{cx:`250`,cy:`340`,r:`9`,class:Y}),X(`line`,{x1:`247`,y1:`339`,x2:`253`,y2:`339`,class:Y}),X(`path`,{d:`M 244 398 L 244 404 L 250 408 L 256 404 L 256 398 Z`,class:Y}),X(`rect`,{x:`310`,y:`332`,width:`8`,height:`8`,transform:`rotate(45 314 336)`,class:Y}),X(`rect`,{x:`246`,y:`269`,width:`8`,height:`8`,transform:`rotate(45 250 273)`,class:Y}),X(`rect`,{x:`182`,y:`332`,width:`8`,height:`8`,transform:`rotate(45 186 336)`,class:Y}),X(`rect`,{x:`230`,y:`393`,width:`8`,height:`18`,class:Y}),X(`rect`,{x:`262`,y:`393`,width:`8`,height:`18`,class:Y})];for(let e of n)t.appendChild(e);return t}function Jm(e){let t=Wm(`0 0 850 2000`,e),n=[X(`rect`,{x:`0`,y:`0`,width:`850`,height:`2000`,rx:`280`,ry:`280`,class:Y}),X(`line`,{x1:`0`,y1:`1000`,x2:`850`,y2:`1000`,class:Y}),X(`circle`,{cx:`425`,cy:`1000`,r:`60`,class:Y}),X(`line`,{x1:`0`,y1:`650`,x2:`850`,y2:`650`,class:Y}),X(`line`,{x1:`0`,y1:`1350`,x2:`850`,y2:`1350`,class:Y}),X(`line`,{x1:`140`,y1:`300`,x2:`710`,y2:`300`,class:Y}),X(`line`,{x1:`140`,y1:`1700`,x2:`710`,y2:`1700`,class:Y}),X(`path`,{d:`M 395 300 A 40 40 0 0 1 455 300`,class:Y}),X(`path`,{d:`M 395 1700 A 40 40 0 0 0 455 1700`,class:Y}),X(`circle`,{cx:`270`,cy:`650`,r:`50`,class:Y}),X(`circle`,{cx:`580`,cy:`650`,r:`50`,class:Y}),X(`circle`,{cx:`270`,cy:`1350`,r:`50`,class:Y}),X(`circle`,{cx:`580`,cy:`1350`,r:`50`,class:Y})];for(let e of n)t.appendChild(e);return t}function Ym(e){let t=Wm(`0 0 200 440`,e);for(let e of[`M 0 0 L 200 0 L 200 440 L 0 440 Z`,`M 0 220 L 200 220`,`M 0 150 L 200 150`,`M 0 290 L 200 290`,`M 100 0 L 100 150`,`M 100 290 L 100 440`])t.appendChild(X(`path`,{d:e,class:Y}));return t}function Xm(e){let t=Wm(`0 0 200 440`,e);for(let e of[`M 0 0 L 200 0 L 200 440 L 0 440 Z`,`M 18 0 L 18 440`,`M 182 0 L 182 440`,`M 0 220 L 200 220`,`M 0 146 L 200 146`,`M 0 294 L 200 294`,`M 0 30 L 200 30`,`M 0 410 L 200 410`,`M 100 146 L 100 220`,`M 100 220 L 100 294`])t.appendChild(X(`path`,{d:e,class:Y}));return t}function Zm(e){let t=Wm(`0 0 100 200`,e);for(let e of[`M 0 0 L 100 0 L 100 200 L 0 200 Z`,`M 0 100 L 100 100`,`M 0 69.5 L 100 69.5`,`M 0 130.5 L 100 130.5`,`M 50 69.5 L 50 67.5`,`M 50 130.5 L 50 132.5`])t.appendChild(X(`path`,{d:e,class:Y}));return t}var Qm={name:`courthive-components`,version:`1.1.1`,engines:{node:`>=22`},description:`Components for competitions projects`,files:[`dist`],main:`./dist/courthive-components.umd.js`,module:`./dist/courthive-components.es.js`,types:`./dist/index.d.ts`,exports:{".":{types:`./dist/index.d.ts`,import:`./dist/courthive-components.es.js`,require:`./dist/courthive-components.umd.js`},"./dist/*":`./dist/*`},repository:{type:`git`,url:`git+https://github.com/CourtHive/courthive-components.git`},keywords:[`tournament`,`match`,`score`,`vanillajs`,`bracket`],author:`Charles Allen`,license:`MIT`,bugs:{url:`https://github.com/CourtHive/courthive-components/issues`},homepage:`https://courthive.github.io/courthive-component`,scripts:{commits:`git log $(git describe --tags --abbrev=0)..HEAD --oneline --no-merges --pretty=format:'%s: %h' | sed '/courthive-components/d'`,release:`npm run release:patch`,test:`vitest run`,"test:watch":`vitest`,"test:ui":`vitest --ui`,dev:`vite`,build:`vite build`,prepublishOnly:`npm run build`,preview:`vite preview`,storybook:`storybook dev -p 6006`,"build-storybook":`storybook build`,"deploy-storybook":`gh-pages -d storybook-static`,"pre-commit":`lint-staged`,predeploy:`npm run build-storybook`,prebuild:`rm -rf dist/*`,lint:`eslint src --fix --cache`,"lint:report":`eslint src & eslint --cache src -f json > eslint-report.json`,format:`prettier --write src`,"release:major":`npm run commits && npm version $(semver $npm_package_version -i major) && git push && git push --tags`,"release:minor":`npm run commits && npm version $(semver $npm_package_version -i minor) && git push && git push --tags`,"release:patch":`npm run commits && npm version $(semver $npm_package_version -i patch) && git push && git push --tags`,"release:beta":`npm run commits && npm version $(semver $npm_package_version -i prerelease --preid beta) && git push && git push --tags`,"patch:beta":`npm run commits && npm version $(semver $npm_package_version -i prerelease --preid beta) && npm publish --tag beta`},"lint-staged":{"*.{js,ts}":`eslint --cache --fix`,"*":`prettier --ignore-unknown --write`},devDependencies:{"@chromatic-com/storybook":`^5.0.0`,"@commitlint/cli":`20.5.3`,"@commitlint/config-conventional":`20.5.3`,"@eslint/js":`^10.0.1`,"@fortawesome/fontawesome-free":`^7.2.0`,"@storybook/addon-docs":`^10.2.17`,"@storybook/html-vite":`^10.2.17`,"@storybook/test-runner":`^0.24.0`,"@types/d3":`^7.4.3`,"@types/vanillajs-datepicker":`^1.3.5`,"@typescript-eslint/eslint-plugin":`8.59.1`,"@typescript-eslint/parser":`8.59.1`,"@vitest/browser-playwright":`^4.0.16`,"@vitest/coverage-v8":`^4.0.16`,eslint:`10.2.1`,"eslint-plugin-sonarjs":`4.0.3`,"eslint-plugin-storybook":`^10.2.17`,"gh-pages":`6.3.0`,globals:`^17.3.0`,"happy-dom":`^20.8.3`,husky:`9.1.7`,"lint-staged":`16.4.0`,playwright:`^1.57.0`,prettier:`^3.8.1`,semver:`7.7.4`,storybook:`^10.2.17`,"tabulator-tables":`6.4.0`,typescript:`^6.0.2`,vite:`8.0.10`,"vite-plugin-dts":`^5.0.0`,vitest:`^4.0.16`},dependencies:{awesomplete:`1.1.7`,"class-variance-authority":`0.7.1`,classnames:`2.5.1`,d3:`^7.9.0`,dayjs:`1.11.20`,"focus-trap":`^8.0.0`,"timepicker-ui":`^4.1.2`,"tippy.js":`6.3.7`,"tods-competition-factory":`^3.1.3`,"vanillajs-datepicker":`1.3.4`}};function $m(){return Qm.version}var eh={SET3_S6_TB7:`SET3-S:6/TB7`,SET3_S6_TB7_F_TB10:`SET3-S:6/TB7-F:TB10`,SET3_S6_TB10:`SET3-S:6/TB10`,SET3_S6_F_TB10:`SET3-S:6-F:TB10`,SET3_S6_TB7_NOAD:`SET3-S:6/TB7NOAD`,SET3_S8_TB7:`SET3-S:8/TB7`,SET3_S8_TB7_AT7:`SET3-S:8/TB7@7`,SET3_S4_TB7:`SET3-S:4/TB7`,SET3_S4_TB7_F_TB10:`SET3-S:4/TB7-F:TB10`,SET3_S4_TB5_AT3_F_TB10:`SET3-S:4/TB5@3-F:TB10`,SET5_S6_TB7:`SET5-S:6/TB7`,SET5_S6_TB7_F_TB10:`SET5-S:6/TB7-F:TB10`,SET1_S6_TB7:`SET1-S:6/TB7`,SET1_S6_TB10:`SET1-S:6/TB10`,SET1_S6_TB7_AT5:`SET1-S:6/TB7@5`,SET1_S8_TB7:`SET1-S:8/TB7`,SET1_S4_TB7:`SET1-S:4/TB7`,SET1_S5_TB9_AT4:`SET1-S:5/TB9@4`,SET1_S_TB7:`SET1-S:T7`,SET1_S_TB10:`SET1-S:TB10`,SET1_S_TB21:`SET1-S:T21`,SET1_S8:`SET1-S:8`,SET1_S10:`SET1-S:10`,FAST4:`SET5-S:4/NOAD`,SET3X_T10A_TB1:`SET3XA-S:T10-F:TB1`,SET3X_T10A_TB1_NOAD:`SET3XA-S:T10-F:TB1NOAD`,SET4X_T10A_TB1:`SET4XA-S:T10-F:TB1`};function th(e,t,n){if(!e)return{elements:{}};let r={};for(let i of t||[]){if(!i?.label||i.hide)continue;let t=document.createElement(`button`);i.id&&(r[i.id]=t,t.id=i.id),t.style.marginRight=`.5em`,t.className=`button font-medium`,i.intent&&t.classList.add(i.intent),t.innerHTML=i.label,i.disabled&&(t.disabled=!0),t.onclick=e=>{e.stopPropagation(),!e.target.disabled&&z(i.onClick)&&i.onClick(),n&&z(n)&&n()},e.appendChild(t)}return{elements:r}}var nh=(e,t)=>n=>n?.trim().length>=e&&(!t||n?.trim().length<=t);function rh(e){return t.tools.isConvertableInteger(e)&&parseInt(e.toString())>=0}var ih=(e,t)=>n=>rh(n)&&Number(n)>=e&&Number(n)<=t,ah=e=>/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?\d)(?=.*?[#?!@$%^&*-]).{8,12}$/.test(e);function oh(e){return t.tools.dateTime.dateValidation.test(e)}var sh=(e,t)=>n=>{let r=(n||``).trim().split(` `).length;return r>=e&&(!t||r<=t)},ch=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,lh=e=>ch.exec(e),uh=u({dateValidator:()=>oh,emailValidator:()=>lh,nameValidator:()=>nh,numericRange:()=>ih,numericValidator:()=>rh,passwordValidator:()=>ah,wordValidator:()=>sh}),dh=class{constructor({tournamentRecord:e,drawId:n,structureId:r,eventId:i}){this.tournamentRecord=e,this.drawId=n,this.structureId=r,this.eventId=i||e.events?.[0]?.eventId,t.tournamentEngine.setState(e)}setRenderCallback(e){this.renderCallback=e}getDrawEntryParticipantIds(){let{event:e,drawDefinition:n}=t.tournamentEngine.getEvent({drawId:this.drawId})||{};if(!e)return[];let{flightProfile:r}=t.tournamentEngine.getFlightProfile({eventId:this.eventId})||{};return(r?.flights?.find(e=>e.drawId===this.drawId)?.drawEntries||n?.entries||[]).map(e=>e.participantId).filter(Boolean)}getAllParticipants(){t.tournamentEngine.setState(this.tournamentRecord);let e=this.getDrawEntryParticipantIds();if(!e.length)return[];let{participants:n=[]}=t.tournamentEngine.getParticipants({participantFilters:{participantIds:e}})||{};return n.map(e=>({participantId:e.participantId,participantName:e.participantName,participantType:e.participantType,person:e.person,individualParticipants:e.individualParticipants}))}getAvailableParticipants(){t.tournamentEngine.setState(this.tournamentRecord);let e=this.getAllParticipants(),{assignedParticipantIds:n=[]}=t.tournamentEngine.getAssignedParticipantIds({drawId:this.drawId})||{};return e.filter(e=>!n.includes(e.participantId))}removeAssignment({drawPosition:e}){t.tournamentEngine.setState(this.tournamentRecord);let n=this.getMatchUps().find(t=>t.sides?.some(t=>t.drawPosition===e))?.sides?.find(t=>t.drawPosition===e)?.bye===!0,r=t.tournamentEngine.removeDrawPositionAssignment({drawId:this.drawId,structureId:this.structureId,drawPosition:e});if(r.error)return{success:!1,error:r.error};let{tournamentRecord:i}=t.tournamentEngine.getState()||{};return this.tournamentRecord=i,n&&this.renderCallback&&this.renderCallback(),{success:!0}}assignParticipant({drawPosition:e,participantId:n}){t.tournamentEngine.setState(this.tournamentRecord);let r=t.tournamentEngine.assignDrawPosition({drawId:this.drawId,structureId:this.structureId,drawPosition:e,participantId:n});if(r.error)return{success:!1,error:r.error};let{tournamentRecord:i}=t.tournamentEngine.getState()||{};return this.tournamentRecord=i,this.focusDrawPosition=e+1,this.renderCallback&&this.renderCallback(),{success:!0}}getAndClearFocusDrawPosition(){let e=this.focusDrawPosition;return this.focusDrawPosition=void 0,e}assignBye({drawPosition:e}){t.tournamentEngine.setState(this.tournamentRecord);let n=t.tournamentEngine.assignDrawPositionBye({drawId:this.drawId,structureId:this.structureId,drawPosition:e});if(n.error)return{success:!1,error:n.error};let{tournamentRecord:r}=t.tournamentEngine.getState()||{};return this.tournamentRecord=r,this.focusDrawPosition=e+1,this.renderCallback&&this.renderCallback(),{success:!0}}assignQualifier({drawPosition:e}){t.tournamentEngine.setState(this.tournamentRecord);let n=t.tournamentEngine.assignDrawPosition({drawId:this.drawId,structureId:this.structureId,drawPosition:e,qualifier:!0});if(n.error)return{success:!1,error:n.error};let{tournamentRecord:r}=t.tournamentEngine.getState()||{};return this.tournamentRecord=r,this.focusDrawPosition=e+1,this.renderCallback&&this.renderCallback(),{success:!0}}getMatchUps(){t.tournamentEngine.setState(this.tournamentRecord);let{eventData:e}=t.tournamentEngine.getEventData({eventId:this.eventId})||{},n=(e?.drawsData?.find(e=>e.drawId===this.drawId))?.structures?.find(e=>e.structureId===this.structureId)?.roundMatchUps;return n?Object.values(n).flat():[]}getState(){return this.tournamentRecord}getContext(){return{drawId:this.drawId,structureId:this.structureId}}};function fh(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ph(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function mh(e){let t,n,r;e.length===2?(t=e===fh||e===ph?e:hh,n=e,r=e):(t=fh,n=(t,n)=>fh(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function hh(){return 0}function gh(e){return e===null?NaN:+e}var _h=mh(fh),vh=_h.right;_h.left,mh(gh).center;var yh=Math.sqrt(50),bh=Math.sqrt(10),xh=Math.sqrt(2);function Sh(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=yh?10:a>=bh?5:a>=xh?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?Sh(e,t,n*2):[s,c,l]}function Ch(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?Sh(t,e,n):Sh(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function wh(e,t,n){return t=+t,e=+e,n=+n,Sh(e,t,n)[2]}function Th(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?wh(t,e,n):wh(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Eh(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}var Dh={value:()=>{}};function Oh(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new kh(n)}function kh(e){this._=e}function Ah(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}kh.prototype=Oh.prototype={constructor:kh,on:function(e,t){var n=this._,r=Ah(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=jh(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=Mh(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Mh(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new kh(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function jh(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Mh(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Dh,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Nh={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function Ph(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),Nh.hasOwnProperty(t)?{space:Nh[t],local:e}:e}function Fh(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function Ih(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Lh(e){var t=Ph(e);return(t.local?Ih:Fh)(t)}function Rh(){}function zh(e){return e==null?Rh:function(){return this.querySelector(e)}}function Bh(e){typeof e!=`function`&&(e=zh(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new O_(r,this._parents)}function Vh(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Hh(){return[]}function Uh(e){return e==null?Hh:function(){return this.querySelectorAll(e)}}function Wh(e){return function(){return Vh(e.apply(this,arguments))}}function Gh(e){e=typeof e==`function`?Wh(e):Uh(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new O_(r,i)}function Kh(e){return function(){return this.matches(e)}}function qh(e){return function(t){return t.matches(e)}}var Jh=Array.prototype.find;function Yh(e){return function(){return Jh.call(this.children,e)}}function Xh(){return this.firstElementChild}function Zh(e){return this.select(e==null?Xh:Yh(typeof e==`function`?e:qh(e)))}var Qh=Array.prototype.filter;function $h(){return Array.from(this.children)}function eg(e){return function(){return Qh.call(this.children,e)}}function tg(e){return this.selectAll(e==null?$h:eg(typeof e==`function`?e:qh(e)))}function ng(e){typeof e!=`function`&&(e=Kh(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new O_(r,this._parents)}function rg(e){return Array(e.length)}function ig(){return new O_(this._enter||this._groups.map(rg),this._parents)}function ag(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ag.prototype={constructor:ag,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function og(e){return function(){return e}}function sg(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new ag(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function cg(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new ag(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function lg(e){return e.__data__}function ug(e,t){if(!arguments.length)return Array.from(this,lg);var n=t?cg:sg,r=this._parents,i=this._groups;typeof e!=`function`&&(e=og(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=dg(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new O_(o,r),o._enter=s,o._exit=c,o}function dg(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function fg(){return new O_(this._exit||this._groups.map(rg),this._parents)}function pg(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function mg(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new O_(s,this._parents)}function hg(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function gg(e){e||=_g;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new O_(i,this._parents).order()}function _g(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function vg(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function yg(){return Array.from(this)}function bg(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function xg(){let e=0;for(let t of this)++e;return e}function Sg(){return!this.node()}function Cg(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function wg(e){return function(){this.removeAttribute(e)}}function Tg(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Eg(e,t){return function(){this.setAttribute(e,t)}}function Dg(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Og(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function kg(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Ag(e,t){var n=Ph(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Tg:wg:typeof t==`function`?n.local?kg:Og:n.local?Dg:Eg)(n,t))}function jg(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Mg(e){return function(){this.style.removeProperty(e)}}function Ng(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Pg(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Fg(e,t,n){return arguments.length>1?this.each((t==null?Mg:typeof t==`function`?Pg:Ng)(e,t,n??``)):Ig(this.node(),e)}function Ig(e,t){return e.style.getPropertyValue(t)||jg(e).getComputedStyle(e,null).getPropertyValue(t)}function Lg(e){return function(){delete this[e]}}function Rg(e,t){return function(){this[e]=t}}function zg(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Bg(e,t){return arguments.length>1?this.each((t==null?Lg:typeof t==`function`?zg:Rg)(e,t)):this.node()[e]}function Vg(e){return e.trim().split(/^|\s+/)}function Hg(e){return e.classList||new Ug(e)}function Ug(e){this._node=e,this._names=Vg(e.getAttribute(`class`)||``)}Ug.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function Wg(e,t){for(var n=Hg(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Gg(e,t){for(var n=Hg(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Kg(e){return function(){Wg(this,e)}}function qg(e){return function(){Gg(this,e)}}function Jg(e,t){return function(){(t.apply(this,arguments)?Wg:Gg)(this,e)}}function Yg(e,t){var n=Vg(e+``);if(arguments.length<2){for(var r=Hg(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?Jg:t?Kg:qg)(n,t))}function Xg(){this.textContent=``}function Zg(e){return function(){this.textContent=e}}function Qg(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function $g(e){return arguments.length?this.each(e==null?Xg:(typeof e==`function`?Qg:Zg)(e)):this.node().textContent}function e_(){this.innerHTML=``}function t_(e){return function(){this.innerHTML=e}}function n_(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function r_(e){return arguments.length?this.each(e==null?e_:(typeof e==`function`?n_:t_)(e)):this.node().innerHTML}function i_(){this.nextSibling&&this.parentNode.appendChild(this)}function a_(){return this.each(i_)}function o_(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function s_(){return this.each(o_)}function c_(e){var t=typeof e==`function`?e:Lh(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function l_(){return null}function u_(e,t){var n=typeof e==`function`?e:Lh(e),r=t==null?l_:typeof t==`function`?t:zh(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function d_(){var e=this.parentNode;e&&e.removeChild(this)}function f_(){return this.each(d_)}function p_(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function m_(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function h_(e){return this.select(e?m_:p_)}function g_(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function __(e){return function(t){e.call(this,t,this.__data__)}}function v_(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function y_(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function b_(e,t,n){return function(){var r=this.__on,i,a=__(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function x_(e,t,n){var r=v_(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?b_:y_,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function S_(e,t,n){var r=jg(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function C_(e,t){return function(){return S_(this,e,t)}}function w_(e,t){return function(){return S_(this,e,t.apply(this,arguments))}}function T_(e,t){return this.each((typeof t==`function`?w_:C_)(e,t))}function*E_(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var D_=[null];function O_(e,t){this._groups=e,this._parents=t}function k_(){return new O_([[document.documentElement]],D_)}function A_(){return this}O_.prototype=k_.prototype={constructor:O_,select:Bh,selectAll:Gh,selectChild:Zh,selectChildren:tg,filter:ng,data:ug,enter:ig,exit:fg,join:pg,merge:mg,selection:A_,order:hg,sort:gg,call:vg,nodes:yg,node:bg,size:xg,empty:Sg,each:Cg,attr:Ag,style:Fg,property:Bg,classed:Yg,text:$g,html:r_,raise:a_,lower:s_,append:c_,insert:u_,remove:f_,clone:h_,datum:g_,on:x_,dispatch:T_,[Symbol.iterator]:E_};function j_(e){return typeof e==`string`?new O_([[document.querySelector(e)]],[document.documentElement]):new O_([[e]],D_)}function M_(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function N_(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function P_(){}var F_=.7,I_=1/F_,L_=`\\s*([+-]?\\d+)\\s*`,R_=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,z_=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,B_=/^#([0-9a-f]{3,8})$/,V_=RegExp(`^rgb\\(${L_},${L_},${L_}\\)$`),H_=RegExp(`^rgb\\(${z_},${z_},${z_}\\)$`),U_=RegExp(`^rgba\\(${L_},${L_},${L_},${R_}\\)$`),W_=RegExp(`^rgba\\(${z_},${z_},${z_},${R_}\\)$`),G_=RegExp(`^hsl\\(${R_},${z_},${z_}\\)$`),K_=RegExp(`^hsla\\(${R_},${z_},${z_},${R_}\\)$`),q_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};M_(P_,Q_,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:J_,formatHex:J_,formatHex8:Y_,formatHsl:X_,formatRgb:Z_,toString:Z_});function J_(){return this.rgb().formatHex()}function Y_(){return this.rgb().formatHex8()}function X_(){return dv(this).formatHsl()}function Z_(){return this.rgb().formatRgb()}function Q_(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=B_.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?$_(t):n===3?new rv(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ev(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ev(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=V_.exec(e))?new rv(t[1],t[2],t[3],1):(t=H_.exec(e))?new rv(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=U_.exec(e))?ev(t[1],t[2],t[3],t[4]):(t=W_.exec(e))?ev(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=G_.exec(e))?uv(t[1],t[2]/100,t[3]/100,1):(t=K_.exec(e))?uv(t[1],t[2]/100,t[3]/100,t[4]):q_.hasOwnProperty(e)?$_(q_[e]):e===`transparent`?new rv(NaN,NaN,NaN,0):null}function $_(e){return new rv(e>>16&255,e>>8&255,e&255,1)}function ev(e,t,n,r){return r<=0&&(e=t=n=NaN),new rv(e,t,n,r)}function tv(e){return e instanceof P_||(e=Q_(e)),e?(e=e.rgb(),new rv(e.r,e.g,e.b,e.opacity)):new rv}function nv(e,t,n,r){return arguments.length===1?tv(e):new rv(e,t,n,r??1)}function rv(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}M_(rv,nv,N_(P_,{brighter(e){return e=e==null?I_:I_**+e,new rv(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?F_:F_**+e,new rv(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new rv(cv(this.r),cv(this.g),cv(this.b),sv(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:iv,formatHex:iv,formatHex8:av,formatRgb:ov,toString:ov}));function iv(){return`#${lv(this.r)}${lv(this.g)}${lv(this.b)}`}function av(){return`#${lv(this.r)}${lv(this.g)}${lv(this.b)}${lv((isNaN(this.opacity)?1:this.opacity)*255)}`}function ov(){let e=sv(this.opacity);return`${e===1?`rgb(`:`rgba(`}${cv(this.r)}, ${cv(this.g)}, ${cv(this.b)}${e===1?`)`:`, ${e})`}`}function sv(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function cv(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function lv(e){return e=cv(e),(e<16?`0`:``)+e.toString(16)}function uv(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new pv(e,t,n,r)}function dv(e){if(e instanceof pv)return new pv(e.h,e.s,e.l,e.opacity);if(e instanceof P_||(e=Q_(e)),!e)return new pv;if(e instanceof pv)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new pv(o,s,c,e.opacity)}function fv(e,t,n,r){return arguments.length===1?dv(e):new pv(e,t,n,r??1)}function pv(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}M_(pv,fv,N_(P_,{brighter(e){return e=e==null?I_:I_**+e,new pv(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?F_:F_**+e,new pv(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new rv(gv(e>=240?e-240:e+120,i,r),gv(e,i,r),gv(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new pv(mv(this.h),hv(this.s),hv(this.l),sv(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=sv(this.opacity);return`${e===1?`hsl(`:`hsla(`}${mv(this.h)}, ${hv(this.s)*100}%, ${hv(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function mv(e){return e=(e||0)%360,e<0?e+360:e}function hv(e){return Math.max(0,Math.min(1,e||0))}function gv(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var _v=e=>()=>e;function vv(e,t){return function(n){return e+n*t}}function yv(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function bv(e){return(e=+e)==1?xv:function(t,n){return n-t?yv(t,n,e):_v(isNaN(t)?n:t)}}function xv(e,t){var n=t-e;return n?vv(e,n):_v(isNaN(e)?t:e)}var Sv=(function e(t){var n=bv(t);function r(e,t){var r=n((e=nv(e)).r,(t=nv(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=xv(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function Cv(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function wv(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Tv(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=Pv(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function Ev(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Dv(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Ov(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=Pv(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var kv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Av=new RegExp(kv.source,`g`);function jv(e){return function(){return e}}function Mv(e){return function(t){return e(t)+``}}function Nv(e,t){var n=kv.lastIndex=Av.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=kv.exec(e))&&(i=Av.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Dv(r,i)})),n=Av.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?Mv(c[0].x):jv(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function Pv(e,t){var n=typeof t,r;return t==null||n===`boolean`?_v(t):(n===`number`?Dv:n===`string`?(r=Q_(t))?(t=r,Sv):Nv:t instanceof Q_?Sv:t instanceof Date?Ev:wv(t)?Cv:Array.isArray(t)?Tv:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?Ov:Dv)(e,t)}function Fv(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Iv=180/Math.PI,Lv={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Rv(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Iv,skewX:Math.atan(c)*Iv,scaleX:o,scaleY:s}}var zv;function Bv(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Lv:Rv(t.a,t.b,t.c,t.d,t.e,t.f)}function Vv(e){return e==null||(zv||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),zv.setAttribute(`transform`,e),!(e=zv.transform.baseVal.consolidate()))?Lv:(e=e.matrix,Rv(e.a,e.b,e.c,e.d,e.e,e.f))}function Hv(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:Dv(e,i)},{i:c-2,x:Dv(r,a)})}else (i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:Dv(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:Dv(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:Dv(e,n)},{i:s-2,x:Dv(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Uv=Hv(Bv,`px, `,`px)`,`deg)`),Wv=Hv(Vv,`, `,`)`,`)`),Gv=0,Kv=0,qv=0,Jv=1e3,Yv,Xv,Zv=0,Qv=0,$v=0,ey=typeof performance==`object`&&performance.now?performance:Date,ty=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ny(){return Qv||=(ty(ry),ey.now()+$v)}function ry(){Qv=0}function iy(){this._call=this._time=this._next=null}iy.prototype=ay.prototype={constructor:iy,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?ny():+n)+(t==null?0:+t),!this._next&&Xv!==this&&(Xv?Xv._next=this:Yv=this,Xv=this),this._call=e,this._time=n,uy()},stop:function(){this._call&&(this._call=null,this._time=1/0,uy())}};function ay(e,t,n){var r=new iy;return r.restart(e,t,n),r}function oy(){ny(),++Gv;for(var e=Yv,t;e;)(t=Qv-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Gv}function sy(){Qv=(Zv=ey.now())+$v,Gv=Kv=0;try{oy()}finally{Gv=0,ly(),Qv=0}}function cy(){var e=ey.now(),t=e-Zv;t>Jv&&($v-=t,Zv=e)}function ly(){for(var e,t=Yv,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Yv=n);Xv=e,uy(r)}function uy(e){Gv||(Kv&&=clearTimeout(Kv),e-Qv>24?(e<1/0&&(Kv=setTimeout(sy,e-ey.now()-$v)),qv&&=clearInterval(qv)):(qv||=(Zv=ey.now(),setInterval(cy,Jv)),Gv=1,ty(sy)))}function dy(e,t,n){var r=new iy;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var fy=Oh(`start`,`end`,`cancel`,`interrupt`),py=[];function my(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;vy(e,n,{name:t,index:r,group:i,on:fy,tween:py,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function hy(e,t){var n=_y(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function gy(e,t){var n=_y(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function _y(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function vy(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=ay(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return dy(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(dy(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function yy(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function by(e){return this.each(function(){yy(this,e)})}function xy(e,t){var n,r;return function(){var i=gy(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Sy(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=gy(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function Cy(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=_y(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?xy:Sy)(n,e,t))}function wy(e,t,n){var r=e._id;return e.each(function(){var e=gy(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return _y(e,r).value[t]}}function Ty(e,t){var n;return(typeof t==`number`?Dv:t instanceof Q_?Sv:(n=Q_(t))?(t=n,Sv):Nv)(e,t)}function Ey(e){return function(){this.removeAttribute(e)}}function Dy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Oy(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function ky(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function Ay(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function jy(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function My(e,t){var n=Ph(e),r=n===`transform`?Wv:Ty;return this.attrTween(e,typeof t==`function`?(n.local?jy:Ay)(n,r,wy(this,`attr.`+e,t)):t==null?(n.local?Dy:Ey)(n):(n.local?ky:Oy)(n,r,t))}function Ny(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Py(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Fy(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Py(e,i)),n}return i._value=t,i}function Iy(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Ny(e,i)),n}return i._value=t,i}function Ly(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=Ph(e);return this.tween(n,(r.local?Fy:Iy)(r,t))}function Ry(e,t){return function(){hy(this,e).delay=+t.apply(this,arguments)}}function zy(e,t){return t=+t,function(){hy(this,e).delay=t}}function By(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Ry:zy)(t,e)):_y(this.node(),t).delay}function Vy(e,t){return function(){gy(this,e).duration=+t.apply(this,arguments)}}function Hy(e,t){return t=+t,function(){gy(this,e).duration=t}}function Uy(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Vy:Hy)(t,e)):_y(this.node(),t).duration}function Wy(e,t){if(typeof t!=`function`)throw Error();return function(){gy(this,e).ease=t}}function Gy(e){var t=this._id;return arguments.length?this.each(Wy(t,e)):_y(this.node(),t).ease}function Ky(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();gy(this,e).ease=n}}function qy(e){if(typeof e!=`function`)throw Error();return this.each(Ky(this._id,e))}function Jy(e){typeof e!=`function`&&(e=Kh(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Cb(r,this._parents,this._name,this._id)}function Yy(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new Cb(o,this._parents,this._name,this._id)}function Xy(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function Zy(e,t,n){var r,i,a=Xy(t)?hy:gy;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Qy(e,t){var n=this._id;return arguments.length<2?_y(this.node(),n).on.on(e):this.each(Zy(n,e,t))}function $y(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function eb(){return this.on(`end.remove`,$y(this._id))}function tb(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=zh(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,my(l[f],t,n,f,l,_y(u,n)));return new Cb(a,this._parents,t,n)}function nb(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=Uh(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=_y(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&my(p,t,n,h,f,m);a.push(f),o.push(u)}return new Cb(a,o,t,n)}var rb=k_.prototype.constructor;function ib(){return new rb(this._groups,this._parents)}function ab(e,t){var n,r,i;return function(){var a=Ig(this,e),o=(this.style.removeProperty(e),Ig(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function ob(e){return function(){this.style.removeProperty(e)}}function sb(e,t,n){var r,i=n+``,a;return function(){var o=Ig(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function cb(e,t,n){var r,i,a;return function(){var o=Ig(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),Ig(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function lb(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=gy(this,e),l=c.on,u=c.value[a]==null?s||=ob(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function ub(e,t,n){var r=(e+=``)==`transform`?Uv:Ty;return t==null?this.styleTween(e,ab(e,r)).on(`end.style.`+e,ob(e)):typeof t==`function`?this.styleTween(e,cb(e,r,wy(this,`style.`+e,t))).each(lb(this._id,e)):this.styleTween(e,sb(e,r,t),n).on(`end.style.`+e,null)}function db(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function fb(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&db(e,a,n)),r}return a._value=t,a}function pb(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,fb(e,t,n??``))}function mb(e){return function(){this.textContent=e}}function hb(e){return function(){var t=e(this);this.textContent=t??``}}function gb(e){return this.tween(`text`,typeof e==`function`?hb(wy(this,`text`,e)):mb(e==null?``:e+``))}function _b(e){return function(t){this.textContent=e.call(this,t)}}function vb(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&_b(r)),t}return r._value=e,r}function yb(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,vb(e))}function bb(){for(var e=this._name,t=this._id,n=Tb(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=_y(c,t);my(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Cb(r,this._parents,e,n)}function xb(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=gy(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var Sb=0;function Cb(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function wb(e){return k_().transition(e)}function Tb(){return++Sb}var Eb=k_.prototype;Cb.prototype=wb.prototype={constructor:Cb,select:tb,selectAll:nb,selectChild:Eb.selectChild,selectChildren:Eb.selectChildren,filter:Jy,merge:Yy,selection:ib,transition:bb,call:Eb.call,nodes:Eb.nodes,node:Eb.node,size:Eb.size,empty:Eb.empty,each:Eb.each,on:Qy,attr:My,attrTween:Ly,style:ub,styleTween:pb,text:gb,textTween:yb,remove:eb,tween:Cy,delay:By,duration:Uy,ease:Gy,easeVarying:qy,end:xb,[Symbol.iterator]:Eb[Symbol.iterator]};function Db(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Ob={time:null,delay:0,duration:250,ease:Db};function kb(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function Ab(e){var t,n;e instanceof Cb?(t=e._id,e=e._name):(t=Tb(),(n=Ob).time=ny(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&my(c,e,t,l,o,n||kb(c,t));return new Cb(r,this._parents,e,t)}k_.prototype.interrupt=by,k_.prototype.transition=Ab;var{abs:jb,max:Mb,min:Nb}=Math;[`w`,`e`].map(Pb),[`n`,`s`].map(Pb),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(Pb);function Pb(e){return{type:e}}var Fb=Math.PI,Ib=2*Fb,Lb=1e-6,Rb=Ib-Lb;function zb(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Bb(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return zb;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var Vb=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?zb:Bb(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Lb)if(!(Math.abs(u*s-c*l)>Lb)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Fb-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Lb&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Lb||Math.abs(this._y1-l)>Lb)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%Ib+Ib),d>Rb?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Lb&&this._append`A${n},${n},0,${+(d>=Fb)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function Hb(){return new Vb}Hb.prototype=Vb.prototype;function Ub(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function Wb(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Gb(e){return e=Wb(Math.abs(e)),e?e[1]:NaN}function Kb(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function qb(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var Jb=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Yb(e){if(!(t=Jb.exec(e)))throw Error(`invalid format: `+e);var t;return new Xb({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Yb.prototype=Xb.prototype;function Xb(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}Xb.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function Zb(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Qb;function $b(e,t){var n=Wb(e,t);if(!n)return Qb=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Qb=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+Wb(e,Math.max(0,t+a-1))[0]}function ex(e,t){var n=Wb(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var tx={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:Ub,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>ex(e*100,t),r:ex,s:$b,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function nx(e){return e}var rx=Array.prototype.map,ix=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function ax(e){var t=e.grouping===void 0||e.thousands===void 0?nx:Kb(rx.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?nx:qb(rx.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=Yb(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):tx[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=tx[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=Zb(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&Qb!==void 0?ix[8+Qb/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r;break}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(Gb(t)/3)))*3,r=10**-n,i=l((e=Yb(e),e.type=`f`,e),{suffix:ix[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var ox,sx,cx;lx({thousands:`,`,grouping:[3],currency:[`$`,``]});function lx(e){return ox=ax(e),sx=ox.format,cx=ox.formatPrefix,ox}function ux(e){return Math.max(0,-Gb(Math.abs(e)))}function dx(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Gb(t)/3)))*3-Gb(Math.abs(e)))}function fx(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Gb(t)-Gb(e))+1}function px(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function mx(){return this.eachAfter(px)}function hx(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function gx(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function _x(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function vx(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function yx(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function bx(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function xx(e){for(var t=this,n=Sx(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function Sx(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function Cx(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function wx(){return Array.from(this)}function Tx(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Ex(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*Dx(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function Ox(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=jx)):t===void 0&&(t=Ax);for(var n=new Px(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new Px(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(Nx)}function kx(){return Ox(this).eachBefore(Mx)}function Ax(e){return e.children}function jx(e){return Array.isArray(e)?e[1]:null}function Mx(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Nx(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Px(e){this.data=e,this.depth=this.height=0,this.parent=null}Px.prototype=Ox.prototype={constructor:Px,count:mx,each:hx,eachAfter:_x,eachBefore:gx,find:vx,sum:yx,sort:bx,path:xx,ancestors:Cx,descendants:wx,leaves:Tx,links:Ex,copy:kx,[Symbol.iterator]:Dx};function Fx(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ix(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function Lx(){var e=1,t=1,n=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=n,i.x1=e,i.y1=t/o,i.eachBefore(a(t,o)),r&&i.eachBefore(Fx),i}function a(e,t){return function(r){r.children&&Ix(r,r.x0,e*(r.depth+1)/t,r.x1,e*(r.depth+2)/t);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}return i.round=function(e){return arguments.length?(r=!!e,i):r},i.size=function(n){return arguments.length?(e=+n[0],t=+n[1],i):[e,t]},i.padding=function(e){return arguments.length?(n=+e,i):n},i}function Rx(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function zx(e){return function(){return e}}function Bx(e){return+e}var Vx=[0,1];function Hx(e){return e}function Ux(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:zx(isNaN(t)?NaN:.5)}function Wx(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function Gx(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=Ux(i,r),a=n(o,a)):(r=Ux(r,i),a=n(a,o)),function(e){return a(r(e))}}function Kx(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=Ux(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=vh(e,t,1,r)-1;return a[n](i[n](t))}}function qx(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Jx(){var e=Vx,t=Vx,n=Pv,r,i,a,o=Hx,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==Hx&&(o=Wx(e[0],e[n-1])),s=n>2?Kx:Gx,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),Dv))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,Bx),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=Fv,u()},d.clamp=function(e){return arguments.length?(o=e?!0:Hx,u()):o!==Hx},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function Yx(){return Jx()(Hx,Hx)}function Xx(e,t,n,r){var i=Th(e,t,n),a;switch(r=Yb(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=dx(i,o))&&(r.precision=a),cx(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=fx(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=ux(i))&&(r.precision=a-(r.type===`%`)*2);break}return sx(r)}function Zx(e){var t=e.domain;return e.ticks=function(e){var n=t();return Ch(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return Xx(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=wh(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function Qx(){var e=Yx();return e.copy=function(){return qx(e,Qx())},Rx.apply(e,arguments),Zx(e)}function $x(e){return function(){return e}}var eS=Math.abs,tS=Math.atan2,nS=Math.cos,rS=Math.max,iS=Math.min,aS=Math.sin,oS=Math.sqrt,sS=Math.PI,cS=sS/2,lS=2*sS;function uS(e){return e>1?0:e<-1?sS:Math.acos(e)}function dS(e){return e>=1?cS:e<=-1?-cS:Math.asin(e)}function fS(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Vb(t)}function pS(e){return e.innerRadius}function mS(e){return e.outerRadius}function hS(e){return e.startAngle}function gS(e){return e.endAngle}function _S(e){return e&&e.padAngle}function vS(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function yS(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/oS(s*s+c*c),u=l*c,d=-l*s,f=e+u,p=t+d,m=n+u,h=r+d,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=v*v+y*y,x=i-a,S=f*h-m*p,C=(y<0?-1:1)*oS(rS(0,x*x*b-S*S)),w=(S*y-v*C)/b,T=(-S*v-y*C)/b,E=(S*y+v*C)/b,D=(-S*v+y*C)/b,O=w-g,k=T-_,A=E-g,j=D-_;return O*O+k*k>A*A+j*j&&(w=E,T=D),{cx:w,cy:T,x01:-u,y01:-d,x11:w*(i/x-1),y11:T*(i/x-1)}}function bS(){var e=pS,t=mS,n=$x(0),r=null,i=hS,a=gS,o=_S,s=null,c=fS(l);function l(){var l,u,d=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-cS,m=a.apply(this,arguments)-cS,h=eS(m-p),g=m>p;if(s||=l=c(),f<d&&(u=f,f=d,d=u),!(f>1e-12))s.moveTo(0,0);else if(h>lS-1e-12)s.moveTo(f*nS(p),f*aS(p)),s.arc(0,0,f,p,m,!g),d>1e-12&&(s.moveTo(d*nS(m),d*aS(m)),s.arc(0,0,d,m,p,g));else{var _=p,v=m,y=p,b=m,x=h,S=h,C=o.apply(this,arguments)/2,w=C>1e-12&&(r?+r.apply(this,arguments):oS(d*d+f*f)),T=iS(eS(f-d)/2,+n.apply(this,arguments)),E=T,D=T,O,k;if(w>1e-12){var A=dS(w/d*aS(C)),j=dS(w/f*aS(C));(x-=A*2)>1e-12?(A*=g?1:-1,y+=A,b-=A):(x=0,y=b=(p+m)/2),(S-=j*2)>1e-12?(j*=g?1:-1,_+=j,v-=j):(S=0,_=v=(p+m)/2)}var M=f*nS(_),N=f*aS(_),P=d*nS(b),F=d*aS(b);if(T>1e-12){var I=f*nS(v),L=f*aS(v),ee=d*nS(y),R=d*aS(y),z;if(h<sS)if(z=vS(M,N,ee,R,I,L,P,F)){var te=M-z[0],ne=N-z[1],re=I-z[0],B=L-z[1],ie=1/aS(uS((te*re+ne*B)/(oS(te*te+ne*ne)*oS(re*re+B*B)))/2),ae=oS(z[0]*z[0]+z[1]*z[1]);E=iS(T,(d-ae)/(ie-1)),D=iS(T,(f-ae)/(ie+1))}else E=D=0}S>1e-12?D>1e-12?(O=yS(ee,R,M,N,f,D,g),k=yS(I,L,P,F,f,D,g),s.moveTo(O.cx+O.x01,O.cy+O.y01),D<T?s.arc(O.cx,O.cy,D,tS(O.y01,O.x01),tS(k.y01,k.x01),!g):(s.arc(O.cx,O.cy,D,tS(O.y01,O.x01),tS(O.y11,O.x11),!g),s.arc(0,0,f,tS(O.cy+O.y11,O.cx+O.x11),tS(k.cy+k.y11,k.cx+k.x11),!g),s.arc(k.cx,k.cy,D,tS(k.y11,k.x11),tS(k.y01,k.x01),!g))):(s.moveTo(M,N),s.arc(0,0,f,_,v,!g)):s.moveTo(M,N),!(d>1e-12)||!(x>1e-12)?s.lineTo(P,F):E>1e-12?(O=yS(P,F,I,L,d,-E,g),k=yS(M,N,ee,R,d,-E,g),s.lineTo(O.cx+O.x01,O.cy+O.y01),E<T?s.arc(O.cx,O.cy,E,tS(O.y01,O.x01),tS(k.y01,k.x01),!g):(s.arc(O.cx,O.cy,E,tS(O.y01,O.x01),tS(O.y11,O.x11),!g),s.arc(0,0,d,tS(O.cy+O.y11,O.cx+O.x11),tS(k.cy+k.y11,k.cx+k.x11),g),s.arc(k.cx,k.cy,E,tS(k.y11,k.x11),tS(k.y01,k.x01),!g))):s.arc(0,0,d,b,y,g)}if(s.closePath(),l)return s=null,l+``||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-sS/2;return[nS(r)*n,aS(r)*n]},l.innerRadius=function(t){return arguments.length?(e=typeof t==`function`?t:$x(+t),l):e},l.outerRadius=function(e){return arguments.length?(t=typeof e==`function`?e:$x(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n=typeof e==`function`?e:$x(+e),l):n},l.padRadius=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:$x(+e),l):r},l.startAngle=function(e){return arguments.length?(i=typeof e==`function`?e:$x(+e),l):i},l.endAngle=function(e){return arguments.length?(a=typeof e==`function`?e:$x(+e),l):a},l.padAngle=function(e){return arguments.length?(o=typeof e==`function`?e:$x(+e),l):o},l.context=function(e){return arguments.length?(s=e??null,l):s},l}function xS(e,t,n){this.k=e,this.x=t,this.y=n}xS.prototype={constructor:xS,scale:function(e){return e===1?this:new xS(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new xS(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var SS=new xS(1,0,0);CS.prototype=xS.prototype;function CS(e){for(;!e.__zoom;)if(!(e=e.parentNode))return SS;return e.__zoom}function wS(e,t=15){let n=e.split(` `),r=[],i=[],a=0;return n.forEach(e=>{a+e.length>t?(i.length&&r.push(i.join(` `)),i=[e],a=e.length):(i.push(e),a+=e.length+ +(i.length>0))}),i.length&&r.push(i.join(` `)),r}var{WILDCARD:TS,QUALIFIER:ES,LUCKY_LOSER:DS}=t.entryStatusConstants,OS=`text-anchor`,kS=`dominant-baseline`,AS=`fill-opacity`,jS=Object.assign({},...t.fixtures.countries.filter(e=>e.ioc).map(e=>({[e.ioc]:e.iso2})),...t.fixtures.countries.filter(e=>e.iso).map(e=>({[e.iso]:e.iso2})));function MS(e){let t=Math.floor(e.length/2),n=e.slice(0,t),r=e.slice(t).reverse();return[...n,...r]}function NS(e){if(e)switch(e){case TS:return`WC`;case ES:return`Q`;case DS:return`LL`;default:return e}}function PS(e,t){let n=[];for(let r of e)for(let e of r.sides){let i=r.matchUpStatus===`BYE`&&!e.participantName;n.push({name:e.participantName||(i?`BYE`:``),participantName:e.participantName||(i?`BYE`:void 0),drawPosition:e.drawPosition,seedNumber:e.seedNumber,entryStatus:NS(e.entryStatus),nationalityCode:e.nationalityCode,matchUp:r,depth:t,value:1})}return n}function FS(e,t){let n=e.winningSide!==void 0&&e.winningSide!==null?e.sides.find(t=>t.sideNumber===e.winningSide):void 0;!n&&e.matchUpStatus===`BYE`&&(n=e.sides.find(e=>e.participantName));let r=n?.participantName,i=r?t.get(r):void 0;return{winnerName:r,winnerSide:n,winnerLookup:i}}function IS(e,t,n,r){return e.map((e,i)=>{let a=i*2,o=[t[a],t[a+1]].filter(Boolean),{winnerName:s,winnerSide:c,winnerLookup:l}=FS(e,r);return{name:s||``,participantName:s,drawPosition:l?.drawPosition??c?.drawPosition,seedNumber:c?.seedNumber??l?.seedNumber,entryStatus:NS(c?.entryStatus)??l?.entryStatus,nationalityCode:c?.nationalityCode??l?.nationalityCode,scoreString:e.scoreString,matchUpStatus:e.matchUpStatus,matchUp:e,depth:n,children:o.length>0?o:void 0}})}function LS(e){let{roundMatchUps:t}=e,n=Object.keys(t).map(Number).sort((e,t)=>e-t);if(n.length===0)throw Error(`No round data found in draw`);let r=t[n[0]],i=MS(PS(r,n.length)),a=new Map;for(let e of i)e.participantName&&e.participantName!==`BYE`&&a.set(e.participantName,e);let o=IS(MS(r),i,n.length-1,a);for(let e=1;e<n.length;e++)o=IS(MS(t[n[e]]),o,n.length-1-e,a);return o.length===1?o[0]:{name:`Tournament`,depth:0,children:o}}function RS(e,t){if(!e)return;let{seedNumber:n,entryStatus:r,drawPosition:i,participantName:a}=e,o;if(a?.trim().toUpperCase()===`BYE`)o=`#B0BEC5`;else if(n){let e=Number(n),t=Qx().domain([1,32]).range([`0`,`1`]);o=Qx().domain(Eh(0,1,1/7)).range([`#81D4FA`,`#42A5F5`,`#1E88E5`,`#1565C0`,`#5C6BC0`,`#673AB7`,`#9C27B0`])(Number(t(e)))}else if(r?.toUpperCase()===`WC`)o=`red`;else if(r&&(r===`Q`||r===`LL`))o=Qx().domain(Eh(0,1,1/3)).range([`#FFF176`,`#FBC02D`,`#FF9800`])(t(i));else{let e=[`#C8E6C9`,`#81C784`,`#66BB6A`,`#4CAF50`,`#43A047`,`#388E3C`,`#2E7D32`,`#1B5E20`,`#A5D6A7`,`#90CAF9`,`#64B5F6`,`#42A5F5`,`#2196F3`,`#1E88E5`,`#1976D2`,`#1565C0`];o=Qx().domain(Eh(0,1,1/e.length)).range(e)(t(i))}e.color=o,e.children&&e.children.forEach(n=>{n.participantName===e.participantName&&(n.color=o),RS(n,t)})}function zS(e,t){let n=[];return e.seedNumber?n.push(`Seed ${e.seedNumber}`):e.entryStatus&&n.push(e.entryStatus),t===7&&e.drawPosition&&n.push(`Draw ${e.drawPosition}`),n.length>0?n.join(` • `):void 0}function BS(e,t){let n=e.find(e=>e.data.participantName&&e.data.participantName!==t);return n?.data.participantName?n.data:void 0}function VS(e,t){let n=[e.participantName],r;if(t.children&&t.children.length>0)e.scoreString&&n.push(e.scoreString),r=BS(t.children,e.participantName),r&&n.push(r.participantName);else{let r=zS(e,t.depth);r&&n.push(r)}return{messageLines:n,opponentData:r}}function HS(e,t){return-(e*t/2)+t/2}function US(e,t,n){let r=j_(e).append(`svg`).attr(`width`,t).attr(`height`,n).style(`display`,`block`),i=r.append(`g`).attr(`transform`,`translate(${t/2}, ${n/2})`);return{svg:r,g:i,flagsGroup:i.append(`g`).attr(`class`,`flags-group`),winningFlagsGroup:i.append(`g`).attr(`class`,`winning-flags-group`),losingFlagsGroup:i.append(`g`).attr(`class`,`losing-flags-group`)}}function WS(e,t,n,r,i){let a=e.append(`text`).attr(`x`,t/2).attr(`y`,n/2).attr(OS,`middle`).attr(kS,`middle`).attr(`font-size`,`${r}px`).attr(`font-weight`,`bold`).style(`fill`,`var(--chc-text-primary, #333)`).attr(`pointer-events`,`none`),o=r+i*.5;return{centerText:a,centerText2:e.append(`text`).attr(`x`,t/2).attr(`y`,n/2+o).attr(OS,`middle`).attr(kS,`middle`).attr(`font-size`,`${i}px`).style(`fill`,`var(--chc-text-secondary, #666)`).attr(`pointer-events`,`none`)}}function GS(e,t,n,r,i,a,o){n&&(i?(t.flagsGroup.selectAll(`text`).remove(),t.winningFlagsGroup.selectAll(`text`).remove(),t.losingFlagsGroup.selectAll(`text`).remove()):e.selectAll(`text`).remove(),e.append(`text`).attr(`font-size`,`${o}px`).attr(OS,`middle`).attr(kS,`middle`).attr(`transform`,`translate(0, ${r*a})`).text(YS(n)))}function KS(e,n,r,i={}){let a=i.width||800,o=i.height||800,s=Math.min(a,o)/800*(i.textScaleFactor??1),c=28*s,l=24*s,u=30*s,d=r||i.title||`Tournament`,f=Object.assign({},...t.fixtures.countries.filter(e=>e.label).map(e=>({[e.ioc]:e.label}))),p=LS(n),m=Ox(p,e=>e.children).sum(e=>e.value||0),h=Math.min(a,o)/2,g=h/2,_=e=>e*h/200;Lx().size([2*Math.PI,h-g])(m),RS(p,Qx().domain([0,n.drawSize||128]).range([0,1]));let v=m.descendants(),y=bS().startAngle(e=>e.x0).endAngle(e=>e.x1).innerRadius(e=>e.y0+g).outerRadius(e=>e.y1+g),{svg:b,g:x,flagsGroup:S,winningFlagsGroup:C,losingFlagsGroup:w}=US(e,a,o),T=new Set,E=e=>{e.nationalityCode&&T.add(e.nationalityCode),e.children&&e.children.forEach(E)};E(p);let D=Array.from(T),{centerText:O,centerText2:k}=WS(b,a,o,c,l);function A(){let e=wS(d,15);O.text(``),O.selectAll(`tspan`).remove(),k.text(``),k.selectAll(`tspan`).remove(),O.selectAll(`tspan`).data(e).join(`tspan`).attr(`x`,a/2).attr(`dy`,(e,t)=>t===0?0:u).text(e=>e);let t=-(e.length*u/2)+u/2;O.attr(`y`,o/2+t),O.style(`display`,`block`),k.style(`display`,`none`)}function j(){if(S.selectAll(`text`).remove(),C.selectAll(`text`).remove(),w.selectAll(`text`).remove(),D.length===0)return;let e=Qx().domain([0,D.length]).range([0,Math.PI*2]),t=_(20),n=g-t+10;S.selectAll(`text`).data(D).join(`text`).attr(`font-size`,`${t}px`).attr(OS,`middle`).attr(kS,`middle`).attr(`transform`,(t,r)=>{let i=e(r);return`translate(${Math.cos(i)*n}, ${Math.sin(i)*n})`}).text(e=>YS(e)).style(`cursor`,`pointer`).on(`mouseover`,function(e,t){let n=f[t]||t;O.selectAll(`tspan`).remove(),O.attr(`y`,o/2),O.text(n).style(`display`,`block`),k.selectAll(`tspan`).remove(),k.text(``).style(`display`,`none`),N||x.selectAll(`path`).attr(AS,e=>e.data.nationalityCode===t?.9:.3)}).on(`mouseout`,function(){N||x.selectAll(`path`).attr(AS,.8),A()})}j(),A();let M=i.eventHandlers?.clickCenter;M&&x.insert(`circle`,`:first-child`).attr(`r`,g).attr(`fill`,`transparent`).style(`cursor`,`pointer`).on(`click`,M);let N=!1,P;function F(e,t){let n=t.data;if(n.participantName){let{messageLines:e,opponentData:r}=VS(n,t);r&&(n.opponent=r),O.selectAll(`tspan`).remove(),O.text(``),O.selectAll(`tspan`).data(e).join(`tspan`).attr(`x`,a/2).attr(`dy`,(e,t)=>t===0?0:u).text(e=>e);let i=HS(e.length,u);O.attr(`y`,o/2+i),O.style(`display`,`block`),k.style(`display`,`none`)}N?n.participantName?.toLowerCase()!==P?.toLowerCase()&&j_(e.currentTarget).attr(AS,.9):x.selectAll(`path`).attr(AS,e=>e.data.participantName===t.data.participantName?.9:.3);let r=_(30),i=g-r-10,s={flagsGroup:S,winningFlagsGroup:C,losingFlagsGroup:w};GS(C,s,n.nationalityCode,-1,!0,i,r),n.opponent&&GS(w,s,n.opponent.nationalityCode,1,!1,i,r)}function I(e,t){if(N){let n=t.data.participantName?.toLowerCase()===P?.toLowerCase();j_(e.currentTarget).attr(AS,n?1:.2)}else x.selectAll(`path`).attr(AS,.8);j(),A()}let L=i.eventHandlers?.clickSegment;function ee(e,t){if(!L)return;let n=t.data;L({participantName:n.participantName,drawPosition:n.drawPosition,seedNumber:n.seedNumber,entryStatus:n.entryStatus,nationalityCode:n.nationalityCode,scoreString:n.scoreString,matchUpStatus:n.matchUpStatus,roundName:n.roundName,depth:n.depth,matchUp:n.matchUp})}let R=x.selectAll(`path`).data(v).join(`path`).attr(`d`,e=>y(e)).attr(`fill`,e=>e.data.color||`#ccc`).attr(AS,.8).attr(`stroke`,`#fff`).attr(`stroke-width`,1).on(`mouseover`,F).on(`mouseout`,I);L&&R.style(`cursor`,`pointer`).on(`click`,ee),R.append(`title`).text(e=>{let t=e.data;return t.participantName?`${t.participantName}\nDraw: ${t.drawPosition||`N/A`}`:`${t.name}\nDepth: ${e.depth}`});function z(e){let t=0;return N=!!e,P=e,x.selectAll(`path`).attr(AS,n=>e?n.data.participantName?.toLowerCase()===e.toLowerCase()?(t+=1,1):.2:.8),t}function te(e){b.style(`display`,e?`none`:`block`)}return{highlightPlayer:z,hide:te}}function qS(e={}){return{render:(t,n,r)=>KS(t,n,r,e)}}function JS(e){return e?.length===2?e&&String.fromCodePoint!==void 0?e.toUpperCase().replaceAll(/./g,e=>String.fromCodePoint((e.codePointAt(0)??0)+127397)):e:``}function YS(e){return JS(jS[e]||e)}var{LUCKY_LOSER:XS,WILDCARD:ZS,QUALIFIER:QS}=t.entryStatusConstants;function $S(e){let t={};for(let[n,r]of Object.entries(e.roundMatchUps))t[Number(n)]=r.map(e=>({...e,winningSide:e.winningSide,drawPositions:e.drawPositions||[],scoreString:e.winningSide===1?e.score?.scoreStringSide1:e.winningSide===2?e.score?.scoreStringSide2:void 0,sides:(e.sides||[]).map(e=>({sideNumber:e.sideNumber,drawPosition:e.drawPosition,participantName:e.participant?.participantName,nationalityCode:e.participant?.person?.nationalityCode,seedNumber:e.seedNumber,entryStatus:e.participant?.entryStatus}))}));return{drawSize:(t[1]?.length||0)*2,roundMatchUps:t,seedAssignments:e.seedAssignments}}var eC={LL:XS,WC:ZS,Q:QS},tC=[`R128`,`R64`,`R32`,`R16`,`QF`,`SF`,`F`];function nC(e){let t=rC(e);if(t.length===0)return{drawSize:0,roundMatchUps:{}};let n=t[0].data,r=n.length,i=iC(n),a=aC(t,e),o={};o[1]=sC(n,a,t);for(let e=1;e<t.length;e++)o[e+1]=cC(e,t,a,i);return{drawSize:r,roundMatchUps:o}}function rC(e){let t=[],n=!1;for(let r of tC){let i=e[r];i&&i.length>0&&(n=!0),n&&i&&i.length>0&&t.push({key:r,data:i})}return t}function iC(e){let t=new Map;return e.forEach((e,n)=>{let r=lC(e.player);r&&r!==`BYE`&&t.set(r,{drawPosition:e.Draw??n+1,country:e.country,seed:e.seed,entry:e.entry})}),t}function aC(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=r+1<e.length?e[r+1].data:t.W||[],a=new Set;for(let e of i){let t=lC(e.player);t&&a.add(t)}n.set(e[r].key,a)}return n}function oC(e,t,n){if(e===`BYE`||t===`BYE`)return e===`BYE`?2:1;if(n.has(e))return 1;if(n.has(t))return 2}function sC(e,t,n){let r=[],i=t.get(n[0].key)||new Set;for(let t=0;t<e.length;t+=2){let a=e[t],o=e[t+1],s=lC(a?.player),c=lC(o?.player),l=s===`BYE`||c===`BYE`,u=oC(s,c,i),d;if(!l&&n.length>1){let e=n[1].data,t=u===1?s:c;d=e.find(e=>lC(e.player)===t)?.score}let f=l?`BYE`:u?`COMPLETED`:`TO_BE_PLAYED`;r.push({roundNumber:1,matchUpStatus:f,winningSide:u,drawPositions:[a?.Draw??t+1,o?.Draw??t+2],scoreString:d,sides:[dC(1,a,t+1),dC(2,o,t+2)]})}return r}function cC(e,t,n,r){let i=e+1,a=t[e].data,o=n.get(t[e].key)||new Set,s=[];for(let e=0;e<a.length;e+=2){let t=a[e],n=a[e+1],c=lC(t?.player),l=lC(n?.player),u=o.has(c)?1:o.has(l)?2:void 0,d=(u===1?t:u===2?n:void 0)?.score,f=u?`COMPLETED`:`TO_BE_PLAYED`;s.push({roundNumber:i,matchUpStatus:f,winningSide:u,drawPositions:[r.get(c)?.drawPosition??0,r.get(l)?.drawPosition??0],scoreString:d,sides:[fC(1,t,r),fC(2,n,r)]})}return s}function lC(e){if(!e)return``;let t=e.trim();return t.toUpperCase()===`BYE`?`BYE`:t}function uC(e){if(e)return eC[e.toUpperCase()]||e}function dC(e,t,n){if(!t)return{sideNumber:e,drawPosition:n};let r=lC(t.player);return{sideNumber:e,drawPosition:t.Draw??n,participantName:r||void 0,nationalityCode:t.country||void 0,seedNumber:t.seed?Number(t.seed):void 0,entryStatus:uC(t.entry)}}function fC(e,t,n){if(!t)return{sideNumber:e,drawPosition:0};let r=lC(t.player),i=n.get(r);return{sideNumber:e,drawPosition:i?.drawPosition??0,participantName:r||void 0,nationalityCode:t.country||i?.country||void 0,seedNumber:t.seed?Number(t.seed):i?.seed?Number(i.seed):void 0,entryStatus:uC(t.entry||i?.entry)}}var pC=`right`,mC=`font-medium`;function hC({target:e,button:t,stateChange:n}){let r=0,i=()=>(r+=1,`Item${r}`),a=document.createElement(`div`);t.class&&a.classList.add(t.class),a.classList.add(`dropdown`),t.id&&(a.id=t.id),t.align===pC&&a.classList.add(`is-right`);let o=e=>e.classList.contains(`is-active`),s=()=>{o(a)&&a.classList.remove(`is-active`)},c=e=>o(e)?(e.classList.remove(`is-active`),!1):(e.classList.add(`is-active`),!0);a.onmouseleave=s,a.onclick=()=>c(a);let l=document.createElement(`div`);l.classList.add(`dropdown-trigger`);let u=document.createElement(`button`);u.className=`button font-medium`,t.intent&&u.classList.add(t.intent),u.setAttribute(`aria-haspopup`,`true`);let d=document.createElement(`span`);z(t.onClick)&&(d.onclick=t.onClick),d.style.cssText=`margin-right: 1em`,d.innerHTML=t.label,u.appendChild(d);let f=document.createElement(`span`);z(t.onClick)&&(f.onclick=t.onClick),f.innerHTML=`
|
|
215
215
|
<span class="icon is-small font-medium">
|
|
216
216
|
<i class="fas fa-angle-down font-medium" aria-hidden="true"></i>
|
|
217
217
|
</span>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NONE = "none";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare function generateEventData({ matchUpFormat, completeAllMatchUps, autoSchedule, participantsCount, completionGoal, tieFormatName, addQualifying, drawSize, automated, eventType, drawType }?: {
|
|
2
|
+
matchUpFormat?: string;
|
|
3
|
+
completeAllMatchUps?: boolean;
|
|
4
|
+
autoSchedule?: boolean;
|
|
5
|
+
participantsCount?: number;
|
|
6
|
+
completionGoal?: number;
|
|
7
|
+
tieFormatName?: string;
|
|
8
|
+
addQualifying?: boolean;
|
|
9
|
+
drawSize?: number;
|
|
10
|
+
automated?: boolean;
|
|
11
|
+
eventType?: string;
|
|
12
|
+
drawType?: string;
|
|
13
|
+
}): {
|
|
14
|
+
eventData?: any;
|
|
15
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MatchUp } from '../types';
|
|
2
|
+
export declare function generateMatchUps({ matchUpFormat, randomWinningSide, qualifyingProfiles, participantsCount, completionGoal, drawSize, eventType, outcomes, drawType, withRatings, withAllRatings }?: {
|
|
3
|
+
matchUpFormat?: string;
|
|
4
|
+
randomWinningSide?: boolean;
|
|
5
|
+
qualifyingProfiles?: any;
|
|
6
|
+
participantsCount?: number;
|
|
7
|
+
completionGoal?: number;
|
|
8
|
+
drawSize?: number;
|
|
9
|
+
eventType?: string;
|
|
10
|
+
outcomes?: any;
|
|
11
|
+
drawType?: string;
|
|
12
|
+
withRatings?: {
|
|
13
|
+
scaleName: string;
|
|
14
|
+
scaleType?: string;
|
|
15
|
+
eventType?: string;
|
|
16
|
+
};
|
|
17
|
+
withAllRatings?: Array<{
|
|
18
|
+
scaleName: string;
|
|
19
|
+
accessor: string;
|
|
20
|
+
scaleType?: string;
|
|
21
|
+
eventType?: string;
|
|
22
|
+
}>;
|
|
23
|
+
}): {
|
|
24
|
+
matchUps: MatchUp[];
|
|
25
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type CreateTypeAheadParams = {
|
|
2
|
+
list: any[];
|
|
3
|
+
element: HTMLInputElement;
|
|
4
|
+
callback?: (value: string) => void;
|
|
5
|
+
currentValue?: string;
|
|
6
|
+
withCatchTab?: boolean;
|
|
7
|
+
onChange?: (event: Event) => void;
|
|
8
|
+
onSelectComplete?: () => void;
|
|
9
|
+
listProvider?: () => any[];
|
|
10
|
+
};
|
|
11
|
+
export declare function createTypeAhead({ list, element, callback, currentValue, withCatchTab, onChange, onSelectComplete, listProvider }: CreateTypeAheadParams): {
|
|
12
|
+
typeAhead: any;
|
|
13
|
+
};
|
|
14
|
+
export {};
|