@ds-mo/ui 15.11.2 → 15.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.package-ready.json +1 -1
- package/dist/agent-patterns.json +1 -1
- package/dist/agent.json +114 -18
- package/dist/angular/ds-card-action-center.d.ts +1 -1
- package/dist/angular/ds-card-action-center.js +3 -3
- package/dist/angular/ds-card-chart.d.ts +1 -1
- package/dist/angular/ds-card-chart.js +3 -3
- package/dist/angular/ds-card-navigation.d.ts +1 -1
- package/dist/angular/ds-card-navigation.js +3 -3
- package/dist/angular/ds-card-setting.d.ts +1 -1
- package/dist/angular/ds-card-setting.js +3 -3
- package/dist/angular/ds-card-settings-scope.d.ts +1 -1
- package/dist/angular/ds-card-settings-scope.js +3 -3
- package/dist/angular/ds-field.d.ts +1 -1
- package/dist/angular/ds-field.js +3 -3
- package/dist/angular/ds-inline-banner-settings.d.ts +1 -1
- package/dist/angular/ds-inline-banner-settings.js +3 -3
- package/dist/angular/ds-pagination.d.ts +1 -1
- package/dist/angular/ds-pagination.js +3 -3
- package/dist/angular/ds-radio.d.ts +1 -1
- package/dist/angular/ds-radio.js +3 -3
- package/dist/angular/ds-setting-row-radio.d.ts +1 -1
- package/dist/angular/ds-setting-row-radio.js +3 -3
- package/dist/angular/ds-setting-row-toggle.d.ts +1 -1
- package/dist/angular/ds-setting-row-toggle.js +3 -3
- package/dist/angular/ds-skeleton.d.ts +1 -1
- package/dist/angular/ds-skeleton.js +3 -3
- package/dist/components/ds-agent-activity.js +1 -1
- package/dist/components/ds-agent-questionnaire.js +1 -1
- package/dist/components/ds-agent-response.js +1 -1
- package/dist/components/ds-agent-response.js.map +1 -1
- package/dist/components/ds-agent-source-list.js +1 -1
- package/dist/components/ds-agent-tool-call.js +1 -1
- package/dist/components/ds-attachment-list.js +1 -1
- package/dist/components/ds-badge.js +1 -1
- package/dist/components/ds-banner.js +1 -1
- package/dist/components/ds-bar-action.js +1 -1
- package/dist/components/ds-bar-nav.js +1 -1
- package/dist/components/ds-bar-page-title.js +1 -1
- package/dist/components/ds-bar-title.js +1 -1
- package/dist/components/ds-bar-workflow.js +1 -1
- package/dist/components/ds-breadcrumb.js +1 -1
- package/dist/components/ds-button-filled.js +1 -1
- package/dist/components/ds-button-inverted.js +1 -1
- package/dist/components/ds-button-unfilled.js +1 -1
- package/dist/components/ds-calendar.js +1 -1
- package/dist/components/ds-card-action-center.js +1 -1
- package/dist/components/ds-card-action-center.js.map +1 -1
- package/dist/components/ds-card-chart.js +1 -1
- package/dist/components/ds-card-chart.js.map +1 -1
- package/dist/components/ds-card-navigation.js +1 -1
- package/dist/components/ds-card-navigation.js.map +1 -1
- package/dist/components/ds-card-overview.js +1 -1
- package/dist/components/ds-card-overview.js.map +1 -1
- package/dist/components/ds-card-setting.js +1 -1
- package/dist/components/ds-card-setting.js.map +1 -1
- package/dist/components/ds-card-settings-scope.js +1 -1
- package/dist/components/ds-card-settings-scope.js.map +1 -1
- package/dist/components/ds-chart-legend.js +1 -1
- package/dist/components/ds-chart.js +1 -1
- package/dist/components/ds-checkbox-group.js +1 -1
- package/dist/components/ds-checkbox.js +1 -1
- package/dist/components/ds-chip.js +1 -1
- package/dist/components/ds-code-block.js +1 -1
- package/dist/components/ds-conversation-list-item.js +1 -1
- package/dist/components/ds-conversation-list-section.js +1 -1
- package/dist/components/ds-conversation-list.js +1 -1
- package/dist/components/ds-data-customize.js +1 -1
- package/dist/components/ds-data-customize.js.map +1 -1
- package/dist/components/ds-data-filter.js +1 -1
- package/dist/components/ds-data-group.js +1 -1
- package/dist/components/ds-data-preferences.js +1 -1
- package/dist/components/ds-data-saved-views.js +1 -1
- package/dist/components/ds-data-saved-views.js.map +1 -1
- package/dist/components/ds-data-search.js +1 -1
- package/dist/components/ds-data-sort.js +1 -1
- package/dist/components/ds-data-toolbar.js +1 -1
- package/dist/components/ds-divider.js +1 -1
- package/dist/components/ds-empty-state.js +1 -1
- package/dist/components/ds-field.js +1 -1
- package/dist/components/ds-filter-menu.js +1 -1
- package/dist/components/ds-inline-banner-settings.js +1 -1
- package/dist/components/ds-inline-banner-settings.js.map +1 -1
- package/dist/components/ds-input-date.js +1 -1
- package/dist/components/ds-input-time.js +1 -1
- package/dist/components/ds-input.js +1 -1
- package/dist/components/ds-map-cluster-marker.js +1 -1
- package/dist/components/ds-map-entity-marker.js +1 -1
- package/dist/components/ds-map-marker.js +1 -1
- package/dist/components/ds-markdown.js +1 -1
- package/dist/components/ds-menu.js +1 -1
- package/dist/components/ds-message-actions.js +1 -1
- package/dist/components/ds-message-bubble.js +1 -1
- package/dist/components/ds-message-composer.js +1 -1
- package/dist/components/ds-message-scroller.js +1 -1
- package/dist/components/ds-message.js +1 -1
- package/dist/components/ds-mobile-bar-nav.js +1 -1
- package/dist/components/ds-mobile-header.js +1 -1
- package/dist/components/ds-mobile-section-switcher.js +1 -1
- package/dist/components/ds-mobile-sheet-nav.js +1 -1
- package/dist/components/ds-modal.js +1 -1
- package/dist/components/ds-navigation-tab-group.js +1 -1
- package/dist/components/ds-pagination.js +1 -1
- package/dist/components/ds-panel-nav.js +1 -1
- package/dist/components/ds-panel-sub-nav.js +1 -1
- package/dist/components/ds-panel-tool-header.js +1 -1
- package/dist/components/ds-panel-tool-search.js +1 -1
- package/dist/components/ds-panel-tools.js +1 -1
- package/dist/components/ds-paper-texture.js +1 -1
- package/dist/components/ds-radio-tile.js +1 -1
- package/dist/components/ds-radio.js +1 -1
- package/dist/components/ds-score.js +1 -1
- package/dist/components/ds-scroll-overlay.js +1 -1
- package/dist/components/ds-select-toggle.js +1 -1
- package/dist/components/ds-select.js +1 -1
- package/dist/components/ds-setting-row-checkbox.js +1 -1
- package/dist/components/ds-setting-row-radio.js +1 -1
- package/dist/components/ds-setting-row-radio.js.map +1 -1
- package/dist/components/ds-setting-row-toggle.js +1 -1
- package/dist/components/ds-setting-row-toggle.js.map +1 -1
- package/dist/components/ds-shell-app.js +1 -1
- package/dist/components/ds-shell-app.js.map +1 -1
- package/dist/components/ds-shell-page.js +1 -1
- package/dist/components/ds-shell-tools.js +1 -1
- package/dist/components/ds-skeleton.js +1 -1
- package/dist/components/ds-slider.js +1 -1
- package/dist/components/ds-swatch-picker.js +1 -1
- package/dist/components/ds-switch.js +1 -1
- package/dist/components/ds-tab-group.js +1 -1
- package/dist/components/ds-table.js +1 -1
- package/dist/components/ds-table.js.map +1 -1
- package/dist/components/ds-tag.js +1 -1
- package/dist/components/ds-text.js +1 -1
- package/dist/components/ds-textarea.js +1 -1
- package/dist/components/ds-time-picker.js +1 -1
- package/dist/components/ds-toast.js +1 -1
- package/dist/components/ds-tooltip-chart.js +1 -1
- package/dist/components/ds-tooltip.js +1 -1
- package/dist/components/ds-typing-indicator.js +1 -1
- package/dist/components/{p-6QYDIPd1.js → p-3dG9v5Aw.js} +2 -2
- package/dist/components/{p-C4kVTIBc.js → p-5PReYMiY.js} +2 -2
- package/dist/components/{p-CzTJAO2J.js → p-8fddX3V3.js} +2 -2
- package/dist/components/{p-Cw1ljgW1.js → p-9u2WDF0J.js} +2 -2
- package/dist/components/{p-M9pOLcyK.js → p-B-ChwMFE.js} +2 -2
- package/dist/components/{p-BvlkO__o.js → p-BAIYOobl.js} +2 -2
- package/dist/components/{p-BrJebF5t.js → p-BIMW5_Z7.js} +2 -2
- package/dist/components/{p-BkKdzYZP.js → p-BMI0F08u.js} +2 -2
- package/dist/components/{p-D0kzIzGQ.js → p-BV8sNEVP.js} +2 -2
- package/dist/components/{p-DNtwJJOC.js → p-BVUdtuog.js} +2 -2
- package/dist/components/{p-CgYDQSLW.js → p-BYo1-6b5.js} +2 -2
- package/dist/components/{p-CJ-igzsZ.js → p-BZbJkJpG.js} +2 -2
- package/dist/components/{p-D2rASHHq.js → p-BcYzHn1E.js} +2 -2
- package/dist/components/{p-0EpjqRWc.js → p-BfRAVR40.js} +2 -2
- package/dist/components/p-BnE9MeXS.js +2 -0
- package/dist/components/{p-BI6L3JoU.js.map → p-BnE9MeXS.js.map} +1 -1
- package/dist/components/p-BoFK9lmP.js +2 -0
- package/dist/components/p-BoFK9lmP.js.map +1 -0
- package/dist/components/{p-BBZz2Dvg.js → p-BoWpIl_m.js} +2 -2
- package/dist/components/{p-529k8euH.js → p-BpPHCF63.js} +2 -2
- package/dist/components/p-BpssHpam.js +2 -0
- package/dist/components/p-BpssHpam.js.map +1 -0
- package/dist/components/{p-DXEInGEq.js → p-By_jYvHp.js} +2 -2
- package/dist/components/p-C5HGwzy9.js +2 -0
- package/dist/components/{p-CXF8wj9I.js.map → p-C5HGwzy9.js.map} +1 -1
- package/dist/components/{p-D4r6oWyQ.js → p-C860ilDn.js} +2 -2
- package/dist/components/{p-DcVK0W4X.js → p-CEHhx4VQ.js} +2 -2
- package/dist/components/p-CL0FpMKo.js +2 -0
- package/dist/components/{p-BjYoM1f8.js.map → p-CL0FpMKo.js.map} +1 -1
- package/dist/components/{p-CEm0AoDR.js → p-CQnjpuMX.js} +2 -2
- package/dist/components/{p-4qKHg502.js → p-CUG4EkKn.js} +2 -2
- package/dist/components/{p-CTstnsLe.js → p-CYmz92EF.js} +2 -2
- package/dist/components/{p-YE1r-XSR.js → p-CbP9ASmI.js} +2 -2
- package/dist/components/{p-C31AjGbg.js → p-CbPGO7vl.js} +2 -2
- package/dist/components/{p-DfphSI9S.js → p-CdMIA5hz.js} +2 -2
- package/dist/components/{p-Ds58qo_J.js → p-CeaIWw1Q.js} +2 -2
- package/dist/components/{p-DxVokKm8.js → p-Cfqvxxs2.js} +2 -2
- package/dist/components/{p-CsPqGA8B.js → p-CpqLGzv4.js} +2 -2
- package/dist/components/{p-DKg181YU.js → p-DFR9hqDU.js} +2 -2
- package/dist/components/{p-DEJLfD7k.js → p-DKZP3jCY.js} +2 -2
- package/dist/components/{p-CTAF7SkL.js → p-DMPn_dt7.js} +2 -2
- package/dist/components/{p-CYRTkP1A.js → p-DYruK9cb.js} +2 -2
- package/dist/components/{p-CqfYCn-e.js → p-DiUaIJ91.js} +2 -2
- package/dist/components/{p-Cqg9T781.js → p-DimFbKZH.js} +2 -2
- package/dist/components/p-DmyU1fd-.js +2 -0
- package/dist/components/p-DmyU1fd-.js.map +1 -0
- package/dist/components/{p-DHmHllUM.js → p-DuhJ49iN.js} +2 -2
- package/dist/components/{p-D_iZPukF.js → p-G6r6yYg8.js} +2 -2
- package/dist/components/{p-87FjWil8.js → p-IQdLCfJJ.js} +2 -2
- package/dist/components/{p-CAARHqjE.js → p-KTaiJztz.js} +2 -2
- package/dist/components/{p-BM-UYlIS.js → p-N-2CZze7.js} +2 -2
- package/dist/components/{p-Ch00yccW.js → p-Nx52go85.js} +2 -2
- package/dist/components/{p-CC4X8rpT.js → p-WEffoQQD.js} +2 -2
- package/dist/components/{p-DDawngok.js → p-XKt6j1UN.js} +2 -2
- package/dist/components/{p-vrRbdZAI.js → p-nakO4viw.js} +2 -2
- package/dist/components/{p-BC9xYdJD.js → p-pkJ3X3s7.js} +2 -2
- package/dist/components/{p-C6VWVB87.js → p-r_e6_0nP.js} +2 -2
- package/dist/components/p-zsWHUNJ9.js +2 -0
- package/dist/components/p-zsWHUNJ9.js.map +1 -0
- package/dist/docs/components.json +627 -7
- package/dist/lint/index.js +1 -1
- package/dist/mcp-data/registry/card-action-center.json +23 -3
- package/dist/mcp-data/registry/card-chart.json +23 -3
- package/dist/mcp-data/registry/card-navigation.json +23 -3
- package/dist/mcp-data/registry/card-overview.json +2 -2
- package/dist/mcp-data/registry/card-setting.json +23 -3
- package/dist/mcp-data/registry/card-settings-scope.json +22 -2
- package/dist/mcp-data/registry/field.json +22 -2
- package/dist/mcp-data/registry/inline-banner-settings.json +22 -2
- package/dist/mcp-data/registry/pagination.json +22 -2
- package/dist/mcp-data/registry/radio.json +22 -2
- package/dist/mcp-data/registry/registry.json +113 -17
- package/dist/mcp-data/registry/setting-row-radio.json +22 -2
- package/dist/mcp-data/registry/setting-row-toggle.json +23 -3
- package/dist/mcp-data/registry/shell-app.json +3 -2
- package/dist/mcp-data/registry/skeleton.json +100 -8
- package/dist/mcp-data/registry/table.json +7 -6
- package/dist/types/components/CardActionCenter/CardActionCenter.d.ts +2 -0
- package/dist/types/components/CardChart/CardChart.d.ts +2 -0
- package/dist/types/components/CardNavigation/CardNavigation.d.ts +2 -0
- package/dist/types/components/CardSetting/CardSetting.d.ts +2 -0
- package/dist/types/components/CardSettingsScope/CardSettingsScope.d.ts +2 -0
- package/dist/types/components/Field/Field.d.ts +3 -0
- package/dist/types/components/InlineBannerSettings/InlineBannerSettings.d.ts +2 -0
- package/dist/types/components/Pagination/Pagination.d.ts +3 -0
- package/dist/types/components/Radio/Radio.d.ts +2 -0
- package/dist/types/components/SettingRowRadio/SettingRowRadio.d.ts +2 -0
- package/dist/types/components/SettingRowToggle/SettingRowToggle.d.ts +2 -0
- package/dist/types/components/Skeleton/Skeleton.d.ts +13 -1
- package/dist/types/components/Skeleton/index.d.ts +1 -1
- package/dist/types/components/Table/Table.d.ts +1 -1
- package/dist/types/components.d.ts +169 -4
- package/dist/vue/ds-card-action-center.js +1 -0
- package/dist/vue/ds-card-chart.js +1 -0
- package/dist/vue/ds-card-navigation.js +1 -0
- package/dist/vue/ds-card-setting.js +1 -0
- package/dist/vue/ds-card-settings-scope.js +1 -0
- package/dist/vue/ds-field.js +2 -1
- package/dist/vue/ds-inline-banner-settings.js +2 -1
- package/dist/vue/ds-pagination.js +1 -0
- package/dist/vue/ds-radio.js +1 -0
- package/dist/vue/ds-setting-row-radio.js +2 -1
- package/dist/vue/ds-setting-row-toggle.js +1 -0
- package/dist/vue/ds-skeleton.js +4 -0
- package/package.json +1 -1
- package/dist/components/p-BI6L3JoU.js +0 -2
- package/dist/components/p-BjYoM1f8.js +0 -2
- package/dist/components/p-CXF8wj9I.js +0 -2
- package/dist/components/p-Cnzry0_v.js +0 -2
- package/dist/components/p-Cnzry0_v.js.map +0 -1
- package/dist/components/p-DwcAROOo.js +0 -2
- package/dist/components/p-DwcAROOo.js.map +0 -1
- package/dist/components/p-hWKa8Jn8.js +0 -2
- package/dist/components/p-hWKa8Jn8.js.map +0 -1
- package/dist/components/p-xCqqM1Rg.js +0 -2
- package/dist/components/p-xCqqM1Rg.js.map +0 -1
- /package/dist/components/{p-6QYDIPd1.js.map → p-3dG9v5Aw.js.map} +0 -0
- /package/dist/components/{p-C4kVTIBc.js.map → p-5PReYMiY.js.map} +0 -0
- /package/dist/components/{p-CzTJAO2J.js.map → p-8fddX3V3.js.map} +0 -0
- /package/dist/components/{p-Cw1ljgW1.js.map → p-9u2WDF0J.js.map} +0 -0
- /package/dist/components/{p-M9pOLcyK.js.map → p-B-ChwMFE.js.map} +0 -0
- /package/dist/components/{p-BvlkO__o.js.map → p-BAIYOobl.js.map} +0 -0
- /package/dist/components/{p-BrJebF5t.js.map → p-BIMW5_Z7.js.map} +0 -0
- /package/dist/components/{p-BkKdzYZP.js.map → p-BMI0F08u.js.map} +0 -0
- /package/dist/components/{p-D0kzIzGQ.js.map → p-BV8sNEVP.js.map} +0 -0
- /package/dist/components/{p-DNtwJJOC.js.map → p-BVUdtuog.js.map} +0 -0
- /package/dist/components/{p-CgYDQSLW.js.map → p-BYo1-6b5.js.map} +0 -0
- /package/dist/components/{p-CJ-igzsZ.js.map → p-BZbJkJpG.js.map} +0 -0
- /package/dist/components/{p-D2rASHHq.js.map → p-BcYzHn1E.js.map} +0 -0
- /package/dist/components/{p-0EpjqRWc.js.map → p-BfRAVR40.js.map} +0 -0
- /package/dist/components/{p-BBZz2Dvg.js.map → p-BoWpIl_m.js.map} +0 -0
- /package/dist/components/{p-529k8euH.js.map → p-BpPHCF63.js.map} +0 -0
- /package/dist/components/{p-DXEInGEq.js.map → p-By_jYvHp.js.map} +0 -0
- /package/dist/components/{p-D4r6oWyQ.js.map → p-C860ilDn.js.map} +0 -0
- /package/dist/components/{p-DcVK0W4X.js.map → p-CEHhx4VQ.js.map} +0 -0
- /package/dist/components/{p-CEm0AoDR.js.map → p-CQnjpuMX.js.map} +0 -0
- /package/dist/components/{p-4qKHg502.js.map → p-CUG4EkKn.js.map} +0 -0
- /package/dist/components/{p-CTstnsLe.js.map → p-CYmz92EF.js.map} +0 -0
- /package/dist/components/{p-YE1r-XSR.js.map → p-CbP9ASmI.js.map} +0 -0
- /package/dist/components/{p-C31AjGbg.js.map → p-CbPGO7vl.js.map} +0 -0
- /package/dist/components/{p-DfphSI9S.js.map → p-CdMIA5hz.js.map} +0 -0
- /package/dist/components/{p-Ds58qo_J.js.map → p-CeaIWw1Q.js.map} +0 -0
- /package/dist/components/{p-DxVokKm8.js.map → p-Cfqvxxs2.js.map} +0 -0
- /package/dist/components/{p-CsPqGA8B.js.map → p-CpqLGzv4.js.map} +0 -0
- /package/dist/components/{p-DKg181YU.js.map → p-DFR9hqDU.js.map} +0 -0
- /package/dist/components/{p-DEJLfD7k.js.map → p-DKZP3jCY.js.map} +0 -0
- /package/dist/components/{p-CTAF7SkL.js.map → p-DMPn_dt7.js.map} +0 -0
- /package/dist/components/{p-CYRTkP1A.js.map → p-DYruK9cb.js.map} +0 -0
- /package/dist/components/{p-CqfYCn-e.js.map → p-DiUaIJ91.js.map} +0 -0
- /package/dist/components/{p-Cqg9T781.js.map → p-DimFbKZH.js.map} +0 -0
- /package/dist/components/{p-DHmHllUM.js.map → p-DuhJ49iN.js.map} +0 -0
- /package/dist/components/{p-D_iZPukF.js.map → p-G6r6yYg8.js.map} +0 -0
- /package/dist/components/{p-87FjWil8.js.map → p-IQdLCfJJ.js.map} +0 -0
- /package/dist/components/{p-CAARHqjE.js.map → p-KTaiJztz.js.map} +0 -0
- /package/dist/components/{p-BM-UYlIS.js.map → p-N-2CZze7.js.map} +0 -0
- /package/dist/components/{p-Ch00yccW.js.map → p-Nx52go85.js.map} +0 -0
- /package/dist/components/{p-CC4X8rpT.js.map → p-WEffoQQD.js.map} +0 -0
- /package/dist/components/{p-DDawngok.js.map → p-XKt6j1UN.js.map} +0 -0
- /package/dist/components/{p-vrRbdZAI.js.map → p-nakO4viw.js.map} +0 -0
- /package/dist/components/{p-BC9xYdJD.js.map → p-pkJ3X3s7.js.map} +0 -0
- /package/dist/components/{p-C6VWVB87.js.map → p-r_e6_0nP.js.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{p as i,H as o,c as r,h as s,a as e,t as d}from"./index.js";import{d as n}from"./p-BoFK9lmP.js";import{d as t}from"./p-DMPn_dt7.js";import{D as a,s as c}from"./p-DOUk4KoT.js";import{s as l,r as v}from"./p-DGVZhrMd.js";import{C as h,a as f}from"./p-CuwopElg.js";const u=()=>`@media (forced-colors: active){.sc-ds-radio:root,.sc-ds-radio-h,.ds-forced-colors-scope.sc-ds-radio{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-control-inactive.sc-ds-radio-h,.ds-control-inactive.sc-ds-radio{opacity:var(--effect-opacity-medium);pointer-events:none;cursor:not-allowed}@media (forced-colors: active){.ds-control-inactive.sc-ds-radio-h,.ds-control-inactive.sc-ds-radio{color:var(--ds-forced-color-disabled);opacity:1}}.sc-ds-radio-h,.sc-ds-radio:where(.ds-table),.sc-ds-radio:where(.tooltip-popup),.sc-ds-radio:where(.ds-radius){--ds-radius-control:var(--dimension-radius-025);--ds-radius-card:var(--dimension-radius-050);--ds-radius-modal:var(--dimension-radius-050);--ds-radius-menu:var(--dimension-radius-075);--ds-radius-tooltip-control:var(--dimension-radius-025);--ds-radius-tooltip-menu:var(--dimension-radius-075);--ds-radius-table:var(--dimension-radius-050)}.ds-control--lg.sc-ds-radio,.ds-control--lg.sc-ds-radio-h,.ds-control--md.sc-ds-radio-h,.ds-control--md.sc-ds-radio,.ds-control--sm.sc-ds-radio-h,.ds-control--sm.sc-ds-radio,.ds-control--xs.sc-ds-radio-h,.ds-control--xs.sc-ds-radio{--ds-control-radius:var(--ds-radius-control)}.ds-control--lg.sc-ds-radio-h,.ds-control--lg.sc-ds-radio{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}.ds-control--md.sc-ds-radio-h,.ds-control--md.sc-ds-radio{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}.ds-control--sm.sc-ds-radio-h,.ds-control--sm.sc-ds-radio{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}.ds-control--xs.sc-ds-radio-h,.ds-control--xs.sc-ds-radio{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}.ds-control-frame.sc-ds-radio{display:inline-flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:var(--ds-control-padding-inline, var(--dimension-space-075));gap:var(--ds-control-gap, var(--dimension-space-050));border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.ds-control-section-heading.sc-ds-radio{display:flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:calc( var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-control-icon-box.sc-ds-radio{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md))}.ds-control-label-box.sc-ds-radio{min-width:0;padding-inline:var(--ds-control-label-inset, var(--dimension-space-025))}.ds-control-label-dot.sc-ds-radio{position:relative;padding-inline-end:calc( var(--ds-control-label-inset, var(--dimension-space-025)) + var(--ds-control-gap, var(--dimension-space-050)) )}.ds-control-label-dot__badge.sc-ds-radio{position:absolute;inset-block-start:0;inset-inline-end:0;pointer-events:none}@media (forced-colors: active){.sc-ds-radio:root,.sc-ds-radio-h,.ds-forced-colors-scope.sc-ds-radio{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.sc-ds-radio-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-radio-h,.ds-focus-ring.sc-ds-radio,.ds-focus-ring-inset.sc-ds-radio-h,.ds-focus-ring-inset.sc-ds-radio{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.ds-focus-ring.sc-ds-radio-h:focus-visible,.ds-focus-ring.sc-ds-radio:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-radio-h,.ds-focus-ring.ds-focus-ring--visible.sc-ds-radio{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-radio-h:focus-visible,.ds-focus-ring-inset.sc-ds-radio:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-radio-h:focus-visible::after,.ds-focus-ring-inset.sc-ds-radio:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-radio-h,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-radio{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-radio-h::after,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-radio::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}@media (forced-colors: active){.sc-ds-radio-h{--ds-focus-ring-color:var(--ds-forced-color-selected)}}@media (forced-colors: active){.sc-ds-radio:root,.sc-ds-radio-h,.ds-forced-colors-scope.sc-ds-radio{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-interaction-fill.sc-ds-radio-h,.ds-interaction-fill.sc-ds-radio{position:var(--ds-interaction-position, relative);z-index:var(--ds-interaction-z-index, 0);cursor:default;--ds-interaction-hover:var(--color-interaction-hover);--ds-interaction-pressed:var(--color-interaction-pressed);--ds-interaction-active:var(--color-interaction-active-brand);--ds-interaction-border-width:0px;--ds-interaction-border-color:transparent;--ds-interaction-divider-width:0px;--ds-interaction-divider-color:transparent;--ds-interaction-divider-inline-start-width:0px;--ds-interaction-divider-inline-start-color:transparent;--ds-interaction-divider-inline-end-width:0px;--ds-interaction-divider-inline-end-color:transparent}.ds-interaction-fill.sc-ds-radio-h::before,.ds-interaction-fill.sc-ds-radio::before,.ds-interaction-fill.sc-ds-radio-h::after,.ds-interaction-fill.sc-ds-radio::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;cursor:inherit;transition:none}.ds-interaction-fill.sc-ds-radio-h::before,.ds-interaction-fill.sc-ds-radio::before{z-index:1}.ds-interaction-fill.sc-ds-radio-h::after,.ds-interaction-fill.sc-ds-radio::after{z-index:3;box-shadow:inset 0 calc(-1 * var(--ds-interaction-divider-width)) 0 var(--ds-interaction-divider-color), inset var(--ds-interaction-divider-inline-start-width) 0 0 var(--ds-interaction-divider-inline-start-color), inset calc(-1 * var(--ds-interaction-divider-inline-end-width)) 0 0 var(--ds-interaction-divider-inline-end-color), inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color)}.ds-interaction-fill--bordered.sc-ds-radio-h,.ds-interaction-fill--bordered.sc-ds-radio{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-secondary)}.ds-interaction-fill--selected.sc-ds-radio-h::before,.ds-interaction-fill--selected.sc-ds-radio::before{background:var(--ds-interaction-active)}.ds-interaction-fill--selected.sc-ds-radio-h,.ds-interaction-fill--selected.sc-ds-radio{--ds-interaction-dot-ring:var(--ds-interaction-active)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-radio-h:hover:not(:disabled)::after,.ds-interaction-fill.sc-ds-radio:hover:not(:disabled)::after{background:var(--ds-interaction-hover)}}.ds-interaction-fill.sc-ds-radio-h:active:not(:disabled)::after,.ds-interaction-fill.sc-ds-radio:active:not(:disabled)::after{background:var(--ds-interaction-pressed)}.ds-interaction-fill--grouped.sc-ds-radio-h::after,.ds-interaction-fill--grouped.sc-ds-radio::after,.ds-interaction-fill--grouped.sc-ds-radio-h:active:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-radio:active:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill--grouped.sc-ds-radio-h:hover:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-radio:hover:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}}.ds-interaction-fill--grouped.sc-ds-radio-h,.ds-interaction-fill--grouped.sc-ds-radio{--ds-interaction-divider-width:var(--ds-interaction-group-divider-width, 0px);--ds-interaction-divider-color:var(--ds-interaction-group-divider-color, transparent);--ds-interaction-divider-inline-start-width:var( --ds-interaction-group-divider-inline-start-width, 0px );--ds-interaction-divider-inline-start-color:var( --ds-interaction-group-divider-inline-start-color, transparent );--ds-interaction-divider-inline-end-width:var( --ds-interaction-group-divider-inline-end-width, 0px );--ds-interaction-divider-inline-end-color:var( --ds-interaction-group-divider-inline-end-color, transparent )}.ds-interaction-fill.sc-ds-radio-h>.ds-interaction-fill__content.sc-ds-radio,.ds-interaction-fill.sc-ds-radio>.ds-interaction-fill__content.sc-ds-radio,.ds-interaction-fill__content.sc-ds-radio{position:relative;z-index:2;cursor:inherit}.ds-interaction-fill--on-faint.sc-ds-radio-h,.ds-interaction-fill--on-faint.sc-ds-radio{--ds-interaction-active:var(--color-interaction-active)}.ds-interaction-fill--on-medium.sc-ds-radio-h,.ds-interaction-fill--on-medium.sc-ds-radio{--ds-interaction-hover:var(--color-interaction-on-medium-background-hover);--ds-interaction-pressed:var(--color-interaction-on-medium-background-pressed);--ds-interaction-active:var(--color-interaction-on-medium-background-active);--ds-focus-ring-color:var(--color-interaction-on-medium-background-focus)}.ds-interaction-fill--on-bold.sc-ds-radio-h,.ds-interaction-fill--on-bold.sc-ds-radio{--ds-interaction-hover:var(--color-interaction-on-bold-background-hover);--ds-interaction-pressed:var(--color-interaction-on-bold-background-pressed);--ds-interaction-active:var(--color-interaction-on-bold-background-active);--ds-focus-ring-color:var(--color-interaction-on-bold-background-focus)}.ds-interaction-fill--on-strong.sc-ds-radio-h,.ds-interaction-fill--on-strong.sc-ds-radio{--ds-interaction-hover:var(--color-interaction-on-strong-background-hover);--ds-interaction-pressed:var(--color-interaction-on-strong-background-pressed);--ds-interaction-active:var(--color-interaction-on-strong-background-active);--ds-focus-ring-color:var(--color-interaction-on-strong-background-focus)}.ds-interaction-fill--on-translucent.sc-ds-radio-h,.ds-interaction-fill--on-translucent.sc-ds-radio{--ds-interaction-hover:var(--color-translucent-interaction-hover);--ds-interaction-pressed:var(--color-translucent-interaction-pressed);--ds-interaction-active:var(--color-translucent-interaction-active-brand);--ds-focus-ring-color:var(--color-translucent-interaction-focus)}.ds-interaction-fill--on-inverted.sc-ds-radio-h,.ds-interaction-fill--on-inverted.sc-ds-radio{--ds-interaction-hover:var(--color-inverted-interaction-hover);--ds-interaction-pressed:var(--color-inverted-interaction-pressed);--ds-interaction-active:var(--color-inverted-interaction-active-brand);--ds-focus-ring-color:var(--color-inverted-interaction-focus)}.ds-interaction-fill--on-media.sc-ds-radio-h,.ds-interaction-fill--on-media.sc-ds-radio{--ds-interaction-hover:var(--color-media-interaction-hover);--ds-interaction-pressed:var(--color-media-interaction-pressed);--ds-interaction-active:var(--color-media-interaction-active);--ds-focus-ring-color:var(--color-media-interaction-focus)}.ds-interaction-fill--on-always-dark.sc-ds-radio-h,.ds-interaction-fill--on-always-dark.sc-ds-radio{--ds-interaction-hover:var(--color-always-dark-interaction-hover);--ds-interaction-pressed:var(--color-always-dark-interaction-pressed);--ds-interaction-active:var(--color-always-dark-interaction-active-brand);--ds-focus-ring-color:var(--color-always-dark-interaction-focus)}.ds-interaction-fill--on-chrome.sc-ds-radio-h,.ds-interaction-fill--on-chrome.sc-ds-radio{--ds-interaction-hover:var(--color-chrome-interaction-hover);--ds-interaction-pressed:var(--color-chrome-interaction-pressed);--ds-interaction-active:var(--color-chrome-interaction-active);--ds-focus-ring-color:var(--color-chrome-interaction-focus)}.ds-interaction-fill--on-navigation.sc-ds-radio-h,.ds-interaction-fill--on-navigation.sc-ds-radio{--ds-interaction-hover:var(--color-navigation-interaction-hover);--ds-interaction-pressed:var(--color-navigation-interaction-pressed);--ds-interaction-active:var(--color-navigation-interaction-active);--ds-focus-ring-color:var(--color-navigation-interaction-focus)}.ds-interaction-fill.ds-interaction-fill--surface-open.sc-ds-radio-h:not(:disabled)::after,.ds-interaction-fill.ds-interaction-fill--surface-open.sc-ds-radio:not(:disabled)::after{background:var(--ds-interaction-pressed)}@media (forced-colors: active){.ds-interaction-fill.sc-ds-radio-h::after,.ds-interaction-fill.sc-ds-radio::after{box-shadow:none;outline:var(--ds-interaction-border-width) solid var(--ds-forced-color-control-boundary);outline-offset:calc(-1 * var(--ds-interaction-border-width))}.ds-interaction-fill--surface-open.sc-ds-radio-h:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after,.ds-interaction-fill--surface-open.sc-ds-radio:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after{outline:var(--dimension-stroke-width-025) dashed var(--ds-forced-color-control-boundary);outline-offset:calc(-1 * var(--dimension-stroke-width-025))}.ds-interaction-fill--selected.sc-ds-radio-h::before,.ds-interaction-fill--selected.sc-ds-radio::before{background:transparent;outline:var(--dimension-stroke-width-025) solid var(--ds-forced-color-selected);outline-offset:calc(-1 * var(--dimension-stroke-width-025))}}@media (forced-colors: active) and (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-radio-h:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after,.ds-interaction-fill.sc-ds-radio:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after{outline-color:var(--ds-forced-color-selected);outline-width:var(--dimension-stroke-width-012)}}@media (forced-colors: active){.sc-ds-radio:root,.sc-ds-radio-h,.ds-forced-colors-scope.sc-ds-radio{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.sc-ds-radio-h{display:flex;flex-direction:column;gap:var(--dimension-space-050)}.radio--labeled.sc-ds-radio-h{gap:var(--dimension-space-050)}.radio__options.sc-ds-radio{display:flex;flex-direction:column;gap:var(--dimension-space-050);min-width:0}.radio--horizontal.sc-ds-radio-h{flex-direction:row;gap:var(--dimension-space-100)}.radio--horizontal.sc-ds-radio-h .radio__options.sc-ds-radio{flex-direction:row;gap:var(--dimension-space-100)}.radio--labeled.radio--horizontal.sc-ds-radio-h{flex-direction:column;gap:var(--dimension-space-050)}.radio--labeled.radio--horizontal.sc-ds-radio-h .radio__options.sc-ds-radio{flex-direction:row;gap:var(--dimension-space-100)}.radio--lg.sc-ds-radio-h{--_radio-circle-inset:calc(var(--dimension-space-100) + var(--dimension-space-025));--_radio-circle:var(--dimension-iconography-md);--_radio-dot:calc(var(--dimension-size-base) * 5 / 4);--_radio-stroke:var(--dimension-stroke-width-018)}.radio--md.sc-ds-radio-h{--_radio-circle-inset:var(--dimension-space-100);--_radio-circle:var(--dimension-iconography-sm);--_radio-dot:var(--dimension-size-100);--_radio-stroke:var(--dimension-stroke-width-015)}.radio--sm.sc-ds-radio-h{--_radio-circle-inset:var(--dimension-space-075);--_radio-circle:var(--dimension-iconography-xs);--_radio-dot:var(--dimension-size-075);--_radio-stroke:var(--dimension-stroke-width-012)}.radio--xs.sc-ds-radio-h{--_radio-circle-inset:var(--dimension-space-050);--_radio-circle:var(--dimension-size-100);--_radio-dot:var(--dimension-size-050);--_radio-stroke:calc(var(--dimension-stroke-width-base) * 3 / 32)}.radio__item.sc-ds-radio{display:inline-flex;align-items:center;box-sizing:border-box;gap:var(--ds-control-gap);height:var(--ds-control-height);padding:0 var(--ds-settings-row-control-padding-inline, var(--ds-control-padding-inline));border-radius:var(--ds-control-radius);cursor:default;user-select:none}.radio__item--described.sc-ds-radio{align-items:flex-start;height:auto;min-height:var(--ds-control-height);padding-block:var(--dimension-space-075)}.radio__placement.sc-ds-radio{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon);height:var(--ds-control-icon)}.radio__circle.sc-ds-radio{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--_radio-circle);height:var(--_radio-circle);border:0;border-radius:var(--dimension-radius-half);box-shadow:inset 0 0 0 var(--_radio-stroke) var(--color-foreground-tertiary);transition:background-color var(--effect-motion-short-2), box-shadow var(--effect-motion-short-2)}.radio__circle--checked.sc-ds-radio{background-color:var(--color-background-bold-brand);box-shadow:none}.radio__dot.sc-ds-radio{width:var(--_radio-dot);height:var(--_radio-dot);border-radius:var(--dimension-radius-half);background-color:var(--color-foreground-on-bold-background-primary)}ds-text.radio__group-label.sc-ds-radio{padding-inline:var( --ds-settings-row-control-padding-inline, calc(var(--ds-control-padding-inline) + var(--ds-control-label-inset)) )}.radio__copy.sc-ds-radio{display:grid;flex:1;gap:var(--dimension-space-025);min-width:0;padding:0 var(--ds-control-label-inset)}@media (forced-colors: active){.radio__circle.sc-ds-radio{border:var(--_radio-stroke) solid var(--ds-forced-color-content);box-shadow:none}.radio__circle--checked.sc-ds-radio{background-color:var(--ds-forced-color-selected);border-color:var(--ds-forced-color-selected)}.radio__dot.sc-ds-radio{background-color:var(--ds-forced-color-on-selected)}}`;let g=0;const p=i(class i extends o{constructor(i){super();if(i!==false){this.__registerHost()}this.dsChange=r(this,"dsChange",7);this.internals=this.attachInternals();this.instanceId=++g;this.options=[];this.groupLabel="";this.value="";this.size="md";this.disabled=false;this.required=false;this.requiredMessage=a;this.direction="vertical";this.isInactive=false;this.isLoading=false;this.hasInteractionFill=false;this.ariaLabel=null;this.initialValue="";this.formDisabled=false}get hasGroupLabel(){return Boolean(this.groupLabel.trim())}get hasSelection(){return this.options.some((i=>i.value===this.value&&!i.isInactive))}get showGroupLabel(){return this.hasGroupLabel&&!this.el.closest("ds-setting-row-radio")}componentWillLoad(){this.initialValue=this.value;this.syncFormValue()}syncFormValue(){const i=this.isInactive||this.disabled||this.formDisabled;l(this.internals,this.hasSelection?this.value:"",{inactive:i,state:this.value});const o=this.required&&!i&&!this.hasSelection;c(this.internals,o,this.requiredMessage)}formDisabledCallback(i){this.formDisabled=i;this.syncFormValue()}formResetCallback(){this.value=this.initialValue}formStateRestoreCallback(i){this.value=v(i)}async setFocus(){this.activeItems.find((i=>i.tabIndex===0))?.focus()}get activeItems(){return Array.from(this.el.querySelectorAll("[data-radio-item]:not([data-inactive])"))}handleKeyDown(i){if(this.isLoading)return;const o=this.activeItems;if(!o.length)return;const r=o.find((i=>i===document.activeElement));if(!r)return;const s=o.indexOf(r);let e=-1;switch(i.key){case"ArrowDown":case"ArrowRight":i.preventDefault();e=(s+1)%o.length;break;case"ArrowUp":case"ArrowLeft":i.preventDefault();e=(s-1+o.length)%o.length;break;case"Home":i.preventDefault();e=0;break;case"End":i.preventDefault();e=o.length-1;break}if(e>=0){o[e].focus();const i=o[e].dataset["value"];if(i!==undefined&&i!==this.value){this.value=i;this.dsChange.emit(i)}}}selectItem(i){if(this.isLoading||this.isInactive||this.disabled||this.formDisabled)return;if(i!==this.value){this.value=i;this.dsChange.emit(i)}}renderOptions(i,o){return this.options.map(((r,e)=>{const d=i||!!r.isInactive;const n=r.value===this.value;const t=d?-1:e===o?0:-1;const a=`ds-radio-${this.instanceId}-label-${e}`;const c=`ds-radio-${this.instanceId}-description-${e}`;return s("div",{key:r.value,role:"radio","aria-checked":String(n),"aria-disabled":d?"true":undefined,"aria-labelledby":a,"aria-describedby":r.description?c:undefined,tabIndex:this.isLoading?-1:t,"aria-hidden":this.isLoading?"true":undefined,inert:this.isLoading,"data-radio-item":true,"data-value":r.value,"data-inactive":d||undefined,class:{radio__item:true,"radio__item--described":Boolean(r.description),[`ds-control--${this.size}`]:true,"ds-control-inactive":d,"ds-focus-ring-inset":!d,"ds-interaction-fill":!d&&this.hasInteractionFill},onClick:()=>!d&&this.selectItem(r.value),onKeyDown:i=>{if((i.key===" "||i.key==="Enter")&&!d){i.preventDefault();this.selectItem(r.value)}}},s("span",{class:"radio__placement ds-interaction-fill__content","aria-hidden":"true"},s("ds-skeleton",{preserveLayout:true,isLoading:this.isLoading,variant:"control",rounded:true},s("span",{class:{radio__circle:true,"radio__circle--checked":n}},n&&s("span",{class:"radio__dot"})))),s("span",{class:"radio__copy ds-interaction-fill__content"},s("ds-skeleton",{preserveLayout:true,isLoading:this.isLoading,textVariant:h[this.size]},s("ds-text",{class:"radio__label",as:"span",variant:h[this.size],textId:a},r.label)),r.description?s("ds-skeleton",{preserveLayout:true,isLoading:this.isLoading,textVariant:f[this.size]},s("ds-text",{as:"span",variant:f[this.size],color:"secondary",textId:c},r.description)):null))}))}render(){const i=this.isInactive||this.disabled||this.formDisabled;const o=this.required&&!i&&!this.hasSelection;const r=this.options.findIndex((i=>i.value===this.value));const d=this.options.findIndex((o=>!i&&!o.isInactive));const n=r>=0&&!i&&!this.options[r]?.isInactive?r:d;const t=this.renderOptions(i,n);return s(e,{key:"d52c2dd28717e4954e3075677dd1167f896479fe",role:"radiogroup","aria-busy":this.isLoading?"true":undefined,"aria-label":this.showGroupLabel?this.groupLabel:this.ariaLabel,"aria-labelledby":this.ariaLabelledby,"aria-required":this.required?"true":undefined,"aria-invalid":o?"true":undefined,class:{radio:true,"radio--horizontal":this.direction==="horizontal",[`radio--${this.size}`]:true,"radio--labeled":this.showGroupLabel}},this.showGroupLabel?s("ds-skeleton",{preserveLayout:true,isLoading:this.isLoading,textVariant:"text-body-small"},s("ds-text",{key:"radio-group-label",class:`radio__group-label ds-control-section-heading ds-control--${this.size}`,as:"span",variant:"text-body-small",emphasis:true},this.groupLabel)):null,s("div",{key:"radio-options",class:"radio__options"},t))}static get formAssociated(){return true}get el(){return this}static get watchers(){return{value:[{syncFormValue:0}],options:[{syncFormValue:0}],disabled:[{syncFormValue:0}],isInactive:[{syncFormValue:0}],required:[{syncFormValue:0}],requiredMessage:[{syncFormValue:0}]}}static get style(){return u()}},[66,"ds-radio",{options:[16],groupLabel:[1,"group-label"],value:[1025],size:[1],name:[513],form:[513],disabled:[516],required:[516],requiredMessage:[1,"required-message"],direction:[1],isInactive:[4,"is-inactive"],isLoading:[4,"is-loading"],hasInteractionFill:[4,"has-interaction-fill"],ariaLabel:[1,"aria-label"],ariaLabelledby:[1,"aria-labelledby"],formDisabled:[32],setFocus:[64]},[[0,"keydown","handleKeyDown"]],{value:[{syncFormValue:0}],options:[{syncFormValue:0}],disabled:[{syncFormValue:0}],isInactive:[{syncFormValue:0}],required:[{syncFormValue:0}],requiredMessage:[{syncFormValue:0}]}]);function m(){if(typeof customElements==="undefined"){return}const i=["ds-radio","ds-skeleton","ds-text"];i.forEach((i=>{switch(i){case"ds-radio":if(!customElements.get(d(i))){customElements.define(d(i),p)}break;case"ds-skeleton":if(!customElements.get(d(i))){n()}break;case"ds-text":if(!customElements.get(d(i))){t()}break}}))}m();export{p as R,m as d};
|
|
2
|
+
//# sourceMappingURL=p-BpssHpam.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["radioCss","radioIdCounter","Radio","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","instanceId","options","groupLabel","value","size","disabled","required","requiredMessage","DEFAULT_REQUIRED_MESSAGE","direction","isInactive","isLoading","hasInteractionFill","ariaLabel","initialValue","formDisabled","hasGroupLabel","Boolean","trim","hasSelection","some","option","showGroupLabel","el","closest","componentWillLoad","syncFormValue","inactive","setFormControlValue","internals","state","missing","setRequiredValidity","formDisabledCallback","formResetCallback","formStateRestoreCallback","restoreStringFormState","setFocus","activeItems","find","item","tabIndex","focus","Array","from","querySelectorAll","handleKeyDown","e","items","length","focused","document","activeElement","idx","indexOf","next","key","preventDefault","nextValue","dataset","undefined","dsChange","emit","selectItem","optValue","renderOptions","focusableIdx","map","index","isItemInactive","isChecked","tabIdx","labelId","descriptionId","h","role","String","description","inert","class","radio__item","onClick","onKeyDown","preserveLayout","variant","rounded","radio__circle","textVariant","CONTROL_TEXT_VARIANT","as","textId","label","CONTROL_SUPPORTING_TEXT_VARIANT","color","render","invalid","selectedIdx","findIndex","firstActiveIdx","renderedOptions","Host","ariaLabelledby","radio","emphasis"],"sources":["src/wc/components/Radio/Radio.css?tag=ds-radio&encapsulation=scoped","src/wc/components/Radio/Radio.tsx"],"sourcesContent":["@import '../../utils/control-inactive.css';\n@import '../../utils/radius.css';\n@import '../../utils/control-density.css';\n@import '../../utils/control-parts.css';\n@import '../../utils/focus-ring.css';\n@import '../../utils/interaction-fill.css';\n@import '../../utils/forced-colors.css';\n\n:host {\n display: flex;\n flex-direction: column;\n gap: var(--dimension-space-050);\n}\n\n:host(.radio--labeled) {\n gap: var(--dimension-space-050);\n}\n\n.radio__options {\n display: flex;\n flex-direction: column;\n gap: var(--dimension-space-050);\n min-width: 0;\n}\n\n:host(.radio--horizontal) {\n flex-direction: row;\n gap: var(--dimension-space-100);\n}\n\n:host(.radio--horizontal) .radio__options {\n flex-direction: row;\n gap: var(--dimension-space-100);\n}\n\n:host(.radio--labeled.radio--horizontal) {\n flex-direction: column;\n gap: var(--dimension-space-050);\n}\n\n:host(.radio--labeled.radio--horizontal) .radio__options {\n flex-direction: row;\n gap: var(--dimension-space-100);\n}\n\n:host(.radio--lg) {\n --_radio-circle-inset: calc(var(--dimension-space-100) + var(--dimension-space-025));\n --_radio-circle: var(--dimension-iconography-md);\n --_radio-dot: calc(var(--dimension-size-base) * 5 / 4);\n --_radio-stroke: var(--dimension-stroke-width-018);\n}\n\n:host(.radio--md) {\n --_radio-circle-inset: var(--dimension-space-100);\n --_radio-circle: var(--dimension-iconography-sm);\n --_radio-dot: var(--dimension-size-100);\n --_radio-stroke: var(--dimension-stroke-width-015);\n}\n\n:host(.radio--sm) {\n --_radio-circle-inset: var(--dimension-space-075);\n --_radio-circle: var(--dimension-iconography-xs);\n --_radio-dot: var(--dimension-size-075);\n --_radio-stroke: var(--dimension-stroke-width-012);\n}\n\n:host(.radio--xs) {\n --_radio-circle-inset: var(--dimension-space-050);\n --_radio-circle: var(--dimension-size-100);\n --_radio-dot: var(--dimension-size-050);\n --_radio-stroke: calc(var(--dimension-stroke-width-base) * 3 / 32);\n}\n\n.radio__item {\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n gap: var(--ds-control-gap);\n height: var(--ds-control-height);\n padding: 0 var(--ds-settings-row-control-padding-inline, var(--ds-control-padding-inline));\n border-radius: var(--ds-control-radius);\n cursor: default;\n user-select: none;\n}\n\n.radio__item--described {\n align-items: flex-start;\n height: auto;\n min-height: var(--ds-control-height);\n padding-block: var(--dimension-space-075);\n}\n\n.radio__placement {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: var(--ds-control-icon);\n height: var(--ds-control-icon);\n}\n\n.radio__circle {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: var(--_radio-circle);\n height: var(--_radio-circle);\n border: 0;\n border-radius: var(--dimension-radius-half);\n box-shadow: inset 0 0 0 var(--_radio-stroke) var(--color-foreground-tertiary);\n transition:\n background-color var(--effect-motion-short-2),\n box-shadow var(--effect-motion-short-2);\n}\n\n.radio__circle--checked {\n background-color: var(--color-background-bold-brand);\n box-shadow: none;\n}\n\n.radio__dot {\n width: var(--_radio-dot);\n height: var(--_radio-dot);\n border-radius: var(--dimension-radius-half);\n background-color: var(--color-foreground-on-bold-background-primary);\n}\n\nds-text.radio__group-label {\n padding-inline: var(\n --ds-settings-row-control-padding-inline,\n calc(var(--ds-control-padding-inline) + var(--ds-control-label-inset))\n );\n}\n\n.radio__copy {\n display: grid;\n flex: 1;\n gap: var(--dimension-space-025);\n min-width: 0;\n padding: 0 var(--ds-control-label-inset);\n}\n\n@media (forced-colors: active) {\n .radio__circle {\n border: var(--_radio-stroke) solid var(--ds-forced-color-content);\n box-shadow: none;\n }\n\n .radio__circle--checked {\n background-color: var(--ds-forced-color-selected);\n border-color: var(--ds-forced-color-selected);\n }\n\n .radio__dot {\n background-color: var(--ds-forced-color-on-selected);\n }\n}\n","import {\n AttachInternals,\n Component,\n Prop,\n State,\n Event,\n EventEmitter,\n Element,\n Listen,\n Method,\n Watch,\n h,\n Host,\n} from '@stencil/core';\nimport {\n CONTROL_SUPPORTING_TEXT_VARIANT,\n CONTROL_TEXT_VARIANT,\n DEFAULT_REQUIRED_MESSAGE,\n restoreStringFormState,\n setFormControlValue,\n setRequiredValidity,\n} from '../../utils';\n\nexport interface RadioOption {\n label: string;\n value: string;\n description?: string;\n isInactive?: boolean;\n}\n\nexport type RadioSize = 'lg' | 'md' | 'sm' | 'xs';\n\nlet radioIdCounter = 0;\n\n@Component({\n tag: 'ds-radio',\n styleUrl: 'Radio.css',\n scoped: true,\n formAssociated: true,\n})\nexport class Radio {\n @Element() el!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n private readonly instanceId = ++radioIdCounter;\n\n /** Visible choices in this one-of-many set. */\n @Prop() options: RadioOption[] = [];\n /** Optional visible group label rendered above the options. */\n @Prop() groupLabel: string = '';\n /** Selected option value. */\n @Prop({ mutable: true }) value: string = '';\n /** Visual and placement density for every option. */\n @Prop() size: RadioSize = 'md';\n /** Native form field name. */\n @Prop({ reflect: true }) name: string | undefined;\n /** Associates the radio set with a form by id when rendered outside that form. */\n @Prop({ reflect: true }) form: string | undefined;\n /** Native disabled state for the complete set. */\n @Prop({ reflect: true }) disabled: boolean = false;\n /** Require one option to be selected for form validity. */\n @Prop({ reflect: true }) required: boolean = false;\n /** Validation message used when a required set has no selection. */\n @Prop() requiredMessage: string = DEFAULT_REQUIRED_MESSAGE;\n /** Layout direction for the option set. */\n @Prop() direction: 'vertical' | 'horizontal' = 'vertical';\n /** Design-system inactive state for the complete set. */\n @Prop() isInactive: boolean = false;\n /** Preserve each option while replacing its circle and copy with loading atoms. */\n @Prop() isLoading: boolean = false;\n /** Show full-row hover and pressed feedback for choice-list presentations. */\n @Prop() hasInteractionFill: boolean = false;\n /** Accessible name when visible group labeling is unavailable. */\n @Prop({ attribute: 'aria-label' }) ariaLabel: string | null = null;\n /** Id reference for a visible group label. */\n @Prop({ attribute: 'aria-labelledby' }) ariaLabelledby: string | undefined;\n\n /** Emitted after user selection with the selected option value. */\n @Event() dsChange!: EventEmitter<string>;\n\n private initialValue = '';\n @State() private formDisabled = false;\n\n private get hasGroupLabel(): boolean {\n return Boolean(this.groupLabel.trim());\n }\n\n private get hasSelection(): boolean {\n return this.options.some(option => option.value === this.value && !option.isInactive);\n }\n\n /** Settings rows own a separate heading; never mount the form group label there. */\n private get showGroupLabel(): boolean {\n return this.hasGroupLabel && !this.el.closest('ds-setting-row-radio');\n }\n\n componentWillLoad() {\n this.initialValue = this.value;\n this.syncFormValue();\n }\n\n @Watch('value')\n @Watch('options')\n @Watch('disabled')\n @Watch('isInactive')\n @Watch('required')\n @Watch('requiredMessage')\n syncFormValue() {\n const inactive = this.isInactive || this.disabled || this.formDisabled;\n setFormControlValue(this.internals, this.hasSelection ? this.value : '', {\n inactive,\n state: this.value,\n });\n const missing = this.required && !inactive && !this.hasSelection;\n setRequiredValidity(this.internals, missing, this.requiredMessage);\n }\n\n formDisabledCallback(disabled: boolean) {\n this.formDisabled = disabled;\n this.syncFormValue();\n }\n\n formResetCallback() {\n this.value = this.initialValue;\n }\n\n formStateRestoreCallback(state: string | File | FormData | null) {\n this.value = restoreStringFormState(state);\n }\n\n /** Focus the selected option, or the first active option when nothing is selected. */\n @Method()\n async setFocus() {\n this.activeItems.find(item => item.tabIndex === 0)?.focus();\n }\n\n private get activeItems(): HTMLElement[] {\n return Array.from(\n this.el.querySelectorAll<HTMLElement>('[data-radio-item]:not([data-inactive])')\n );\n }\n\n @Listen('keydown')\n handleKeyDown(e: KeyboardEvent) {\n if (this.isLoading) return;\n const items = this.activeItems;\n if (!items.length) return;\n\n const focused = items.find(item => item === document.activeElement);\n if (!focused) return;\n\n const idx = items.indexOf(focused);\n let next = -1;\n\n switch (e.key) {\n case 'ArrowDown':\n case 'ArrowRight':\n e.preventDefault();\n next = (idx + 1) % items.length;\n break;\n case 'ArrowUp':\n case 'ArrowLeft':\n e.preventDefault();\n next = (idx - 1 + items.length) % items.length;\n break;\n case 'Home':\n e.preventDefault();\n next = 0;\n break;\n case 'End':\n e.preventDefault();\n next = items.length - 1;\n break;\n }\n\n if (next >= 0) {\n items[next].focus();\n const nextValue = items[next].dataset['value'];\n if (nextValue !== undefined && nextValue !== this.value) {\n this.value = nextValue;\n this.dsChange.emit(nextValue);\n }\n }\n }\n\n private selectItem(optValue: string) {\n if (this.isLoading || this.isInactive || this.disabled || this.formDisabled) return;\n if (optValue !== this.value) {\n this.value = optValue;\n this.dsChange.emit(optValue);\n }\n }\n\n private renderOptions(inactive: boolean, focusableIdx: number) {\n return this.options.map((option, index) => {\n const isItemInactive = inactive || !!option.isInactive;\n const isChecked = option.value === this.value;\n const tabIdx = isItemInactive ? -1 : index === focusableIdx ? 0 : -1;\n const labelId = `ds-radio-${this.instanceId}-label-${index}`;\n const descriptionId = `ds-radio-${this.instanceId}-description-${index}`;\n\n return (\n <div\n key={option.value}\n role=\"radio\"\n aria-checked={String(isChecked)}\n aria-disabled={isItemInactive ? 'true' : undefined}\n aria-labelledby={labelId}\n aria-describedby={option.description ? descriptionId : undefined}\n tabIndex={this.isLoading ? -1 : tabIdx}\n aria-hidden={this.isLoading ? 'true' : undefined}\n inert={this.isLoading}\n data-radio-item\n data-value={option.value}\n data-inactive={isItemInactive || undefined}\n class={{\n radio__item: true,\n 'radio__item--described': Boolean(option.description),\n [`ds-control--${this.size}`]: true,\n 'ds-control-inactive': isItemInactive,\n 'ds-focus-ring-inset': !isItemInactive,\n 'ds-interaction-fill': !isItemInactive && this.hasInteractionFill,\n }}\n onClick={() => !isItemInactive && this.selectItem(option.value)}\n onKeyDown={(e: KeyboardEvent) => {\n if ((e.key === ' ' || e.key === 'Enter') && !isItemInactive) {\n e.preventDefault();\n this.selectItem(option.value);\n }\n }}\n >\n <span class=\"radio__placement ds-interaction-fill__content\" aria-hidden=\"true\">\n <ds-skeleton preserveLayout isLoading={this.isLoading} variant=\"control\" rounded>\n <span class={{ radio__circle: true, 'radio__circle--checked': isChecked }}>\n {isChecked && <span class=\"radio__dot\" />}\n </span>\n </ds-skeleton>\n </span>\n <span class=\"radio__copy ds-interaction-fill__content\">\n <ds-skeleton\n preserveLayout\n isLoading={this.isLoading}\n textVariant={CONTROL_TEXT_VARIANT[this.size]}\n >\n <ds-text\n class=\"radio__label\"\n as=\"span\"\n variant={CONTROL_TEXT_VARIANT[this.size]}\n textId={labelId}\n >\n {option.label}\n </ds-text>\n </ds-skeleton>\n {option.description ? (\n <ds-skeleton\n preserveLayout\n isLoading={this.isLoading}\n textVariant={CONTROL_SUPPORTING_TEXT_VARIANT[this.size]}\n >\n <ds-text\n as=\"span\"\n variant={CONTROL_SUPPORTING_TEXT_VARIANT[this.size]}\n color=\"secondary\"\n textId={descriptionId}\n >\n {option.description}\n </ds-text>\n </ds-skeleton>\n ) : null}\n </span>\n </div>\n );\n });\n }\n\n render() {\n const inactive = this.isInactive || this.disabled || this.formDisabled;\n const invalid = this.required && !inactive && !this.hasSelection;\n const selectedIdx = this.options.findIndex(option => option.value === this.value);\n const firstActiveIdx = this.options.findIndex(option => !inactive && !option.isInactive);\n const focusableIdx =\n selectedIdx >= 0 && !inactive && !this.options[selectedIdx]?.isInactive\n ? selectedIdx\n : firstActiveIdx;\n const renderedOptions = this.renderOptions(inactive, focusableIdx);\n\n return (\n <Host\n role=\"radiogroup\"\n aria-busy={this.isLoading ? 'true' : undefined}\n aria-label={this.showGroupLabel ? this.groupLabel : this.ariaLabel}\n aria-labelledby={this.ariaLabelledby}\n aria-required={this.required ? 'true' : undefined}\n aria-invalid={invalid ? 'true' : undefined}\n class={{\n radio: true,\n 'radio--horizontal': this.direction === 'horizontal',\n [`radio--${this.size}`]: true,\n 'radio--labeled': this.showGroupLabel,\n }}\n >\n {this.showGroupLabel ? (\n <ds-skeleton preserveLayout isLoading={this.isLoading} textVariant={'text-body-small'}>\n <ds-text\n key=\"radio-group-label\"\n class={`radio__group-label ds-control-section-heading ds-control--${this.size}`}\n as=\"span\"\n variant=\"text-body-small\"\n emphasis\n >\n {this.groupLabel}\n </ds-text>\n </ds-skeleton>\n ) : null}\n <div key=\"radio-options\" class=\"radio__options\">\n {renderedOptions}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"2QAAA,MAAMA,EAAW,IAAM,kqlBCgCvB,IAAIC,EAAiB,E,MAQRC,EAAKC,EAAA,MAAAD,UAAAE,EANlB,WAAAC,CAAAC,G,qHAUmBC,KAAAC,aAAeP,EAGxBM,KAAAE,QAAyB,GAEzBF,KAAAG,WAAqB,GAEJH,KAAAI,MAAgB,GAEjCJ,KAAAK,KAAkB,KAMDL,KAAAM,SAAoB,MAEpBN,KAAAO,SAAoB,MAErCP,KAAAQ,gBAA0BC,EAE1BT,KAAAU,UAAuC,WAEvCV,KAAAW,WAAsB,MAEtBX,KAAAY,UAAqB,MAErBZ,KAAAa,mBAA8B,MAEHb,KAAAc,UAA2B,KAOtDd,KAAAe,aAAe,GACNf,KAAAgB,aAAe,KA+OjC,CA7OC,iBAAYC,GACV,OAAOC,QAAQlB,KAAKG,WAAWgB,O,CAGjC,gBAAYC,GACV,OAAOpB,KAAKE,QAAQmB,MAAKC,GAAUA,EAAOlB,QAAUJ,KAAKI,QAAUkB,EAAOX,Y,CAI5E,kBAAYY,GACV,OAAOvB,KAAKiB,gBAAkBjB,KAAKwB,GAAGC,QAAQ,uB,CAGhD,iBAAAC,GACE1B,KAAKe,aAAef,KAAKI,MACzBJ,KAAK2B,e,CASP,aAAAA,GACE,MAAMC,EAAW5B,KAAKW,YAAcX,KAAKM,UAAYN,KAAKgB,aAC1Da,EAAoB7B,KAAK8B,UAAW9B,KAAKoB,aAAepB,KAAKI,MAAQ,GAAI,CACvEwB,WACAG,MAAO/B,KAAKI,QAEd,MAAM4B,EAAUhC,KAAKO,WAAaqB,IAAa5B,KAAKoB,aACpDa,EAAoBjC,KAAK8B,UAAWE,EAAShC,KAAKQ,gB,CAGpD,oBAAA0B,CAAqB5B,GACnBN,KAAKgB,aAAeV,EACpBN,KAAK2B,e,CAGP,iBAAAQ,GACEnC,KAAKI,MAAQJ,KAAKe,Y,CAGpB,wBAAAqB,CAAyBL,GACvB/B,KAAKI,MAAQiC,EAAuBN,E,CAKtC,cAAMO,GACJtC,KAAKuC,YAAYC,MAAKC,GAAQA,EAAKC,WAAa,KAAIC,O,CAGtD,eAAYJ,GACV,OAAOK,MAAMC,KACX7C,KAAKwB,GAAGsB,iBAA8B,0C,CAK1C,aAAAC,CAAcC,GACZ,GAAIhD,KAAKY,UAAW,OACpB,MAAMqC,EAAQjD,KAAKuC,YACnB,IAAKU,EAAMC,OAAQ,OAEnB,MAAMC,EAAUF,EAAMT,MAAKC,GAAQA,IAASW,SAASC,gBACrD,IAAKF,EAAS,OAEd,MAAMG,EAAML,EAAMM,QAAQJ,GAC1B,IAAIK,GAAO,EAEX,OAAQR,EAAES,KACR,IAAK,YACL,IAAK,aACHT,EAAEU,iBACFF,GAAQF,EAAM,GAAKL,EAAMC,OACzB,MACF,IAAK,UACL,IAAK,YACHF,EAAEU,iBACFF,GAAQF,EAAM,EAAIL,EAAMC,QAAUD,EAAMC,OACxC,MACF,IAAK,OACHF,EAAEU,iBACFF,EAAO,EACP,MACF,IAAK,MACHR,EAAEU,iBACFF,EAAOP,EAAMC,OAAS,EACtB,MAGJ,GAAIM,GAAQ,EAAG,CACbP,EAAMO,GAAMb,QACZ,MAAMgB,EAAYV,EAAMO,GAAMI,QAAQ,SACtC,GAAID,IAAcE,WAAaF,IAAc3D,KAAKI,MAAO,CACvDJ,KAAKI,MAAQuD,EACb3D,KAAK8D,SAASC,KAAKJ,E,GAKjB,UAAAK,CAAWC,GACjB,GAAIjE,KAAKY,WAAaZ,KAAKW,YAAcX,KAAKM,UAAYN,KAAKgB,aAAc,OAC7E,GAAIiD,IAAajE,KAAKI,MAAO,CAC3BJ,KAAKI,MAAQ6D,EACbjE,KAAK8D,SAASC,KAAKE,E,EAIf,aAAAC,CAActC,EAAmBuC,GACvC,OAAOnE,KAAKE,QAAQkE,KAAI,CAAC9C,EAAQ+C,KAC/B,MAAMC,EAAiB1C,KAAcN,EAAOX,WAC5C,MAAM4D,EAAYjD,EAAOlB,QAAUJ,KAAKI,MACxC,MAAMoE,EAASF,GAAiB,EAAKD,IAAUF,EAAe,GAAI,EAClE,MAAMM,EAAU,YAAYzE,KAAKC,oBAAoBoE,IACrD,MAAMK,EAAgB,YAAY1E,KAAKC,0BAA0BoE,IAEjE,OACEM,EAAA,OACElB,IAAKnC,EAAOlB,MACZwE,KAAK,QAAO,eACEC,OAAON,GAAU,gBAChBD,EAAiB,OAAST,UAAS,kBACjCY,EAAO,mBACNnD,EAAOwD,YAAcJ,EAAgBb,UACvDnB,SAAU1C,KAAKY,WAAY,EAAK4D,EAAM,cACzBxE,KAAKY,UAAY,OAASiD,UACvCkB,MAAO/E,KAAKY,UAAS,oCAETU,EAAOlB,MAAK,gBACTkE,GAAkBT,UACjCmB,MAAO,CACLC,YAAa,KACb,yBAA0B/D,QAAQI,EAAOwD,aACzC,CAAC,eAAe9E,KAAKK,QAAS,KAC9B,sBAAuBiE,EACvB,uBAAwBA,EACxB,uBAAwBA,GAAkBtE,KAAKa,oBAEjDqE,QAAS,KAAOZ,GAAkBtE,KAAKgE,WAAW1C,EAAOlB,OACzD+E,UAAYnC,IACV,IAAKA,EAAES,MAAQ,KAAOT,EAAES,MAAQ,WAAaa,EAAgB,CAC3DtB,EAAEU,iBACF1D,KAAKgE,WAAW1C,EAAOlB,M,IAI3BuE,EAAA,QAAMK,MAAM,gDAA+C,cAAa,QACtEL,EAAA,eAAaS,eAAc,KAACxE,UAAWZ,KAAKY,UAAWyE,QAAQ,UAAUC,QAAO,MAC9EX,EAAA,QAAMK,MAAO,CAAEO,cAAe,KAAM,yBAA0BhB,IAC3DA,GAAaI,EAAA,QAAMK,MAAM,kBAIhCL,EAAA,QAAMK,MAAM,4CACVL,EAAA,eACES,eAAc,KACdxE,UAAWZ,KAAKY,UAChB4E,YAAaC,EAAqBzF,KAAKK,OAEvCsE,EAAA,WACEK,MAAM,eACNU,GAAG,OACHL,QAASI,EAAqBzF,KAAKK,MACnCsF,OAAQlB,GAEPnD,EAAOsE,QAGXtE,EAAOwD,YACNH,EAAA,eACES,eAAc,KACdxE,UAAWZ,KAAKY,UAChB4E,YAAaK,EAAgC7F,KAAKK,OAElDsE,EAAA,WACEe,GAAG,OACHL,QAASQ,EAAgC7F,KAAKK,MAC9CyF,MAAM,YACNH,OAAQjB,GAEPpD,EAAOwD,cAGV,MAEF,G,CAKZ,MAAAiB,GACE,MAAMnE,EAAW5B,KAAKW,YAAcX,KAAKM,UAAYN,KAAKgB,aAC1D,MAAMgF,EAAUhG,KAAKO,WAAaqB,IAAa5B,KAAKoB,aACpD,MAAM6E,EAAcjG,KAAKE,QAAQgG,WAAU5E,GAAUA,EAAOlB,QAAUJ,KAAKI,QAC3E,MAAM+F,EAAiBnG,KAAKE,QAAQgG,WAAU5E,IAAWM,IAAaN,EAAOX,aAC7E,MAAMwD,EACJ8B,GAAe,IAAMrE,IAAa5B,KAAKE,QAAQ+F,IAActF,WACzDsF,EACAE,EACN,MAAMC,EAAkBpG,KAAKkE,cAActC,EAAUuC,GAErD,OACEQ,EAAC0B,EAAI,CAAA5C,IAAA,2CACHmB,KAAK,aAAY,YACN5E,KAAKY,UAAY,OAASiD,UAAS,aAClC7D,KAAKuB,eAAiBvB,KAAKG,WAAaH,KAAKc,UAAS,kBACjDd,KAAKsG,eAAc,gBACrBtG,KAAKO,SAAW,OAASsD,UAAS,eACnCmC,EAAU,OAASnC,UACjCmB,MAAO,CACLuB,MAAO,KACP,oBAAqBvG,KAAKU,YAAc,aACxC,CAAC,UAAUV,KAAKK,QAAS,KACzB,iBAAkBL,KAAKuB,iBAGxBvB,KAAKuB,eACJoD,EAAA,eAAaS,eAAc,KAACxE,UAAWZ,KAAKY,UAAW4E,YAAa,mBAClEb,EAAA,WACElB,IAAI,oBACJuB,MAAO,6DAA6DhF,KAAKK,OACzEqF,GAAG,OACHL,QAAQ,kBACRmB,SAAQ,MAEPxG,KAAKG,aAGR,KACJwE,EAAA,OAAKlB,IAAI,gBAAgBuB,MAAM,kBAC5BoB,G","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as o,c as i,h as t,a as s,t as n}from"./index.js";import{a as r,d as a}from"./p-BkKdzYZP.js";import{p as l}from"./p-mSCnWLhL.js";import{d}from"./p-CzTJAO2J.js";import{d as c}from"./p-CC4X8rpT.js";import{d as h}from"./p-D_iZPukF.js";import{d as f}from"./p-BVsVUnAw.js";import{d as u}from"./p-0XTyQNRG.js";import{d as p}from"./p-BjYoM1f8.js";import{d as v}from"./p-CTAF7SkL.js";const m=["agents","messages","activity","search","stacks","help"];const g="agents";const b={search:"Search",messages:"Messages",stacks:"Stacks",activity:"Activity",agents:"Agents",help:"Help & Support"};const y={search:"K",agents:"A",messages:"M",stacks:"S",activity:"N",help:"/"};const _=[{id:"agents",icon:"AIAsterisk",label:b.agents,railPlacement:"header",order:0,shortcutKey:y.agents,mobileDestination:"agents"},{id:"messages",icon:"MessageBubbleStack",label:b.messages,order:0,shortcutKey:y.messages,mobileDestination:"messages"},{id:"activity",icon:"Bell",label:b.activity,order:1,shortcutKey:y.activity,mobileDestination:"activity"},{id:"search",icon:"MagnifyingGlass",label:b.search,order:2,shortcutKey:y.search,mobileDestination:"search"},{id:"help",icon:"QuestionCircle",label:b.help,railPlacement:"footer",order:0,shortcutKey:y.help,mobileDestination:"help"}];const w={header:0,body:1,footer:2};function x(e){const o=m.findIndex((o=>o===e.id));return e.order??(o<0?Number.MAX_SAFE_INTEGER:o)}function k(e){const o=new Map;for(const i of e){if(i.id.trim()&&!o.has(i.id))o.set(i.id,i)}return Array.from(o.values()).sort(((e,o)=>{const i=$(e);const t=$(o);const s=w[i]-w[t];if(s!==0)return s;return x(e)-x(o)}))}function z(e,o){const i=k(e).map((e=>({type:"tool",id:e.id,item:e})));const t=new Map;for(const e of o){if(e.id.trim()&&!t.has(e.id)){t.set(e.id,e)}}const s=Array.from(t.values()).map((e=>({type:"accessory",id:e.id,accessory:e})));return[...i,...s].sort(((e,o)=>{const i=e.type==="tool"?$(e.item):e.accessory.railPlacement;const t=o.type==="tool"?$(o.item):o.accessory.railPlacement;const s=w[i]-w[t];if(s!==0)return s;const n=e.type==="tool"?x(e.item):e.accessory.order;const r=o.type==="tool"?x(o.item):o.accessory.order;return n-r}))}function T(e){return e.flatMap((e=>{if(e.type==="tool")return[`tool:${e.id}`];if(e.accessory.type==="divider")return[];if(e.accessory.type==="shortcut"){return e.accessory.action.isInactive?[]:[`accessory:${e.id}:${e.accessory.action.id}`]}const o=e.accessory.primaryAction.isInactive?[]:[`accessory:${e.id}:${e.accessory.primaryAction.id}`];if(e.accessory.secondaryAction&&!e.accessory.secondaryAction.isInactive){o.push(`accessory:${e.id}:${e.accessory.secondaryAction.id}`)}return o}))}function C(e,o,i){if(!o.length)return 0;const t=e[i];const s=t?o.indexOf(t):-1;if(s>=0)return s;for(let t=i+1;t<e.length;t+=1){const i=o.indexOf(e[t]);if(i>=0)return i}for(let t=i-1;t>=0;t-=1){const i=o.indexOf(e[t]);if(i>=0)return i}return Math.min(Math.max(i,0),o.length-1)}function A(e,o,i){return{accessoryId:e,actionId:o,anchor:i}}function S(e){return typeof e==="string"&&e.trim().length>0}function $(e){if(e.railPlacement)return e.railPlacement;if(e.id===g)return"header";if(e.id==="help")return"footer";return"body"}function j(e,o,i){if(!i||e.some((e=>e.id===i))){return{open:o,activeTool:i,removedTool:""}}return{open:false,activeTool:"",removedTool:i}}function D(e){const o=e.transitionProperty.split(",").map((e=>e.trim()));const i=e.transitionDuration.split(",").map((e=>l(e.trim(),0)));const t=e.transitionDelay.split(",").map((e=>l(e.trim(),0)));return o.reduce(((e,o,s)=>{if(o!=="all"&&o!=="max-width")return e;const n=i[s%i.length]??0;const r=t[s%t.length]??0;return Math.max(e,n+r,0)}),0)}function F(e,o){return!e&&o==="idle"}function B(e,o,i){if(i==="closing")return e<=.5;if(i==="opening")return o>0&&e>=o-.5;return true}function E(e,o,i){if(e&&o===i){return{open:false,activeTool:i,selected:false}}return{open:true,activeTool:i,selected:true}}const M=()=>`:host,:where(.ds-table),:where(.tooltip-popup),:where(.ds-radius){--ds-radius-control:var(--dimension-radius-025);--ds-radius-card:var(--dimension-radius-050);--ds-radius-modal:var(--dimension-radius-050);--ds-radius-menu:var(--dimension-radius-075);--ds-radius-tooltip-control:var(--dimension-radius-025);--ds-radius-tooltip-menu:var(--dimension-radius-075);--ds-radius-table:var(--dimension-radius-050)}.ds-control--lg,:host(.ds-control--lg),:host(.ds-control--md),.ds-control--md,:host(.ds-control--sm),.ds-control--sm,:host(.ds-control--xs),.ds-control--xs{--ds-control-radius:var(--ds-radius-control)}:host(.ds-control--lg),.ds-control--lg{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}:host(.ds-control--md),.ds-control--md{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}:host(.ds-control--sm),.ds-control--sm{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}:host(.ds-control--xs),.ds-control--xs{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}:host(.ds-chrome-space--sm),.ds-chrome-space--sm{--ds-chrome-padding:var(--ds-chrome-space-sm-padding, var(--dimension-space-050));--ds-chrome-gap:var(--dimension-space-050)}:host(.ds-chrome-space--md),.ds-chrome-space--md{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}:host(.ds-chrome-space--lg),.ds-chrome-space--lg{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}:host(.ds-chrome-row),.ds-chrome-row,:host(.ds-chrome-column),.ds-chrome-column,:host(.ds-chrome-grid),.ds-chrome-grid{display:flex;box-sizing:border-box;gap:var(--ds-chrome-gap, var(--dimension-space-100));padding:var(--ds-chrome-padding, var(--dimension-space-100))}:host(.ds-chrome-row),.ds-chrome-row{flex-direction:row;align-items:center}:host(.ds-chrome-column),.ds-chrome-column{flex-direction:column}:host(.ds-chrome-grid),.ds-chrome-grid{display:grid;align-items:center}@media (forced-colors: active){:root,:host,.ds-forced-colors-scope{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}:host{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}:host(.ds-focus-ring),.ds-focus-ring,:host(.ds-focus-ring-inset),.ds-focus-ring-inset{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}:host(.ds-focus-ring:focus-visible),.ds-focus-ring:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}:host(.ds-focus-ring.ds-focus-ring--visible),.ds-focus-ring.ds-focus-ring--visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}:host(.ds-focus-ring-inset:focus-visible),.ds-focus-ring-inset:focus-visible{outline:none}:host(.ds-focus-ring-inset:focus-visible)::after,.ds-focus-ring-inset:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}:host(.ds-focus-ring-inset.ds-focus-ring--visible),.ds-focus-ring-inset.ds-focus-ring--visible{outline:none}:host(.ds-focus-ring-inset.ds-focus-ring--visible)::after,.ds-focus-ring-inset.ds-focus-ring--visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}@media (forced-colors: active){:host{--ds-focus-ring-color:var(--ds-forced-color-selected)}}@media (forced-colors: active){:root,:host,.ds-forced-colors-scope{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}:host(.ds-interaction-fill),.ds-interaction-fill{position:var(--ds-interaction-position, relative);z-index:var(--ds-interaction-z-index, 0);cursor:default;--ds-interaction-hover:var(--color-interaction-hover);--ds-interaction-pressed:var(--color-interaction-pressed);--ds-interaction-active:var(--color-interaction-active-brand);--ds-interaction-border-width:0px;--ds-interaction-border-color:transparent;--ds-interaction-divider-width:0px;--ds-interaction-divider-color:transparent;--ds-interaction-divider-inline-start-width:0px;--ds-interaction-divider-inline-start-color:transparent;--ds-interaction-divider-inline-end-width:0px;--ds-interaction-divider-inline-end-color:transparent}:host(.ds-interaction-fill)::before,.ds-interaction-fill::before,:host(.ds-interaction-fill)::after,.ds-interaction-fill::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;cursor:inherit;transition:none}:host(.ds-interaction-fill)::before,.ds-interaction-fill::before{z-index:1}:host(.ds-interaction-fill)::after,.ds-interaction-fill::after{z-index:3;box-shadow:inset 0 calc(-1 * var(--ds-interaction-divider-width)) 0 var(--ds-interaction-divider-color), inset var(--ds-interaction-divider-inline-start-width) 0 0 var(--ds-interaction-divider-inline-start-color), inset calc(-1 * var(--ds-interaction-divider-inline-end-width)) 0 0 var(--ds-interaction-divider-inline-end-color), inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color)}:host(.ds-interaction-fill--bordered),.ds-interaction-fill--bordered{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-secondary)}:host(.ds-interaction-fill--selected)::before,.ds-interaction-fill--selected::before{background:var(--ds-interaction-active)}:host(.ds-interaction-fill--selected),.ds-interaction-fill--selected{--ds-interaction-dot-ring:var(--ds-interaction-active)}@media (hover: hover) and (pointer: fine){:host(.ds-interaction-fill:hover:not(:disabled))::after,.ds-interaction-fill:hover:not(:disabled)::after{background:var(--ds-interaction-hover)}}:host(.ds-interaction-fill:active:not(:disabled))::after,.ds-interaction-fill:active:not(:disabled)::after{background:var(--ds-interaction-pressed)}:host(.ds-interaction-fill--grouped)::after,.ds-interaction-fill--grouped::after,:host(.ds-interaction-fill--grouped:active:not(:disabled))::after,.ds-interaction-fill--grouped:active:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}@media (hover: hover) and (pointer: fine){:host(.ds-interaction-fill--grouped:hover:not(:disabled))::after,.ds-interaction-fill--grouped:hover:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}}:host(.ds-interaction-fill--grouped),.ds-interaction-fill--grouped{--ds-interaction-divider-width:var(--ds-interaction-group-divider-width, 0px);--ds-interaction-divider-color:var(--ds-interaction-group-divider-color, transparent);--ds-interaction-divider-inline-start-width:var( --ds-interaction-group-divider-inline-start-width, 0px );--ds-interaction-divider-inline-start-color:var( --ds-interaction-group-divider-inline-start-color, transparent );--ds-interaction-divider-inline-end-width:var( --ds-interaction-group-divider-inline-end-width, 0px );--ds-interaction-divider-inline-end-color:var( --ds-interaction-group-divider-inline-end-color, transparent )}:host(.ds-interaction-fill)>.ds-interaction-fill__content,.ds-interaction-fill>.ds-interaction-fill__content,.ds-interaction-fill__content{position:relative;z-index:2;cursor:inherit}:host(.ds-interaction-fill--on-faint),.ds-interaction-fill--on-faint{--ds-interaction-active:var(--color-interaction-active)}:host(.ds-interaction-fill--on-medium),.ds-interaction-fill--on-medium{--ds-interaction-hover:var(--color-interaction-on-medium-background-hover);--ds-interaction-pressed:var(--color-interaction-on-medium-background-pressed);--ds-interaction-active:var(--color-interaction-on-medium-background-active);--ds-focus-ring-color:var(--color-interaction-on-medium-background-focus)}:host(.ds-interaction-fill--on-bold),.ds-interaction-fill--on-bold{--ds-interaction-hover:var(--color-interaction-on-bold-background-hover);--ds-interaction-pressed:var(--color-interaction-on-bold-background-pressed);--ds-interaction-active:var(--color-interaction-on-bold-background-active);--ds-focus-ring-color:var(--color-interaction-on-bold-background-focus)}:host(.ds-interaction-fill--on-strong),.ds-interaction-fill--on-strong{--ds-interaction-hover:var(--color-interaction-on-strong-background-hover);--ds-interaction-pressed:var(--color-interaction-on-strong-background-pressed);--ds-interaction-active:var(--color-interaction-on-strong-background-active);--ds-focus-ring-color:var(--color-interaction-on-strong-background-focus)}:host(.ds-interaction-fill--on-translucent),.ds-interaction-fill--on-translucent{--ds-interaction-hover:var(--color-translucent-interaction-hover);--ds-interaction-pressed:var(--color-translucent-interaction-pressed);--ds-interaction-active:var(--color-translucent-interaction-active-brand);--ds-focus-ring-color:var(--color-translucent-interaction-focus)}:host(.ds-interaction-fill--on-inverted),.ds-interaction-fill--on-inverted{--ds-interaction-hover:var(--color-inverted-interaction-hover);--ds-interaction-pressed:var(--color-inverted-interaction-pressed);--ds-interaction-active:var(--color-inverted-interaction-active-brand);--ds-focus-ring-color:var(--color-inverted-interaction-focus)}:host(.ds-interaction-fill--on-media),.ds-interaction-fill--on-media{--ds-interaction-hover:var(--color-media-interaction-hover);--ds-interaction-pressed:var(--color-media-interaction-pressed);--ds-interaction-active:var(--color-media-interaction-active);--ds-focus-ring-color:var(--color-media-interaction-focus)}:host(.ds-interaction-fill--on-always-dark),.ds-interaction-fill--on-always-dark{--ds-interaction-hover:var(--color-always-dark-interaction-hover);--ds-interaction-pressed:var(--color-always-dark-interaction-pressed);--ds-interaction-active:var(--color-always-dark-interaction-active-brand);--ds-focus-ring-color:var(--color-always-dark-interaction-focus)}:host(.ds-interaction-fill--on-chrome),.ds-interaction-fill--on-chrome{--ds-interaction-hover:var(--color-chrome-interaction-hover);--ds-interaction-pressed:var(--color-chrome-interaction-pressed);--ds-interaction-active:var(--color-chrome-interaction-active);--ds-focus-ring-color:var(--color-chrome-interaction-focus)}:host(.ds-interaction-fill--on-navigation),.ds-interaction-fill--on-navigation{--ds-interaction-hover:var(--color-navigation-interaction-hover);--ds-interaction-pressed:var(--color-navigation-interaction-pressed);--ds-interaction-active:var(--color-navigation-interaction-active);--ds-focus-ring-color:var(--color-navigation-interaction-focus)}:host(.ds-interaction-fill.ds-interaction-fill--surface-open:not(:disabled))::after,.ds-interaction-fill.ds-interaction-fill--surface-open:not(:disabled)::after{background:var(--ds-interaction-pressed)}@media (forced-colors: active){:host(.ds-interaction-fill)::after,.ds-interaction-fill::after{box-shadow:none;outline:var(--ds-interaction-border-width) solid var(--ds-forced-color-control-boundary);outline-offset:calc(-1 * var(--ds-interaction-border-width))}:host(.ds-interaction-fill--surface-open:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible))::after,.ds-interaction-fill--surface-open:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after{outline:var(--dimension-stroke-width-025) dashed var(--ds-forced-color-control-boundary);outline-offset:calc(-1 * var(--dimension-stroke-width-025))}:host(.ds-interaction-fill--selected)::before,.ds-interaction-fill--selected::before{background:transparent;outline:var(--dimension-stroke-width-025) solid var(--ds-forced-color-selected);outline-offset:calc(-1 * var(--dimension-stroke-width-025))}}@media (forced-colors: active) and (hover: hover) and (pointer: fine){:host(.ds-interaction-fill:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible))::after,.ds-interaction-fill:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after{outline-color:var(--ds-forced-color-selected);outline-width:var(--dimension-stroke-width-012)}}:host(.ds-scrollbar-hidden),.ds-scrollbar-hidden{scrollbar-width:none}:host(.ds-scrollbar-hidden)::-webkit-scrollbar,.ds-scrollbar-hidden::-webkit-scrollbar{display:none}:host{display:block;flex:0 0 auto;box-sizing:border-box;height:100%;min-height:0;overflow:hidden;--_panel-tools-rail-width:var(--dimension-size-600);--_panel-tools-drawer-width:var(--ds-shell-panel-tools-width, var(--dimension-panel-width-xs));--_panel-tools-border:var(--dimension-stroke-width-012, 1px) solid var(--_shell-tools-border, var(--color-border-tertiary));--_panel-tools-divider-color:var(--_shell-tools-divider, var(--color-divider-divider));--_panel-tools-divider:var(--dimension-stroke-width-012, 1px) solid var(--_panel-tools-divider-color);--_panel-tools-fg-secondary:var(--_shell-tools-fg-secondary, var(--color-foreground-secondary));--_panel-tools-shortcut-fg-secondary:var( --_shell-tools-fg-secondary, var(--color-chrome-foreground-secondary) );--_panel-tools-shortcut-border:var( --_shell-tools-border-secondary, var(--color-chrome-border-secondary) );--_panel-tools-shortcut-dot-ring:var( --_shell-tools-background-theme, var(--color-chrome-background-theme) );--_panel-tools-expand-dur:var(--effect-animation-duration-medium-1, 300ms)}.panel-tools__layout{display:flex;flex-direction:row-reverse;align-items:stretch;height:100%;min-height:0;box-sizing:border-box}.panel-tools__drawer{flex:0 0 auto;max-width:0;min-width:0;height:100%;min-height:0;overflow:hidden;box-sizing:border-box;transition:none}:host(.panel-tools--ready) .panel-tools__drawer{transition:max-width var(--_panel-tools-expand-dur) var(--effect-animation-easing-ease-in-out, ease)}:host(.panel-tools--ready.panel-tools--motion-opening) .panel-tools__drawer{transition:max-width var(--_panel-tools-expand-dur) var(--effect-animation-easing-ease-out, ease-out)}:host(.panel-tools--ready.panel-tools--motion-closing) .panel-tools__drawer{transition:max-width var(--_panel-tools-expand-dur) var(--effect-animation-easing-ease-in, ease-in)}:host(.panel-tools--open) .panel-tools__drawer{max-width:var(--_panel-tools-drawer-width)}.panel-tools__drawer--visible{border-left:var(--_panel-tools-border)}.panel-tools__drawer-surface{display:flex;flex-direction:column;width:var(--_panel-tools-drawer-width);height:100%;min-height:0;box-sizing:border-box;background-color:transparent}.panel-tools__full-views,.panel-tools__full-view{flex:1 1 auto;min-height:0;overflow:hidden}.panel-tools__full-view{height:100%}.panel-tools__full-view{display:none}.panel-tools__full-view--active{display:block}:host([presentation='fullscreen']){height:100%;inset:0;position:fixed;width:100%;z-index:var(--dimension-z-index-modal)}:host([presentation='fullscreen']) .panel-tools__rail{display:none}:host([presentation='fullscreen']) .panel-tools__drawer{max-width:100%;transition:none;width:100%}:host([presentation='fullscreen']) .panel-tools__drawer--visible{border-left:none}:host([presentation='fullscreen']) .panel-tools__drawer-surface{background-color:transparent;width:100%}:host([presentation='fullscreen']:not(.panel-tools--fullscreen)) .panel-tools__drawer-surface,:host(.panel-tools--fullscreen:not([presentation='fullscreen'])) .panel-tools__drawer-surface{visibility:hidden}:host(.panel-tools--presentation-snap) .panel-tools__drawer{transition:none}.panel-tools__body{flex:1 1 auto;min-height:0;overflow:auto;position:relative}:host(.panel-tools--drawer-resting) .panel-tools__body{content-visibility:auto;contain-intrinsic-size:auto calc(var(--dimension-size-base) * 25)}.panel-tools__view{display:none;height:100%;min-height:0;box-sizing:border-box;padding:var(--dimension-space-200);color:var(--_panel-tools-fg-secondary);font-family:var(--typography-font-family-ui);font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md);font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-negative-half)}.panel-tools__view ::slotted(*){margin:0;color:var(--_panel-tools-fg-secondary);font-family:var(--typography-font-family-ui);font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md);font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-negative-half)}.panel-tools__view--active{display:block}.panel-tools__rail{flex:0 0 var(--_panel-tools-rail-width);width:var(--_panel-tools-rail-width);min-width:var(--_panel-tools-rail-width);display:flex;flex-direction:column;box-sizing:border-box;height:100%;min-height:0;border-left:var(--_panel-tools-border);background-color:transparent}.panel-tools__rail-header{justify-content:center;height:var(--dimension-size-600);flex-shrink:0;border-bottom:var(--_panel-tools-divider)}.panel-tools__rail-header.panel-tools__rail-section--stacked{height:auto;min-height:var(--dimension-size-600)}.panel-tools__rail-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden}.panel-tools__rail-actions{display:flex;flex-direction:column;gap:var(--dimension-space-050);width:100%}.panel-tools__rail-footer{justify-content:center;flex-shrink:0;margin-top:auto}.panel-tools__rail-section--stacked{align-items:stretch}.panel-tools__rail-action{display:flex;align-items:center;justify-content:center;width:100%;height:var(--ds-control-height);flex-shrink:0}.panel-tools__accessory{display:flex;flex-direction:column;flex:0 0 calc(var(--dimension-size-400) * 2);box-sizing:border-box;width:100%;min-height:calc(var(--dimension-size-400) * 2)}.panel-tools__accessory--shortcut{flex-basis:var(--dimension-size-400);min-width:var(--dimension-size-400);min-height:var(--dimension-size-400)}.panel-tools__accessory--shortcut>ds-tooltip{display:flex;flex:1 1 auto;width:100%;min-height:0}.panel-tools__accessory--transient{align-items:center;gap:var(--dimension-space-100);width:var(--dimension-size-400);height:calc(var(--dimension-size-400) * 2);min-height:calc(var(--dimension-size-400) * 2);padding:var(--dimension-space-050);border-radius:var(--dimension-radius-half)}.panel-tools__accessory--transient-active{background-color:var(--color-background-bold-brand)}.panel-tools__accessory--transient-positive{background-color:var(--color-background-bold-positive)}.panel-tools__accessory--transient>ds-tooltip{display:flex;flex:0 0 var(--dimension-size-300);width:var(--dimension-size-300);height:var(--dimension-size-300);min-height:var(--dimension-size-300)}.panel-tools__shortcut{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:var(--dimension-radius-half);color:var(--_panel-tools-shortcut-fg-secondary);background:transparent;font:inherit}.panel-tools__shortcut:disabled{color:var(--color-foreground-disabled);cursor:not-allowed}.panel-tools__shortcut-content{display:flex;align-items:center;justify-content:center;width:var(--dimension-size-400);height:var(--dimension-size-400)}.panel-tools__shortcut-orb{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--dimension-size-300);height:var(--dimension-size-300);border:var(--dimension-stroke-width-012) solid var(--_panel-tools-shortcut-border);border-radius:var(--dimension-radius-half);background:transparent}.panel-tools__shortcut-dot{position:absolute;inset-block-start:calc((var(--dimension-size-400) - var(--dimension-iconography-md)) / 2);inset-inline-end:calc((var(--dimension-size-400) - var(--dimension-iconography-md)) / 2);z-index:2;pointer-events:none}.panel-tools__accessory-primary{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--dimension-size-300);height:var(--dimension-size-300);margin:0;padding:0;border:0;border-radius:var(--dimension-radius-half);color:var(--color-foreground-on-bold-background-secondary);background:transparent;font:inherit;--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-on-bold-background-secondary)}.panel-tools__accessory-primary:disabled{color:var(--color-foreground-on-bold-background-quaternary);cursor:not-allowed}.panel-tools__accessory-primary-content{display:flex;align-items:center;justify-content:center;position:relative;width:100%;height:100%}.panel-tools__accessory-image,.panel-tools__accessory-initial{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%;border-radius:var(--dimension-radius-half)}.panel-tools__accessory-image{object-fit:cover}.panel-tools__accessory-initial{color:inherit;background:transparent}.panel-tools__accessory-secondary{display:inline-flex;flex:0 0 var(--dimension-size-300);width:var(--dimension-size-300);height:var(--dimension-size-300)}.panel-tools__accessory-divider{flex:0 0 auto;box-sizing:border-box;width:100%;padding-block:var(--dimension-space-050)}.panel-tools__accessory-divider ds-divider{display:block;--_divider-color:var(--_panel-tools-divider-color)}@media (prefers-reduced-motion: reduce){:host(.panel-tools--ready.panel-tools--motion-opening) .panel-tools__drawer,:host(.panel-tools--ready.panel-tools--motion-closing) .panel-tools__drawer{transition:none}}`;const K=e(class e extends o{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.dsToolChange=i(this,"dsToolChange",7);this.dsPresentationChange=i(this,"dsPresentationChange",7);this.dsHeaderBack=i(this,"dsHeaderBack",7);this.dsHeaderAction=i(this,"dsHeaderAction",7);this.dsRailAccessoryAction=i(this,"dsRailAccessoryAction",7);this.dsChromeTransitionStart=i(this,"dsChromeTransitionStart",7);this.dsChromeTransitionEnd=i(this,"dsChromeTransitionEnd",7);this.open=false;this.presentation="drawer";this.fullscreenHeaderMode="shared";this.activeTool="";this.items=[];this.accessories=[];this.toolsLabel="Tools";this.toolShortcutsLabel="Tool shortcuts";this.headers={};this.storageKey="";this.motion="idle";this.drawerSurfaceRetained=false;this.readyForMotion=false;this.presentationMotionSuppressed=false;this.rovingIndex=0;this.fullViewToolIds=[];this.railBodyScrollable=false;this.motionEnableGeneration=0;this.presentationMotionGeneration=0;this.transitionGeneration=0;this.transitionFallbackTimer=null;this.ignoreReplacementTerminal=false;this.focusBeforeFullscreen=null;this.fullViewObserver=null;this.handleComposedHeaderAction=e=>{const o=e.detail;if(!this.activeTool||!o?.id)return;e.stopPropagation();this.dsHeaderAction.emit({tool:this.activeTool,id:o.id,anchor:o.anchor})};this.handleTransitionEnd=e=>{const o=this.renderRoot.querySelector(".panel-tools__drawer");if(e.target!==o)return;if(e.propertyName!=="max-width")return;if(this.ignoreReplacementTerminal){this.ignoreReplacementTerminal=false;return}if(e.type==="transitioncancel")return;if(o&&!this.drawerTransitionAtTerminal(o,this.motion))return;this.finishDrawerTransition()};this.handleToolChange=e=>{const o=E(this.open,this.activeTool,e);this.open=o.open;this.activeTool=o.activeTool;this.dsToolChange.emit({id:e,selected:o.selected})};this.handleRailKeyDown=(e,o,i)=>{const t=T(this.orderedRailEntries);if(!t.length)return;if((e.key==="Enter"||e.key===" ")&&i){e.preventDefault();i();return}if(e.key==="ArrowDown"){if(o>=t.length-1)return;e.preventDefault();this.focusRailAt(o+1);return}if(e.key==="ArrowUp"){if(o<=0)return;e.preventDefault();this.focusRailAt(o-1)}}}get railItems(){return this.items??[]}get orderedRailItems(){return k(this.railItems)}get railAccessories(){return this.accessories??[]}get orderedRailEntries(){return z(this.railItems,this.railAccessories)}disconnectedCallback(){this.el.removeEventListener("transitionend",this.handleTransitionEnd);this.el.removeEventListener("transitioncancel",this.handleTransitionEnd);this.el.removeEventListener("dsAction",this.handleComposedHeaderAction);this.clearTransitionCompletion();this.motionEnableGeneration+=1;this.fullViewObserver?.disconnect();this.fullViewObserver=null;this.disconnectRailBodyObserver()}presentationChanged(e,i){if(e===i)return;if(this.el.getAttribute("presentation")!==e){this.el.setAttribute("presentation",e)}const t=++this.presentationMotionGeneration;this.presentationMotionSuppressed=true;requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(t!==this.presentationMotionGeneration)return;this.presentationMotionSuppressed=false}))}));if(e==="fullscreen"){this.focusBeforeFullscreen=document.activeElement instanceof o?document.activeElement:null;this.open=true}else if(i==="fullscreen"){const e=this.focusBeforeFullscreen;const o=this.activeHeader().actions?.[0]?.id;requestAnimationFrame((async()=>{if(e?.isConnected){e.focus({preventScroll:true})}const i=e?document.activeElement===e||e.contains(document.activeElement):false;if(!i&&o)await this.focusHeaderAction(o);this.focusBeforeFullscreen=null}))}this.dsPresentationChange.emit({presentation:e})}handleFullscreenEscape(e){if(this.presentation!=="fullscreen"||e.key!=="Escape")return;e.preventDefault();e.stopPropagation();this.presentation="drawer"}deferMotionEnable(){if(this.readyForMotion)return;const e=++this.motionEnableGeneration;requestAnimationFrame((()=>{if(e!==this.motionEnableGeneration)return;requestAnimationFrame((()=>{if(e!==this.motionEnableGeneration)return;this.readyForMotion=true}))}))}connectedCallback(){this.el.setAttribute(r,"");this.el.addEventListener("transitionend",this.handleTransitionEnd);this.el.addEventListener("transitioncancel",this.handleTransitionEnd);this.el.addEventListener("dsAction",this.handleComposedHeaderAction)}componentWillLoad(){this.restoreLastActiveTool();this.drawerSurfaceRetained=this.open}openChanged(e,o){if(e)this.drawerSurfaceRetained=true;if(this.readyForMotion&&o!==undefined&&o!==e){this.startDrawerTransition(e?"opening":"closing")}else if(!e){this.drawerSurfaceRetained=false}this.deferMotionEnable()}activeToolChanged(){this.persistLastActiveTool();this.deferMotionEnable()}storageKeyChanged(){this.restoreLastActiveTool()}componentDidLoad(){this.deferMotionEnable();this.connectRailBodyObserver();this.updateRailBodyScrollable();this.syncFullViewTools();this.fullViewObserver=new MutationObserver((()=>this.syncFullViewTools()));this.fullViewObserver.observe(this.el,{childList:true,attributes:true,attributeFilter:["slot"]})}componentDidRender(){this.updateRailBodyScrollable()}connectRailBodyObserver(){this.disconnectRailBodyObserver();if(!this.railBodyEl||typeof ResizeObserver==="undefined")return;this.railBodyObserver=new ResizeObserver((()=>this.updateRailBodyScrollable()));this.railBodyObserver.observe(this.railBodyEl)}disconnectRailBodyObserver(){this.railBodyObserver?.disconnect();this.railBodyObserver=undefined}updateRailBodyScrollable(){const e=Boolean(this.railBodyEl&&this.railBodyEl.scrollHeight>this.railBodyEl.clientHeight+1);if(e!==this.railBodyScrollable)this.railBodyScrollable=e}itemsChanged(){this.rovingIndex=0;this.reconcileActiveTool();this.deferMotionEnable()}accessoriesChanged(e=[],o=[]){const i=T(z(this.railItems,o));const t=T(z(this.railItems,e));const s=this.renderRoot.activeElement;const n=s?.closest("[data-rail-focus-key]")?.dataset.railFocusKey;const r=n?i.indexOf(n):-1;const a=r>=0?r:this.rovingIndex;const l=C(i,t,a);const d=r>=0&&!t.includes(n??"");this.rovingIndex=l;if(d&&t.length){requestAnimationFrame((()=>this.focusRailAt(l)))}}restoreLastActiveTool(){if(!this.storageKey||this.activeTool)return;try{const e=localStorage.getItem(this.storageKey);if(S(e))this.activeTool=e}catch{}}persistLastActiveTool(){if(!this.storageKey||!this.activeTool)return;try{localStorage.setItem(this.storageKey,this.activeTool)}catch{}}clearPersistedTool(){if(!this.storageKey)return;try{localStorage.removeItem(this.storageKey)}catch{}}reconcileActiveTool(){const e=j(this.railItems,this.open,this.activeTool);if(!e.removedTool)return;this.clearPersistedTool();this.open=e.open;this.activeTool=e.activeTool;this.dsToolChange.emit({id:e.removedTool,selected:false})}startDrawerTransition(e){const o=this.renderRoot.querySelector(".panel-tools__drawer");if(this.motion!=="idle"){this.finishDrawerTransition();this.ignoreReplacementTerminal=true}this.motion=e;this.dsChromeTransitionStart.emit({source:"panel-tools",phase:e});const i=++this.transitionGeneration;requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(i!==this.transitionGeneration||this.motion!==e)return;if(!o){this.finishDrawerTransition();return}if(this.drawerTransitionAtTerminal(o,e)){this.finishDrawerTransition();return}const t=D(getComputedStyle(o));if(t<=0){this.finishDrawerTransition();return}this.transitionFallbackTimer=window.setTimeout((()=>{this.finishDrawerTransition()}),t)}))}))}drawerTransitionAtTerminal(e,o){const i=e.getBoundingClientRect().width;const t=e.querySelector(".panel-tools__drawer-surface");const s=t?.getBoundingClientRect().width??0;return B(i,s,o)}finishDrawerTransition(){const e=this.motion;const o=e!=="idle";this.clearTransitionCompletion();if(!o)return;this.ignoreReplacementTerminal=false;this.motion="idle";if(e==="closing"&&!this.open){this.drawerSurfaceRetained=false}this.dsChromeTransitionEnd.emit({source:"panel-tools"})}clearTransitionCompletion(){this.transitionGeneration+=1;if(this.transitionFallbackTimer!==null){window.clearTimeout(this.transitionFallbackTimer);this.transitionFallbackTimer=null}}isRailSelected(e){return this.open&&this.activeTool===e}isDrawerPresent(){return this.open||this.drawerSurfaceRetained}isViewActive(e){return this.isDrawerPresent()&&this.activeTool===e}hasFullView(e){return this.fullViewToolIds.includes(e)}syncFullViewTools(){const e=this.orderedRailItems.map((e=>e.id));const o=e.filter((e=>Boolean(this.el.querySelector(`[slot="${e}-view"]`))));if(o.join("|")!==this.fullViewToolIds.join("|"))this.fullViewToolIds=o}get renderRoot(){return this.el.shadowRoot??this.el}accessibleLabel(){if(!this.isDrawerPresent()||!this.activeTool)return"";const e=this.railItems.find((e=>e.id===this.activeTool));return e?.label??b[this.activeTool]??this.activeTool}resolvedHeaders(){return this.headers??{}}activeHeader(){if(!this.activeTool)return{};return this.resolvedHeaders()[this.activeTool]??{}}async activateTool(e){const o=this.railItems.find((o=>o.id===e));if(!o||o.isInactive)return;this.handleToolChange(e)}async closeDrawer(){if(!this.open)return;const e=this.activeTool;this.open=false;if(e){this.dsToolChange.emit({id:e,selected:false})}}async focusHeaderAction(e){const o=this.renderRoot.querySelector(`[data-header-action-id="${CSS.escape(e)}"]`);await(o?.setFocus?.())}focusRailAt(e){const o=T(this.orderedRailEntries);if(!o.length)return;const i=Math.max(0,Math.min(e,o.length-1));this.rovingIndex=i;const t=this.renderRoot.querySelector(`[data-rail-focus-key="${CSS.escape(o[i])}"]`);if(t?.setFocus){void t.setFocus()}else{t?.focus({preventScroll:true})}}renderRailAction(e,o){const i=`tool:${e.id}`;const s=e.ariaLabel??e.label??b[e.id]??e.id;return t("ds-tooltip",{key:e.id,label:s,shortcutKey:e.shortcutKey??y[e.id],side:"left",size:"sm",boundary:"viewport"},t("ds-button-unfilled",{variant:"icon",class:"panel-tools__rail-action",icon:e.icon,isActive:this.isRailSelected(e.id),activeFill:false,hasBorder:false,background:"chrome",pressScale:false,dot:e.dot??false,isInactive:e.isInactive,focusTabIndex:o===this.rovingIndex?0:-1,"data-rail-focus-key":i,"aria-label":s,pressed:this.isRailSelected(e.id),onFocusin:()=>{this.rovingIndex=o},onKeyDown:i=>this.handleRailKeyDown(i,o,(()=>this.handleToolChange(e.id))),onDsClick:()=>this.handleToolChange(e.id)}))}accessoryPrimaryLabel(e){const o=e.primaryAction.ariaLabel?.trim()||e.ariaLabel;const i=e.statusText.trim();return i?`${o}. ${i}`:o}emitAccessoryAction(e,o,i){if(o.isInactive)return;this.dsRailAccessoryAction.emit(A(e,o.id,i))}renderAccessoryVisual(e){if(e.visual.type==="image"){return t("img",{class:"panel-tools__accessory-image",src:e.visual.src,alt:"","aria-hidden":"true"})}if(e.visual.type==="initial"){const o=[...e.visual.initial.trim()].slice(0,2).join("");return t("ds-text",{class:"panel-tools__accessory-initial",as:"span",variant:"text-caption",emphasis:true,color:"inherit","aria-hidden":"true"},o)}return t("ds-icon",{name:e.visual.icon,size:"sm","aria-hidden":"true"})}renderRailShortcut(e,o){const i=`accessory:${e.id}:${e.action.id}`;const s=o.get(i);const n=e.action.ariaLabel?.trim()||e.ariaLabel;const r=[...e.initials.trim()].slice(0,2).join("");return t("div",{key:`accessory:${e.id}`,class:"panel-tools__accessory panel-tools__accessory--shortcut"},t("ds-tooltip",{label:n,side:"left",size:"sm",boundary:"viewport"},t("button",{type:"button",class:"panel-tools__shortcut ds-focus-ring-inset ds-interaction-fill ds-interaction-fill--on-chrome",disabled:e.action.isInactive,tabIndex:s===this.rovingIndex?0:-1,"data-rail-focus-key":i,"aria-label":n,onFocus:()=>{if(s!==undefined)this.rovingIndex=s},onKeyDown:e=>s===undefined?undefined:this.handleRailKeyDown(e,s),onClick:o=>this.emitAccessoryAction(e.id,e.action,o.currentTarget)},t("span",{class:"panel-tools__shortcut-content ds-interaction-fill__content"},t("ds-text",{class:"panel-tools__shortcut-orb",as:"span",variant:"text-caption",emphasis:true,color:"inherit"},r),e.dot?t("ds-badge",{class:"panel-tools__shortcut-dot",variant:"dot",background:"var(--_panel-tools-shortcut-dot-ring)","aria-hidden":"true"}):null))))}renderRailAccessory(e,o){if(e.type==="divider"){return t("div",{key:`accessory:${e.id}`,class:"panel-tools__accessory-divider","aria-hidden":"true"},t("ds-divider",null))}if(e.type==="shortcut"){return this.renderRailShortcut(e,o)}const i=`accessory:${e.id}:${e.primaryAction.id}`;const s=o.get(i);const n=this.accessoryPrimaryLabel(e);const r=e.secondaryAction;const a=r?`accessory:${e.id}:${r.id}`:"";const l=r?o.get(a):undefined;return t("div",{key:`accessory:${e.id}`,class:{"panel-tools__accessory":true,"panel-tools__accessory--transient":true,"panel-tools__accessory--transient-active":e.statusTone==="active","panel-tools__accessory--transient-positive":e.statusTone==="positive"}},t("ds-tooltip",{label:n,side:"left",size:"sm",boundary:"viewport"},t("button",{type:"button",class:"panel-tools__accessory-primary ds-focus-ring-inset ds-interaction-fill ds-interaction-fill--on-bold",disabled:e.primaryAction.isInactive,tabIndex:s===this.rovingIndex?0:-1,"data-rail-focus-key":i,"aria-label":n,onFocus:()=>{if(s!==undefined)this.rovingIndex=s},onKeyDown:e=>s===undefined?undefined:this.handleRailKeyDown(e,s),onClick:o=>this.emitAccessoryAction(e.id,e.primaryAction,o.currentTarget)},t("span",{class:"panel-tools__accessory-primary-content ds-interaction-fill__content"},this.renderAccessoryVisual(e)))),r?t("ds-tooltip",{label:r.ariaLabel,side:"left",size:"sm",boundary:"viewport"},t("ds-button-unfilled",{class:"panel-tools__accessory-secondary",variant:"icon",size:"sm",rounded:true,background:"bold",hasBorder:false,icon:r.icon,isInactive:r.isInactive,focusTabIndex:l===this.rovingIndex?0:-1,"data-rail-focus-key":a,"aria-label":r.ariaLabel,onFocusin:()=>{if(l!==undefined)this.rovingIndex=l},onKeyDown:e=>l===undefined?undefined:this.handleRailKeyDown(e,l),onDsClick:o=>this.emitAccessoryAction(e.id,r,o.currentTarget)})):null)}renderRailEntry(e,o){if(e.type==="tool"){return this.renderRailAction(e.item,o.get(`tool:${e.id}`)??0)}return this.renderRailAccessory(e.accessory,o)}render(){const e=this.accessibleLabel();const o=this.activeHeader();const i=o.title?.trim()||e;const n=o.actions??[];const r=this.orderedRailItems;const a=this.orderedRailEntries;const l=e=>e.type==="tool"?$(e.item):e.accessory.railPlacement;const d=a.filter((e=>l(e)==="header"));const c=a.filter((e=>l(e)==="body"));const h=a.filter((e=>l(e)==="footer"));const f=new Map(T(a).map(((e,o)=>[e,o])));const u=this.isDrawerPresent();const p=F(this.open,this.motion);const v=Boolean(u&&this.activeTool&&this.hasFullView(this.activeTool));const m=r.map((e=>e.id));return t(s,{key:"d54d19990d1cf51cfe07bb2d0207771a35f4435d",class:{"panel-tools":true,"panel-tools--open":this.open,"panel-tools--ready":this.readyForMotion,"panel-tools--motion-opening":this.motion==="opening","panel-tools--motion-closing":this.motion==="closing","panel-tools--drawer-resting":p,"panel-tools--fullscreen":this.presentation==="fullscreen","panel-tools--presentation-snap":this.presentationMotionSuppressed},"data-ds-overlay-boundary":true,role:this.presentation==="fullscreen"?"dialog":"complementary","aria-modal":this.presentation==="fullscreen"?"true":undefined,"aria-label":this.toolsLabel},t("div",{key:"5c947d000b6a3eb4a9a593bcd024ed1e7d180c01",class:"panel-tools__layout"},t("nav",{key:"a7e3cd8e6c451e3d2794442f69565f7ac1124f5c",class:"panel-tools__rail","aria-label":this.toolShortcutsLabel},d.length?t("div",{class:{"panel-tools__rail-header":true,"panel-tools__rail-section--stacked":d.length>1,"ds-chrome-row":d.length===1,"ds-chrome-column":d.length>1,"ds-chrome-space--md":true}},d.map((e=>this.renderRailEntry(e,f)))):null,t("div",{key:"32d40ad2b58639184fb673193ce0a6a5644c8b05",class:{"panel-tools__rail-body":true,"ds-chrome-column":true,"ds-chrome-space--md":true,"ds-scrollbar-hidden":true,"ds-focus-ring":this.railBodyScrollable},ref:e=>{const o=e??undefined;if(o===this.railBodyEl)return;this.railBodyEl=o;this.connectRailBodyObserver()},role:this.railBodyScrollable?"region":undefined,"aria-label":this.railBodyScrollable?this.toolShortcutsLabel:undefined,tabIndex:this.railBodyScrollable?0:undefined},t("div",{key:"0523c5dce3942e37513d199beb54ddd86c2035ed",class:"panel-tools__rail-actions"},c.map((e=>this.renderRailEntry(e,f))))),h.length?t("div",{class:{"panel-tools__rail-footer":true,"panel-tools__rail-section--stacked":h.length>1,"ds-chrome-row":h.length===1,"ds-chrome-column":h.length>1,"ds-chrome-space--md":true}},h.map((e=>this.renderRailEntry(e,f)))):null),t("div",{key:"961be7dbaafd258141cb8f28e1cdd8487d44ba45",class:{"panel-tools__drawer":true,"panel-tools__drawer--visible":u},"aria-hidden":u?null:"true",inert:u?undefined:true},t("div",{key:"c2b942e695bea292c68798fc1bcdff8b3191a339",class:"panel-tools__drawer-surface"},this.presentation!=="fullscreen"||this.fullscreenHeaderMode==="shared"?t("ds-panel-tool-header",{class:"panel-tools__header",heading:i,showBack:o.showBack??false,backIcon:o.backIcon||"ChevronLeft",backAriaLabel:o.backAriaLabel||"Back",showMenu:false,ref:e=>{const o=e;if(o)o.actions=n},onDsBack:()=>{if(this.activeTool)this.dsHeaderBack.emit({tool:this.activeTool})}}):null,t("div",{key:"045122e8d4ecd74015d612f4630579365fd6e016",class:"panel-tools__body",hidden:v},m.map((e=>{const o=this.isViewActive(e);return t("div",{class:{"panel-tools__view":true,"panel-tools__view--active":o},hidden:!o},t("slot",{name:e}))}))),t("div",{key:"40cc87d4725162600d199f2edf4fb683f8cfb14a",class:"panel-tools__full-views",hidden:!v},m.map((e=>t("div",{class:{"panel-tools__full-view":true,"panel-tools__full-view--active":this.isViewActive(e)&&this.hasFullView(e)},hidden:!(this.isViewActive(e)&&this.hasFullView(e))},t("slot",{name:`${e}-view`})))))))))}get el(){return this}static get watchers(){return{presentation:[{presentationChanged:0}],open:[{openChanged:0}],activeTool:[{activeToolChanged:0}],storageKey:[{storageKeyChanged:0}],items:[{itemsChanged:0}],accessories:[{accessoriesChanged:0}]}}static get style(){return M()}},[257,"ds-panel-tools",{open:[1540],presentation:[1537],fullscreenHeaderMode:[513,"fullscreen-header-mode"],activeTool:[1537,"active-tool"],items:[16],accessories:[16],toolsLabel:[1,"tools-label"],toolShortcutsLabel:[1,"tool-shortcuts-label"],headers:[16],storageKey:[1,"storage-key"],motion:[32],drawerSurfaceRetained:[32],readyForMotion:[32],presentationMotionSuppressed:[32],rovingIndex:[32],fullViewToolIds:[32],railBodyScrollable:[32],activateTool:[64],closeDrawer:[64],focusHeaderAction:[64]},[[10,"keydown","handleFullscreenEscape"]],{presentation:[{presentationChanged:0}],open:[{openChanged:0}],activeTool:[{activeToolChanged:0}],storageKey:[{storageKeyChanged:0}],items:[{itemsChanged:0}],accessories:[{accessoriesChanged:0}]}]);function R(){if(typeof customElements==="undefined"){return}const e=["ds-panel-tools","ds-badge","ds-button-unfilled","ds-divider","ds-icon","ds-loader","ds-panel-tool-header","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-panel-tools":if(!customElements.get(n(e))){customElements.define(n(e),K)}break;case"ds-badge":if(!customElements.get(n(e))){d()}break;case"ds-button-unfilled":if(!customElements.get(n(e))){c()}break;case"ds-divider":if(!customElements.get(n(e))){h()}break;case"ds-icon":if(!customElements.get(n(e))){f()}break;case"ds-loader":if(!customElements.get(n(e))){u()}break;case"ds-panel-tool-header":if(!customElements.get(n(e))){p()}break;case"ds-text":if(!customElements.get(n(e))){v()}break;case"ds-tooltip":if(!customElements.get(n(e))){a()}break}}))}R();export{K as P,b as a,E as b,_ as c,R as d,k as o,j as r};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as o,c as i,h as t,a as s,t as n}from"./index.js";import{a as r,d as a}from"./p-BMI0F08u.js";import{p as l}from"./p-mSCnWLhL.js";import{d}from"./p-8fddX3V3.js";import{d as c}from"./p-WEffoQQD.js";import{d as h}from"./p-G6r6yYg8.js";import{d as f}from"./p-BVsVUnAw.js";import{d as u}from"./p-0XTyQNRG.js";import{d as p}from"./p-CL0FpMKo.js";import{d as v}from"./p-DMPn_dt7.js";const m=["agents","messages","activity","search","stacks","help"];const g="agents";const b={search:"Search",messages:"Messages",stacks:"Stacks",activity:"Activity",agents:"Agents",help:"Help & Support"};const y={search:"K",agents:"A",messages:"M",stacks:"S",activity:"N",help:"/"};const _=[{id:"agents",icon:"AIAsterisk",label:b.agents,railPlacement:"header",order:0,shortcutKey:y.agents,mobileDestination:"agents"},{id:"messages",icon:"MessageBubbleStack",label:b.messages,order:0,shortcutKey:y.messages,mobileDestination:"messages"},{id:"activity",icon:"Bell",label:b.activity,order:1,shortcutKey:y.activity,mobileDestination:"activity"},{id:"search",icon:"MagnifyingGlass",label:b.search,order:2,shortcutKey:y.search,mobileDestination:"search"},{id:"help",icon:"QuestionCircle",label:b.help,railPlacement:"footer",order:0,shortcutKey:y.help,mobileDestination:"help"}];const w={header:0,body:1,footer:2};function x(e){const o=m.findIndex((o=>o===e.id));return e.order??(o<0?Number.MAX_SAFE_INTEGER:o)}function k(e){const o=new Map;for(const i of e){if(i.id.trim()&&!o.has(i.id))o.set(i.id,i)}return Array.from(o.values()).sort(((e,o)=>{const i=$(e);const t=$(o);const s=w[i]-w[t];if(s!==0)return s;return x(e)-x(o)}))}function z(e,o){const i=k(e).map((e=>({type:"tool",id:e.id,item:e})));const t=new Map;for(const e of o){if(e.id.trim()&&!t.has(e.id)){t.set(e.id,e)}}const s=Array.from(t.values()).map((e=>({type:"accessory",id:e.id,accessory:e})));return[...i,...s].sort(((e,o)=>{const i=e.type==="tool"?$(e.item):e.accessory.railPlacement;const t=o.type==="tool"?$(o.item):o.accessory.railPlacement;const s=w[i]-w[t];if(s!==0)return s;const n=e.type==="tool"?x(e.item):e.accessory.order;const r=o.type==="tool"?x(o.item):o.accessory.order;return n-r}))}function T(e){return e.flatMap((e=>{if(e.type==="tool")return[`tool:${e.id}`];if(e.accessory.type==="divider")return[];if(e.accessory.type==="shortcut"){return e.accessory.action.isInactive?[]:[`accessory:${e.id}:${e.accessory.action.id}`]}const o=e.accessory.primaryAction.isInactive?[]:[`accessory:${e.id}:${e.accessory.primaryAction.id}`];if(e.accessory.secondaryAction&&!e.accessory.secondaryAction.isInactive){o.push(`accessory:${e.id}:${e.accessory.secondaryAction.id}`)}return o}))}function C(e,o,i){if(!o.length)return 0;const t=e[i];const s=t?o.indexOf(t):-1;if(s>=0)return s;for(let t=i+1;t<e.length;t+=1){const i=o.indexOf(e[t]);if(i>=0)return i}for(let t=i-1;t>=0;t-=1){const i=o.indexOf(e[t]);if(i>=0)return i}return Math.min(Math.max(i,0),o.length-1)}function A(e,o,i){return{accessoryId:e,actionId:o,anchor:i}}function S(e){return typeof e==="string"&&e.trim().length>0}function $(e){if(e.railPlacement)return e.railPlacement;if(e.id===g)return"header";if(e.id==="help")return"footer";return"body"}function D(e,o,i){if(!i||e.some((e=>e.id===i))){return{open:o,activeTool:i,removedTool:""}}return{open:false,activeTool:"",removedTool:i}}function F(e){const o=e.transitionProperty.split(",").map((e=>e.trim()));const i=e.transitionDuration.split(",").map((e=>l(e.trim(),0)));const t=e.transitionDelay.split(",").map((e=>l(e.trim(),0)));return o.reduce(((e,o,s)=>{if(o!=="all"&&o!=="max-width")return e;const n=i[s%i.length]??0;const r=t[s%t.length]??0;return Math.max(e,n+r,0)}),0)}function M(e,o){return!e&&o==="idle"}function j(e,o,i){if(i==="closing")return e<=.5;if(i==="opening")return o>0&&e>=o-.5;return true}function E(e,o,i){if(e&&o===i){return{open:false,activeTool:i,selected:false}}return{open:true,activeTool:i,selected:true}}const B=()=>`:host,:where(.ds-table),:where(.tooltip-popup),:where(.ds-radius){--ds-radius-control:var(--dimension-radius-025);--ds-radius-card:var(--dimension-radius-050);--ds-radius-modal:var(--dimension-radius-050);--ds-radius-menu:var(--dimension-radius-075);--ds-radius-tooltip-control:var(--dimension-radius-025);--ds-radius-tooltip-menu:var(--dimension-radius-075);--ds-radius-table:var(--dimension-radius-050)}.ds-control--lg,:host(.ds-control--lg),:host(.ds-control--md),.ds-control--md,:host(.ds-control--sm),.ds-control--sm,:host(.ds-control--xs),.ds-control--xs{--ds-control-radius:var(--ds-radius-control)}:host(.ds-control--lg),.ds-control--lg{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}:host(.ds-control--md),.ds-control--md{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}:host(.ds-control--sm),.ds-control--sm{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}:host(.ds-control--xs),.ds-control--xs{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}:host(.ds-chrome-space--sm),.ds-chrome-space--sm{--ds-chrome-padding:var(--ds-chrome-space-sm-padding, var(--dimension-space-050));--ds-chrome-gap:var(--dimension-space-050)}:host(.ds-chrome-space--md),.ds-chrome-space--md{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}:host(.ds-chrome-space--lg),.ds-chrome-space--lg{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}:host(.ds-chrome-row),.ds-chrome-row,:host(.ds-chrome-column),.ds-chrome-column,:host(.ds-chrome-grid),.ds-chrome-grid{display:flex;box-sizing:border-box;gap:var(--ds-chrome-gap, var(--dimension-space-100));padding:var(--ds-chrome-padding, var(--dimension-space-100))}:host(.ds-chrome-row),.ds-chrome-row{flex-direction:row;align-items:center}:host(.ds-chrome-column),.ds-chrome-column{flex-direction:column}:host(.ds-chrome-grid),.ds-chrome-grid{display:grid;align-items:center}@media (forced-colors: active){:root,:host,.ds-forced-colors-scope{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}:host{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}:host(.ds-focus-ring),.ds-focus-ring,:host(.ds-focus-ring-inset),.ds-focus-ring-inset{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}:host(.ds-focus-ring:focus-visible),.ds-focus-ring:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}:host(.ds-focus-ring.ds-focus-ring--visible),.ds-focus-ring.ds-focus-ring--visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}:host(.ds-focus-ring-inset:focus-visible),.ds-focus-ring-inset:focus-visible{outline:none}:host(.ds-focus-ring-inset:focus-visible)::after,.ds-focus-ring-inset:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}:host(.ds-focus-ring-inset.ds-focus-ring--visible),.ds-focus-ring-inset.ds-focus-ring--visible{outline:none}:host(.ds-focus-ring-inset.ds-focus-ring--visible)::after,.ds-focus-ring-inset.ds-focus-ring--visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}@media (forced-colors: active){:host{--ds-focus-ring-color:var(--ds-forced-color-selected)}}@media (forced-colors: active){:root,:host,.ds-forced-colors-scope{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}:host(.ds-interaction-fill),.ds-interaction-fill{position:var(--ds-interaction-position, relative);z-index:var(--ds-interaction-z-index, 0);cursor:default;--ds-interaction-hover:var(--color-interaction-hover);--ds-interaction-pressed:var(--color-interaction-pressed);--ds-interaction-active:var(--color-interaction-active-brand);--ds-interaction-border-width:0px;--ds-interaction-border-color:transparent;--ds-interaction-divider-width:0px;--ds-interaction-divider-color:transparent;--ds-interaction-divider-inline-start-width:0px;--ds-interaction-divider-inline-start-color:transparent;--ds-interaction-divider-inline-end-width:0px;--ds-interaction-divider-inline-end-color:transparent}:host(.ds-interaction-fill)::before,.ds-interaction-fill::before,:host(.ds-interaction-fill)::after,.ds-interaction-fill::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;cursor:inherit;transition:none}:host(.ds-interaction-fill)::before,.ds-interaction-fill::before{z-index:1}:host(.ds-interaction-fill)::after,.ds-interaction-fill::after{z-index:3;box-shadow:inset 0 calc(-1 * var(--ds-interaction-divider-width)) 0 var(--ds-interaction-divider-color), inset var(--ds-interaction-divider-inline-start-width) 0 0 var(--ds-interaction-divider-inline-start-color), inset calc(-1 * var(--ds-interaction-divider-inline-end-width)) 0 0 var(--ds-interaction-divider-inline-end-color), inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color)}:host(.ds-interaction-fill--bordered),.ds-interaction-fill--bordered{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-secondary)}:host(.ds-interaction-fill--selected)::before,.ds-interaction-fill--selected::before{background:var(--ds-interaction-active)}:host(.ds-interaction-fill--selected),.ds-interaction-fill--selected{--ds-interaction-dot-ring:var(--ds-interaction-active)}@media (hover: hover) and (pointer: fine){:host(.ds-interaction-fill:hover:not(:disabled))::after,.ds-interaction-fill:hover:not(:disabled)::after{background:var(--ds-interaction-hover)}}:host(.ds-interaction-fill:active:not(:disabled))::after,.ds-interaction-fill:active:not(:disabled)::after{background:var(--ds-interaction-pressed)}:host(.ds-interaction-fill--grouped)::after,.ds-interaction-fill--grouped::after,:host(.ds-interaction-fill--grouped:active:not(:disabled))::after,.ds-interaction-fill--grouped:active:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}@media (hover: hover) and (pointer: fine){:host(.ds-interaction-fill--grouped:hover:not(:disabled))::after,.ds-interaction-fill--grouped:hover:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}}:host(.ds-interaction-fill--grouped),.ds-interaction-fill--grouped{--ds-interaction-divider-width:var(--ds-interaction-group-divider-width, 0px);--ds-interaction-divider-color:var(--ds-interaction-group-divider-color, transparent);--ds-interaction-divider-inline-start-width:var( --ds-interaction-group-divider-inline-start-width, 0px );--ds-interaction-divider-inline-start-color:var( --ds-interaction-group-divider-inline-start-color, transparent );--ds-interaction-divider-inline-end-width:var( --ds-interaction-group-divider-inline-end-width, 0px );--ds-interaction-divider-inline-end-color:var( --ds-interaction-group-divider-inline-end-color, transparent )}:host(.ds-interaction-fill)>.ds-interaction-fill__content,.ds-interaction-fill>.ds-interaction-fill__content,.ds-interaction-fill__content{position:relative;z-index:2;cursor:inherit}:host(.ds-interaction-fill--on-faint),.ds-interaction-fill--on-faint{--ds-interaction-active:var(--color-interaction-active)}:host(.ds-interaction-fill--on-medium),.ds-interaction-fill--on-medium{--ds-interaction-hover:var(--color-interaction-on-medium-background-hover);--ds-interaction-pressed:var(--color-interaction-on-medium-background-pressed);--ds-interaction-active:var(--color-interaction-on-medium-background-active);--ds-focus-ring-color:var(--color-interaction-on-medium-background-focus)}:host(.ds-interaction-fill--on-bold),.ds-interaction-fill--on-bold{--ds-interaction-hover:var(--color-interaction-on-bold-background-hover);--ds-interaction-pressed:var(--color-interaction-on-bold-background-pressed);--ds-interaction-active:var(--color-interaction-on-bold-background-active);--ds-focus-ring-color:var(--color-interaction-on-bold-background-focus)}:host(.ds-interaction-fill--on-strong),.ds-interaction-fill--on-strong{--ds-interaction-hover:var(--color-interaction-on-strong-background-hover);--ds-interaction-pressed:var(--color-interaction-on-strong-background-pressed);--ds-interaction-active:var(--color-interaction-on-strong-background-active);--ds-focus-ring-color:var(--color-interaction-on-strong-background-focus)}:host(.ds-interaction-fill--on-translucent),.ds-interaction-fill--on-translucent{--ds-interaction-hover:var(--color-translucent-interaction-hover);--ds-interaction-pressed:var(--color-translucent-interaction-pressed);--ds-interaction-active:var(--color-translucent-interaction-active-brand);--ds-focus-ring-color:var(--color-translucent-interaction-focus)}:host(.ds-interaction-fill--on-inverted),.ds-interaction-fill--on-inverted{--ds-interaction-hover:var(--color-inverted-interaction-hover);--ds-interaction-pressed:var(--color-inverted-interaction-pressed);--ds-interaction-active:var(--color-inverted-interaction-active-brand);--ds-focus-ring-color:var(--color-inverted-interaction-focus)}:host(.ds-interaction-fill--on-media),.ds-interaction-fill--on-media{--ds-interaction-hover:var(--color-media-interaction-hover);--ds-interaction-pressed:var(--color-media-interaction-pressed);--ds-interaction-active:var(--color-media-interaction-active);--ds-focus-ring-color:var(--color-media-interaction-focus)}:host(.ds-interaction-fill--on-always-dark),.ds-interaction-fill--on-always-dark{--ds-interaction-hover:var(--color-always-dark-interaction-hover);--ds-interaction-pressed:var(--color-always-dark-interaction-pressed);--ds-interaction-active:var(--color-always-dark-interaction-active-brand);--ds-focus-ring-color:var(--color-always-dark-interaction-focus)}:host(.ds-interaction-fill--on-chrome),.ds-interaction-fill--on-chrome{--ds-interaction-hover:var(--color-chrome-interaction-hover);--ds-interaction-pressed:var(--color-chrome-interaction-pressed);--ds-interaction-active:var(--color-chrome-interaction-active);--ds-focus-ring-color:var(--color-chrome-interaction-focus)}:host(.ds-interaction-fill--on-navigation),.ds-interaction-fill--on-navigation{--ds-interaction-hover:var(--color-navigation-interaction-hover);--ds-interaction-pressed:var(--color-navigation-interaction-pressed);--ds-interaction-active:var(--color-navigation-interaction-active);--ds-focus-ring-color:var(--color-navigation-interaction-focus)}:host(.ds-interaction-fill.ds-interaction-fill--surface-open:not(:disabled))::after,.ds-interaction-fill.ds-interaction-fill--surface-open:not(:disabled)::after{background:var(--ds-interaction-pressed)}@media (forced-colors: active){:host(.ds-interaction-fill)::after,.ds-interaction-fill::after{box-shadow:none;outline:var(--ds-interaction-border-width) solid var(--ds-forced-color-control-boundary);outline-offset:calc(-1 * var(--ds-interaction-border-width))}:host(.ds-interaction-fill--surface-open:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible))::after,.ds-interaction-fill--surface-open:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after{outline:var(--dimension-stroke-width-025) dashed var(--ds-forced-color-control-boundary);outline-offset:calc(-1 * var(--dimension-stroke-width-025))}:host(.ds-interaction-fill--selected)::before,.ds-interaction-fill--selected::before{background:transparent;outline:var(--dimension-stroke-width-025) solid var(--ds-forced-color-selected);outline-offset:calc(-1 * var(--dimension-stroke-width-025))}}@media (forced-colors: active) and (hover: hover) and (pointer: fine){:host(.ds-interaction-fill:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible))::after,.ds-interaction-fill:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after{outline-color:var(--ds-forced-color-selected);outline-width:var(--dimension-stroke-width-012)}}:host(.ds-scrollbar-hidden),.ds-scrollbar-hidden{scrollbar-width:none}:host(.ds-scrollbar-hidden)::-webkit-scrollbar,.ds-scrollbar-hidden::-webkit-scrollbar{display:none}:host{display:block;flex:0 0 auto;box-sizing:border-box;height:100%;min-height:0;overflow:hidden;--_panel-tools-rail-width:var(--dimension-size-600);--_panel-tools-drawer-width:var(--ds-shell-panel-tools-width, var(--dimension-panel-width-xs));--_panel-tools-border:var(--dimension-stroke-width-012, 1px) solid var(--_shell-tools-border, var(--color-border-tertiary));--_panel-tools-divider-color:var(--_shell-tools-divider, var(--color-divider-divider));--_panel-tools-divider:var(--dimension-stroke-width-012, 1px) solid var(--_panel-tools-divider-color);--_panel-tools-fg-secondary:var(--_shell-tools-fg-secondary, var(--color-foreground-secondary));--_panel-tools-shortcut-fg-secondary:var( --_shell-tools-fg-secondary, var(--color-chrome-foreground-secondary) );--_panel-tools-shortcut-border:var( --_shell-tools-border-secondary, var(--color-chrome-border-secondary) );--_panel-tools-shortcut-dot-ring:var( --_shell-tools-background-theme, var(--color-chrome-background-theme) );--_panel-tools-expand-dur:var(--effect-animation-duration-medium-1, 300ms)}.panel-tools__layout{display:flex;flex-direction:row-reverse;align-items:stretch;height:100%;min-height:0;box-sizing:border-box}.panel-tools__drawer{flex:0 0 auto;max-width:0;min-width:0;height:100%;min-height:0;overflow:hidden;box-sizing:border-box;transition:none}:host(.panel-tools--ready) .panel-tools__drawer{transition:max-width var(--_panel-tools-expand-dur) var(--effect-animation-easing-ease-in-out, ease)}:host(.panel-tools--ready.panel-tools--motion-opening) .panel-tools__drawer{transition:max-width var(--_panel-tools-expand-dur) var(--effect-animation-easing-ease-out, ease-out)}:host(.panel-tools--ready.panel-tools--motion-closing) .panel-tools__drawer{transition:max-width var(--_panel-tools-expand-dur) var(--effect-animation-easing-ease-in, ease-in)}:host(.panel-tools--open) .panel-tools__drawer{max-width:var(--_panel-tools-drawer-width)}.panel-tools__drawer--visible{border-left:var(--_panel-tools-border)}.panel-tools__drawer-surface{display:flex;flex-direction:column;width:var(--_panel-tools-drawer-width);height:100%;min-height:0;box-sizing:border-box;background-color:transparent}.panel-tools__full-views,.panel-tools__full-view{flex:1 1 auto;min-height:0;overflow:hidden}.panel-tools__full-view{height:100%}.panel-tools__full-view{display:none}.panel-tools__full-view--active{display:block}:host([presentation='fullscreen']){height:100%;inset:0;position:fixed;width:100%;z-index:var(--dimension-z-index-modal)}:host([presentation='fullscreen']) .panel-tools__rail{display:none}:host([presentation='fullscreen']) .panel-tools__drawer{max-width:100%;transition:none;width:100%}:host([presentation='fullscreen']) .panel-tools__drawer--visible{border-left:none}:host([presentation='fullscreen']) .panel-tools__drawer-surface{background-color:transparent;width:100%}:host([presentation='fullscreen']:not(.panel-tools--fullscreen)) .panel-tools__drawer-surface,:host(.panel-tools--fullscreen:not([presentation='fullscreen'])) .panel-tools__drawer-surface{visibility:hidden}:host(.panel-tools--presentation-snap) .panel-tools__drawer{transition:none}.panel-tools__body{flex:1 1 auto;min-height:0;overflow:auto;position:relative}:host(.panel-tools--drawer-resting) .panel-tools__body{content-visibility:auto;contain-intrinsic-size:auto calc(var(--dimension-size-base) * 25)}.panel-tools__view{display:none;height:100%;min-height:0;box-sizing:border-box;padding:var(--dimension-space-200);color:var(--_panel-tools-fg-secondary);font-family:var(--typography-font-family-ui);font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md);font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-negative-half)}.panel-tools__view ::slotted(*){margin:0;color:var(--_panel-tools-fg-secondary);font-family:var(--typography-font-family-ui);font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md);font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-negative-half)}.panel-tools__view--active{display:block}.panel-tools__rail{flex:0 0 var(--_panel-tools-rail-width);width:var(--_panel-tools-rail-width);min-width:var(--_panel-tools-rail-width);display:flex;flex-direction:column;box-sizing:border-box;height:100%;min-height:0;border-left:var(--_panel-tools-border);background-color:transparent}.panel-tools__rail-header{justify-content:center;height:var(--dimension-size-600);flex-shrink:0;border-bottom:var(--_panel-tools-divider)}.panel-tools__rail-header.panel-tools__rail-section--stacked{height:auto;min-height:var(--dimension-size-600)}.panel-tools__rail-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden}.panel-tools__rail-actions{display:flex;flex-direction:column;gap:var(--dimension-space-050);width:100%}.panel-tools__rail-footer{justify-content:center;flex-shrink:0;margin-top:auto}.panel-tools__rail-section--stacked{align-items:stretch}.panel-tools__rail-action{display:flex;align-items:center;justify-content:center;width:100%;height:var(--ds-control-height);flex-shrink:0}.panel-tools__accessory{display:flex;flex-direction:column;flex:0 0 calc(var(--dimension-size-400) * 2);box-sizing:border-box;width:100%;min-height:calc(var(--dimension-size-400) * 2)}.panel-tools__accessory--shortcut{flex-basis:var(--dimension-size-400);min-width:var(--dimension-size-400);min-height:var(--dimension-size-400)}.panel-tools__accessory--shortcut>ds-tooltip{display:flex;flex:1 1 auto;width:100%;min-height:0}.panel-tools__accessory--transient{align-items:center;gap:var(--dimension-space-100);width:var(--dimension-size-400);height:calc(var(--dimension-size-400) * 2);min-height:calc(var(--dimension-size-400) * 2);padding:var(--dimension-space-050);border-radius:var(--dimension-radius-half)}.panel-tools__accessory--transient-active{background-color:var(--color-background-bold-brand)}.panel-tools__accessory--transient-positive{background-color:var(--color-background-bold-positive)}.panel-tools__accessory--transient>ds-tooltip{display:flex;flex:0 0 var(--dimension-size-300);width:var(--dimension-size-300);height:var(--dimension-size-300);min-height:var(--dimension-size-300)}.panel-tools__shortcut{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:var(--dimension-radius-half);color:var(--_panel-tools-shortcut-fg-secondary);background:transparent;font:inherit}.panel-tools__shortcut:disabled{color:var(--color-foreground-disabled);cursor:not-allowed}.panel-tools__shortcut-content{display:flex;align-items:center;justify-content:center;width:var(--dimension-size-400);height:var(--dimension-size-400)}.panel-tools__shortcut-orb{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--dimension-size-300);height:var(--dimension-size-300);border:var(--dimension-stroke-width-012) solid var(--_panel-tools-shortcut-border);border-radius:var(--dimension-radius-half);background:transparent}.panel-tools__shortcut-dot{position:absolute;inset-block-start:calc((var(--dimension-size-400) - var(--dimension-iconography-md)) / 2);inset-inline-end:calc((var(--dimension-size-400) - var(--dimension-iconography-md)) / 2);z-index:2;pointer-events:none}.panel-tools__accessory-primary{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--dimension-size-300);height:var(--dimension-size-300);margin:0;padding:0;border:0;border-radius:var(--dimension-radius-half);color:var(--color-foreground-on-bold-background-secondary);background:transparent;font:inherit;--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-on-bold-background-secondary)}.panel-tools__accessory-primary:disabled{color:var(--color-foreground-on-bold-background-quaternary);cursor:not-allowed}.panel-tools__accessory-primary-content{display:flex;align-items:center;justify-content:center;position:relative;width:100%;height:100%}.panel-tools__accessory-image,.panel-tools__accessory-initial{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%;border-radius:var(--dimension-radius-half)}.panel-tools__accessory-image{object-fit:cover}.panel-tools__accessory-initial{color:inherit;background:transparent}.panel-tools__accessory-secondary{display:inline-flex;flex:0 0 var(--dimension-size-300);width:var(--dimension-size-300);height:var(--dimension-size-300)}.panel-tools__accessory-divider{flex:0 0 auto;box-sizing:border-box;width:100%;padding-block:var(--dimension-space-050)}.panel-tools__accessory-divider ds-divider{display:block;--_divider-color:var(--_panel-tools-divider-color)}@media (prefers-reduced-motion: reduce){:host(.panel-tools--ready.panel-tools--motion-opening) .panel-tools__drawer,:host(.panel-tools--ready.panel-tools--motion-closing) .panel-tools__drawer{transition:none}}`;const K=e(class e extends o{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.dsToolChange=i(this,"dsToolChange",7);this.dsPresentationChange=i(this,"dsPresentationChange",7);this.dsHeaderBack=i(this,"dsHeaderBack",7);this.dsHeaderAction=i(this,"dsHeaderAction",7);this.dsRailAccessoryAction=i(this,"dsRailAccessoryAction",7);this.dsChromeTransitionStart=i(this,"dsChromeTransitionStart",7);this.dsChromeTransitionEnd=i(this,"dsChromeTransitionEnd",7);this.open=false;this.presentation="drawer";this.fullscreenHeaderMode="shared";this.activeTool="";this.items=[];this.accessories=[];this.toolsLabel="Tools";this.toolShortcutsLabel="Tool shortcuts";this.headers={};this.storageKey="";this.motion="idle";this.drawerSurfaceRetained=false;this.readyForMotion=false;this.presentationMotionSuppressed=false;this.rovingIndex=0;this.fullViewToolIds=[];this.railBodyScrollable=false;this.motionEnableGeneration=0;this.presentationMotionGeneration=0;this.transitionGeneration=0;this.transitionFallbackTimer=null;this.ignoreReplacementTerminal=false;this.focusBeforeFullscreen=null;this.fullViewObserver=null;this.handleComposedHeaderAction=e=>{const o=e.detail;if(!this.activeTool||!o?.id)return;e.stopPropagation();this.dsHeaderAction.emit({tool:this.activeTool,id:o.id,anchor:o.anchor})};this.handleTransitionEnd=e=>{const o=this.renderRoot.querySelector(".panel-tools__drawer");if(e.target!==o)return;if(e.propertyName!=="max-width")return;if(this.ignoreReplacementTerminal){this.ignoreReplacementTerminal=false;return}if(e.type==="transitioncancel")return;if(o&&!this.drawerTransitionAtTerminal(o,this.motion))return;this.finishDrawerTransition()};this.handleToolChange=e=>{const o=E(this.open,this.activeTool,e);this.open=o.open;this.activeTool=o.activeTool;this.dsToolChange.emit({id:e,selected:o.selected})};this.handleRailKeyDown=(e,o,i)=>{const t=T(this.orderedRailEntries);if(!t.length)return;if((e.key==="Enter"||e.key===" ")&&i){e.preventDefault();i();return}if(e.key==="ArrowDown"){if(o>=t.length-1)return;e.preventDefault();this.focusRailAt(o+1);return}if(e.key==="ArrowUp"){if(o<=0)return;e.preventDefault();this.focusRailAt(o-1)}}}get railItems(){return this.items??[]}get orderedRailItems(){return k(this.railItems)}get railAccessories(){return this.accessories??[]}get orderedRailEntries(){return z(this.railItems,this.railAccessories)}disconnectedCallback(){this.el.removeEventListener("transitionend",this.handleTransitionEnd);this.el.removeEventListener("transitioncancel",this.handleTransitionEnd);this.el.removeEventListener("dsAction",this.handleComposedHeaderAction);this.clearTransitionCompletion();this.motionEnableGeneration+=1;this.fullViewObserver?.disconnect();this.fullViewObserver=null;this.disconnectRailBodyObserver()}presentationChanged(e,i){if(e===i)return;if(this.el.getAttribute("presentation")!==e){this.el.setAttribute("presentation",e)}const t=++this.presentationMotionGeneration;this.presentationMotionSuppressed=true;requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(t!==this.presentationMotionGeneration)return;this.presentationMotionSuppressed=false}))}));if(e==="fullscreen"){this.focusBeforeFullscreen=document.activeElement instanceof o?document.activeElement:null;this.open=true}else if(i==="fullscreen"){const e=this.focusBeforeFullscreen;const o=this.activeHeader().actions?.[0]?.id;requestAnimationFrame((async()=>{if(e?.isConnected){e.focus({preventScroll:true})}const i=e?document.activeElement===e||e.contains(document.activeElement):false;if(!i&&o)await this.focusHeaderAction(o);this.focusBeforeFullscreen=null}))}this.dsPresentationChange.emit({presentation:e})}handleFullscreenEscape(e){if(this.presentation!=="fullscreen"||e.key!=="Escape")return;e.preventDefault();e.stopPropagation();this.presentation="drawer"}deferMotionEnable(){if(this.readyForMotion)return;const e=++this.motionEnableGeneration;requestAnimationFrame((()=>{if(e!==this.motionEnableGeneration)return;requestAnimationFrame((()=>{if(e!==this.motionEnableGeneration)return;this.readyForMotion=true}))}))}connectedCallback(){this.el.setAttribute(r,"");this.el.addEventListener("transitionend",this.handleTransitionEnd);this.el.addEventListener("transitioncancel",this.handleTransitionEnd);this.el.addEventListener("dsAction",this.handleComposedHeaderAction)}componentWillLoad(){this.restoreLastActiveTool();this.drawerSurfaceRetained=this.open}openChanged(e,o){if(e)this.drawerSurfaceRetained=true;if(this.readyForMotion&&o!==undefined&&o!==e){this.startDrawerTransition(e?"opening":"closing")}else if(!e){this.drawerSurfaceRetained=false}this.deferMotionEnable()}activeToolChanged(){this.persistLastActiveTool();this.deferMotionEnable()}storageKeyChanged(){this.restoreLastActiveTool()}componentDidLoad(){this.deferMotionEnable();this.connectRailBodyObserver();this.updateRailBodyScrollable();this.syncFullViewTools();this.fullViewObserver=new MutationObserver((()=>this.syncFullViewTools()));this.fullViewObserver.observe(this.el,{childList:true,attributes:true,attributeFilter:["slot"]})}componentDidRender(){this.updateRailBodyScrollable()}connectRailBodyObserver(){this.disconnectRailBodyObserver();if(!this.railBodyEl||typeof ResizeObserver==="undefined")return;this.railBodyObserver=new ResizeObserver((()=>this.updateRailBodyScrollable()));this.railBodyObserver.observe(this.railBodyEl)}disconnectRailBodyObserver(){this.railBodyObserver?.disconnect();this.railBodyObserver=undefined}updateRailBodyScrollable(){const e=Boolean(this.railBodyEl&&this.railBodyEl.scrollHeight>this.railBodyEl.clientHeight+1);if(e!==this.railBodyScrollable)this.railBodyScrollable=e}itemsChanged(){this.rovingIndex=0;this.reconcileActiveTool();this.deferMotionEnable()}accessoriesChanged(e=[],o=[]){const i=T(z(this.railItems,o));const t=T(z(this.railItems,e));const s=this.renderRoot.activeElement;const n=s?.closest("[data-rail-focus-key]")?.dataset.railFocusKey;const r=n?i.indexOf(n):-1;const a=r>=0?r:this.rovingIndex;const l=C(i,t,a);const d=r>=0&&!t.includes(n??"");this.rovingIndex=l;if(d&&t.length){requestAnimationFrame((()=>this.focusRailAt(l)))}}restoreLastActiveTool(){if(!this.storageKey||this.activeTool)return;try{const e=localStorage.getItem(this.storageKey);if(S(e))this.activeTool=e}catch{}}persistLastActiveTool(){if(!this.storageKey||!this.activeTool)return;try{localStorage.setItem(this.storageKey,this.activeTool)}catch{}}clearPersistedTool(){if(!this.storageKey)return;try{localStorage.removeItem(this.storageKey)}catch{}}reconcileActiveTool(){const e=D(this.railItems,this.open,this.activeTool);if(!e.removedTool)return;this.clearPersistedTool();this.open=e.open;this.activeTool=e.activeTool;this.dsToolChange.emit({id:e.removedTool,selected:false})}startDrawerTransition(e){const o=this.renderRoot.querySelector(".panel-tools__drawer");if(this.motion!=="idle"){this.finishDrawerTransition();this.ignoreReplacementTerminal=true}this.motion=e;this.dsChromeTransitionStart.emit({source:"panel-tools",phase:e});const i=++this.transitionGeneration;requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(i!==this.transitionGeneration||this.motion!==e)return;if(!o){this.finishDrawerTransition();return}if(this.drawerTransitionAtTerminal(o,e)){this.finishDrawerTransition();return}const t=F(getComputedStyle(o));if(t<=0){this.finishDrawerTransition();return}this.transitionFallbackTimer=window.setTimeout((()=>{this.finishDrawerTransition()}),t)}))}))}drawerTransitionAtTerminal(e,o){const i=e.getBoundingClientRect().width;const t=e.querySelector(".panel-tools__drawer-surface");const s=t?.getBoundingClientRect().width??0;return j(i,s,o)}finishDrawerTransition(){const e=this.motion;const o=e!=="idle";this.clearTransitionCompletion();if(!o)return;this.ignoreReplacementTerminal=false;this.motion="idle";if(e==="closing"&&!this.open){this.drawerSurfaceRetained=false}this.dsChromeTransitionEnd.emit({source:"panel-tools"})}clearTransitionCompletion(){this.transitionGeneration+=1;if(this.transitionFallbackTimer!==null){window.clearTimeout(this.transitionFallbackTimer);this.transitionFallbackTimer=null}}isRailSelected(e){return this.open&&this.activeTool===e}isDrawerPresent(){return this.open||this.drawerSurfaceRetained}isViewActive(e){return this.isDrawerPresent()&&this.activeTool===e}hasFullView(e){return this.fullViewToolIds.includes(e)}syncFullViewTools(){const e=this.orderedRailItems.map((e=>e.id));const o=e.filter((e=>Boolean(this.el.querySelector(`[slot="${e}-view"]`))));if(o.join("|")!==this.fullViewToolIds.join("|"))this.fullViewToolIds=o}get renderRoot(){return this.el.shadowRoot??this.el}accessibleLabel(){if(!this.isDrawerPresent()||!this.activeTool)return"";const e=this.railItems.find((e=>e.id===this.activeTool));return e?.label??b[this.activeTool]??this.activeTool}resolvedHeaders(){return this.headers??{}}activeHeader(){if(!this.activeTool)return{};return this.resolvedHeaders()[this.activeTool]??{}}async activateTool(e){const o=this.railItems.find((o=>o.id===e));if(!o||o.isInactive)return;this.handleToolChange(e)}async closeDrawer(){if(!this.open)return;const e=this.activeTool;this.open=false;if(e){this.dsToolChange.emit({id:e,selected:false})}}async focusHeaderAction(e){const o=this.renderRoot.querySelector(`[data-header-action-id="${CSS.escape(e)}"]`);await(o?.setFocus?.())}focusRailAt(e){const o=T(this.orderedRailEntries);if(!o.length)return;const i=Math.max(0,Math.min(e,o.length-1));this.rovingIndex=i;const t=this.renderRoot.querySelector(`[data-rail-focus-key="${CSS.escape(o[i])}"]`);if(t?.setFocus){void t.setFocus()}else{t?.focus({preventScroll:true})}}renderRailAction(e,o){const i=`tool:${e.id}`;const s=e.ariaLabel??e.label??b[e.id]??e.id;return t("ds-tooltip",{key:e.id,label:s,shortcutKey:e.shortcutKey??y[e.id],side:"left",size:"sm",boundary:"viewport"},t("ds-button-unfilled",{variant:"icon",class:"panel-tools__rail-action",icon:e.icon,isActive:this.isRailSelected(e.id),activeFill:false,hasBorder:false,background:"chrome",pressScale:false,dot:e.dot??false,isInactive:e.isInactive,focusTabIndex:o===this.rovingIndex?0:-1,"data-rail-focus-key":i,"aria-label":s,pressed:this.isRailSelected(e.id),onFocusin:()=>{this.rovingIndex=o},onKeyDown:i=>this.handleRailKeyDown(i,o,(()=>this.handleToolChange(e.id))),onDsClick:()=>this.handleToolChange(e.id)}))}accessoryPrimaryLabel(e){const o=e.primaryAction.ariaLabel?.trim()||e.ariaLabel;const i=e.statusText.trim();return i?`${o}. ${i}`:o}emitAccessoryAction(e,o,i){if(o.isInactive)return;this.dsRailAccessoryAction.emit(A(e,o.id,i))}renderAccessoryVisual(e){if(e.visual.type==="image"){return t("img",{class:"panel-tools__accessory-image",src:e.visual.src,alt:"","aria-hidden":"true"})}if(e.visual.type==="initial"){const o=[...e.visual.initial.trim()].slice(0,2).join("");return t("ds-text",{class:"panel-tools__accessory-initial",as:"span",variant:"text-caption",emphasis:true,color:"inherit","aria-hidden":"true"},o)}return t("ds-icon",{name:e.visual.icon,size:"sm","aria-hidden":"true"})}renderRailShortcut(e,o){const i=`accessory:${e.id}:${e.action.id}`;const s=o.get(i);const n=e.action.ariaLabel?.trim()||e.ariaLabel;const r=[...e.initials.trim()].slice(0,2).join("");return t("div",{key:`accessory:${e.id}`,class:"panel-tools__accessory panel-tools__accessory--shortcut"},t("ds-tooltip",{label:n,side:"left",size:"sm",boundary:"viewport"},t("button",{type:"button",class:"panel-tools__shortcut ds-focus-ring-inset ds-interaction-fill ds-interaction-fill--on-chrome",disabled:e.action.isInactive,tabIndex:s===this.rovingIndex?0:-1,"data-rail-focus-key":i,"aria-label":n,onFocus:()=>{if(s!==undefined)this.rovingIndex=s},onKeyDown:e=>s===undefined?undefined:this.handleRailKeyDown(e,s),onClick:o=>this.emitAccessoryAction(e.id,e.action,o.currentTarget)},t("span",{class:"panel-tools__shortcut-content ds-interaction-fill__content"},t("ds-text",{class:"panel-tools__shortcut-orb",as:"span",variant:"text-caption",emphasis:true,color:"inherit"},r),e.dot?t("ds-badge",{class:"panel-tools__shortcut-dot",variant:"dot",background:"var(--_panel-tools-shortcut-dot-ring)","aria-hidden":"true"}):null))))}renderRailAccessory(e,o){if(e.type==="divider"){return t("div",{key:`accessory:${e.id}`,class:"panel-tools__accessory-divider","aria-hidden":"true"},t("ds-divider",null))}if(e.type==="shortcut"){return this.renderRailShortcut(e,o)}const i=`accessory:${e.id}:${e.primaryAction.id}`;const s=o.get(i);const n=this.accessoryPrimaryLabel(e);const r=e.secondaryAction;const a=r?`accessory:${e.id}:${r.id}`:"";const l=r?o.get(a):undefined;return t("div",{key:`accessory:${e.id}`,class:{"panel-tools__accessory":true,"panel-tools__accessory--transient":true,"panel-tools__accessory--transient-active":e.statusTone==="active","panel-tools__accessory--transient-positive":e.statusTone==="positive"}},t("ds-tooltip",{label:n,side:"left",size:"sm",boundary:"viewport"},t("button",{type:"button",class:"panel-tools__accessory-primary ds-focus-ring-inset ds-interaction-fill ds-interaction-fill--on-bold",disabled:e.primaryAction.isInactive,tabIndex:s===this.rovingIndex?0:-1,"data-rail-focus-key":i,"aria-label":n,onFocus:()=>{if(s!==undefined)this.rovingIndex=s},onKeyDown:e=>s===undefined?undefined:this.handleRailKeyDown(e,s),onClick:o=>this.emitAccessoryAction(e.id,e.primaryAction,o.currentTarget)},t("span",{class:"panel-tools__accessory-primary-content ds-interaction-fill__content"},this.renderAccessoryVisual(e)))),r?t("ds-tooltip",{label:r.ariaLabel,side:"left",size:"sm",boundary:"viewport"},t("ds-button-unfilled",{class:"panel-tools__accessory-secondary",variant:"icon",size:"sm",rounded:true,background:"bold",hasBorder:false,icon:r.icon,isInactive:r.isInactive,focusTabIndex:l===this.rovingIndex?0:-1,"data-rail-focus-key":a,"aria-label":r.ariaLabel,onFocusin:()=>{if(l!==undefined)this.rovingIndex=l},onKeyDown:e=>l===undefined?undefined:this.handleRailKeyDown(e,l),onDsClick:o=>this.emitAccessoryAction(e.id,r,o.currentTarget)})):null)}renderRailEntry(e,o){if(e.type==="tool"){return this.renderRailAction(e.item,o.get(`tool:${e.id}`)??0)}return this.renderRailAccessory(e.accessory,o)}render(){const e=this.accessibleLabel();const o=this.activeHeader();const i=o.title?.trim()||e;const n=o.actions??[];const r=this.orderedRailItems;const a=this.orderedRailEntries;const l=e=>e.type==="tool"?$(e.item):e.accessory.railPlacement;const d=a.filter((e=>l(e)==="header"));const c=a.filter((e=>l(e)==="body"));const h=a.filter((e=>l(e)==="footer"));const f=new Map(T(a).map(((e,o)=>[e,o])));const u=this.isDrawerPresent();const p=M(this.open,this.motion);const v=Boolean(u&&this.activeTool&&this.hasFullView(this.activeTool));const m=r.map((e=>e.id));return t(s,{key:"45e204ae960374cfc1d3681f60962e108fbb0468",class:{"panel-tools":true,"panel-tools--open":this.open,"panel-tools--ready":this.readyForMotion,"panel-tools--motion-opening":this.motion==="opening","panel-tools--motion-closing":this.motion==="closing","panel-tools--drawer-resting":p,"panel-tools--fullscreen":this.presentation==="fullscreen","panel-tools--presentation-snap":this.presentationMotionSuppressed},"data-ds-overlay-boundary":true,role:this.presentation==="fullscreen"?"dialog":"complementary","aria-modal":this.presentation==="fullscreen"?"true":undefined,"aria-label":this.toolsLabel},t("div",{key:"049996e38ed5d329248e54f1c596b5aff7fe553c",class:"panel-tools__layout"},t("nav",{key:"e555ffd19db886d3318d203f93c7f372e6c22ad1",class:"panel-tools__rail","aria-label":this.toolShortcutsLabel},d.length?t("div",{class:{"panel-tools__rail-header":true,"panel-tools__rail-section--stacked":d.length>1,"ds-chrome-row":d.length===1,"ds-chrome-column":d.length>1,"ds-chrome-space--md":true}},d.map((e=>this.renderRailEntry(e,f)))):null,t("div",{key:"841cc12542837786ade8bea08c9317014f889839",class:{"panel-tools__rail-body":true,"ds-chrome-column":true,"ds-chrome-space--md":true,"ds-scrollbar-hidden":true,"ds-focus-ring":this.railBodyScrollable},ref:e=>{const o=e??undefined;if(o===this.railBodyEl)return;this.railBodyEl=o;this.connectRailBodyObserver()},role:this.railBodyScrollable?"region":undefined,"aria-label":this.railBodyScrollable?this.toolShortcutsLabel:undefined,tabIndex:this.railBodyScrollable?0:undefined},t("div",{key:"a54deb3f2c392a1300179d379557563bdb699672",class:"panel-tools__rail-actions"},c.map((e=>this.renderRailEntry(e,f))))),h.length?t("div",{class:{"panel-tools__rail-footer":true,"panel-tools__rail-section--stacked":h.length>1,"ds-chrome-row":h.length===1,"ds-chrome-column":h.length>1,"ds-chrome-space--md":true}},h.map((e=>this.renderRailEntry(e,f)))):null),t("div",{key:"99a5fecc9397e83241e35dcac03af99aa3869edc",class:{"panel-tools__drawer":true,"panel-tools__drawer--visible":u},"aria-hidden":u?null:"true",inert:u?undefined:true},t("div",{key:"41c29741e77e10b403f58480c2bf7e2b3d7a33c2",class:"panel-tools__drawer-surface"},this.presentation!=="fullscreen"||this.fullscreenHeaderMode==="shared"?t("ds-panel-tool-header",{class:"panel-tools__header",heading:i,showBack:o.showBack??false,backIcon:o.backIcon||"ChevronLeft",backAriaLabel:o.backAriaLabel||"Back",showMenu:false,ref:e=>{const o=e;if(o)o.actions=n},onDsBack:()=>{if(this.activeTool)this.dsHeaderBack.emit({tool:this.activeTool})}}):null,t("div",{key:"12e4c3524810ba2721a59bc63d5d2acf75c62f4d",class:"panel-tools__body",hidden:v},m.map((e=>{const o=this.isViewActive(e);return t("div",{class:{"panel-tools__view":true,"panel-tools__view--active":o},hidden:!o},t("slot",{name:e}))}))),t("div",{key:"feccbb82077d0181812a1d3501dbc6d436772851",class:"panel-tools__full-views",hidden:!v},m.map((e=>t("div",{class:{"panel-tools__full-view":true,"panel-tools__full-view--active":this.isViewActive(e)&&this.hasFullView(e)},hidden:!(this.isViewActive(e)&&this.hasFullView(e))},t("slot",{name:`${e}-view`})))))))))}get el(){return this}static get watchers(){return{presentation:[{presentationChanged:0}],open:[{openChanged:0}],activeTool:[{activeToolChanged:0}],storageKey:[{storageKeyChanged:0}],items:[{itemsChanged:0}],accessories:[{accessoriesChanged:0}]}}static get style(){return B()}},[257,"ds-panel-tools",{open:[1540],presentation:[1537],fullscreenHeaderMode:[513,"fullscreen-header-mode"],activeTool:[1537,"active-tool"],items:[16],accessories:[16],toolsLabel:[1,"tools-label"],toolShortcutsLabel:[1,"tool-shortcuts-label"],headers:[16],storageKey:[1,"storage-key"],motion:[32],drawerSurfaceRetained:[32],readyForMotion:[32],presentationMotionSuppressed:[32],rovingIndex:[32],fullViewToolIds:[32],railBodyScrollable:[32],activateTool:[64],closeDrawer:[64],focusHeaderAction:[64]},[[10,"keydown","handleFullscreenEscape"]],{presentation:[{presentationChanged:0}],open:[{openChanged:0}],activeTool:[{activeToolChanged:0}],storageKey:[{storageKeyChanged:0}],items:[{itemsChanged:0}],accessories:[{accessoriesChanged:0}]}]);function R(){if(typeof customElements==="undefined"){return}const e=["ds-panel-tools","ds-badge","ds-button-unfilled","ds-divider","ds-icon","ds-loader","ds-panel-tool-header","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-panel-tools":if(!customElements.get(n(e))){customElements.define(n(e),K)}break;case"ds-badge":if(!customElements.get(n(e))){d()}break;case"ds-button-unfilled":if(!customElements.get(n(e))){c()}break;case"ds-divider":if(!customElements.get(n(e))){h()}break;case"ds-icon":if(!customElements.get(n(e))){f()}break;case"ds-loader":if(!customElements.get(n(e))){u()}break;case"ds-panel-tool-header":if(!customElements.get(n(e))){p()}break;case"ds-text":if(!customElements.get(n(e))){v()}break;case"ds-tooltip":if(!customElements.get(n(e))){a()}break}}))}R();export{K as P,b as a,E as b,_ as c,R as d,k as o,D as r};
|
|
2
|
+
//# sourceMappingURL=p-By_jYvHp.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{p as i,H as e,c as s,h as t,a as o,t as n}from"./index.js";import{g as r,i as c}from"./p-BQq26pt9.js";import{C as d}from"./p-DlsjHRU3.js";import{d as a}from"./p-8fddX3V3.js";import{d as l}from"./p-WEffoQQD.js";import{d as h}from"./p-BVsVUnAw.js";import{d as m}from"./p-0XTyQNRG.js";import{d as b}from"./p-BpPHCF63.js";import{d as f}from"./p-Nx52go85.js";import{d as u}from"./p-KTaiJztz.js";import{d as v}from"./p-B-ChwMFE.js";import{d as g}from"./p-DMPn_dt7.js";import{d as w}from"./p-BMI0F08u.js";import{r as p,T as x}from"./p-mSCnWLhL.js";function k(i,e){const s=r(i);const t=s.findIndex((i=>i.id===e));const o=t>=0?t:0;return{selectedIndex:o,selected:s[o],hasPrevious:o>0,hasNext:o<s.length-1}}const _=()=>`@media (forced-colors: active){.sc-ds-mobile-section-switcher:root,.sc-ds-mobile-section-switcher-h,.ds-forced-colors-scope.sc-ds-mobile-section-switcher{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.sc-ds-mobile-section-switcher-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-mobile-section-switcher-h,.ds-focus-ring.sc-ds-mobile-section-switcher,.ds-focus-ring-inset.sc-ds-mobile-section-switcher-h,.ds-focus-ring-inset.sc-ds-mobile-section-switcher{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.ds-focus-ring.sc-ds-mobile-section-switcher-h:focus-visible,.ds-focus-ring.sc-ds-mobile-section-switcher:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-mobile-section-switcher-h,.ds-focus-ring.ds-focus-ring--visible.sc-ds-mobile-section-switcher{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-mobile-section-switcher-h:focus-visible,.ds-focus-ring-inset.sc-ds-mobile-section-switcher:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-mobile-section-switcher-h:focus-visible::after,.ds-focus-ring-inset.sc-ds-mobile-section-switcher:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-mobile-section-switcher-h,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-mobile-section-switcher{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-mobile-section-switcher-h::after,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-mobile-section-switcher::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}@media (forced-colors: active){.sc-ds-mobile-section-switcher-h{--ds-focus-ring-color:var(--ds-forced-color-selected)}}@media (forced-colors: active){.sc-ds-mobile-section-switcher:root,.sc-ds-mobile-section-switcher-h,.ds-forced-colors-scope.sc-ds-mobile-section-switcher{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-interaction-fill.sc-ds-mobile-section-switcher-h,.ds-interaction-fill.sc-ds-mobile-section-switcher{position:var(--ds-interaction-position, relative);z-index:var(--ds-interaction-z-index, 0);cursor:default;--ds-interaction-hover:var(--color-interaction-hover);--ds-interaction-pressed:var(--color-interaction-pressed);--ds-interaction-active:var(--color-interaction-active-brand);--ds-interaction-border-width:0px;--ds-interaction-border-color:transparent;--ds-interaction-divider-width:0px;--ds-interaction-divider-color:transparent;--ds-interaction-divider-inline-start-width:0px;--ds-interaction-divider-inline-start-color:transparent;--ds-interaction-divider-inline-end-width:0px;--ds-interaction-divider-inline-end-color:transparent}.ds-interaction-fill.sc-ds-mobile-section-switcher-h::before,.ds-interaction-fill.sc-ds-mobile-section-switcher::before,.ds-interaction-fill.sc-ds-mobile-section-switcher-h::after,.ds-interaction-fill.sc-ds-mobile-section-switcher::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;cursor:inherit;transition:none}.ds-interaction-fill.sc-ds-mobile-section-switcher-h::before,.ds-interaction-fill.sc-ds-mobile-section-switcher::before{z-index:1}.ds-interaction-fill.sc-ds-mobile-section-switcher-h::after,.ds-interaction-fill.sc-ds-mobile-section-switcher::after{z-index:3;box-shadow:inset 0 calc(-1 * var(--ds-interaction-divider-width)) 0 var(--ds-interaction-divider-color), inset var(--ds-interaction-divider-inline-start-width) 0 0 var(--ds-interaction-divider-inline-start-color), inset calc(-1 * var(--ds-interaction-divider-inline-end-width)) 0 0 var(--ds-interaction-divider-inline-end-color), inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color)}.ds-interaction-fill--bordered.sc-ds-mobile-section-switcher-h,.ds-interaction-fill--bordered.sc-ds-mobile-section-switcher{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-secondary)}.ds-interaction-fill--selected.sc-ds-mobile-section-switcher-h::before,.ds-interaction-fill--selected.sc-ds-mobile-section-switcher::before{background:var(--ds-interaction-active)}.ds-interaction-fill--selected.sc-ds-mobile-section-switcher-h,.ds-interaction-fill--selected.sc-ds-mobile-section-switcher{--ds-interaction-dot-ring:var(--ds-interaction-active)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-mobile-section-switcher-h:hover:not(:disabled)::after,.ds-interaction-fill.sc-ds-mobile-section-switcher:hover:not(:disabled)::after{background:var(--ds-interaction-hover)}}.ds-interaction-fill.sc-ds-mobile-section-switcher-h:active:not(:disabled)::after,.ds-interaction-fill.sc-ds-mobile-section-switcher:active:not(:disabled)::after{background:var(--ds-interaction-pressed)}.ds-interaction-fill--grouped.sc-ds-mobile-section-switcher-h::after,.ds-interaction-fill--grouped.sc-ds-mobile-section-switcher::after,.ds-interaction-fill--grouped.sc-ds-mobile-section-switcher-h:active:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-mobile-section-switcher:active:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill--grouped.sc-ds-mobile-section-switcher-h:hover:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-mobile-section-switcher:hover:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}}.ds-interaction-fill--grouped.sc-ds-mobile-section-switcher-h,.ds-interaction-fill--grouped.sc-ds-mobile-section-switcher{--ds-interaction-divider-width:var(--ds-interaction-group-divider-width, 0px);--ds-interaction-divider-color:var(--ds-interaction-group-divider-color, transparent);--ds-interaction-divider-inline-start-width:var( --ds-interaction-group-divider-inline-start-width, 0px );--ds-interaction-divider-inline-start-color:var( --ds-interaction-group-divider-inline-start-color, transparent );--ds-interaction-divider-inline-end-width:var( --ds-interaction-group-divider-inline-end-width, 0px );--ds-interaction-divider-inline-end-color:var( --ds-interaction-group-divider-inline-end-color, transparent )}.ds-interaction-fill.sc-ds-mobile-section-switcher-h>.ds-interaction-fill__content.sc-ds-mobile-section-switcher,.ds-interaction-fill.sc-ds-mobile-section-switcher>.ds-interaction-fill__content.sc-ds-mobile-section-switcher,.ds-interaction-fill__content.sc-ds-mobile-section-switcher{position:relative;z-index:2;cursor:inherit}.ds-interaction-fill--on-faint.sc-ds-mobile-section-switcher-h,.ds-interaction-fill--on-faint.sc-ds-mobile-section-switcher{--ds-interaction-active:var(--color-interaction-active)}.ds-interaction-fill--on-medium.sc-ds-mobile-section-switcher-h,.ds-interaction-fill--on-medium.sc-ds-mobile-section-switcher{--ds-interaction-hover:var(--color-interaction-on-medium-background-hover);--ds-interaction-pressed:var(--color-interaction-on-medium-background-pressed);--ds-interaction-active:var(--color-interaction-on-medium-background-active);--ds-focus-ring-color:var(--color-interaction-on-medium-background-focus)}.ds-interaction-fill--on-bold.sc-ds-mobile-section-switcher-h,.ds-interaction-fill--on-bold.sc-ds-mobile-section-switcher{--ds-interaction-hover:var(--color-interaction-on-bold-background-hover);--ds-interaction-pressed:var(--color-interaction-on-bold-background-pressed);--ds-interaction-active:var(--color-interaction-on-bold-background-active);--ds-focus-ring-color:var(--color-interaction-on-bold-background-focus)}.ds-interaction-fill--on-strong.sc-ds-mobile-section-switcher-h,.ds-interaction-fill--on-strong.sc-ds-mobile-section-switcher{--ds-interaction-hover:var(--color-interaction-on-strong-background-hover);--ds-interaction-pressed:var(--color-interaction-on-strong-background-pressed);--ds-interaction-active:var(--color-interaction-on-strong-background-active);--ds-focus-ring-color:var(--color-interaction-on-strong-background-focus)}.ds-interaction-fill--on-translucent.sc-ds-mobile-section-switcher-h,.ds-interaction-fill--on-translucent.sc-ds-mobile-section-switcher{--ds-interaction-hover:var(--color-translucent-interaction-hover);--ds-interaction-pressed:var(--color-translucent-interaction-pressed);--ds-interaction-active:var(--color-translucent-interaction-active-brand);--ds-focus-ring-color:var(--color-translucent-interaction-focus)}.ds-interaction-fill--on-inverted.sc-ds-mobile-section-switcher-h,.ds-interaction-fill--on-inverted.sc-ds-mobile-section-switcher{--ds-interaction-hover:var(--color-inverted-interaction-hover);--ds-interaction-pressed:var(--color-inverted-interaction-pressed);--ds-interaction-active:var(--color-inverted-interaction-active-brand);--ds-focus-ring-color:var(--color-inverted-interaction-focus)}.ds-interaction-fill--on-media.sc-ds-mobile-section-switcher-h,.ds-interaction-fill--on-media.sc-ds-mobile-section-switcher{--ds-interaction-hover:var(--color-media-interaction-hover);--ds-interaction-pressed:var(--color-media-interaction-pressed);--ds-interaction-active:var(--color-media-interaction-active);--ds-focus-ring-color:var(--color-media-interaction-focus)}.ds-interaction-fill--on-always-dark.sc-ds-mobile-section-switcher-h,.ds-interaction-fill--on-always-dark.sc-ds-mobile-section-switcher{--ds-interaction-hover:var(--color-always-dark-interaction-hover);--ds-interaction-pressed:var(--color-always-dark-interaction-pressed);--ds-interaction-active:var(--color-always-dark-interaction-active-brand);--ds-focus-ring-color:var(--color-always-dark-interaction-focus)}.ds-interaction-fill--on-chrome.sc-ds-mobile-section-switcher-h,.ds-interaction-fill--on-chrome.sc-ds-mobile-section-switcher{--ds-interaction-hover:var(--color-chrome-interaction-hover);--ds-interaction-pressed:var(--color-chrome-interaction-pressed);--ds-interaction-active:var(--color-chrome-interaction-active);--ds-focus-ring-color:var(--color-chrome-interaction-focus)}.ds-interaction-fill--on-navigation.sc-ds-mobile-section-switcher-h,.ds-interaction-fill--on-navigation.sc-ds-mobile-section-switcher{--ds-interaction-hover:var(--color-navigation-interaction-hover);--ds-interaction-pressed:var(--color-navigation-interaction-pressed);--ds-interaction-active:var(--color-navigation-interaction-active);--ds-focus-ring-color:var(--color-navigation-interaction-focus)}.ds-interaction-fill.ds-interaction-fill--surface-open.sc-ds-mobile-section-switcher-h:not(:disabled)::after,.ds-interaction-fill.ds-interaction-fill--surface-open.sc-ds-mobile-section-switcher:not(:disabled)::after{background:var(--ds-interaction-pressed)}@media (forced-colors: active){.ds-interaction-fill.sc-ds-mobile-section-switcher-h::after,.ds-interaction-fill.sc-ds-mobile-section-switcher::after{box-shadow:none;outline:var(--ds-interaction-border-width) solid var(--ds-forced-color-control-boundary);outline-offset:calc(-1 * var(--ds-interaction-border-width))}.ds-interaction-fill--surface-open.sc-ds-mobile-section-switcher-h:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after,.ds-interaction-fill--surface-open.sc-ds-mobile-section-switcher:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after{outline:var(--dimension-stroke-width-025) dashed var(--ds-forced-color-control-boundary);outline-offset:calc(-1 * var(--dimension-stroke-width-025))}.ds-interaction-fill--selected.sc-ds-mobile-section-switcher-h::before,.ds-interaction-fill--selected.sc-ds-mobile-section-switcher::before{background:transparent;outline:var(--dimension-stroke-width-025) solid var(--ds-forced-color-selected);outline-offset:calc(-1 * var(--dimension-stroke-width-025))}}@media (forced-colors: active) and (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-mobile-section-switcher-h:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after,.ds-interaction-fill.sc-ds-mobile-section-switcher:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after{outline-color:var(--ds-forced-color-selected);outline-width:var(--dimension-stroke-width-012)}}.sc-ds-mobile-section-switcher-h,.sc-ds-mobile-section-switcher:where(.ds-table),.sc-ds-mobile-section-switcher:where(.tooltip-popup),.sc-ds-mobile-section-switcher:where(.ds-radius){--ds-radius-control:var(--dimension-radius-025);--ds-radius-card:var(--dimension-radius-050);--ds-radius-modal:var(--dimension-radius-050);--ds-radius-menu:var(--dimension-radius-075);--ds-radius-tooltip-control:var(--dimension-radius-025);--ds-radius-tooltip-menu:var(--dimension-radius-075);--ds-radius-table:var(--dimension-radius-050)}.ds-control--lg.sc-ds-mobile-section-switcher,.ds-control--lg.sc-ds-mobile-section-switcher-h,.ds-control--md.sc-ds-mobile-section-switcher-h,.ds-control--md.sc-ds-mobile-section-switcher,.ds-control--sm.sc-ds-mobile-section-switcher-h,.ds-control--sm.sc-ds-mobile-section-switcher,.ds-control--xs.sc-ds-mobile-section-switcher-h,.ds-control--xs.sc-ds-mobile-section-switcher{--ds-control-radius:var(--ds-radius-control)}.ds-control--lg.sc-ds-mobile-section-switcher-h,.ds-control--lg.sc-ds-mobile-section-switcher{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}.ds-control--md.sc-ds-mobile-section-switcher-h,.ds-control--md.sc-ds-mobile-section-switcher{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}.ds-control--sm.sc-ds-mobile-section-switcher-h,.ds-control--sm.sc-ds-mobile-section-switcher{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}.ds-control--xs.sc-ds-mobile-section-switcher-h,.ds-control--xs.sc-ds-mobile-section-switcher{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}.sc-ds-mobile-section-switcher-h{display:block;min-width:0;max-width:100%;color:var(--color-foreground-primary)}.mobile-section-switcher.sc-ds-mobile-section-switcher{appearance:none;display:grid;grid-template-columns:var(--dimension-size-100) minmax(0, auto) var(--dimension-size-100);align-items:center;justify-content:center;gap:var(--dimension-space-050);max-width:100%;min-height:var(--dimension-size-400);padding-inline:var(--dimension-space-100);border:0;border-radius:var(--dimension-radius-100);background:var(--color-background-secondary);color:inherit;box-sizing:border-box;cursor:default}.mobile-section-switcher__label.sc-ds-mobile-section-switcher{min-width:0;max-width:100%;text-align:center}.mobile-section-switcher__position.sc-ds-mobile-section-switcher{width:var(--dimension-size-050);height:var(--dimension-size-050);border-radius:var(--dimension-radius-half);background:currentColor;opacity:0}.mobile-section-switcher__position--visible.sc-ds-mobile-section-switcher{opacity:1}.mobile-section-switcher--sheet.sc-ds-mobile-section-switcher{grid-template-columns:minmax(0, auto);min-height:var(--dimension-size-400);padding-inline:var(--dimension-space-100);border-radius:var(--dimension-radius-half);background:transparent;--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-tertiary)}.mobile-section-switcher--combined.sc-ds-mobile-section-switcher{display:flex}.mobile-section-switcher__page-label.sc-ds-mobile-section-switcher{flex:0 1 auto;min-width:0}.mobile-section-switcher__separator.sc-ds-mobile-section-switcher{flex:0 0 auto}.mobile-section-switcher--combined.sc-ds-mobile-section-switcher .mobile-section-switcher__label.sc-ds-mobile-section-switcher{flex:0 0 auto;max-width:50%}.mobile-section-sheet.sc-ds-mobile-section-switcher{position:fixed;inset:0 0 auto;width:100%;max-width:none;max-height:calc(100dvh - var(--dimension-size-400) - var(--dimension-space-200));margin:0;padding:0;border:0;border-radius:0;box-sizing:border-box;overflow:visible;background:transparent;color:var(--color-foreground-secondary);outline:none}.mobile-section-sheet[open].sc-ds-mobile-section-switcher{display:flex;flex-direction:column}.mobile-section-sheet[open].sc-ds-mobile-section-switcher .mobile-section-sheet__items.sc-ds-mobile-section-switcher{animation:mobileSectionSheetIn var(--effect-motion-short-2) both}.mobile-section-sheet.sc-ds-mobile-section-switcher::backdrop{background:var(--color-background-shade);animation:mobileSectionShadeIn var(--effect-motion-short-2) both}.mobile-section-sheet--closing[open].sc-ds-mobile-section-switcher .mobile-section-sheet__items.sc-ds-mobile-section-switcher{animation-name:mobileSectionSheetOut}.mobile-section-sheet--closing.sc-ds-mobile-section-switcher::backdrop{animation-name:mobileSectionShadeOut}.mobile-section-sheet__items.sc-ds-mobile-section-switcher{display:flex;flex-direction:column;gap:var(--dimension-space-100);min-height:0;max-height:inherit;box-sizing:border-box;background:var(--color-background-primary);box-shadow:var(--effect-elevation-elevated-floating);padding:var(--dimension-space-100);padding-block-start:max(var(--dimension-space-100), env(safe-area-inset-top, 0px));overflow-y:auto;overscroll-behavior:contain}.mobile-section-sheet__item.sc-ds-mobile-section-switcher{appearance:none;flex:0 0 auto;display:flex;align-items:center;height:var(--ds-control-height);width:100%;min-width:0;padding:0 var(--ds-control-padding-inline);box-sizing:border-box;border:0;border-radius:var(--ds-control-radius);background:transparent;color:inherit;text-align:start}.mobile-section-sheet__item[aria-current='page'].sc-ds-mobile-section-switcher{color:var(--color-foreground-primary)}.mobile-section-sheet__item.sc-ds-mobile-section-switcher:disabled{color:var(--color-foreground-tertiary)}.mobile-section-sheet__label.sc-ds-mobile-section-switcher{min-width:0;padding-inline:var(--ds-control-label-inset)}.mobile-section-sheet__divider.sc-ds-mobile-section-switcher{flex:0 0 auto;height:var(--dimension-stroke-width-012);margin-inline:var(--dimension-space-100);background:var(--color-border-tertiary)}@keyframes mobileSectionSheetIn{from{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes mobileSectionSheetOut{from{transform:translateY(0)}to{transform:translateY(-100%)}}@keyframes mobileSectionShadeIn{from{opacity:0}to{opacity:1}}@keyframes mobileSectionShadeOut{from{opacity:1}to{opacity:0}}.mobile-section-switcher--pointer-focus.sc-ds-mobile-section-switcher-h .ds-focus-ring-inset.sc-ds-mobile-section-switcher::after{outline:none}.mobile-section-sheet__browser-edge.sc-ds-mobile-section-switcher{position:fixed;inset:auto 0 0;height:max(var(--dimension-space-200), env(safe-area-inset-bottom, 0px));pointer-events:none;color:var(--color-background-primary);background-color:var(--_mobile-section-edge-color, var(--color-background-primary))}.mobile-section-sheet[open].sc-ds-mobile-section-switcher .mobile-section-sheet__browser-edge.sc-ds-mobile-section-switcher{animation:mobileSectionEdgeIn var(--effect-motion-short-2) both}.mobile-section-sheet--closing[open].sc-ds-mobile-section-switcher .mobile-section-sheet__browser-edge.sc-ds-mobile-section-switcher{animation-name:mobileSectionEdgeOut}@keyframes mobileSectionEdgeIn{from{background-color:var(--color-background-primary)}to{background-color:var(--_mobile-section-edge-color, var(--color-background-primary))}}@keyframes mobileSectionEdgeOut{from{background-color:var(--_mobile-section-edge-color, var(--color-background-primary))}to{background-color:var(--color-background-primary)}}@media (prefers-reduced-motion: reduce){.mobile-section-sheet[open].sc-ds-mobile-section-switcher .mobile-section-sheet__items.sc-ds-mobile-section-switcher,.mobile-section-sheet[open].sc-ds-mobile-section-switcher .mobile-section-sheet__browser-edge.sc-ds-mobile-section-switcher,.mobile-section-sheet.sc-ds-mobile-section-switcher::backdrop{animation:none}}`;let y=0;const C=i(class i extends e{constructor(i){super();if(i!==false){this.__registerHost()}this.dsChange=s(this,"dsChange",7);this.sections=[];this.value="";this.navigationLabel="Change page section";this.presentation="menu";this.pageLabel="";this.menuOpen=false;this.menuSurfaceOpen=false;this.initialFocusVisible=false;this.pointerFocus=false;this.sheetClosing=false;this.focusedSection="";this.instanceId=y++;this.triggerId=`ds-mobile-section-switcher-trigger-${this.instanceId}`;this.menuId=`ds-mobile-section-switcher-menu-${this.instanceId}`;this.triggerEl=null;this.dialogEl=null;this.browserEdgeEl=null;this.browserEdgeColors="";this.closeTimer=null;this.loaded=false;this.tasks=new d((()=>this.el.isConnected));this.handleDocumentKeyDown=i=>{if(["Shift","Control","Alt","Meta"].includes(i.key))return;this.pointerFocus=false};this.updateBrowserEdgeColor=()=>{if(!this.el.isConnected||!this.browserEdgeEl||!this.dialogEl)return;const i=getComputedStyle(this.browserEdgeEl).color;const e=getComputedStyle(this.dialogEl,"::backdrop").backgroundColor;const s=`${i}|${e}`;if(s===this.browserEdgeColors)return;const t=this.el.ownerDocument.createElement("canvas");t.width=t.height=1;const o=t.getContext("2d");if(!o)return;o.fillStyle=i;o.fillRect(0,0,1,1);o.fillStyle=e;o.fillRect(0,0,1,1);const[n,r,c]=o.getImageData(0,0,1,1).data;this.browserEdgeEl.style.setProperty("--_mobile-section-edge-color",`rgb(${n}, ${r}, ${c})`);this.browserEdgeColors=s};this.handleSheetKeyDown=i=>{if(i.key==="Escape"){i.preventDefault();i.stopPropagation();this.closeMenu();return}const e=this.selectableSections.filter((i=>!i.isInactive));if(!e.length)return;const s=Math.max(0,e.findIndex((i=>i.id===this.focusedSection)));let t;if(i.key==="ArrowDown")t=(s+1)%e.length;else if(i.key==="ArrowUp")t=(s+e.length-1)%e.length;else if(i.key==="Home")t=0;else if(i.key==="End")t=e.length-1;else if(i.key==="Tab")t=s;else if(i.key.length===1&&!i.ctrlKey&&!i.metaKey&&!i.altKey&&i.key!==" "){const o=e.findIndex(((t,o)=>e[(s+o+1)%e.length].label.toLowerCase().startsWith(i.key.toLowerCase())));if(o<0)return;t=(s+o+1)%e.length}else return;i.preventDefault();this.initialFocusVisible=true;this.focusSheetItem(e[t].id)};this.toggleMenu=i=>{if(this.selectableSections.length<=1)return;this.initialFocusVisible=i.detail===0;if(this.presentation==="sheet"){if(this.menuOpen)this.closeMenu();else{this.focusedSection=this.selectedSection?.id??"";this.menuOpen=true}return}this.menuOpen=!this.menuOpen;if(this.menuOpen)this.menuSurfaceOpen=true};this.closeMenu=()=>{this.menuOpen=false;if(this.dialogEl?.open)this.sheetClosing=true};this.handleSelect=i=>{const e=String(i.detail.value??"");const s=this.selectableSections.find((i=>i.id===e));if(!s||s.isInactive)return;this.closeMenu();if(e!==this.selectedSection?.id)this.dsChange.emit(e);this.tasks.frame((()=>this.triggerEl?.focus()))}}componentDidLoad(){this.loaded=true;this.connectResources()}connectedCallback(){if(this.loaded)this.connectResources()}connectResources(){if(!this.el.isConnected||this.boundDocument)return;this.boundDocument=this.el.ownerDocument;this.boundDocument.addEventListener("keydown",this.handleDocumentKeyDown,true);this.visibilityObserver=new ResizeObserver(this.tasks.guard((()=>{if(this.dialogEl?.open&&!this.triggerEl?.getClientRects().length){this.finishSheetClose(false)}})));this.visibilityObserver.observe(this.el)}componentDidRender(){if(!this.el.isConnected||!this.dialogEl)return;if(this.presentation==="sheet"&&this.menuOpen&&!this.dialogEl.open){const i=this.focusedSection;this.updateBrowserEdgeColor();this.observeBrowserEdgeTheme();this.dialogEl.showModal();this.focusSheetItem(i)}if(this.sheetClosing&&this.dialogEl.open&&!this.closeTimer){const i=p(x.motionShort2,x.animationDurationShort3);if(!i)this.finishSheetClose();else this.closeTimer=setTimeout((()=>this.finishSheetClose()),i)}}disconnectedCallback(){this.tasks.cancel();this.boundDocument?.removeEventListener("keydown",this.handleDocumentKeyDown,true);this.boundDocument=undefined;this.visibilityObserver?.disconnect();this.visibilityObserver=undefined;this.pointerFocus=false;this.menuSurfaceOpen=false;this.finishSheetClose(false)}handlePresentationChange(){this.menuSurfaceOpen=false;this.closeMenu()}handleContextChange(){this.closeMenu()}finishSheetClose(i=true){if(this.closeTimer)clearTimeout(this.closeTimer);this.closeTimer=null;const e=this.dialogEl?.open;this.dialogEl?.close();this.themeObserver?.disconnect();this.menuOpen=false;this.sheetClosing=false;if(e&&i&&this.triggerEl?.getClientRects().length)this.triggerEl.focus()}observeBrowserEdgeTheme(){this.themeObserver??(this.themeObserver=new MutationObserver(this.updateBrowserEdgeColor));for(let i=this.el;i;i=i.parentElement){this.themeObserver.observe(i,{attributes:true,attributeFilter:["class","style","data-theme"]})}}focusSheetItem(i){const e=Array.from(this.dialogEl?.querySelectorAll("button")??[]);const s=e.find((e=>e.value===i&&!e.disabled))??e.find((i=>!i.disabled));if(s){this.focusedSection=s.value;s.focus()}else this.dialogEl?.focus()}get resolvedSections(){return this.sections??[]}get selectableSections(){return r(this.resolvedSections)}get selectedIndex(){return k(this.resolvedSections,this.value).selectedIndex}get selectedSection(){return this.selectableSections[this.selectedIndex]}get hasPrevious(){return k(this.resolvedSections,this.value).hasPrevious}get hasNext(){return k(this.resolvedSections,this.value).hasNext}get triggerAriaLabel(){return`${this.presentation==="sheet"&&this.pageLabel?`${this.pageLabel}. `:""}${this.navigationLabel}. Current section: ${this.selectedSection?.label??""}`}get menuSections(){const i=[];let e=[];const s=()=>{if(e.length)i.push({items:e});e=[]};for(const i of this.resolvedSections){if(c(i)){s();continue}e.push({label:i.label,value:i.id,dot:i.dot,isSelected:i.id===this.selectedSection?.id,isInactive:i.isInactive})}s();return i}handleSectionsChange(){if(this.selectableSections.length<=1){this.closeMenu();this.menuSurfaceOpen=false}else if(this.dialogEl?.open&&!this.sheetClosing){this.tasks.frame((()=>{if(this.dialogEl?.open&&!this.sheetClosing)this.focusSheetItem(this.focusedSection)}))}}renderSheet(){return t("dialog",{id:this.menuId,ref:i=>{this.dialogEl=i??null},class:{"mobile-section-sheet":true,"mobile-section-sheet--closing":this.sheetClosing},"aria-label":this.navigationLabel,tabIndex:-1,onCancel:i=>{i.preventDefault();this.closeMenu()},onKeyDown:this.handleSheetKeyDown,onClick:i=>{if(!this.dialogEl||i.target!==this.dialogEl)return;const e=this.dialogEl.getBoundingClientRect();if(i.clientY<e.top||i.clientY>e.bottom||i.clientX<e.left||i.clientX>e.right)this.closeMenu()}},t("div",{class:"mobile-section-sheet__items",role:"menu","aria-label":this.navigationLabel},this.resolvedSections.map((i=>c(i)?t("div",{class:"mobile-section-sheet__divider",role:"separator"}):t("button",{type:"button",role:"menuitem",value:i.id,disabled:i.isInactive,"aria-current":i.id===this.selectedSection?.id?"page":undefined,tabIndex:i.id===this.focusedSection?0:-1,class:{"mobile-section-sheet__item":true,"ds-control--md":true,"ds-interaction-fill":true,"ds-focus-ring-inset":true,"ds-focus-ring--visible":this.initialFocusVisible&&i.id===this.focusedSection},onFocus:()=>{this.focusedSection=i.id},onClick:()=>{if(this.sheetClosing||i.isInactive)return;this.closeMenu();if(i.id!==this.selectedSection?.id)this.dsChange.emit(i.id)}},t("ds-text",{class:"mobile-section-sheet__label ds-interaction-fill__content",as:"span",variant:"text-body-medium",color:"inherit",emphasis:i.id===this.selectedSection?.id,lineTruncation:1},i.label))))),t("div",{ref:i=>{if(this.browserEdgeEl!==i)this.browserEdgeColors="";this.browserEdgeEl=i??null},class:"mobile-section-sheet__browser-edge","aria-hidden":"true"}))}render(){const i=this.selectedSection;if(!i)return t(o,null);const e=this.presentation==="sheet"&&!!this.pageLabel;return t(o,{class:{"mobile-section-switcher--pointer-focus":this.pointerFocus},onPointerDown:()=>{this.pointerFocus=true;this.initialFocusVisible=false}},t("button",{ref:i=>{this.triggerEl=i??null},id:this.triggerId,class:{"mobile-section-switcher":true,"mobile-section-switcher--expanded":this.menuOpen,"ds-interaction-fill--surface-open":this.menuSurfaceOpen||this.menuOpen||this.sheetClosing,"mobile-section-switcher--sheet":this.presentation==="sheet","mobile-section-switcher--combined":e,"ds-focus-ring-inset":true,"ds-interaction-fill":true},type:"button","aria-haspopup":this.presentation==="sheet"?"dialog":"menu","aria-controls":this.menuId,"aria-expanded":String(this.menuOpen),"aria-label":this.triggerAriaLabel,onClick:this.toggleMenu},this.presentation==="menu"?t("span",{class:{"mobile-section-switcher__position":true,"mobile-section-switcher__position--visible":this.hasPrevious,"ds-interaction-fill__content":true},"aria-hidden":"true"}):null,e?[t("ds-text",{class:"mobile-section-switcher__page-label ds-interaction-fill__content",as:"span",variant:"text-body-medium",emphasis:true,color:"inherit",lineTruncation:1},this.pageLabel),t("ds-text",{class:"mobile-section-switcher__separator ds-interaction-fill__content",as:"span",variant:"text-body-medium",color:"inherit","aria-hidden":"true"},"·")]:null,t("ds-text",{class:"mobile-section-switcher__label ds-interaction-fill__content",as:"span",variant:"text-body-medium",emphasis:true,color:"inherit",lineTruncation:1},i.label),this.presentation==="menu"?t("span",{class:{"mobile-section-switcher__position":true,"mobile-section-switcher__position--visible":this.hasNext,"ds-interaction-fill__content":true},"aria-hidden":"true"}):null),this.presentation==="sheet"||this.sheetClosing?this.renderSheet():this.selectableSections.length>1?t("ds-menu",{id:this.menuId,anchorId:this.triggerId,align:"center",menuLabel:this.navigationLabel,open:this.menuOpen,initialFocusVisible:this.initialFocusVisible,sections:this.menuSections,onDsClose:this.closeMenu,onDsAfterClose:()=>{if(!this.menuOpen)this.menuSurfaceOpen=false},onDsSelect:this.handleSelect}):null)}get el(){return this}static get watchers(){return{presentation:[{handlePresentationChange:0}],value:[{handleContextChange:0}],pageLabel:[{handleContextChange:0}],sections:[{handleSectionsChange:0}]}}static get style(){return _()}},[2,"ds-mobile-section-switcher",{sections:[16],value:[1],navigationLabel:[1,"navigation-label"],presentation:[1],pageLabel:[1,"page-label"],menuOpen:[32],menuSurfaceOpen:[32],initialFocusVisible:[32],pointerFocus:[32],sheetClosing:[32],focusedSection:[32]},undefined,{presentation:[{handlePresentationChange:0}],value:[{handleContextChange:0}],pageLabel:[{handleContextChange:0}],sections:[{handleSectionsChange:0}]}]);function S(){if(typeof customElements==="undefined"){return}const i=["ds-mobile-section-switcher","ds-badge","ds-button-unfilled","ds-icon","ds-loader","ds-menu","ds-swatch-picker","ds-switch","ds-tag","ds-text","ds-tooltip"];i.forEach((i=>{switch(i){case"ds-mobile-section-switcher":if(!customElements.get(n(i))){customElements.define(n(i),C)}break;case"ds-badge":if(!customElements.get(n(i))){a()}break;case"ds-button-unfilled":if(!customElements.get(n(i))){l()}break;case"ds-icon":if(!customElements.get(n(i))){h()}break;case"ds-loader":if(!customElements.get(n(i))){m()}break;case"ds-menu":if(!customElements.get(n(i))){b()}break;case"ds-swatch-picker":if(!customElements.get(n(i))){f()}break;case"ds-switch":if(!customElements.get(n(i))){u()}break;case"ds-tag":if(!customElements.get(n(i))){v()}break;case"ds-text":if(!customElements.get(n(i))){g()}break;case"ds-tooltip":if(!customElements.get(n(i))){w()}break}}))}S();export{C as M,S as d};
|
|
2
|
+
//# sourceMappingURL=p-C5HGwzy9.js.map
|