@mhmo91/schmancy 0.10.13 → 0.10.15
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/agent/schmancy.agent.js +1 -1
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/{area-DSW_LYXQ.js → area-C_kgZZhN.js} +1 -1
- package/dist/{area-DSW_LYXQ.js.map → area-C_kgZZhN.js.map} +1 -1
- package/dist/{area-8IBAXzbC.cjs → area-DFPtKzWy.cjs} +1 -1
- package/dist/{area-8IBAXzbC.cjs.map → area-DFPtKzWy.cjs.map} +1 -1
- package/dist/area.cjs +1 -1
- package/dist/area.js +1 -1
- package/dist/{autocomplete-CXwwmUbC.js → autocomplete-DWSuwSRS.js} +2 -2
- package/dist/{autocomplete-CXwwmUbC.js.map → autocomplete-DWSuwSRS.js.map} +1 -1
- package/dist/{autocomplete-9PLjlFYt.cjs → autocomplete-iCJOia-q.cjs} +1 -1
- package/dist/{autocomplete-9PLjlFYt.cjs.map → autocomplete-iCJOia-q.cjs.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.js +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-Dwn5oXd8.js → boat-CZma2ojF.js} +1 -1
- package/dist/{boat-Dwn5oXd8.js.map → boat-CZma2ojF.js.map} +1 -1
- package/dist/{boat-CpGNeWav.cjs → boat-Dy6cc3hB.cjs} +1 -1
- package/dist/{boat-CpGNeWav.cjs.map → boat-Dy6cc3hB.cjs.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/{busy-CUUgvimY.cjs → busy-DCsqryvq.cjs} +1 -1
- package/dist/{busy-CUUgvimY.cjs.map → busy-DCsqryvq.cjs.map} +1 -1
- package/dist/{busy-Cjm1BYVC.js → busy-DeV2ByMw.js} +1 -1
- package/dist/{busy-Cjm1BYVC.js.map → busy-DeV2ByMw.js.map} +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/{card-BjZ_WRr3.cjs → card--GgSX4X5.cjs} +1 -1
- package/dist/{card-BjZ_WRr3.cjs.map → card--GgSX4X5.cjs.map} +1 -1
- package/dist/{card-BR22oYCL.js → card-BTTsHzJJ.js} +1 -1
- package/dist/{card-BR22oYCL.js.map → card-BTTsHzJJ.js.map} +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-CsADwyfu.js → checkbox-Cj5j-ppk.js} +1 -1
- package/dist/{checkbox-CsADwyfu.js.map → checkbox-Cj5j-ppk.js.map} +1 -1
- package/dist/{checkbox-2e8v7CNg.cjs → checkbox-NNReP9s_.cjs} +1 -1
- package/dist/{checkbox-2e8v7CNg.cjs.map → checkbox-NNReP9s_.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-C9HwVbGT.js → chips-CP-CbfoZ.js} +2 -2
- package/dist/{chips-C9HwVbGT.js.map → chips-CP-CbfoZ.js.map} +1 -1
- package/dist/{chips-DPCcO55o.cjs → chips-iporOXxK.cjs} +1 -1
- package/dist/{chips-DPCcO55o.cjs.map → chips-iporOXxK.cjs.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/connectivity.cjs +1 -1
- package/dist/connectivity.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{date-range-63-FC7gD.cjs → date-range-CaOxwZDq.cjs} +1 -1
- package/dist/{date-range-63-FC7gD.cjs.map → date-range-CaOxwZDq.cjs.map} +1 -1
- package/dist/{date-range-CFaP-8Os.js → date-range-CgNujP8r.js} +2 -2
- package/dist/{date-range-CFaP-8Os.js.map → date-range-CgNujP8r.js.map} +1 -1
- package/dist/{date-range-inline-BCuK_XCv.js → date-range-inline-C2PXX_GY.js} +1 -1
- package/dist/{date-range-inline-BCuK_XCv.js.map → date-range-inline-C2PXX_GY.js.map} +1 -1
- package/dist/{date-range-inline-Cpdqd-8B.cjs → date-range-inline-D4IjOOO0.cjs} +1 -1
- package/dist/{date-range-inline-Cpdqd-8B.cjs.map → date-range-inline-D4IjOOO0.cjs.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{details-qKikJIyH.cjs → details-DT2b3xOn.cjs} +1 -1
- package/dist/{details-qKikJIyH.cjs.map → details-DT2b3xOn.cjs.map} +1 -1
- package/dist/{details-0dOlqHHL.js → details-VjaNwtfd.js} +1 -1
- package/dist/{details-0dOlqHHL.js.map → details-VjaNwtfd.js.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{divider-BxkIl0H1.js → divider-BMO8pzEO.js} +1 -1
- package/dist/{divider-BxkIl0H1.js.map → divider-BMO8pzEO.js.map} +1 -1
- package/dist/{divider-CX9mmWZ8.cjs → divider-BW33TZ-X.cjs} +1 -1
- package/dist/{divider-CX9mmWZ8.cjs.map → divider-BW33TZ-X.cjs.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{expand-BeAx94MP.js → expand-DbELKKOt.js} +2 -2
- package/dist/{expand-BeAx94MP.js.map → expand-DbELKKOt.js.map} +1 -1
- package/dist/{expand-891JuQuN.cjs → expand-_f5EUKWB.cjs} +1 -1
- package/dist/{expand-891JuQuN.cjs.map → expand-_f5EUKWB.cjs.map} +1 -1
- package/dist/expand.cjs +1 -1
- package/dist/expand.js +1 -1
- package/dist/{float-BPF2WO4L.js → float-B6RBb2dN.js} +1 -1
- package/dist/{float-BPF2WO4L.js.map → float-B6RBb2dN.js.map} +1 -1
- package/dist/{float-D7vvODxx.cjs → float-CKmd-0-t.cjs} +1 -1
- package/dist/{float-D7vvODxx.cjs.map → float-CKmd-0-t.cjs.map} +1 -1
- package/dist/float.cjs +1 -1
- package/dist/float.js +1 -1
- package/dist/handover/agent-runtime-followups.md +1 -1
- package/dist/handover/agent-runtime-v1.md +3 -3
- package/dist/{icons-BKxW_7QR.js → icons-CoDo95Cu.js} +1 -1
- package/dist/{icons-BKxW_7QR.js.map → icons-CoDo95Cu.js.map} +1 -1
- package/dist/{icons-QSdo-8h9.cjs → icons-r-S17M8U.cjs} +1 -1
- package/dist/{icons-QSdo-8h9.cjs.map → icons-r-S17M8U.cjs.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/{iframe-CMKV-bm8.cjs → iframe-P9c_qg1-.cjs} +1 -1
- package/dist/{iframe-CMKV-bm8.cjs.map → iframe-P9c_qg1-.cjs.map} +1 -1
- package/dist/{iframe-BxvbhyTS.js → iframe-k4oI-TIj.js} +1 -1
- package/dist/{iframe-BxvbhyTS.js.map → iframe-k4oI-TIj.js.map} +1 -1
- package/dist/iframe.cjs +1 -1
- package/dist/iframe.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +23 -23
- package/dist/{input-DIqaR8Mr.js → input-D95GjINh.js} +1 -1
- package/dist/{input-DIqaR8Mr.js.map → input-D95GjINh.js.map} +1 -1
- package/dist/{input-BFhJU74_.cjs → input-D9s4jDAb.cjs} +1 -1
- package/dist/{input-BFhJU74_.cjs.map → input-D9s4jDAb.cjs.map} +1 -1
- package/dist/{input-chip-w09qTt7J.cjs → input-chip-D0ZXqTt5.cjs} +1 -1
- package/dist/{input-chip-w09qTt7J.cjs.map → input-chip-D0ZXqTt5.cjs.map} +1 -1
- package/dist/{input-chip-D9tlSk_2.js → input-chip-DpC_XEKN.js} +1 -1
- package/dist/{input-chip-D9tlSk_2.js.map → input-chip-DpC_XEKN.js.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/json.cjs +1 -1
- package/dist/json.js +2 -2
- package/dist/kbd.cjs +1 -1
- package/dist/kbd.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/{lightbox-CK035jsx.cjs → lightbox-C-yHeoK0.cjs} +1 -1
- package/dist/{lightbox-CK035jsx.cjs.map → lightbox-C-yHeoK0.cjs.map} +1 -1
- package/dist/{lightbox-GChmL3Ff.js → lightbox-CovQtmyn.js} +1 -1
- package/dist/{lightbox-GChmL3Ff.js.map → lightbox-CovQtmyn.js.map} +1 -1
- package/dist/lightbox.cjs +1 -1
- package/dist/lightbox.js +1 -1
- package/dist/{list-J-Fz24Z1.js → list-C1pR9vhu.js} +1 -1
- package/dist/{list-J-Fz24Z1.js.map → list-C1pR9vhu.js.map} +1 -1
- package/dist/{list-B3P37zlH.cjs → list-CAijuky4.cjs} +1 -1
- package/dist/{list-B3P37zlH.cjs.map → list-CAijuky4.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{menu-DHTlUwXS.js → menu-B59vZv9n.js} +2 -2
- package/dist/{menu-DHTlUwXS.js.map → menu-B59vZv9n.js.map} +1 -1
- package/dist/{menu-BnFd8CwU.cjs → menu-BaHO3Cip.cjs} +1 -1
- package/dist/{menu-BnFd8CwU.cjs.map → menu-BaHO3Cip.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/mixins-BV0w2yIE.js +627 -0
- package/dist/{mixins-PBJJGiiP.js.map → mixins-BV0w2yIE.js.map} +1 -1
- package/dist/mixins-DvAYa-F7.cjs +298 -0
- package/dist/{mixins-47_CZk7q.cjs.map → mixins-DvAYa-F7.cjs.map} +1 -1
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/navigation-rail.cjs +1 -1
- package/dist/navigation-rail.js +1 -1
- package/dist/{notification-B6YBL0hx.cjs → notification-BC9nG8Sr.cjs} +1 -1
- package/dist/{notification-B6YBL0hx.cjs.map → notification-BC9nG8Sr.cjs.map} +1 -1
- package/dist/{notification-C-5Bv3vj.js → notification-BeLoVa47.js} +2 -2
- package/dist/{notification-C-5Bv3vj.js.map → notification-BeLoVa47.js.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-DVQRa3nr.cjs → option-BWF4GBp-.cjs} +1 -1
- package/dist/{option-DVQRa3nr.cjs.map → option-BWF4GBp-.cjs.map} +1 -1
- package/dist/{option-B7q6VXCu.js → option-UvlSAcC4.js} +1 -1
- package/dist/{option-B7q6VXCu.js.map → option-UvlSAcC4.js.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/overlay.cjs +1 -1
- package/dist/{overlay.confirm-body-CAY5xK1n.js → overlay.confirm-body-9W0B5QGv.js} +1 -1
- package/dist/{overlay.confirm-body-CAY5xK1n.js.map → overlay.confirm-body-9W0B5QGv.js.map} +1 -1
- package/dist/{overlay.confirm-body-XZtErofy.cjs → overlay.confirm-body-URtE1gI3.cjs} +1 -1
- package/dist/{overlay.confirm-body-XZtErofy.cjs.map → overlay.confirm-body-URtE1gI3.cjs.map} +1 -1
- package/dist/overlay.js +3 -3
- package/dist/{overlay.service-BZE_lwKO.js → overlay.service-CVqs2Gu1.js} +2 -2
- package/dist/{overlay.service-BZE_lwKO.js.map → overlay.service-CVqs2Gu1.js.map} +1 -1
- package/dist/{overlay.service-Oyjrw831.cjs → overlay.service-DnZTcKyJ.cjs} +1 -1
- package/dist/{overlay.service-Oyjrw831.cjs.map → overlay.service-DnZTcKyJ.cjs.map} +1 -1
- package/dist/page.cjs +1 -1
- package/dist/page.js +2 -2
- package/dist/{progress-BHXLYs9i.js → progress-C29Uw-WJ.js} +1 -1
- package/dist/{progress-BHXLYs9i.js.map → progress-C29Uw-WJ.js.map} +1 -1
- package/dist/{progress-D99bumkC.cjs → progress-CwzwY8Oe.cjs} +1 -1
- package/dist/{progress-D99bumkC.cjs.map → progress-CwzwY8Oe.cjs.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-group-DYsycLmD.cjs → radio-group-ByMD6Lsj.cjs} +1 -1
- package/dist/{radio-group-DYsycLmD.cjs.map → radio-group-ByMD6Lsj.cjs.map} +1 -1
- package/dist/{radio-group-BYra5_q1.js → radio-group-CW8airhZ.js} +1 -1
- package/dist/{radio-group-BYra5_q1.js.map → radio-group-CW8airhZ.js.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/range.cjs +1 -1
- package/dist/range.js +1 -1
- package/dist/{scroll-TqNWZ0lo.js → scroll-BotoGcMU.js} +1 -1
- package/dist/{scroll-TqNWZ0lo.js.map → scroll-BotoGcMU.js.map} +1 -1
- package/dist/{scroll-cayCBOrq.cjs → scroll-CmhmUebp.cjs} +1 -1
- package/dist/{scroll-cayCBOrq.cjs.map → scroll-CmhmUebp.cjs.map} +1 -1
- package/dist/{select-CRdSmlLq.cjs → select-BdBThja4.cjs} +1 -1
- package/dist/{select-CRdSmlLq.cjs.map → select-BdBThja4.cjs.map} +1 -1
- package/dist/{select-nzq0qFlF.js → select-Dbn-CImU.js} +1 -1
- package/dist/{select-nzq0qFlF.js.map → select-Dbn-CImU.js.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/skills/schmancy/state.md +5 -0
- package/dist/skills/state.md +5 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{splash-screen-BMLQXzDq.cjs → splash-screen-DlQUv-kV.cjs} +1 -1
- package/dist/{splash-screen-BMLQXzDq.cjs.map → splash-screen-DlQUv-kV.cjs.map} +1 -1
- package/dist/{splash-screen-BJeIiJ_e.js → splash-screen-DtkjCJYo.js} +1 -1
- package/dist/{splash-screen-BJeIiJ_e.js.map → splash-screen-DtkjCJYo.js.map} +1 -1
- package/dist/splash-screen.cjs +1 -1
- package/dist/splash-screen.js +1 -1
- package/dist/{src-qvWlNoMO.js → src-D6e0adHi.js} +30 -30
- package/dist/{src-qvWlNoMO.js.map → src-D6e0adHi.js.map} +1 -1
- package/dist/{src-DE11tq2Q.cjs → src-DEUjlTsX.cjs} +1 -1
- package/dist/{src-DE11tq2Q.cjs.map → src-DEUjlTsX.cjs.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/{surface-DG7Cmm9V.js → surface-A82O1kgu.js} +1 -1
- package/dist/{surface-DG7Cmm9V.js.map → surface-A82O1kgu.js.map} +1 -1
- package/dist/{surface-D426MFLR.cjs → surface-BpppoNXN.cjs} +1 -1
- package/dist/{surface-D426MFLR.cjs.map → surface-BpppoNXN.cjs.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/switch.cjs +1 -1
- package/dist/switch.js +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-t3nMfg1F.cjs → tabs-TO3UiBsm.cjs} +1 -1
- package/dist/{tabs-t3nMfg1F.cjs.map → tabs-TO3UiBsm.cjs.map} +1 -1
- package/dist/{tabs-B7siJkM5.js → tabs-cVHHd1dY.js} +1 -1
- package/dist/{tabs-B7siJkM5.js.map → tabs-cVHHd1dY.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-DSxHCCle.js → textarea-B9dy-yec.js} +1 -1
- package/dist/{textarea-DSxHCCle.js.map → textarea-B9dy-yec.js.map} +1 -1
- package/dist/{textarea-o9vysorM.cjs → textarea-DFY0Flgv.cjs} +1 -1
- package/dist/{textarea-o9vysorM.cjs.map → textarea-DFY0Flgv.cjs.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-XO3nHDbW.js → theme-CT408FqH.js} +1 -1
- package/dist/{theme-XO3nHDbW.js.map → theme-CT408FqH.js.map} +1 -1
- package/dist/{theme-Ce9eIP05.cjs → theme-CpuF3D3q.cjs} +1 -1
- package/dist/{theme-Ce9eIP05.cjs.map → theme-CpuF3D3q.cjs.map} +1 -1
- package/dist/{theme-button-H7PRz_bg.cjs → theme-button-B6Xf-EiH.cjs} +1 -1
- package/dist/{theme-button-H7PRz_bg.cjs.map → theme-button-B6Xf-EiH.cjs.map} +1 -1
- package/dist/{theme-button-DNutDO1j.js → theme-button-pTb5-Wxx.js} +1 -1
- package/dist/{theme-button-DNutDO1j.js.map → theme-button-pTb5-Wxx.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/dist/visually-hidden.cjs +1 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/{window-BaoSwgGE.cjs → window-CSKvv4Ts.cjs} +1 -1
- package/dist/{window-BaoSwgGE.cjs.map → window-CSKvv4Ts.cjs.map} +1 -1
- package/dist/{window-KnLWhQ3S.js → window-CuBcOxbc.js} +1 -1
- package/dist/{window-KnLWhQ3S.js.map → window-CuBcOxbc.js.map} +1 -1
- package/dist/window.cjs +1 -1
- package/dist/window.js +1 -1
- package/package.json +1 -1
- package/skills/schmancy/state.md +5 -0
- package/dist/mixins-47_CZk7q.cjs +0 -298
- package/dist/mixins-PBJJGiiP.js +0 -627
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-XO3nHDbW.js","names":["mathUtils.matrixMultiply","mathUtils.clampInt","utils.whitePointD65","utils.yFromLstar","math.lerp","utils.linearized","math.signum","math.sanitizeDegreesDouble","utils.argbFromXyz","mathUtils.signum","mathUtils.matrixMultiply","colorUtils.argbFromLinrgb","colorUtils.argbFromLstar","mathUtils.sanitizeDegreesDouble","colorUtils.yFromLstar","utils.lstarFromArgb","utils.lstarFromY","differenceDegrees","mathUtils.differenceDegrees","mathUtils.sanitizeDegreesDouble","mathUtils.rotationDirection","colorUtils.lstarFromArgb","math.clampDouble","utils.yFromLstar","utils.lstarFromY","getSpec","math.clampDouble","spec2021","spec2025","mathUtils.sanitizeDegreesInt","mathUtils.sanitizeDegreesDouble","colorUtils.labFromArgb","math.lerp","math.clampDouble","math.sanitizeDegreesDouble","math.sanitizeDegreesInt","differenceDegrees","math.differenceDegrees","colorUtils.redFromArgb","colorUtils.greenFromArgb","colorUtils.blueFromArgb"],"sources":["../node_modules/@material/material-color-utilities/utils/math_utils.js","../node_modules/@material/material-color-utilities/utils/color_utils.js","../node_modules/@material/material-color-utilities/hct/viewing_conditions.js","../node_modules/@material/material-color-utilities/hct/cam16.js","../node_modules/@material/material-color-utilities/hct/hct_solver.js","../node_modules/@material/material-color-utilities/hct/hct.js","../node_modules/@material/material-color-utilities/blend/blend.js","../node_modules/@material/material-color-utilities/contrast/contrast.js","../node_modules/@material/material-color-utilities/dislike/dislike_analyzer.js","../node_modules/@material/material-color-utilities/dynamiccolor/dynamic_color.js","../node_modules/@material/material-color-utilities/palettes/tonal_palette.js","../node_modules/@material/material-color-utilities/temperature/temperature_cache.js","../node_modules/@material/material-color-utilities/dynamiccolor/contrast_curve.js","../node_modules/@material/material-color-utilities/dynamiccolor/tone_delta_pair.js","../node_modules/@material/material-color-utilities/dynamiccolor/variant.js","../node_modules/@material/material-color-utilities/dynamiccolor/color_spec_2021.js","../node_modules/@material/material-color-utilities/dynamiccolor/color_spec_2025.js","../node_modules/@material/material-color-utilities/dynamiccolor/material_dynamic_colors.js","../node_modules/@material/material-color-utilities/dynamiccolor/dynamic_scheme.js","../node_modules/@material/material-color-utilities/palettes/core_palette.js","../node_modules/@material/material-color-utilities/scheme/scheme.js","../node_modules/@material/material-color-utilities/score/score.js","../node_modules/@material/material-color-utilities/utils/string_utils.js","../node_modules/@material/material-color-utilities/utils/theme_utils.js","../src/theme/theme.format.ts","../src/theme/theme.style.css?inline","../src/theme/theme.component.ts","../src/theme/theme-controller.ts","../src/theme/theme-audio-player.ts","../src/theme/theme-controller-boat.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This file is automatically generated. Do not modify it.\n/**\n * Utility methods for mathematical operations.\n */\n/**\n * The signum function.\n *\n * @return 1 if num > 0, -1 if num < 0, and 0 if num = 0\n */\nexport function signum(num) {\n if (num < 0) {\n return -1;\n }\n else if (num === 0) {\n return 0;\n }\n else {\n return 1;\n }\n}\n/**\n * The linear interpolation function.\n *\n * @return start if amount = 0 and stop if amount = 1\n */\nexport function lerp(start, stop, amount) {\n return (1.0 - amount) * start + amount * stop;\n}\n/**\n * Clamps an integer between two integers.\n *\n * @return input when min <= input <= max, and either min or max\n * otherwise.\n */\nexport function clampInt(min, max, input) {\n if (input < min) {\n return min;\n }\n else if (input > max) {\n return max;\n }\n return input;\n}\n/**\n * Clamps an integer between two floating-point numbers.\n *\n * @return input when min <= input <= max, and either min or max\n * otherwise.\n */\nexport function clampDouble(min, max, input) {\n if (input < min) {\n return min;\n }\n else if (input > max) {\n return max;\n }\n return input;\n}\n/**\n * Sanitizes a degree measure as an integer.\n *\n * @return a degree measure between 0 (inclusive) and 360\n * (exclusive).\n */\nexport function sanitizeDegreesInt(degrees) {\n degrees = degrees % 360;\n if (degrees < 0) {\n degrees = degrees + 360;\n }\n return degrees;\n}\n/**\n * Sanitizes a degree measure as a floating-point number.\n *\n * @return a degree measure between 0.0 (inclusive) and 360.0\n * (exclusive).\n */\nexport function sanitizeDegreesDouble(degrees) {\n degrees = degrees % 360.0;\n if (degrees < 0) {\n degrees = degrees + 360.0;\n }\n return degrees;\n}\n/**\n * Sign of direction change needed to travel from one angle to\n * another.\n *\n * For angles that are 180 degrees apart from each other, both\n * directions have the same travel distance, so either direction is\n * shortest. The value 1.0 is returned in this case.\n *\n * @param from The angle travel starts from, in degrees.\n * @param to The angle travel ends at, in degrees.\n * @return -1 if decreasing from leads to the shortest travel\n * distance, 1 if increasing from leads to the shortest travel\n * distance.\n */\nexport function rotationDirection(from, to) {\n const increasingDifference = sanitizeDegreesDouble(to - from);\n return increasingDifference <= 180.0 ? 1.0 : -1.0;\n}\n/**\n * Distance of two points on a circle, represented using degrees.\n */\nexport function differenceDegrees(a, b) {\n return 180.0 - Math.abs(Math.abs(a - b) - 180.0);\n}\n/**\n * Multiplies a 1x3 row vector with a 3x3 matrix.\n */\nexport function matrixMultiply(row, matrix) {\n const a = row[0] * matrix[0][0] + row[1] * matrix[0][1] + row[2] * matrix[0][2];\n const b = row[0] * matrix[1][0] + row[1] * matrix[1][1] + row[2] * matrix[1][2];\n const c = row[0] * matrix[2][0] + row[1] * matrix[2][1] + row[2] * matrix[2][2];\n return [a, b, c];\n}\n//# sourceMappingURL=math_utils.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This file is automatically generated. Do not modify it.\nimport * as mathUtils from './math_utils.js';\n/**\n * Color science utilities.\n *\n * Utility methods for color science constants and color space\n * conversions that aren't HCT or CAM16.\n */\nconst SRGB_TO_XYZ = [\n [0.41233895, 0.35762064, 0.18051042],\n [0.2126, 0.7152, 0.0722],\n [0.01932141, 0.11916382, 0.95034478],\n];\nconst XYZ_TO_SRGB = [\n [\n 3.2413774792388685,\n -1.5376652402851851,\n -0.49885366846268053,\n ],\n [\n -0.9691452513005321,\n 1.8758853451067872,\n 0.04156585616912061,\n ],\n [\n 0.05562093689691305,\n -0.20395524564742123,\n 1.0571799111220335,\n ],\n];\nconst WHITE_POINT_D65 = [95.047, 100.0, 108.883];\n/**\n * Converts a color from RGB components to ARGB format.\n */\nexport function argbFromRgb(red, green, blue) {\n return (255 << 24 | (red & 255) << 16 | (green & 255) << 8 | blue & 255) >>>\n 0;\n}\n/**\n * Converts a color from linear RGB components to ARGB format.\n */\nexport function argbFromLinrgb(linrgb) {\n const r = delinearized(linrgb[0]);\n const g = delinearized(linrgb[1]);\n const b = delinearized(linrgb[2]);\n return argbFromRgb(r, g, b);\n}\n/**\n * Returns the alpha component of a color in ARGB format.\n */\nexport function alphaFromArgb(argb) {\n return argb >> 24 & 255;\n}\n/**\n * Returns the red component of a color in ARGB format.\n */\nexport function redFromArgb(argb) {\n return argb >> 16 & 255;\n}\n/**\n * Returns the green component of a color in ARGB format.\n */\nexport function greenFromArgb(argb) {\n return argb >> 8 & 255;\n}\n/**\n * Returns the blue component of a color in ARGB format.\n */\nexport function blueFromArgb(argb) {\n return argb & 255;\n}\n/**\n * Returns whether a color in ARGB format is opaque.\n */\nexport function isOpaque(argb) {\n return alphaFromArgb(argb) >= 255;\n}\n/**\n * Converts a color from ARGB to XYZ.\n */\nexport function argbFromXyz(x, y, z) {\n const matrix = XYZ_TO_SRGB;\n const linearR = matrix[0][0] * x + matrix[0][1] * y + matrix[0][2] * z;\n const linearG = matrix[1][0] * x + matrix[1][1] * y + matrix[1][2] * z;\n const linearB = matrix[2][0] * x + matrix[2][1] * y + matrix[2][2] * z;\n const r = delinearized(linearR);\n const g = delinearized(linearG);\n const b = delinearized(linearB);\n return argbFromRgb(r, g, b);\n}\n/**\n * Converts a color from XYZ to ARGB.\n */\nexport function xyzFromArgb(argb) {\n const r = linearized(redFromArgb(argb));\n const g = linearized(greenFromArgb(argb));\n const b = linearized(blueFromArgb(argb));\n return mathUtils.matrixMultiply([r, g, b], SRGB_TO_XYZ);\n}\n/**\n * Converts a color represented in Lab color space into an ARGB\n * integer.\n */\nexport function argbFromLab(l, a, b) {\n const whitePoint = WHITE_POINT_D65;\n const fy = (l + 16.0) / 116.0;\n const fx = a / 500.0 + fy;\n const fz = fy - b / 200.0;\n const xNormalized = labInvf(fx);\n const yNormalized = labInvf(fy);\n const zNormalized = labInvf(fz);\n const x = xNormalized * whitePoint[0];\n const y = yNormalized * whitePoint[1];\n const z = zNormalized * whitePoint[2];\n return argbFromXyz(x, y, z);\n}\n/**\n * Converts a color from ARGB representation to L*a*b*\n * representation.\n *\n * @param argb the ARGB representation of a color\n * @return a Lab object representing the color\n */\nexport function labFromArgb(argb) {\n const linearR = linearized(redFromArgb(argb));\n const linearG = linearized(greenFromArgb(argb));\n const linearB = linearized(blueFromArgb(argb));\n const matrix = SRGB_TO_XYZ;\n const x = matrix[0][0] * linearR + matrix[0][1] * linearG + matrix[0][2] * linearB;\n const y = matrix[1][0] * linearR + matrix[1][1] * linearG + matrix[1][2] * linearB;\n const z = matrix[2][0] * linearR + matrix[2][1] * linearG + matrix[2][2] * linearB;\n const whitePoint = WHITE_POINT_D65;\n const xNormalized = x / whitePoint[0];\n const yNormalized = y / whitePoint[1];\n const zNormalized = z / whitePoint[2];\n const fx = labF(xNormalized);\n const fy = labF(yNormalized);\n const fz = labF(zNormalized);\n const l = 116.0 * fy - 16;\n const a = 500.0 * (fx - fy);\n const b = 200.0 * (fy - fz);\n return [l, a, b];\n}\n/**\n * Converts an L* value to an ARGB representation.\n *\n * @param lstar L* in L*a*b*\n * @return ARGB representation of grayscale color with lightness\n * matching L*\n */\nexport function argbFromLstar(lstar) {\n const y = yFromLstar(lstar);\n const component = delinearized(y);\n return argbFromRgb(component, component, component);\n}\n/**\n * Computes the L* value of a color in ARGB representation.\n *\n * @param argb ARGB representation of a color\n * @return L*, from L*a*b*, coordinate of the color\n */\nexport function lstarFromArgb(argb) {\n const y = xyzFromArgb(argb)[1];\n return 116.0 * labF(y / 100.0) - 16.0;\n}\n/**\n * Converts an L* value to a Y value.\n *\n * L* in L*a*b* and Y in XYZ measure the same quantity, luminance.\n *\n * L* measures perceptual luminance, a linear scale. Y in XYZ\n * measures relative luminance, a logarithmic scale.\n *\n * @param lstar L* in L*a*b*\n * @return Y in XYZ\n */\nexport function yFromLstar(lstar) {\n return 100.0 * labInvf((lstar + 16.0) / 116.0);\n}\n/**\n * Converts a Y value to an L* value.\n *\n * L* in L*a*b* and Y in XYZ measure the same quantity, luminance.\n *\n * L* measures perceptual luminance, a linear scale. Y in XYZ\n * measures relative luminance, a logarithmic scale.\n *\n * @param y Y in XYZ\n * @return L* in L*a*b*\n */\nexport function lstarFromY(y) {\n return labF(y / 100.0) * 116.0 - 16.0;\n}\n/**\n * Linearizes an RGB component.\n *\n * @param rgbComponent 0 <= rgb_component <= 255, represents R/G/B\n * channel\n * @return 0.0 <= output <= 100.0, color channel converted to\n * linear RGB space\n */\nexport function linearized(rgbComponent) {\n const normalized = rgbComponent / 255.0;\n if (normalized <= 0.040449936) {\n return normalized / 12.92 * 100.0;\n }\n else {\n return Math.pow((normalized + 0.055) / 1.055, 2.4) * 100.0;\n }\n}\n/**\n * Delinearizes an RGB component.\n *\n * @param rgbComponent 0.0 <= rgb_component <= 100.0, represents\n * linear R/G/B channel\n * @return 0 <= output <= 255, color channel converted to regular\n * RGB space\n */\nexport function delinearized(rgbComponent) {\n const normalized = rgbComponent / 100.0;\n let delinearized = 0.0;\n if (normalized <= 0.0031308) {\n delinearized = normalized * 12.92;\n }\n else {\n delinearized = 1.055 * Math.pow(normalized, 1.0 / 2.4) - 0.055;\n }\n return mathUtils.clampInt(0, 255, Math.round(delinearized * 255.0));\n}\n/**\n * Returns the standard white point; white on a sunny day.\n *\n * @return The white point\n */\nexport function whitePointD65() {\n return WHITE_POINT_D65;\n}\nfunction labF(t) {\n const e = 216.0 / 24389.0;\n const kappa = 24389.0 / 27.0;\n if (t > e) {\n return Math.pow(t, 1.0 / 3.0);\n }\n else {\n return (kappa * t + 16) / 116;\n }\n}\nfunction labInvf(ft) {\n const e = 216.0 / 24389.0;\n const kappa = 24389.0 / 27.0;\n const ft3 = ft * ft * ft;\n if (ft3 > e) {\n return ft3;\n }\n else {\n return (116 * ft - 16) / kappa;\n }\n}\n//# sourceMappingURL=color_utils.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as utils from '../utils/color_utils.js';\nimport * as math from '../utils/math_utils.js';\n/**\n * In traditional color spaces, a color can be identified solely by the\n * observer's measurement of the color. Color appearance models such as CAM16\n * also use information about the environment where the color was\n * observed, known as the viewing conditions.\n *\n * For example, white under the traditional assumption of a midday sun white\n * point is accurately measured as a slightly chromatic blue by CAM16. (roughly,\n * hue 203, chroma 3, lightness 100)\n *\n * This class caches intermediate values of the CAM16 conversion process that\n * depend only on viewing conditions, enabling speed ups.\n */\nexport class ViewingConditions {\n /**\n * Create ViewingConditions from a simple, physically relevant, set of\n * parameters.\n *\n * @param whitePoint White point, measured in the XYZ color space.\n * default = D65, or sunny day afternoon\n * @param adaptingLuminance The luminance of the adapting field. Informally,\n * how bright it is in the room where the color is viewed. Can be\n * calculated from lux by multiplying lux by 0.0586. default = 11.72,\n * or 200 lux.\n * @param backgroundLstar The lightness of the area surrounding the color.\n * measured by L* in L*a*b*. default = 50.0\n * @param surround A general description of the lighting surrounding the\n * color. 0 is pitch dark, like watching a movie in a theater. 1.0 is a\n * dimly light room, like watching TV at home at night. 2.0 means there\n * is no difference between the lighting on the color and around it.\n * default = 2.0\n * @param discountingIlluminant Whether the eye accounts for the tint of the\n * ambient lighting, such as knowing an apple is still red in green light.\n * default = false, the eye does not perform this process on\n * self-luminous objects like displays.\n */\n static make(whitePoint = utils.whitePointD65(), adaptingLuminance = (200.0 / Math.PI) * utils.yFromLstar(50.0) / 100.0, backgroundLstar = 50.0, surround = 2.0, discountingIlluminant = false) {\n const xyz = whitePoint;\n const rW = xyz[0] * 0.401288 + xyz[1] * 0.650173 + xyz[2] * -0.051461;\n const gW = xyz[0] * -0.250268 + xyz[1] * 1.204414 + xyz[2] * 0.045854;\n const bW = xyz[0] * -0.002079 + xyz[1] * 0.048952 + xyz[2] * 0.953127;\n const f = 0.8 + surround / 10.0;\n const c = f >= 0.9 ? math.lerp(0.59, 0.69, (f - 0.9) * 10.0) :\n math.lerp(0.525, 0.59, (f - 0.8) * 10.0);\n let d = discountingIlluminant ?\n 1.0 :\n f * (1.0 - (1.0 / 3.6) * Math.exp((-adaptingLuminance - 42.0) / 92.0));\n d = d > 1.0 ? 1.0 : d < 0.0 ? 0.0 : d;\n const nc = f;\n const rgbD = [\n d * (100.0 / rW) + 1.0 - d,\n d * (100.0 / gW) + 1.0 - d,\n d * (100.0 / bW) + 1.0 - d,\n ];\n const k = 1.0 / (5.0 * adaptingLuminance + 1.0);\n const k4 = k * k * k * k;\n const k4F = 1.0 - k4;\n const fl = k4 * adaptingLuminance +\n 0.1 * k4F * k4F * Math.cbrt(5.0 * adaptingLuminance);\n const n = utils.yFromLstar(backgroundLstar) / whitePoint[1];\n const z = 1.48 + Math.sqrt(n);\n const nbb = 0.725 / Math.pow(n, 0.2);\n const ncb = nbb;\n const rgbAFactors = [\n Math.pow((fl * rgbD[0] * rW) / 100.0, 0.42),\n Math.pow((fl * rgbD[1] * gW) / 100.0, 0.42),\n Math.pow((fl * rgbD[2] * bW) / 100.0, 0.42),\n ];\n const rgbA = [\n (400.0 * rgbAFactors[0]) / (rgbAFactors[0] + 27.13),\n (400.0 * rgbAFactors[1]) / (rgbAFactors[1] + 27.13),\n (400.0 * rgbAFactors[2]) / (rgbAFactors[2] + 27.13),\n ];\n const aw = (2.0 * rgbA[0] + rgbA[1] + 0.05 * rgbA[2]) * nbb;\n return new ViewingConditions(n, aw, nbb, ncb, c, nc, rgbD, fl, Math.pow(fl, 0.25), z);\n }\n /**\n * Parameters are intermediate values of the CAM16 conversion process. Their\n * names are shorthand for technical color science terminology, this class\n * would not benefit from documenting them individually. A brief overview\n * is available in the CAM16 specification, and a complete overview requires\n * a color science textbook, such as Fairchild's Color Appearance Models.\n */\n constructor(n, aw, nbb, ncb, c, nc, rgbD, fl, fLRoot, z) {\n this.n = n;\n this.aw = aw;\n this.nbb = nbb;\n this.ncb = ncb;\n this.c = c;\n this.nc = nc;\n this.rgbD = rgbD;\n this.fl = fl;\n this.fLRoot = fLRoot;\n this.z = z;\n }\n}\n/** sRGB-like viewing conditions. */\nViewingConditions.DEFAULT = ViewingConditions.make();\n//# sourceMappingURL=viewing_conditions.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as utils from '../utils/color_utils.js';\nimport * as math from '../utils/math_utils.js';\nimport { ViewingConditions } from './viewing_conditions.js';\n/**\n * CAM16, a color appearance model. Colors are not just defined by their hex\n * code, but rather, a hex code and viewing conditions.\n *\n * CAM16 instances also have coordinates in the CAM16-UCS space, called J*, a*,\n * b*, or jstar, astar, bstar in code. CAM16-UCS is included in the CAM16\n * specification, and should be used when measuring distances between colors.\n *\n * In traditional color spaces, a color can be identified solely by the\n * observer's measurement of the color. Color appearance models such as CAM16\n * also use information about the environment where the color was\n * observed, known as the viewing conditions.\n *\n * For example, white under the traditional assumption of a midday sun white\n * point is accurately measured as a slightly chromatic blue by CAM16. (roughly,\n * hue 203, chroma 3, lightness 100)\n */\nexport class Cam16 {\n /**\n * All of the CAM16 dimensions can be calculated from 3 of the dimensions, in\n * the following combinations:\n * - {j or q} and {c, m, or s} and hue\n * - jstar, astar, bstar\n * Prefer using a static method that constructs from 3 of those dimensions.\n * This constructor is intended for those methods to use to return all\n * possible dimensions.\n *\n * @param hue\n * @param chroma informally, colorfulness / color intensity. like saturation\n * in HSL, except perceptually accurate.\n * @param j lightness\n * @param q brightness; ratio of lightness to white point's lightness\n * @param m colorfulness\n * @param s saturation; ratio of chroma to white point's chroma\n * @param jstar CAM16-UCS J coordinate\n * @param astar CAM16-UCS a coordinate\n * @param bstar CAM16-UCS b coordinate\n */\n constructor(hue, chroma, j, q, m, s, jstar, astar, bstar) {\n this.hue = hue;\n this.chroma = chroma;\n this.j = j;\n this.q = q;\n this.m = m;\n this.s = s;\n this.jstar = jstar;\n this.astar = astar;\n this.bstar = bstar;\n }\n /**\n * CAM16 instances also have coordinates in the CAM16-UCS space, called J*,\n * a*, b*, or jstar, astar, bstar in code. CAM16-UCS is included in the CAM16\n * specification, and is used to measure distances between colors.\n */\n distance(other) {\n const dJ = this.jstar - other.jstar;\n const dA = this.astar - other.astar;\n const dB = this.bstar - other.bstar;\n const dEPrime = Math.sqrt(dJ * dJ + dA * dA + dB * dB);\n const dE = 1.41 * Math.pow(dEPrime, 0.63);\n return dE;\n }\n /**\n * @param argb ARGB representation of a color.\n * @return CAM16 color, assuming the color was viewed in default viewing\n * conditions.\n */\n static fromInt(argb) {\n return Cam16.fromIntInViewingConditions(argb, ViewingConditions.DEFAULT);\n }\n /**\n * @param argb ARGB representation of a color.\n * @param viewingConditions Information about the environment where the color\n * was observed.\n * @return CAM16 color.\n */\n static fromIntInViewingConditions(argb, viewingConditions) {\n const red = (argb & 0x00ff0000) >> 16;\n const green = (argb & 0x0000ff00) >> 8;\n const blue = (argb & 0x000000ff);\n const redL = utils.linearized(red);\n const greenL = utils.linearized(green);\n const blueL = utils.linearized(blue);\n const x = 0.41233895 * redL + 0.35762064 * greenL + 0.18051042 * blueL;\n const y = 0.2126 * redL + 0.7152 * greenL + 0.0722 * blueL;\n const z = 0.01932141 * redL + 0.11916382 * greenL + 0.95034478 * blueL;\n const rC = 0.401288 * x + 0.650173 * y - 0.051461 * z;\n const gC = -0.250268 * x + 1.204414 * y + 0.045854 * z;\n const bC = -0.002079 * x + 0.048952 * y + 0.953127 * z;\n const rD = viewingConditions.rgbD[0] * rC;\n const gD = viewingConditions.rgbD[1] * gC;\n const bD = viewingConditions.rgbD[2] * bC;\n const rAF = Math.pow((viewingConditions.fl * Math.abs(rD)) / 100.0, 0.42);\n const gAF = Math.pow((viewingConditions.fl * Math.abs(gD)) / 100.0, 0.42);\n const bAF = Math.pow((viewingConditions.fl * Math.abs(bD)) / 100.0, 0.42);\n const rA = (math.signum(rD) * 400.0 * rAF) / (rAF + 27.13);\n const gA = (math.signum(gD) * 400.0 * gAF) / (gAF + 27.13);\n const bA = (math.signum(bD) * 400.0 * bAF) / (bAF + 27.13);\n const a = (11.0 * rA + -12.0 * gA + bA) / 11.0;\n const b = (rA + gA - 2.0 * bA) / 9.0;\n const u = (20.0 * rA + 20.0 * gA + 21.0 * bA) / 20.0;\n const p2 = (40.0 * rA + 20.0 * gA + bA) / 20.0;\n const atan2 = Math.atan2(b, a);\n const atanDegrees = (atan2 * 180.0) / Math.PI;\n const hue = math.sanitizeDegreesDouble(atanDegrees);\n const hueRadians = (hue * Math.PI) / 180.0;\n const ac = p2 * viewingConditions.nbb;\n const j = 100.0 *\n Math.pow(ac / viewingConditions.aw, viewingConditions.c * viewingConditions.z);\n const q = (4.0 / viewingConditions.c) * Math.sqrt(j / 100.0) *\n (viewingConditions.aw + 4.0) * viewingConditions.fLRoot;\n const huePrime = hue < 20.14 ? hue + 360 : hue;\n const eHue = 0.25 * (Math.cos((huePrime * Math.PI) / 180.0 + 2.0) + 3.8);\n const p1 = (50000.0 / 13.0) * eHue * viewingConditions.nc * viewingConditions.ncb;\n const t = (p1 * Math.sqrt(a * a + b * b)) / (u + 0.305);\n const alpha = Math.pow(t, 0.9) *\n Math.pow(1.64 - Math.pow(0.29, viewingConditions.n), 0.73);\n const c = alpha * Math.sqrt(j / 100.0);\n const m = c * viewingConditions.fLRoot;\n const s = 50.0 *\n Math.sqrt((alpha * viewingConditions.c) / (viewingConditions.aw + 4.0));\n const jstar = ((1.0 + 100.0 * 0.007) * j) / (1.0 + 0.007 * j);\n const mstar = (1.0 / 0.0228) * Math.log(1.0 + 0.0228 * m);\n const astar = mstar * Math.cos(hueRadians);\n const bstar = mstar * Math.sin(hueRadians);\n return new Cam16(hue, c, j, q, m, s, jstar, astar, bstar);\n }\n /**\n * @param j CAM16 lightness\n * @param c CAM16 chroma\n * @param h CAM16 hue\n */\n static fromJch(j, c, h) {\n return Cam16.fromJchInViewingConditions(j, c, h, ViewingConditions.DEFAULT);\n }\n /**\n * @param j CAM16 lightness\n * @param c CAM16 chroma\n * @param h CAM16 hue\n * @param viewingConditions Information about the environment where the color\n * was observed.\n */\n static fromJchInViewingConditions(j, c, h, viewingConditions) {\n const q = (4.0 / viewingConditions.c) * Math.sqrt(j / 100.0) *\n (viewingConditions.aw + 4.0) * viewingConditions.fLRoot;\n const m = c * viewingConditions.fLRoot;\n const alpha = c / Math.sqrt(j / 100.0);\n const s = 50.0 *\n Math.sqrt((alpha * viewingConditions.c) / (viewingConditions.aw + 4.0));\n const hueRadians = (h * Math.PI) / 180.0;\n const jstar = ((1.0 + 100.0 * 0.007) * j) / (1.0 + 0.007 * j);\n const mstar = (1.0 / 0.0228) * Math.log(1.0 + 0.0228 * m);\n const astar = mstar * Math.cos(hueRadians);\n const bstar = mstar * Math.sin(hueRadians);\n return new Cam16(h, c, j, q, m, s, jstar, astar, bstar);\n }\n /**\n * @param jstar CAM16-UCS lightness.\n * @param astar CAM16-UCS a dimension. Like a* in L*a*b*, it is a Cartesian\n * coordinate on the Y axis.\n * @param bstar CAM16-UCS b dimension. Like a* in L*a*b*, it is a Cartesian\n * coordinate on the X axis.\n */\n static fromUcs(jstar, astar, bstar) {\n return Cam16.fromUcsInViewingConditions(jstar, astar, bstar, ViewingConditions.DEFAULT);\n }\n /**\n * @param jstar CAM16-UCS lightness.\n * @param astar CAM16-UCS a dimension. Like a* in L*a*b*, it is a Cartesian\n * coordinate on the Y axis.\n * @param bstar CAM16-UCS b dimension. Like a* in L*a*b*, it is a Cartesian\n * coordinate on the X axis.\n * @param viewingConditions Information about the environment where the color\n * was observed.\n */\n static fromUcsInViewingConditions(jstar, astar, bstar, viewingConditions) {\n const a = astar;\n const b = bstar;\n const m = Math.sqrt(a * a + b * b);\n const M = (Math.exp(m * 0.0228) - 1.0) / 0.0228;\n const c = M / viewingConditions.fLRoot;\n let h = Math.atan2(b, a) * (180.0 / Math.PI);\n if (h < 0.0) {\n h += 360.0;\n }\n const j = jstar / (1 - (jstar - 100) * 0.007);\n return Cam16.fromJchInViewingConditions(j, c, h, viewingConditions);\n }\n /**\n * @return ARGB representation of color, assuming the color was viewed in\n * default viewing conditions, which are near-identical to the default\n * viewing conditions for sRGB.\n */\n toInt() {\n return this.viewed(ViewingConditions.DEFAULT);\n }\n /**\n * @param viewingConditions Information about the environment where the color\n * will be viewed.\n * @return ARGB representation of color\n */\n viewed(viewingConditions) {\n const alpha = this.chroma === 0.0 || this.j === 0.0 ?\n 0.0 :\n this.chroma / Math.sqrt(this.j / 100.0);\n const t = Math.pow(alpha / Math.pow(1.64 - Math.pow(0.29, viewingConditions.n), 0.73), 1.0 / 0.9);\n const hRad = (this.hue * Math.PI) / 180.0;\n const eHue = 0.25 * (Math.cos(hRad + 2.0) + 3.8);\n const ac = viewingConditions.aw *\n Math.pow(this.j / 100.0, 1.0 / viewingConditions.c / viewingConditions.z);\n const p1 = eHue * (50000.0 / 13.0) * viewingConditions.nc * viewingConditions.ncb;\n const p2 = ac / viewingConditions.nbb;\n const hSin = Math.sin(hRad);\n const hCos = Math.cos(hRad);\n const gamma = (23.0 * (p2 + 0.305) * t) /\n (23.0 * p1 + 11.0 * t * hCos + 108.0 * t * hSin);\n const a = gamma * hCos;\n const b = gamma * hSin;\n const rA = (460.0 * p2 + 451.0 * a + 288.0 * b) / 1403.0;\n const gA = (460.0 * p2 - 891.0 * a - 261.0 * b) / 1403.0;\n const bA = (460.0 * p2 - 220.0 * a - 6300.0 * b) / 1403.0;\n const rCBase = Math.max(0, (27.13 * Math.abs(rA)) / (400.0 - Math.abs(rA)));\n const rC = math.signum(rA) * (100.0 / viewingConditions.fl) *\n Math.pow(rCBase, 1.0 / 0.42);\n const gCBase = Math.max(0, (27.13 * Math.abs(gA)) / (400.0 - Math.abs(gA)));\n const gC = math.signum(gA) * (100.0 / viewingConditions.fl) *\n Math.pow(gCBase, 1.0 / 0.42);\n const bCBase = Math.max(0, (27.13 * Math.abs(bA)) / (400.0 - Math.abs(bA)));\n const bC = math.signum(bA) * (100.0 / viewingConditions.fl) *\n Math.pow(bCBase, 1.0 / 0.42);\n const rF = rC / viewingConditions.rgbD[0];\n const gF = gC / viewingConditions.rgbD[1];\n const bF = bC / viewingConditions.rgbD[2];\n const x = 1.86206786 * rF - 1.01125463 * gF + 0.14918677 * bF;\n const y = 0.38752654 * rF + 0.62144744 * gF - 0.00897398 * bF;\n const z = -0.01584150 * rF - 0.03412294 * gF + 1.04996444 * bF;\n const argb = utils.argbFromXyz(x, y, z);\n return argb;\n }\n /// Given color expressed in XYZ and viewed in [viewingConditions], convert to\n /// CAM16.\n static fromXyzInViewingConditions(x, y, z, viewingConditions) {\n // Transform XYZ to 'cone'/'rgb' responses\n const rC = 0.401288 * x + 0.650173 * y - 0.051461 * z;\n const gC = -0.250268 * x + 1.204414 * y + 0.045854 * z;\n const bC = -0.002079 * x + 0.048952 * y + 0.953127 * z;\n // Discount illuminant\n const rD = viewingConditions.rgbD[0] * rC;\n const gD = viewingConditions.rgbD[1] * gC;\n const bD = viewingConditions.rgbD[2] * bC;\n // chromatic adaptation\n const rAF = Math.pow(viewingConditions.fl * Math.abs(rD) / 100.0, 0.42);\n const gAF = Math.pow(viewingConditions.fl * Math.abs(gD) / 100.0, 0.42);\n const bAF = Math.pow(viewingConditions.fl * Math.abs(bD) / 100.0, 0.42);\n const rA = math.signum(rD) * 400.0 * rAF / (rAF + 27.13);\n const gA = math.signum(gD) * 400.0 * gAF / (gAF + 27.13);\n const bA = math.signum(bD) * 400.0 * bAF / (bAF + 27.13);\n // redness-greenness\n const a = (11.0 * rA + -12.0 * gA + bA) / 11.0;\n // yellowness-blueness\n const b = (rA + gA - 2.0 * bA) / 9.0;\n // auxiliary components\n const u = (20.0 * rA + 20.0 * gA + 21.0 * bA) / 20.0;\n const p2 = (40.0 * rA + 20.0 * gA + bA) / 20.0;\n // hue\n const atan2 = Math.atan2(b, a);\n const atanDegrees = atan2 * 180.0 / Math.PI;\n const hue = atanDegrees < 0 ? atanDegrees + 360.0 :\n atanDegrees >= 360 ? atanDegrees - 360 :\n atanDegrees;\n const hueRadians = hue * Math.PI / 180.0;\n // achromatic response to color\n const ac = p2 * viewingConditions.nbb;\n // CAM16 lightness and brightness\n const J = 100.0 *\n Math.pow(ac / viewingConditions.aw, viewingConditions.c * viewingConditions.z);\n const Q = (4.0 / viewingConditions.c) * Math.sqrt(J / 100.0) *\n (viewingConditions.aw + 4.0) * (viewingConditions.fLRoot);\n const huePrime = (hue < 20.14) ? hue + 360 : hue;\n const eHue = (1.0 / 4.0) * (Math.cos(huePrime * Math.PI / 180.0 + 2.0) + 3.8);\n const p1 = 50000.0 / 13.0 * eHue * viewingConditions.nc * viewingConditions.ncb;\n const t = p1 * Math.sqrt(a * a + b * b) / (u + 0.305);\n const alpha = Math.pow(t, 0.9) *\n Math.pow(1.64 - Math.pow(0.29, viewingConditions.n), 0.73);\n // CAM16 chroma, colorfulness, chroma\n const C = alpha * Math.sqrt(J / 100.0);\n const M = C * viewingConditions.fLRoot;\n const s = 50.0 *\n Math.sqrt((alpha * viewingConditions.c) / (viewingConditions.aw + 4.0));\n // CAM16-UCS components\n const jstar = (1.0 + 100.0 * 0.007) * J / (1.0 + 0.007 * J);\n const mstar = Math.log(1.0 + 0.0228 * M) / 0.0228;\n const astar = mstar * Math.cos(hueRadians);\n const bstar = mstar * Math.sin(hueRadians);\n return new Cam16(hue, C, J, Q, M, s, jstar, astar, bstar);\n }\n /// XYZ representation of CAM16 seen in [viewingConditions].\n xyzInViewingConditions(viewingConditions) {\n const alpha = (this.chroma === 0.0 || this.j === 0.0) ?\n 0.0 :\n this.chroma / Math.sqrt(this.j / 100.0);\n const t = Math.pow(alpha / Math.pow(1.64 - Math.pow(0.29, viewingConditions.n), 0.73), 1.0 / 0.9);\n const hRad = this.hue * Math.PI / 180.0;\n const eHue = 0.25 * (Math.cos(hRad + 2.0) + 3.8);\n const ac = viewingConditions.aw *\n Math.pow(this.j / 100.0, 1.0 / viewingConditions.c / viewingConditions.z);\n const p1 = eHue * (50000.0 / 13.0) * viewingConditions.nc * viewingConditions.ncb;\n const p2 = (ac / viewingConditions.nbb);\n const hSin = Math.sin(hRad);\n const hCos = Math.cos(hRad);\n const gamma = 23.0 * (p2 + 0.305) * t /\n (23.0 * p1 + 11 * t * hCos + 108.0 * t * hSin);\n const a = gamma * hCos;\n const b = gamma * hSin;\n const rA = (460.0 * p2 + 451.0 * a + 288.0 * b) / 1403.0;\n const gA = (460.0 * p2 - 891.0 * a - 261.0 * b) / 1403.0;\n const bA = (460.0 * p2 - 220.0 * a - 6300.0 * b) / 1403.0;\n const rCBase = Math.max(0, (27.13 * Math.abs(rA)) / (400.0 - Math.abs(rA)));\n const rC = math.signum(rA) * (100.0 / viewingConditions.fl) *\n Math.pow(rCBase, 1.0 / 0.42);\n const gCBase = Math.max(0, (27.13 * Math.abs(gA)) / (400.0 - Math.abs(gA)));\n const gC = math.signum(gA) * (100.0 / viewingConditions.fl) *\n Math.pow(gCBase, 1.0 / 0.42);\n const bCBase = Math.max(0, (27.13 * Math.abs(bA)) / (400.0 - Math.abs(bA)));\n const bC = math.signum(bA) * (100.0 / viewingConditions.fl) *\n Math.pow(bCBase, 1.0 / 0.42);\n const rF = rC / viewingConditions.rgbD[0];\n const gF = gC / viewingConditions.rgbD[1];\n const bF = bC / viewingConditions.rgbD[2];\n const x = 1.86206786 * rF - 1.01125463 * gF + 0.14918677 * bF;\n const y = 0.38752654 * rF + 0.62144744 * gF - 0.00897398 * bF;\n const z = -0.01584150 * rF - 0.03412294 * gF + 1.04996444 * bF;\n return [x, y, z];\n }\n}\n//# sourceMappingURL=cam16.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This file is automatically generated. Do not modify it.\nimport * as colorUtils from '../utils/color_utils.js';\nimport * as mathUtils from '../utils/math_utils.js';\nimport { Cam16 } from './cam16.js';\nimport { ViewingConditions } from './viewing_conditions.js';\n// material_color_utilities is designed to have a consistent API across\n// platforms and modular components that can be moved around easily. Using a\n// class as a namespace facilitates this.\n//\n// tslint:disable:class-as-namespace\n/**\n * A class that solves the HCT equation.\n */\nexport class HctSolver {\n /**\n * Sanitizes a small enough angle in radians.\n *\n * @param angle An angle in radians; must not deviate too much\n * from 0.\n * @return A coterminal angle between 0 and 2pi.\n */\n static sanitizeRadians(angle) {\n return (angle + Math.PI * 8) % (Math.PI * 2);\n }\n /**\n * Delinearizes an RGB component, returning a floating-point\n * number.\n *\n * @param rgbComponent 0.0 <= rgb_component <= 100.0, represents\n * linear R/G/B channel\n * @return 0.0 <= output <= 255.0, color channel converted to\n * regular RGB space\n */\n static trueDelinearized(rgbComponent) {\n const normalized = rgbComponent / 100.0;\n let delinearized = 0.0;\n if (normalized <= 0.0031308) {\n delinearized = normalized * 12.92;\n }\n else {\n delinearized = 1.055 * Math.pow(normalized, 1.0 / 2.4) - 0.055;\n }\n return delinearized * 255.0;\n }\n static chromaticAdaptation(component) {\n const af = Math.pow(Math.abs(component), 0.42);\n return mathUtils.signum(component) * 400.0 * af / (af + 27.13);\n }\n /**\n * Returns the hue of a linear RGB color in CAM16.\n *\n * @param linrgb The linear RGB coordinates of a color.\n * @return The hue of the color in CAM16, in radians.\n */\n static hueOf(linrgb) {\n const scaledDiscount = mathUtils.matrixMultiply(linrgb, HctSolver.SCALED_DISCOUNT_FROM_LINRGB);\n const rA = HctSolver.chromaticAdaptation(scaledDiscount[0]);\n const gA = HctSolver.chromaticAdaptation(scaledDiscount[1]);\n const bA = HctSolver.chromaticAdaptation(scaledDiscount[2]);\n // redness-greenness\n const a = (11.0 * rA + -12.0 * gA + bA) / 11.0;\n // yellowness-blueness\n const b = (rA + gA - 2.0 * bA) / 9.0;\n return Math.atan2(b, a);\n }\n static areInCyclicOrder(a, b, c) {\n const deltaAB = HctSolver.sanitizeRadians(b - a);\n const deltaAC = HctSolver.sanitizeRadians(c - a);\n return deltaAB < deltaAC;\n }\n /**\n * Solves the lerp equation.\n *\n * @param source The starting number.\n * @param mid The number in the middle.\n * @param target The ending number.\n * @return A number t such that lerp(source, target, t) = mid.\n */\n static intercept(source, mid, target) {\n return (mid - source) / (target - source);\n }\n static lerpPoint(source, t, target) {\n return [\n source[0] + (target[0] - source[0]) * t,\n source[1] + (target[1] - source[1]) * t,\n source[2] + (target[2] - source[2]) * t,\n ];\n }\n /**\n * Intersects a segment with a plane.\n *\n * @param source The coordinates of point A.\n * @param coordinate The R-, G-, or B-coordinate of the plane.\n * @param target The coordinates of point B.\n * @param axis The axis the plane is perpendicular with. (0: R, 1:\n * G, 2: B)\n * @return The intersection point of the segment AB with the plane\n * R=coordinate, G=coordinate, or B=coordinate\n */\n static setCoordinate(source, coordinate, target, axis) {\n const t = HctSolver.intercept(source[axis], coordinate, target[axis]);\n return HctSolver.lerpPoint(source, t, target);\n }\n static isBounded(x) {\n return 0.0 <= x && x <= 100.0;\n }\n /**\n * Returns the nth possible vertex of the polygonal intersection.\n *\n * @param y The Y value of the plane.\n * @param n The zero-based index of the point. 0 <= n <= 11.\n * @return The nth possible vertex of the polygonal intersection\n * of the y plane and the RGB cube, in linear RGB coordinates, if\n * it exists. If this possible vertex lies outside of the cube,\n * [-1.0, -1.0, -1.0] is returned.\n */\n static nthVertex(y, n) {\n const kR = HctSolver.Y_FROM_LINRGB[0];\n const kG = HctSolver.Y_FROM_LINRGB[1];\n const kB = HctSolver.Y_FROM_LINRGB[2];\n const coordA = n % 4 <= 1 ? 0.0 : 100.0;\n const coordB = n % 2 === 0 ? 0.0 : 100.0;\n if (n < 4) {\n const g = coordA;\n const b = coordB;\n const r = (y - g * kG - b * kB) / kR;\n if (HctSolver.isBounded(r)) {\n return [r, g, b];\n }\n else {\n return [-1.0, -1.0, -1.0];\n }\n }\n else if (n < 8) {\n const b = coordA;\n const r = coordB;\n const g = (y - r * kR - b * kB) / kG;\n if (HctSolver.isBounded(g)) {\n return [r, g, b];\n }\n else {\n return [-1.0, -1.0, -1.0];\n }\n }\n else {\n const r = coordA;\n const g = coordB;\n const b = (y - r * kR - g * kG) / kB;\n if (HctSolver.isBounded(b)) {\n return [r, g, b];\n }\n else {\n return [-1.0, -1.0, -1.0];\n }\n }\n }\n /**\n * Finds the segment containing the desired color.\n *\n * @param y The Y value of the color.\n * @param targetHue The hue of the color.\n * @return A list of two sets of linear RGB coordinates, each\n * corresponding to an endpoint of the segment containing the\n * desired color.\n */\n static bisectToSegment(y, targetHue) {\n let left = [-1.0, -1.0, -1.0];\n let right = left;\n let leftHue = 0.0;\n let rightHue = 0.0;\n let initialized = false;\n let uncut = true;\n for (let n = 0; n < 12; n++) {\n const mid = HctSolver.nthVertex(y, n);\n if (mid[0] < 0) {\n continue;\n }\n const midHue = HctSolver.hueOf(mid);\n if (!initialized) {\n left = mid;\n right = mid;\n leftHue = midHue;\n rightHue = midHue;\n initialized = true;\n continue;\n }\n if (uncut || HctSolver.areInCyclicOrder(leftHue, midHue, rightHue)) {\n uncut = false;\n if (HctSolver.areInCyclicOrder(leftHue, targetHue, midHue)) {\n right = mid;\n rightHue = midHue;\n }\n else {\n left = mid;\n leftHue = midHue;\n }\n }\n }\n return [left, right];\n }\n static midpoint(a, b) {\n return [\n (a[0] + b[0]) / 2,\n (a[1] + b[1]) / 2,\n (a[2] + b[2]) / 2,\n ];\n }\n static criticalPlaneBelow(x) {\n return Math.floor(x - 0.5);\n }\n static criticalPlaneAbove(x) {\n return Math.ceil(x - 0.5);\n }\n /**\n * Finds a color with the given Y and hue on the boundary of the\n * cube.\n *\n * @param y The Y value of the color.\n * @param targetHue The hue of the color.\n * @return The desired color, in linear RGB coordinates.\n */\n static bisectToLimit(y, targetHue) {\n const segment = HctSolver.bisectToSegment(y, targetHue);\n let left = segment[0];\n let leftHue = HctSolver.hueOf(left);\n let right = segment[1];\n for (let axis = 0; axis < 3; axis++) {\n if (left[axis] !== right[axis]) {\n let lPlane = -1;\n let rPlane = 255;\n if (left[axis] < right[axis]) {\n lPlane = HctSolver.criticalPlaneBelow(HctSolver.trueDelinearized(left[axis]));\n rPlane = HctSolver.criticalPlaneAbove(HctSolver.trueDelinearized(right[axis]));\n }\n else {\n lPlane = HctSolver.criticalPlaneAbove(HctSolver.trueDelinearized(left[axis]));\n rPlane = HctSolver.criticalPlaneBelow(HctSolver.trueDelinearized(right[axis]));\n }\n for (let i = 0; i < 8; i++) {\n if (Math.abs(rPlane - lPlane) <= 1) {\n break;\n }\n else {\n const mPlane = Math.floor((lPlane + rPlane) / 2.0);\n const midPlaneCoordinate = HctSolver.CRITICAL_PLANES[mPlane];\n const mid = HctSolver.setCoordinate(left, midPlaneCoordinate, right, axis);\n const midHue = HctSolver.hueOf(mid);\n if (HctSolver.areInCyclicOrder(leftHue, targetHue, midHue)) {\n right = mid;\n rPlane = mPlane;\n }\n else {\n left = mid;\n leftHue = midHue;\n lPlane = mPlane;\n }\n }\n }\n }\n }\n return HctSolver.midpoint(left, right);\n }\n static inverseChromaticAdaptation(adapted) {\n const adaptedAbs = Math.abs(adapted);\n const base = Math.max(0, 27.13 * adaptedAbs / (400.0 - adaptedAbs));\n return mathUtils.signum(adapted) * Math.pow(base, 1.0 / 0.42);\n }\n /**\n * Finds a color with the given hue, chroma, and Y.\n *\n * @param hueRadians The desired hue in radians.\n * @param chroma The desired chroma.\n * @param y The desired Y.\n * @return The desired color as a hexadecimal integer, if found; 0\n * otherwise.\n */\n static findResultByJ(hueRadians, chroma, y) {\n // Initial estimate of j.\n let j = Math.sqrt(y) * 11.0;\n // ===========================================================\n // Operations inlined from Cam16 to avoid repeated calculation\n // ===========================================================\n const viewingConditions = ViewingConditions.DEFAULT;\n const tInnerCoeff = 1 / Math.pow(1.64 - Math.pow(0.29, viewingConditions.n), 0.73);\n const eHue = 0.25 * (Math.cos(hueRadians + 2.0) + 3.8);\n const p1 = eHue * (50000.0 / 13.0) * viewingConditions.nc * viewingConditions.ncb;\n const hSin = Math.sin(hueRadians);\n const hCos = Math.cos(hueRadians);\n for (let iterationRound = 0; iterationRound < 5; iterationRound++) {\n // ===========================================================\n // Operations inlined from Cam16 to avoid repeated calculation\n // ===========================================================\n const jNormalized = j / 100.0;\n const alpha = chroma === 0.0 || j === 0.0 ? 0.0 : chroma / Math.sqrt(jNormalized);\n const t = Math.pow(alpha * tInnerCoeff, 1.0 / 0.9);\n const ac = viewingConditions.aw *\n Math.pow(jNormalized, 1.0 / viewingConditions.c / viewingConditions.z);\n const p2 = ac / viewingConditions.nbb;\n const gamma = 23.0 * (p2 + 0.305) * t /\n (23.0 * p1 + 11 * t * hCos + 108.0 * t * hSin);\n const a = gamma * hCos;\n const b = gamma * hSin;\n const rA = (460.0 * p2 + 451.0 * a + 288.0 * b) / 1403.0;\n const gA = (460.0 * p2 - 891.0 * a - 261.0 * b) / 1403.0;\n const bA = (460.0 * p2 - 220.0 * a - 6300.0 * b) / 1403.0;\n const rCScaled = HctSolver.inverseChromaticAdaptation(rA);\n const gCScaled = HctSolver.inverseChromaticAdaptation(gA);\n const bCScaled = HctSolver.inverseChromaticAdaptation(bA);\n const linrgb = mathUtils.matrixMultiply([rCScaled, gCScaled, bCScaled], HctSolver.LINRGB_FROM_SCALED_DISCOUNT);\n // ===========================================================\n // Operations inlined from Cam16 to avoid repeated calculation\n // ===========================================================\n if (linrgb[0] < 0 || linrgb[1] < 0 || linrgb[2] < 0) {\n return 0;\n }\n const kR = HctSolver.Y_FROM_LINRGB[0];\n const kG = HctSolver.Y_FROM_LINRGB[1];\n const kB = HctSolver.Y_FROM_LINRGB[2];\n const fnj = kR * linrgb[0] + kG * linrgb[1] + kB * linrgb[2];\n if (fnj <= 0) {\n return 0;\n }\n if (iterationRound === 4 || Math.abs(fnj - y) < 0.002) {\n if (linrgb[0] > 100.01 || linrgb[1] > 100.01 || linrgb[2] > 100.01) {\n return 0;\n }\n return colorUtils.argbFromLinrgb(linrgb);\n }\n // Iterates with Newton method,\n // Using 2 * fn(j) / j as the approximation of fn'(j)\n j = j - (fnj - y) * j / (2 * fnj);\n }\n return 0;\n }\n /**\n * Finds an sRGB color with the given hue, chroma, and L*, if\n * possible.\n *\n * @param hueDegrees The desired hue, in degrees.\n * @param chroma The desired chroma.\n * @param lstar The desired L*.\n * @return A hexadecimal representing the sRGB color. The color\n * has sufficiently close hue, chroma, and L* to the desired\n * values, if possible; otherwise, the hue and L* will be\n * sufficiently close, and chroma will be maximized.\n */\n static solveToInt(hueDegrees, chroma, lstar) {\n if (chroma < 0.0001 || lstar < 0.0001 || lstar > 99.9999) {\n return colorUtils.argbFromLstar(lstar);\n }\n hueDegrees = mathUtils.sanitizeDegreesDouble(hueDegrees);\n const hueRadians = hueDegrees / 180 * Math.PI;\n const y = colorUtils.yFromLstar(lstar);\n const exactAnswer = HctSolver.findResultByJ(hueRadians, chroma, y);\n if (exactAnswer !== 0) {\n return exactAnswer;\n }\n const linrgb = HctSolver.bisectToLimit(y, hueRadians);\n return colorUtils.argbFromLinrgb(linrgb);\n }\n /**\n * Finds an sRGB color with the given hue, chroma, and L*, if\n * possible.\n *\n * @param hueDegrees The desired hue, in degrees.\n * @param chroma The desired chroma.\n * @param lstar The desired L*.\n * @return An CAM16 object representing the sRGB color. The color\n * has sufficiently close hue, chroma, and L* to the desired\n * values, if possible; otherwise, the hue and L* will be\n * sufficiently close, and chroma will be maximized.\n */\n static solveToCam(hueDegrees, chroma, lstar) {\n return Cam16.fromInt(HctSolver.solveToInt(hueDegrees, chroma, lstar));\n }\n}\nHctSolver.SCALED_DISCOUNT_FROM_LINRGB = [\n [\n 0.001200833568784504,\n 0.002389694492170889,\n 0.0002795742885861124,\n ],\n [\n 0.0005891086651375999,\n 0.0029785502573438758,\n 0.0003270666104008398,\n ],\n [\n 0.00010146692491640572,\n 0.0005364214359186694,\n 0.0032979401770712076,\n ],\n];\nHctSolver.LINRGB_FROM_SCALED_DISCOUNT = [\n [\n 1373.2198709594231,\n -1100.4251190754821,\n -7.278681089101213,\n ],\n [\n -271.815969077903,\n 559.6580465940733,\n -32.46047482791194,\n ],\n [\n 1.9622899599665666,\n -57.173814538844006,\n 308.7233197812385,\n ],\n];\nHctSolver.Y_FROM_LINRGB = [0.2126, 0.7152, 0.0722];\nHctSolver.CRITICAL_PLANES = [\n 0.015176349177441876, 0.045529047532325624, 0.07588174588720938,\n 0.10623444424209313, 0.13658714259697685, 0.16693984095186062,\n 0.19729253930674434, 0.2276452376616281, 0.2579979360165119,\n 0.28835063437139563, 0.3188300904430532, 0.350925934958123,\n 0.3848314933096426, 0.42057480301049466, 0.458183274052838,\n 0.4976837250274023, 0.5391024159806381, 0.5824650784040898,\n 0.6277969426914107, 0.6751227633498623, 0.7244668422128921,\n 0.775853049866786, 0.829304845476233, 0.8848452951698498,\n 0.942497089126609, 1.0022825574869039, 1.0642236851973577,\n 1.1283421258858297, 1.1946592148522128, 1.2631959812511864,\n 1.3339731595349034, 1.407011200216447, 1.4823302800086415,\n 1.5599503113873272, 1.6398909516233677, 1.7221716113234105,\n 1.8068114625156377, 1.8938294463134073, 1.9832442801866852,\n 2.075074464868551, 2.1693382909216234, 2.2660538449872063,\n 2.36523901573795, 2.4669114995532007, 2.5710888059345764,\n 2.6777882626779785, 2.7870270208169257, 2.898822059350997,\n 3.0131901897720907, 3.1301480604002863, 3.2497121605402226,\n 3.3718988244681087, 3.4967242352587946, 3.624204428461639,\n 3.754355295633311, 3.887192587735158, 4.022731918402185,\n 4.160988767090289, 4.301978482107941, 4.445716283538092,\n 4.592217266055746, 4.741496401646282, 4.893568542229298,\n 5.048448422192488, 5.20615066083972, 5.3666897647573375,\n 5.5300801301023865, 5.696336044816294, 5.865471690767354,\n 6.037501145825082, 6.212438385869475, 6.390297286737924,\n 6.571091626112461, 6.7548350853498045, 6.941541251256611,\n 7.131223617812143, 7.323895587840543, 7.5195704746346665,\n 7.7182615035334345, 7.919981813454504, 8.124744458384042,\n 8.332562408825165, 8.543448553206703, 8.757415699253682,\n 8.974476575321063, 9.194643831691977, 9.417930041841839,\n 9.644347703669503, 9.873909240696694, 10.106627003236781,\n 10.342513269534024, 10.58158024687427, 10.8238400726681,\n 11.069304815507364, 11.317986476196008, 11.569896988756009,\n 11.825048221409341, 12.083451977536606, 12.345119996613247,\n 12.610063955123938, 12.878295467455942, 13.149826086772048,\n 13.42466730586372, 13.702830557985108, 13.984327217668513,\n 14.269168601521828, 14.55736596900856, 14.848930523210871,\n 15.143873411576273, 15.44220572664832, 15.743938506781891,\n 16.04908273684337, 16.35764934889634, 16.66964922287304,\n 16.985093187232053, 17.30399201960269, 17.62635644741625,\n 17.95219714852476, 18.281524751807332, 18.614349837764564,\n 18.95068293910138, 19.290534541298456, 19.633915083172692,\n 19.98083495742689, 20.331304511189067, 20.685334046541502,\n 21.042933821039977, 21.404114048223256, 21.76888489811322,\n 22.137256497705877, 22.50923893145328, 22.884842241736916,\n 23.264076429332462, 23.6469514538663, 24.033477234264016,\n 24.42366364919083, 24.817520537484558, 25.21505769858089,\n 25.61628489293138, 26.021211842414342, 26.429848230738664,\n 26.842203703840827, 27.258287870275353, 27.678110301598522,\n 28.10168053274597, 28.529008062403893, 28.96010235337422,\n 29.39497283293396, 29.83362889318845, 30.276079891419332,\n 30.722335150426627, 31.172403958865512, 31.62629557157785,\n 32.08401920991837, 32.54558406207592, 33.010999283389665,\n 33.4802739966603, 33.953417292456834, 34.430438229418264,\n 34.911345834551085, 35.39614910352207, 35.88485700094671,\n 36.37747846067349, 36.87402238606382, 37.37449765026789,\n 37.87891309649659, 38.38727753828926, 38.89959975977785,\n 39.41588851594697, 39.93615253289054, 40.460400508064545,\n 40.98864111053629, 41.520882981230194, 42.05713473317016,\n 42.597404951718396, 43.141702194811224, 43.6900349931913,\n 44.24241185063697, 44.798841244188324, 45.35933162437017,\n 45.92389141541209, 46.49252901546552, 47.065252796817916,\n 47.64207110610409, 48.22299226451468, 48.808024568002054,\n 49.3971762874833, 49.9904556690408, 50.587870934119984,\n 51.189430279724725, 51.79514187861014, 52.40501387947288,\n 53.0190544071392, 53.637271562750364, 54.259673423945976,\n 54.88626804504493, 55.517063457223934, 56.15206766869424,\n 56.79128866487574, 57.43473440856916, 58.08241284012621,\n 58.734331877617365, 59.39049941699807, 60.05092333227251,\n 60.715611475655585, 61.38457167773311, 62.057811747619894,\n 62.7353394731159, 63.417162620860914, 64.10328893648692,\n 64.79372614476921, 65.48848194977529, 66.18756403501224,\n 66.89098006357258, 67.59873767827808, 68.31084450182222,\n 69.02730813691093, 69.74813616640164, 70.47333615344107,\n 71.20291564160104, 71.93688215501312, 72.67524319850172,\n 73.41800625771542, 74.16517879925733, 74.9167682708136,\n 75.67278210128072, 76.43322770089146, 77.1981124613393,\n 77.96744375590167, 78.74122893956174, 79.51947534912904,\n 80.30219030335869, 81.08938110306934, 81.88105503125999,\n 82.67721935322541, 83.4778813166706, 84.28304815182372,\n 85.09272707154808, 85.90692527145302, 86.72564993000343,\n 87.54890820862819, 88.3767072518277, 89.2090541872801,\n 90.04595612594655, 90.88742016217518, 91.73345337380438,\n 92.58406282226491, 93.43925555268066, 94.29903859396902,\n 95.16341895893969, 96.03240364439274, 96.9059996312159,\n 97.78421388448044, 98.6670533535366, 99.55452497210776,\n];\n//# sourceMappingURL=hct_solver.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A color system built using CAM16 hue and chroma, and L* from\n * L*a*b*.\n *\n * Using L* creates a link between the color system, contrast, and thus\n * accessibility. Contrast ratio depends on relative luminance, or Y in the XYZ\n * color space. L*, or perceptual luminance can be calculated from Y.\n *\n * Unlike Y, L* is linear to human perception, allowing trivial creation of\n * accurate color tones.\n *\n * Unlike contrast ratio, measuring contrast in L* is linear, and simple to\n * calculate. A difference of 40 in HCT tone guarantees a contrast ratio >= 3.0,\n * and a difference of 50 guarantees a contrast ratio >= 4.5.\n */\nimport * as utils from '../utils/color_utils.js';\nimport { Cam16 } from './cam16.js';\nimport { HctSolver } from './hct_solver.js';\nimport { ViewingConditions } from './viewing_conditions.js';\n/**\n * HCT, hue, chroma, and tone. A color system that provides a perceptually\n * accurate color measurement system that can also accurately render what colors\n * will appear as in different lighting environments.\n */\nexport class Hct {\n static from(hue, chroma, tone) {\n return new Hct(HctSolver.solveToInt(hue, chroma, tone));\n }\n /**\n * @param argb ARGB representation of a color.\n * @return HCT representation of a color in default viewing conditions\n */\n static fromInt(argb) {\n return new Hct(argb);\n }\n toInt() {\n return this.argb;\n }\n /**\n * A number, in degrees, representing ex. red, orange, yellow, etc.\n * Ranges from 0 <= hue < 360.\n */\n get hue() {\n return this.internalHue;\n }\n /**\n * @param newHue 0 <= newHue < 360; invalid values are corrected.\n * Chroma may decrease because chroma has a different maximum for any given\n * hue and tone.\n */\n set hue(newHue) {\n this.setInternalState(HctSolver.solveToInt(newHue, this.internalChroma, this.internalTone));\n }\n get chroma() {\n return this.internalChroma;\n }\n /**\n * @param newChroma 0 <= newChroma < ?\n * Chroma may decrease because chroma has a different maximum for any given\n * hue and tone.\n */\n set chroma(newChroma) {\n this.setInternalState(HctSolver.solveToInt(this.internalHue, newChroma, this.internalTone));\n }\n /** Lightness. Ranges from 0 to 100. */\n get tone() {\n return this.internalTone;\n }\n /**\n * @param newTone 0 <= newTone <= 100; invalid valids are corrected.\n * Chroma may decrease because chroma has a different maximum for any given\n * hue and tone.\n */\n set tone(newTone) {\n this.setInternalState(HctSolver.solveToInt(this.internalHue, this.internalChroma, newTone));\n }\n /** Sets a property of the Hct object. */\n setValue(propertyName, value) {\n this[propertyName] = value;\n }\n toString() {\n return `HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`;\n }\n static isBlue(hue) {\n return hue >= 250 && hue < 270;\n }\n static isYellow(hue) {\n return hue >= 105 && hue < 125;\n }\n static isCyan(hue) {\n return hue >= 170 && hue < 207;\n }\n constructor(argb) {\n this.argb = argb;\n const cam = Cam16.fromInt(argb);\n this.internalHue = cam.hue;\n this.internalChroma = cam.chroma;\n this.internalTone = utils.lstarFromArgb(argb);\n this.argb = argb;\n }\n setInternalState(argb) {\n const cam = Cam16.fromInt(argb);\n this.internalHue = cam.hue;\n this.internalChroma = cam.chroma;\n this.internalTone = utils.lstarFromArgb(argb);\n this.argb = argb;\n }\n /**\n * Translates a color into different [ViewingConditions].\n *\n * Colors change appearance. They look different with lights on versus off,\n * the same color, as in hex code, on white looks different when on black.\n * This is called color relativity, most famously explicated by Josef Albers\n * in Interaction of Color.\n *\n * In color science, color appearance models can account for this and\n * calculate the appearance of a color in different settings. HCT is based on\n * CAM16, a color appearance model, and uses it to make these calculations.\n *\n * See [ViewingConditions.make] for parameters affecting color appearance.\n */\n inViewingConditions(vc) {\n // 1. Use CAM16 to find XYZ coordinates of color in specified VC.\n const cam = Cam16.fromInt(this.toInt());\n const viewedInVc = cam.xyzInViewingConditions(vc);\n // 2. Create CAM16 of those XYZ coordinates in default VC.\n const recastInVc = Cam16.fromXyzInViewingConditions(viewedInVc[0], viewedInVc[1], viewedInVc[2], ViewingConditions.make());\n // 3. Create HCT from:\n // - CAM16 using default VC with XYZ coordinates in specified VC.\n // - L* converted from Y in XYZ coordinates in specified VC.\n const recastHct = Hct.from(recastInVc.hue, recastInVc.chroma, utils.lstarFromY(viewedInVc[1]));\n return recastHct;\n }\n}\n//# sourceMappingURL=hct.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This file is automatically generated. Do not modify it.\nimport { Cam16 } from '../hct/cam16.js';\nimport { Hct } from '../hct/hct.js';\nimport * as colorUtils from '../utils/color_utils.js';\nimport * as mathUtils from '../utils/math_utils.js';\n// material_color_utilities is designed to have a consistent API across\n// platforms and modular components that can be moved around easily. Using a\n// class as a namespace facilitates this.\n//\n// tslint:disable:class-as-namespace\n/**\n * Functions for blending in HCT and CAM16.\n */\nexport class Blend {\n /**\n * Blend the design color's HCT hue towards the key color's HCT\n * hue, in a way that leaves the original color recognizable and\n * recognizably shifted towards the key color.\n *\n * @param designColor ARGB representation of an arbitrary color.\n * @param sourceColor ARGB representation of the main theme color.\n * @return The design color with a hue shifted towards the\n * system's color, a slightly warmer/cooler variant of the design\n * color's hue.\n */\n static harmonize(designColor, sourceColor) {\n const fromHct = Hct.fromInt(designColor);\n const toHct = Hct.fromInt(sourceColor);\n const differenceDegrees = mathUtils.differenceDegrees(fromHct.hue, toHct.hue);\n const rotationDegrees = Math.min(differenceDegrees * 0.5, 15.0);\n const outputHue = mathUtils.sanitizeDegreesDouble(fromHct.hue +\n rotationDegrees * mathUtils.rotationDirection(fromHct.hue, toHct.hue));\n return Hct.from(outputHue, fromHct.chroma, fromHct.tone).toInt();\n }\n /**\n * Blends hue from one color into another. The chroma and tone of\n * the original color are maintained.\n *\n * @param from ARGB representation of color\n * @param to ARGB representation of color\n * @param amount how much blending to perform; 0.0 >= and <= 1.0\n * @return from, with a hue blended towards to. Chroma and tone\n * are constant.\n */\n static hctHue(from, to, amount) {\n const ucs = Blend.cam16Ucs(from, to, amount);\n const ucsCam = Cam16.fromInt(ucs);\n const fromCam = Cam16.fromInt(from);\n const blended = Hct.from(ucsCam.hue, fromCam.chroma, colorUtils.lstarFromArgb(from));\n return blended.toInt();\n }\n /**\n * Blend in CAM16-UCS space.\n *\n * @param from ARGB representation of color\n * @param to ARGB representation of color\n * @param amount how much blending to perform; 0.0 >= and <= 1.0\n * @return from, blended towards to. Hue, chroma, and tone will\n * change.\n */\n static cam16Ucs(from, to, amount) {\n const fromCam = Cam16.fromInt(from);\n const toCam = Cam16.fromInt(to);\n const fromJ = fromCam.jstar;\n const fromA = fromCam.astar;\n const fromB = fromCam.bstar;\n const toJ = toCam.jstar;\n const toA = toCam.astar;\n const toB = toCam.bstar;\n const jstar = fromJ + (toJ - fromJ) * amount;\n const astar = fromA + (toA - fromA) * amount;\n const bstar = fromB + (toB - fromB) * amount;\n return Cam16.fromUcs(jstar, astar, bstar).toInt();\n }\n}\n//# sourceMappingURL=blend.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// material_color_utilities is designed to have a consistent API across\n// platforms and modular components that can be moved around easily. Using a\n// class as a namespace facilitates this.\n//\n// tslint:disable:class-as-namespace\nimport * as utils from '../utils/color_utils.js';\nimport * as math from '../utils/math_utils.js';\n/**\n * Utility methods for calculating contrast given two colors, or calculating a\n * color given one color and a contrast ratio.\n *\n * Contrast ratio is calculated using XYZ's Y. When linearized to match human\n * perception, Y becomes HCT's tone and L*a*b*'s' L*. Informally, this is the\n * lightness of a color.\n *\n * Methods refer to tone, T in the the HCT color space.\n * Tone is equivalent to L* in the L*a*b* color space, or L in the LCH color\n * space.\n */\nexport class Contrast {\n /**\n * Returns a contrast ratio, which ranges from 1 to 21.\n *\n * @param toneA Tone between 0 and 100. Values outside will be clamped.\n * @param toneB Tone between 0 and 100. Values outside will be clamped.\n */\n static ratioOfTones(toneA, toneB) {\n toneA = math.clampDouble(0.0, 100.0, toneA);\n toneB = math.clampDouble(0.0, 100.0, toneB);\n return Contrast.ratioOfYs(utils.yFromLstar(toneA), utils.yFromLstar(toneB));\n }\n static ratioOfYs(y1, y2) {\n const lighter = y1 > y2 ? y1 : y2;\n const darker = (lighter === y2) ? y1 : y2;\n return (lighter + 5.0) / (darker + 5.0);\n }\n /**\n * Returns a tone >= tone parameter that ensures ratio parameter.\n * Return value is between 0 and 100.\n * Returns -1 if ratio cannot be achieved with tone parameter.\n *\n * @param tone Tone return value must contrast with.\n * Range is 0 to 100. Invalid values will result in -1 being returned.\n * @param ratio Contrast ratio of return value and tone.\n * Range is 1 to 21, invalid values have undefined behavior.\n */\n static lighter(tone, ratio) {\n if (tone < 0.0 || tone > 100.0) {\n return -1.0;\n }\n const darkY = utils.yFromLstar(tone);\n const lightY = ratio * (darkY + 5.0) - 5.0;\n const realContrast = Contrast.ratioOfYs(lightY, darkY);\n const delta = Math.abs(realContrast - ratio);\n if (realContrast < ratio && delta > 0.04) {\n return -1;\n }\n // Ensure gamut mapping, which requires a 'range' on tone, will still result\n // the correct ratio by darkening slightly.\n const returnValue = utils.lstarFromY(lightY) + 0.4;\n if (returnValue < 0 || returnValue > 100) {\n return -1;\n }\n return returnValue;\n }\n /**\n * Returns a tone <= tone parameter that ensures ratio parameter.\n * Return value is between 0 and 100.\n * Returns -1 if ratio cannot be achieved with tone parameter.\n *\n * @param tone Tone return value must contrast with.\n * Range is 0 to 100. Invalid values will result in -1 being returned.\n * @param ratio Contrast ratio of return value and tone.\n * Range is 1 to 21, invalid values have undefined behavior.\n */\n static darker(tone, ratio) {\n if (tone < 0.0 || tone > 100.0) {\n return -1.0;\n }\n const lightY = utils.yFromLstar(tone);\n const darkY = ((lightY + 5.0) / ratio) - 5.0;\n const realContrast = Contrast.ratioOfYs(lightY, darkY);\n const delta = Math.abs(realContrast - ratio);\n if (realContrast < ratio && delta > 0.04) {\n return -1;\n }\n // Ensure gamut mapping, which requires a 'range' on tone, will still result\n // the correct ratio by darkening slightly.\n const returnValue = utils.lstarFromY(darkY) - 0.4;\n if (returnValue < 0 || returnValue > 100) {\n return -1;\n }\n return returnValue;\n }\n /**\n * Returns a tone >= tone parameter that ensures ratio parameter.\n * Return value is between 0 and 100.\n * Returns 100 if ratio cannot be achieved with tone parameter.\n *\n * This method is unsafe because the returned value is guaranteed to be in\n * bounds for tone, i.e. between 0 and 100. However, that value may not reach\n * the ratio with tone. For example, there is no color lighter than T100.\n *\n * @param tone Tone return value must contrast with.\n * Range is 0 to 100. Invalid values will result in 100 being returned.\n * @param ratio Desired contrast ratio of return value and tone parameter.\n * Range is 1 to 21, invalid values have undefined behavior.\n */\n static lighterUnsafe(tone, ratio) {\n const lighterSafe = Contrast.lighter(tone, ratio);\n return (lighterSafe < 0.0) ? 100.0 : lighterSafe;\n }\n /**\n * Returns a tone >= tone parameter that ensures ratio parameter.\n * Return value is between 0 and 100.\n * Returns 100 if ratio cannot be achieved with tone parameter.\n *\n * This method is unsafe because the returned value is guaranteed to be in\n * bounds for tone, i.e. between 0 and 100. However, that value may not reach\n * the [ratio with [tone]. For example, there is no color darker than T0.\n *\n * @param tone Tone return value must contrast with.\n * Range is 0 to 100. Invalid values will result in 0 being returned.\n * @param ratio Desired contrast ratio of return value and tone parameter.\n * Range is 1 to 21, invalid values have undefined behavior.\n */\n static darkerUnsafe(tone, ratio) {\n const darkerSafe = Contrast.darker(tone, ratio);\n return (darkerSafe < 0.0) ? 0.0 : darkerSafe;\n }\n}\n//# sourceMappingURL=contrast.js.map","/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct.js';\n// material_color_utilities is designed to have a consistent API across\n// platforms and modular components that can be moved around easily. Using a\n// class as a namespace facilitates this.\n//\n// tslint:disable:class-as-namespace\n/**\n * Check and/or fix universally disliked colors.\n * Color science studies of color preference indicate universal distaste for\n * dark yellow-greens, and also show this is correlated to distate for\n * biological waste and rotting food.\n *\n * See Palmer and Schloss, 2010 or Schloss and Palmer's Chapter 21 in Handbook\n * of Color Psychology (2015).\n */\nexport class DislikeAnalyzer {\n /**\n * Returns true if a color is disliked.\n *\n * @param hct A color to be judged.\n * @return Whether the color is disliked.\n *\n * Disliked is defined as a dark yellow-green that is not neutral.\n */\n static isDisliked(hct) {\n const huePasses = Math.round(hct.hue) >= 90.0 && Math.round(hct.hue) <= 111.0;\n const chromaPasses = Math.round(hct.chroma) > 16.0;\n const tonePasses = Math.round(hct.tone) < 65.0;\n return huePasses && chromaPasses && tonePasses;\n }\n /**\n * If a color is disliked, lighten it to make it likable.\n *\n * @param hct A color to be judged.\n * @return A new color if the original color is disliked, or the original\n * color if it is acceptable.\n */\n static fixIfDisliked(hct) {\n if (DislikeAnalyzer.isDisliked(hct)) {\n return Hct.from(hct.hue, hct.chroma, 70.0);\n }\n return hct;\n }\n}\n//# sourceMappingURL=dislike_analyzer.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Contrast } from '../contrast/contrast.js';\nimport { Hct } from '../hct/hct.js';\nimport * as math from '../utils/math_utils.js';\nfunction validateExtendedColor(originalColor, specVersion, extendedColor) {\n if (originalColor.name !== extendedColor.name) {\n throw new Error(`Attempting to extend color ${originalColor.name} with color ${extendedColor.name} of different name for spec version ${specVersion}.`);\n }\n if (originalColor.isBackground !== extendedColor.isBackground) {\n throw new Error(`Attempting to extend color ${originalColor.name} as a ${(originalColor.isBackground ?\n 'background' :\n 'foreground')} with color ${extendedColor.name} as a ${(extendedColor.isBackground ?\n 'background' :\n 'foreground')} for spec version ${specVersion}.`);\n }\n}\n/**\n * Returns a new DynamicColor that is the same as the original color, but with\n * the extended dynamic color's constraints for the given spec version.\n *\n * @param originlColor The original color.\n * @param specVersion The spec version to extend.\n * @param extendedColor The color with the values to extend.\n */\nexport function extendSpecVersion(originlColor, specVersion, extendedColor) {\n validateExtendedColor(originlColor, specVersion, extendedColor);\n return DynamicColor.fromPalette({\n name: originlColor.name,\n palette: (s) => s.specVersion === specVersion ? extendedColor.palette(s) :\n originlColor.palette(s),\n tone: (s) => s.specVersion === specVersion ? extendedColor.tone(s) :\n originlColor.tone(s),\n isBackground: originlColor.isBackground,\n chromaMultiplier: (s) => {\n const chromaMultiplier = s.specVersion === specVersion ?\n extendedColor.chromaMultiplier :\n originlColor.chromaMultiplier;\n return chromaMultiplier !== undefined ? chromaMultiplier(s) : 1;\n },\n background: (s) => {\n const background = s.specVersion === specVersion ?\n extendedColor.background :\n originlColor.background;\n return background !== undefined ? background(s) : undefined;\n },\n secondBackground: (s) => {\n const secondBackground = s.specVersion === specVersion ?\n extendedColor.secondBackground :\n originlColor.secondBackground;\n return secondBackground !== undefined ? secondBackground(s) : undefined;\n },\n contrastCurve: (s) => {\n const contrastCurve = s.specVersion === specVersion ?\n extendedColor.contrastCurve :\n originlColor.contrastCurve;\n return contrastCurve !== undefined ? contrastCurve(s) : undefined;\n },\n toneDeltaPair: (s) => {\n const toneDeltaPair = s.specVersion === specVersion ?\n extendedColor.toneDeltaPair :\n originlColor.toneDeltaPair;\n return toneDeltaPair !== undefined ? toneDeltaPair(s) : undefined;\n },\n });\n}\n/**\n * A color that adjusts itself based on UI state provided by DynamicScheme.\n *\n * Colors without backgrounds do not change tone when contrast changes. Colors\n * with backgrounds become closer to their background as contrast lowers, and\n * further when contrast increases.\n *\n * Prefer static constructors. They require either a hexcode, a palette and\n * tone, or a hue and chroma. Optionally, they can provide a background\n * DynamicColor.\n */\nexport class DynamicColor {\n /**\n * Create a DynamicColor defined by a TonalPalette and HCT tone.\n *\n * @param args Functions with DynamicScheme as input. Must provide a palette\n * and tone. May provide a background DynamicColor and ToneDeltaPair.\n */\n static fromPalette(args) {\n return new DynamicColor(args.name ?? '', args.palette, args.tone ?? DynamicColor.getInitialToneFromBackground(args.background), args.isBackground ?? false, args.chromaMultiplier, args.background, args.secondBackground, args.contrastCurve, args.toneDeltaPair);\n }\n static getInitialToneFromBackground(background) {\n if (background === undefined) {\n return (s) => 50;\n }\n return (s) => background(s) ? background(s).getTone(s) : 50;\n }\n /**\n * The base constructor for DynamicColor.\n *\n * _Strongly_ prefer using one of the convenience constructors. This class is\n * arguably too flexible to ensure it can support any scenario. Functional\n * arguments allow overriding without risks that come with subclasses.\n *\n * For example, the default behavior of adjust tone at max contrast\n * to be at a 7.0 ratio with its background is principled and\n * matches accessibility guidance. That does not mean it's the desired\n * approach for _every_ design system, and every color pairing,\n * always, in every case.\n *\n * @param name The name of the dynamic color. Defaults to empty.\n * @param palette Function that provides a TonalPalette given DynamicScheme. A\n * TonalPalette is defined by a hue and chroma, so this replaces the need\n * to specify hue/chroma. By providing a tonal palette, when contrast\n * adjustments are made, intended chroma can be preserved.\n * @param tone Function that provides a tone, given a DynamicScheme.\n * @param isBackground Whether this dynamic color is a background, with some\n * other color as the foreground. Defaults to false.\n * @param chromaMultiplier A factor that multiplies the chroma for this color.\n * @param background The background of the dynamic color (as a function of a\n * `DynamicScheme`), if it exists.\n * @param secondBackground A second background of the dynamic color (as a\n * function of a `DynamicScheme`), if it exists.\n * @param contrastCurve A `ContrastCurve` object specifying how its contrast\n * against its background should behave in various contrast levels\n * options.\n * @param toneDeltaPair A `ToneDeltaPair` object specifying a tone delta\n * constraint between two colors. One of them must be the color being\n * constructed.\n */\n constructor(name, palette, tone, isBackground, chromaMultiplier, background, secondBackground, contrastCurve, toneDeltaPair) {\n this.name = name;\n this.palette = palette;\n this.tone = tone;\n this.isBackground = isBackground;\n this.chromaMultiplier = chromaMultiplier;\n this.background = background;\n this.secondBackground = secondBackground;\n this.contrastCurve = contrastCurve;\n this.toneDeltaPair = toneDeltaPair;\n this.hctCache = new Map();\n if ((!background) && secondBackground) {\n throw new Error(`Color ${name} has secondBackground` +\n `defined, but background is not defined.`);\n }\n if ((!background) && contrastCurve) {\n throw new Error(`Color ${name} has contrastCurve` +\n `defined, but background is not defined.`);\n }\n if (background && !contrastCurve) {\n throw new Error(`Color ${name} has background` +\n `defined, but contrastCurve is not defined.`);\n }\n }\n /**\n * Returns a deep copy of this DynamicColor.\n */\n clone() {\n return DynamicColor.fromPalette({\n name: this.name,\n palette: this.palette,\n tone: this.tone,\n isBackground: this.isBackground,\n chromaMultiplier: this.chromaMultiplier,\n background: this.background,\n secondBackground: this.secondBackground,\n contrastCurve: this.contrastCurve,\n toneDeltaPair: this.toneDeltaPair,\n });\n }\n /**\n * Clears the cache of HCT values for this color. For testing or debugging\n * purposes.\n */\n clearCache() {\n this.hctCache.clear();\n }\n /**\n * Returns a ARGB integer (i.e. a hex code).\n *\n * @param scheme Defines the conditions of the user interface, for example,\n * whether or not it is dark mode or light mode, and what the desired\n * contrast level is.\n */\n getArgb(scheme) {\n return this.getHct(scheme).toInt();\n }\n /**\n * Returns a color, expressed in the HCT color space, that this\n * DynamicColor is under the conditions in scheme.\n *\n * @param scheme Defines the conditions of the user interface, for example,\n * whether or not it is dark mode or light mode, and what the desired\n * contrast level is.\n */\n getHct(scheme) {\n const cachedAnswer = this.hctCache.get(scheme);\n if (cachedAnswer != null) {\n return cachedAnswer;\n }\n const answer = getSpec(scheme.specVersion).getHct(scheme, this);\n if (this.hctCache.size > 4) {\n this.hctCache.clear();\n }\n this.hctCache.set(scheme, answer);\n return answer;\n }\n /**\n * Returns a tone, T in the HCT color space, that this DynamicColor is under\n * the conditions in scheme.\n *\n * @param scheme Defines the conditions of the user interface, for example,\n * whether or not it is dark mode or light mode, and what the desired\n * contrast level is.\n */\n getTone(scheme) {\n return getSpec(scheme.specVersion).getTone(scheme, this);\n }\n /**\n * Given a background tone, finds a foreground tone, while ensuring they reach\n * a contrast ratio that is as close to [ratio] as possible.\n *\n * @param bgTone Tone in HCT. Range is 0 to 100, undefined behavior when it\n * falls outside that range.\n * @param ratio The contrast ratio desired between bgTone and the return\n * value.\n */\n static foregroundTone(bgTone, ratio) {\n const lighterTone = Contrast.lighterUnsafe(bgTone, ratio);\n const darkerTone = Contrast.darkerUnsafe(bgTone, ratio);\n const lighterRatio = Contrast.ratioOfTones(lighterTone, bgTone);\n const darkerRatio = Contrast.ratioOfTones(darkerTone, bgTone);\n const preferLighter = DynamicColor.tonePrefersLightForeground(bgTone);\n if (preferLighter) {\n // This handles an edge case where the initial contrast ratio is high\n // (ex. 13.0), and the ratio passed to the function is that high\n // ratio, and both the lighter and darker ratio fails to pass that\n // ratio.\n //\n // This was observed with Tonal Spot's On Primary Container turning\n // black momentarily between high and max contrast in light mode. PC's\n // standard tone was T90, OPC's was T10, it was light mode, and the\n // contrast value was 0.6568521221032331.\n const negligibleDifference = Math.abs(lighterRatio - darkerRatio) < 0.1 &&\n lighterRatio < ratio && darkerRatio < ratio;\n return lighterRatio >= ratio || lighterRatio >= darkerRatio ||\n negligibleDifference ?\n lighterTone :\n darkerTone;\n }\n else {\n return darkerRatio >= ratio || darkerRatio >= lighterRatio ? darkerTone :\n lighterTone;\n }\n }\n /**\n * Returns whether [tone] prefers a light foreground.\n *\n * People prefer white foregrounds on ~T60-70. Observed over time, and also\n * by Andrew Somers during research for APCA.\n *\n * T60 used as to create the smallest discontinuity possible when skipping\n * down to T49 in order to ensure light foregrounds.\n * Since `tertiaryContainer` in dark monochrome scheme requires a tone of\n * 60, it should not be adjusted. Therefore, 60 is excluded here.\n */\n static tonePrefersLightForeground(tone) {\n return Math.round(tone) < 60.0;\n }\n /**\n * Returns whether [tone] can reach a contrast ratio of 4.5 with a lighter\n * color.\n */\n static toneAllowsLightForeground(tone) {\n return Math.round(tone) <= 49.0;\n }\n /**\n * Adjusts a tone such that white has 4.5 contrast, if the tone is\n * reasonably close to supporting it.\n */\n static enableLightForeground(tone) {\n if (DynamicColor.tonePrefersLightForeground(tone) &&\n !DynamicColor.toneAllowsLightForeground(tone)) {\n return 49.0;\n }\n return tone;\n }\n}\n/**\n * A delegate for the color calculation of a DynamicScheme in the 2021 spec.\n */\nclass ColorCalculationDelegateImpl2021 {\n getHct(scheme, color) {\n const tone = color.getTone(scheme);\n const palette = color.palette(scheme);\n return palette.getHct(tone);\n }\n getTone(scheme, color) {\n const decreasingContrast = scheme.contrastLevel < 0;\n const toneDeltaPair = color.toneDeltaPair ? color.toneDeltaPair(scheme) : undefined;\n // Case 1: dual foreground, pair of colors with delta constraint.\n if (toneDeltaPair) {\n const roleA = toneDeltaPair.roleA;\n const roleB = toneDeltaPair.roleB;\n const delta = toneDeltaPair.delta;\n const polarity = toneDeltaPair.polarity;\n const stayTogether = toneDeltaPair.stayTogether;\n const aIsNearer = (polarity === 'nearer' ||\n (polarity === 'lighter' && !scheme.isDark) ||\n (polarity === 'darker' && scheme.isDark));\n const nearer = aIsNearer ? roleA : roleB;\n const farther = aIsNearer ? roleB : roleA;\n const amNearer = color.name === nearer.name;\n const expansionDir = scheme.isDark ? 1 : -1;\n let nTone = nearer.tone(scheme);\n let fTone = farther.tone(scheme);\n // 1st round: solve to min for each, if background and contrast curve\n // are defined.\n if (color.background && nearer.contrastCurve && farther.contrastCurve) {\n const bg = color.background(scheme);\n const nContrastCurve = nearer.contrastCurve(scheme);\n const fContrastCurve = farther.contrastCurve(scheme);\n if (bg && nContrastCurve && fContrastCurve) {\n const bgTone = bg.getTone(scheme);\n const nContrast = nContrastCurve.get(scheme.contrastLevel);\n const fContrast = fContrastCurve.get(scheme.contrastLevel);\n // If a color is good enough, it is not adjusted.\n // Initial and adjusted tones for `nearer`\n if (Contrast.ratioOfTones(bgTone, nTone) < nContrast) {\n nTone = DynamicColor.foregroundTone(bgTone, nContrast);\n }\n // Initial and adjusted tones for `farther`\n if (Contrast.ratioOfTones(bgTone, fTone) < fContrast) {\n fTone = DynamicColor.foregroundTone(bgTone, fContrast);\n }\n if (decreasingContrast) {\n // If decreasing contrast, adjust color to the \"bare minimum\"\n // that satisfies contrast.\n nTone = DynamicColor.foregroundTone(bgTone, nContrast);\n fTone = DynamicColor.foregroundTone(bgTone, fContrast);\n }\n }\n }\n if ((fTone - nTone) * expansionDir < delta) {\n // 2nd round: expand farther to match delta, if contrast is not\n // satisfied.\n fTone = math.clampDouble(0, 100, nTone + delta * expansionDir);\n if ((fTone - nTone) * expansionDir >= delta) {\n // Good! Tones now satisfy the constraint; no change needed.\n }\n else {\n // 3rd round: contract nearer to match delta.\n nTone = math.clampDouble(0, 100, fTone - delta * expansionDir);\n }\n }\n // Avoids the 50-59 awkward zone.\n if (50 <= nTone && nTone < 60) {\n // If `nearer` is in the awkward zone, move it away, together with\n // `farther`.\n if (expansionDir > 0) {\n nTone = 60;\n fTone = Math.max(fTone, nTone + delta * expansionDir);\n }\n else {\n nTone = 49;\n fTone = Math.min(fTone, nTone + delta * expansionDir);\n }\n }\n else if (50 <= fTone && fTone < 60) {\n if (stayTogether) {\n // Fixes both, to avoid two colors on opposite sides of the \"awkward\n // zone\".\n if (expansionDir > 0) {\n nTone = 60;\n fTone = Math.max(fTone, nTone + delta * expansionDir);\n }\n else {\n nTone = 49;\n fTone = Math.min(fTone, nTone + delta * expansionDir);\n }\n }\n else {\n // Not required to stay together; fixes just one.\n if (expansionDir > 0) {\n fTone = 60;\n }\n else {\n fTone = 49;\n }\n }\n }\n // Returns `nTone` if this color is `nearer`, otherwise `fTone`.\n return amNearer ? nTone : fTone;\n }\n else {\n // Case 2: No contrast pair; just solve for itself.\n let answer = color.tone(scheme);\n if (color.background == undefined ||\n color.background(scheme) === undefined ||\n color.contrastCurve == undefined ||\n color.contrastCurve(scheme) === undefined) {\n return answer; // No adjustment for colors with no background.\n }\n const bgTone = color.background(scheme).getTone(scheme);\n const desiredRatio = color.contrastCurve(scheme).get(scheme.contrastLevel);\n if (Contrast.ratioOfTones(bgTone, answer) >= desiredRatio) {\n // Don't \"improve\" what's good enough.\n }\n else {\n // Rough improvement.\n answer = DynamicColor.foregroundTone(bgTone, desiredRatio);\n }\n if (decreasingContrast) {\n answer = DynamicColor.foregroundTone(bgTone, desiredRatio);\n }\n if (color.isBackground && 50 <= answer && answer < 60) {\n // Must adjust\n if (Contrast.ratioOfTones(49, bgTone) >= desiredRatio) {\n answer = 49;\n }\n else {\n answer = 60;\n }\n }\n if (color.secondBackground == undefined ||\n color.secondBackground(scheme) === undefined) {\n return answer;\n }\n // Case 3: Adjust for dual backgrounds.\n const [bg1, bg2] = [color.background, color.secondBackground];\n const [bgTone1, bgTone2] = [bg1(scheme).getTone(scheme), bg2(scheme).getTone(scheme)];\n const [upper, lower] = [Math.max(bgTone1, bgTone2), Math.min(bgTone1, bgTone2)];\n if (Contrast.ratioOfTones(upper, answer) >= desiredRatio &&\n Contrast.ratioOfTones(lower, answer) >= desiredRatio) {\n return answer;\n }\n // The darkest light tone that satisfies the desired ratio,\n // or -1 if such ratio cannot be reached.\n const lightOption = Contrast.lighter(upper, desiredRatio);\n // The lightest dark tone that satisfies the desired ratio,\n // or -1 if such ratio cannot be reached.\n const darkOption = Contrast.darker(lower, desiredRatio);\n // Tones suitable for the foreground.\n const availables = [];\n if (lightOption !== -1)\n availables.push(lightOption);\n if (darkOption !== -1)\n availables.push(darkOption);\n const prefersLight = DynamicColor.tonePrefersLightForeground(bgTone1) ||\n DynamicColor.tonePrefersLightForeground(bgTone2);\n if (prefersLight) {\n return (lightOption < 0) ? 100 : lightOption;\n }\n if (availables.length === 1) {\n return availables[0];\n }\n return (darkOption < 0) ? 0 : darkOption;\n }\n }\n}\n/**\n * A delegate for the color calculation of a DynamicScheme in the 2025 spec.\n */\nclass ColorCalculationDelegateImpl2025 {\n getHct(scheme, color) {\n const palette = color.palette(scheme);\n const tone = color.getTone(scheme);\n const hue = palette.hue;\n const chroma = palette.chroma *\n (color.chromaMultiplier ? color.chromaMultiplier(scheme) : 1);\n return Hct.from(hue, chroma, tone);\n }\n getTone(scheme, color) {\n const toneDeltaPair = color.toneDeltaPair ? color.toneDeltaPair(scheme) : undefined;\n // Case 0: tone delta constraint.\n if (toneDeltaPair) {\n const roleA = toneDeltaPair.roleA;\n const roleB = toneDeltaPair.roleB;\n const polarity = toneDeltaPair.polarity;\n const constraint = toneDeltaPair.constraint;\n const absoluteDelta = polarity === 'darker' ||\n (polarity === 'relative_lighter' && scheme.isDark) ||\n (polarity === 'relative_darker' && !scheme.isDark) ?\n -toneDeltaPair.delta :\n toneDeltaPair.delta;\n const amRoleA = color.name === roleA.name;\n const selfRole = amRoleA ? roleA : roleB;\n const refRole = amRoleA ? roleB : roleA;\n let selfTone = selfRole.tone(scheme);\n let refTone = refRole.getTone(scheme);\n const relativeDelta = absoluteDelta * (amRoleA ? 1 : -1);\n if (constraint === 'exact') {\n selfTone = math.clampDouble(0, 100, refTone + relativeDelta);\n }\n else if (constraint === 'nearer') {\n if (relativeDelta > 0) {\n selfTone = math.clampDouble(0, 100, math.clampDouble(refTone, refTone + relativeDelta, selfTone));\n }\n else {\n selfTone = math.clampDouble(0, 100, math.clampDouble(refTone + relativeDelta, refTone, selfTone));\n }\n }\n else if (constraint === 'farther') {\n if (relativeDelta > 0) {\n selfTone = math.clampDouble(refTone + relativeDelta, 100, selfTone);\n }\n else {\n selfTone = math.clampDouble(0, refTone + relativeDelta, selfTone);\n }\n }\n if (color.background && color.contrastCurve) {\n const background = color.background(scheme);\n const contrastCurve = color.contrastCurve(scheme);\n if (background && contrastCurve) {\n // Adjust the tones for contrast, if background and contrast curve\n // are defined.\n const bgTone = background.getTone(scheme);\n const selfContrast = contrastCurve.get(scheme.contrastLevel);\n selfTone = Contrast.ratioOfTones(bgTone, selfTone) >= selfContrast &&\n scheme.contrastLevel >= 0 ?\n selfTone :\n DynamicColor.foregroundTone(bgTone, selfContrast);\n }\n }\n // This can avoid the awkward tones for background colors including the\n // access fixed colors. Accent fixed dim colors should not be adjusted.\n if (color.isBackground && !color.name.endsWith('_fixed_dim')) {\n if (selfTone >= 57) {\n selfTone = math.clampDouble(65, 100, selfTone);\n }\n else {\n selfTone = math.clampDouble(0, 49, selfTone);\n }\n }\n return selfTone;\n }\n else {\n // Case 1: No tone delta pair; just solve for itself.\n let answer = color.tone(scheme);\n if (color.background == undefined ||\n color.background(scheme) === undefined ||\n color.contrastCurve == undefined ||\n color.contrastCurve(scheme) === undefined) {\n return answer; // No adjustment for colors with no background.\n }\n const bgTone = color.background(scheme).getTone(scheme);\n const desiredRatio = color.contrastCurve(scheme).get(scheme.contrastLevel);\n // Recalculate the tone from desired contrast ratio if the current\n // contrast ratio is not enough or desired contrast level is decreasing\n // (<0).\n answer = Contrast.ratioOfTones(bgTone, answer) >= desiredRatio &&\n scheme.contrastLevel >= 0 ?\n answer :\n DynamicColor.foregroundTone(bgTone, desiredRatio);\n // This can avoid the awkward tones for background colors including the\n // access fixed colors. Accent fixed dim colors should not be adjusted.\n if (color.isBackground && !color.name.endsWith('_fixed_dim')) {\n if (answer >= 57) {\n answer = math.clampDouble(65, 100, answer);\n }\n else {\n answer = math.clampDouble(0, 49, answer);\n }\n }\n if (color.secondBackground == undefined ||\n color.secondBackground(scheme) === undefined) {\n return answer;\n }\n // Case 2: Adjust for dual backgrounds.\n const [bg1, bg2] = [color.background, color.secondBackground];\n const [bgTone1, bgTone2] = [bg1(scheme).getTone(scheme), bg2(scheme).getTone(scheme)];\n const [upper, lower] = [Math.max(bgTone1, bgTone2), Math.min(bgTone1, bgTone2)];\n if (Contrast.ratioOfTones(upper, answer) >= desiredRatio &&\n Contrast.ratioOfTones(lower, answer) >= desiredRatio) {\n return answer;\n }\n // The darkest light tone that satisfies the desired ratio,\n // or -1 if such ratio cannot be reached.\n const lightOption = Contrast.lighter(upper, desiredRatio);\n // The lightest dark tone that satisfies the desired ratio,\n // or -1 if such ratio cannot be reached.\n const darkOption = Contrast.darker(lower, desiredRatio);\n // Tones suitable for the foreground.\n const availables = [];\n if (lightOption !== -1)\n availables.push(lightOption);\n if (darkOption !== -1)\n availables.push(darkOption);\n const prefersLight = DynamicColor.tonePrefersLightForeground(bgTone1) ||\n DynamicColor.tonePrefersLightForeground(bgTone2);\n if (prefersLight) {\n return (lightOption < 0) ? 100 : lightOption;\n }\n if (availables.length === 1) {\n return availables[0];\n }\n return (darkOption < 0) ? 0 : darkOption;\n }\n }\n}\nconst spec2021 = new ColorCalculationDelegateImpl2021();\nconst spec2025 = new ColorCalculationDelegateImpl2025();\n/**\n * Returns the ColorCalculationDelegate for the given spec version.\n */\nfunction getSpec(specVersion) {\n return specVersion === '2025' ? spec2025 : spec2021;\n}\n//# sourceMappingURL=dynamic_color.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct.js';\n/**\n * A convenience class for retrieving colors that are constant in hue and\n * chroma, but vary in tone.\n */\nexport class TonalPalette {\n /**\n * @param argb ARGB representation of a color\n * @return Tones matching that color's hue and chroma.\n */\n static fromInt(argb) {\n const hct = Hct.fromInt(argb);\n return TonalPalette.fromHct(hct);\n }\n /**\n * @param hct Hct\n * @return Tones matching that color's hue and chroma.\n */\n static fromHct(hct) {\n return new TonalPalette(hct.hue, hct.chroma, hct);\n }\n /**\n * @param hue HCT hue\n * @param chroma HCT chroma\n * @return Tones matching hue and chroma.\n */\n static fromHueAndChroma(hue, chroma) {\n const keyColor = new KeyColor(hue, chroma).create();\n return new TonalPalette(hue, chroma, keyColor);\n }\n constructor(hue, chroma, keyColor) {\n this.hue = hue;\n this.chroma = chroma;\n this.keyColor = keyColor;\n this.cache = new Map();\n }\n /**\n * @param tone HCT tone, measured from 0 to 100.\n * @return ARGB representation of a color with that tone.\n */\n tone(tone) {\n let argb = this.cache.get(tone);\n if (argb === undefined) {\n if (tone == 99 && Hct.isYellow(this.hue)) {\n argb = this.averageArgb(this.tone(98), this.tone(100));\n }\n else {\n argb = Hct.from(this.hue, this.chroma, tone).toInt();\n }\n this.cache.set(tone, argb);\n }\n return argb;\n }\n /**\n * @param tone HCT tone.\n * @return HCT representation of a color with that tone.\n */\n getHct(tone) {\n return Hct.fromInt(this.tone(tone));\n }\n averageArgb(argb1, argb2) {\n const red1 = (argb1 >>> 16) & 0xff;\n const green1 = (argb1 >>> 8) & 0xff;\n const blue1 = argb1 & 0xff;\n const red2 = (argb2 >>> 16) & 0xff;\n const green2 = (argb2 >>> 8) & 0xff;\n const blue2 = argb2 & 0xff;\n const red = Math.round((red1 + red2) / 2);\n const green = Math.round((green1 + green2) / 2);\n const blue = Math.round((blue1 + blue2) / 2);\n return (255 << 24 | (red & 255) << 16 | (green & 255) << 8 |\n (blue & 255)) >>>\n 0;\n }\n}\n/**\n * Key color is a color that represents the hue and chroma of a tonal palette\n */\nclass KeyColor {\n constructor(hue, requestedChroma) {\n this.hue = hue;\n this.requestedChroma = requestedChroma;\n // Cache that maps tone to max chroma to avoid duplicated HCT calculation.\n this.chromaCache = new Map();\n this.maxChromaValue = 200.0;\n }\n /**\n * Creates a key color from a [hue] and a [chroma].\n * The key color is the first tone, starting from T50, matching the given hue\n * and chroma.\n *\n * @return Key color [Hct]\n */\n create() {\n // Pivot around T50 because T50 has the most chroma available, on\n // average. Thus it is most likely to have a direct answer.\n const pivotTone = 50;\n const toneStepSize = 1;\n // Epsilon to accept values slightly higher than the requested chroma.\n const epsilon = 0.01;\n // Binary search to find the tone that can provide a chroma that is closest\n // to the requested chroma.\n let lowerTone = 0;\n let upperTone = 100;\n while (lowerTone < upperTone) {\n const midTone = Math.floor((lowerTone + upperTone) / 2);\n const isAscending = this.maxChroma(midTone) < this.maxChroma(midTone + toneStepSize);\n const sufficientChroma = this.maxChroma(midTone) >= this.requestedChroma - epsilon;\n if (sufficientChroma) {\n // Either range [lowerTone, midTone] or [midTone, upperTone] has\n // the answer, so search in the range that is closer the pivot tone.\n if (Math.abs(lowerTone - pivotTone) < Math.abs(upperTone - pivotTone)) {\n upperTone = midTone;\n }\n else {\n if (lowerTone === midTone) {\n return Hct.from(this.hue, this.requestedChroma, lowerTone);\n }\n lowerTone = midTone;\n }\n }\n else {\n // As there is no sufficient chroma in the midTone, follow the direction\n // to the chroma peak.\n if (isAscending) {\n lowerTone = midTone + toneStepSize;\n }\n else {\n // Keep midTone for potential chroma peak.\n upperTone = midTone;\n }\n }\n }\n return Hct.from(this.hue, this.requestedChroma, lowerTone);\n }\n // Find the maximum chroma for a given tone\n maxChroma(tone) {\n if (this.chromaCache.has(tone)) {\n return this.chromaCache.get(tone);\n }\n const chroma = Hct.from(this.hue, this.maxChromaValue, tone).chroma;\n this.chromaCache.set(tone, chroma);\n return chroma;\n }\n}\n//# sourceMappingURL=tonal_palette.js.map","/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This file is automatically generated. Do not modify it.\nimport { Hct } from '../hct/hct.js';\nimport * as colorUtils from '../utils/color_utils.js';\nimport * as mathUtils from '../utils/math_utils.js';\n/**\n * Design utilities using color temperature theory.\n *\n * Analogous colors, complementary color, and cache to efficiently, lazily,\n * generate data for calculations when needed.\n */\nexport class TemperatureCache {\n constructor(input) {\n this.input = input;\n this.hctsByTempCache = [];\n this.hctsByHueCache = [];\n this.tempsByHctCache = new Map();\n this.inputRelativeTemperatureCache = -1.0;\n this.complementCache = null;\n }\n get hctsByTemp() {\n if (this.hctsByTempCache.length > 0) {\n return this.hctsByTempCache;\n }\n const hcts = this.hctsByHue.concat([this.input]);\n const temperaturesByHct = this.tempsByHct;\n hcts.sort((a, b) => temperaturesByHct.get(a) - temperaturesByHct.get(b));\n this.hctsByTempCache = hcts;\n return hcts;\n }\n get warmest() {\n return this.hctsByTemp[this.hctsByTemp.length - 1];\n }\n get coldest() {\n return this.hctsByTemp[0];\n }\n /**\n * A set of colors with differing hues, equidistant in temperature.\n *\n * In art, this is usually described as a set of 5 colors on a color wheel\n * divided into 12 sections. This method allows provision of either of those\n * values.\n *\n * Behavior is undefined when [count] or [divisions] is 0.\n * When divisions < count, colors repeat.\n *\n * [count] The number of colors to return, includes the input color.\n * [divisions] The number of divisions on the color wheel.\n */\n analogous(count = 5, divisions = 12) {\n const startHue = Math.round(this.input.hue);\n const startHct = this.hctsByHue[startHue];\n let lastTemp = this.relativeTemperature(startHct);\n const allColors = [startHct];\n let absoluteTotalTempDelta = 0.0;\n for (let i = 0; i < 360; i++) {\n const hue = mathUtils.sanitizeDegreesInt(startHue + i);\n const hct = this.hctsByHue[hue];\n const temp = this.relativeTemperature(hct);\n const tempDelta = Math.abs(temp - lastTemp);\n lastTemp = temp;\n absoluteTotalTempDelta += tempDelta;\n }\n let hueAddend = 1;\n const tempStep = absoluteTotalTempDelta / divisions;\n let totalTempDelta = 0.0;\n lastTemp = this.relativeTemperature(startHct);\n while (allColors.length < divisions) {\n const hue = mathUtils.sanitizeDegreesInt(startHue + hueAddend);\n const hct = this.hctsByHue[hue];\n const temp = this.relativeTemperature(hct);\n const tempDelta = Math.abs(temp - lastTemp);\n totalTempDelta += tempDelta;\n const desiredTotalTempDeltaForIndex = allColors.length * tempStep;\n let indexSatisfied = totalTempDelta >= desiredTotalTempDeltaForIndex;\n let indexAddend = 1;\n // Keep adding this hue to the answers until its temperature is\n // insufficient. This ensures consistent behavior when there aren't\n // [divisions] discrete steps between 0 and 360 in hue with [tempStep]\n // delta in temperature between them.\n //\n // For example, white and black have no analogues: there are no other\n // colors at T100/T0. Therefore, they should just be added to the array\n // as answers.\n while (indexSatisfied && allColors.length < divisions) {\n allColors.push(hct);\n const desiredTotalTempDeltaForIndex = ((allColors.length + indexAddend) * tempStep);\n indexSatisfied = totalTempDelta >= desiredTotalTempDeltaForIndex;\n indexAddend++;\n }\n lastTemp = temp;\n hueAddend++;\n if (hueAddend > 360) {\n while (allColors.length < divisions) {\n allColors.push(hct);\n }\n break;\n }\n }\n const answers = [this.input];\n // First, generate analogues from rotating counter-clockwise.\n const increaseHueCount = Math.floor((count - 1) / 2.0);\n for (let i = 1; i < (increaseHueCount + 1); i++) {\n let index = 0 - i;\n while (index < 0) {\n index = allColors.length + index;\n }\n if (index >= allColors.length) {\n index = index % allColors.length;\n }\n answers.splice(0, 0, allColors[index]);\n }\n // Second, generate analogues from rotating clockwise.\n const decreaseHueCount = count - increaseHueCount - 1;\n for (let i = 1; i < (decreaseHueCount + 1); i++) {\n let index = i;\n while (index < 0) {\n index = allColors.length + index;\n }\n if (index >= allColors.length) {\n index = index % allColors.length;\n }\n answers.push(allColors[index]);\n }\n return answers;\n }\n /**\n * A color that complements the input color aesthetically.\n *\n * In art, this is usually described as being across the color wheel.\n * History of this shows intent as a color that is just as cool-warm as the\n * input color is warm-cool.\n */\n get complement() {\n if (this.complementCache != null) {\n return this.complementCache;\n }\n const coldestHue = this.coldest.hue;\n const coldestTemp = this.tempsByHct.get(this.coldest);\n const warmestHue = this.warmest.hue;\n const warmestTemp = this.tempsByHct.get(this.warmest);\n const range = warmestTemp - coldestTemp;\n const startHueIsColdestToWarmest = TemperatureCache.isBetween(this.input.hue, coldestHue, warmestHue);\n const startHue = startHueIsColdestToWarmest ? warmestHue : coldestHue;\n const endHue = startHueIsColdestToWarmest ? coldestHue : warmestHue;\n const directionOfRotation = 1.0;\n let smallestError = 1000.0;\n let answer = this.hctsByHue[Math.round(this.input.hue)];\n const complementRelativeTemp = 1.0 - this.inputRelativeTemperature;\n // Find the color in the other section, closest to the inverse percentile\n // of the input color. This is the complement.\n for (let hueAddend = 0.0; hueAddend <= 360.0; hueAddend += 1.0) {\n const hue = mathUtils.sanitizeDegreesDouble(startHue + directionOfRotation * hueAddend);\n if (!TemperatureCache.isBetween(hue, startHue, endHue)) {\n continue;\n }\n const possibleAnswer = this.hctsByHue[Math.round(hue)];\n const relativeTemp = (this.tempsByHct.get(possibleAnswer) - coldestTemp) / range;\n const error = Math.abs(complementRelativeTemp - relativeTemp);\n if (error < smallestError) {\n smallestError = error;\n answer = possibleAnswer;\n }\n }\n this.complementCache = answer;\n return this.complementCache;\n }\n /**\n * Temperature relative to all colors with the same chroma and tone.\n * Value on a scale from 0 to 1.\n */\n relativeTemperature(hct) {\n const range = this.tempsByHct.get(this.warmest) - this.tempsByHct.get(this.coldest);\n const differenceFromColdest = this.tempsByHct.get(hct) - this.tempsByHct.get(this.coldest);\n // Handle when there's no difference in temperature between warmest and\n // coldest: for example, at T100, only one color is available, white.\n if (range === 0.0) {\n return 0.5;\n }\n return differenceFromColdest / range;\n }\n /** Relative temperature of the input color. See [relativeTemperature]. */\n get inputRelativeTemperature() {\n if (this.inputRelativeTemperatureCache >= 0.0) {\n return this.inputRelativeTemperatureCache;\n }\n this.inputRelativeTemperatureCache = this.relativeTemperature(this.input);\n return this.inputRelativeTemperatureCache;\n }\n /** A Map with keys of HCTs in [hctsByTemp], values of raw temperature. */\n get tempsByHct() {\n if (this.tempsByHctCache.size > 0) {\n return this.tempsByHctCache;\n }\n const allHcts = this.hctsByHue.concat([this.input]);\n const temperaturesByHct = new Map();\n for (const e of allHcts) {\n temperaturesByHct.set(e, TemperatureCache.rawTemperature(e));\n }\n this.tempsByHctCache = temperaturesByHct;\n return temperaturesByHct;\n }\n /**\n * HCTs for all hues, with the same chroma/tone as the input.\n * Sorted ascending, hue 0 to 360.\n */\n get hctsByHue() {\n if (this.hctsByHueCache.length > 0) {\n return this.hctsByHueCache;\n }\n const hcts = [];\n for (let hue = 0.0; hue <= 360.0; hue += 1.0) {\n const colorAtHue = Hct.from(hue, this.input.chroma, this.input.tone);\n hcts.push(colorAtHue);\n }\n this.hctsByHueCache = hcts;\n return this.hctsByHueCache;\n }\n /** Determines if an angle is between two other angles, rotating clockwise. */\n static isBetween(angle, a, b) {\n if (a < b) {\n return a <= angle && angle <= b;\n }\n return a <= angle || angle <= b;\n }\n /**\n * Value representing cool-warm factor of a color.\n * Values below 0 are considered cool, above, warm.\n *\n * Color science has researched emotion and harmony, which art uses to select\n * colors. Warm-cool is the foundation of analogous and complementary colors.\n * See:\n * - Li-Chen Ou's Chapter 19 in Handbook of Color Psychology (2015).\n * - Josef Albers' Interaction of Color chapters 19 and 21.\n *\n * Implementation of Ou, Woodcock and Wright's algorithm, which uses\n * L*a*b* / LCH color space.\n * Return value has these properties:\n * - Values below 0 are cool, above 0 are warm.\n * - Lower bound: -0.52 - (chroma ^ 1.07 / 20). L*a*b* chroma is infinite.\n * Assuming max of 130 chroma, -9.66.\n * - Upper bound: -0.52 + (chroma ^ 1.07 / 20). L*a*b* chroma is infinite.\n * Assuming max of 130 chroma, 8.61.\n */\n static rawTemperature(color) {\n const lab = colorUtils.labFromArgb(color.toInt());\n const hue = mathUtils.sanitizeDegreesDouble(Math.atan2(lab[2], lab[1]) * 180.0 / Math.PI);\n const chroma = Math.sqrt((lab[1] * lab[1]) + (lab[2] * lab[2]));\n const temperature = -0.5 +\n 0.02 * Math.pow(chroma, 1.07) *\n Math.cos(mathUtils.sanitizeDegreesDouble(hue - 50.0) * Math.PI / 180.0);\n return temperature;\n }\n}\n//# sourceMappingURL=temperature_cache.js.map","/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as math from '../utils/math_utils.js';\n/**\n * A class containing a value that changes with the contrast level.\n *\n * Usually represents the contrast requirements for a dynamic color on its\n * background. The four values correspond to values for contrast levels -1.0,\n * 0.0, 0.5, and 1.0, respectively.\n */\nexport class ContrastCurve {\n /**\n * Creates a `ContrastCurve` object.\n *\n * @param low Value for contrast level -1.0\n * @param normal Value for contrast level 0.0\n * @param medium Value for contrast level 0.5\n * @param high Value for contrast level 1.0\n */\n constructor(low, normal, medium, high) {\n this.low = low;\n this.normal = normal;\n this.medium = medium;\n this.high = high;\n }\n /**\n * Returns the value at a given contrast level.\n *\n * @param contrastLevel The contrast level. 0.0 is the default (normal); -1.0\n * is the lowest; 1.0 is the highest.\n * @return The value. For contrast ratios, a number between 1.0 and 21.0.\n */\n get(contrastLevel) {\n if (contrastLevel <= -1.0) {\n return this.low;\n }\n else if (contrastLevel < 0.0) {\n return math.lerp(this.low, this.normal, (contrastLevel - (-1)) / 1);\n }\n else if (contrastLevel < 0.5) {\n return math.lerp(this.normal, this.medium, (contrastLevel - 0) / 0.5);\n }\n else if (contrastLevel < 1.0) {\n return math.lerp(this.medium, this.high, (contrastLevel - 0.5) / 0.5);\n }\n else {\n return this.high;\n }\n }\n}\n//# sourceMappingURL=contrast_curve.js.map","/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Documents a constraint between two DynamicColors, in which their tones must\n * have a certain distance from each other.\n *\n * Prefer a DynamicColor with a background, this is for special cases when\n * designers want tonal distance, literally contrast, between two colors that\n * don't have a background / foreground relationship or a contrast guarantee.\n */\nexport class ToneDeltaPair {\n /**\n * Documents a constraint in tone distance between two DynamicColors.\n *\n * The polarity is an adjective that describes \"A\", compared to \"B\".\n *\n * For instance, ToneDeltaPair(A, B, 15, 'darker', 'exact') states that\n * A's tone should be exactly 15 darker than B's.\n *\n * 'relative_darker' and 'relative_lighter' describes the tone adjustment\n * relative to the surface color trend (white in light mode; black in dark\n * mode). For instance, ToneDeltaPair(A, B, 10, 'relative_lighter',\n * 'farther') states that A should be at least 10 lighter than B in light\n * mode, and at least 10 darker than B in dark mode.\n *\n * @param roleA The first role in a pair.\n * @param roleB The second role in a pair.\n * @param delta Required difference between tones. Absolute value, negative\n * values have undefined behavior.\n * @param polarity The relative relation between tones of roleA and roleB,\n * as described above.\n * @param constraint How to fulfill the tone delta pair constraint.\n * @param stayTogether Whether these two roles should stay on the same side\n * of the \"awkward zone\" (T50-59). This is necessary for certain cases where\n * one role has two backgrounds.\n */\n constructor(roleA, roleB, delta, polarity, stayTogether, constraint) {\n this.roleA = roleA;\n this.roleB = roleB;\n this.delta = delta;\n this.polarity = polarity;\n this.stayTogether = stayTogether;\n this.constraint = constraint;\n this.constraint = constraint ?? 'exact';\n }\n}\n//# sourceMappingURL=tone_delta_pair.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Set of themes supported by Dynamic Color.\n * Instantiate the corresponding subclass, ex. SchemeTonalSpot, to create\n * colors corresponding to the theme.\n */\nexport var Variant;\n(function (Variant) {\n Variant[Variant[\"MONOCHROME\"] = 0] = \"MONOCHROME\";\n Variant[Variant[\"NEUTRAL\"] = 1] = \"NEUTRAL\";\n Variant[Variant[\"TONAL_SPOT\"] = 2] = \"TONAL_SPOT\";\n Variant[Variant[\"VIBRANT\"] = 3] = \"VIBRANT\";\n Variant[Variant[\"EXPRESSIVE\"] = 4] = \"EXPRESSIVE\";\n Variant[Variant[\"FIDELITY\"] = 5] = \"FIDELITY\";\n Variant[Variant[\"CONTENT\"] = 6] = \"CONTENT\";\n Variant[Variant[\"RAINBOW\"] = 7] = \"RAINBOW\";\n Variant[Variant[\"FRUIT_SALAD\"] = 8] = \"FRUIT_SALAD\";\n})(Variant || (Variant = {}));\n//# sourceMappingURL=variant.js.map","/**\n * @license\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DislikeAnalyzer } from '../dislike/dislike_analyzer.js';\nimport { Hct } from '../hct/hct.js';\nimport { ContrastCurve } from './contrast_curve.js';\nimport { DynamicColor } from './dynamic_color.js';\nimport { ToneDeltaPair } from './tone_delta_pair.js';\nimport { Variant } from './variant.js';\n/**\n * Returns true if the scheme is Fidelity or Content.\n */\nfunction isFidelity(scheme) {\n return scheme.variant === Variant.FIDELITY ||\n scheme.variant === Variant.CONTENT;\n}\n/**\n * Returns true if the scheme is Monochrome.\n */\nfunction isMonochrome(scheme) {\n return scheme.variant === Variant.MONOCHROME;\n}\n/**\n * Returns the desired chroma for a given tone at a specific hue.\n *\n * @param hue The given hue.\n * @param chroma The target chroma.\n * @param tone The tone to start with.\n * @param byDecreasingTone Whether to search for lower tones.\n */\nfunction findDesiredChromaByTone(hue, chroma, tone, byDecreasingTone) {\n let answer = tone;\n let closestToChroma = Hct.from(hue, chroma, tone);\n if (closestToChroma.chroma < chroma) {\n let chromaPeak = closestToChroma.chroma;\n while (closestToChroma.chroma < chroma) {\n answer += byDecreasingTone ? -1.0 : 1.0;\n const potentialSolution = Hct.from(hue, chroma, answer);\n if (chromaPeak > potentialSolution.chroma) {\n break;\n }\n if (Math.abs(potentialSolution.chroma - chroma) < 0.4) {\n break;\n }\n const potentialDelta = Math.abs(potentialSolution.chroma - chroma);\n const currentDelta = Math.abs(closestToChroma.chroma - chroma);\n if (potentialDelta < currentDelta) {\n closestToChroma = potentialSolution;\n }\n chromaPeak = Math.max(chromaPeak, potentialSolution.chroma);\n }\n }\n return answer;\n}\n/**\n * A delegate for the dynamic color spec of a DynamicScheme in the 2021 spec.\n */\nexport class ColorSpecDelegateImpl2021 {\n ////////////////////////////////////////////////////////////////\n // Main Palettes //\n ////////////////////////////////////////////////////////////////\n primaryPaletteKeyColor() {\n return DynamicColor.fromPalette({\n name: 'primary_palette_key_color',\n palette: (s) => s.primaryPalette,\n tone: (s) => s.primaryPalette.keyColor.tone,\n });\n }\n secondaryPaletteKeyColor() {\n return DynamicColor.fromPalette({\n name: 'secondary_palette_key_color',\n palette: (s) => s.secondaryPalette,\n tone: (s) => s.secondaryPalette.keyColor.tone,\n });\n }\n tertiaryPaletteKeyColor() {\n return DynamicColor.fromPalette({\n name: 'tertiary_palette_key_color',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => s.tertiaryPalette.keyColor.tone,\n });\n }\n neutralPaletteKeyColor() {\n return DynamicColor.fromPalette({\n name: 'neutral_palette_key_color',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.neutralPalette.keyColor.tone,\n });\n }\n neutralVariantPaletteKeyColor() {\n return DynamicColor.fromPalette({\n name: 'neutral_variant_palette_key_color',\n palette: (s) => s.neutralVariantPalette,\n tone: (s) => s.neutralVariantPalette.keyColor.tone,\n });\n }\n errorPaletteKeyColor() {\n return DynamicColor.fromPalette({\n name: 'error_palette_key_color',\n palette: (s) => s.errorPalette,\n tone: (s) => s.errorPalette.keyColor.tone,\n });\n }\n ////////////////////////////////////////////////////////////////\n // Surfaces [S] //\n ////////////////////////////////////////////////////////////////\n background() {\n return DynamicColor.fromPalette({\n name: 'background',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 6 : 98,\n isBackground: true,\n });\n }\n onBackground() {\n return DynamicColor.fromPalette({\n name: 'on_background',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 90 : 10,\n background: (s) => this.background(),\n contrastCurve: (s) => new ContrastCurve(3, 3, 4.5, 7),\n });\n }\n surface() {\n return DynamicColor.fromPalette({\n name: 'surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 6 : 98,\n isBackground: true,\n });\n }\n surfaceDim() {\n return DynamicColor.fromPalette({\n name: 'surface_dim',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 6 : new ContrastCurve(87, 87, 80, 75).get(s.contrastLevel),\n isBackground: true,\n });\n }\n surfaceBright() {\n return DynamicColor.fromPalette({\n name: 'surface_bright',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ?\n new ContrastCurve(24, 24, 29, 34).get(s.contrastLevel) :\n 98,\n isBackground: true,\n });\n }\n surfaceContainerLowest() {\n return DynamicColor.fromPalette({\n name: 'surface_container_lowest',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? new ContrastCurve(4, 4, 2, 0).get(s.contrastLevel) : 100,\n isBackground: true,\n });\n }\n surfaceContainerLow() {\n return DynamicColor.fromPalette({\n name: 'surface_container_low',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ?\n new ContrastCurve(10, 10, 11, 12).get(s.contrastLevel) :\n new ContrastCurve(96, 96, 96, 95).get(s.contrastLevel),\n isBackground: true,\n });\n }\n surfaceContainer() {\n return DynamicColor.fromPalette({\n name: 'surface_container',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ?\n new ContrastCurve(12, 12, 16, 20).get(s.contrastLevel) :\n new ContrastCurve(94, 94, 92, 90).get(s.contrastLevel),\n isBackground: true,\n });\n }\n surfaceContainerHigh() {\n return DynamicColor.fromPalette({\n name: 'surface_container_high',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ?\n new ContrastCurve(17, 17, 21, 25).get(s.contrastLevel) :\n new ContrastCurve(92, 92, 88, 85).get(s.contrastLevel),\n isBackground: true,\n });\n }\n surfaceContainerHighest() {\n return DynamicColor.fromPalette({\n name: 'surface_container_highest',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ?\n new ContrastCurve(22, 22, 26, 30).get(s.contrastLevel) :\n new ContrastCurve(90, 90, 84, 80).get(s.contrastLevel),\n isBackground: true,\n });\n }\n onSurface() {\n return DynamicColor.fromPalette({\n name: 'on_surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 90 : 10,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n surfaceVariant() {\n return DynamicColor.fromPalette({\n name: 'surface_variant',\n palette: (s) => s.neutralVariantPalette,\n tone: (s) => s.isDark ? 30 : 90,\n isBackground: true,\n });\n }\n onSurfaceVariant() {\n return DynamicColor.fromPalette({\n name: 'on_surface_variant',\n palette: (s) => s.neutralVariantPalette,\n tone: (s) => s.isDark ? 80 : 30,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11),\n });\n }\n inverseSurface() {\n return DynamicColor.fromPalette({\n name: 'inverse_surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 90 : 20,\n isBackground: true,\n });\n }\n inverseOnSurface() {\n return DynamicColor.fromPalette({\n name: 'inverse_on_surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 20 : 95,\n background: (s) => this.inverseSurface(),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n outline() {\n return DynamicColor.fromPalette({\n name: 'outline',\n palette: (s) => s.neutralVariantPalette,\n tone: (s) => s.isDark ? 60 : 50,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1.5, 3, 4.5, 7),\n });\n }\n outlineVariant() {\n return DynamicColor.fromPalette({\n name: 'outline_variant',\n palette: (s) => s.neutralVariantPalette,\n tone: (s) => s.isDark ? 30 : 80,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n });\n }\n shadow() {\n return DynamicColor.fromPalette({\n name: 'shadow',\n palette: (s) => s.neutralPalette,\n tone: (s) => 0,\n });\n }\n scrim() {\n return DynamicColor.fromPalette({\n name: 'scrim',\n palette: (s) => s.neutralPalette,\n tone: (s) => 0,\n });\n }\n surfaceTint() {\n return DynamicColor.fromPalette({\n name: 'surface_tint',\n palette: (s) => s.primaryPalette,\n tone: (s) => s.isDark ? 80 : 40,\n isBackground: true,\n });\n }\n ////////////////////////////////////////////////////////////////\n // Primary [P]. //\n ////////////////////////////////////////////////////////////////\n primary() {\n return DynamicColor.fromPalette({\n name: 'primary',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 100 : 0;\n }\n return s.isDark ? 80 : 40;\n },\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 7),\n toneDeltaPair: (s) => new ToneDeltaPair(this.primaryContainer(), this.primary(), 10, 'nearer', false),\n });\n }\n primaryDim() {\n return undefined;\n }\n onPrimary() {\n return DynamicColor.fromPalette({\n name: 'on_primary',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 10 : 90;\n }\n return s.isDark ? 20 : 100;\n },\n background: (s) => this.primary(),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n primaryContainer() {\n return DynamicColor.fromPalette({\n name: 'primary_container',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (isFidelity(s)) {\n return s.sourceColorHct.tone;\n }\n if (isMonochrome(s)) {\n return s.isDark ? 85 : 25;\n }\n return s.isDark ? 30 : 90;\n },\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.primaryContainer(), this.primary(), 10, 'nearer', false),\n });\n }\n onPrimaryContainer() {\n return DynamicColor.fromPalette({\n name: 'on_primary_container',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (isFidelity(s)) {\n return DynamicColor.foregroundTone(this.primaryContainer().tone(s), 4.5);\n }\n if (isMonochrome(s)) {\n return s.isDark ? 0 : 100;\n }\n return s.isDark ? 90 : 30;\n },\n background: (s) => this.primaryContainer(),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11),\n });\n }\n inversePrimary() {\n return DynamicColor.fromPalette({\n name: 'inverse_primary',\n palette: (s) => s.primaryPalette,\n tone: (s) => s.isDark ? 40 : 80,\n background: (s) => this.inverseSurface(),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 7),\n });\n }\n /////////////////////////////////////////////////////////////////\n // Secondary [Q]. //\n /////////////////////////////////////////////////////////////////\n secondary() {\n return DynamicColor.fromPalette({\n name: 'secondary',\n palette: (s) => s.secondaryPalette,\n tone: (s) => s.isDark ? 80 : 40,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 7),\n toneDeltaPair: (s) => new ToneDeltaPair(this.secondaryContainer(), this.secondary(), 10, 'nearer', false),\n });\n }\n secondaryDim() {\n return undefined;\n }\n onSecondary() {\n return DynamicColor.fromPalette({\n name: 'on_secondary',\n palette: (s) => s.secondaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 10 : 100;\n }\n else {\n return s.isDark ? 20 : 100;\n }\n },\n background: (s) => this.secondary(),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n secondaryContainer() {\n return DynamicColor.fromPalette({\n name: 'secondary_container',\n palette: (s) => s.secondaryPalette,\n tone: (s) => {\n const initialTone = s.isDark ? 30 : 90;\n if (isMonochrome(s)) {\n return s.isDark ? 30 : 85;\n }\n if (!isFidelity(s)) {\n return initialTone;\n }\n return findDesiredChromaByTone(s.secondaryPalette.hue, s.secondaryPalette.chroma, initialTone, s.isDark ? false : true);\n },\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.secondaryContainer(), this.secondary(), 10, 'nearer', false),\n });\n }\n onSecondaryContainer() {\n return DynamicColor.fromPalette({\n name: 'on_secondary_container',\n palette: (s) => s.secondaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 90 : 10;\n }\n if (!isFidelity(s)) {\n return s.isDark ? 90 : 30;\n }\n return DynamicColor.foregroundTone(this.secondaryContainer().tone(s), 4.5);\n },\n background: (s) => this.secondaryContainer(),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11),\n });\n }\n /////////////////////////////////////////////////////////////////\n // Tertiary [T]. //\n /////////////////////////////////////////////////////////////////\n tertiary() {\n return DynamicColor.fromPalette({\n name: 'tertiary',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 90 : 25;\n }\n return s.isDark ? 80 : 40;\n },\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 7),\n toneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryContainer(), this.tertiary(), 10, 'nearer', false),\n });\n }\n tertiaryDim() {\n return undefined;\n }\n onTertiary() {\n return DynamicColor.fromPalette({\n name: 'on_tertiary',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 10 : 90;\n }\n return s.isDark ? 20 : 100;\n },\n background: (s) => this.tertiary(),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n tertiaryContainer() {\n return DynamicColor.fromPalette({\n name: 'tertiary_container',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 60 : 49;\n }\n if (!isFidelity(s)) {\n return s.isDark ? 30 : 90;\n }\n const proposedHct = s.tertiaryPalette.getHct(s.sourceColorHct.tone);\n return DislikeAnalyzer.fixIfDisliked(proposedHct).tone;\n },\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryContainer(), this.tertiary(), 10, 'nearer', false),\n });\n }\n onTertiaryContainer() {\n return DynamicColor.fromPalette({\n name: 'on_tertiary_container',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 0 : 100;\n }\n if (!isFidelity(s)) {\n return s.isDark ? 90 : 30;\n }\n return DynamicColor.foregroundTone(this.tertiaryContainer().tone(s), 4.5);\n },\n background: (s) => this.tertiaryContainer(),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11),\n });\n }\n //////////////////////////////////////////////////////////////////\n // Error [E]. //\n //////////////////////////////////////////////////////////////////\n error() {\n return DynamicColor.fromPalette({\n name: 'error',\n palette: (s) => s.errorPalette,\n tone: (s) => s.isDark ? 80 : 40,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 7),\n toneDeltaPair: (s) => new ToneDeltaPair(this.errorContainer(), this.error(), 10, 'nearer', false),\n });\n }\n errorDim() {\n return undefined;\n }\n onError() {\n return DynamicColor.fromPalette({\n name: 'on_error',\n palette: (s) => s.errorPalette,\n tone: (s) => s.isDark ? 20 : 100,\n background: (s) => this.error(),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n errorContainer() {\n return DynamicColor.fromPalette({\n name: 'error_container',\n palette: (s) => s.errorPalette,\n tone: (s) => s.isDark ? 30 : 90,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.errorContainer(), this.error(), 10, 'nearer', false),\n });\n }\n onErrorContainer() {\n return DynamicColor.fromPalette({\n name: 'on_error_container',\n palette: (s) => s.errorPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 90 : 10;\n }\n return s.isDark ? 90 : 30;\n },\n background: (s) => this.errorContainer(),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11),\n });\n }\n //////////////////////////////////////////////////////////////////\n // Primary Fixed [PF] //\n //////////////////////////////////////////////////////////////////\n primaryFixed() {\n return DynamicColor.fromPalette({\n name: 'primary_fixed',\n palette: (s) => s.primaryPalette,\n tone: (s) => isMonochrome(s) ? 40.0 : 90.0,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.primaryFixed(), this.primaryFixedDim(), 10, 'lighter', true),\n });\n }\n primaryFixedDim() {\n return DynamicColor.fromPalette({\n name: 'primary_fixed_dim',\n palette: (s) => s.primaryPalette,\n tone: (s) => isMonochrome(s) ? 30.0 : 80.0,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.primaryFixed(), this.primaryFixedDim(), 10, 'lighter', true),\n });\n }\n onPrimaryFixed() {\n return DynamicColor.fromPalette({\n name: 'on_primary_fixed',\n palette: (s) => s.primaryPalette,\n tone: (s) => isMonochrome(s) ? 100.0 : 10.0,\n background: (s) => this.primaryFixedDim(),\n secondBackground: (s) => this.primaryFixed(),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n onPrimaryFixedVariant() {\n return DynamicColor.fromPalette({\n name: 'on_primary_fixed_variant',\n palette: (s) => s.primaryPalette,\n tone: (s) => isMonochrome(s) ? 90.0 : 30.0,\n background: (s) => this.primaryFixedDim(),\n secondBackground: (s) => this.primaryFixed(),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11),\n });\n }\n ///////////////////////////////////////////////////////////////////\n // Secondary Fixed [QF] //\n ///////////////////////////////////////////////////////////////////\n secondaryFixed() {\n return DynamicColor.fromPalette({\n name: 'secondary_fixed',\n palette: (s) => s.secondaryPalette,\n tone: (s) => isMonochrome(s) ? 80.0 : 90.0,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.secondaryFixed(), this.secondaryFixedDim(), 10, 'lighter', true),\n });\n }\n secondaryFixedDim() {\n return DynamicColor.fromPalette({\n name: 'secondary_fixed_dim',\n palette: (s) => s.secondaryPalette,\n tone: (s) => isMonochrome(s) ? 70.0 : 80.0,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.secondaryFixed(), this.secondaryFixedDim(), 10, 'lighter', true),\n });\n }\n onSecondaryFixed() {\n return DynamicColor.fromPalette({\n name: 'on_secondary_fixed',\n palette: (s) => s.secondaryPalette,\n tone: (s) => 10.0,\n background: (s) => this.secondaryFixedDim(),\n secondBackground: (s) => this.secondaryFixed(),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n onSecondaryFixedVariant() {\n return DynamicColor.fromPalette({\n name: 'on_secondary_fixed_variant',\n palette: (s) => s.secondaryPalette,\n tone: (s) => isMonochrome(s) ? 25.0 : 30.0,\n background: (s) => this.secondaryFixedDim(),\n secondBackground: (s) => this.secondaryFixed(),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11),\n });\n }\n /////////////////////////////////////////////////////////////////\n // Tertiary Fixed [TF] //\n /////////////////////////////////////////////////////////////////\n tertiaryFixed() {\n return DynamicColor.fromPalette({\n name: 'tertiary_fixed',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => isMonochrome(s) ? 40.0 : 90.0,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryFixed(), this.tertiaryFixedDim(), 10, 'lighter', true),\n });\n }\n tertiaryFixedDim() {\n return DynamicColor.fromPalette({\n name: 'tertiary_fixed_dim',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => isMonochrome(s) ? 30.0 : 80.0,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryFixed(), this.tertiaryFixedDim(), 10, 'lighter', true),\n });\n }\n onTertiaryFixed() {\n return DynamicColor.fromPalette({\n name: 'on_tertiary_fixed',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => isMonochrome(s) ? 100.0 : 10.0,\n background: (s) => this.tertiaryFixedDim(),\n secondBackground: (s) => this.tertiaryFixed(),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n onTertiaryFixedVariant() {\n return DynamicColor.fromPalette({\n name: 'on_tertiary_fixed_variant',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => isMonochrome(s) ? 90.0 : 30.0,\n background: (s) => this.tertiaryFixedDim(),\n secondBackground: (s) => this.tertiaryFixed(),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11),\n });\n }\n ////////////////////////////////////////////////////////////////\n // Other //\n ////////////////////////////////////////////////////////////////\n highestSurface(s) {\n return s.isDark ? this.surfaceBright() : this.surfaceDim();\n }\n}\n//# sourceMappingURL=color_spec_2021.js.map","/**\n * @license\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct.js';\nimport * as math from '../utils/math_utils.js';\nimport { ColorSpecDelegateImpl2021 } from './color_spec_2021.js';\nimport { ContrastCurve } from './contrast_curve.js';\nimport { DynamicColor, extendSpecVersion } from './dynamic_color';\nimport { ToneDeltaPair } from './tone_delta_pair.js';\nimport { Variant } from './variant.js';\n/**\n * Returns the maximum tone for a given chroma in the palette.\n *\n * @param palette The tonal palette to use.\n * @param lowerBound The lower bound of the tone.\n * @param upperBound The upper bound of the tone.\n */\nfunction tMaxC(palette, lowerBound = 0, upperBound = 100, chromaMultiplier = 1) {\n let answer = findBestToneForChroma(palette.hue, palette.chroma * chromaMultiplier, 100, true);\n return math.clampDouble(lowerBound, upperBound, answer);\n}\n/**\n * Returns the minimum tone for a given chroma in the palette.\n *\n * @param palette The tonal palette to use.\n * @param lowerBound The lower bound of the tone.\n * @param upperBound The upper bound of the tone.\n */\nfunction tMinC(palette, lowerBound = 0, upperBound = 100) {\n let answer = findBestToneForChroma(palette.hue, palette.chroma, 0, false);\n return math.clampDouble(lowerBound, upperBound, answer);\n}\n/**\n * Searches for the best tone with a given chroma from a given tone at a\n * specific hue.\n *\n * @param hue The given hue.\n * @param chroma The target chroma.\n * @param tone The tone to start with.\n * @param byDecreasingTone Whether to search for lower tones.\n */\nfunction findBestToneForChroma(hue, chroma, tone, byDecreasingTone) {\n let answer = tone;\n let bestCandidate = Hct.from(hue, chroma, answer);\n while (bestCandidate.chroma < chroma) {\n if (tone < 0 || tone > 100) {\n break;\n }\n tone += byDecreasingTone ? -1.0 : 1.0;\n const newCandidate = Hct.from(hue, chroma, tone);\n if (bestCandidate.chroma < newCandidate.chroma) {\n bestCandidate = newCandidate;\n answer = tone;\n }\n }\n return answer;\n}\n/**\n * Returns the contrast curve for a given default contrast.\n *\n * @param defaultContrast The default contrast to use.\n */\nfunction getCurve(defaultContrast) {\n if (defaultContrast === 1.5) {\n return new ContrastCurve(1.5, 1.5, 3, 5.5);\n }\n else if (defaultContrast === 3) {\n return new ContrastCurve(3, 3, 4.5, 7);\n }\n else if (defaultContrast === 4.5) {\n return new ContrastCurve(4.5, 4.5, 7, 11);\n }\n else if (defaultContrast === 6) {\n return new ContrastCurve(6, 6, 7, 11);\n }\n else if (defaultContrast === 7) {\n return new ContrastCurve(7, 7, 11, 21);\n }\n else if (defaultContrast === 9) {\n return new ContrastCurve(9, 9, 11, 21);\n }\n else if (defaultContrast === 11) {\n return new ContrastCurve(11, 11, 21, 21);\n }\n else if (defaultContrast === 21) {\n return new ContrastCurve(21, 21, 21, 21);\n }\n else {\n // Shouldn't happen.\n return new ContrastCurve(defaultContrast, defaultContrast, 7, 21);\n }\n}\n/**\n * A delegate for the dynamic color spec of a DynamicScheme in the 2025 spec.\n */\nexport class ColorSpecDelegateImpl2025 extends ColorSpecDelegateImpl2021 {\n ////////////////////////////////////////////////////////////////\n // Surfaces [S] //\n ////////////////////////////////////////////////////////////////\n surface() {\n const color2025 = DynamicColor.fromPalette({\n name: 'surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => {\n super.surface().tone(s);\n if (s.platform === 'phone') {\n if (s.isDark) {\n return 4;\n }\n else {\n if (Hct.isYellow(s.neutralPalette.hue)) {\n return 99;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 97;\n }\n else {\n return 98;\n }\n }\n }\n else {\n return 0;\n }\n },\n isBackground: true,\n });\n return extendSpecVersion(super.surface(), '2025', color2025);\n }\n surfaceDim() {\n const color2025 = DynamicColor.fromPalette({\n name: 'surface_dim',\n palette: (s) => s.neutralPalette,\n tone: (s) => {\n if (s.isDark) {\n return 4;\n }\n else {\n if (Hct.isYellow(s.neutralPalette.hue)) {\n return 90;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 85;\n }\n else {\n return 87;\n }\n }\n },\n isBackground: true,\n chromaMultiplier: (s) => {\n if (!s.isDark) {\n if (s.variant === Variant.NEUTRAL) {\n return 2.5;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.7;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? 2.7 : 1.75;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 1.36;\n }\n }\n return 1;\n },\n });\n return extendSpecVersion(super.surfaceDim(), '2025', color2025);\n }\n surfaceBright() {\n const color2025 = DynamicColor.fromPalette({\n name: 'surface_bright',\n palette: (s) => s.neutralPalette,\n tone: (s) => {\n if (s.isDark) {\n return 18;\n }\n else {\n if (Hct.isYellow(s.neutralPalette.hue)) {\n return 99;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 97;\n }\n else {\n return 98;\n }\n }\n },\n isBackground: true,\n chromaMultiplier: (s) => {\n if (s.isDark) {\n if (s.variant === Variant.NEUTRAL) {\n return 2.5;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.7;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? 2.7 : 1.75;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 1.36;\n }\n }\n return 1;\n },\n });\n return extendSpecVersion(super.surfaceBright(), '2025', color2025);\n }\n surfaceContainerLowest() {\n const color2025 = DynamicColor.fromPalette({\n name: 'surface_container_lowest',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 0 : 100,\n isBackground: true,\n });\n return extendSpecVersion(super.surfaceContainerLowest(), '2025', color2025);\n }\n surfaceContainerLow() {\n const color2025 = DynamicColor.fromPalette({\n name: 'surface_container_low',\n palette: (s) => s.neutralPalette,\n tone: (s) => {\n if (s.platform === 'phone') {\n if (s.isDark) {\n return 6;\n }\n else {\n if (Hct.isYellow(s.neutralPalette.hue)) {\n return 98;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 95;\n }\n else {\n return 96;\n }\n }\n }\n else {\n return 15;\n }\n },\n isBackground: true,\n chromaMultiplier: (s) => {\n if (s.platform === 'phone') {\n if (s.variant === Variant.NEUTRAL) {\n return 1.3;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.25;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? 1.3 : 1.15;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 1.08;\n }\n }\n return 1;\n },\n });\n return extendSpecVersion(super.surfaceContainerLow(), '2025', color2025);\n }\n surfaceContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'surface_container',\n palette: (s) => s.neutralPalette,\n tone: (s) => {\n if (s.platform === 'phone') {\n if (s.isDark) {\n return 9;\n }\n else {\n if (Hct.isYellow(s.neutralPalette.hue)) {\n return 96;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 92;\n }\n else {\n return 94;\n }\n }\n }\n else {\n return 20;\n }\n },\n isBackground: true,\n chromaMultiplier: (s) => {\n if (s.platform === 'phone') {\n if (s.variant === Variant.NEUTRAL) {\n return 1.6;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.4;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? 1.6 : 1.3;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 1.15;\n }\n }\n return 1;\n },\n });\n return extendSpecVersion(super.surfaceContainer(), '2025', color2025);\n }\n surfaceContainerHigh() {\n const color2025 = DynamicColor.fromPalette({\n name: 'surface_container_high',\n palette: (s) => s.neutralPalette,\n tone: (s) => {\n if (s.platform === 'phone') {\n if (s.isDark) {\n return 12;\n }\n else {\n if (Hct.isYellow(s.neutralPalette.hue)) {\n return 94;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 90;\n }\n else {\n return 92;\n }\n }\n }\n else {\n return 25;\n }\n },\n isBackground: true,\n chromaMultiplier: (s) => {\n if (s.platform === 'phone') {\n if (s.variant === Variant.NEUTRAL) {\n return 1.9;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.5;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? 1.95 : 1.45;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 1.22;\n }\n }\n return 1;\n },\n });\n return extendSpecVersion(super.surfaceContainerHigh(), '2025', color2025);\n }\n surfaceContainerHighest() {\n const color2025 = DynamicColor.fromPalette({\n name: 'surface_container_highest',\n palette: (s) => s.neutralPalette,\n tone: (s) => {\n if (s.isDark) {\n return 15;\n }\n else {\n if (Hct.isYellow(s.neutralPalette.hue)) {\n return 92;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 88;\n }\n else {\n return 90;\n }\n }\n },\n isBackground: true,\n chromaMultiplier: (s) => {\n if (s.variant === Variant.NEUTRAL) {\n return 2.2;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.7;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? 2.3 : 1.6;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 1.29;\n }\n else { // default\n return 1;\n }\n },\n });\n return extendSpecVersion(super.surfaceContainerHighest(), '2025', color2025);\n }\n onSurface() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => {\n if (s.variant === Variant.VIBRANT) {\n return tMaxC(s.neutralPalette, 0, 100, 1.1);\n }\n else {\n // For all other variants, the initial tone should be the default\n // tone, which is the same as the background color.\n return DynamicColor.getInitialToneFromBackground((s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh())(s);\n }\n },\n chromaMultiplier: (s) => {\n if (s.platform === 'phone') {\n if (s.variant === Variant.NEUTRAL) {\n return 2.2;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.7;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? (s.isDark ? 3.0 : 2.3) :\n 1.6;\n }\n }\n return 1;\n },\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh(),\n contrastCurve: (s) => s.isDark && s.platform === 'phone' ? getCurve(11) : getCurve(9),\n });\n return extendSpecVersion(super.onSurface(), '2025', color2025);\n }\n onSurfaceVariant() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_surface_variant',\n palette: (s) => s.neutralPalette,\n chromaMultiplier: (s) => {\n if (s.platform === 'phone') {\n if (s.variant === Variant.NEUTRAL) {\n return 2.2;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.7;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? (s.isDark ? 3.0 : 2.3) :\n 1.6;\n }\n }\n return 1;\n },\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh(),\n contrastCurve: (s) => s.platform === 'phone' ?\n (s.isDark ? getCurve(6) : getCurve(4.5)) :\n getCurve(7),\n });\n return extendSpecVersion(super.onSurfaceVariant(), '2025', color2025);\n }\n outline() {\n const color2025 = DynamicColor.fromPalette({\n name: 'outline',\n palette: (s) => s.neutralPalette,\n chromaMultiplier: (s) => {\n if (s.platform === 'phone') {\n if (s.variant === Variant.NEUTRAL) {\n return 2.2;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.7;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? (s.isDark ? 3.0 : 2.3) :\n 1.6;\n }\n }\n return 1;\n },\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(3) : getCurve(4.5),\n });\n return extendSpecVersion(super.outline(), '2025', color2025);\n }\n outlineVariant() {\n const color2025 = DynamicColor.fromPalette({\n name: 'outline_variant',\n palette: (s) => s.neutralPalette,\n chromaMultiplier: (s) => {\n if (s.platform === 'phone') {\n if (s.variant === Variant.NEUTRAL) {\n return 2.2;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.7;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? (s.isDark ? 3.0 : 2.3) :\n 1.6;\n }\n }\n return 1;\n },\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(1.5) : getCurve(3),\n });\n return extendSpecVersion(super.outlineVariant(), '2025', color2025);\n }\n inverseSurface() {\n const color2025 = DynamicColor.fromPalette({\n name: 'inverse_surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 98 : 4,\n isBackground: true,\n });\n return extendSpecVersion(super.inverseSurface(), '2025', color2025);\n }\n inverseOnSurface() {\n const color2025 = DynamicColor.fromPalette({\n name: 'inverse_on_surface',\n palette: (s) => s.neutralPalette,\n background: (s) => this.inverseSurface(),\n contrastCurve: (s) => getCurve(7),\n });\n return extendSpecVersion(super.inverseOnSurface(), '2025', color2025);\n }\n ////////////////////////////////////////////////////////////////\n // Primaries [P] //\n ////////////////////////////////////////////////////////////////\n primary() {\n const color2025 = DynamicColor.fromPalette({\n name: 'primary',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (s.variant === Variant.NEUTRAL) {\n if (s.platform === 'phone') {\n return s.isDark ? 80 : 40;\n }\n else {\n return 90;\n }\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n if (s.platform === 'phone') {\n if (s.isDark) {\n return 80;\n }\n else {\n return tMaxC(s.primaryPalette);\n }\n }\n else {\n return tMaxC(s.primaryPalette, 0, 90);\n }\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n if (s.platform === 'phone') {\n return tMaxC(s.primaryPalette, 0, Hct.isYellow(s.primaryPalette.hue) ? 25 :\n Hct.isCyan(s.primaryPalette.hue) ? 88 :\n 98);\n }\n else { // WATCH\n return tMaxC(s.primaryPalette);\n }\n }\n else { // VIBRANT\n if (s.platform === 'phone') {\n return tMaxC(s.primaryPalette, 0, Hct.isCyan(s.primaryPalette.hue) ? 88 : 98);\n }\n else { // WATCH\n return tMaxC(s.primaryPalette);\n }\n }\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(4.5) : getCurve(7),\n toneDeltaPair: (s) => s.platform === 'phone' ?\n new ToneDeltaPair(this.primaryContainer(), this.primary(), 5, 'relative_lighter', true, 'farther') :\n undefined,\n });\n return extendSpecVersion(super.primary(), '2025', color2025);\n }\n primaryDim() {\n return DynamicColor.fromPalette({\n name: 'primary_dim',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (s.variant === Variant.NEUTRAL) {\n return 85;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return tMaxC(s.primaryPalette, 0, 90);\n }\n else {\n return tMaxC(s.primaryPalette);\n }\n },\n isBackground: true,\n background: (s) => this.surfaceContainerHigh(),\n contrastCurve: (s) => getCurve(4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.primaryDim(), this.primary(), 5, 'darker', true, 'farther'),\n });\n }\n onPrimary() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_primary',\n palette: (s) => s.primaryPalette,\n background: (s) => s.platform === 'phone' ? this.primary() : this.primaryDim(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(6) : getCurve(7),\n });\n return extendSpecVersion(super.onPrimary(), '2025', color2025);\n }\n primaryContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'primary_container',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (s.platform === 'watch') {\n return 30;\n }\n else if (s.variant === Variant.NEUTRAL) {\n return s.isDark ? 30 : 90;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return s.isDark ? tMinC(s.primaryPalette, 35, 93) :\n tMaxC(s.primaryPalette, 0, 90);\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return s.isDark ? tMaxC(s.primaryPalette, 30, 93) :\n tMaxC(s.primaryPalette, 78, Hct.isCyan(s.primaryPalette.hue) ? 88 : 90);\n }\n else { // VIBRANT\n return s.isDark ? tMinC(s.primaryPalette, 66, 93) :\n tMaxC(s.primaryPalette, 66, Hct.isCyan(s.primaryPalette.hue) ? 88 : 93);\n }\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) : undefined,\n toneDeltaPair: (s) => s.platform === 'phone' ?\n undefined :\n new ToneDeltaPair(this.primaryContainer(), this.primaryDim(), 10, 'darker', true, 'farther'),\n contrastCurve: (s) => s.platform === 'phone' && s.contrastLevel > 0 ?\n getCurve(1.5) :\n undefined,\n });\n return extendSpecVersion(super.primaryContainer(), '2025', color2025);\n }\n onPrimaryContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_primary_container',\n palette: (s) => s.primaryPalette,\n background: (s) => this.primaryContainer(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(6) : getCurve(7),\n });\n return extendSpecVersion(super.onPrimaryContainer(), '2025', color2025);\n }\n primaryFixed() {\n const color2025 = DynamicColor.fromPalette({\n name: 'primary_fixed',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n let tempS = Object.assign({}, s, { isDark: false, contrastLevel: 0 });\n return this.primaryContainer().getTone(tempS);\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) : undefined,\n contrastCurve: (s) => s.platform === 'phone' && s.contrastLevel > 0 ?\n getCurve(1.5) :\n undefined,\n });\n return extendSpecVersion(super.primaryFixed(), '2025', color2025);\n }\n primaryFixedDim() {\n const color2025 = DynamicColor.fromPalette({\n name: 'primary_fixed_dim',\n palette: (s) => s.primaryPalette,\n tone: (s) => this.primaryFixed().getTone(s),\n isBackground: true,\n toneDeltaPair: (s) => new ToneDeltaPair(this.primaryFixedDim(), this.primaryFixed(), 5, 'darker', true, 'exact'),\n });\n return extendSpecVersion(super.primaryFixedDim(), '2025', color2025);\n }\n onPrimaryFixed() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_primary_fixed',\n palette: (s) => s.primaryPalette,\n background: (s) => this.primaryFixedDim(),\n contrastCurve: (s) => getCurve(7),\n });\n return extendSpecVersion(super.onPrimaryFixed(), '2025', color2025);\n }\n onPrimaryFixedVariant() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_primary_fixed_variant',\n palette: (s) => s.primaryPalette,\n background: (s) => this.primaryFixedDim(),\n contrastCurve: (s) => getCurve(4.5),\n });\n return extendSpecVersion(super.onPrimaryFixedVariant(), '2025', color2025);\n }\n inversePrimary() {\n const color2025 = DynamicColor.fromPalette({\n name: 'inverse_primary',\n palette: (s) => s.primaryPalette,\n tone: (s) => tMaxC(s.primaryPalette),\n background: (s) => this.inverseSurface(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(6) : getCurve(7),\n });\n return extendSpecVersion(super.inversePrimary(), '2025', color2025);\n }\n ////////////////////////////////////////////////////////////////\n // Secondaries [Q] //\n ////////////////////////////////////////////////////////////////\n secondary() {\n const color2025 = DynamicColor.fromPalette({\n name: 'secondary',\n palette: (s) => s.secondaryPalette,\n tone: (s) => {\n if (s.platform === 'watch') {\n return s.variant === Variant.NEUTRAL ?\n 90 :\n tMaxC(s.secondaryPalette, 0, 90);\n }\n else if (s.variant === Variant.NEUTRAL) {\n return s.isDark ? tMinC(s.secondaryPalette, 0, 98) :\n tMaxC(s.secondaryPalette);\n }\n else if (s.variant === Variant.VIBRANT) {\n return tMaxC(s.secondaryPalette, 0, s.isDark ? 90 : 98);\n }\n else { // EXPRESSIVE and TONAL_SPOT\n return s.isDark ? 80 : tMaxC(s.secondaryPalette);\n }\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(4.5) : getCurve(7),\n toneDeltaPair: (s) => s.platform === 'phone' ?\n new ToneDeltaPair(this.secondaryContainer(), this.secondary(), 5, 'relative_lighter', true, 'farther') :\n undefined,\n });\n return extendSpecVersion(super.secondary(), '2025', color2025);\n }\n secondaryDim() {\n return DynamicColor.fromPalette({\n name: 'secondary_dim',\n palette: (s) => s.secondaryPalette,\n tone: (s) => {\n if (s.variant === Variant.NEUTRAL) {\n return 85;\n }\n else {\n return tMaxC(s.secondaryPalette, 0, 90);\n }\n },\n isBackground: true,\n background: (s) => this.surfaceContainerHigh(),\n contrastCurve: (s) => getCurve(4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.secondaryDim(), this.secondary(), 5, 'darker', true, 'farther'),\n });\n }\n onSecondary() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_secondary',\n palette: (s) => s.secondaryPalette,\n background: (s) => s.platform === 'phone' ? this.secondary() : this.secondaryDim(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(6) : getCurve(7),\n });\n return extendSpecVersion(super.onSecondary(), '2025', color2025);\n }\n secondaryContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'secondary_container',\n palette: (s) => s.secondaryPalette,\n tone: (s) => {\n if (s.platform === 'watch') {\n return 30;\n }\n else if (s.variant === Variant.VIBRANT) {\n return s.isDark ? tMinC(s.secondaryPalette, 30, 40) :\n tMaxC(s.secondaryPalette, 84, 90);\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return s.isDark ? 15 : tMaxC(s.secondaryPalette, 90, 95);\n }\n else {\n return s.isDark ? 25 : 90;\n }\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) : undefined,\n toneDeltaPair: (s) => s.platform === 'watch' ?\n new ToneDeltaPair(this.secondaryContainer(), this.secondaryDim(), 10, 'darker', true, 'farther') :\n undefined,\n contrastCurve: (s) => s.platform === 'phone' && s.contrastLevel > 0 ?\n getCurve(1.5) :\n undefined,\n });\n return extendSpecVersion(super.secondaryContainer(), '2025', color2025);\n }\n onSecondaryContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_secondary_container',\n palette: (s) => s.secondaryPalette,\n background: (s) => this.secondaryContainer(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(6) : getCurve(7),\n });\n return extendSpecVersion(super.onSecondaryContainer(), '2025', color2025);\n }\n secondaryFixed() {\n const color2025 = DynamicColor.fromPalette({\n name: 'secondary_fixed',\n palette: (s) => s.secondaryPalette,\n tone: (s) => {\n let tempS = Object.assign({}, s, { isDark: false, contrastLevel: 0 });\n return this.secondaryContainer().getTone(tempS);\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) : undefined,\n contrastCurve: (s) => s.platform === 'phone' && s.contrastLevel > 0 ?\n getCurve(1.5) :\n undefined,\n });\n return extendSpecVersion(super.secondaryFixed(), '2025', color2025);\n }\n secondaryFixedDim() {\n const color2025 = DynamicColor.fromPalette({\n name: 'secondary_fixed_dim',\n palette: (s) => s.secondaryPalette,\n tone: (s) => this.secondaryFixed().getTone(s),\n isBackground: true,\n toneDeltaPair: (s) => new ToneDeltaPair(this.secondaryFixedDim(), this.secondaryFixed(), 5, 'darker', true, 'exact'),\n });\n return extendSpecVersion(super.secondaryFixedDim(), '2025', color2025);\n }\n onSecondaryFixed() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_secondary_fixed',\n palette: (s) => s.secondaryPalette,\n background: (s) => this.secondaryFixedDim(),\n contrastCurve: (s) => getCurve(7),\n });\n return extendSpecVersion(super.onSecondaryFixed(), '2025', color2025);\n }\n onSecondaryFixedVariant() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_secondary_fixed_variant',\n palette: (s) => s.secondaryPalette,\n background: (s) => this.secondaryFixedDim(),\n contrastCurve: (s) => getCurve(4.5),\n });\n return extendSpecVersion(super.onSecondaryFixedVariant(), '2025', color2025);\n }\n ////////////////////////////////////////////////////////////////\n // Tertiaries [T] //\n ////////////////////////////////////////////////////////////////\n tertiary() {\n const color2025 = DynamicColor.fromPalette({\n name: 'tertiary',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (s.platform === 'watch') {\n return s.variant === Variant.TONAL_SPOT ?\n tMaxC(s.tertiaryPalette, 0, 90) :\n tMaxC(s.tertiaryPalette);\n }\n else if (s.variant === Variant.EXPRESSIVE || s.variant === Variant.VIBRANT) {\n return tMaxC(s.tertiaryPalette, 0, Hct.isCyan(s.tertiaryPalette.hue) ? 88 : (s.isDark ? 98 : 100));\n }\n else { // NEUTRAL and TONAL_SPOT\n return s.isDark ? tMaxC(s.tertiaryPalette, 0, 98) :\n tMaxC(s.tertiaryPalette);\n }\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(4.5) : getCurve(7),\n toneDeltaPair: (s) => s.platform === 'phone' ?\n new ToneDeltaPair(this.tertiaryContainer(), this.tertiary(), 5, 'relative_lighter', true, 'farther') :\n undefined,\n });\n return extendSpecVersion(super.tertiary(), '2025', color2025);\n }\n tertiaryDim() {\n return DynamicColor.fromPalette({\n name: 'tertiary_dim',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (s.variant === Variant.TONAL_SPOT) {\n return tMaxC(s.tertiaryPalette, 0, 90);\n }\n else {\n return tMaxC(s.tertiaryPalette);\n }\n },\n isBackground: true,\n background: (s) => this.surfaceContainerHigh(),\n contrastCurve: (s) => getCurve(4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryDim(), this.tertiary(), 5, 'darker', true, 'farther'),\n });\n }\n onTertiary() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_tertiary',\n palette: (s) => s.tertiaryPalette,\n background: (s) => s.platform === 'phone' ? this.tertiary() : this.tertiaryDim(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(6) : getCurve(7),\n });\n return extendSpecVersion(super.onTertiary(), '2025', color2025);\n }\n tertiaryContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'tertiary_container',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (s.platform === 'watch') {\n return s.variant === Variant.TONAL_SPOT ?\n tMaxC(s.tertiaryPalette, 0, 90) :\n tMaxC(s.tertiaryPalette);\n }\n else {\n if (s.variant === Variant.NEUTRAL) {\n return s.isDark ? tMaxC(s.tertiaryPalette, 0, 93) :\n tMaxC(s.tertiaryPalette, 0, 96);\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return tMaxC(s.tertiaryPalette, 0, s.isDark ? 93 : 100);\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return tMaxC(s.tertiaryPalette, 75, Hct.isCyan(s.tertiaryPalette.hue) ? 88 : (s.isDark ? 93 : 100));\n }\n else { // VIBRANT\n return s.isDark ? tMaxC(s.tertiaryPalette, 0, 93) :\n tMaxC(s.tertiaryPalette, 72, 100);\n }\n }\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) : undefined,\n toneDeltaPair: (s) => s.platform === 'watch' ?\n new ToneDeltaPair(this.tertiaryContainer(), this.tertiaryDim(), 10, 'darker', true, 'farther') :\n undefined,\n contrastCurve: (s) => s.platform === 'phone' && s.contrastLevel > 0 ?\n getCurve(1.5) :\n undefined,\n });\n return extendSpecVersion(super.tertiaryContainer(), '2025', color2025);\n }\n onTertiaryContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_tertiary_container',\n palette: (s) => s.tertiaryPalette,\n background: (s) => this.tertiaryContainer(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(6) : getCurve(7),\n });\n return extendSpecVersion(super.onTertiaryContainer(), '2025', color2025);\n }\n tertiaryFixed() {\n const color2025 = DynamicColor.fromPalette({\n name: 'tertiary_fixed',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n let tempS = Object.assign({}, s, { isDark: false, contrastLevel: 0 });\n return this.tertiaryContainer().getTone(tempS);\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) : undefined,\n contrastCurve: (s) => s.platform === 'phone' && s.contrastLevel > 0 ?\n getCurve(1.5) :\n undefined,\n });\n return extendSpecVersion(super.tertiaryFixed(), '2025', color2025);\n }\n tertiaryFixedDim() {\n const color2025 = DynamicColor.fromPalette({\n name: 'tertiary_fixed_dim',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => this.tertiaryFixed().getTone(s),\n isBackground: true,\n toneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryFixedDim(), this.tertiaryFixed(), 5, 'darker', true, 'exact'),\n });\n return extendSpecVersion(super.tertiaryFixedDim(), '2025', color2025);\n }\n onTertiaryFixed() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_tertiary_fixed',\n palette: (s) => s.tertiaryPalette,\n background: (s) => this.tertiaryFixedDim(),\n contrastCurve: (s) => getCurve(7),\n });\n return extendSpecVersion(super.onTertiaryFixed(), '2025', color2025);\n }\n onTertiaryFixedVariant() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_tertiary_fixed_variant',\n palette: (s) => s.tertiaryPalette,\n background: (s) => this.tertiaryFixedDim(),\n contrastCurve: (s) => getCurve(4.5),\n });\n return extendSpecVersion(super.onTertiaryFixedVariant(), '2025', color2025);\n }\n ////////////////////////////////////////////////////////////////\n // Errors [E] //\n ////////////////////////////////////////////////////////////////\n error() {\n const color2025 = DynamicColor.fromPalette({\n name: 'error',\n palette: (s) => s.errorPalette,\n tone: (s) => {\n if (s.platform === 'phone') {\n return s.isDark ? tMinC(s.errorPalette, 0, 98) :\n tMaxC(s.errorPalette);\n }\n else {\n return tMinC(s.errorPalette);\n }\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(4.5) : getCurve(7),\n toneDeltaPair: (s) => s.platform === 'phone' ?\n new ToneDeltaPair(this.errorContainer(), this.error(), 5, 'relative_lighter', true, 'farther') :\n undefined,\n });\n return extendSpecVersion(super.error(), '2025', color2025);\n }\n errorDim() {\n return DynamicColor.fromPalette({\n name: 'error_dim',\n palette: (s) => s.errorPalette,\n tone: (s) => tMinC(s.errorPalette),\n isBackground: true,\n background: (s) => this.surfaceContainerHigh(),\n contrastCurve: (s) => getCurve(4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.errorDim(), this.error(), 5, 'darker', true, 'farther'),\n });\n }\n onError() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_error',\n palette: (s) => s.errorPalette,\n background: (s) => s.platform === 'phone' ? this.error() : this.errorDim(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(6) : getCurve(7),\n });\n return extendSpecVersion(super.onError(), '2025', color2025);\n }\n errorContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'error_container',\n palette: (s) => s.errorPalette,\n tone: (s) => {\n if (s.platform === 'watch') {\n return 30;\n }\n else {\n return s.isDark ? tMinC(s.errorPalette, 30, 93) :\n tMaxC(s.errorPalette, 0, 90);\n }\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) : undefined,\n toneDeltaPair: (s) => s.platform === 'watch' ?\n new ToneDeltaPair(this.errorContainer(), this.errorDim(), 10, 'darker', true, 'farther') :\n undefined,\n contrastCurve: (s) => s.platform === 'phone' && s.contrastLevel > 0 ?\n getCurve(1.5) :\n undefined,\n });\n return extendSpecVersion(super.errorContainer(), '2025', color2025);\n }\n onErrorContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_error_container',\n palette: (s) => s.errorPalette,\n background: (s) => this.errorContainer(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(4.5) : getCurve(7),\n });\n return extendSpecVersion(super.onErrorContainer(), '2025', color2025);\n }\n /////////////////////////////////////////////////////////////////\n // Remapped Colors //\n /////////////////////////////////////////////////////////////////\n surfaceVariant() {\n const color2025 = Object.assign(this.surfaceContainerHighest().clone(), { name: 'surface_variant' });\n return extendSpecVersion(super.surfaceVariant(), '2025', color2025);\n }\n surfaceTint() {\n const color2025 = Object.assign(this.primary().clone(), { name: 'surface_tint' });\n return extendSpecVersion(super.surfaceTint(), '2025', color2025);\n }\n background() {\n const color2025 = Object.assign(this.surface().clone(), { name: 'background' });\n return extendSpecVersion(super.background(), '2025', color2025);\n }\n onBackground() {\n const color2025 = Object.assign(this.onSurface().clone(), {\n name: 'on_background',\n tone: (s) => {\n return s.platform === 'watch' ? 100.0 : this.onSurface().getTone(s);\n }\n });\n return extendSpecVersion(super.onBackground(), '2025', color2025);\n }\n}\n//# sourceMappingURL=color_spec_2025.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ColorSpecDelegateImpl2025 } from './color_spec_2025.js';\n/**\n * DynamicColors for the colors in the Material Design system.\n */\n// Material Color Utilities namespaces the various utilities it provides.\n// tslint:disable-next-line:class-as-namespace\nexport class MaterialDynamicColors {\n constructor() {\n ////////////////////////////////////////////////////////////////\n // All Colors //\n ////////////////////////////////////////////////////////////////\n this.allColors = [\n this.background(),\n this.onBackground(),\n this.surface(),\n this.surfaceDim(),\n this.surfaceBright(),\n this.surfaceContainerLowest(),\n this.surfaceContainerLow(),\n this.surfaceContainer(),\n this.surfaceContainerHigh(),\n this.surfaceContainerHighest(),\n this.onSurface(),\n this.onSurfaceVariant(),\n this.outline(),\n this.outlineVariant(),\n this.inverseSurface(),\n this.inverseOnSurface(),\n this.primary(),\n this.primaryDim(),\n this.onPrimary(),\n this.primaryContainer(),\n this.onPrimaryContainer(),\n this.primaryFixed(),\n this.primaryFixedDim(),\n this.onPrimaryFixed(),\n this.onPrimaryFixedVariant(),\n this.inversePrimary(),\n this.secondary(),\n this.secondaryDim(),\n this.onSecondary(),\n this.secondaryContainer(),\n this.onSecondaryContainer(),\n this.secondaryFixed(),\n this.secondaryFixedDim(),\n this.onSecondaryFixed(),\n this.onSecondaryFixedVariant(),\n this.tertiary(),\n this.tertiaryDim(),\n this.onTertiary(),\n this.tertiaryContainer(),\n this.onTertiaryContainer(),\n this.tertiaryFixed(),\n this.tertiaryFixedDim(),\n this.onTertiaryFixed(),\n this.onTertiaryFixedVariant(),\n this.error(),\n this.errorDim(),\n this.onError(),\n this.errorContainer(),\n this.onErrorContainer(),\n ].filter((c) => c !== undefined);\n }\n highestSurface(s) {\n return MaterialDynamicColors.colorSpec.highestSurface(s);\n }\n ////////////////////////////////////////////////////////////////\n // Main Palettes //\n ////////////////////////////////////////////////////////////////\n primaryPaletteKeyColor() {\n return MaterialDynamicColors.colorSpec.primaryPaletteKeyColor();\n }\n secondaryPaletteKeyColor() {\n return MaterialDynamicColors.colorSpec.secondaryPaletteKeyColor();\n }\n tertiaryPaletteKeyColor() {\n return MaterialDynamicColors.colorSpec.tertiaryPaletteKeyColor();\n }\n neutralPaletteKeyColor() {\n return MaterialDynamicColors.colorSpec.neutralPaletteKeyColor();\n }\n neutralVariantPaletteKeyColor() {\n return MaterialDynamicColors.colorSpec.neutralVariantPaletteKeyColor();\n }\n errorPaletteKeyColor() {\n return MaterialDynamicColors.colorSpec.errorPaletteKeyColor();\n }\n ////////////////////////////////////////////////////////////////\n // Surfaces [S] //\n ////////////////////////////////////////////////////////////////\n background() {\n return MaterialDynamicColors.colorSpec.background();\n }\n onBackground() {\n return MaterialDynamicColors.colorSpec.onBackground();\n }\n surface() {\n return MaterialDynamicColors.colorSpec.surface();\n }\n surfaceDim() {\n return MaterialDynamicColors.colorSpec.surfaceDim();\n }\n surfaceBright() {\n return MaterialDynamicColors.colorSpec.surfaceBright();\n }\n surfaceContainerLowest() {\n return MaterialDynamicColors.colorSpec.surfaceContainerLowest();\n }\n surfaceContainerLow() {\n return MaterialDynamicColors.colorSpec.surfaceContainerLow();\n }\n surfaceContainer() {\n return MaterialDynamicColors.colorSpec.surfaceContainer();\n }\n surfaceContainerHigh() {\n return MaterialDynamicColors.colorSpec.surfaceContainerHigh();\n }\n surfaceContainerHighest() {\n return MaterialDynamicColors.colorSpec.surfaceContainerHighest();\n }\n onSurface() {\n return MaterialDynamicColors.colorSpec.onSurface();\n }\n surfaceVariant() {\n return MaterialDynamicColors.colorSpec.surfaceVariant();\n }\n onSurfaceVariant() {\n return MaterialDynamicColors.colorSpec.onSurfaceVariant();\n }\n outline() {\n return MaterialDynamicColors.colorSpec.outline();\n }\n outlineVariant() {\n return MaterialDynamicColors.colorSpec.outlineVariant();\n }\n inverseSurface() {\n return MaterialDynamicColors.colorSpec.inverseSurface();\n }\n inverseOnSurface() {\n return MaterialDynamicColors.colorSpec.inverseOnSurface();\n }\n shadow() {\n return MaterialDynamicColors.colorSpec.shadow();\n }\n scrim() {\n return MaterialDynamicColors.colorSpec.scrim();\n }\n surfaceTint() {\n return MaterialDynamicColors.colorSpec.surfaceTint();\n }\n ////////////////////////////////////////////////////////////////\n // Primaries [P] //\n ////////////////////////////////////////////////////////////////\n primary() {\n return MaterialDynamicColors.colorSpec.primary();\n }\n primaryDim() {\n return MaterialDynamicColors.colorSpec.primaryDim();\n }\n onPrimary() {\n return MaterialDynamicColors.colorSpec.onPrimary();\n }\n primaryContainer() {\n return MaterialDynamicColors.colorSpec.primaryContainer();\n }\n onPrimaryContainer() {\n return MaterialDynamicColors.colorSpec.onPrimaryContainer();\n }\n inversePrimary() {\n return MaterialDynamicColors.colorSpec.inversePrimary();\n }\n /////////////////////////////////////////////////////////////////\n // Primary Fixed [PF] //\n /////////////////////////////////////////////////////////////////\n primaryFixed() {\n return MaterialDynamicColors.colorSpec.primaryFixed();\n }\n primaryFixedDim() {\n return MaterialDynamicColors.colorSpec.primaryFixedDim();\n }\n onPrimaryFixed() {\n return MaterialDynamicColors.colorSpec.onPrimaryFixed();\n }\n onPrimaryFixedVariant() {\n return MaterialDynamicColors.colorSpec.onPrimaryFixedVariant();\n }\n ////////////////////////////////////////////////////////////////\n // Secondaries [Q] //\n ////////////////////////////////////////////////////////////////\n secondary() {\n return MaterialDynamicColors.colorSpec.secondary();\n }\n secondaryDim() {\n return MaterialDynamicColors.colorSpec.secondaryDim();\n }\n onSecondary() {\n return MaterialDynamicColors.colorSpec.onSecondary();\n }\n secondaryContainer() {\n return MaterialDynamicColors.colorSpec.secondaryContainer();\n }\n onSecondaryContainer() {\n return MaterialDynamicColors.colorSpec.onSecondaryContainer();\n }\n /////////////////////////////////////////////////////////////////\n // Secondary Fixed [QF] //\n /////////////////////////////////////////////////////////////////\n secondaryFixed() {\n return MaterialDynamicColors.colorSpec.secondaryFixed();\n }\n secondaryFixedDim() {\n return MaterialDynamicColors.colorSpec.secondaryFixedDim();\n }\n onSecondaryFixed() {\n return MaterialDynamicColors.colorSpec.onSecondaryFixed();\n }\n onSecondaryFixedVariant() {\n return MaterialDynamicColors.colorSpec.onSecondaryFixedVariant();\n }\n ////////////////////////////////////////////////////////////////\n // Tertiaries [T] //\n ////////////////////////////////////////////////////////////////\n tertiary() {\n return MaterialDynamicColors.colorSpec.tertiary();\n }\n tertiaryDim() {\n return MaterialDynamicColors.colorSpec.tertiaryDim();\n }\n onTertiary() {\n return MaterialDynamicColors.colorSpec.onTertiary();\n }\n tertiaryContainer() {\n return MaterialDynamicColors.colorSpec.tertiaryContainer();\n }\n onTertiaryContainer() {\n return MaterialDynamicColors.colorSpec.onTertiaryContainer();\n }\n /////////////////////////////////////////////////////////////////\n // Tertiary Fixed [TF] //\n /////////////////////////////////////////////////////////////////\n tertiaryFixed() {\n return MaterialDynamicColors.colorSpec.tertiaryFixed();\n }\n tertiaryFixedDim() {\n return MaterialDynamicColors.colorSpec.tertiaryFixedDim();\n }\n onTertiaryFixed() {\n return MaterialDynamicColors.colorSpec.onTertiaryFixed();\n }\n onTertiaryFixedVariant() {\n return MaterialDynamicColors.colorSpec.onTertiaryFixedVariant();\n }\n ////////////////////////////////////////////////////////////////\n // Errors [E] //\n ////////////////////////////////////////////////////////////////\n error() {\n return MaterialDynamicColors.colorSpec.error();\n }\n errorDim() {\n return MaterialDynamicColors.colorSpec.errorDim();\n }\n onError() {\n return MaterialDynamicColors.colorSpec.onError();\n }\n errorContainer() {\n return MaterialDynamicColors.colorSpec.errorContainer();\n }\n onErrorContainer() {\n return MaterialDynamicColors.colorSpec.onErrorContainer();\n }\n // Static variables are deprecated. Use the instance methods to get correct\n // specs based on request.\n /** @deprecated Use highestSurface() instead. */\n static highestSurface(s) {\n return MaterialDynamicColors.colorSpec.highestSurface(s);\n }\n}\nMaterialDynamicColors.contentAccentToneDelta = 15.0;\nMaterialDynamicColors.colorSpec = new ColorSpecDelegateImpl2025();\n/** @deprecated Use primaryPaletteKeyColor() instead. */\nMaterialDynamicColors.primaryPaletteKeyColor = MaterialDynamicColors.colorSpec.primaryPaletteKeyColor();\n/** @deprecated Use secondaryPaletteKeyColor() instead. */\nMaterialDynamicColors.secondaryPaletteKeyColor = MaterialDynamicColors.colorSpec.secondaryPaletteKeyColor();\n/** @deprecated Use tertiaryPaletteKeyColor() instead. */\nMaterialDynamicColors.tertiaryPaletteKeyColor = MaterialDynamicColors.colorSpec.tertiaryPaletteKeyColor();\n/** @deprecated Use neutralPaletteKeyColor() instead. */\nMaterialDynamicColors.neutralPaletteKeyColor = MaterialDynamicColors.colorSpec.neutralPaletteKeyColor();\n/** @deprecated Use neutralVariantPaletteKeyColor() instead. */\nMaterialDynamicColors.neutralVariantPaletteKeyColor = MaterialDynamicColors.colorSpec.neutralVariantPaletteKeyColor();\n/** @deprecated Use background() instead. */\nMaterialDynamicColors.background = MaterialDynamicColors.colorSpec.background();\n/** @deprecated Use background() instead. */\nMaterialDynamicColors.onBackground = MaterialDynamicColors.colorSpec.onBackground();\n/** @deprecated Use surface() instead. */\nMaterialDynamicColors.surface = MaterialDynamicColors.colorSpec.surface();\n/** @deprecated Use surfaceDim() instead. */\nMaterialDynamicColors.surfaceDim = MaterialDynamicColors.colorSpec.surfaceDim();\n/** @deprecated Use surfaceBright() instead. */\nMaterialDynamicColors.surfaceBright = MaterialDynamicColors.colorSpec.surfaceBright();\n/** @deprecated Use surfaceContainerLowest() instead. */\nMaterialDynamicColors.surfaceContainerLowest = MaterialDynamicColors.colorSpec.surfaceContainerLowest();\n/** @deprecated Use surfaceContainerLow() instead. */\nMaterialDynamicColors.surfaceContainerLow = MaterialDynamicColors.colorSpec.surfaceContainerLow();\n/** @deprecated Use surfaceContainer() instead. */\nMaterialDynamicColors.surfaceContainer = MaterialDynamicColors.colorSpec.surfaceContainer();\n/** @deprecated Use surfaceContainerHigh() instead. */\nMaterialDynamicColors.surfaceContainerHigh = MaterialDynamicColors.colorSpec.surfaceContainerHigh();\n/** @deprecated Use surfaceContainerHighest() instead. */\nMaterialDynamicColors.surfaceContainerHighest = MaterialDynamicColors.colorSpec.surfaceContainerHighest();\n/** @deprecated Use onSurface() instead. */\nMaterialDynamicColors.onSurface = MaterialDynamicColors.colorSpec.onSurface();\n/** @deprecated Use surfaceVariant() instead. */\nMaterialDynamicColors.surfaceVariant = MaterialDynamicColors.colorSpec.surfaceVariant();\n/** @deprecated Use onSurfaceVariant() instead. */\nMaterialDynamicColors.onSurfaceVariant = MaterialDynamicColors.colorSpec.onSurfaceVariant();\n/** @deprecated Use inverseSurface() instead. */\nMaterialDynamicColors.inverseSurface = MaterialDynamicColors.colorSpec.inverseSurface();\n/** @deprecated Use inverseOnSurface() instead. */\nMaterialDynamicColors.inverseOnSurface = MaterialDynamicColors.colorSpec.inverseOnSurface();\n/** @deprecated Use outline() instead. */\nMaterialDynamicColors.outline = MaterialDynamicColors.colorSpec.outline();\n/** @deprecated Use outlineVariant() instead. */\nMaterialDynamicColors.outlineVariant = MaterialDynamicColors.colorSpec.outlineVariant();\n/** @deprecated Use shadow() instead. */\nMaterialDynamicColors.shadow = MaterialDynamicColors.colorSpec.shadow();\n/** @deprecated Use scrim() instead. */\nMaterialDynamicColors.scrim = MaterialDynamicColors.colorSpec.scrim();\n/** @deprecated Use surfaceTint() instead. */\nMaterialDynamicColors.surfaceTint = MaterialDynamicColors.colorSpec.surfaceTint();\n/** @deprecated Use primary() instead. */\nMaterialDynamicColors.primary = MaterialDynamicColors.colorSpec.primary();\n/** @deprecated Use onPrimary() instead. */\nMaterialDynamicColors.onPrimary = MaterialDynamicColors.colorSpec.onPrimary();\n/** @deprecated Use primaryContainer() instead. */\nMaterialDynamicColors.primaryContainer = MaterialDynamicColors.colorSpec.primaryContainer();\n/** @deprecated Use onPrimaryContainer() instead. */\nMaterialDynamicColors.onPrimaryContainer = MaterialDynamicColors.colorSpec.onPrimaryContainer();\n/** @deprecated Use inversePrimary() instead. */\nMaterialDynamicColors.inversePrimary = MaterialDynamicColors.colorSpec.inversePrimary();\n/** @deprecated Use secondary() instead. */\nMaterialDynamicColors.secondary = MaterialDynamicColors.colorSpec.secondary();\n/** @deprecated Use onSecondary() instead. */\nMaterialDynamicColors.onSecondary = MaterialDynamicColors.colorSpec.onSecondary();\n/** @deprecated Use secondaryContainer() instead. */\nMaterialDynamicColors.secondaryContainer = MaterialDynamicColors.colorSpec.secondaryContainer();\n/** @deprecated Use onSecondaryContainer() instead. */\nMaterialDynamicColors.onSecondaryContainer = MaterialDynamicColors.colorSpec.onSecondaryContainer();\n/** @deprecated Use tertiary() instead. */\nMaterialDynamicColors.tertiary = MaterialDynamicColors.colorSpec.tertiary();\n/** @deprecated Use onTertiary() instead. */\nMaterialDynamicColors.onTertiary = MaterialDynamicColors.colorSpec.onTertiary();\n/** @deprecated Use tertiaryContainer() instead. */\nMaterialDynamicColors.tertiaryContainer = MaterialDynamicColors.colorSpec.tertiaryContainer();\n/** @deprecated Use onTertiaryContainer() instead. */\nMaterialDynamicColors.onTertiaryContainer = MaterialDynamicColors.colorSpec.onTertiaryContainer();\n/** @deprecated Use error() instead. */\nMaterialDynamicColors.error = MaterialDynamicColors.colorSpec.error();\n/** @deprecated Use onError() instead. */\nMaterialDynamicColors.onError = MaterialDynamicColors.colorSpec.onError();\n/** @deprecated Use errorContainer() instead. */\nMaterialDynamicColors.errorContainer = MaterialDynamicColors.colorSpec.errorContainer();\n/** @deprecated Use onErrorContainer() instead. */\nMaterialDynamicColors.onErrorContainer = MaterialDynamicColors.colorSpec.onErrorContainer();\n/** @deprecated Use primaryFixed() instead. */\nMaterialDynamicColors.primaryFixed = MaterialDynamicColors.colorSpec.primaryFixed();\n/** @deprecated Use primaryFixedDim() instead. */\nMaterialDynamicColors.primaryFixedDim = MaterialDynamicColors.colorSpec.primaryFixedDim();\n/** @deprecated Use onPrimaryFixed() instead. */\nMaterialDynamicColors.onPrimaryFixed = MaterialDynamicColors.colorSpec.onPrimaryFixed();\n/** @deprecated Use onPrimaryFixedVariant() instead. */\nMaterialDynamicColors.onPrimaryFixedVariant = MaterialDynamicColors.colorSpec.onPrimaryFixedVariant();\n/** @deprecated Use secondaryFixed() instead. */\nMaterialDynamicColors.secondaryFixed = MaterialDynamicColors.colorSpec.secondaryFixed();\n/** @deprecated Use secondaryFixedDim() instead. */\nMaterialDynamicColors.secondaryFixedDim = MaterialDynamicColors.colorSpec.secondaryFixedDim();\n/** @deprecated Use onSecondaryFixed() instead. */\nMaterialDynamicColors.onSecondaryFixed = MaterialDynamicColors.colorSpec.onSecondaryFixed();\n/** @deprecated Use onSecondaryFixedVariant() instead. */\nMaterialDynamicColors.onSecondaryFixedVariant = MaterialDynamicColors.colorSpec.onSecondaryFixedVariant();\n/** @deprecated Use tertiaryFixed() instead. */\nMaterialDynamicColors.tertiaryFixed = MaterialDynamicColors.colorSpec.tertiaryFixed();\n/** @deprecated Use tertiaryFixedDim() instead. */\nMaterialDynamicColors.tertiaryFixedDim = MaterialDynamicColors.colorSpec.tertiaryFixedDim();\n/** @deprecated Use onTertiaryFixed() instead. */\nMaterialDynamicColors.onTertiaryFixed = MaterialDynamicColors.colorSpec.onTertiaryFixed();\n/** @deprecated Use onTertiaryFixedVariant() instead. */\nMaterialDynamicColors.onTertiaryFixedVariant = MaterialDynamicColors.colorSpec.onTertiaryFixedVariant();\n//# sourceMappingURL=material_dynamic_colors.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DislikeAnalyzer } from '../dislike/dislike_analyzer.js';\nimport { Hct } from '../hct/hct.js';\nimport { TonalPalette } from '../palettes/tonal_palette.js';\nimport { TemperatureCache } from '../temperature/temperature_cache.js';\nimport * as math from '../utils/math_utils.js';\nimport { MaterialDynamicColors } from './material_dynamic_colors.js';\nimport { Variant } from './variant.js';\n/**\n * Constructed by a set of values representing the current UI state (such as\n * whether or not its dark theme, what the theme style is, etc.), and\n * provides a set of TonalPalettes that can create colors that fit in\n * with the theme style. Used by DynamicColor to resolve into a color.\n */\nexport class DynamicScheme {\n static maybeFallbackSpecVersion(specVersion, variant) {\n switch (variant) {\n case Variant.EXPRESSIVE:\n case Variant.VIBRANT:\n case Variant.TONAL_SPOT:\n case Variant.NEUTRAL:\n return specVersion;\n default:\n return '2021';\n }\n }\n constructor(args) {\n this.sourceColorArgb = args.sourceColorHct.toInt();\n this.variant = args.variant;\n this.contrastLevel = args.contrastLevel;\n this.isDark = args.isDark;\n this.platform = args.platform ?? 'phone';\n this.specVersion = DynamicScheme.maybeFallbackSpecVersion(args.specVersion ?? '2021', this.variant);\n this.sourceColorHct = args.sourceColorHct;\n this.primaryPalette = args.primaryPalette ??\n getSpec(this.specVersion)\n .getPrimaryPalette(this.variant, args.sourceColorHct, this.isDark, this.platform, this.contrastLevel);\n this.secondaryPalette = args.secondaryPalette ??\n getSpec(this.specVersion)\n .getSecondaryPalette(this.variant, args.sourceColorHct, this.isDark, this.platform, this.contrastLevel);\n this.tertiaryPalette = args.tertiaryPalette ??\n getSpec(this.specVersion)\n .getTertiaryPalette(this.variant, args.sourceColorHct, this.isDark, this.platform, this.contrastLevel);\n this.neutralPalette = args.neutralPalette ??\n getSpec(this.specVersion)\n .getNeutralPalette(this.variant, args.sourceColorHct, this.isDark, this.platform, this.contrastLevel);\n this.neutralVariantPalette = args.neutralVariantPalette ??\n getSpec(this.specVersion)\n .getNeutralVariantPalette(this.variant, args.sourceColorHct, this.isDark, this.platform, this.contrastLevel);\n this.errorPalette = args.errorPalette ??\n getSpec(this.specVersion)\n .getErrorPalette(this.variant, args.sourceColorHct, this.isDark, this.platform, this.contrastLevel) ??\n TonalPalette.fromHueAndChroma(25.0, 84.0);\n this.colors = new MaterialDynamicColors();\n }\n toString() {\n return `Scheme: ` +\n `variant=${Variant[this.variant]}, ` +\n `mode=${this.isDark ? 'dark' : 'light'}, ` +\n `platform=${this.platform}, ` +\n `contrastLevel=${this.contrastLevel.toFixed(1)}, ` +\n `seed=${this.sourceColorHct.toString()}, ` +\n `specVersion=${this.specVersion}`;\n }\n /**\n * Returns a new hue based on a piecewise function and input color hue.\n *\n * For example, for the following function:\n * result = 26 if 0 <= hue < 101\n * result = 39 if 101 <= hue < 210\n * result = 28 if 210 <= hue < 360\n *\n * call the function as:\n *\n * const hueBreakpoints = [0, 101, 210, 360];\n * const hues = [26, 39, 28];\n * const result = scheme.piecewise(hue, hueBreakpoints, hues);\n *\n * @param sourceColorHct The input value.\n * @param hueBreakpoints The breakpoints, in sorted order. No default lower or\n * upper bounds are assumed.\n * @param hues The hues that should be applied when source color's hue is >=\n * the same index in hueBrakpoints array, and < the hue at the next index\n * in hueBrakpoints array. Otherwise, the source color's hue is returned.\n */\n static getPiecewiseHue(sourceColorHct, hueBreakpoints, hues) {\n const size = Math.min(hueBreakpoints.length - 1, hues.length);\n const sourceHue = sourceColorHct.hue;\n for (let i = 0; i < size; i++) {\n if (sourceHue >= hueBreakpoints[i] && sourceHue < hueBreakpoints[i + 1]) {\n return math.sanitizeDegreesDouble(hues[i]);\n }\n }\n // No condition matched, return the source hue.\n return sourceHue;\n }\n /**\n * Returns a shifted hue based on a piecewise function and input color hue.\n *\n * For example, for the following function:\n * result = hue + 26 if 0 <= hue < 101\n * result = hue - 39 if 101 <= hue < 210\n * result = hue + 28 if 210 <= hue < 360\n *\n * call the function as:\n *\n * const hueBreakpoints = [0, 101, 210, 360];\n * const hues = [26, -39, 28];\n * const result = scheme.getRotatedHue(hue, hueBreakpoints, hues);\n *\n * @param sourceColorHct the source color of the theme, in HCT.\n * @param hueBreakpoints The \"breakpoints\", i.e. the hues at which a rotation\n * should be apply. No default lower or upper bounds are assumed.\n * @param rotations The rotation that should be applied when source color's\n * hue is >= the same index in hues array, and < the hue at the next\n * index in hues array. Otherwise, the source color's hue is returned.\n */\n static getRotatedHue(sourceColorHct, hueBreakpoints, rotations) {\n let rotation = DynamicScheme.getPiecewiseHue(sourceColorHct, hueBreakpoints, rotations);\n if (Math.min(hueBreakpoints.length - 1, rotations.length) <= 0) {\n // No condition matched, return the source hue.\n rotation = 0;\n }\n return math.sanitizeDegreesDouble(sourceColorHct.hue + rotation);\n }\n getArgb(dynamicColor) {\n return dynamicColor.getArgb(this);\n }\n getHct(dynamicColor) {\n return dynamicColor.getHct(this);\n }\n // Palette key colors\n get primaryPaletteKeyColor() {\n return this.getArgb(this.colors.primaryPaletteKeyColor());\n }\n get secondaryPaletteKeyColor() {\n return this.getArgb(this.colors.secondaryPaletteKeyColor());\n }\n get tertiaryPaletteKeyColor() {\n return this.getArgb(this.colors.tertiaryPaletteKeyColor());\n }\n get neutralPaletteKeyColor() {\n return this.getArgb(this.colors.neutralPaletteKeyColor());\n }\n get neutralVariantPaletteKeyColor() {\n return this.getArgb(this.colors.neutralVariantPaletteKeyColor());\n }\n get errorPaletteKeyColor() {\n return this.getArgb(this.colors.errorPaletteKeyColor());\n }\n // Surface colors\n get background() {\n return this.getArgb(this.colors.background());\n }\n get onBackground() {\n return this.getArgb(this.colors.onBackground());\n }\n get surface() {\n return this.getArgb(this.colors.surface());\n }\n get surfaceDim() {\n return this.getArgb(this.colors.surfaceDim());\n }\n get surfaceBright() {\n return this.getArgb(this.colors.surfaceBright());\n }\n get surfaceContainerLowest() {\n return this.getArgb(this.colors.surfaceContainerLowest());\n }\n get surfaceContainerLow() {\n return this.getArgb(this.colors.surfaceContainerLow());\n }\n get surfaceContainer() {\n return this.getArgb(this.colors.surfaceContainer());\n }\n get surfaceContainerHigh() {\n return this.getArgb(this.colors.surfaceContainerHigh());\n }\n get surfaceContainerHighest() {\n return this.getArgb(this.colors.surfaceContainerHighest());\n }\n get onSurface() {\n return this.getArgb(this.colors.onSurface());\n }\n get surfaceVariant() {\n return this.getArgb(this.colors.surfaceVariant());\n }\n get onSurfaceVariant() {\n return this.getArgb(this.colors.onSurfaceVariant());\n }\n get inverseSurface() {\n return this.getArgb(this.colors.inverseSurface());\n }\n get inverseOnSurface() {\n return this.getArgb(this.colors.inverseOnSurface());\n }\n get outline() {\n return this.getArgb(this.colors.outline());\n }\n get outlineVariant() {\n return this.getArgb(this.colors.outlineVariant());\n }\n get shadow() {\n return this.getArgb(this.colors.shadow());\n }\n get scrim() {\n return this.getArgb(this.colors.scrim());\n }\n get surfaceTint() {\n return this.getArgb(this.colors.surfaceTint());\n }\n // Primary colors\n get primary() {\n return this.getArgb(this.colors.primary());\n }\n get primaryDim() {\n const primaryDim = this.colors.primaryDim();\n if (primaryDim === undefined) {\n throw new Error('`primaryDim` color is undefined prior to 2025 spec.');\n }\n return this.getArgb(primaryDim);\n }\n get onPrimary() {\n return this.getArgb(this.colors.onPrimary());\n }\n get primaryContainer() {\n return this.getArgb(this.colors.primaryContainer());\n }\n get onPrimaryContainer() {\n return this.getArgb(this.colors.onPrimaryContainer());\n }\n get primaryFixed() {\n return this.getArgb(this.colors.primaryFixed());\n }\n get primaryFixedDim() {\n return this.getArgb(this.colors.primaryFixedDim());\n }\n get onPrimaryFixed() {\n return this.getArgb(this.colors.onPrimaryFixed());\n }\n get onPrimaryFixedVariant() {\n return this.getArgb(this.colors.onPrimaryFixedVariant());\n }\n get inversePrimary() {\n return this.getArgb(this.colors.inversePrimary());\n }\n // Secondary colors\n get secondary() {\n return this.getArgb(this.colors.secondary());\n }\n get secondaryDim() {\n const secondaryDim = this.colors.secondaryDim();\n if (secondaryDim === undefined) {\n throw new Error('`secondaryDim` color is undefined prior to 2025 spec.');\n }\n return this.getArgb(secondaryDim);\n }\n get onSecondary() {\n return this.getArgb(this.colors.onSecondary());\n }\n get secondaryContainer() {\n return this.getArgb(this.colors.secondaryContainer());\n }\n get onSecondaryContainer() {\n return this.getArgb(this.colors.onSecondaryContainer());\n }\n get secondaryFixed() {\n return this.getArgb(this.colors.secondaryFixed());\n }\n get secondaryFixedDim() {\n return this.getArgb(this.colors.secondaryFixedDim());\n }\n get onSecondaryFixed() {\n return this.getArgb(this.colors.onSecondaryFixed());\n }\n get onSecondaryFixedVariant() {\n return this.getArgb(this.colors.onSecondaryFixedVariant());\n }\n // Tertiary colors\n get tertiary() {\n return this.getArgb(this.colors.tertiary());\n }\n get tertiaryDim() {\n const tertiaryDim = this.colors.tertiaryDim();\n if (tertiaryDim === undefined) {\n throw new Error('`tertiaryDim` color is undefined prior to 2025 spec.');\n }\n return this.getArgb(tertiaryDim);\n }\n get onTertiary() {\n return this.getArgb(this.colors.onTertiary());\n }\n get tertiaryContainer() {\n return this.getArgb(this.colors.tertiaryContainer());\n }\n get onTertiaryContainer() {\n return this.getArgb(this.colors.onTertiaryContainer());\n }\n get tertiaryFixed() {\n return this.getArgb(this.colors.tertiaryFixed());\n }\n get tertiaryFixedDim() {\n return this.getArgb(this.colors.tertiaryFixedDim());\n }\n get onTertiaryFixed() {\n return this.getArgb(this.colors.onTertiaryFixed());\n }\n get onTertiaryFixedVariant() {\n return this.getArgb(this.colors.onTertiaryFixedVariant());\n }\n // Error colors\n get error() {\n return this.getArgb(this.colors.error());\n }\n get errorDim() {\n const errorDim = this.colors.errorDim();\n if (errorDim === undefined) {\n throw new Error('`errorDim` color is undefined prior to 2025 spec.');\n }\n return this.getArgb(errorDim);\n }\n get onError() {\n return this.getArgb(this.colors.onError());\n }\n get errorContainer() {\n return this.getArgb(this.colors.errorContainer());\n }\n get onErrorContainer() {\n return this.getArgb(this.colors.onErrorContainer());\n }\n}\nDynamicScheme.DEFAULT_SPEC_VERSION = '2021';\nDynamicScheme.DEFAULT_PLATFORM = 'phone';\n/**\n * A delegate for the palettes of a DynamicScheme in the 2021 spec.\n */\nclass DynamicSchemePalettesDelegateImpl2021 {\n //////////////////////////////////////////////////////////////////\n // Scheme Palettes //\n //////////////////////////////////////////////////////////////////\n getPrimaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.CONTENT:\n case Variant.FIDELITY:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, sourceColorHct.chroma);\n case Variant.FRUIT_SALAD:\n return TonalPalette.fromHueAndChroma(math.sanitizeDegreesDouble(sourceColorHct.hue - 50.0), 48.0);\n case Variant.MONOCHROME:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0.0);\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 12.0);\n case Variant.RAINBOW:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 48.0);\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 36.0);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(math.sanitizeDegreesDouble(sourceColorHct.hue + 240), 40);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 200.0);\n default:\n throw new Error(`Unsupported variant: ${variant}`);\n }\n }\n getSecondaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.CONTENT:\n case Variant.FIDELITY:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, Math.max(sourceColorHct.chroma - 32.0, sourceColorHct.chroma * 0.5));\n case Variant.FRUIT_SALAD:\n return TonalPalette.fromHueAndChroma(math.sanitizeDegreesDouble(sourceColorHct.hue - 50.0), 36.0);\n case Variant.MONOCHROME:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0.0);\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 8.0);\n case Variant.RAINBOW:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 16.0);\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 16.0);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 21, 51, 121, 151, 191, 271, 321, 360], [45, 95, 45, 20, 45, 90, 45, 45, 45]), 24.0);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 41, 61, 101, 131, 181, 251, 301, 360], [18, 15, 10, 12, 15, 18, 15, 12, 12]), 24.0);\n default:\n throw new Error(`Unsupported variant: ${variant}`);\n }\n }\n getTertiaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.CONTENT:\n return TonalPalette.fromHct(DislikeAnalyzer.fixIfDisliked(new TemperatureCache(sourceColorHct)\n .analogous(/* count= */ 3, /* divisions= */ 6)[2]));\n case Variant.FIDELITY:\n return TonalPalette.fromHct(DislikeAnalyzer.fixIfDisliked(new TemperatureCache(sourceColorHct).complement));\n case Variant.FRUIT_SALAD:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 36.0);\n case Variant.MONOCHROME:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0.0);\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 16.0);\n case Variant.RAINBOW:\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(math.sanitizeDegreesDouble(sourceColorHct.hue + 60.0), 24.0);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 21, 51, 121, 151, 191, 271, 321, 360], [120, 120, 20, 45, 20, 15, 20, 120, 120]), 32.0);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 41, 61, 101, 131, 181, 251, 301, 360], [35, 30, 20, 25, 30, 35, 30, 25, 25]), 32.0);\n default:\n throw new Error(`Unsupported variant: ${variant}`);\n }\n }\n getNeutralPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.CONTENT:\n case Variant.FIDELITY:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, sourceColorHct.chroma / 8.0);\n case Variant.FRUIT_SALAD:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 10.0);\n case Variant.MONOCHROME:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0.0);\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 2.0);\n case Variant.RAINBOW:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0.0);\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 6.0);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(math.sanitizeDegreesDouble(sourceColorHct.hue + 15), 8);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 10);\n default:\n throw new Error(`Unsupported variant: ${variant}`);\n }\n }\n getNeutralVariantPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.CONTENT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, (sourceColorHct.chroma / 8.0) + 4.0);\n case Variant.FIDELITY:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, (sourceColorHct.chroma / 8.0) + 4.0);\n case Variant.FRUIT_SALAD:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 16.0);\n case Variant.MONOCHROME:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0.0);\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 2.0);\n case Variant.RAINBOW:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0.0);\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 8.0);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(math.sanitizeDegreesDouble(sourceColorHct.hue + 15), 12);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 12);\n default:\n throw new Error(`Unsupported variant: ${variant}`);\n }\n }\n getErrorPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n return undefined;\n }\n}\n/**\n * A delegate for the palettes of a DynamicScheme in the 2025 spec.\n */\nclass DynamicSchemePalettesDelegateImpl2025 extends DynamicSchemePalettesDelegateImpl2021 {\n //////////////////////////////////////////////////////////////////\n // Scheme Palettes //\n //////////////////////////////////////////////////////////////////\n getPrimaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === 'phone' ? (Hct.isBlue(sourceColorHct.hue) ? 12 : 8) :\n (Hct.isBlue(sourceColorHct.hue) ? 16 : 12));\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === 'phone' && isDark ? 26 : 32);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === 'phone' ? (isDark ? 36 : 48) : 40);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === 'phone' ? 74 : 56);\n default:\n return super.getPrimaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n }\n }\n getSecondaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === 'phone' ? (Hct.isBlue(sourceColorHct.hue) ? 6 : 4) :\n (Hct.isBlue(sourceColorHct.hue) ? 10 : 6));\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 16);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 105, 140, 204, 253, 278, 300, 333, 360], [-160, 155, -100, 96, -96, -156, -165, -160]), platform === 'phone' ? (isDark ? 16 : 24) : 24);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 38, 105, 140, 333, 360], [-14, 10, -14, 10, -14]), platform === 'phone' ? 56 : 36);\n default:\n return super.getSecondaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n }\n }\n getTertiaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 38, 105, 161, 204, 278, 333, 360], [-32, 26, 10, -39, 24, -15, -32]), platform === 'phone' ? 20 : 36);\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 20, 71, 161, 333, 360], [-40, 48, -32, 40, -32]), platform === 'phone' ? 28 : 32);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 105, 140, 204, 253, 278, 300, 333, 360], [-165, 160, -105, 101, -101, -160, -170, -165]), 48);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 38, 71, 105, 140, 161, 253, 333, 360], [-72, 35, 24, -24, 62, 50, 62, -72]), 56);\n default:\n return super.getTertiaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n }\n }\n static getExpressiveNeutralHue(sourceColorHct) {\n const hue = DynamicScheme.getRotatedHue(sourceColorHct, [0, 71, 124, 253, 278, 300, 360], [10, 0, 10, 0, 10, 0]);\n return hue;\n }\n static getExpressiveNeutralChroma(sourceColorHct, isDark, platform) {\n const neutralHue = DynamicSchemePalettesDelegateImpl2025.getExpressiveNeutralHue(sourceColorHct);\n return platform === 'phone' ?\n (isDark ? (Hct.isYellow(neutralHue) ? 6 : 14) : 18) :\n 12;\n }\n static getVibrantNeutralHue(sourceColorHct) {\n return DynamicScheme.getRotatedHue(sourceColorHct, [0, 38, 105, 140, 333, 360], [-14, 10, -14, 10, -14]);\n }\n static getVibrantNeutralChroma(sourceColorHct, platform) {\n const neutralHue = DynamicSchemePalettesDelegateImpl2025.getVibrantNeutralHue(sourceColorHct);\n return platform === 'phone' ? 28 : (Hct.isBlue(neutralHue) ? 28 : 20);\n }\n getNeutralPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === 'phone' ? 1.4 : 6);\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === 'phone' ? 5 : 10);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(DynamicSchemePalettesDelegateImpl2025.getExpressiveNeutralHue(sourceColorHct), DynamicSchemePalettesDelegateImpl2025.getExpressiveNeutralChroma(sourceColorHct, isDark, platform));\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(DynamicSchemePalettesDelegateImpl2025.getVibrantNeutralHue(sourceColorHct), DynamicSchemePalettesDelegateImpl2025.getVibrantNeutralChroma(sourceColorHct, platform));\n default:\n return super.getNeutralPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n }\n }\n getNeutralVariantPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, (platform === 'phone' ? 1.4 : 6) * 2.2);\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, (platform === 'phone' ? 5 : 10) * 1.7);\n case Variant.EXPRESSIVE:\n const expressiveNeutralHue = DynamicSchemePalettesDelegateImpl2025.getExpressiveNeutralHue(sourceColorHct);\n const expressiveNeutralChroma = DynamicSchemePalettesDelegateImpl2025.getExpressiveNeutralChroma(sourceColorHct, isDark, platform);\n return TonalPalette.fromHueAndChroma(expressiveNeutralHue, expressiveNeutralChroma *\n (expressiveNeutralHue >= 105 && expressiveNeutralHue < 125 ?\n 1.6 :\n 2.3));\n case Variant.VIBRANT:\n const vibrantNeutralHue = DynamicSchemePalettesDelegateImpl2025.getVibrantNeutralHue(sourceColorHct);\n const vibrantNeutralChroma = DynamicSchemePalettesDelegateImpl2025.getVibrantNeutralChroma(sourceColorHct, platform);\n return TonalPalette.fromHueAndChroma(vibrantNeutralHue, vibrantNeutralChroma * 1.29);\n default:\n return super.getNeutralVariantPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n }\n }\n getErrorPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n const errorHue = DynamicScheme.getPiecewiseHue(sourceColorHct, [0, 3, 13, 23, 33, 43, 153, 273, 360], [12, 22, 32, 12, 22, 32, 22, 12]);\n switch (variant) {\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(errorHue, platform === 'phone' ? 50 : 40);\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(errorHue, platform === 'phone' ? 60 : 48);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(errorHue, platform === 'phone' ? 64 : 48);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(errorHue, platform === 'phone' ? 80 : 60);\n default:\n return super.getErrorPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n }\n }\n}\nconst spec2021 = new DynamicSchemePalettesDelegateImpl2021();\nconst spec2025 = new DynamicSchemePalettesDelegateImpl2025();\n/**\n * Returns the DynamicSchemePalettesDelegate for the given spec version.\n */\nfunction getSpec(specVersion) {\n return specVersion === '2025' ? spec2025 : spec2021;\n}\n//# sourceMappingURL=dynamic_scheme.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct.js';\nimport { TonalPalette } from './tonal_palette.js';\n/**\n * An intermediate concept between the key color for a UI theme, and a full\n * color scheme. 5 sets of tones are generated, all except one use the same hue\n * as the key color, and all vary in chroma.\n *\n * @deprecated Use {@link DynamicScheme} for color scheme generation.\n * Use {@link CorePalettes} for core palettes container class.\n */\nexport class CorePalette {\n /**\n * @param argb ARGB representation of a color\n *\n * @deprecated Use {@link DynamicScheme} for color scheme generation.\n * Use {@link CorePalettes} for core palettes container class.\n */\n static of(argb) {\n return new CorePalette(argb, false);\n }\n /**\n * @param argb ARGB representation of a color\n *\n * @deprecated Use {@link DynamicScheme} for color scheme generation.\n * Use {@link CorePalettes} for core palettes container class.\n */\n static contentOf(argb) {\n return new CorePalette(argb, true);\n }\n /**\n * Create a [CorePalette] from a set of colors\n *\n * @deprecated Use {@link DynamicScheme} for color scheme generation.\n * Use {@link CorePalettes} for core palettes container class.\n */\n static fromColors(colors) {\n return CorePalette.createPaletteFromColors(false, colors);\n }\n /**\n * Create a content [CorePalette] from a set of colors\n *\n * @deprecated Use {@link DynamicScheme} for color scheme generation.\n * Use {@link CorePalettes} for core palettes container class.\n */\n static contentFromColors(colors) {\n return CorePalette.createPaletteFromColors(true, colors);\n }\n static createPaletteFromColors(content, colors) {\n const palette = new CorePalette(colors.primary, content);\n if (colors.secondary) {\n const p = new CorePalette(colors.secondary, content);\n palette.a2 = p.a1;\n }\n if (colors.tertiary) {\n const p = new CorePalette(colors.tertiary, content);\n palette.a3 = p.a1;\n }\n if (colors.error) {\n const p = new CorePalette(colors.error, content);\n palette.error = p.a1;\n }\n if (colors.neutral) {\n const p = new CorePalette(colors.neutral, content);\n palette.n1 = p.n1;\n }\n if (colors.neutralVariant) {\n const p = new CorePalette(colors.neutralVariant, content);\n palette.n2 = p.n2;\n }\n return palette;\n }\n constructor(argb, isContent) {\n const hct = Hct.fromInt(argb);\n const hue = hct.hue;\n const chroma = hct.chroma;\n if (isContent) {\n this.a1 = TonalPalette.fromHueAndChroma(hue, chroma);\n this.a2 = TonalPalette.fromHueAndChroma(hue, chroma / 3);\n this.a3 = TonalPalette.fromHueAndChroma(hue + 60, chroma / 2);\n this.n1 = TonalPalette.fromHueAndChroma(hue, Math.min(chroma / 12, 4));\n this.n2 = TonalPalette.fromHueAndChroma(hue, Math.min(chroma / 6, 8));\n }\n else {\n this.a1 = TonalPalette.fromHueAndChroma(hue, Math.max(48, chroma));\n this.a2 = TonalPalette.fromHueAndChroma(hue, 16);\n this.a3 = TonalPalette.fromHueAndChroma(hue + 60, 24);\n this.n1 = TonalPalette.fromHueAndChroma(hue, 4);\n this.n2 = TonalPalette.fromHueAndChroma(hue, 8);\n }\n this.error = TonalPalette.fromHueAndChroma(25, 84);\n }\n}\n//# sourceMappingURL=core_palette.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This file is automatically generated. Do not modify it.\nimport { CorePalette } from '../palettes/core_palette.js';\n/**\n * DEPRECATED. The `Scheme` class is deprecated in favor of `DynamicScheme`.\n * Please see\n * https://github.com/material-foundation/material-color-utilities/blob/main/make_schemes.md\n * for migration guidance.\n *\n * Represents a Material color scheme, a mapping of color roles to colors.\n */\nexport class Scheme {\n get primary() {\n return this.props.primary;\n }\n get onPrimary() {\n return this.props.onPrimary;\n }\n get primaryContainer() {\n return this.props.primaryContainer;\n }\n get onPrimaryContainer() {\n return this.props.onPrimaryContainer;\n }\n get secondary() {\n return this.props.secondary;\n }\n get onSecondary() {\n return this.props.onSecondary;\n }\n get secondaryContainer() {\n return this.props.secondaryContainer;\n }\n get onSecondaryContainer() {\n return this.props.onSecondaryContainer;\n }\n get tertiary() {\n return this.props.tertiary;\n }\n get onTertiary() {\n return this.props.onTertiary;\n }\n get tertiaryContainer() {\n return this.props.tertiaryContainer;\n }\n get onTertiaryContainer() {\n return this.props.onTertiaryContainer;\n }\n get error() {\n return this.props.error;\n }\n get onError() {\n return this.props.onError;\n }\n get errorContainer() {\n return this.props.errorContainer;\n }\n get onErrorContainer() {\n return this.props.onErrorContainer;\n }\n get background() {\n return this.props.background;\n }\n get onBackground() {\n return this.props.onBackground;\n }\n get surface() {\n return this.props.surface;\n }\n get onSurface() {\n return this.props.onSurface;\n }\n get surfaceVariant() {\n return this.props.surfaceVariant;\n }\n get onSurfaceVariant() {\n return this.props.onSurfaceVariant;\n }\n get outline() {\n return this.props.outline;\n }\n get outlineVariant() {\n return this.props.outlineVariant;\n }\n get shadow() {\n return this.props.shadow;\n }\n get scrim() {\n return this.props.scrim;\n }\n get inverseSurface() {\n return this.props.inverseSurface;\n }\n get inverseOnSurface() {\n return this.props.inverseOnSurface;\n }\n get inversePrimary() {\n return this.props.inversePrimary;\n }\n /**\n * @param argb ARGB representation of a color.\n * @return Light Material color scheme, based on the color's hue.\n */\n static light(argb) {\n return Scheme.lightFromCorePalette(CorePalette.of(argb));\n }\n /**\n * @param argb ARGB representation of a color.\n * @return Dark Material color scheme, based on the color's hue.\n */\n static dark(argb) {\n return Scheme.darkFromCorePalette(CorePalette.of(argb));\n }\n /**\n * @param argb ARGB representation of a color.\n * @return Light Material content color scheme, based on the color's hue.\n */\n static lightContent(argb) {\n return Scheme.lightFromCorePalette(CorePalette.contentOf(argb));\n }\n /**\n * @param argb ARGB representation of a color.\n * @return Dark Material content color scheme, based on the color's hue.\n */\n static darkContent(argb) {\n return Scheme.darkFromCorePalette(CorePalette.contentOf(argb));\n }\n /**\n * Light scheme from core palette\n */\n static lightFromCorePalette(core) {\n return new Scheme({\n primary: core.a1.tone(40),\n onPrimary: core.a1.tone(100),\n primaryContainer: core.a1.tone(90),\n onPrimaryContainer: core.a1.tone(10),\n secondary: core.a2.tone(40),\n onSecondary: core.a2.tone(100),\n secondaryContainer: core.a2.tone(90),\n onSecondaryContainer: core.a2.tone(10),\n tertiary: core.a3.tone(40),\n onTertiary: core.a3.tone(100),\n tertiaryContainer: core.a3.tone(90),\n onTertiaryContainer: core.a3.tone(10),\n error: core.error.tone(40),\n onError: core.error.tone(100),\n errorContainer: core.error.tone(90),\n onErrorContainer: core.error.tone(10),\n background: core.n1.tone(99),\n onBackground: core.n1.tone(10),\n surface: core.n1.tone(99),\n onSurface: core.n1.tone(10),\n surfaceVariant: core.n2.tone(90),\n onSurfaceVariant: core.n2.tone(30),\n outline: core.n2.tone(50),\n outlineVariant: core.n2.tone(80),\n shadow: core.n1.tone(0),\n scrim: core.n1.tone(0),\n inverseSurface: core.n1.tone(20),\n inverseOnSurface: core.n1.tone(95),\n inversePrimary: core.a1.tone(80)\n });\n }\n /**\n * Dark scheme from core palette\n */\n static darkFromCorePalette(core) {\n return new Scheme({\n primary: core.a1.tone(80),\n onPrimary: core.a1.tone(20),\n primaryContainer: core.a1.tone(30),\n onPrimaryContainer: core.a1.tone(90),\n secondary: core.a2.tone(80),\n onSecondary: core.a2.tone(20),\n secondaryContainer: core.a2.tone(30),\n onSecondaryContainer: core.a2.tone(90),\n tertiary: core.a3.tone(80),\n onTertiary: core.a3.tone(20),\n tertiaryContainer: core.a3.tone(30),\n onTertiaryContainer: core.a3.tone(90),\n error: core.error.tone(80),\n onError: core.error.tone(20),\n errorContainer: core.error.tone(30),\n onErrorContainer: core.error.tone(80),\n background: core.n1.tone(10),\n onBackground: core.n1.tone(90),\n surface: core.n1.tone(10),\n onSurface: core.n1.tone(90),\n surfaceVariant: core.n2.tone(30),\n onSurfaceVariant: core.n2.tone(80),\n outline: core.n2.tone(60),\n outlineVariant: core.n2.tone(30),\n shadow: core.n1.tone(0),\n scrim: core.n1.tone(0),\n inverseSurface: core.n1.tone(90),\n inverseOnSurface: core.n1.tone(20),\n inversePrimary: core.a1.tone(40)\n });\n }\n constructor(props) {\n this.props = props;\n }\n toJSON() {\n return {\n ...this.props\n };\n }\n}\n//# sourceMappingURL=scheme.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct.js';\nimport * as math from '../utils/math_utils.js';\nconst SCORE_OPTION_DEFAULTS = {\n desired: 4,\n fallbackColorARGB: 0xff4285f4,\n filter: true, // Avoid unsuitable colors.\n};\nfunction compare(a, b) {\n if (a.score > b.score) {\n return -1;\n }\n else if (a.score < b.score) {\n return 1;\n }\n return 0;\n}\n/**\n * Given a large set of colors, remove colors that are unsuitable for a UI\n * theme, and rank the rest based on suitability.\n *\n * Enables use of a high cluster count for image quantization, thus ensuring\n * colors aren't muddied, while curating the high cluster count to a much\n * smaller number of appropriate choices.\n */\nexport class Score {\n constructor() { }\n /**\n * Given a map with keys of colors and values of how often the color appears,\n * rank the colors based on suitability for being used for a UI theme.\n *\n * @param colorsToPopulation map with keys of colors and values of how often\n * the color appears, usually from a source image.\n * @param {ScoreOptions} options optional parameters.\n * @return Colors sorted by suitability for a UI theme. The most suitable\n * color is the first item, the least suitable is the last. There will\n * always be at least one color returned. If all the input colors\n * were not suitable for a theme, a default fallback color will be\n * provided, Google Blue.\n */\n static score(colorsToPopulation, options) {\n const { desired, fallbackColorARGB, filter } = { ...SCORE_OPTION_DEFAULTS, ...options };\n // Get the HCT color for each Argb value, while finding the per hue count and\n // total count.\n const colorsHct = [];\n const huePopulation = new Array(360).fill(0);\n let populationSum = 0;\n for (const [argb, population] of colorsToPopulation.entries()) {\n const hct = Hct.fromInt(argb);\n colorsHct.push(hct);\n const hue = Math.floor(hct.hue);\n huePopulation[hue] += population;\n populationSum += population;\n }\n // Hues with more usage in neighboring 30 degree slice get a larger number.\n const hueExcitedProportions = new Array(360).fill(0.0);\n for (let hue = 0; hue < 360; hue++) {\n const proportion = huePopulation[hue] / populationSum;\n for (let i = hue - 14; i < hue + 16; i++) {\n const neighborHue = math.sanitizeDegreesInt(i);\n hueExcitedProportions[neighborHue] += proportion;\n }\n }\n // Scores each HCT color based on usage and chroma, while optionally\n // filtering out values that do not have enough chroma or usage.\n const scoredHct = new Array();\n for (const hct of colorsHct) {\n const hue = math.sanitizeDegreesInt(Math.round(hct.hue));\n const proportion = hueExcitedProportions[hue];\n if (filter && (hct.chroma < Score.CUTOFF_CHROMA || proportion <= Score.CUTOFF_EXCITED_PROPORTION)) {\n continue;\n }\n const proportionScore = proportion * 100.0 * Score.WEIGHT_PROPORTION;\n const chromaWeight = hct.chroma < Score.TARGET_CHROMA ? Score.WEIGHT_CHROMA_BELOW : Score.WEIGHT_CHROMA_ABOVE;\n const chromaScore = (hct.chroma - Score.TARGET_CHROMA) * chromaWeight;\n const score = proportionScore + chromaScore;\n scoredHct.push({ hct, score });\n }\n // Sorted so that colors with higher scores come first.\n scoredHct.sort(compare);\n // Iterates through potential hue differences in degrees in order to select\n // the colors with the largest distribution of hues possible. Starting at\n // 90 degrees(maximum difference for 4 colors) then decreasing down to a\n // 15 degree minimum.\n const chosenColors = [];\n for (let differenceDegrees = 90; differenceDegrees >= 15; differenceDegrees--) {\n chosenColors.length = 0;\n for (const { hct } of scoredHct) {\n const duplicateHue = chosenColors.find(chosenHct => {\n return math.differenceDegrees(hct.hue, chosenHct.hue) < differenceDegrees;\n });\n if (!duplicateHue) {\n chosenColors.push(hct);\n }\n if (chosenColors.length >= desired)\n break;\n }\n if (chosenColors.length >= desired)\n break;\n }\n const colors = [];\n if (chosenColors.length === 0) {\n colors.push(fallbackColorARGB);\n }\n for (const chosenHct of chosenColors) {\n colors.push(chosenHct.toInt());\n }\n return colors;\n }\n}\nScore.TARGET_CHROMA = 48.0; // A1 Chroma\nScore.WEIGHT_PROPORTION = 0.7;\nScore.WEIGHT_CHROMA_ABOVE = 0.3;\nScore.WEIGHT_CHROMA_BELOW = 0.1;\nScore.CUTOFF_CHROMA = 5.0;\nScore.CUTOFF_EXCITED_PROPORTION = 0.01;\n//# sourceMappingURL=score.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as colorUtils from './color_utils.js';\n/**\n * Utility methods for hexadecimal representations of colors.\n */\n/**\n * @param argb ARGB representation of a color.\n * @return Hex string representing color, ex. #ff0000 for red.\n */\nexport function hexFromArgb(argb) {\n const r = colorUtils.redFromArgb(argb);\n const g = colorUtils.greenFromArgb(argb);\n const b = colorUtils.blueFromArgb(argb);\n const outParts = [r.toString(16), g.toString(16), b.toString(16)];\n // Pad single-digit output values\n for (const [i, part] of outParts.entries()) {\n if (part.length === 1) {\n outParts[i] = '0' + part;\n }\n }\n return '#' + outParts.join('');\n}\n/**\n * @param hex String representing color as hex code. Accepts strings with or\n * without leading #, and string representing the color using 3, 6, or 8\n * hex characters.\n * @return ARGB representation of color.\n */\nexport function argbFromHex(hex) {\n hex = hex.replace('#', '');\n const isThree = hex.length === 3;\n const isSix = hex.length === 6;\n const isEight = hex.length === 8;\n if (!isThree && !isSix && !isEight) {\n throw new Error('unexpected hex ' + hex);\n }\n let r = 0;\n let g = 0;\n let b = 0;\n if (isThree) {\n r = parseIntHex(hex.slice(0, 1).repeat(2));\n g = parseIntHex(hex.slice(1, 2).repeat(2));\n b = parseIntHex(hex.slice(2, 3).repeat(2));\n }\n else if (isSix) {\n r = parseIntHex(hex.slice(0, 2));\n g = parseIntHex(hex.slice(2, 4));\n b = parseIntHex(hex.slice(4, 6));\n }\n else if (isEight) {\n r = parseIntHex(hex.slice(2, 4));\n g = parseIntHex(hex.slice(4, 6));\n b = parseIntHex(hex.slice(6, 8));\n }\n return (((255 << 24) | ((r & 0x0ff) << 16) | ((g & 0x0ff) << 8) | (b & 0x0ff)) >>>\n 0);\n}\nfunction parseIntHex(value) {\n // tslint:disable-next-line:ban\n return parseInt(value, 16);\n}\n//# sourceMappingURL=string_utils.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Blend } from '../blend/blend.js';\nimport { CorePalette } from '../palettes/core_palette.js';\nimport { Scheme } from '../scheme/scheme.js';\nimport { sourceColorFromImage } from './image_utils.js';\nimport { hexFromArgb } from './string_utils.js';\n/**\n * Generate a theme from a source color\n *\n * @param source Source color\n * @param customColors Array of custom colors\n * @return Theme object\n */\nexport function themeFromSourceColor(source, customColors = []) {\n const palette = CorePalette.of(source);\n return {\n source,\n schemes: {\n light: Scheme.light(source),\n dark: Scheme.dark(source),\n },\n palettes: {\n primary: palette.a1,\n secondary: palette.a2,\n tertiary: palette.a3,\n neutral: palette.n1,\n neutralVariant: palette.n2,\n error: palette.error,\n },\n customColors: customColors.map((c) => customColor(source, c)),\n };\n}\n/**\n * Generate a theme from an image source\n *\n * @param image Image element\n * @param customColors Array of custom colors\n * @return Theme object\n */\nexport async function themeFromImage(image, customColors = []) {\n const source = await sourceColorFromImage(image);\n return themeFromSourceColor(source, customColors);\n}\n/**\n * Generate custom color group from source and target color\n *\n * @param source Source color\n * @param color Custom color\n * @return Custom color group\n *\n * @link https://m3.material.io/styles/color/the-color-system/color-roles\n */\nexport function customColor(source, color) {\n let value = color.value;\n const from = value;\n const to = source;\n if (color.blend) {\n value = Blend.harmonize(from, to);\n }\n const palette = CorePalette.of(value);\n const tones = palette.a1;\n return {\n color,\n value,\n light: {\n color: tones.tone(40),\n onColor: tones.tone(100),\n colorContainer: tones.tone(90),\n onColorContainer: tones.tone(10),\n },\n dark: {\n color: tones.tone(80),\n onColor: tones.tone(20),\n colorContainer: tones.tone(30),\n onColorContainer: tones.tone(90),\n },\n };\n}\n/**\n * Apply a theme to an element\n *\n * @param theme Theme object\n * @param options Options\n */\nexport function applyTheme(theme, options) {\n const target = options?.target || document.body;\n const isDark = options?.dark ?? false;\n const scheme = isDark ? theme.schemes.dark : theme.schemes.light;\n setSchemeProperties(target, scheme);\n if (options?.brightnessSuffix) {\n setSchemeProperties(target, theme.schemes.dark, '-dark');\n setSchemeProperties(target, theme.schemes.light, '-light');\n }\n if (options?.paletteTones) {\n const tones = options?.paletteTones ?? [];\n for (const [key, palette] of Object.entries(theme.palettes)) {\n const paletteKey = key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n for (const tone of tones) {\n const token = `--md-ref-palette-${paletteKey}-${paletteKey}${tone}`;\n const color = hexFromArgb(palette.tone(tone));\n target.style.setProperty(token, color);\n }\n }\n }\n}\nfunction setSchemeProperties(target, scheme, suffix = '') {\n for (const [key, value] of Object.entries(scheme.toJSON())) {\n const token = key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n const color = hexFromArgb(value);\n target.style.setProperty(`--md-sys-color-${token}${suffix}`, color);\n }\n}\n//# sourceMappingURL=theme_utils.js.map","import { argbFromHex, Hct, hexFromArgb, Theme, TonalPalette } from '@material/material-color-utilities'\nimport { TSchmancyTheme } from './theme.interface'\n\n/**\n * Material Design 3 Theme Formatter\n * Generates complete M3 theme with all tonal values and design tokens\n * @see https://m3.material.io/styles/color/the-color-system\n */\n\n/**\n * Converts ARGB integer to hex string\n */\nfunction argbToHex(argb: number): string {\n\treturn hexFromArgb(argb)\n}\n\n/**\n * Creates a complete tonal palette from a source color\n */\nfunction createTonalPalette(sourceColor: number): Record<string, string> {\n\tconst hct = Hct.fromInt(sourceColor)\n\tconst palette = TonalPalette.fromHueAndChroma(hct.hue, hct.chroma)\n\n\treturn {\n\t\t'0': argbToHex(palette.tone(0)),\n\t\t'10': argbToHex(palette.tone(10)),\n\t\t'20': argbToHex(palette.tone(20)),\n\t\t'30': argbToHex(palette.tone(30)),\n\t\t'40': argbToHex(palette.tone(40)),\n\t\t'50': argbToHex(palette.tone(50)),\n\t\t'60': argbToHex(palette.tone(60)),\n\t\t'70': argbToHex(palette.tone(70)),\n\t\t'80': argbToHex(palette.tone(80)),\n\t\t'90': argbToHex(palette.tone(90)),\n\t\t'95': argbToHex(palette.tone(95)),\n\t\t'99': argbToHex(palette.tone(99)),\n\t\t'100': argbToHex(palette.tone(100)),\n\t}\n}\n\n/**\n * Generates a complete Material Design 3 theme\n * @param originalTheme The generated theme from Material Color Utilities\n * @param isDark Whether to generate a dark theme\n * @param extendedColors Optional extended colors (success, warning, info)\n */\nexport function formatTheme(\n\toriginalTheme: Theme,\n\tisDark = false,\n\textendedColors?: {\n\t\tsuccess?: number\n\t\twarning?: number\n\t\tinfo?: number\n\t}\n): Partial<TSchmancyTheme> {\n\tconst scheme = isDark ? originalTheme.schemes.dark : originalTheme.schemes.light\n\n\t// Generate complete tonal palettes\n\tconst primaryPalette = TonalPalette.fromHueAndChroma(\n\t\toriginalTheme.palettes.primary.hue,\n\t\toriginalTheme.palettes.primary.chroma\n\t)\n\tconst secondaryPalette = TonalPalette.fromHueAndChroma(\n\t\toriginalTheme.palettes.secondary.hue,\n\t\toriginalTheme.palettes.secondary.chroma\n\t)\n\tconst tertiaryPalette = TonalPalette.fromHueAndChroma(\n\t\toriginalTheme.palettes.tertiary.hue,\n\t\toriginalTheme.palettes.tertiary.chroma\n\t)\n\tconst neutralPalette = TonalPalette.fromHueAndChroma(\n\t\toriginalTheme.palettes.neutral.hue,\n\t\toriginalTheme.palettes.neutral.chroma\n\t)\n\tconst neutralVariantPalette = TonalPalette.fromHueAndChroma(\n\t\toriginalTheme.palettes.neutralVariant.hue,\n\t\toriginalTheme.palettes.neutralVariant.chroma\n\t)\n\tconst errorPalette = TonalPalette.fromHueAndChroma(\n\t\toriginalTheme.palettes.error.hue,\n\t\toriginalTheme.palettes.error.chroma\n\t)\n\n\t// Generate extended color palettes\n\tconst successPalette = extendedColors?.success\n\t\t? createTonalPalette(extendedColors.success)\n\t\t: createTonalPalette(argbFromHex('#00C853')) // Green A700\n\n\tconst warningPalette = extendedColors?.warning\n\t\t? createTonalPalette(extendedColors.warning)\n\t\t: createTonalPalette(argbFromHex('#FFCA28')) // Amber 400 - softer golden yellow\n\n\tconst infoPalette = extendedColors?.info\n\t\t? createTonalPalette(extendedColors.info)\n\t\t: createTonalPalette(argbFromHex('#2979FF')) // Blue A400\n\n\t// M3 tone values for each color role in light/dark themes\n\tconst tones = {\n\t\tprimary: isDark ? 80 : 40,\n\t\tonPrimary: isDark ? 20 : 100,\n\t\tprimaryContainer: isDark ? 30 : 90,\n\t\tonPrimaryContainer: isDark ? 90 : 10,\n\t\tprimaryFixed: 90,\n\t\tprimaryFixedDim: 80,\n\t\tonPrimaryFixed: 10,\n\t\tonPrimaryFixedVariant: 30,\n\t\tinversePrimary: isDark ? 40 : 80,\n\n\t\tsecondary: isDark ? 80 : 40,\n\t\tonSecondary: isDark ? 20 : 100,\n\t\tsecondaryContainer: isDark ? 30 : 90,\n\t\tonSecondaryContainer: isDark ? 90 : 10,\n\t\tsecondaryFixed: 90,\n\t\tsecondaryFixedDim: 80,\n\t\tonSecondaryFixed: 10,\n\t\tonSecondaryFixedVariant: 30,\n\n\t\ttertiary: isDark ? 80 : 40,\n\t\tonTertiary: isDark ? 20 : 100,\n\t\ttertiaryContainer: isDark ? 30 : 90,\n\t\tonTertiaryContainer: isDark ? 90 : 10,\n\t\ttertiaryFixed: 90,\n\t\ttertiaryFixedDim: 80,\n\t\tonTertiaryFixed: 10,\n\t\tonTertiaryFixedVariant: 30,\n\n\t\terror: isDark ? 50 : 40,\n\t\tonError: isDark ? 100 : 100,\n\t\terrorContainer: isDark ? 30 : 90,\n\t\tonErrorContainer: isDark ? 90 : 10,\n\n\t\tsurface: isDark ? 6 : 98,\n\t\tsurfaceDim: isDark ? 6 : 87,\n\t\tsurfaceBright: isDark ? 24 : 98,\n\t\tsurfaceContainerLowest: isDark ? 4 : 100,\n\t\tsurfaceContainerLow: isDark ? 10 : 96,\n\t\tsurfaceContainer: isDark ? 12 : 94,\n\t\tsurfaceContainerHigh: isDark ? 17 : 92,\n\t\tsurfaceContainerHighest: isDark ? 22 : 90,\n\t\tonSurface: isDark ? 90 : 10,\n\t\tonSurfaceVariant: isDark ? 80 : 30,\n\t\tsurfaceTint: isDark ? 80 : 40,\n\t\tinverseSurface: isDark ? 90 : 20,\n\t\tinverseOnSurface: isDark ? 20 : 95,\n\n\t\toutline: isDark ? 60 : 50,\n\t\toutlineVariant: isDark ? 15 : 80,\n\t\tshadow: 0,\n\t\tscrim: 0,\n\t}\n\n\tconst newTheme: Partial<TSchmancyTheme> = {\n\t\tsys: {\n\t\t\tcolor: {\n\t\t\t\t// Neutral colors\n\t\t\t\tscrim: argbToHex(scheme.scrim),\n\t\t\t\toutline: argbToHex(neutralVariantPalette.tone(tones.outline)),\n\t\t\t\toutlineVariant: argbToHex(neutralVariantPalette.tone(tones.outlineVariant)),\n\t\t\t\tshadow: argbToHex(neutralPalette.tone(tones.shadow)),\n\n\t\t\t\t// Surface colors with complete tonal values\n\t\t\t\tsurface: {\n\t\t\t\t\tdefault: argbToHex(neutralPalette.tone(tones.surface)),\n\t\t\t\t\tdim: argbToHex(neutralPalette.tone(tones.surfaceDim)),\n\t\t\t\t\tbright: argbToHex(neutralPalette.tone(tones.surfaceBright)),\n\t\t\t\t\tcontainer: argbToHex(neutralPalette.tone(tones.surfaceContainer)),\n\t\t\t\t\tcontainerLow: argbToHex(neutralPalette.tone(tones.surfaceContainerLow)),\n\t\t\t\t\tcontainerLowest: argbToHex(neutralPalette.tone(tones.surfaceContainerLowest)),\n\t\t\t\t\tcontainerHigh: argbToHex(neutralPalette.tone(tones.surfaceContainerHigh)),\n\t\t\t\t\tcontainerHighest: argbToHex(neutralPalette.tone(tones.surfaceContainerHighest)),\n\t\t\t\t\ton: argbToHex(neutralPalette.tone(tones.onSurface)),\n\t\t\t\t\tonVariant: argbToHex(neutralVariantPalette.tone(tones.onSurfaceVariant)),\n\t\t\t\t\ttint: argbToHex(primaryPalette.tone(tones.surfaceTint)),\n\t\t\t\t\tinverse: argbToHex(neutralPalette.tone(tones.inverseSurface)),\n\t\t\t\t\tinverseOn: argbToHex(neutralPalette.tone(tones.inverseOnSurface)),\n\t\t\t\t\t// Deprecated mappings for backward compatibility\n\t\t\t\t\tlow: argbToHex(neutralPalette.tone(tones.surfaceContainerLow)),\n\t\t\t\t\thigh: argbToHex(neutralPalette.tone(tones.surfaceContainerHigh)),\n\t\t\t\t\thighest: argbToHex(neutralPalette.tone(tones.surfaceContainerHighest)),\n\t\t\t\t\tlowest: argbToHex(neutralPalette.tone(tones.surfaceContainerLowest)),\n\t\t\t\t},\n\n\t\t\t\t// Primary color roles with fixed variants\n\t\t\t\tprimary: {\n\t\t\t\t\tdefault: argbToHex(primaryPalette.tone(tones.primary)),\n\t\t\t\t\ton: argbToHex(primaryPalette.tone(tones.onPrimary)),\n\t\t\t\t\tcontainer: argbToHex(primaryPalette.tone(tones.primaryContainer)),\n\t\t\t\t\tonContainer: argbToHex(primaryPalette.tone(tones.onPrimaryContainer)),\n\t\t\t\t\tfixed: argbToHex(primaryPalette.tone(tones.primaryFixed)),\n\t\t\t\t\tfixedDim: argbToHex(primaryPalette.tone(tones.primaryFixedDim)),\n\t\t\t\t\tonFixed: argbToHex(primaryPalette.tone(tones.onPrimaryFixed)),\n\t\t\t\t\tonFixedVariant: argbToHex(primaryPalette.tone(tones.onPrimaryFixedVariant)),\n\t\t\t\t\tinverse: argbToHex(primaryPalette.tone(tones.inversePrimary)),\n\t\t\t\t},\n\n\t\t\t\t// Secondary color roles with fixed variants\n\t\t\t\tsecondary: {\n\t\t\t\t\tdefault: argbToHex(secondaryPalette.tone(tones.secondary)),\n\t\t\t\t\ton: argbToHex(secondaryPalette.tone(tones.onSecondary)),\n\t\t\t\t\tcontainer: argbToHex(secondaryPalette.tone(tones.secondaryContainer)),\n\t\t\t\t\tonContainer: argbToHex(secondaryPalette.tone(tones.onSecondaryContainer)),\n\t\t\t\t\tfixed: argbToHex(secondaryPalette.tone(tones.secondaryFixed)),\n\t\t\t\t\tfixedDim: argbToHex(secondaryPalette.tone(tones.secondaryFixedDim)),\n\t\t\t\t\tonFixed: argbToHex(secondaryPalette.tone(tones.onSecondaryFixed)),\n\t\t\t\t\tonFixedVariant: argbToHex(secondaryPalette.tone(tones.onSecondaryFixedVariant)),\n\t\t\t\t},\n\n\t\t\t\t// Tertiary color roles with fixed variants\n\t\t\t\ttertiary: {\n\t\t\t\t\tdefault: argbToHex(tertiaryPalette.tone(tones.tertiary)),\n\t\t\t\t\ton: argbToHex(tertiaryPalette.tone(tones.onTertiary)),\n\t\t\t\t\tcontainer: argbToHex(tertiaryPalette.tone(tones.tertiaryContainer)),\n\t\t\t\t\tonContainer: argbToHex(tertiaryPalette.tone(tones.onTertiaryContainer)),\n\t\t\t\t\tfixed: argbToHex(tertiaryPalette.tone(tones.tertiaryFixed)),\n\t\t\t\t\tfixedDim: argbToHex(tertiaryPalette.tone(tones.tertiaryFixedDim)),\n\t\t\t\t\tonFixed: argbToHex(tertiaryPalette.tone(tones.onTertiaryFixed)),\n\t\t\t\t\tonFixedVariant: argbToHex(tertiaryPalette.tone(tones.onTertiaryFixedVariant)),\n\t\t\t\t},\n\n\t\t\t\t// Error color roles\n\t\t\t\terror: {\n\t\t\t\t\tdefault: argbToHex(errorPalette.tone(tones.error)),\n\t\t\t\t\ton: argbToHex(errorPalette.tone(tones.onError)),\n\t\t\t\t\tcontainer: argbToHex(errorPalette.tone(tones.errorContainer)),\n\t\t\t\t\tonContainer: argbToHex(errorPalette.tone(tones.onErrorContainer)),\n\t\t\t\t},\n\n\t\t\t\t// Extended color roles - Success (M3 spec: same tones as error)\n\t\t\t\tsuccess: {\n\t\t\t\t\tdefault: successPalette[isDark ? '80' : '40'],\n\t\t\t\t\ton: successPalette['100'],\n\t\t\t\t\tcontainer: successPalette[isDark ? '30' : '90'],\n\t\t\t\t\tonContainer: successPalette[isDark ? '90' : '10'],\n\t\t\t\t},\n\n\t\t\t\t// Extended color roles - Warning (M3 spec: same tones as error)\n\t\t\t\twarning: {\n\t\t\t\t\tdefault: warningPalette[isDark ? '80' : '40'],\n\t\t\t\t\ton: warningPalette['100'],\n\t\t\t\t\tcontainer: warningPalette[isDark ? '30' : '90'],\n\t\t\t\t\tonContainer: warningPalette[isDark ? '90' : '10'],\n\t\t\t\t},\n\n\t\t\t\t// Extended color roles - Info (M3 spec: same tones as error)\n\t\t\t\tinfo: {\n\t\t\t\t\tdefault: infoPalette[isDark ? '80' : '40'],\n\t\t\t\t\ton: infoPalette['100'],\n\t\t\t\t\tcontainer: infoPalette[isDark ? '30' : '90'],\n\t\t\t\t\tonContainer: infoPalette[isDark ? '90' : '10'],\n\t\t\t\t},\n\t\t\t},\n\n\t\t\t// M3 Typography System values (will be properly set in CSS)\n\t\t\ttypography: {\n\t\t\t\tdisplay: {\n\t\t\t\t\tlarge: 'display-large',\n\t\t\t\t\tmedium: 'display-medium',\n\t\t\t\t\tsmall: 'display-small',\n\t\t\t\t},\n\t\t\t\theadline: {\n\t\t\t\t\tlarge: 'headline-large',\n\t\t\t\t\tmedium: 'headline-medium',\n\t\t\t\t\tsmall: 'headline-small',\n\t\t\t\t},\n\t\t\t\ttitle: {\n\t\t\t\t\tlarge: 'title-large',\n\t\t\t\t\tmedium: 'title-medium',\n\t\t\t\t\tsmall: 'title-small',\n\t\t\t\t},\n\t\t\t\tbody: {\n\t\t\t\t\tlarge: 'body-large',\n\t\t\t\t\tmedium: 'body-medium',\n\t\t\t\t\tsmall: 'body-small',\n\t\t\t\t},\n\t\t\t\tlabel: {\n\t\t\t\t\tlarge: 'label-large',\n\t\t\t\t\tmedium: 'label-medium',\n\t\t\t\t\tsmall: 'label-small',\n\t\t\t\t},\n\t\t\t},\n\n\t\t\t// M3 Shape System\n\t\t\tshape: {\n\t\t\t\tcorner: {\n\t\t\t\t\tnone: '0',\n\t\t\t\t\textraSmall: '4px',\n\t\t\t\t\tsmall: '8px',\n\t\t\t\t\tmedium: '12px',\n\t\t\t\t\tlarge: '16px',\n\t\t\t\t\textraLarge: '28px',\n\t\t\t\t\tfull: '9999px',\n\t\t\t\t},\n\t\t\t},\n\n\t\t\t// Luminous Glow Elevation — primary-colored glow replaces dark M3 shadows\n\t\t\televation: {\n\t\t\t\t0: '0 0 0 0 rgba(0, 0, 0, 0)',\n\t\t\t\t1: `0 2px 12px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) ${isDark ? '18%' : '15%'}, transparent)`,\n\t\t\t\t2: `0 4px 20px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) ${isDark ? '26%' : '22%'}, transparent)`,\n\t\t\t\t3: `0 8px 32px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) ${isDark ? '32%' : '28%'}, transparent)`,\n\t\t\t\t4: `0 12px 44px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) ${isDark ? '40%' : '35%'}, transparent)`,\n\t\t\t\t5: `0 20px 60px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) ${isDark ? '48%' : '42%'}, transparent)`,\n\t\t\t},\n\n\t\t\t// M3 Motion System\n\t\t\tmotion: {\n\t\t\t\teasing: {\n\t\t\t\t\temphasized: 'cubic-bezier(0.2, 0.0, 0, 1.0)',\n\t\t\t\t\temphasizedDecelerate: 'cubic-bezier(0.05, 0.7, 0.1, 1.0)',\n\t\t\t\t\temphasizedAccelerate: 'cubic-bezier(0.3, 0.0, 0.8, 0.15)',\n\t\t\t\t\tstandard: 'cubic-bezier(0.2, 0.0, 0, 1.0)',\n\t\t\t\t\tstandardDecelerate: 'cubic-bezier(0, 0, 0, 1)',\n\t\t\t\t\tstandardAccelerate: 'cubic-bezier(0.3, 0, 1, 1)',\n\t\t\t\t\tlegacy: 'cubic-bezier(0.4, 0, 0.2, 1)',\n\t\t\t\t\tlinear: 'linear',\n\t\t\t\t},\n\t\t\t\tduration: {\n\t\t\t\t\tshort1: '50ms',\n\t\t\t\t\tshort2: '100ms',\n\t\t\t\t\tshort3: '150ms',\n\t\t\t\t\tshort4: '200ms',\n\t\t\t\t\tmedium1: '250ms',\n\t\t\t\t\tmedium2: '300ms',\n\t\t\t\t\tmedium3: '350ms',\n\t\t\t\t\tmedium4: '400ms',\n\t\t\t\t\tlong1: '450ms',\n\t\t\t\t\tlong2: '500ms',\n\t\t\t\t\tlong3: '550ms',\n\t\t\t\t\tlong4: '600ms',\n\t\t\t\t\textraLong1: '700ms',\n\t\t\t\t\textraLong2: '800ms',\n\t\t\t\t\textraLong3: '900ms',\n\t\t\t\t\textraLong4: '1000ms',\n\t\t\t\t},\n\t\t\t},\n\n\t\t\t// M3 State Layers\n\t\t\tstate: {\n\t\t\t\topacity: {\n\t\t\t\t\thover: '0.08',\n\t\t\t\t\tfocus: '0.12',\n\t\t\t\t\tpressed: '0.12',\n\t\t\t\t\tdragged: '0.16',\n\t\t\t\t\tdisabled: '0.38',\n\t\t\t\t\tdisabledContainer: '0.12',\n\t\t\t\t},\n\t\t\t},\n\n\t\t\t// M3 Spacing System (4dp grid)\n\t\t\tspacing: {\n\t\t\t\t0: '0',\n\t\t\t\t1: '4px',\n\t\t\t\t2: '8px',\n\t\t\t\t3: '12px',\n\t\t\t\t4: '16px',\n\t\t\t\t5: '20px',\n\t\t\t\t6: '24px',\n\t\t\t\t7: '28px',\n\t\t\t\t8: '32px',\n\t\t\t\t9: '36px',\n\t\t\t\t10: '40px',\n\t\t\t\t11: '44px',\n\t\t\t\t12: '48px',\n\t\t\t},\n\n\t\t\t// Legacy outline for backward compatibility\n\t\t\toutline: {\n\t\t\t\t1: '1px',\n\t\t\t},\n\t\t},\n\n\t\t// Reference palette - complete tonal values\n\t\tref: {\n\t\t\tpalette: {\n\t\t\t\tprimary: createTonalPalette(primaryPalette.tone(40)) as any,\n\t\t\t\tsecondary: createTonalPalette(secondaryPalette.tone(40)) as any,\n\t\t\t\ttertiary: createTonalPalette(tertiaryPalette.tone(40)) as any,\n\t\t\t\tneutral: createTonalPalette(neutralPalette.tone(40)) as any,\n\t\t\t\tneutralVariant: createTonalPalette(neutralVariantPalette.tone(40)) as any,\n\t\t\t\terror: createTonalPalette(errorPalette.tone(40)) as any,\n\t\t\t},\n\t\t},\n\t}\n\n\treturn newTheme\n}\n\n/**\n * Backward compatibility wrapper for the old API\n */\nexport function createLightTonalPaletteFromBaseColor(hue: number, chroma: number) {\n\tconst tonalPalette = TonalPalette.fromHueAndChroma(hue, chroma)\n\treturn {\n\t\tcLowest: tonalPalette.tone(100),\n\t\tcLow: tonalPalette.tone(96),\n\t\tc: tonalPalette.tone(94),\n\t\tcHigh: tonalPalette.tone(92),\n\t\tcHighest: tonalPalette.tone(90),\n\t\tsDim: tonalPalette.tone(87),\n\t\ts: tonalPalette.tone(98),\n\t\tsBright: tonalPalette.tone(100),\n\t}\n}\n\nexport function createDarkTonalPaletteFromBaseColor(hue: number, chroma: number) {\n\tconst tonalPalette = TonalPalette.fromHueAndChroma(hue, chroma)\n\treturn {\n\t\tcLowest: tonalPalette.tone(4),\n\t\tcLow: tonalPalette.tone(10),\n\t\tc: tonalPalette.tone(12),\n\t\tcHigh: tonalPalette.tone(17),\n\t\tcHighest: tonalPalette.tone(22),\n\t\tsDim: tonalPalette.tone(6),\n\t\ts: tonalPalette.tone(6),\n\t\tsBright: tonalPalette.tone(24),\n\t}\n}\n",":host,\n:root {\n\t--md-ref-typeface-brand: var(--schmancy-font-family, sans-serif);\n\t--md-ref-typeface-plain: var(--schmancy-font-family, sans-serif);\n\t--md-sys-color-primary: var(--schmancy-sys-color-primary-default);\n\t--md-sys-color-secondary: var(--schmancy-sys-color-secondary-default);\n\n\t--default-font-family: var(--schmancy-font-family);\n\t--border-style: solid;\n\t--spacing: 4px;\n\t--color-scrim: var(--schmancy-sys-color-scrim);\n\t--color-shadow: var(--schmancy-sys-color-shadow);\n\t--color-outline: var(--schmancy-sys-color-outline);\n\t--color-outlineVariant: var(--schmancy-sys-color-outlineVariant);\n\t--color-outline-variant: var(--schmancy-sys-color-outlineVariant);\n\t--color-surface-default: var(--schmancy-sys-color-surface-default);\n\t--color-surface-dim: var(--schmancy-sys-color-surface-dim);\n\t--color-surface-bright: var(--schmancy-sys-color-surface-bright);\n\t--color-surface-container: var(--schmancy-sys-color-surface-container);\n\t--color-surface-low: var(--schmancy-sys-color-surface-low);\n\t--color-surface-high: var(--schmancy-sys-color-surface-high);\n\t--color-surface-highest: var(--schmancy-sys-color-surface-highest);\n\t--color-surface-lowest: var(--schmancy-sys-color-surface-lowest);\n\t/* CamelCase variants for Tailwind compatibility */\n\t--color-surface-containerLow: var(--schmancy-sys-color-surface-containerLow);\n\t--color-surface-containerHigh: var(--schmancy-sys-color-surface-containerHigh);\n\t--color-surface-containerLowest: var(--schmancy-sys-color-surface-containerLowest);\n\t--color-surface-containerHighest: var(--schmancy-sys-color-surface-containerHighest);\n\t--color-surface-on: var(--schmancy-sys-color-surface-on);\n\t--color-surface-onVariant: var(--schmancy-sys-color-surface-onVariant);\n\t--color-surface-on-variant: var(--schmancy-sys-color-surface-onVariant);\n\t--color-surface-tint: var(--schmancy-sys-color-surface-tint);\n\t--color-surface-inverse: var(--schmancy-sys-color-inverse-surface);\n\t--color-surface-inverseOn: var(--schmancy-sys-color-inverse-onSurface);\n\t--color-inverse-surface: var(--schmancy-sys-color-inverse-surface);\n\t--color-inverse-on-surface: var(--schmancy-sys-color-inverse-onSurface);\n\t--color-primary-default: var(--schmancy-sys-color-primary-default);\n\t--color-primary-on: var(--schmancy-sys-color-primary-on);\n\t--color-primary-container: var(--schmancy-sys-color-primary-container);\n\t--color-primary-onContainer: var(--schmancy-sys-color-primary-onContainer);\n\t--color-primary-on-container: var(--schmancy-sys-color-primary-onContainer);\n\t--color-primary-fixed: var(--schmancy-sys-color-primary-fixed);\n\t--color-primary-fixedDim: var(--schmancy-sys-color-primary-fixedDim);\n\t--color-primary-fixed-dim: var(--schmancy-sys-color-primary-fixedDim);\n\t--color-primary-onFixed: var(--schmancy-sys-color-primary-onFixed);\n\t--color-primary-on-fixed: var(--schmancy-sys-color-primary-onFixed);\n\t--color-primary-onFixedVariant: var(--schmancy-sys-color-primary-onFixedVariant);\n\t--color-primary-on-fixed-variant: var(--schmancy-sys-color-primary-onFixedVariant);\n\t--color-primary-inverse: var(--schmancy-sys-color-inverse-primary);\n\t--color-inverse-primary: var(--schmancy-sys-color-inverse-primary);\n\t--color-secondary-default: var(--schmancy-sys-color-secondary-default);\n\t--color-secondary-on: var(--schmancy-sys-color-secondary-on);\n\t--color-secondary-container: var(--schmancy-sys-color-secondary-container);\n\t--color-secondary-onContainer: var(--schmancy-sys-color-secondary-onContainer);\n\t--color-secondary-on-container: var(--schmancy-sys-color-secondary-onContainer);\n\t--color-secondary-fixed: var(--schmancy-sys-color-secondary-fixed);\n\t--color-secondary-fixedDim: var(--schmancy-sys-color-secondary-fixedDim);\n\t--color-secondary-fixed-dim: var(--schmancy-sys-color-secondary-fixedDim);\n\t--color-secondary-onFixed: var(--schmancy-sys-color-secondary-onFixed);\n\t--color-secondary-on-fixed: var(--schmancy-sys-color-secondary-onFixed);\n\t--color-secondary-onFixedVariant: var(--schmancy-sys-color-secondary-onFixedVariant);\n\t--color-secondary-on-fixed-variant: var(--schmancy-sys-color-secondary-onFixedVariant);\n\t--color-tertiary-default: var(--schmancy-sys-color-tertiary-default);\n\t--color-tertiary-on: var(--schmancy-sys-color-tertiary-on);\n\t--color-tertiary-container: var(--schmancy-sys-color-tertiary-container);\n\t--color-tertiary-onContainer: var(--schmancy-sys-color-tertiary-onContainer);\n\t--color-tertiary-on-container: var(--schmancy-sys-color-tertiary-onContainer);\n\t--color-tertiary-fixed: var(--schmancy-sys-color-tertiary-fixed);\n\t--color-tertiary-fixedDim: var(--schmancy-sys-color-tertiary-fixedDim);\n\t--color-tertiary-fixed-dim: var(--schmancy-sys-color-tertiary-fixedDim);\n\t--color-tertiary-onFixed: var(--schmancy-sys-color-tertiary-onFixed);\n\t--color-tertiary-on-fixed: var(--schmancy-sys-color-tertiary-onFixed);\n\t--color-tertiary-onFixedVariant: var(--schmancy-sys-color-tertiary-onFixedVariant);\n\t--color-tertiary-on-fixed-variant: var(--schmancy-sys-color-tertiary-onFixedVariant);\n\t--color-error-default: var(--schmancy-sys-color-error-default);\n\t--color-error-on: var(--schmancy-sys-color-error-on);\n\t--color-error-container: var(--schmancy-sys-color-error-container);\n\t--color-error-onContainer: var(--schmancy-sys-color-error-onContainer);\n\t--color-error-on-container: var(--schmancy-sys-color-error-onContainer);\n\t--color-success-default: var(--schmancy-sys-color-success-default);\n\t--color-success-on: var(--schmancy-sys-color-success-on);\n\t--color-success-container: var(--schmancy-sys-color-success-container);\n\t--color-success-onContainer: var(--schmancy-sys-color-success-onContainer);\n\t--color-success-on-container: var(--schmancy-sys-color-success-onContainer);\n\t--color-warning-default: var(--schmancy-sys-color-warning-default);\n\t--color-warning-on: var(--schmancy-sys-color-warning-on);\n\t--color-warning-container: var(--schmancy-sys-color-warning-container);\n\t--color-warning-onContainer: var(--schmancy-sys-color-warning-onContainer);\n\t--color-warning-on-container: var(--schmancy-sys-color-warning-onContainer);\n\t--color-info-default: var(--schmancy-sys-color-info-default);\n\t--color-info-on: var(--schmancy-sys-color-info-on);\n\t--color-info-container: var(--schmancy-sys-color-info-container);\n\t--color-info-onContainer: var(--schmancy-sys-color-info-onContainer);\n\t--color-info-on-container: var(--schmancy-sys-color-info-onContainer);\n\t--shadow-xs: var(--schmancy-sys-elevation-0);\n\t--shadow-sm: var(--schmancy-sys-elevation-1);\n\t--shadow-md: var(--schmancy-sys-elevation-2);\n\t--shadow-lg: var(--schmancy-sys-elevation-3);\n\t--shadow-xl: var(--schmancy-sys-elevation-4);\n\t--shadow-2xl: var(--schmancy-sys-elevation-5);\n\t--outline-1: var(--schmancy-sys-outline-1);\n\t--font-sans:\n\t\tui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\n\t--font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;\n\t--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;\n\t--color-red-50: oklch(0.971 0.013 17.38);\n\t--color-red-100: oklch(0.936 0.032 17.717);\n\t--color-red-200: oklch(0.885 0.062 18.334);\n\t--color-red-300: oklch(0.808 0.114 19.571);\n\t--color-red-400: oklch(0.704 0.191 22.216);\n\t--color-red-500: oklch(0.637 0.237 25.331);\n\t--color-red-600: oklch(0.577 0.245 27.325);\n\t--color-red-700: oklch(0.505 0.213 27.518);\n\t--color-red-800: oklch(0.444 0.177 26.899);\n\t--color-red-900: oklch(0.396 0.141 25.723);\n\t--color-red-950: oklch(0.258 0.092 26.042);\n\t--color-orange-50: oklch(0.98 0.016 73.684);\n\t--color-orange-100: oklch(0.954 0.038 75.164);\n\t--color-orange-200: oklch(0.901 0.076 70.697);\n\t--color-orange-300: oklch(0.837 0.128 66.29);\n\t--color-orange-400: oklch(0.75 0.183 55.934);\n\t--color-orange-500: oklch(0.705 0.213 47.604);\n\t--color-orange-600: oklch(0.646 0.222 41.116);\n\t--color-orange-700: oklch(0.553 0.195 38.402);\n\t--color-orange-800: oklch(0.47 0.157 37.304);\n\t--color-orange-900: oklch(0.408 0.123 38.172);\n\t--color-orange-950: oklch(0.266 0.079 36.259);\n\t--color-amber-50: oklch(0.987 0.022 95.277);\n\t--color-amber-100: oklch(0.962 0.059 95.617);\n\t--color-amber-200: oklch(0.924 0.12 95.746);\n\t--color-amber-300: oklch(0.879 0.169 91.605);\n\t--color-amber-400: oklch(0.828 0.189 84.429);\n\t--color-amber-500: oklch(0.769 0.188 70.08);\n\t--color-amber-600: oklch(0.666 0.179 58.318);\n\t--color-amber-700: oklch(0.555 0.163 48.998);\n\t--color-amber-800: oklch(0.473 0.137 46.201);\n\t--color-amber-900: oklch(0.414 0.112 45.904);\n\t--color-amber-950: oklch(0.279 0.077 45.635);\n\t--color-yellow-50: oklch(0.987 0.026 102.212);\n\t--color-yellow-100: oklch(0.973 0.071 103.193);\n\t--color-yellow-200: oklch(0.945 0.129 101.54);\n\t--color-yellow-300: oklch(0.905 0.182 98.111);\n\t--color-yellow-400: oklch(0.852 0.199 91.936);\n\t--color-yellow-500: oklch(0.795 0.184 86.047);\n\t--color-yellow-600: oklch(0.681 0.162 75.834);\n\t--color-yellow-700: oklch(0.554 0.135 66.442);\n\t--color-yellow-800: oklch(0.476 0.114 61.907);\n\t--color-yellow-900: oklch(0.421 0.095 57.708);\n\t--color-yellow-950: oklch(0.286 0.066 53.813);\n\t--color-lime-50: oklch(0.986 0.031 120.757);\n\t--color-lime-100: oklch(0.967 0.067 122.328);\n\t--color-lime-200: oklch(0.938 0.127 124.321);\n\t--color-lime-300: oklch(0.897 0.196 126.665);\n\t--color-lime-400: oklch(0.841 0.238 128.85);\n\t--color-lime-500: oklch(0.768 0.233 130.85);\n\t--color-lime-600: oklch(0.648 0.2 131.684);\n\t--color-lime-700: oklch(0.532 0.157 131.589);\n\t--color-lime-800: oklch(0.453 0.124 130.933);\n\t--color-lime-900: oklch(0.405 0.101 131.063);\n\t--color-lime-950: oklch(0.274 0.072 132.109);\n\t--color-green-50: oklch(0.982 0.018 155.826);\n\t--color-green-100: oklch(0.962 0.044 156.743);\n\t--color-green-200: oklch(0.925 0.084 155.995);\n\t--color-green-300: oklch(0.871 0.15 154.449);\n\t--color-green-400: oklch(0.792 0.209 151.711);\n\t--color-green-500: oklch(0.723 0.219 149.579);\n\t--color-green-600: oklch(0.627 0.194 149.214);\n\t--color-green-700: oklch(0.527 0.154 150.069);\n\t--color-green-800: oklch(0.448 0.119 151.328);\n\t--color-green-900: oklch(0.393 0.095 152.535);\n\t--color-green-950: oklch(0.266 0.065 152.934);\n\t--color-emerald-50: oklch(0.979 0.021 166.113);\n\t--color-emerald-100: oklch(0.95 0.052 163.051);\n\t--color-emerald-200: oklch(0.905 0.093 164.15);\n\t--color-emerald-300: oklch(0.845 0.143 164.978);\n\t--color-emerald-400: oklch(0.765 0.177 163.223);\n\t--color-emerald-500: oklch(0.696 0.17 162.48);\n\t--color-emerald-600: oklch(0.596 0.145 163.225);\n\t--color-emerald-700: oklch(0.508 0.118 165.612);\n\t--color-emerald-800: oklch(0.432 0.095 166.913);\n\t--color-emerald-900: oklch(0.378 0.077 168.94);\n\t--color-emerald-950: oklch(0.262 0.051 172.552);\n\t--color-teal-50: oklch(0.984 0.014 180.72);\n\t--color-teal-100: oklch(0.953 0.051 180.801);\n\t--color-teal-200: oklch(0.91 0.096 180.426);\n\t--color-teal-300: oklch(0.855 0.138 181.071);\n\t--color-teal-400: oklch(0.777 0.152 181.912);\n\t--color-teal-500: oklch(0.704 0.14 182.503);\n\t--color-teal-600: oklch(0.6 0.118 184.704);\n\t--color-teal-700: oklch(0.511 0.096 186.391);\n\t--color-teal-800: oklch(0.437 0.078 188.216);\n\t--color-teal-900: oklch(0.386 0.063 188.416);\n\t--color-teal-950: oklch(0.277 0.046 192.524);\n\t--color-cyan-50: oklch(0.984 0.019 200.873);\n\t--color-cyan-100: oklch(0.956 0.045 203.388);\n\t--color-cyan-200: oklch(0.917 0.08 205.041);\n\t--color-cyan-300: oklch(0.865 0.127 207.078);\n\t--color-cyan-400: oklch(0.789 0.154 211.53);\n\t--color-cyan-500: oklch(0.715 0.143 215.221);\n\t--color-cyan-600: oklch(0.609 0.126 221.723);\n\t--color-cyan-700: oklch(0.52 0.105 223.128);\n\t--color-cyan-800: oklch(0.45 0.085 224.283);\n\t--color-cyan-900: oklch(0.398 0.07 227.392);\n\t--color-cyan-950: oklch(0.302 0.056 229.695);\n\t--color-sky-50: oklch(0.977 0.013 236.62);\n\t--color-sky-100: oklch(0.951 0.026 236.824);\n\t--color-sky-200: oklch(0.901 0.058 230.902);\n\t--color-sky-300: oklch(0.828 0.111 230.318);\n\t--color-sky-400: oklch(0.746 0.16 232.661);\n\t--color-sky-500: oklch(0.685 0.169 237.323);\n\t--color-sky-600: oklch(0.588 0.158 241.966);\n\t--color-sky-700: oklch(0.5 0.134 242.749);\n\t--color-sky-800: oklch(0.443 0.11 240.79);\n\t--color-sky-900: oklch(0.391 0.09 240.876);\n\t--color-sky-950: oklch(0.293 0.066 243.157);\n\t--color-blue-50: oklch(0.97 0.014 254.604);\n\t--color-blue-100: oklch(0.932 0.032 255.585);\n\t--color-blue-200: oklch(0.882 0.059 254.128);\n\t--color-blue-300: oklch(0.809 0.105 251.813);\n\t--color-blue-400: oklch(0.707 0.165 254.624);\n\t--color-blue-500: oklch(0.623 0.214 259.815);\n\t--color-blue-600: oklch(0.546 0.245 262.881);\n\t--color-blue-700: oklch(0.488 0.243 264.376);\n\t--color-blue-800: oklch(0.424 0.199 265.638);\n\t--color-blue-900: oklch(0.379 0.146 265.522);\n\t--color-blue-950: oklch(0.282 0.091 267.935);\n\t--color-indigo-50: oklch(0.962 0.018 272.314);\n\t--color-indigo-100: oklch(0.93 0.034 272.788);\n\t--color-indigo-200: oklch(0.87 0.065 274.039);\n\t--color-indigo-300: oklch(0.785 0.115 274.713);\n\t--color-indigo-400: oklch(0.673 0.182 276.935);\n\t--color-indigo-500: oklch(0.585 0.233 277.117);\n\t--color-indigo-600: oklch(0.511 0.262 276.966);\n\t--color-indigo-700: oklch(0.457 0.24 277.023);\n\t--color-indigo-800: oklch(0.398 0.195 277.366);\n\t--color-indigo-900: oklch(0.359 0.144 278.697);\n\t--color-indigo-950: oklch(0.257 0.09 281.288);\n\t--color-violet-50: oklch(0.969 0.016 293.756);\n\t--color-violet-100: oklch(0.943 0.029 294.588);\n\t--color-violet-200: oklch(0.894 0.057 293.283);\n\t--color-violet-300: oklch(0.811 0.111 293.571);\n\t--color-violet-400: oklch(0.702 0.183 293.541);\n\t--color-violet-500: oklch(0.606 0.25 292.717);\n\t--color-violet-600: oklch(0.541 0.281 293.009);\n\t--color-violet-700: oklch(0.491 0.27 292.581);\n\t--color-violet-800: oklch(0.432 0.232 292.759);\n\t--color-violet-900: oklch(0.38 0.189 293.745);\n\t--color-violet-950: oklch(0.283 0.141 291.089);\n\t--color-purple-50: oklch(0.977 0.014 308.299);\n\t--color-purple-100: oklch(0.946 0.033 307.174);\n\t--color-purple-200: oklch(0.902 0.063 306.703);\n\t--color-purple-300: oklch(0.827 0.119 306.383);\n\t--color-purple-400: oklch(0.714 0.203 305.504);\n\t--color-purple-500: oklch(0.627 0.265 303.9);\n\t--color-purple-600: oklch(0.558 0.288 302.321);\n\t--color-purple-700: oklch(0.496 0.265 301.924);\n\t--color-purple-800: oklch(0.438 0.218 303.724);\n\t--color-purple-900: oklch(0.381 0.176 304.987);\n\t--color-purple-950: oklch(0.291 0.149 302.717);\n\t--color-fuchsia-50: oklch(0.977 0.017 320.058);\n\t--color-fuchsia-100: oklch(0.952 0.037 318.852);\n\t--color-fuchsia-200: oklch(0.903 0.076 319.62);\n\t--color-fuchsia-300: oklch(0.833 0.145 321.434);\n\t--color-fuchsia-400: oklch(0.74 0.238 322.16);\n\t--color-fuchsia-500: oklch(0.667 0.295 322.15);\n\t--color-fuchsia-600: oklch(0.591 0.293 322.896);\n\t--color-fuchsia-700: oklch(0.518 0.253 323.949);\n\t--color-fuchsia-800: oklch(0.452 0.211 324.591);\n\t--color-fuchsia-900: oklch(0.401 0.17 325.612);\n\t--color-fuchsia-950: oklch(0.293 0.136 325.661);\n\t--color-pink-50: oklch(0.971 0.014 343.198);\n\t--color-pink-100: oklch(0.948 0.028 342.258);\n\t--color-pink-200: oklch(0.899 0.061 343.231);\n\t--color-pink-300: oklch(0.823 0.12 346.018);\n\t--color-pink-400: oklch(0.718 0.202 349.761);\n\t--color-pink-500: oklch(0.656 0.241 354.308);\n\t--color-pink-600: oklch(0.592 0.249 0.584);\n\t--color-pink-700: oklch(0.525 0.223 3.958);\n\t--color-pink-800: oklch(0.459 0.187 3.815);\n\t--color-pink-900: oklch(0.408 0.153 2.432);\n\t--color-pink-950: oklch(0.284 0.109 3.907);\n\t--color-rose-50: oklch(0.969 0.015 12.422);\n\t--color-rose-100: oklch(0.941 0.03 12.58);\n\t--color-rose-200: oklch(0.892 0.058 10.001);\n\t--color-rose-300: oklch(0.81 0.117 11.638);\n\t--color-rose-400: oklch(0.712 0.194 13.428);\n\t--color-rose-500: oklch(0.645 0.246 16.439);\n\t--color-rose-600: oklch(0.586 0.253 17.585);\n\t--color-rose-700: oklch(0.514 0.222 16.935);\n\t--color-rose-800: oklch(0.455 0.188 13.697);\n\t--color-rose-900: oklch(0.41 0.159 10.272);\n\t--color-rose-950: oklch(0.271 0.105 12.094);\n\t--color-slate-50: oklch(0.984 0.003 247.858);\n\t--color-slate-100: oklch(0.968 0.007 247.896);\n\t--color-slate-200: oklch(0.929 0.013 255.508);\n\t--color-slate-300: oklch(0.869 0.022 252.894);\n\t--color-slate-400: oklch(0.704 0.04 256.788);\n\t--color-slate-500: oklch(0.554 0.046 257.417);\n\t--color-slate-600: oklch(0.446 0.043 257.281);\n\t--color-slate-700: oklch(0.372 0.044 257.287);\n\t--color-slate-800: oklch(0.279 0.041 260.031);\n\t--color-slate-900: oklch(0.208 0.042 265.755);\n\t--color-slate-950: oklch(0.129 0.042 264.695);\n\t--color-gray-50: oklch(0.985 0.002 247.839);\n\t--color-gray-100: oklch(0.967 0.003 264.542);\n\t--color-gray-200: oklch(0.928 0.006 264.531);\n\t--color-gray-300: oklch(0.872 0.01 258.338);\n\t--color-gray-400: oklch(0.707 0.022 261.325);\n\t--color-gray-500: oklch(0.551 0.027 264.364);\n\t--color-gray-600: oklch(0.446 0.03 256.802);\n\t--color-gray-700: oklch(0.373 0.034 259.733);\n\t--color-gray-800: oklch(0.278 0.033 256.848);\n\t--color-gray-900: oklch(0.21 0.034 264.665);\n\t--color-gray-950: oklch(0.13 0.028 261.692);\n\t--color-zinc-50: oklch(0.985 0 0);\n\t--color-zinc-100: oklch(0.967 0.001 286.375);\n\t--color-zinc-200: oklch(0.92 0.004 286.32);\n\t--color-zinc-300: oklch(0.871 0.006 286.286);\n\t--color-zinc-400: oklch(0.705 0.015 286.067);\n\t--color-zinc-500: oklch(0.552 0.016 285.938);\n\t--color-zinc-600: oklch(0.442 0.017 285.786);\n\t--color-zinc-700: oklch(0.37 0.013 285.805);\n\t--color-zinc-800: oklch(0.274 0.006 286.033);\n\t--color-zinc-900: oklch(0.21 0.006 285.885);\n\t--color-zinc-950: oklch(0.141 0.005 285.823);\n\t--color-neutral-50: oklch(0.985 0 0);\n\t--color-neutral-100: oklch(0.97 0 0);\n\t--color-neutral-200: oklch(0.922 0 0);\n\t--color-neutral-300: oklch(0.87 0 0);\n\t--color-neutral-400: oklch(0.708 0 0);\n\t--color-neutral-500: oklch(0.556 0 0);\n\t--color-neutral-600: oklch(0.439 0 0);\n\t--color-neutral-700: oklch(0.371 0 0);\n\t--color-neutral-800: oklch(0.269 0 0);\n\t--color-neutral-900: oklch(0.205 0 0);\n\t--color-neutral-950: oklch(0.145 0 0);\n\t--color-stone-50: oklch(0.985 0.001 106.423);\n\t--color-stone-100: oklch(0.97 0.001 106.424);\n\t--color-stone-200: oklch(0.923 0.003 48.717);\n\t--color-stone-300: oklch(0.869 0.005 56.366);\n\t--color-stone-400: oklch(0.709 0.01 56.259);\n\t--color-stone-500: oklch(0.553 0.013 58.071);\n\t--color-stone-600: oklch(0.444 0.011 73.639);\n\t--color-stone-700: oklch(0.374 0.01 67.558);\n\t--color-stone-800: oklch(0.268 0.007 34.298);\n\t--color-stone-900: oklch(0.216 0.006 56.043);\n\t--color-stone-950: oklch(0.147 0.004 49.25);\n\t--color-black: #000;\n\t--color-white: #fff;\n\t--spacing: 0.25rem;\n\t--breakpoint-sm: 40rem;\n\t--breakpoint-md: 48rem;\n\t--breakpoint-lg: 64rem;\n\t--breakpoint-xl: 80rem;\n\t--breakpoint-2xl: 96rem;\n\t--container-3xs: 16rem;\n\t--container-2xs: 18rem;\n\t--container-xs: 20rem;\n\t--container-sm: 24rem;\n\t--container-md: 28rem;\n\t--container-lg: 32rem;\n\t--container-xl: 36rem;\n\t--container-2xl: 42rem;\n\t--container-3xl: 48rem;\n\t--container-4xl: 56rem;\n\t--container-5xl: 64rem;\n\t--container-6xl: 72rem;\n\t--container-7xl: 80rem;\n\t--text-xs: 0.75rem;\n\t--text-xs--line-height: calc(1 / 0.75);\n\t--text-sm: 0.875rem;\n\t--text-sm--line-height: calc(1.25 / 0.875);\n\t--text-base: 1rem;\n\t--text-base--line-height: calc(1.5 / 1);\n\t--text-lg: 1.125rem;\n\t--text-lg--line-height: calc(1.75 / 1.125);\n\t--text-xl: 1.25rem;\n\t--text-xl--line-height: calc(1.75 / 1.25);\n\t--text-2xl: 1.5rem;\n\t--text-2xl--line-height: calc(2 / 1.5);\n\t--text-3xl: 1.875rem;\n\t--text-3xl--line-height: calc(2.25 / 1.875);\n\t--text-4xl: 2.25rem;\n\t--text-4xl--line-height: calc(2.5 / 2.25);\n\t--text-5xl: 3rem;\n\t--text-5xl--line-height: 1;\n\t--text-6xl: 3.75rem;\n\t--text-6xl--line-height: 1;\n\t--text-7xl: 4.5rem;\n\t--text-7xl--line-height: 1;\n\t--text-8xl: 6rem;\n\t--text-8xl--line-height: 1;\n\t--text-9xl: 8rem;\n\t--text-9xl--line-height: 1;\n\t--font-weight-thin: 100;\n\t--font-weight-extralight: 200;\n\t--font-weight-light: 300;\n\t--font-weight-normal: 400;\n\t--font-weight-medium: 500;\n\t--font-weight-semibold: 600;\n\t--font-weight-bold: 700;\n\t--font-weight-extrabold: 800;\n\t--font-weight-black: 900;\n\t--tracking-tighter: -0.05em;\n\t--tracking-tight: -0.025em;\n\t--tracking-normal: 0em;\n\t--tracking-wide: 0.025em;\n\t--tracking-wider: 0.05em;\n\t--tracking-widest: 0.1em;\n\t--leading-tight: 1.25;\n\t--leading-snug: 1.375;\n\t--leading-normal: 1.5;\n\t--leading-relaxed: 1.625;\n\t--leading-loose: 2;\n\t--radius-xs: 0.125rem;\n\t--radius-sm: 0.25rem;\n\t--radius-md: 0.375rem;\n\t--radius-lg: 0.5rem;\n\t--radius-xl: 0.75rem;\n\t--radius-2xl: 1rem;\n\t--radius-3xl: 1.5rem;\n\t--radius-4xl: 2rem;\n\t--shadow-smxs: 0 1px rgb(0 0 0 / 0.05);\n\t--shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n\t--shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n\t--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n\t--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n\t--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n\t--shadow-smxl: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n\t--inset-shadow-smxs: inset 0 1px rgb(0 0 0 / 0.05);\n\t--inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / 0.05);\n\t--inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / 0.05);\n\t--drop-shadow-xs: 0 1px 1px rgb(0 0 0 / 0.05);\n\t--drop-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.15);\n\t--drop-shadow-md: 0 3px 3px rgb(0 0 0 / 0.12);\n\t--drop-shadow-lg: 0 4px 4px rgb(0 0 0 / 0.15);\n\t--drop-shadow-xl: 0 9px 7px rgb(0 0 0 / 0.1);\n\t--drop-shadow-smxl: 0 25px 25px rgb(0 0 0 / 0.15);\n\t--blur-xs: 4px;\n\t--blur-sm: 8px;\n\t--blur-md: 12px;\n\t--blur-lg: 16px;\n\t--blur-xl: 24px;\n\t--blur-2xl: 40px;\n\t--blur-3xl: 64px;\n\t--perspective-dramatic: 100px;\n\t--perspective-near: 300px;\n\t--perspective-normal: 500px;\n\t--perspective-midrange: 800px;\n\t--perspective-distant: 1200px;\n\t--aspect-video: 16 / 9;\n\t--aspect-a4: 210 / 297;\n\t--ease-in: cubic-bezier(0.4, 0, 1, 1);\n\t--ease-out: cubic-bezier(0, 0, 0.2, 1);\n\t--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n\t--animate-spin: spin 1s linear infinite;\n\t--animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;\n\t--animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n\t--animate-bounce: bounce 1s infinite;\n\t/* Presentation animations */\n\t--animate-float-1: float-drift 20s ease-in-out infinite;\n\t--animate-float-2: float-drift-alt 25s ease-in-out infinite;\n\t--animate-float-3: float-drift 30s ease-in-out infinite reverse;\n\t--animate-pulse-glow: pulse-glow 8s ease-in-out infinite;\n\t--animate-spin-slow: slow-spin 120s linear infinite;\n\n\t/* Scene nebula layers */\n\t--animate-aurora-drift: aurora-drift 30s ease-in-out infinite;\n\t--animate-scene-enter: scene-enter 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;\n\n\n\n\t/* Color System */\n\t--md-sys-color-scrim: var(--schmancy-sys-color-scrim);\n\t--md-sys-color-outline: var(--schmancy-sys-color-outline);\n\t--md-sys-color-outlineVariant: var(--schmancy-sys-color-outlineVariant);\n\t/* Surface Colors */\n\t--md-sys-color-surface-default: var(--schmancy-sys-color-surface-default);\n\t--md-sys-color-surface-dim: var(--schmancy-sys-color-surface-dim);\n\t--md-sys-color-surface-bright: var(--schmancy-sys-color-surface-bright);\n\t--md-sys-color-surface-container: var(--schmancy-sys-color-surface-container);\n\t--md-sys-color-surface-low: var(--schmancy-sys-color-surface-low);\n\t--md-sys-color-surface-high: var(--schmancy-sys-color-surface-high);\n\t--md-sys-color-surface-highest: var(--schmancy-sys-color-surface-highest);\n\t--md-sys-color-surface-lowest: var(--schmancy-sys-color-surface-lowest);\n\t--md-sys-color-surface-on: var(--schmancy-sys-color-surface-on);\n\t--md-sys-color-on-surface-variant: var(--schmancy-sys-color-surface-onVariant);\n\t--md-sys-color-on-secondary-container: var(--schmancy-sys-color-secondary-onContainer);\n\t/* Primary Colors */\n\t--md-sys-color-primary-default: var(--schmancy-sys-color-primary-default);\n\t--md-sys-color-primary-on: var(--schmancy-sys-color-primary-on);\n\t--md-sys-color-primary-container: var(--schmancy-sys-color-primary-container);\n\t--md-sys-color-primary-onContainer: var(--schmancy-sys-color-primary-onContainer);\n\n\t/* Secondary Colors */\n\t--md-sys-color-secondary-default: var(--schmancy-sys-color-secondary-default);\n\t--md-sys-color-secondary-on: var(--schmancy-sys-color-secondary-on);\n\t--md-sys-color-secondary-container: var(--schmancy-sys-color-secondary-container);\n\t--md-sys-color-secondary-onContainer: var(--schmancy-sys-color-secondary-onContainer);\n\n\t/* Tertiary Colors */\n\t--md-sys-color-tertiary-default: var(--schmancy-sys-color-tertiary-default);\n\t--md-sys-color-tertiary-on: var(--schmancy-sys-color-tertiary-on);\n\t--md-sys-color-tertiary-container: var(--schmancy-sys-color-tertiary-container);\n\t--md-sys-color-tertiary-onContainer: var(--schmancy-sys-color-tertiary-onContainer);\n\n\t/* Error Colors */\n\t--md-sys-color-error-default: var(--schmancy-sys-color-error-default);\n\t--md-sys-color-error-on: var(--schmancy-sys-color-error-on);\n\t--md-sys-color-error-container: var(--schmancy-sys-color-error-container);\n\t--md-sys-color-error-onContainer: var(--schmancy-sys-color-error-onContainer);\n\n\t/* Success Colors */\n\t--md-sys-color-success-default: var(--schmancy-sys-color-success-default);\n\t--md-sys-color-success-on: var(--schmancy-sys-color-success-on);\n\t--md-sys-color-success-container: var(--schmancy-sys-color-success-container);\n\t--md-sys-color-success-onContainer: var(--schmancy-sys-color-success-onContainer);\n\n\t/* Warning Colors */\n\t--md-sys-color-warning-default: var(--schmancy-sys-color-warning-default);\n\t--md-sys-color-warning-on: var(--schmancy-sys-color-warning-on);\n\t--md-sys-color-warning-container: var(--schmancy-sys-color-warning-container);\n\t--md-sys-color-warning-onContainer: var(--schmancy-sys-color-warning-onContainer);\n\n\t/* Info Colors */\n\t--md-sys-color-info-default: var(--schmancy-sys-color-info-default);\n\t--md-sys-color-info-on: var(--schmancy-sys-color-info-on);\n\t--md-sys-color-info-container: var(--schmancy-sys-color-info-container);\n\t--md-sys-color-info-onContainer: var(--schmancy-sys-color-info-onContainer);\n\n\t/* Elevation Levels */\n\t--md-sys-elevation-0: var(--schmancy-sys-elevation-0);\n\t--md-sys-elevation-1: var(--schmancy-sys-elevation-1);\n\t--md-sys-elevation-2: var(--schmancy-sys-elevation-2);\n\t--md-sys-elevation-3: var(--schmancy-sys-elevation-3);\n\t--md-sys-elevation-4: var(--schmancy-sys-elevation-4);\n\t--md-sys-elevation-5: var(--schmancy-sys-elevation-5);\n\n\t/* Outline */\n\t--md-sys-outline-1: var(--schmancy-sys-outline-1);\n\n\t/* Chips */\n\t--md-filter-chip-label-text-color: var(--schmancy-sys-color-surface-on);\n\n\t/* Checkbox */\n\t--md-checkbox-focus-outline-color: var(--schmancy-sys-color-surface-on);\n\t--md-checkbox-focus-outline-width: 2px;\n\t--md-checkbox-hover-outline-color: var(--schmancy-sys-color-surface-on);\n\t--md-checkbox-hover-outline-width: 2px;\n\t--md-checkbox-pressed-outline-color: var(--schmancy-sys-color-surface-on);\n\t--md-checkbox-pressed-outline-width: 2px;\n\t--md-checkbox-disabled-outline-color: var(--schmancy-sys-color-surface-on);\n\t--md-checkbox-disabled-outline-width: 2px;\n}\n\n@keyframes spin {\n\tto {\n\t\ttransform: rotate(360deg);\n\t}\n}\n@keyframes ping {\n\t75%,\n\t100% {\n\t\ttransform: scale(2);\n\t\topacity: 0;\n\t}\n}\n@keyframes pulse {\n\t50% {\n\t\topacity: 0.5;\n\t}\n}\n@keyframes bounce {\n\t0%,\n\t100% {\n\t\ttransform: translateY(-25%);\n\t\tanimation-timing-function: cubic-bezier(0.8, 0, 1, 1);\n\t}\n\t50% {\n\t\ttransform: none;\n\t\tanimation-timing-function: cubic-bezier(0, 0, 0.2, 1);\n\t}\n}\n@keyframes float-drift {\n\t0%, 100% { transform: translate(0, 0) rotate(0deg); }\n\t25% { transform: translate(20px, -30px) rotate(2deg); }\n\t50% { transform: translate(-10px, -50px) rotate(-1deg); }\n\t75% { transform: translate(15px, -20px) rotate(1deg); }\n}\n@keyframes float-drift-alt {\n\t0%, 100% { transform: translate(0, 0) rotate(0deg); }\n\t25% { transform: translate(-25px, 20px) rotate(-2deg); }\n\t50% { transform: translate(15px, 40px) rotate(1deg); }\n\t75% { transform: translate(-20px, 15px) rotate(-1deg); }\n}\n@keyframes pulse-glow {\n\t0%, 100% { opacity: 0.15; transform: scale(1); }\n\t50% { opacity: 0.25; transform: scale(1.05); }\n}\n@keyframes slow-spin {\n\tfrom { transform: rotate(0deg); }\n\tto { transform: rotate(360deg); }\n}\n@keyframes aurora-drift {\n\t0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }\n\t33% { transform: translate(3%, -5%) scale(1.05) rotate(1deg); }\n\t66% { transform: translate(-3%, 3%) scale(0.95) rotate(-1deg); }\n}\n@keyframes scene-enter {\n\tfrom { opacity: 0; transform: scale(0.92); filter: blur(12px); }\n\tto { opacity: 1; transform: scale(1); filter: blur(0px); }\n}\n@keyframes star-appear {\n\tfrom { opacity: 0; transform: scale(0.5); }\n\tto { opacity: 1; transform: scale(1); }\n}\n@keyframes star-twinkle {\n\t0%, 100% { opacity: 1; transform: scale(1); }\n\t50% { opacity: 0.4; transform: scale(0.92); }\n}\n","import { provide } from '@lit/context'\nimport { argbFromHex, themeFromSourceColor } from '@material/material-color-utilities'\nimport { SchmancyElement } from '../../mixins/index'\nimport { html, unsafeCSS } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { Observable, of, switchMap, fromEvent, takeUntil } from 'rxjs'\nimport { themeContext } from './context'\nimport { formatTheme } from './theme.format'\nimport { TSchmancyTheme } from './theme.interface'\nimport { ThemeHereIAm, ThemeWhereAreYou, ThemeWhereAreYouEvent } from './theme.events'\nimport style from './theme.style.css?inline'\nexport const tailwindStyles = unsafeCSS(style)\nconst mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')\nconst $colorScheme = new Observable<string>(subscriber => {\n\t// Emit the initial value\n\tconst initialColorScheme = mediaQuery.matches ? 'dark' : 'light'\n\tsubscriber.next(initialColorScheme)\n\n\t// Subscribe to media query changes using RxJS\n\tconst subscription = fromEvent<MediaQueryListEvent>(mediaQuery, 'change').subscribe(e => {\n\t\tconst newColorScheme = e.matches ? 'dark' : 'light'\n\t\tsubscriber.next(newColorScheme)\n\t})\n\n\t// On unsubscribe, unsubscribe from the RxJS subscription\n\treturn () => subscription.unsubscribe()\n})\n\n/**\n * SchmancyThemeComponent - Provides theming capabilities for Schmancy components.\n *\n * This component manages color schemes, primary colors, and theme distribution\n * throughout the component tree. It can be used at the root level or nested\n * to provide different themes to different parts of the application.\n *\n * @element schmancy-theme\n *\n * @example\n * ```html\n * <!-- Root theme provider -->\n * <schmancy-theme color=\"#6200ee\" scheme=\"auto\" root>\n * <your-app></your-app>\n * </schmancy-theme>\n *\n * <!-- Nested theme for specific section -->\n * <schmancy-theme color=\"#2196f3\" scheme=\"dark\">\n * <div class=\"dark-section\">\n * <!-- Components here will use blue dark theme -->\n * </div>\n * </schmancy-theme>\n * ```\n */\n@customElement('schmancy-theme')\nexport class SchmancyThemeComponent extends SchmancyElement {\n\tstatic styles = [tailwindStyles]\n\n\t/**\n\t * Primary color for the theme in hex format.\n\t * @attr color\n\t * @type {string}\n\t * @default Random generated color\n\t * @example \"#6200ee\"\n\t */\n\t@property({ type: String, reflect: true })\n\tcolor: string\n\n\t/**\n\t * Color scheme for the theme.\n\t * @attr scheme\n\t * @type {'dark' | 'light' | 'auto'}\n\t * @default 'auto'\n\t */\n\t@property({ type: String }) scheme: 'dark' | 'light' | 'auto' = 'auto'\n\n\t/**\n\t * Whether this theme should be applied at the root level (document.body).\n\t * @attr root\n\t * @type {boolean}\n\t * @default false\n\t */\n\t@property({ type: Boolean }) root = false\n\n\t/**\n\t * Locale for number/date formatting. Overrides navigator.language when set.\n\t * @attr locale\n\t * @type {string}\n\t * @default navigator.language\n\t * @example \"de-DE\", \"en-US\", \"ar-SA\"\n\t */\n\t@property({ type: String }) locale: string = typeof navigator !== 'undefined' ? navigator.language : 'de-DE'\n\n\t/**\n\t * Unique name for this theme instance (used for session storage).\n\t * If not provided, will be generated from DOM path.\n\t * @attr name\n\t * @type {string}\n\t */\n\t@property({ type: String }) name?: string\n\n\t/**\n\t * Theme configuration object containing all theme variables.\n\t * @property {Partial<TSchmancyTheme>} theme\n\t * @internal\n\t */\n\t@provide({\n\t\tcontext: themeContext,\n\t})\n\t@property({ type: Object })\n\ttheme: Partial<TSchmancyTheme> = {}\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\n\t\t// Generate unique theme name for session storage\n\t\tconst themeName = this.generateThemeName()\n\n\t\t// Priority 1: Session storage\n\t\tconst storedColor = sessionStorage.getItem(`schmancy-theme-${themeName}-color`)\n\t\tconst storedScheme = sessionStorage.getItem(`schmancy-theme-${themeName}-scheme`)\n\n\t\t// Priority 2: Properties (if set via attributes)\n\t\t// Priority 3: Random generation\n\t\tif (!this.color) {\n\t\t\tthis.color = storedColor || this.generateRandomColor()\n\t\t\t// Save the initial color to session storage\n\t\t\tsessionStorage.setItem(`schmancy-theme-${themeName}-color`, this.color)\n\t\t}\n\n\t\tif (!this.hasAttribute('scheme') && storedScheme) {\n\t\t\tthis.scheme = storedScheme as 'dark' | 'light' | 'auto'\n\t\t}\n\n\t\t// Watch only OWN scheme property (independent per instance)\n\t\tof(this.scheme)\n\t\t\t.pipe(\n\t\t\t\tswitchMap(scheme => {\n\t\t\t\t\tif (scheme === 'auto') return $colorScheme\n\t\t\t\t\treturn of(scheme)\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(scheme => {\n\t\t\t\tthis.scheme = scheme as 'dark' | 'light'\n\t\t\t\t// Defer registerTheme() to next microtask to prevent scheduling update during update\n\t\t\t\tqueueMicrotask(() => {\n\t\t\t\t\tthis.registerTheme()\n\t\t\t\t\t// Save to session storage with unique theme name\n\t\t\t\t\tsessionStorage.setItem(`schmancy-theme-${themeName}-scheme`, this.scheme)\n\t\t\t\t})\n\t\t\t})\n\n\t\t// Listen for generic theme discovery events\n\t\tfromEvent<ThemeWhereAreYouEvent>(this, ThemeWhereAreYou)\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(e => {\n\t\t\t\te.stopPropagation()\n\t\t\t\te.preventDefault()\n\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(ThemeHereIAm, {\n\t\t\t\t\t\tdetail: { theme: this },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\t}\n\n\tupdated(changedProperties: Map<string | number | symbol, unknown>): void {\n\t\tsuper.updated(changedProperties)\n\n\t\t// Generate unique theme name for session storage\n\t\tconst themeName = this.generateThemeName()\n\n\t\t// Re-register theme and save to session when properties change\n\t\tif (changedProperties.has('color')) {\n\t\t\tsessionStorage.setItem(`schmancy-theme-${themeName}-color`, this.color)\n\t\t\tthis.registerTheme()\n\t\t}\n\n\t\tif (changedProperties.has('scheme')) {\n\t\t\tsessionStorage.setItem(`schmancy-theme-${themeName}-scheme`, this.scheme)\n\t\t\tthis.registerTheme()\n\t\t}\n\n\t\t// Note: Don't call registerTheme() when 'theme' changes because\n\t\t// registerTheme() sets this.theme - would cause infinite loop\n\n\t\tif (changedProperties.has('locale')) {\n\t\t\tthis.registerTheme()\n\t\t}\n\t}\n\n\tregisterTheme() {\n\t\t// Ensure color is a valid hex string\n\t\tconst colorHex = typeof this.color === 'string' ? this.color : '#6200ee'\n\n\t\tconst formattedTheme = formatTheme(\n\t\t\tthemeFromSourceColor(argbFromHex(colorHex)),\n\t\t\tthis.scheme === 'dark',\n\t\t\t{\n\t\t\t\tsuccess: argbFromHex('#4CAF50'), // Material Green 500 - vibrant but balanced\n\t\t\t\twarning: argbFromHex('#FF9800'), // Material Orange 500 - better contrast than amber\n\t\t\t\tinfo: argbFromHex('#2196F3'), // Material Blue 500 - classic info blue\n\t\t\t},\n\t\t)\n\n\t\t// Update the provided context with locale included\n\t\t// This ensures consumers get the locale via @consume\n\t\tthis.theme = { ...formattedTheme, ...this.theme, locale: this.locale }\n\n\t\tthis.registerThemeValues('schmancy', '', this.theme)\n\n\t\t// Backward compatibility: Map old variable names to new ones\n\t\tconst hostElement = this.root ? document.body : (this.shadowRoot.host as HTMLElement)\n\t\tconst getVar = (name: string) => hostElement.style.getPropertyValue(name)\n\n\t\t// Map old surface container names to new M3 names\n\t\thostElement.style.setProperty(\n\t\t\t'--schmancy-sys-color-surface-low',\n\t\t\tgetVar('--schmancy-sys-color-surface-containerLow'),\n\t\t)\n\t\thostElement.style.setProperty(\n\t\t\t'--schmancy-sys-color-surface-high',\n\t\t\tgetVar('--schmancy-sys-color-surface-containerHigh'),\n\t\t)\n\t\thostElement.style.setProperty(\n\t\t\t'--schmancy-sys-color-surface-highest',\n\t\t\tgetVar('--schmancy-sys-color-surface-containerHighest'),\n\t\t)\n\t\thostElement.style.setProperty(\n\t\t\t'--schmancy-sys-color-surface-lowest',\n\t\t\tgetVar('--schmancy-sys-color-surface-containerLowest'),\n\t\t)\n\n\t\t// Set the color-scheme CSS property on the host element\n\t\thostElement.style.colorScheme = this.scheme === 'dark' ? 'dark' : 'light'\n\t}\n\n\tregisterThemeValues(prefix = 'schmancy', path: string, value: Partial<TSchmancyTheme>): string | undefined {\n\t\t// if the value is an object\n\t\tif (typeof value === 'object') {\n\t\t\t// generate the code for each property of the object\n\t\t\treturn Object.keys(value)\n\t\t\t\t.map(key => {\n\t\t\t\t\t// if the path is empty, don't add a dash\n\t\t\t\t\treturn this.registerThemeValues(\n\t\t\t\t\t\tprefix,\n\t\t\t\t\t\tpath + `${path ? '-' : ''}` + key,\n\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\tvalue[key],\n\t\t\t\t\t)\n\t\t\t\t})\n\t\t\t\t.join('\\n')\n\t\t} else {\n\t\t\t;(this.root ? document.body : (this.shadowRoot.host as HTMLElement)).style.setProperty(\n\t\t\t\t`--${prefix}-${path}`,\n\t\t\t\tvalue,\n\t\t\t)\n\n\t\t\treturn\n\t\t}\n\t}\n\tgenerateRandomColor() {\n\t\t// Generates a random hexadecimal color code\n\t\tconst randomColor = Math.floor(Math.random() * 16777215).toString(16)\n\t\t// Pad with leading zeros if necessary to ensure 6 characters\n\t\treturn '#' + randomColor.padStart(6, '0')\n\t}\n\n\t/**\n\t * Generate a unique theme name based on DOM path\n\t */\n\tprivate generateThemeName(): string {\n\t\t// If name is provided, use it\n\t\tif (this.name) return this.name\n\n\t\t// Generate from DOM path\n\t\tconst path: string[] = []\n\t\tlet element: Element | null = this as Element\n\n\t\twhile (element && element !== document.body) {\n\t\t\tconst parent = element.parentElement\n\t\t\tif (parent) {\n\t\t\t\tconst index = Array.from(parent.children).indexOf(element)\n\t\t\t\tconst tag = element.tagName.toLowerCase()\n\t\t\t\tpath.unshift(`${tag}[${index}]`)\n\t\t\t}\n\t\t\telement = parent\n\t\t}\n\n\t\treturn path.join('>')\n\t}\n\n\tprotected render(): unknown {\n\t\treturn html`\n\t\t\t<schmancy-surface type=\"containerLowest\">\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-theme': SchmancyThemeComponent\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { debounceTime, Subject, takeUntil, tap, switchMap, of } from 'rxjs'\nimport type { SchmancyThemeComponent } from './theme.component'\n\nexport interface ColorPreset {\n\tname: string\n\tvalue: string\n\tcategory?: 'primary' | 'secondary' | 'accent'\n}\n\n// Re-export for convenience\nexport type { ColorPreset as ThemeColorPreset }\n\n/**\n * Base theme controller component providing color and scheme controls.\n * Can be used standalone without any specific UI container.\n *\n * @element schmancy-theme-controller\n *\n * @property {ColorPreset[]} customColors - Optional custom color presets\n *\n * @example\n * ```html\n * <schmancy-theme-controller></schmancy-theme-controller>\n *\n * <!-- With custom colors -->\n * <schmancy-theme-controller\n * .customColors=\"${[\n * { name: 'Brand', value: '#FF5722', category: 'primary' }\n * ]}\"\n * ></schmancy-theme-controller>\n * ```\n */\n@customElement('schmancy-theme-controller')\nexport class SchmancyThemeController extends SchmancyElement {\n\t@state() protected currentScheme: 'dark' | 'light' | 'auto' = 'auto'\n\t@state() protected currentColor: string = '#6200ee'\n\t@state() protected resolvedScheme: 'dark' | 'light' = 'light'\n\t@state() private themeComponent: SchmancyThemeComponent | null = null\n\n\t@property({ type: Array }) customColors?: ColorPreset[]\n\n\tprotected colorInput$ = new Subject<string>()\n\n\tprotected get presetColors(): ColorPreset[] {\n\t\tif (this.customColors) return this.customColors\n\n\t\treturn [\n\t\t\t{ name: 'Lavender', value: '#9D8FE8', category: 'primary' },\n\t\t\t{ name: 'Rose', value: '#F48B9D', category: 'accent' },\n\t\t\t{ name: 'Mint', value: '#7ED997', category: 'accent' },\n\t\t\t{ name: 'Amber', value: '#FFC875', category: 'accent' },\n\t\t\t{ name: 'Sky', value: '#6DD5FA', category: 'primary' },\n\t\t\t{ name: 'Coral', value: '#FF9E7C', category: 'secondary' },\n\t\t\t{ name: 'Indigo', value: '#7380E8', category: 'primary' },\n\t\t\t{ name: 'Blush', value: '#FF79A8', category: 'secondary' },\n\t\t\t{ name: 'Aqua', value: '#64E0F0', category: 'accent' },\n\t\t\t{ name: 'Gold', value: '#FFE066', category: 'accent' },\n\t\t\t{ name: 'Slate', value: '#6B7E91', category: 'primary' },\n\t\t\t{ name: 'Onyx', value: '#3D4451', category: 'primary' },\n\t\t\t{ name: 'Plum', value: '#8E6BA8', category: 'secondary' },\n\t\t\t{ name: 'Forest', value: '#5A7A5F', category: 'accent' },\n\t\t\t{ name: 'Navy', value: '#3D5A80', category: 'primary' },\n\t\t\t{ name: 'Burgundy', value: '#994F5E', category: 'accent' },\n\t\t]\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Discover the nearest theme component\n\t\tthis.discover<SchmancyThemeComponent>('schmancy-theme').pipe(\n\t\t\tswitchMap(theme => {\n\t\t\t\tif (theme) {\n\t\t\t\t\tthis.themeComponent = theme\n\t\t\t\t\t// Set initial values from discovered theme\n\t\t\t\t\tthis.currentScheme = theme.scheme\n\t\t\t\t\tthis.currentColor = theme.color\n\n\t\t\t\t\t// Watch for theme property changes\n\t\t\t\t\treturn new Subject().pipe(\n\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\tif (this.themeComponent) {\n\t\t\t\t\t\t\t\tthis.currentScheme = this.themeComponent.scheme\n\t\t\t\t\t\t\t\tthis.currentColor = this.themeComponent.color\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\treturn of(null)\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting)\n\t\t).subscribe()\n\n\t\t// Debounced color input\n\t\tthis.colorInput$.pipe(\n\t\t\tdebounceTime(150),\n\t\t\ttap(color => {\n\t\t\t\tif (this.themeComponent) {\n\t\t\t\t\tthis.themeComponent.color = color\n\t\t\t\t}\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting)\n\t\t).subscribe()\n\t}\n\n\tprotected setScheme(scheme: 'dark' | 'light' | 'auto') {\n\t\tif (this.themeComponent) {\n\t\t\tthis.themeComponent.scheme = scheme\n\t\t\tthis.currentScheme = scheme\n\t\t}\n\t}\n\n\tprotected setColor(color: string) {\n\t\tif (this.themeComponent) {\n\t\t\tthis.themeComponent.color = color\n\t\t\tthis.currentColor = color\n\t\t}\n\t}\n\n\tprotected handleColorInput(e: Event) {\n\t\tconst input = e.target as HTMLInputElement\n\t\tthis.colorInput$.next(input.value)\n\t}\n\n\tprotected randomColor() {\n\t\tconst random = this.presetColors[Math.floor(Math.random() * this.presetColors.length)]\n\t\tthis.setColor(random.value)\n\t}\n\n\tprotected triggerColorPicker() {\n\t\tconst input = this.renderRoot.querySelector('input[type=\"color\"]') as HTMLInputElement\n\t\tinput?.click()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"space-y-4\">\n\t\t\t\t<!-- Color Display -->\n\t\t\t\t<div class=\"flex items-center gap-3\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"w-16 h-16 rounded-xl border-2 border-outline cursor-pointer transition-transform hover:scale-105 active:scale-95\"\n\t\t\t\t\t\tstyle=\"background: ${this.currentColor}\"\n\t\t\t\t\t\t@click=\"${this.triggerColorPicker}\"\n\t\t\t\t\t\ttitle=\"Click to change color\"\n\t\t\t\t\t></div>\n\t\t\t\t\t<div class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t<schmancy-typography type=\"body\" class=\"font-mono opacity-60\"> ${this.currentColor} </schmancy-typography>\n\t\t\t\t\t\t<div class=\"flex gap-1 mt-2\">\n\t\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t\tvariant=\"${this.currentScheme === 'light' ? 'tonal' : 'text'}\"\n\t\t\t\t\t\t\t\t@click=\"${() => this.setScheme('light')}\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<schmancy-icon>light_mode</schmancy-icon>\n\t\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t\tvariant=\"${this.currentScheme === 'dark' ? 'tonal' : 'text'}\"\n\t\t\t\t\t\t\t\t@click=\"${() => this.setScheme('dark')}\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<schmancy-icon>dark_mode</schmancy-icon>\n\t\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t\tvariant=\"${this.currentScheme === 'auto' ? 'tonal' : 'text'}\"\n\t\t\t\t\t\t\t\t@click=\"${() => this.setScheme('auto')}\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<schmancy-icon>contrast</schmancy-icon>\n\t\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t\t<schmancy-button variant=\"text\" @click=\"${this.randomColor}\">\n\t\t\t\t\t\t\t\t<schmancy-icon>shuffle</schmancy-icon>\n\t\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Palette -->\n\t\t\t\t<div class=\"flex flex-wrap gap-1.5\">\n\t\t\t\t\t${this.presetColors.map(\n\t\t\t\t\t\tcolor => html`\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tclass=\"w-7 h-7 rounded-full transition-all hover:scale-110 active:scale-95 ${this.currentColor ===\n\t\t\t\t\t\t\t\tcolor.value\n\t\t\t\t\t\t\t\t\t? 'ring-2 ring-primary ring-offset-1'\n\t\t\t\t\t\t\t\t\t: ''}\"\n\t\t\t\t\t\t\t\tstyle=\"background: ${color.value}\"\n\t\t\t\t\t\t\t\t@click=\"${() => this.setColor(color.value)}\"\n\t\t\t\t\t\t\t\ttitle=\"${color.name}\"\n\t\t\t\t\t\t\t></button>\n\t\t\t\t\t\t`,\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Hidden Color Input -->\n\t\t\t\t<input type=\"color\" .value=\"${this.currentColor}\" @input=\"${this.handleColorInput}\" class=\"hidden\" />\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-theme-controller': SchmancyThemeController\n\t}\n}","/**\n * Theme Audio Player Component\n *\n * A generic audio player that generates emotional sounds based on user mood and theme color.\n * Integrates with the Sound Service for playback and theme management.\n * Uses local storage for persistence via the Sound Service.\n *\n * @element schmancy-theme-audio-player\n *\n * @fires schmancy-generate-mood-audio - Dispatched when user requests audio generation\n * detail: { moodText: string, themeColor: string, scheme: 'dark' | 'light' | 'auto' }\n *\n * @example\n * ```html\n * <schmancy-theme-audio-player\n * @schmancy-generate-mood-audio=${(e) => handleGenerate(e.detail)}\n * ></schmancy-theme-audio-player>\n * ```\n */\n\nimport { SchmancyElement } from '@mixins/index'\nimport { html, css } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\nimport { debounceTime, Subject, takeUntil, tap, switchMap, of } from 'rxjs'\nimport { sound } from '../audio/sound.service'\nimport type { SchmancyThemeComponent } from './theme.component'\nimport type {\n\tAudioSequence,\n\tGenerateMoodAudioRequest,\n\tGenerateMoodAudioResponse,\n\tSoundTheme,\n\tFeeling,\n} from '@schmancy/types/mood-audio.types'\n\n/** Event detail for mood audio generation request */\nexport interface GenerateMoodAudioEventDetail extends GenerateMoodAudioRequest {}\n\n/** Custom event for requesting mood audio generation */\nexport class SchmancyGenerateMoodAudioEvent extends CustomEvent<GenerateMoodAudioEventDetail> {\n\tconstructor(detail: GenerateMoodAudioEventDetail) {\n\t\tsuper('schmancy-generate-mood-audio', {\n\t\t\tdetail,\n\t\t\tbubbles: true,\n\t\t\tcomposed: true,\n\t\t})\n\t}\n}\n\n// Add to global event map\ndeclare global {\n\tinterface HTMLElementEventMap {\n\t\t'schmancy-generate-mood-audio': SchmancyGenerateMoodAudioEvent\n\t}\n}\n\n/**\n * Mood Audio Player - Generates emotional sounds based on mood and theme\n * Integrates with the Sound Service for consistent sound management\n */\n@customElement('schmancy-theme-audio-player')\nexport class SchmancyThemeAudioPlayer extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`]\n\n\t/** Current theme color */\n\t@state() private currentColor: string = '#6200ee'\n\n\t/** Current color scheme */\n\t@state() private currentScheme: 'dark' | 'light' | 'auto' = 'auto'\n\n\t/** User's mood input */\n\t@state() private moodText: string = ''\n\n\t/** Loading state for AI generation */\n\t@state() private isGenerating: boolean = false\n\n\t/** Generated audio sequence */\n\t@state() private audioSequence: AudioSequence | null = null\n\n\t/** Detected mood from AI */\n\t@state() private detectedMood: string = ''\n\n\t/** Error message */\n\t@state() private error: string = ''\n\n\t/** Current volume from sound service */\n\t@state() private volume: number = 0.15\n\n\t/** Current sound theme name */\n\t@state() private currentThemeName: string = 'default'\n\n\t/** Reference to theme component */\n\tprivate themeComponent: SchmancyThemeComponent | null = null\n\n\t/** Subject for mood input changes */\n\tprivate moodInput$ = new Subject<string>()\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Sync with sound service\n\t\tsound.volume$.pipe(takeUntil(this.disconnecting)).subscribe(vol => {\n\t\t\tthis.volume = vol\n\t\t})\n\n\t\tsound.themeName$.pipe(takeUntil(this.disconnecting)).subscribe(name => {\n\t\t\tthis.currentThemeName = name\n\t\t})\n\n\t\t// Sync the current theme from local storage to update UI\n\t\tsound.theme$.pipe(takeUntil(this.disconnecting)).subscribe(theme => {\n\t\t\tif (theme) {\n\t\t\t\tthis.detectedMood = theme.name.replace('AI: ', '')\n\t\t\t}\n\t\t})\n\n\t\t// Discover the nearest theme component\n\t\tthis.discover<SchmancyThemeComponent>('schmancy-theme')\n\t\t\t.pipe(\n\t\t\t\tswitchMap(theme => {\n\t\t\t\t\tif (theme) {\n\t\t\t\t\t\tthis.themeComponent = theme\n\t\t\t\t\t\tthis.currentScheme = theme.scheme\n\t\t\t\t\t\tthis.currentColor = theme.color\n\n\t\t\t\t\t\t// Create observer for theme changes\n\t\t\t\t\t\treturn new Subject().pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\tif (this.themeComponent) {\n\t\t\t\t\t\t\t\t\tthis.currentScheme = this.themeComponent.scheme\n\t\t\t\t\t\t\t\t\tthis.currentColor = this.themeComponent.color\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t\treturn of(null)\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\t// Debounced mood input for AI generation\n\t\tthis.moodInput$\n\t\t\t.pipe(\n\t\t\t\tdebounceTime(500),\n\t\t\t\ttap(text => {\n\t\t\t\t\tthis.moodText = text\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t/** Handle mood input change */\n\tprivate handleMoodInput(e: Event): void {\n\t\tconst input = e.target as HTMLInputElement\n\t\tthis.moodInput$.next(input.value)\n\t}\n\n\t/** Request mood audio generation - dispatches event for host app to handle */\n\tprivate requestMoodAudio(): void {\n\t\tif (!this.moodText.trim()) {\n\t\t\tthis.error = 'Please enter how you are feeling'\n\t\t\treturn\n\t\t}\n\n\t\tthis.error = ''\n\t\tthis.isGenerating = true\n\t\tthis.audioSequence = null\n\t\tthis.detectedMood = ''\n\n\t\t// Dispatch event for host app to handle the API call\n\t\tthis.dispatchEvent(\n\t\t\tnew SchmancyGenerateMoodAudioEvent({\n\t\t\t\tmoodText: this.moodText.trim(),\n\t\t\t\tthemeColor: this.currentColor,\n\t\t\t\tscheme: this.currentScheme,\n\t\t\t})\n\t\t)\n\t}\n\n\t/**\n\t * Set the response from the API call.\n\t * Called by the host app after handling the schmancy-generate-mood-audio event.\n\t */\n\tpublic setResponse(response: GenerateMoodAudioResponse): void {\n\t\tthis.isGenerating = false\n\n\t\tif (response.success && response.audioSequence) {\n\t\t\tthis.audioSequence = response.audioSequence\n\t\t\tthis.detectedMood = response.detectedMood\n\n\t\t\t// Convert AudioSequence to a SoundTheme and apply it (persists to local storage)\n\t\t\tconst soundTheme = this.audioSequenceToSoundTheme(response.audioSequence, response.detectedMood)\n\t\t\tsound.setTheme(soundTheme)\n\n\t\t\t// Play the detected mood feeling\n\t\t\tthis.playDetectedMood(response.detectedMood)\n\t\t} else {\n\t\t\tthis.error = response.error || 'Failed to generate audio'\n\t\t}\n\t}\n\n\t/**\n\t * Convert an AI-generated AudioSequence to a SoundTheme\n\t */\n\tprivate audioSequenceToSoundTheme(sequence: AudioSequence, detectedMood: string): SoundTheme {\n\t\tconst feeling = this.mapMoodToFeeling(detectedMood)\n\n\t\treturn {\n\t\t\tname: `AI: ${detectedMood}`,\n\t\t\tdescription: sequence.emotionalDescription,\n\t\t\tmasterVolume: sequence.masterVolume,\n\t\t\tfeelings: {\n\t\t\t\t[feeling]: {\n\t\t\t\t\tpuffs: sequence.puffs,\n\t\t\t\t\ttones: sequence.tones,\n\t\t\t\t\tdescription: sequence.emotionalDescription,\n\t\t\t\t},\n\t\t\t},\n\t\t\tmetadata: {\n\t\t\t\tsourceColor: this.currentColor,\n\t\t\t\tsourceMood: this.moodText,\n\t\t\t\tscheme: this.currentScheme,\n\t\t\t\tgeneratedAt: new Date().toISOString(),\n\t\t\t\tgeneratedBy: 'AI',\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Map a detected mood string to a Feeling type\n\t */\n\tprivate mapMoodToFeeling(mood: string): Feeling {\n\t\tconst normalizedMood = mood.toLowerCase().trim()\n\n\t\tconst directMatches: Record<string, Feeling> = {\n\t\t\tjoyful: 'joyful',\n\t\t\thappy: 'joyful',\n\t\t\tjoy: 'joyful',\n\t\t\tcontent: 'content',\n\t\t\tsatisfied: 'content',\n\t\t\texcited: 'excited',\n\t\t\tthrilled: 'excited',\n\t\t\tproud: 'proud',\n\t\t\thopeful: 'hopeful',\n\t\t\trelieved: 'relieved',\n\t\t\tgrateful: 'grateful',\n\t\t\tthankful: 'grateful',\n\t\t\tpeaceful: 'peaceful',\n\t\t\tserene: 'peaceful',\n\t\t\tplayful: 'playful',\n\t\t\tamused: 'amused',\n\t\t\tcurious: 'curious',\n\t\t\tinterested: 'curious',\n\t\t\tinspired: 'inspired',\n\t\t\tconfident: 'confident',\n\t\t\tloved: 'loved',\n\t\t\tcomforted: 'comforted',\n\t\t\tenergized: 'energized',\n\t\t\tcelebrated: 'celebrated',\n\t\t\tsad: 'sad',\n\t\t\tunhappy: 'sad',\n\t\t\tlonely: 'lonely',\n\t\t\talone: 'lonely',\n\t\t\tdisappointed: 'disappointed',\n\t\t\tmelancholic: 'melancholic',\n\t\t\tanxious: 'anxious',\n\t\t\tworried: 'worried',\n\t\t\tnervous: 'nervous',\n\t\t\tstressed: 'stressed',\n\t\t\toverwhelmed: 'overwhelmed',\n\t\t\tannoyed: 'annoyed',\n\t\t\tfrustrated: 'frustrated',\n\t\t\tangry: 'angry',\n\t\t\ttired: 'tired',\n\t\t\texhausted: 'exhausted',\n\t\t\tbored: 'bored',\n\t\t\tcalm: 'calm',\n\t\t\trelaxed: 'relaxed',\n\t\t\tconnected: 'connected',\n\t\t\tnostalgic: 'nostalgic',\n\t\t\tsurprised: 'surprised',\n\t\t\tconfused: 'confused',\n\t\t}\n\n\t\tif (directMatches[normalizedMood]) {\n\t\t\treturn directMatches[normalizedMood]\n\t\t}\n\n\t\tfor (const [keyword, feeling] of Object.entries(directMatches)) {\n\t\t\tif (normalizedMood.includes(keyword)) {\n\t\t\t\treturn feeling\n\t\t\t}\n\t\t}\n\n\t\treturn 'calm'\n\t}\n\n\t/**\n\t * Play the detected mood using the sound service\n\t */\n\tprivate playDetectedMood(mood: string): void {\n\t\tconst feeling = this.mapMoodToFeeling(mood)\n\t\tsound.play(feeling)\n\t}\n\n\t/**\n\t * Set an error state. Called by host app if API call fails.\n\t */\n\tpublic setError(message: string): void {\n\t\tthis.isGenerating = false\n\t\tthis.error = message\n\t}\n\n\t/** Replay the current audio sequence using sound service */\n\tprivate replay(): void {\n\t\tif (this.detectedMood) {\n\t\t\tthis.playDetectedMood(this.detectedMood)\n\t\t}\n\t}\n\n\t/** Handle volume change */\n\tprivate handleVolumeChange(e: Event): void {\n\t\tconst value = parseInt((e.target as HTMLInputElement).value) / 100\n\t\tsound.setVolume(value)\n\t}\n\n\t/** Reset to default sounds */\n\tprivate resetToDefaults(): void {\n\t\tsound.resetTheme()\n\t\tthis.audioSequence = null\n\t\tthis.detectedMood = ''\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"space-y-4\">\n\t\t\t\t<!-- Current Theme Status -->\n\t\t\t\t<div class=\"flex items-center justify-between\">\n\t\t\t\t\t<schmancy-typography type=\"label\" token=\"sm\" class=\"opacity-60\">\n\t\t\t\t\t\tSound Theme: ${this.currentThemeName}\n\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t${when(\n\t\t\t\t\t\tthis.currentThemeName !== 'default',\n\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t<schmancy-button variant=\"text\" size=\"sm\" @click=${() => this.resetToDefaults()}>\n\t\t\t\t\t\t\t\t<schmancy-icon size=\"16px\">refresh</schmancy-icon>\n\t\t\t\t\t\t\t\tReset\n\t\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t`\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Mood Input -->\n\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t<schmancy-typography type=\"label\" token=\"lg\" class=\"text-surface-on\">\n\t\t\t\t\t\tHow are you feeling today?\n\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t<schmancy-input\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tplaceholder=\"I'm feeling...\"\n\t\t\t\t\t\t.value=${this.moodText}\n\t\t\t\t\t\t@input=${this.handleMoodInput}\n\t\t\t\t\t\t.disabled=${this.isGenerating}\n\t\t\t\t\t\tclass=\"w-full\"\n\t\t\t\t\t></schmancy-input>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Current Color Preview -->\n\t\t\t\t<div class=\"flex items-center gap-3\">\n\t\t\t\t\t<div class=\"w-10 h-10 rounded-lg border border-outline\" style=\"background: ${this.currentColor}\"></div>\n\t\t\t\t\t<schmancy-typography type=\"body\" token=\"sm\" class=\"opacity-60\"> Current theme color </schmancy-typography>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Generate Button -->\n\t\t\t\t<schmancy-button\n\t\t\t\t\tvariant=\"filled\"\n\t\t\t\t\t@click=${() => this.requestMoodAudio()}\n\t\t\t\t\t?disabled=${this.isGenerating || !this.moodText.trim()}\n\t\t\t\t\tclass=\"w-full\"\n\t\t\t\t>\n\t\t\t\t\t${when(\n\t\t\t\t\t\tthis.isGenerating,\n\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t<schmancy-progress indeterminate size=\"sm\"></schmancy-progress>\n\t\t\t\t\t\t\t<span class=\"ml-2\">Generating...</span>\n\t\t\t\t\t\t`,\n\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t<schmancy-icon>music_note</schmancy-icon>\n\t\t\t\t\t\t\t<span class=\"ml-2\">Generate Mood Sound</span>\n\t\t\t\t\t\t`\n\t\t\t\t\t)}\n\t\t\t\t</schmancy-button>\n\n\t\t\t\t<!-- Error Message -->\n\t\t\t\t${when(\n\t\t\t\t\tthis.error,\n\t\t\t\t\t() => html`\n\t\t\t\t\t\t<schmancy-surface type=\"error\" class=\"p-3 rounded-lg\">\n\t\t\t\t\t\t\t<schmancy-typography type=\"body\" token=\"sm\" class=\"text-error\"> ${this.error} </schmancy-typography>\n\t\t\t\t\t\t</schmancy-surface>\n\t\t\t\t\t`\n\t\t\t\t)}\n\n\t\t\t\t<!-- Generated Audio Info -->\n\t\t\t\t${when(\n\t\t\t\t\tthis.audioSequence,\n\t\t\t\t\t() => html`\n\t\t\t\t\t\t<schmancy-surface type=\"subtle\" rounded=\"all\" class=\"p-4 space-y-3\">\n\t\t\t\t\t\t\t<div class=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<schmancy-typography type=\"label\" token=\"lg\"> ${this.detectedMood} </schmancy-typography>\n\t\t\t\t\t\t\t\t\t<schmancy-typography type=\"body\" token=\"sm\" class=\"opacity-70\">\n\t\t\t\t\t\t\t\t\t\t${this.audioSequence?.emotionalDescription}\n\t\t\t\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<schmancy-button variant=\"tonal\" @click=${() => this.replay()}>\n\t\t\t\t\t\t\t\t\t<schmancy-icon>replay</schmancy-icon>\n\t\t\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<!-- Audio Visualization -->\n\t\t\t\t\t\t\t<div class=\"flex items-center gap-1 h-8\">\n\t\t\t\t\t\t\t\t${this.audioSequence?.puffs.map(\n\t\t\t\t\t\t\t\t\t(_, i) => html`\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclass=\"w-2 bg-primary rounded-full animate-pulse\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"height: ${20 + i * 8}px; animation-delay: ${i * 0.1}s\"\n\t\t\t\t\t\t\t\t\t\t></div>\n\t\t\t\t\t\t\t\t\t`\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t${this.audioSequence?.tones.map(\n\t\t\t\t\t\t\t\t\tt => html`\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclass=\"w-1 bg-secondary rounded-full\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"height: ${Math.min(32, t.frequency / 40)}px; opacity: ${0.5 + t.volume * 0.5}\"\n\t\t\t\t\t\t\t\t\t\t></div>\n\t\t\t\t\t\t\t\t\t`\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<!-- Volume Control -->\n\t\t\t\t\t\t\t<div class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<schmancy-icon class=\"opacity-50\">volume_down</schmancy-icon>\n\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\ttype=\"range\"\n\t\t\t\t\t\t\t\t\tmin=\"0\"\n\t\t\t\t\t\t\t\t\tmax=\"100\"\n\t\t\t\t\t\t\t\t\t.value=${String(this.volume * 100)}\n\t\t\t\t\t\t\t\t\t@input=${this.handleVolumeChange}\n\t\t\t\t\t\t\t\t\tclass=\"flex-1 h-1 bg-surface-containerHighest rounded-full appearance-none cursor-pointer\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<schmancy-icon class=\"opacity-50\">volume_up</schmancy-icon>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</schmancy-surface>\n\t\t\t\t\t`\n\t\t\t\t)}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-theme-audio-player': SchmancyThemeAudioPlayer\n\t}\n}\n","import { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { SchmancyThemeController } from './theme-controller'\nimport './theme-audio-player'\n\n/**\n * BOAT UX theme controller - Wraps the base theme controller in a schmancy-boat component.\n * Provides a floating, draggable container for theme controls.\n *\n * @element schmancy-theme-controller-boat\n *\n * @extends SchmancyThemeController\n *\n * @example\n * ```html\n * <schmancy-theme-controller-boat></schmancy-theme-controller-boat>\n *\n * <!-- With custom colors -->\n * <schmancy-theme-controller-boat\n * .customColors=\"${[\n * { name: 'Brand', value: '#FF5722', category: 'primary' }\n * ]}\"\n * ></schmancy-theme-controller-boat>\n * ```\n */\n@customElement('schmancy-theme-controller-boat')\nexport class SchmancyThemeControllerBoat extends SchmancyThemeController {\n\trender() {\n\t\treturn html`\n\t\t\t<schmancy-boat id=\"schmancy-theme-component\">\n\t\t\t\t<schmancy-icon slot=\"header\">palette</schmancy-icon>\n\n\t\t\t\t<div class=\"p-4 space-y-6\">\n\t\t\t\t\t${super.render()}\n\n\t\t\t\t\t<!-- Audio Player Section -->\n\t\t\t\t\t<schmancy-divider></schmancy-divider>\n\t\t\t\t\t<schmancy-theme-audio-player></schmancy-theme-audio-player>\n\t\t\t\t</div>\n\t\t\t</schmancy-boat>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-theme-controller-boat': SchmancyThemeControllerBoat\n\t}\n}"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],"mappings":";;;;;;;;;;AAyBA,SA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,EAAc,iCAAA,CAAA,EAAiC,GAAA;AAAA,SAAA,KAAA,GAAA,MAAA,GAAA,KAAA,GAAA,MAAA,GAAA,MAAA,GAAA,MAAA,GAAA,KAAA,GAAA,MAAA,GAAA,MAAA"}
|
|
1
|
+
{"version":3,"file":"theme-CT408FqH.js","names":["mathUtils.matrixMultiply","mathUtils.clampInt","utils.whitePointD65","utils.yFromLstar","math.lerp","utils.linearized","math.signum","math.sanitizeDegreesDouble","utils.argbFromXyz","mathUtils.signum","mathUtils.matrixMultiply","colorUtils.argbFromLinrgb","colorUtils.argbFromLstar","mathUtils.sanitizeDegreesDouble","colorUtils.yFromLstar","utils.lstarFromArgb","utils.lstarFromY","differenceDegrees","mathUtils.differenceDegrees","mathUtils.sanitizeDegreesDouble","mathUtils.rotationDirection","colorUtils.lstarFromArgb","math.clampDouble","utils.yFromLstar","utils.lstarFromY","getSpec","math.clampDouble","spec2021","spec2025","mathUtils.sanitizeDegreesInt","mathUtils.sanitizeDegreesDouble","colorUtils.labFromArgb","math.lerp","math.clampDouble","math.sanitizeDegreesDouble","math.sanitizeDegreesInt","differenceDegrees","math.differenceDegrees","colorUtils.redFromArgb","colorUtils.greenFromArgb","colorUtils.blueFromArgb"],"sources":["../node_modules/@material/material-color-utilities/utils/math_utils.js","../node_modules/@material/material-color-utilities/utils/color_utils.js","../node_modules/@material/material-color-utilities/hct/viewing_conditions.js","../node_modules/@material/material-color-utilities/hct/cam16.js","../node_modules/@material/material-color-utilities/hct/hct_solver.js","../node_modules/@material/material-color-utilities/hct/hct.js","../node_modules/@material/material-color-utilities/blend/blend.js","../node_modules/@material/material-color-utilities/contrast/contrast.js","../node_modules/@material/material-color-utilities/dislike/dislike_analyzer.js","../node_modules/@material/material-color-utilities/dynamiccolor/dynamic_color.js","../node_modules/@material/material-color-utilities/palettes/tonal_palette.js","../node_modules/@material/material-color-utilities/temperature/temperature_cache.js","../node_modules/@material/material-color-utilities/dynamiccolor/contrast_curve.js","../node_modules/@material/material-color-utilities/dynamiccolor/tone_delta_pair.js","../node_modules/@material/material-color-utilities/dynamiccolor/variant.js","../node_modules/@material/material-color-utilities/dynamiccolor/color_spec_2021.js","../node_modules/@material/material-color-utilities/dynamiccolor/color_spec_2025.js","../node_modules/@material/material-color-utilities/dynamiccolor/material_dynamic_colors.js","../node_modules/@material/material-color-utilities/dynamiccolor/dynamic_scheme.js","../node_modules/@material/material-color-utilities/palettes/core_palette.js","../node_modules/@material/material-color-utilities/scheme/scheme.js","../node_modules/@material/material-color-utilities/score/score.js","../node_modules/@material/material-color-utilities/utils/string_utils.js","../node_modules/@material/material-color-utilities/utils/theme_utils.js","../src/theme/theme.format.ts","../src/theme/theme.style.css?inline","../src/theme/theme.component.ts","../src/theme/theme-controller.ts","../src/theme/theme-audio-player.ts","../src/theme/theme-controller-boat.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This file is automatically generated. Do not modify it.\n/**\n * Utility methods for mathematical operations.\n */\n/**\n * The signum function.\n *\n * @return 1 if num > 0, -1 if num < 0, and 0 if num = 0\n */\nexport function signum(num) {\n if (num < 0) {\n return -1;\n }\n else if (num === 0) {\n return 0;\n }\n else {\n return 1;\n }\n}\n/**\n * The linear interpolation function.\n *\n * @return start if amount = 0 and stop if amount = 1\n */\nexport function lerp(start, stop, amount) {\n return (1.0 - amount) * start + amount * stop;\n}\n/**\n * Clamps an integer between two integers.\n *\n * @return input when min <= input <= max, and either min or max\n * otherwise.\n */\nexport function clampInt(min, max, input) {\n if (input < min) {\n return min;\n }\n else if (input > max) {\n return max;\n }\n return input;\n}\n/**\n * Clamps an integer between two floating-point numbers.\n *\n * @return input when min <= input <= max, and either min or max\n * otherwise.\n */\nexport function clampDouble(min, max, input) {\n if (input < min) {\n return min;\n }\n else if (input > max) {\n return max;\n }\n return input;\n}\n/**\n * Sanitizes a degree measure as an integer.\n *\n * @return a degree measure between 0 (inclusive) and 360\n * (exclusive).\n */\nexport function sanitizeDegreesInt(degrees) {\n degrees = degrees % 360;\n if (degrees < 0) {\n degrees = degrees + 360;\n }\n return degrees;\n}\n/**\n * Sanitizes a degree measure as a floating-point number.\n *\n * @return a degree measure between 0.0 (inclusive) and 360.0\n * (exclusive).\n */\nexport function sanitizeDegreesDouble(degrees) {\n degrees = degrees % 360.0;\n if (degrees < 0) {\n degrees = degrees + 360.0;\n }\n return degrees;\n}\n/**\n * Sign of direction change needed to travel from one angle to\n * another.\n *\n * For angles that are 180 degrees apart from each other, both\n * directions have the same travel distance, so either direction is\n * shortest. The value 1.0 is returned in this case.\n *\n * @param from The angle travel starts from, in degrees.\n * @param to The angle travel ends at, in degrees.\n * @return -1 if decreasing from leads to the shortest travel\n * distance, 1 if increasing from leads to the shortest travel\n * distance.\n */\nexport function rotationDirection(from, to) {\n const increasingDifference = sanitizeDegreesDouble(to - from);\n return increasingDifference <= 180.0 ? 1.0 : -1.0;\n}\n/**\n * Distance of two points on a circle, represented using degrees.\n */\nexport function differenceDegrees(a, b) {\n return 180.0 - Math.abs(Math.abs(a - b) - 180.0);\n}\n/**\n * Multiplies a 1x3 row vector with a 3x3 matrix.\n */\nexport function matrixMultiply(row, matrix) {\n const a = row[0] * matrix[0][0] + row[1] * matrix[0][1] + row[2] * matrix[0][2];\n const b = row[0] * matrix[1][0] + row[1] * matrix[1][1] + row[2] * matrix[1][2];\n const c = row[0] * matrix[2][0] + row[1] * matrix[2][1] + row[2] * matrix[2][2];\n return [a, b, c];\n}\n//# sourceMappingURL=math_utils.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This file is automatically generated. Do not modify it.\nimport * as mathUtils from './math_utils.js';\n/**\n * Color science utilities.\n *\n * Utility methods for color science constants and color space\n * conversions that aren't HCT or CAM16.\n */\nconst SRGB_TO_XYZ = [\n [0.41233895, 0.35762064, 0.18051042],\n [0.2126, 0.7152, 0.0722],\n [0.01932141, 0.11916382, 0.95034478],\n];\nconst XYZ_TO_SRGB = [\n [\n 3.2413774792388685,\n -1.5376652402851851,\n -0.49885366846268053,\n ],\n [\n -0.9691452513005321,\n 1.8758853451067872,\n 0.04156585616912061,\n ],\n [\n 0.05562093689691305,\n -0.20395524564742123,\n 1.0571799111220335,\n ],\n];\nconst WHITE_POINT_D65 = [95.047, 100.0, 108.883];\n/**\n * Converts a color from RGB components to ARGB format.\n */\nexport function argbFromRgb(red, green, blue) {\n return (255 << 24 | (red & 255) << 16 | (green & 255) << 8 | blue & 255) >>>\n 0;\n}\n/**\n * Converts a color from linear RGB components to ARGB format.\n */\nexport function argbFromLinrgb(linrgb) {\n const r = delinearized(linrgb[0]);\n const g = delinearized(linrgb[1]);\n const b = delinearized(linrgb[2]);\n return argbFromRgb(r, g, b);\n}\n/**\n * Returns the alpha component of a color in ARGB format.\n */\nexport function alphaFromArgb(argb) {\n return argb >> 24 & 255;\n}\n/**\n * Returns the red component of a color in ARGB format.\n */\nexport function redFromArgb(argb) {\n return argb >> 16 & 255;\n}\n/**\n * Returns the green component of a color in ARGB format.\n */\nexport function greenFromArgb(argb) {\n return argb >> 8 & 255;\n}\n/**\n * Returns the blue component of a color in ARGB format.\n */\nexport function blueFromArgb(argb) {\n return argb & 255;\n}\n/**\n * Returns whether a color in ARGB format is opaque.\n */\nexport function isOpaque(argb) {\n return alphaFromArgb(argb) >= 255;\n}\n/**\n * Converts a color from ARGB to XYZ.\n */\nexport function argbFromXyz(x, y, z) {\n const matrix = XYZ_TO_SRGB;\n const linearR = matrix[0][0] * x + matrix[0][1] * y + matrix[0][2] * z;\n const linearG = matrix[1][0] * x + matrix[1][1] * y + matrix[1][2] * z;\n const linearB = matrix[2][0] * x + matrix[2][1] * y + matrix[2][2] * z;\n const r = delinearized(linearR);\n const g = delinearized(linearG);\n const b = delinearized(linearB);\n return argbFromRgb(r, g, b);\n}\n/**\n * Converts a color from XYZ to ARGB.\n */\nexport function xyzFromArgb(argb) {\n const r = linearized(redFromArgb(argb));\n const g = linearized(greenFromArgb(argb));\n const b = linearized(blueFromArgb(argb));\n return mathUtils.matrixMultiply([r, g, b], SRGB_TO_XYZ);\n}\n/**\n * Converts a color represented in Lab color space into an ARGB\n * integer.\n */\nexport function argbFromLab(l, a, b) {\n const whitePoint = WHITE_POINT_D65;\n const fy = (l + 16.0) / 116.0;\n const fx = a / 500.0 + fy;\n const fz = fy - b / 200.0;\n const xNormalized = labInvf(fx);\n const yNormalized = labInvf(fy);\n const zNormalized = labInvf(fz);\n const x = xNormalized * whitePoint[0];\n const y = yNormalized * whitePoint[1];\n const z = zNormalized * whitePoint[2];\n return argbFromXyz(x, y, z);\n}\n/**\n * Converts a color from ARGB representation to L*a*b*\n * representation.\n *\n * @param argb the ARGB representation of a color\n * @return a Lab object representing the color\n */\nexport function labFromArgb(argb) {\n const linearR = linearized(redFromArgb(argb));\n const linearG = linearized(greenFromArgb(argb));\n const linearB = linearized(blueFromArgb(argb));\n const matrix = SRGB_TO_XYZ;\n const x = matrix[0][0] * linearR + matrix[0][1] * linearG + matrix[0][2] * linearB;\n const y = matrix[1][0] * linearR + matrix[1][1] * linearG + matrix[1][2] * linearB;\n const z = matrix[2][0] * linearR + matrix[2][1] * linearG + matrix[2][2] * linearB;\n const whitePoint = WHITE_POINT_D65;\n const xNormalized = x / whitePoint[0];\n const yNormalized = y / whitePoint[1];\n const zNormalized = z / whitePoint[2];\n const fx = labF(xNormalized);\n const fy = labF(yNormalized);\n const fz = labF(zNormalized);\n const l = 116.0 * fy - 16;\n const a = 500.0 * (fx - fy);\n const b = 200.0 * (fy - fz);\n return [l, a, b];\n}\n/**\n * Converts an L* value to an ARGB representation.\n *\n * @param lstar L* in L*a*b*\n * @return ARGB representation of grayscale color with lightness\n * matching L*\n */\nexport function argbFromLstar(lstar) {\n const y = yFromLstar(lstar);\n const component = delinearized(y);\n return argbFromRgb(component, component, component);\n}\n/**\n * Computes the L* value of a color in ARGB representation.\n *\n * @param argb ARGB representation of a color\n * @return L*, from L*a*b*, coordinate of the color\n */\nexport function lstarFromArgb(argb) {\n const y = xyzFromArgb(argb)[1];\n return 116.0 * labF(y / 100.0) - 16.0;\n}\n/**\n * Converts an L* value to a Y value.\n *\n * L* in L*a*b* and Y in XYZ measure the same quantity, luminance.\n *\n * L* measures perceptual luminance, a linear scale. Y in XYZ\n * measures relative luminance, a logarithmic scale.\n *\n * @param lstar L* in L*a*b*\n * @return Y in XYZ\n */\nexport function yFromLstar(lstar) {\n return 100.0 * labInvf((lstar + 16.0) / 116.0);\n}\n/**\n * Converts a Y value to an L* value.\n *\n * L* in L*a*b* and Y in XYZ measure the same quantity, luminance.\n *\n * L* measures perceptual luminance, a linear scale. Y in XYZ\n * measures relative luminance, a logarithmic scale.\n *\n * @param y Y in XYZ\n * @return L* in L*a*b*\n */\nexport function lstarFromY(y) {\n return labF(y / 100.0) * 116.0 - 16.0;\n}\n/**\n * Linearizes an RGB component.\n *\n * @param rgbComponent 0 <= rgb_component <= 255, represents R/G/B\n * channel\n * @return 0.0 <= output <= 100.0, color channel converted to\n * linear RGB space\n */\nexport function linearized(rgbComponent) {\n const normalized = rgbComponent / 255.0;\n if (normalized <= 0.040449936) {\n return normalized / 12.92 * 100.0;\n }\n else {\n return Math.pow((normalized + 0.055) / 1.055, 2.4) * 100.0;\n }\n}\n/**\n * Delinearizes an RGB component.\n *\n * @param rgbComponent 0.0 <= rgb_component <= 100.0, represents\n * linear R/G/B channel\n * @return 0 <= output <= 255, color channel converted to regular\n * RGB space\n */\nexport function delinearized(rgbComponent) {\n const normalized = rgbComponent / 100.0;\n let delinearized = 0.0;\n if (normalized <= 0.0031308) {\n delinearized = normalized * 12.92;\n }\n else {\n delinearized = 1.055 * Math.pow(normalized, 1.0 / 2.4) - 0.055;\n }\n return mathUtils.clampInt(0, 255, Math.round(delinearized * 255.0));\n}\n/**\n * Returns the standard white point; white on a sunny day.\n *\n * @return The white point\n */\nexport function whitePointD65() {\n return WHITE_POINT_D65;\n}\nfunction labF(t) {\n const e = 216.0 / 24389.0;\n const kappa = 24389.0 / 27.0;\n if (t > e) {\n return Math.pow(t, 1.0 / 3.0);\n }\n else {\n return (kappa * t + 16) / 116;\n }\n}\nfunction labInvf(ft) {\n const e = 216.0 / 24389.0;\n const kappa = 24389.0 / 27.0;\n const ft3 = ft * ft * ft;\n if (ft3 > e) {\n return ft3;\n }\n else {\n return (116 * ft - 16) / kappa;\n }\n}\n//# sourceMappingURL=color_utils.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as utils from '../utils/color_utils.js';\nimport * as math from '../utils/math_utils.js';\n/**\n * In traditional color spaces, a color can be identified solely by the\n * observer's measurement of the color. Color appearance models such as CAM16\n * also use information about the environment where the color was\n * observed, known as the viewing conditions.\n *\n * For example, white under the traditional assumption of a midday sun white\n * point is accurately measured as a slightly chromatic blue by CAM16. (roughly,\n * hue 203, chroma 3, lightness 100)\n *\n * This class caches intermediate values of the CAM16 conversion process that\n * depend only on viewing conditions, enabling speed ups.\n */\nexport class ViewingConditions {\n /**\n * Create ViewingConditions from a simple, physically relevant, set of\n * parameters.\n *\n * @param whitePoint White point, measured in the XYZ color space.\n * default = D65, or sunny day afternoon\n * @param adaptingLuminance The luminance of the adapting field. Informally,\n * how bright it is in the room where the color is viewed. Can be\n * calculated from lux by multiplying lux by 0.0586. default = 11.72,\n * or 200 lux.\n * @param backgroundLstar The lightness of the area surrounding the color.\n * measured by L* in L*a*b*. default = 50.0\n * @param surround A general description of the lighting surrounding the\n * color. 0 is pitch dark, like watching a movie in a theater. 1.0 is a\n * dimly light room, like watching TV at home at night. 2.0 means there\n * is no difference between the lighting on the color and around it.\n * default = 2.0\n * @param discountingIlluminant Whether the eye accounts for the tint of the\n * ambient lighting, such as knowing an apple is still red in green light.\n * default = false, the eye does not perform this process on\n * self-luminous objects like displays.\n */\n static make(whitePoint = utils.whitePointD65(), adaptingLuminance = (200.0 / Math.PI) * utils.yFromLstar(50.0) / 100.0, backgroundLstar = 50.0, surround = 2.0, discountingIlluminant = false) {\n const xyz = whitePoint;\n const rW = xyz[0] * 0.401288 + xyz[1] * 0.650173 + xyz[2] * -0.051461;\n const gW = xyz[0] * -0.250268 + xyz[1] * 1.204414 + xyz[2] * 0.045854;\n const bW = xyz[0] * -0.002079 + xyz[1] * 0.048952 + xyz[2] * 0.953127;\n const f = 0.8 + surround / 10.0;\n const c = f >= 0.9 ? math.lerp(0.59, 0.69, (f - 0.9) * 10.0) :\n math.lerp(0.525, 0.59, (f - 0.8) * 10.0);\n let d = discountingIlluminant ?\n 1.0 :\n f * (1.0 - (1.0 / 3.6) * Math.exp((-adaptingLuminance - 42.0) / 92.0));\n d = d > 1.0 ? 1.0 : d < 0.0 ? 0.0 : d;\n const nc = f;\n const rgbD = [\n d * (100.0 / rW) + 1.0 - d,\n d * (100.0 / gW) + 1.0 - d,\n d * (100.0 / bW) + 1.0 - d,\n ];\n const k = 1.0 / (5.0 * adaptingLuminance + 1.0);\n const k4 = k * k * k * k;\n const k4F = 1.0 - k4;\n const fl = k4 * adaptingLuminance +\n 0.1 * k4F * k4F * Math.cbrt(5.0 * adaptingLuminance);\n const n = utils.yFromLstar(backgroundLstar) / whitePoint[1];\n const z = 1.48 + Math.sqrt(n);\n const nbb = 0.725 / Math.pow(n, 0.2);\n const ncb = nbb;\n const rgbAFactors = [\n Math.pow((fl * rgbD[0] * rW) / 100.0, 0.42),\n Math.pow((fl * rgbD[1] * gW) / 100.0, 0.42),\n Math.pow((fl * rgbD[2] * bW) / 100.0, 0.42),\n ];\n const rgbA = [\n (400.0 * rgbAFactors[0]) / (rgbAFactors[0] + 27.13),\n (400.0 * rgbAFactors[1]) / (rgbAFactors[1] + 27.13),\n (400.0 * rgbAFactors[2]) / (rgbAFactors[2] + 27.13),\n ];\n const aw = (2.0 * rgbA[0] + rgbA[1] + 0.05 * rgbA[2]) * nbb;\n return new ViewingConditions(n, aw, nbb, ncb, c, nc, rgbD, fl, Math.pow(fl, 0.25), z);\n }\n /**\n * Parameters are intermediate values of the CAM16 conversion process. Their\n * names are shorthand for technical color science terminology, this class\n * would not benefit from documenting them individually. A brief overview\n * is available in the CAM16 specification, and a complete overview requires\n * a color science textbook, such as Fairchild's Color Appearance Models.\n */\n constructor(n, aw, nbb, ncb, c, nc, rgbD, fl, fLRoot, z) {\n this.n = n;\n this.aw = aw;\n this.nbb = nbb;\n this.ncb = ncb;\n this.c = c;\n this.nc = nc;\n this.rgbD = rgbD;\n this.fl = fl;\n this.fLRoot = fLRoot;\n this.z = z;\n }\n}\n/** sRGB-like viewing conditions. */\nViewingConditions.DEFAULT = ViewingConditions.make();\n//# sourceMappingURL=viewing_conditions.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as utils from '../utils/color_utils.js';\nimport * as math from '../utils/math_utils.js';\nimport { ViewingConditions } from './viewing_conditions.js';\n/**\n * CAM16, a color appearance model. Colors are not just defined by their hex\n * code, but rather, a hex code and viewing conditions.\n *\n * CAM16 instances also have coordinates in the CAM16-UCS space, called J*, a*,\n * b*, or jstar, astar, bstar in code. CAM16-UCS is included in the CAM16\n * specification, and should be used when measuring distances between colors.\n *\n * In traditional color spaces, a color can be identified solely by the\n * observer's measurement of the color. Color appearance models such as CAM16\n * also use information about the environment where the color was\n * observed, known as the viewing conditions.\n *\n * For example, white under the traditional assumption of a midday sun white\n * point is accurately measured as a slightly chromatic blue by CAM16. (roughly,\n * hue 203, chroma 3, lightness 100)\n */\nexport class Cam16 {\n /**\n * All of the CAM16 dimensions can be calculated from 3 of the dimensions, in\n * the following combinations:\n * - {j or q} and {c, m, or s} and hue\n * - jstar, astar, bstar\n * Prefer using a static method that constructs from 3 of those dimensions.\n * This constructor is intended for those methods to use to return all\n * possible dimensions.\n *\n * @param hue\n * @param chroma informally, colorfulness / color intensity. like saturation\n * in HSL, except perceptually accurate.\n * @param j lightness\n * @param q brightness; ratio of lightness to white point's lightness\n * @param m colorfulness\n * @param s saturation; ratio of chroma to white point's chroma\n * @param jstar CAM16-UCS J coordinate\n * @param astar CAM16-UCS a coordinate\n * @param bstar CAM16-UCS b coordinate\n */\n constructor(hue, chroma, j, q, m, s, jstar, astar, bstar) {\n this.hue = hue;\n this.chroma = chroma;\n this.j = j;\n this.q = q;\n this.m = m;\n this.s = s;\n this.jstar = jstar;\n this.astar = astar;\n this.bstar = bstar;\n }\n /**\n * CAM16 instances also have coordinates in the CAM16-UCS space, called J*,\n * a*, b*, or jstar, astar, bstar in code. CAM16-UCS is included in the CAM16\n * specification, and is used to measure distances between colors.\n */\n distance(other) {\n const dJ = this.jstar - other.jstar;\n const dA = this.astar - other.astar;\n const dB = this.bstar - other.bstar;\n const dEPrime = Math.sqrt(dJ * dJ + dA * dA + dB * dB);\n const dE = 1.41 * Math.pow(dEPrime, 0.63);\n return dE;\n }\n /**\n * @param argb ARGB representation of a color.\n * @return CAM16 color, assuming the color was viewed in default viewing\n * conditions.\n */\n static fromInt(argb) {\n return Cam16.fromIntInViewingConditions(argb, ViewingConditions.DEFAULT);\n }\n /**\n * @param argb ARGB representation of a color.\n * @param viewingConditions Information about the environment where the color\n * was observed.\n * @return CAM16 color.\n */\n static fromIntInViewingConditions(argb, viewingConditions) {\n const red = (argb & 0x00ff0000) >> 16;\n const green = (argb & 0x0000ff00) >> 8;\n const blue = (argb & 0x000000ff);\n const redL = utils.linearized(red);\n const greenL = utils.linearized(green);\n const blueL = utils.linearized(blue);\n const x = 0.41233895 * redL + 0.35762064 * greenL + 0.18051042 * blueL;\n const y = 0.2126 * redL + 0.7152 * greenL + 0.0722 * blueL;\n const z = 0.01932141 * redL + 0.11916382 * greenL + 0.95034478 * blueL;\n const rC = 0.401288 * x + 0.650173 * y - 0.051461 * z;\n const gC = -0.250268 * x + 1.204414 * y + 0.045854 * z;\n const bC = -0.002079 * x + 0.048952 * y + 0.953127 * z;\n const rD = viewingConditions.rgbD[0] * rC;\n const gD = viewingConditions.rgbD[1] * gC;\n const bD = viewingConditions.rgbD[2] * bC;\n const rAF = Math.pow((viewingConditions.fl * Math.abs(rD)) / 100.0, 0.42);\n const gAF = Math.pow((viewingConditions.fl * Math.abs(gD)) / 100.0, 0.42);\n const bAF = Math.pow((viewingConditions.fl * Math.abs(bD)) / 100.0, 0.42);\n const rA = (math.signum(rD) * 400.0 * rAF) / (rAF + 27.13);\n const gA = (math.signum(gD) * 400.0 * gAF) / (gAF + 27.13);\n const bA = (math.signum(bD) * 400.0 * bAF) / (bAF + 27.13);\n const a = (11.0 * rA + -12.0 * gA + bA) / 11.0;\n const b = (rA + gA - 2.0 * bA) / 9.0;\n const u = (20.0 * rA + 20.0 * gA + 21.0 * bA) / 20.0;\n const p2 = (40.0 * rA + 20.0 * gA + bA) / 20.0;\n const atan2 = Math.atan2(b, a);\n const atanDegrees = (atan2 * 180.0) / Math.PI;\n const hue = math.sanitizeDegreesDouble(atanDegrees);\n const hueRadians = (hue * Math.PI) / 180.0;\n const ac = p2 * viewingConditions.nbb;\n const j = 100.0 *\n Math.pow(ac / viewingConditions.aw, viewingConditions.c * viewingConditions.z);\n const q = (4.0 / viewingConditions.c) * Math.sqrt(j / 100.0) *\n (viewingConditions.aw + 4.0) * viewingConditions.fLRoot;\n const huePrime = hue < 20.14 ? hue + 360 : hue;\n const eHue = 0.25 * (Math.cos((huePrime * Math.PI) / 180.0 + 2.0) + 3.8);\n const p1 = (50000.0 / 13.0) * eHue * viewingConditions.nc * viewingConditions.ncb;\n const t = (p1 * Math.sqrt(a * a + b * b)) / (u + 0.305);\n const alpha = Math.pow(t, 0.9) *\n Math.pow(1.64 - Math.pow(0.29, viewingConditions.n), 0.73);\n const c = alpha * Math.sqrt(j / 100.0);\n const m = c * viewingConditions.fLRoot;\n const s = 50.0 *\n Math.sqrt((alpha * viewingConditions.c) / (viewingConditions.aw + 4.0));\n const jstar = ((1.0 + 100.0 * 0.007) * j) / (1.0 + 0.007 * j);\n const mstar = (1.0 / 0.0228) * Math.log(1.0 + 0.0228 * m);\n const astar = mstar * Math.cos(hueRadians);\n const bstar = mstar * Math.sin(hueRadians);\n return new Cam16(hue, c, j, q, m, s, jstar, astar, bstar);\n }\n /**\n * @param j CAM16 lightness\n * @param c CAM16 chroma\n * @param h CAM16 hue\n */\n static fromJch(j, c, h) {\n return Cam16.fromJchInViewingConditions(j, c, h, ViewingConditions.DEFAULT);\n }\n /**\n * @param j CAM16 lightness\n * @param c CAM16 chroma\n * @param h CAM16 hue\n * @param viewingConditions Information about the environment where the color\n * was observed.\n */\n static fromJchInViewingConditions(j, c, h, viewingConditions) {\n const q = (4.0 / viewingConditions.c) * Math.sqrt(j / 100.0) *\n (viewingConditions.aw + 4.0) * viewingConditions.fLRoot;\n const m = c * viewingConditions.fLRoot;\n const alpha = c / Math.sqrt(j / 100.0);\n const s = 50.0 *\n Math.sqrt((alpha * viewingConditions.c) / (viewingConditions.aw + 4.0));\n const hueRadians = (h * Math.PI) / 180.0;\n const jstar = ((1.0 + 100.0 * 0.007) * j) / (1.0 + 0.007 * j);\n const mstar = (1.0 / 0.0228) * Math.log(1.0 + 0.0228 * m);\n const astar = mstar * Math.cos(hueRadians);\n const bstar = mstar * Math.sin(hueRadians);\n return new Cam16(h, c, j, q, m, s, jstar, astar, bstar);\n }\n /**\n * @param jstar CAM16-UCS lightness.\n * @param astar CAM16-UCS a dimension. Like a* in L*a*b*, it is a Cartesian\n * coordinate on the Y axis.\n * @param bstar CAM16-UCS b dimension. Like a* in L*a*b*, it is a Cartesian\n * coordinate on the X axis.\n */\n static fromUcs(jstar, astar, bstar) {\n return Cam16.fromUcsInViewingConditions(jstar, astar, bstar, ViewingConditions.DEFAULT);\n }\n /**\n * @param jstar CAM16-UCS lightness.\n * @param astar CAM16-UCS a dimension. Like a* in L*a*b*, it is a Cartesian\n * coordinate on the Y axis.\n * @param bstar CAM16-UCS b dimension. Like a* in L*a*b*, it is a Cartesian\n * coordinate on the X axis.\n * @param viewingConditions Information about the environment where the color\n * was observed.\n */\n static fromUcsInViewingConditions(jstar, astar, bstar, viewingConditions) {\n const a = astar;\n const b = bstar;\n const m = Math.sqrt(a * a + b * b);\n const M = (Math.exp(m * 0.0228) - 1.0) / 0.0228;\n const c = M / viewingConditions.fLRoot;\n let h = Math.atan2(b, a) * (180.0 / Math.PI);\n if (h < 0.0) {\n h += 360.0;\n }\n const j = jstar / (1 - (jstar - 100) * 0.007);\n return Cam16.fromJchInViewingConditions(j, c, h, viewingConditions);\n }\n /**\n * @return ARGB representation of color, assuming the color was viewed in\n * default viewing conditions, which are near-identical to the default\n * viewing conditions for sRGB.\n */\n toInt() {\n return this.viewed(ViewingConditions.DEFAULT);\n }\n /**\n * @param viewingConditions Information about the environment where the color\n * will be viewed.\n * @return ARGB representation of color\n */\n viewed(viewingConditions) {\n const alpha = this.chroma === 0.0 || this.j === 0.0 ?\n 0.0 :\n this.chroma / Math.sqrt(this.j / 100.0);\n const t = Math.pow(alpha / Math.pow(1.64 - Math.pow(0.29, viewingConditions.n), 0.73), 1.0 / 0.9);\n const hRad = (this.hue * Math.PI) / 180.0;\n const eHue = 0.25 * (Math.cos(hRad + 2.0) + 3.8);\n const ac = viewingConditions.aw *\n Math.pow(this.j / 100.0, 1.0 / viewingConditions.c / viewingConditions.z);\n const p1 = eHue * (50000.0 / 13.0) * viewingConditions.nc * viewingConditions.ncb;\n const p2 = ac / viewingConditions.nbb;\n const hSin = Math.sin(hRad);\n const hCos = Math.cos(hRad);\n const gamma = (23.0 * (p2 + 0.305) * t) /\n (23.0 * p1 + 11.0 * t * hCos + 108.0 * t * hSin);\n const a = gamma * hCos;\n const b = gamma * hSin;\n const rA = (460.0 * p2 + 451.0 * a + 288.0 * b) / 1403.0;\n const gA = (460.0 * p2 - 891.0 * a - 261.0 * b) / 1403.0;\n const bA = (460.0 * p2 - 220.0 * a - 6300.0 * b) / 1403.0;\n const rCBase = Math.max(0, (27.13 * Math.abs(rA)) / (400.0 - Math.abs(rA)));\n const rC = math.signum(rA) * (100.0 / viewingConditions.fl) *\n Math.pow(rCBase, 1.0 / 0.42);\n const gCBase = Math.max(0, (27.13 * Math.abs(gA)) / (400.0 - Math.abs(gA)));\n const gC = math.signum(gA) * (100.0 / viewingConditions.fl) *\n Math.pow(gCBase, 1.0 / 0.42);\n const bCBase = Math.max(0, (27.13 * Math.abs(bA)) / (400.0 - Math.abs(bA)));\n const bC = math.signum(bA) * (100.0 / viewingConditions.fl) *\n Math.pow(bCBase, 1.0 / 0.42);\n const rF = rC / viewingConditions.rgbD[0];\n const gF = gC / viewingConditions.rgbD[1];\n const bF = bC / viewingConditions.rgbD[2];\n const x = 1.86206786 * rF - 1.01125463 * gF + 0.14918677 * bF;\n const y = 0.38752654 * rF + 0.62144744 * gF - 0.00897398 * bF;\n const z = -0.01584150 * rF - 0.03412294 * gF + 1.04996444 * bF;\n const argb = utils.argbFromXyz(x, y, z);\n return argb;\n }\n /// Given color expressed in XYZ and viewed in [viewingConditions], convert to\n /// CAM16.\n static fromXyzInViewingConditions(x, y, z, viewingConditions) {\n // Transform XYZ to 'cone'/'rgb' responses\n const rC = 0.401288 * x + 0.650173 * y - 0.051461 * z;\n const gC = -0.250268 * x + 1.204414 * y + 0.045854 * z;\n const bC = -0.002079 * x + 0.048952 * y + 0.953127 * z;\n // Discount illuminant\n const rD = viewingConditions.rgbD[0] * rC;\n const gD = viewingConditions.rgbD[1] * gC;\n const bD = viewingConditions.rgbD[2] * bC;\n // chromatic adaptation\n const rAF = Math.pow(viewingConditions.fl * Math.abs(rD) / 100.0, 0.42);\n const gAF = Math.pow(viewingConditions.fl * Math.abs(gD) / 100.0, 0.42);\n const bAF = Math.pow(viewingConditions.fl * Math.abs(bD) / 100.0, 0.42);\n const rA = math.signum(rD) * 400.0 * rAF / (rAF + 27.13);\n const gA = math.signum(gD) * 400.0 * gAF / (gAF + 27.13);\n const bA = math.signum(bD) * 400.0 * bAF / (bAF + 27.13);\n // redness-greenness\n const a = (11.0 * rA + -12.0 * gA + bA) / 11.0;\n // yellowness-blueness\n const b = (rA + gA - 2.0 * bA) / 9.0;\n // auxiliary components\n const u = (20.0 * rA + 20.0 * gA + 21.0 * bA) / 20.0;\n const p2 = (40.0 * rA + 20.0 * gA + bA) / 20.0;\n // hue\n const atan2 = Math.atan2(b, a);\n const atanDegrees = atan2 * 180.0 / Math.PI;\n const hue = atanDegrees < 0 ? atanDegrees + 360.0 :\n atanDegrees >= 360 ? atanDegrees - 360 :\n atanDegrees;\n const hueRadians = hue * Math.PI / 180.0;\n // achromatic response to color\n const ac = p2 * viewingConditions.nbb;\n // CAM16 lightness and brightness\n const J = 100.0 *\n Math.pow(ac / viewingConditions.aw, viewingConditions.c * viewingConditions.z);\n const Q = (4.0 / viewingConditions.c) * Math.sqrt(J / 100.0) *\n (viewingConditions.aw + 4.0) * (viewingConditions.fLRoot);\n const huePrime = (hue < 20.14) ? hue + 360 : hue;\n const eHue = (1.0 / 4.0) * (Math.cos(huePrime * Math.PI / 180.0 + 2.0) + 3.8);\n const p1 = 50000.0 / 13.0 * eHue * viewingConditions.nc * viewingConditions.ncb;\n const t = p1 * Math.sqrt(a * a + b * b) / (u + 0.305);\n const alpha = Math.pow(t, 0.9) *\n Math.pow(1.64 - Math.pow(0.29, viewingConditions.n), 0.73);\n // CAM16 chroma, colorfulness, chroma\n const C = alpha * Math.sqrt(J / 100.0);\n const M = C * viewingConditions.fLRoot;\n const s = 50.0 *\n Math.sqrt((alpha * viewingConditions.c) / (viewingConditions.aw + 4.0));\n // CAM16-UCS components\n const jstar = (1.0 + 100.0 * 0.007) * J / (1.0 + 0.007 * J);\n const mstar = Math.log(1.0 + 0.0228 * M) / 0.0228;\n const astar = mstar * Math.cos(hueRadians);\n const bstar = mstar * Math.sin(hueRadians);\n return new Cam16(hue, C, J, Q, M, s, jstar, astar, bstar);\n }\n /// XYZ representation of CAM16 seen in [viewingConditions].\n xyzInViewingConditions(viewingConditions) {\n const alpha = (this.chroma === 0.0 || this.j === 0.0) ?\n 0.0 :\n this.chroma / Math.sqrt(this.j / 100.0);\n const t = Math.pow(alpha / Math.pow(1.64 - Math.pow(0.29, viewingConditions.n), 0.73), 1.0 / 0.9);\n const hRad = this.hue * Math.PI / 180.0;\n const eHue = 0.25 * (Math.cos(hRad + 2.0) + 3.8);\n const ac = viewingConditions.aw *\n Math.pow(this.j / 100.0, 1.0 / viewingConditions.c / viewingConditions.z);\n const p1 = eHue * (50000.0 / 13.0) * viewingConditions.nc * viewingConditions.ncb;\n const p2 = (ac / viewingConditions.nbb);\n const hSin = Math.sin(hRad);\n const hCos = Math.cos(hRad);\n const gamma = 23.0 * (p2 + 0.305) * t /\n (23.0 * p1 + 11 * t * hCos + 108.0 * t * hSin);\n const a = gamma * hCos;\n const b = gamma * hSin;\n const rA = (460.0 * p2 + 451.0 * a + 288.0 * b) / 1403.0;\n const gA = (460.0 * p2 - 891.0 * a - 261.0 * b) / 1403.0;\n const bA = (460.0 * p2 - 220.0 * a - 6300.0 * b) / 1403.0;\n const rCBase = Math.max(0, (27.13 * Math.abs(rA)) / (400.0 - Math.abs(rA)));\n const rC = math.signum(rA) * (100.0 / viewingConditions.fl) *\n Math.pow(rCBase, 1.0 / 0.42);\n const gCBase = Math.max(0, (27.13 * Math.abs(gA)) / (400.0 - Math.abs(gA)));\n const gC = math.signum(gA) * (100.0 / viewingConditions.fl) *\n Math.pow(gCBase, 1.0 / 0.42);\n const bCBase = Math.max(0, (27.13 * Math.abs(bA)) / (400.0 - Math.abs(bA)));\n const bC = math.signum(bA) * (100.0 / viewingConditions.fl) *\n Math.pow(bCBase, 1.0 / 0.42);\n const rF = rC / viewingConditions.rgbD[0];\n const gF = gC / viewingConditions.rgbD[1];\n const bF = bC / viewingConditions.rgbD[2];\n const x = 1.86206786 * rF - 1.01125463 * gF + 0.14918677 * bF;\n const y = 0.38752654 * rF + 0.62144744 * gF - 0.00897398 * bF;\n const z = -0.01584150 * rF - 0.03412294 * gF + 1.04996444 * bF;\n return [x, y, z];\n }\n}\n//# sourceMappingURL=cam16.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This file is automatically generated. Do not modify it.\nimport * as colorUtils from '../utils/color_utils.js';\nimport * as mathUtils from '../utils/math_utils.js';\nimport { Cam16 } from './cam16.js';\nimport { ViewingConditions } from './viewing_conditions.js';\n// material_color_utilities is designed to have a consistent API across\n// platforms and modular components that can be moved around easily. Using a\n// class as a namespace facilitates this.\n//\n// tslint:disable:class-as-namespace\n/**\n * A class that solves the HCT equation.\n */\nexport class HctSolver {\n /**\n * Sanitizes a small enough angle in radians.\n *\n * @param angle An angle in radians; must not deviate too much\n * from 0.\n * @return A coterminal angle between 0 and 2pi.\n */\n static sanitizeRadians(angle) {\n return (angle + Math.PI * 8) % (Math.PI * 2);\n }\n /**\n * Delinearizes an RGB component, returning a floating-point\n * number.\n *\n * @param rgbComponent 0.0 <= rgb_component <= 100.0, represents\n * linear R/G/B channel\n * @return 0.0 <= output <= 255.0, color channel converted to\n * regular RGB space\n */\n static trueDelinearized(rgbComponent) {\n const normalized = rgbComponent / 100.0;\n let delinearized = 0.0;\n if (normalized <= 0.0031308) {\n delinearized = normalized * 12.92;\n }\n else {\n delinearized = 1.055 * Math.pow(normalized, 1.0 / 2.4) - 0.055;\n }\n return delinearized * 255.0;\n }\n static chromaticAdaptation(component) {\n const af = Math.pow(Math.abs(component), 0.42);\n return mathUtils.signum(component) * 400.0 * af / (af + 27.13);\n }\n /**\n * Returns the hue of a linear RGB color in CAM16.\n *\n * @param linrgb The linear RGB coordinates of a color.\n * @return The hue of the color in CAM16, in radians.\n */\n static hueOf(linrgb) {\n const scaledDiscount = mathUtils.matrixMultiply(linrgb, HctSolver.SCALED_DISCOUNT_FROM_LINRGB);\n const rA = HctSolver.chromaticAdaptation(scaledDiscount[0]);\n const gA = HctSolver.chromaticAdaptation(scaledDiscount[1]);\n const bA = HctSolver.chromaticAdaptation(scaledDiscount[2]);\n // redness-greenness\n const a = (11.0 * rA + -12.0 * gA + bA) / 11.0;\n // yellowness-blueness\n const b = (rA + gA - 2.0 * bA) / 9.0;\n return Math.atan2(b, a);\n }\n static areInCyclicOrder(a, b, c) {\n const deltaAB = HctSolver.sanitizeRadians(b - a);\n const deltaAC = HctSolver.sanitizeRadians(c - a);\n return deltaAB < deltaAC;\n }\n /**\n * Solves the lerp equation.\n *\n * @param source The starting number.\n * @param mid The number in the middle.\n * @param target The ending number.\n * @return A number t such that lerp(source, target, t) = mid.\n */\n static intercept(source, mid, target) {\n return (mid - source) / (target - source);\n }\n static lerpPoint(source, t, target) {\n return [\n source[0] + (target[0] - source[0]) * t,\n source[1] + (target[1] - source[1]) * t,\n source[2] + (target[2] - source[2]) * t,\n ];\n }\n /**\n * Intersects a segment with a plane.\n *\n * @param source The coordinates of point A.\n * @param coordinate The R-, G-, or B-coordinate of the plane.\n * @param target The coordinates of point B.\n * @param axis The axis the plane is perpendicular with. (0: R, 1:\n * G, 2: B)\n * @return The intersection point of the segment AB with the plane\n * R=coordinate, G=coordinate, or B=coordinate\n */\n static setCoordinate(source, coordinate, target, axis) {\n const t = HctSolver.intercept(source[axis], coordinate, target[axis]);\n return HctSolver.lerpPoint(source, t, target);\n }\n static isBounded(x) {\n return 0.0 <= x && x <= 100.0;\n }\n /**\n * Returns the nth possible vertex of the polygonal intersection.\n *\n * @param y The Y value of the plane.\n * @param n The zero-based index of the point. 0 <= n <= 11.\n * @return The nth possible vertex of the polygonal intersection\n * of the y plane and the RGB cube, in linear RGB coordinates, if\n * it exists. If this possible vertex lies outside of the cube,\n * [-1.0, -1.0, -1.0] is returned.\n */\n static nthVertex(y, n) {\n const kR = HctSolver.Y_FROM_LINRGB[0];\n const kG = HctSolver.Y_FROM_LINRGB[1];\n const kB = HctSolver.Y_FROM_LINRGB[2];\n const coordA = n % 4 <= 1 ? 0.0 : 100.0;\n const coordB = n % 2 === 0 ? 0.0 : 100.0;\n if (n < 4) {\n const g = coordA;\n const b = coordB;\n const r = (y - g * kG - b * kB) / kR;\n if (HctSolver.isBounded(r)) {\n return [r, g, b];\n }\n else {\n return [-1.0, -1.0, -1.0];\n }\n }\n else if (n < 8) {\n const b = coordA;\n const r = coordB;\n const g = (y - r * kR - b * kB) / kG;\n if (HctSolver.isBounded(g)) {\n return [r, g, b];\n }\n else {\n return [-1.0, -1.0, -1.0];\n }\n }\n else {\n const r = coordA;\n const g = coordB;\n const b = (y - r * kR - g * kG) / kB;\n if (HctSolver.isBounded(b)) {\n return [r, g, b];\n }\n else {\n return [-1.0, -1.0, -1.0];\n }\n }\n }\n /**\n * Finds the segment containing the desired color.\n *\n * @param y The Y value of the color.\n * @param targetHue The hue of the color.\n * @return A list of two sets of linear RGB coordinates, each\n * corresponding to an endpoint of the segment containing the\n * desired color.\n */\n static bisectToSegment(y, targetHue) {\n let left = [-1.0, -1.0, -1.0];\n let right = left;\n let leftHue = 0.0;\n let rightHue = 0.0;\n let initialized = false;\n let uncut = true;\n for (let n = 0; n < 12; n++) {\n const mid = HctSolver.nthVertex(y, n);\n if (mid[0] < 0) {\n continue;\n }\n const midHue = HctSolver.hueOf(mid);\n if (!initialized) {\n left = mid;\n right = mid;\n leftHue = midHue;\n rightHue = midHue;\n initialized = true;\n continue;\n }\n if (uncut || HctSolver.areInCyclicOrder(leftHue, midHue, rightHue)) {\n uncut = false;\n if (HctSolver.areInCyclicOrder(leftHue, targetHue, midHue)) {\n right = mid;\n rightHue = midHue;\n }\n else {\n left = mid;\n leftHue = midHue;\n }\n }\n }\n return [left, right];\n }\n static midpoint(a, b) {\n return [\n (a[0] + b[0]) / 2,\n (a[1] + b[1]) / 2,\n (a[2] + b[2]) / 2,\n ];\n }\n static criticalPlaneBelow(x) {\n return Math.floor(x - 0.5);\n }\n static criticalPlaneAbove(x) {\n return Math.ceil(x - 0.5);\n }\n /**\n * Finds a color with the given Y and hue on the boundary of the\n * cube.\n *\n * @param y The Y value of the color.\n * @param targetHue The hue of the color.\n * @return The desired color, in linear RGB coordinates.\n */\n static bisectToLimit(y, targetHue) {\n const segment = HctSolver.bisectToSegment(y, targetHue);\n let left = segment[0];\n let leftHue = HctSolver.hueOf(left);\n let right = segment[1];\n for (let axis = 0; axis < 3; axis++) {\n if (left[axis] !== right[axis]) {\n let lPlane = -1;\n let rPlane = 255;\n if (left[axis] < right[axis]) {\n lPlane = HctSolver.criticalPlaneBelow(HctSolver.trueDelinearized(left[axis]));\n rPlane = HctSolver.criticalPlaneAbove(HctSolver.trueDelinearized(right[axis]));\n }\n else {\n lPlane = HctSolver.criticalPlaneAbove(HctSolver.trueDelinearized(left[axis]));\n rPlane = HctSolver.criticalPlaneBelow(HctSolver.trueDelinearized(right[axis]));\n }\n for (let i = 0; i < 8; i++) {\n if (Math.abs(rPlane - lPlane) <= 1) {\n break;\n }\n else {\n const mPlane = Math.floor((lPlane + rPlane) / 2.0);\n const midPlaneCoordinate = HctSolver.CRITICAL_PLANES[mPlane];\n const mid = HctSolver.setCoordinate(left, midPlaneCoordinate, right, axis);\n const midHue = HctSolver.hueOf(mid);\n if (HctSolver.areInCyclicOrder(leftHue, targetHue, midHue)) {\n right = mid;\n rPlane = mPlane;\n }\n else {\n left = mid;\n leftHue = midHue;\n lPlane = mPlane;\n }\n }\n }\n }\n }\n return HctSolver.midpoint(left, right);\n }\n static inverseChromaticAdaptation(adapted) {\n const adaptedAbs = Math.abs(adapted);\n const base = Math.max(0, 27.13 * adaptedAbs / (400.0 - adaptedAbs));\n return mathUtils.signum(adapted) * Math.pow(base, 1.0 / 0.42);\n }\n /**\n * Finds a color with the given hue, chroma, and Y.\n *\n * @param hueRadians The desired hue in radians.\n * @param chroma The desired chroma.\n * @param y The desired Y.\n * @return The desired color as a hexadecimal integer, if found; 0\n * otherwise.\n */\n static findResultByJ(hueRadians, chroma, y) {\n // Initial estimate of j.\n let j = Math.sqrt(y) * 11.0;\n // ===========================================================\n // Operations inlined from Cam16 to avoid repeated calculation\n // ===========================================================\n const viewingConditions = ViewingConditions.DEFAULT;\n const tInnerCoeff = 1 / Math.pow(1.64 - Math.pow(0.29, viewingConditions.n), 0.73);\n const eHue = 0.25 * (Math.cos(hueRadians + 2.0) + 3.8);\n const p1 = eHue * (50000.0 / 13.0) * viewingConditions.nc * viewingConditions.ncb;\n const hSin = Math.sin(hueRadians);\n const hCos = Math.cos(hueRadians);\n for (let iterationRound = 0; iterationRound < 5; iterationRound++) {\n // ===========================================================\n // Operations inlined from Cam16 to avoid repeated calculation\n // ===========================================================\n const jNormalized = j / 100.0;\n const alpha = chroma === 0.0 || j === 0.0 ? 0.0 : chroma / Math.sqrt(jNormalized);\n const t = Math.pow(alpha * tInnerCoeff, 1.0 / 0.9);\n const ac = viewingConditions.aw *\n Math.pow(jNormalized, 1.0 / viewingConditions.c / viewingConditions.z);\n const p2 = ac / viewingConditions.nbb;\n const gamma = 23.0 * (p2 + 0.305) * t /\n (23.0 * p1 + 11 * t * hCos + 108.0 * t * hSin);\n const a = gamma * hCos;\n const b = gamma * hSin;\n const rA = (460.0 * p2 + 451.0 * a + 288.0 * b) / 1403.0;\n const gA = (460.0 * p2 - 891.0 * a - 261.0 * b) / 1403.0;\n const bA = (460.0 * p2 - 220.0 * a - 6300.0 * b) / 1403.0;\n const rCScaled = HctSolver.inverseChromaticAdaptation(rA);\n const gCScaled = HctSolver.inverseChromaticAdaptation(gA);\n const bCScaled = HctSolver.inverseChromaticAdaptation(bA);\n const linrgb = mathUtils.matrixMultiply([rCScaled, gCScaled, bCScaled], HctSolver.LINRGB_FROM_SCALED_DISCOUNT);\n // ===========================================================\n // Operations inlined from Cam16 to avoid repeated calculation\n // ===========================================================\n if (linrgb[0] < 0 || linrgb[1] < 0 || linrgb[2] < 0) {\n return 0;\n }\n const kR = HctSolver.Y_FROM_LINRGB[0];\n const kG = HctSolver.Y_FROM_LINRGB[1];\n const kB = HctSolver.Y_FROM_LINRGB[2];\n const fnj = kR * linrgb[0] + kG * linrgb[1] + kB * linrgb[2];\n if (fnj <= 0) {\n return 0;\n }\n if (iterationRound === 4 || Math.abs(fnj - y) < 0.002) {\n if (linrgb[0] > 100.01 || linrgb[1] > 100.01 || linrgb[2] > 100.01) {\n return 0;\n }\n return colorUtils.argbFromLinrgb(linrgb);\n }\n // Iterates with Newton method,\n // Using 2 * fn(j) / j as the approximation of fn'(j)\n j = j - (fnj - y) * j / (2 * fnj);\n }\n return 0;\n }\n /**\n * Finds an sRGB color with the given hue, chroma, and L*, if\n * possible.\n *\n * @param hueDegrees The desired hue, in degrees.\n * @param chroma The desired chroma.\n * @param lstar The desired L*.\n * @return A hexadecimal representing the sRGB color. The color\n * has sufficiently close hue, chroma, and L* to the desired\n * values, if possible; otherwise, the hue and L* will be\n * sufficiently close, and chroma will be maximized.\n */\n static solveToInt(hueDegrees, chroma, lstar) {\n if (chroma < 0.0001 || lstar < 0.0001 || lstar > 99.9999) {\n return colorUtils.argbFromLstar(lstar);\n }\n hueDegrees = mathUtils.sanitizeDegreesDouble(hueDegrees);\n const hueRadians = hueDegrees / 180 * Math.PI;\n const y = colorUtils.yFromLstar(lstar);\n const exactAnswer = HctSolver.findResultByJ(hueRadians, chroma, y);\n if (exactAnswer !== 0) {\n return exactAnswer;\n }\n const linrgb = HctSolver.bisectToLimit(y, hueRadians);\n return colorUtils.argbFromLinrgb(linrgb);\n }\n /**\n * Finds an sRGB color with the given hue, chroma, and L*, if\n * possible.\n *\n * @param hueDegrees The desired hue, in degrees.\n * @param chroma The desired chroma.\n * @param lstar The desired L*.\n * @return An CAM16 object representing the sRGB color. The color\n * has sufficiently close hue, chroma, and L* to the desired\n * values, if possible; otherwise, the hue and L* will be\n * sufficiently close, and chroma will be maximized.\n */\n static solveToCam(hueDegrees, chroma, lstar) {\n return Cam16.fromInt(HctSolver.solveToInt(hueDegrees, chroma, lstar));\n }\n}\nHctSolver.SCALED_DISCOUNT_FROM_LINRGB = [\n [\n 0.001200833568784504,\n 0.002389694492170889,\n 0.0002795742885861124,\n ],\n [\n 0.0005891086651375999,\n 0.0029785502573438758,\n 0.0003270666104008398,\n ],\n [\n 0.00010146692491640572,\n 0.0005364214359186694,\n 0.0032979401770712076,\n ],\n];\nHctSolver.LINRGB_FROM_SCALED_DISCOUNT = [\n [\n 1373.2198709594231,\n -1100.4251190754821,\n -7.278681089101213,\n ],\n [\n -271.815969077903,\n 559.6580465940733,\n -32.46047482791194,\n ],\n [\n 1.9622899599665666,\n -57.173814538844006,\n 308.7233197812385,\n ],\n];\nHctSolver.Y_FROM_LINRGB = [0.2126, 0.7152, 0.0722];\nHctSolver.CRITICAL_PLANES = [\n 0.015176349177441876, 0.045529047532325624, 0.07588174588720938,\n 0.10623444424209313, 0.13658714259697685, 0.16693984095186062,\n 0.19729253930674434, 0.2276452376616281, 0.2579979360165119,\n 0.28835063437139563, 0.3188300904430532, 0.350925934958123,\n 0.3848314933096426, 0.42057480301049466, 0.458183274052838,\n 0.4976837250274023, 0.5391024159806381, 0.5824650784040898,\n 0.6277969426914107, 0.6751227633498623, 0.7244668422128921,\n 0.775853049866786, 0.829304845476233, 0.8848452951698498,\n 0.942497089126609, 1.0022825574869039, 1.0642236851973577,\n 1.1283421258858297, 1.1946592148522128, 1.2631959812511864,\n 1.3339731595349034, 1.407011200216447, 1.4823302800086415,\n 1.5599503113873272, 1.6398909516233677, 1.7221716113234105,\n 1.8068114625156377, 1.8938294463134073, 1.9832442801866852,\n 2.075074464868551, 2.1693382909216234, 2.2660538449872063,\n 2.36523901573795, 2.4669114995532007, 2.5710888059345764,\n 2.6777882626779785, 2.7870270208169257, 2.898822059350997,\n 3.0131901897720907, 3.1301480604002863, 3.2497121605402226,\n 3.3718988244681087, 3.4967242352587946, 3.624204428461639,\n 3.754355295633311, 3.887192587735158, 4.022731918402185,\n 4.160988767090289, 4.301978482107941, 4.445716283538092,\n 4.592217266055746, 4.741496401646282, 4.893568542229298,\n 5.048448422192488, 5.20615066083972, 5.3666897647573375,\n 5.5300801301023865, 5.696336044816294, 5.865471690767354,\n 6.037501145825082, 6.212438385869475, 6.390297286737924,\n 6.571091626112461, 6.7548350853498045, 6.941541251256611,\n 7.131223617812143, 7.323895587840543, 7.5195704746346665,\n 7.7182615035334345, 7.919981813454504, 8.124744458384042,\n 8.332562408825165, 8.543448553206703, 8.757415699253682,\n 8.974476575321063, 9.194643831691977, 9.417930041841839,\n 9.644347703669503, 9.873909240696694, 10.106627003236781,\n 10.342513269534024, 10.58158024687427, 10.8238400726681,\n 11.069304815507364, 11.317986476196008, 11.569896988756009,\n 11.825048221409341, 12.083451977536606, 12.345119996613247,\n 12.610063955123938, 12.878295467455942, 13.149826086772048,\n 13.42466730586372, 13.702830557985108, 13.984327217668513,\n 14.269168601521828, 14.55736596900856, 14.848930523210871,\n 15.143873411576273, 15.44220572664832, 15.743938506781891,\n 16.04908273684337, 16.35764934889634, 16.66964922287304,\n 16.985093187232053, 17.30399201960269, 17.62635644741625,\n 17.95219714852476, 18.281524751807332, 18.614349837764564,\n 18.95068293910138, 19.290534541298456, 19.633915083172692,\n 19.98083495742689, 20.331304511189067, 20.685334046541502,\n 21.042933821039977, 21.404114048223256, 21.76888489811322,\n 22.137256497705877, 22.50923893145328, 22.884842241736916,\n 23.264076429332462, 23.6469514538663, 24.033477234264016,\n 24.42366364919083, 24.817520537484558, 25.21505769858089,\n 25.61628489293138, 26.021211842414342, 26.429848230738664,\n 26.842203703840827, 27.258287870275353, 27.678110301598522,\n 28.10168053274597, 28.529008062403893, 28.96010235337422,\n 29.39497283293396, 29.83362889318845, 30.276079891419332,\n 30.722335150426627, 31.172403958865512, 31.62629557157785,\n 32.08401920991837, 32.54558406207592, 33.010999283389665,\n 33.4802739966603, 33.953417292456834, 34.430438229418264,\n 34.911345834551085, 35.39614910352207, 35.88485700094671,\n 36.37747846067349, 36.87402238606382, 37.37449765026789,\n 37.87891309649659, 38.38727753828926, 38.89959975977785,\n 39.41588851594697, 39.93615253289054, 40.460400508064545,\n 40.98864111053629, 41.520882981230194, 42.05713473317016,\n 42.597404951718396, 43.141702194811224, 43.6900349931913,\n 44.24241185063697, 44.798841244188324, 45.35933162437017,\n 45.92389141541209, 46.49252901546552, 47.065252796817916,\n 47.64207110610409, 48.22299226451468, 48.808024568002054,\n 49.3971762874833, 49.9904556690408, 50.587870934119984,\n 51.189430279724725, 51.79514187861014, 52.40501387947288,\n 53.0190544071392, 53.637271562750364, 54.259673423945976,\n 54.88626804504493, 55.517063457223934, 56.15206766869424,\n 56.79128866487574, 57.43473440856916, 58.08241284012621,\n 58.734331877617365, 59.39049941699807, 60.05092333227251,\n 60.715611475655585, 61.38457167773311, 62.057811747619894,\n 62.7353394731159, 63.417162620860914, 64.10328893648692,\n 64.79372614476921, 65.48848194977529, 66.18756403501224,\n 66.89098006357258, 67.59873767827808, 68.31084450182222,\n 69.02730813691093, 69.74813616640164, 70.47333615344107,\n 71.20291564160104, 71.93688215501312, 72.67524319850172,\n 73.41800625771542, 74.16517879925733, 74.9167682708136,\n 75.67278210128072, 76.43322770089146, 77.1981124613393,\n 77.96744375590167, 78.74122893956174, 79.51947534912904,\n 80.30219030335869, 81.08938110306934, 81.88105503125999,\n 82.67721935322541, 83.4778813166706, 84.28304815182372,\n 85.09272707154808, 85.90692527145302, 86.72564993000343,\n 87.54890820862819, 88.3767072518277, 89.2090541872801,\n 90.04595612594655, 90.88742016217518, 91.73345337380438,\n 92.58406282226491, 93.43925555268066, 94.29903859396902,\n 95.16341895893969, 96.03240364439274, 96.9059996312159,\n 97.78421388448044, 98.6670533535366, 99.55452497210776,\n];\n//# sourceMappingURL=hct_solver.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A color system built using CAM16 hue and chroma, and L* from\n * L*a*b*.\n *\n * Using L* creates a link between the color system, contrast, and thus\n * accessibility. Contrast ratio depends on relative luminance, or Y in the XYZ\n * color space. L*, or perceptual luminance can be calculated from Y.\n *\n * Unlike Y, L* is linear to human perception, allowing trivial creation of\n * accurate color tones.\n *\n * Unlike contrast ratio, measuring contrast in L* is linear, and simple to\n * calculate. A difference of 40 in HCT tone guarantees a contrast ratio >= 3.0,\n * and a difference of 50 guarantees a contrast ratio >= 4.5.\n */\nimport * as utils from '../utils/color_utils.js';\nimport { Cam16 } from './cam16.js';\nimport { HctSolver } from './hct_solver.js';\nimport { ViewingConditions } from './viewing_conditions.js';\n/**\n * HCT, hue, chroma, and tone. A color system that provides a perceptually\n * accurate color measurement system that can also accurately render what colors\n * will appear as in different lighting environments.\n */\nexport class Hct {\n static from(hue, chroma, tone) {\n return new Hct(HctSolver.solveToInt(hue, chroma, tone));\n }\n /**\n * @param argb ARGB representation of a color.\n * @return HCT representation of a color in default viewing conditions\n */\n static fromInt(argb) {\n return new Hct(argb);\n }\n toInt() {\n return this.argb;\n }\n /**\n * A number, in degrees, representing ex. red, orange, yellow, etc.\n * Ranges from 0 <= hue < 360.\n */\n get hue() {\n return this.internalHue;\n }\n /**\n * @param newHue 0 <= newHue < 360; invalid values are corrected.\n * Chroma may decrease because chroma has a different maximum for any given\n * hue and tone.\n */\n set hue(newHue) {\n this.setInternalState(HctSolver.solveToInt(newHue, this.internalChroma, this.internalTone));\n }\n get chroma() {\n return this.internalChroma;\n }\n /**\n * @param newChroma 0 <= newChroma < ?\n * Chroma may decrease because chroma has a different maximum for any given\n * hue and tone.\n */\n set chroma(newChroma) {\n this.setInternalState(HctSolver.solveToInt(this.internalHue, newChroma, this.internalTone));\n }\n /** Lightness. Ranges from 0 to 100. */\n get tone() {\n return this.internalTone;\n }\n /**\n * @param newTone 0 <= newTone <= 100; invalid valids are corrected.\n * Chroma may decrease because chroma has a different maximum for any given\n * hue and tone.\n */\n set tone(newTone) {\n this.setInternalState(HctSolver.solveToInt(this.internalHue, this.internalChroma, newTone));\n }\n /** Sets a property of the Hct object. */\n setValue(propertyName, value) {\n this[propertyName] = value;\n }\n toString() {\n return `HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`;\n }\n static isBlue(hue) {\n return hue >= 250 && hue < 270;\n }\n static isYellow(hue) {\n return hue >= 105 && hue < 125;\n }\n static isCyan(hue) {\n return hue >= 170 && hue < 207;\n }\n constructor(argb) {\n this.argb = argb;\n const cam = Cam16.fromInt(argb);\n this.internalHue = cam.hue;\n this.internalChroma = cam.chroma;\n this.internalTone = utils.lstarFromArgb(argb);\n this.argb = argb;\n }\n setInternalState(argb) {\n const cam = Cam16.fromInt(argb);\n this.internalHue = cam.hue;\n this.internalChroma = cam.chroma;\n this.internalTone = utils.lstarFromArgb(argb);\n this.argb = argb;\n }\n /**\n * Translates a color into different [ViewingConditions].\n *\n * Colors change appearance. They look different with lights on versus off,\n * the same color, as in hex code, on white looks different when on black.\n * This is called color relativity, most famously explicated by Josef Albers\n * in Interaction of Color.\n *\n * In color science, color appearance models can account for this and\n * calculate the appearance of a color in different settings. HCT is based on\n * CAM16, a color appearance model, and uses it to make these calculations.\n *\n * See [ViewingConditions.make] for parameters affecting color appearance.\n */\n inViewingConditions(vc) {\n // 1. Use CAM16 to find XYZ coordinates of color in specified VC.\n const cam = Cam16.fromInt(this.toInt());\n const viewedInVc = cam.xyzInViewingConditions(vc);\n // 2. Create CAM16 of those XYZ coordinates in default VC.\n const recastInVc = Cam16.fromXyzInViewingConditions(viewedInVc[0], viewedInVc[1], viewedInVc[2], ViewingConditions.make());\n // 3. Create HCT from:\n // - CAM16 using default VC with XYZ coordinates in specified VC.\n // - L* converted from Y in XYZ coordinates in specified VC.\n const recastHct = Hct.from(recastInVc.hue, recastInVc.chroma, utils.lstarFromY(viewedInVc[1]));\n return recastHct;\n }\n}\n//# sourceMappingURL=hct.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This file is automatically generated. Do not modify it.\nimport { Cam16 } from '../hct/cam16.js';\nimport { Hct } from '../hct/hct.js';\nimport * as colorUtils from '../utils/color_utils.js';\nimport * as mathUtils from '../utils/math_utils.js';\n// material_color_utilities is designed to have a consistent API across\n// platforms and modular components that can be moved around easily. Using a\n// class as a namespace facilitates this.\n//\n// tslint:disable:class-as-namespace\n/**\n * Functions for blending in HCT and CAM16.\n */\nexport class Blend {\n /**\n * Blend the design color's HCT hue towards the key color's HCT\n * hue, in a way that leaves the original color recognizable and\n * recognizably shifted towards the key color.\n *\n * @param designColor ARGB representation of an arbitrary color.\n * @param sourceColor ARGB representation of the main theme color.\n * @return The design color with a hue shifted towards the\n * system's color, a slightly warmer/cooler variant of the design\n * color's hue.\n */\n static harmonize(designColor, sourceColor) {\n const fromHct = Hct.fromInt(designColor);\n const toHct = Hct.fromInt(sourceColor);\n const differenceDegrees = mathUtils.differenceDegrees(fromHct.hue, toHct.hue);\n const rotationDegrees = Math.min(differenceDegrees * 0.5, 15.0);\n const outputHue = mathUtils.sanitizeDegreesDouble(fromHct.hue +\n rotationDegrees * mathUtils.rotationDirection(fromHct.hue, toHct.hue));\n return Hct.from(outputHue, fromHct.chroma, fromHct.tone).toInt();\n }\n /**\n * Blends hue from one color into another. The chroma and tone of\n * the original color are maintained.\n *\n * @param from ARGB representation of color\n * @param to ARGB representation of color\n * @param amount how much blending to perform; 0.0 >= and <= 1.0\n * @return from, with a hue blended towards to. Chroma and tone\n * are constant.\n */\n static hctHue(from, to, amount) {\n const ucs = Blend.cam16Ucs(from, to, amount);\n const ucsCam = Cam16.fromInt(ucs);\n const fromCam = Cam16.fromInt(from);\n const blended = Hct.from(ucsCam.hue, fromCam.chroma, colorUtils.lstarFromArgb(from));\n return blended.toInt();\n }\n /**\n * Blend in CAM16-UCS space.\n *\n * @param from ARGB representation of color\n * @param to ARGB representation of color\n * @param amount how much blending to perform; 0.0 >= and <= 1.0\n * @return from, blended towards to. Hue, chroma, and tone will\n * change.\n */\n static cam16Ucs(from, to, amount) {\n const fromCam = Cam16.fromInt(from);\n const toCam = Cam16.fromInt(to);\n const fromJ = fromCam.jstar;\n const fromA = fromCam.astar;\n const fromB = fromCam.bstar;\n const toJ = toCam.jstar;\n const toA = toCam.astar;\n const toB = toCam.bstar;\n const jstar = fromJ + (toJ - fromJ) * amount;\n const astar = fromA + (toA - fromA) * amount;\n const bstar = fromB + (toB - fromB) * amount;\n return Cam16.fromUcs(jstar, astar, bstar).toInt();\n }\n}\n//# sourceMappingURL=blend.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// material_color_utilities is designed to have a consistent API across\n// platforms and modular components that can be moved around easily. Using a\n// class as a namespace facilitates this.\n//\n// tslint:disable:class-as-namespace\nimport * as utils from '../utils/color_utils.js';\nimport * as math from '../utils/math_utils.js';\n/**\n * Utility methods for calculating contrast given two colors, or calculating a\n * color given one color and a contrast ratio.\n *\n * Contrast ratio is calculated using XYZ's Y. When linearized to match human\n * perception, Y becomes HCT's tone and L*a*b*'s' L*. Informally, this is the\n * lightness of a color.\n *\n * Methods refer to tone, T in the the HCT color space.\n * Tone is equivalent to L* in the L*a*b* color space, or L in the LCH color\n * space.\n */\nexport class Contrast {\n /**\n * Returns a contrast ratio, which ranges from 1 to 21.\n *\n * @param toneA Tone between 0 and 100. Values outside will be clamped.\n * @param toneB Tone between 0 and 100. Values outside will be clamped.\n */\n static ratioOfTones(toneA, toneB) {\n toneA = math.clampDouble(0.0, 100.0, toneA);\n toneB = math.clampDouble(0.0, 100.0, toneB);\n return Contrast.ratioOfYs(utils.yFromLstar(toneA), utils.yFromLstar(toneB));\n }\n static ratioOfYs(y1, y2) {\n const lighter = y1 > y2 ? y1 : y2;\n const darker = (lighter === y2) ? y1 : y2;\n return (lighter + 5.0) / (darker + 5.0);\n }\n /**\n * Returns a tone >= tone parameter that ensures ratio parameter.\n * Return value is between 0 and 100.\n * Returns -1 if ratio cannot be achieved with tone parameter.\n *\n * @param tone Tone return value must contrast with.\n * Range is 0 to 100. Invalid values will result in -1 being returned.\n * @param ratio Contrast ratio of return value and tone.\n * Range is 1 to 21, invalid values have undefined behavior.\n */\n static lighter(tone, ratio) {\n if (tone < 0.0 || tone > 100.0) {\n return -1.0;\n }\n const darkY = utils.yFromLstar(tone);\n const lightY = ratio * (darkY + 5.0) - 5.0;\n const realContrast = Contrast.ratioOfYs(lightY, darkY);\n const delta = Math.abs(realContrast - ratio);\n if (realContrast < ratio && delta > 0.04) {\n return -1;\n }\n // Ensure gamut mapping, which requires a 'range' on tone, will still result\n // the correct ratio by darkening slightly.\n const returnValue = utils.lstarFromY(lightY) + 0.4;\n if (returnValue < 0 || returnValue > 100) {\n return -1;\n }\n return returnValue;\n }\n /**\n * Returns a tone <= tone parameter that ensures ratio parameter.\n * Return value is between 0 and 100.\n * Returns -1 if ratio cannot be achieved with tone parameter.\n *\n * @param tone Tone return value must contrast with.\n * Range is 0 to 100. Invalid values will result in -1 being returned.\n * @param ratio Contrast ratio of return value and tone.\n * Range is 1 to 21, invalid values have undefined behavior.\n */\n static darker(tone, ratio) {\n if (tone < 0.0 || tone > 100.0) {\n return -1.0;\n }\n const lightY = utils.yFromLstar(tone);\n const darkY = ((lightY + 5.0) / ratio) - 5.0;\n const realContrast = Contrast.ratioOfYs(lightY, darkY);\n const delta = Math.abs(realContrast - ratio);\n if (realContrast < ratio && delta > 0.04) {\n return -1;\n }\n // Ensure gamut mapping, which requires a 'range' on tone, will still result\n // the correct ratio by darkening slightly.\n const returnValue = utils.lstarFromY(darkY) - 0.4;\n if (returnValue < 0 || returnValue > 100) {\n return -1;\n }\n return returnValue;\n }\n /**\n * Returns a tone >= tone parameter that ensures ratio parameter.\n * Return value is between 0 and 100.\n * Returns 100 if ratio cannot be achieved with tone parameter.\n *\n * This method is unsafe because the returned value is guaranteed to be in\n * bounds for tone, i.e. between 0 and 100. However, that value may not reach\n * the ratio with tone. For example, there is no color lighter than T100.\n *\n * @param tone Tone return value must contrast with.\n * Range is 0 to 100. Invalid values will result in 100 being returned.\n * @param ratio Desired contrast ratio of return value and tone parameter.\n * Range is 1 to 21, invalid values have undefined behavior.\n */\n static lighterUnsafe(tone, ratio) {\n const lighterSafe = Contrast.lighter(tone, ratio);\n return (lighterSafe < 0.0) ? 100.0 : lighterSafe;\n }\n /**\n * Returns a tone >= tone parameter that ensures ratio parameter.\n * Return value is between 0 and 100.\n * Returns 100 if ratio cannot be achieved with tone parameter.\n *\n * This method is unsafe because the returned value is guaranteed to be in\n * bounds for tone, i.e. between 0 and 100. However, that value may not reach\n * the [ratio with [tone]. For example, there is no color darker than T0.\n *\n * @param tone Tone return value must contrast with.\n * Range is 0 to 100. Invalid values will result in 0 being returned.\n * @param ratio Desired contrast ratio of return value and tone parameter.\n * Range is 1 to 21, invalid values have undefined behavior.\n */\n static darkerUnsafe(tone, ratio) {\n const darkerSafe = Contrast.darker(tone, ratio);\n return (darkerSafe < 0.0) ? 0.0 : darkerSafe;\n }\n}\n//# sourceMappingURL=contrast.js.map","/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct.js';\n// material_color_utilities is designed to have a consistent API across\n// platforms and modular components that can be moved around easily. Using a\n// class as a namespace facilitates this.\n//\n// tslint:disable:class-as-namespace\n/**\n * Check and/or fix universally disliked colors.\n * Color science studies of color preference indicate universal distaste for\n * dark yellow-greens, and also show this is correlated to distate for\n * biological waste and rotting food.\n *\n * See Palmer and Schloss, 2010 or Schloss and Palmer's Chapter 21 in Handbook\n * of Color Psychology (2015).\n */\nexport class DislikeAnalyzer {\n /**\n * Returns true if a color is disliked.\n *\n * @param hct A color to be judged.\n * @return Whether the color is disliked.\n *\n * Disliked is defined as a dark yellow-green that is not neutral.\n */\n static isDisliked(hct) {\n const huePasses = Math.round(hct.hue) >= 90.0 && Math.round(hct.hue) <= 111.0;\n const chromaPasses = Math.round(hct.chroma) > 16.0;\n const tonePasses = Math.round(hct.tone) < 65.0;\n return huePasses && chromaPasses && tonePasses;\n }\n /**\n * If a color is disliked, lighten it to make it likable.\n *\n * @param hct A color to be judged.\n * @return A new color if the original color is disliked, or the original\n * color if it is acceptable.\n */\n static fixIfDisliked(hct) {\n if (DislikeAnalyzer.isDisliked(hct)) {\n return Hct.from(hct.hue, hct.chroma, 70.0);\n }\n return hct;\n }\n}\n//# sourceMappingURL=dislike_analyzer.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Contrast } from '../contrast/contrast.js';\nimport { Hct } from '../hct/hct.js';\nimport * as math from '../utils/math_utils.js';\nfunction validateExtendedColor(originalColor, specVersion, extendedColor) {\n if (originalColor.name !== extendedColor.name) {\n throw new Error(`Attempting to extend color ${originalColor.name} with color ${extendedColor.name} of different name for spec version ${specVersion}.`);\n }\n if (originalColor.isBackground !== extendedColor.isBackground) {\n throw new Error(`Attempting to extend color ${originalColor.name} as a ${(originalColor.isBackground ?\n 'background' :\n 'foreground')} with color ${extendedColor.name} as a ${(extendedColor.isBackground ?\n 'background' :\n 'foreground')} for spec version ${specVersion}.`);\n }\n}\n/**\n * Returns a new DynamicColor that is the same as the original color, but with\n * the extended dynamic color's constraints for the given spec version.\n *\n * @param originlColor The original color.\n * @param specVersion The spec version to extend.\n * @param extendedColor The color with the values to extend.\n */\nexport function extendSpecVersion(originlColor, specVersion, extendedColor) {\n validateExtendedColor(originlColor, specVersion, extendedColor);\n return DynamicColor.fromPalette({\n name: originlColor.name,\n palette: (s) => s.specVersion === specVersion ? extendedColor.palette(s) :\n originlColor.palette(s),\n tone: (s) => s.specVersion === specVersion ? extendedColor.tone(s) :\n originlColor.tone(s),\n isBackground: originlColor.isBackground,\n chromaMultiplier: (s) => {\n const chromaMultiplier = s.specVersion === specVersion ?\n extendedColor.chromaMultiplier :\n originlColor.chromaMultiplier;\n return chromaMultiplier !== undefined ? chromaMultiplier(s) : 1;\n },\n background: (s) => {\n const background = s.specVersion === specVersion ?\n extendedColor.background :\n originlColor.background;\n return background !== undefined ? background(s) : undefined;\n },\n secondBackground: (s) => {\n const secondBackground = s.specVersion === specVersion ?\n extendedColor.secondBackground :\n originlColor.secondBackground;\n return secondBackground !== undefined ? secondBackground(s) : undefined;\n },\n contrastCurve: (s) => {\n const contrastCurve = s.specVersion === specVersion ?\n extendedColor.contrastCurve :\n originlColor.contrastCurve;\n return contrastCurve !== undefined ? contrastCurve(s) : undefined;\n },\n toneDeltaPair: (s) => {\n const toneDeltaPair = s.specVersion === specVersion ?\n extendedColor.toneDeltaPair :\n originlColor.toneDeltaPair;\n return toneDeltaPair !== undefined ? toneDeltaPair(s) : undefined;\n },\n });\n}\n/**\n * A color that adjusts itself based on UI state provided by DynamicScheme.\n *\n * Colors without backgrounds do not change tone when contrast changes. Colors\n * with backgrounds become closer to their background as contrast lowers, and\n * further when contrast increases.\n *\n * Prefer static constructors. They require either a hexcode, a palette and\n * tone, or a hue and chroma. Optionally, they can provide a background\n * DynamicColor.\n */\nexport class DynamicColor {\n /**\n * Create a DynamicColor defined by a TonalPalette and HCT tone.\n *\n * @param args Functions with DynamicScheme as input. Must provide a palette\n * and tone. May provide a background DynamicColor and ToneDeltaPair.\n */\n static fromPalette(args) {\n return new DynamicColor(args.name ?? '', args.palette, args.tone ?? DynamicColor.getInitialToneFromBackground(args.background), args.isBackground ?? false, args.chromaMultiplier, args.background, args.secondBackground, args.contrastCurve, args.toneDeltaPair);\n }\n static getInitialToneFromBackground(background) {\n if (background === undefined) {\n return (s) => 50;\n }\n return (s) => background(s) ? background(s).getTone(s) : 50;\n }\n /**\n * The base constructor for DynamicColor.\n *\n * _Strongly_ prefer using one of the convenience constructors. This class is\n * arguably too flexible to ensure it can support any scenario. Functional\n * arguments allow overriding without risks that come with subclasses.\n *\n * For example, the default behavior of adjust tone at max contrast\n * to be at a 7.0 ratio with its background is principled and\n * matches accessibility guidance. That does not mean it's the desired\n * approach for _every_ design system, and every color pairing,\n * always, in every case.\n *\n * @param name The name of the dynamic color. Defaults to empty.\n * @param palette Function that provides a TonalPalette given DynamicScheme. A\n * TonalPalette is defined by a hue and chroma, so this replaces the need\n * to specify hue/chroma. By providing a tonal palette, when contrast\n * adjustments are made, intended chroma can be preserved.\n * @param tone Function that provides a tone, given a DynamicScheme.\n * @param isBackground Whether this dynamic color is a background, with some\n * other color as the foreground. Defaults to false.\n * @param chromaMultiplier A factor that multiplies the chroma for this color.\n * @param background The background of the dynamic color (as a function of a\n * `DynamicScheme`), if it exists.\n * @param secondBackground A second background of the dynamic color (as a\n * function of a `DynamicScheme`), if it exists.\n * @param contrastCurve A `ContrastCurve` object specifying how its contrast\n * against its background should behave in various contrast levels\n * options.\n * @param toneDeltaPair A `ToneDeltaPair` object specifying a tone delta\n * constraint between two colors. One of them must be the color being\n * constructed.\n */\n constructor(name, palette, tone, isBackground, chromaMultiplier, background, secondBackground, contrastCurve, toneDeltaPair) {\n this.name = name;\n this.palette = palette;\n this.tone = tone;\n this.isBackground = isBackground;\n this.chromaMultiplier = chromaMultiplier;\n this.background = background;\n this.secondBackground = secondBackground;\n this.contrastCurve = contrastCurve;\n this.toneDeltaPair = toneDeltaPair;\n this.hctCache = new Map();\n if ((!background) && secondBackground) {\n throw new Error(`Color ${name} has secondBackground` +\n `defined, but background is not defined.`);\n }\n if ((!background) && contrastCurve) {\n throw new Error(`Color ${name} has contrastCurve` +\n `defined, but background is not defined.`);\n }\n if (background && !contrastCurve) {\n throw new Error(`Color ${name} has background` +\n `defined, but contrastCurve is not defined.`);\n }\n }\n /**\n * Returns a deep copy of this DynamicColor.\n */\n clone() {\n return DynamicColor.fromPalette({\n name: this.name,\n palette: this.palette,\n tone: this.tone,\n isBackground: this.isBackground,\n chromaMultiplier: this.chromaMultiplier,\n background: this.background,\n secondBackground: this.secondBackground,\n contrastCurve: this.contrastCurve,\n toneDeltaPair: this.toneDeltaPair,\n });\n }\n /**\n * Clears the cache of HCT values for this color. For testing or debugging\n * purposes.\n */\n clearCache() {\n this.hctCache.clear();\n }\n /**\n * Returns a ARGB integer (i.e. a hex code).\n *\n * @param scheme Defines the conditions of the user interface, for example,\n * whether or not it is dark mode or light mode, and what the desired\n * contrast level is.\n */\n getArgb(scheme) {\n return this.getHct(scheme).toInt();\n }\n /**\n * Returns a color, expressed in the HCT color space, that this\n * DynamicColor is under the conditions in scheme.\n *\n * @param scheme Defines the conditions of the user interface, for example,\n * whether or not it is dark mode or light mode, and what the desired\n * contrast level is.\n */\n getHct(scheme) {\n const cachedAnswer = this.hctCache.get(scheme);\n if (cachedAnswer != null) {\n return cachedAnswer;\n }\n const answer = getSpec(scheme.specVersion).getHct(scheme, this);\n if (this.hctCache.size > 4) {\n this.hctCache.clear();\n }\n this.hctCache.set(scheme, answer);\n return answer;\n }\n /**\n * Returns a tone, T in the HCT color space, that this DynamicColor is under\n * the conditions in scheme.\n *\n * @param scheme Defines the conditions of the user interface, for example,\n * whether or not it is dark mode or light mode, and what the desired\n * contrast level is.\n */\n getTone(scheme) {\n return getSpec(scheme.specVersion).getTone(scheme, this);\n }\n /**\n * Given a background tone, finds a foreground tone, while ensuring they reach\n * a contrast ratio that is as close to [ratio] as possible.\n *\n * @param bgTone Tone in HCT. Range is 0 to 100, undefined behavior when it\n * falls outside that range.\n * @param ratio The contrast ratio desired between bgTone and the return\n * value.\n */\n static foregroundTone(bgTone, ratio) {\n const lighterTone = Contrast.lighterUnsafe(bgTone, ratio);\n const darkerTone = Contrast.darkerUnsafe(bgTone, ratio);\n const lighterRatio = Contrast.ratioOfTones(lighterTone, bgTone);\n const darkerRatio = Contrast.ratioOfTones(darkerTone, bgTone);\n const preferLighter = DynamicColor.tonePrefersLightForeground(bgTone);\n if (preferLighter) {\n // This handles an edge case where the initial contrast ratio is high\n // (ex. 13.0), and the ratio passed to the function is that high\n // ratio, and both the lighter and darker ratio fails to pass that\n // ratio.\n //\n // This was observed with Tonal Spot's On Primary Container turning\n // black momentarily between high and max contrast in light mode. PC's\n // standard tone was T90, OPC's was T10, it was light mode, and the\n // contrast value was 0.6568521221032331.\n const negligibleDifference = Math.abs(lighterRatio - darkerRatio) < 0.1 &&\n lighterRatio < ratio && darkerRatio < ratio;\n return lighterRatio >= ratio || lighterRatio >= darkerRatio ||\n negligibleDifference ?\n lighterTone :\n darkerTone;\n }\n else {\n return darkerRatio >= ratio || darkerRatio >= lighterRatio ? darkerTone :\n lighterTone;\n }\n }\n /**\n * Returns whether [tone] prefers a light foreground.\n *\n * People prefer white foregrounds on ~T60-70. Observed over time, and also\n * by Andrew Somers during research for APCA.\n *\n * T60 used as to create the smallest discontinuity possible when skipping\n * down to T49 in order to ensure light foregrounds.\n * Since `tertiaryContainer` in dark monochrome scheme requires a tone of\n * 60, it should not be adjusted. Therefore, 60 is excluded here.\n */\n static tonePrefersLightForeground(tone) {\n return Math.round(tone) < 60.0;\n }\n /**\n * Returns whether [tone] can reach a contrast ratio of 4.5 with a lighter\n * color.\n */\n static toneAllowsLightForeground(tone) {\n return Math.round(tone) <= 49.0;\n }\n /**\n * Adjusts a tone such that white has 4.5 contrast, if the tone is\n * reasonably close to supporting it.\n */\n static enableLightForeground(tone) {\n if (DynamicColor.tonePrefersLightForeground(tone) &&\n !DynamicColor.toneAllowsLightForeground(tone)) {\n return 49.0;\n }\n return tone;\n }\n}\n/**\n * A delegate for the color calculation of a DynamicScheme in the 2021 spec.\n */\nclass ColorCalculationDelegateImpl2021 {\n getHct(scheme, color) {\n const tone = color.getTone(scheme);\n const palette = color.palette(scheme);\n return palette.getHct(tone);\n }\n getTone(scheme, color) {\n const decreasingContrast = scheme.contrastLevel < 0;\n const toneDeltaPair = color.toneDeltaPair ? color.toneDeltaPair(scheme) : undefined;\n // Case 1: dual foreground, pair of colors with delta constraint.\n if (toneDeltaPair) {\n const roleA = toneDeltaPair.roleA;\n const roleB = toneDeltaPair.roleB;\n const delta = toneDeltaPair.delta;\n const polarity = toneDeltaPair.polarity;\n const stayTogether = toneDeltaPair.stayTogether;\n const aIsNearer = (polarity === 'nearer' ||\n (polarity === 'lighter' && !scheme.isDark) ||\n (polarity === 'darker' && scheme.isDark));\n const nearer = aIsNearer ? roleA : roleB;\n const farther = aIsNearer ? roleB : roleA;\n const amNearer = color.name === nearer.name;\n const expansionDir = scheme.isDark ? 1 : -1;\n let nTone = nearer.tone(scheme);\n let fTone = farther.tone(scheme);\n // 1st round: solve to min for each, if background and contrast curve\n // are defined.\n if (color.background && nearer.contrastCurve && farther.contrastCurve) {\n const bg = color.background(scheme);\n const nContrastCurve = nearer.contrastCurve(scheme);\n const fContrastCurve = farther.contrastCurve(scheme);\n if (bg && nContrastCurve && fContrastCurve) {\n const bgTone = bg.getTone(scheme);\n const nContrast = nContrastCurve.get(scheme.contrastLevel);\n const fContrast = fContrastCurve.get(scheme.contrastLevel);\n // If a color is good enough, it is not adjusted.\n // Initial and adjusted tones for `nearer`\n if (Contrast.ratioOfTones(bgTone, nTone) < nContrast) {\n nTone = DynamicColor.foregroundTone(bgTone, nContrast);\n }\n // Initial and adjusted tones for `farther`\n if (Contrast.ratioOfTones(bgTone, fTone) < fContrast) {\n fTone = DynamicColor.foregroundTone(bgTone, fContrast);\n }\n if (decreasingContrast) {\n // If decreasing contrast, adjust color to the \"bare minimum\"\n // that satisfies contrast.\n nTone = DynamicColor.foregroundTone(bgTone, nContrast);\n fTone = DynamicColor.foregroundTone(bgTone, fContrast);\n }\n }\n }\n if ((fTone - nTone) * expansionDir < delta) {\n // 2nd round: expand farther to match delta, if contrast is not\n // satisfied.\n fTone = math.clampDouble(0, 100, nTone + delta * expansionDir);\n if ((fTone - nTone) * expansionDir >= delta) {\n // Good! Tones now satisfy the constraint; no change needed.\n }\n else {\n // 3rd round: contract nearer to match delta.\n nTone = math.clampDouble(0, 100, fTone - delta * expansionDir);\n }\n }\n // Avoids the 50-59 awkward zone.\n if (50 <= nTone && nTone < 60) {\n // If `nearer` is in the awkward zone, move it away, together with\n // `farther`.\n if (expansionDir > 0) {\n nTone = 60;\n fTone = Math.max(fTone, nTone + delta * expansionDir);\n }\n else {\n nTone = 49;\n fTone = Math.min(fTone, nTone + delta * expansionDir);\n }\n }\n else if (50 <= fTone && fTone < 60) {\n if (stayTogether) {\n // Fixes both, to avoid two colors on opposite sides of the \"awkward\n // zone\".\n if (expansionDir > 0) {\n nTone = 60;\n fTone = Math.max(fTone, nTone + delta * expansionDir);\n }\n else {\n nTone = 49;\n fTone = Math.min(fTone, nTone + delta * expansionDir);\n }\n }\n else {\n // Not required to stay together; fixes just one.\n if (expansionDir > 0) {\n fTone = 60;\n }\n else {\n fTone = 49;\n }\n }\n }\n // Returns `nTone` if this color is `nearer`, otherwise `fTone`.\n return amNearer ? nTone : fTone;\n }\n else {\n // Case 2: No contrast pair; just solve for itself.\n let answer = color.tone(scheme);\n if (color.background == undefined ||\n color.background(scheme) === undefined ||\n color.contrastCurve == undefined ||\n color.contrastCurve(scheme) === undefined) {\n return answer; // No adjustment for colors with no background.\n }\n const bgTone = color.background(scheme).getTone(scheme);\n const desiredRatio = color.contrastCurve(scheme).get(scheme.contrastLevel);\n if (Contrast.ratioOfTones(bgTone, answer) >= desiredRatio) {\n // Don't \"improve\" what's good enough.\n }\n else {\n // Rough improvement.\n answer = DynamicColor.foregroundTone(bgTone, desiredRatio);\n }\n if (decreasingContrast) {\n answer = DynamicColor.foregroundTone(bgTone, desiredRatio);\n }\n if (color.isBackground && 50 <= answer && answer < 60) {\n // Must adjust\n if (Contrast.ratioOfTones(49, bgTone) >= desiredRatio) {\n answer = 49;\n }\n else {\n answer = 60;\n }\n }\n if (color.secondBackground == undefined ||\n color.secondBackground(scheme) === undefined) {\n return answer;\n }\n // Case 3: Adjust for dual backgrounds.\n const [bg1, bg2] = [color.background, color.secondBackground];\n const [bgTone1, bgTone2] = [bg1(scheme).getTone(scheme), bg2(scheme).getTone(scheme)];\n const [upper, lower] = [Math.max(bgTone1, bgTone2), Math.min(bgTone1, bgTone2)];\n if (Contrast.ratioOfTones(upper, answer) >= desiredRatio &&\n Contrast.ratioOfTones(lower, answer) >= desiredRatio) {\n return answer;\n }\n // The darkest light tone that satisfies the desired ratio,\n // or -1 if such ratio cannot be reached.\n const lightOption = Contrast.lighter(upper, desiredRatio);\n // The lightest dark tone that satisfies the desired ratio,\n // or -1 if such ratio cannot be reached.\n const darkOption = Contrast.darker(lower, desiredRatio);\n // Tones suitable for the foreground.\n const availables = [];\n if (lightOption !== -1)\n availables.push(lightOption);\n if (darkOption !== -1)\n availables.push(darkOption);\n const prefersLight = DynamicColor.tonePrefersLightForeground(bgTone1) ||\n DynamicColor.tonePrefersLightForeground(bgTone2);\n if (prefersLight) {\n return (lightOption < 0) ? 100 : lightOption;\n }\n if (availables.length === 1) {\n return availables[0];\n }\n return (darkOption < 0) ? 0 : darkOption;\n }\n }\n}\n/**\n * A delegate for the color calculation of a DynamicScheme in the 2025 spec.\n */\nclass ColorCalculationDelegateImpl2025 {\n getHct(scheme, color) {\n const palette = color.palette(scheme);\n const tone = color.getTone(scheme);\n const hue = palette.hue;\n const chroma = palette.chroma *\n (color.chromaMultiplier ? color.chromaMultiplier(scheme) : 1);\n return Hct.from(hue, chroma, tone);\n }\n getTone(scheme, color) {\n const toneDeltaPair = color.toneDeltaPair ? color.toneDeltaPair(scheme) : undefined;\n // Case 0: tone delta constraint.\n if (toneDeltaPair) {\n const roleA = toneDeltaPair.roleA;\n const roleB = toneDeltaPair.roleB;\n const polarity = toneDeltaPair.polarity;\n const constraint = toneDeltaPair.constraint;\n const absoluteDelta = polarity === 'darker' ||\n (polarity === 'relative_lighter' && scheme.isDark) ||\n (polarity === 'relative_darker' && !scheme.isDark) ?\n -toneDeltaPair.delta :\n toneDeltaPair.delta;\n const amRoleA = color.name === roleA.name;\n const selfRole = amRoleA ? roleA : roleB;\n const refRole = amRoleA ? roleB : roleA;\n let selfTone = selfRole.tone(scheme);\n let refTone = refRole.getTone(scheme);\n const relativeDelta = absoluteDelta * (amRoleA ? 1 : -1);\n if (constraint === 'exact') {\n selfTone = math.clampDouble(0, 100, refTone + relativeDelta);\n }\n else if (constraint === 'nearer') {\n if (relativeDelta > 0) {\n selfTone = math.clampDouble(0, 100, math.clampDouble(refTone, refTone + relativeDelta, selfTone));\n }\n else {\n selfTone = math.clampDouble(0, 100, math.clampDouble(refTone + relativeDelta, refTone, selfTone));\n }\n }\n else if (constraint === 'farther') {\n if (relativeDelta > 0) {\n selfTone = math.clampDouble(refTone + relativeDelta, 100, selfTone);\n }\n else {\n selfTone = math.clampDouble(0, refTone + relativeDelta, selfTone);\n }\n }\n if (color.background && color.contrastCurve) {\n const background = color.background(scheme);\n const contrastCurve = color.contrastCurve(scheme);\n if (background && contrastCurve) {\n // Adjust the tones for contrast, if background and contrast curve\n // are defined.\n const bgTone = background.getTone(scheme);\n const selfContrast = contrastCurve.get(scheme.contrastLevel);\n selfTone = Contrast.ratioOfTones(bgTone, selfTone) >= selfContrast &&\n scheme.contrastLevel >= 0 ?\n selfTone :\n DynamicColor.foregroundTone(bgTone, selfContrast);\n }\n }\n // This can avoid the awkward tones for background colors including the\n // access fixed colors. Accent fixed dim colors should not be adjusted.\n if (color.isBackground && !color.name.endsWith('_fixed_dim')) {\n if (selfTone >= 57) {\n selfTone = math.clampDouble(65, 100, selfTone);\n }\n else {\n selfTone = math.clampDouble(0, 49, selfTone);\n }\n }\n return selfTone;\n }\n else {\n // Case 1: No tone delta pair; just solve for itself.\n let answer = color.tone(scheme);\n if (color.background == undefined ||\n color.background(scheme) === undefined ||\n color.contrastCurve == undefined ||\n color.contrastCurve(scheme) === undefined) {\n return answer; // No adjustment for colors with no background.\n }\n const bgTone = color.background(scheme).getTone(scheme);\n const desiredRatio = color.contrastCurve(scheme).get(scheme.contrastLevel);\n // Recalculate the tone from desired contrast ratio if the current\n // contrast ratio is not enough or desired contrast level is decreasing\n // (<0).\n answer = Contrast.ratioOfTones(bgTone, answer) >= desiredRatio &&\n scheme.contrastLevel >= 0 ?\n answer :\n DynamicColor.foregroundTone(bgTone, desiredRatio);\n // This can avoid the awkward tones for background colors including the\n // access fixed colors. Accent fixed dim colors should not be adjusted.\n if (color.isBackground && !color.name.endsWith('_fixed_dim')) {\n if (answer >= 57) {\n answer = math.clampDouble(65, 100, answer);\n }\n else {\n answer = math.clampDouble(0, 49, answer);\n }\n }\n if (color.secondBackground == undefined ||\n color.secondBackground(scheme) === undefined) {\n return answer;\n }\n // Case 2: Adjust for dual backgrounds.\n const [bg1, bg2] = [color.background, color.secondBackground];\n const [bgTone1, bgTone2] = [bg1(scheme).getTone(scheme), bg2(scheme).getTone(scheme)];\n const [upper, lower] = [Math.max(bgTone1, bgTone2), Math.min(bgTone1, bgTone2)];\n if (Contrast.ratioOfTones(upper, answer) >= desiredRatio &&\n Contrast.ratioOfTones(lower, answer) >= desiredRatio) {\n return answer;\n }\n // The darkest light tone that satisfies the desired ratio,\n // or -1 if such ratio cannot be reached.\n const lightOption = Contrast.lighter(upper, desiredRatio);\n // The lightest dark tone that satisfies the desired ratio,\n // or -1 if such ratio cannot be reached.\n const darkOption = Contrast.darker(lower, desiredRatio);\n // Tones suitable for the foreground.\n const availables = [];\n if (lightOption !== -1)\n availables.push(lightOption);\n if (darkOption !== -1)\n availables.push(darkOption);\n const prefersLight = DynamicColor.tonePrefersLightForeground(bgTone1) ||\n DynamicColor.tonePrefersLightForeground(bgTone2);\n if (prefersLight) {\n return (lightOption < 0) ? 100 : lightOption;\n }\n if (availables.length === 1) {\n return availables[0];\n }\n return (darkOption < 0) ? 0 : darkOption;\n }\n }\n}\nconst spec2021 = new ColorCalculationDelegateImpl2021();\nconst spec2025 = new ColorCalculationDelegateImpl2025();\n/**\n * Returns the ColorCalculationDelegate for the given spec version.\n */\nfunction getSpec(specVersion) {\n return specVersion === '2025' ? spec2025 : spec2021;\n}\n//# sourceMappingURL=dynamic_color.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct.js';\n/**\n * A convenience class for retrieving colors that are constant in hue and\n * chroma, but vary in tone.\n */\nexport class TonalPalette {\n /**\n * @param argb ARGB representation of a color\n * @return Tones matching that color's hue and chroma.\n */\n static fromInt(argb) {\n const hct = Hct.fromInt(argb);\n return TonalPalette.fromHct(hct);\n }\n /**\n * @param hct Hct\n * @return Tones matching that color's hue and chroma.\n */\n static fromHct(hct) {\n return new TonalPalette(hct.hue, hct.chroma, hct);\n }\n /**\n * @param hue HCT hue\n * @param chroma HCT chroma\n * @return Tones matching hue and chroma.\n */\n static fromHueAndChroma(hue, chroma) {\n const keyColor = new KeyColor(hue, chroma).create();\n return new TonalPalette(hue, chroma, keyColor);\n }\n constructor(hue, chroma, keyColor) {\n this.hue = hue;\n this.chroma = chroma;\n this.keyColor = keyColor;\n this.cache = new Map();\n }\n /**\n * @param tone HCT tone, measured from 0 to 100.\n * @return ARGB representation of a color with that tone.\n */\n tone(tone) {\n let argb = this.cache.get(tone);\n if (argb === undefined) {\n if (tone == 99 && Hct.isYellow(this.hue)) {\n argb = this.averageArgb(this.tone(98), this.tone(100));\n }\n else {\n argb = Hct.from(this.hue, this.chroma, tone).toInt();\n }\n this.cache.set(tone, argb);\n }\n return argb;\n }\n /**\n * @param tone HCT tone.\n * @return HCT representation of a color with that tone.\n */\n getHct(tone) {\n return Hct.fromInt(this.tone(tone));\n }\n averageArgb(argb1, argb2) {\n const red1 = (argb1 >>> 16) & 0xff;\n const green1 = (argb1 >>> 8) & 0xff;\n const blue1 = argb1 & 0xff;\n const red2 = (argb2 >>> 16) & 0xff;\n const green2 = (argb2 >>> 8) & 0xff;\n const blue2 = argb2 & 0xff;\n const red = Math.round((red1 + red2) / 2);\n const green = Math.round((green1 + green2) / 2);\n const blue = Math.round((blue1 + blue2) / 2);\n return (255 << 24 | (red & 255) << 16 | (green & 255) << 8 |\n (blue & 255)) >>>\n 0;\n }\n}\n/**\n * Key color is a color that represents the hue and chroma of a tonal palette\n */\nclass KeyColor {\n constructor(hue, requestedChroma) {\n this.hue = hue;\n this.requestedChroma = requestedChroma;\n // Cache that maps tone to max chroma to avoid duplicated HCT calculation.\n this.chromaCache = new Map();\n this.maxChromaValue = 200.0;\n }\n /**\n * Creates a key color from a [hue] and a [chroma].\n * The key color is the first tone, starting from T50, matching the given hue\n * and chroma.\n *\n * @return Key color [Hct]\n */\n create() {\n // Pivot around T50 because T50 has the most chroma available, on\n // average. Thus it is most likely to have a direct answer.\n const pivotTone = 50;\n const toneStepSize = 1;\n // Epsilon to accept values slightly higher than the requested chroma.\n const epsilon = 0.01;\n // Binary search to find the tone that can provide a chroma that is closest\n // to the requested chroma.\n let lowerTone = 0;\n let upperTone = 100;\n while (lowerTone < upperTone) {\n const midTone = Math.floor((lowerTone + upperTone) / 2);\n const isAscending = this.maxChroma(midTone) < this.maxChroma(midTone + toneStepSize);\n const sufficientChroma = this.maxChroma(midTone) >= this.requestedChroma - epsilon;\n if (sufficientChroma) {\n // Either range [lowerTone, midTone] or [midTone, upperTone] has\n // the answer, so search in the range that is closer the pivot tone.\n if (Math.abs(lowerTone - pivotTone) < Math.abs(upperTone - pivotTone)) {\n upperTone = midTone;\n }\n else {\n if (lowerTone === midTone) {\n return Hct.from(this.hue, this.requestedChroma, lowerTone);\n }\n lowerTone = midTone;\n }\n }\n else {\n // As there is no sufficient chroma in the midTone, follow the direction\n // to the chroma peak.\n if (isAscending) {\n lowerTone = midTone + toneStepSize;\n }\n else {\n // Keep midTone for potential chroma peak.\n upperTone = midTone;\n }\n }\n }\n return Hct.from(this.hue, this.requestedChroma, lowerTone);\n }\n // Find the maximum chroma for a given tone\n maxChroma(tone) {\n if (this.chromaCache.has(tone)) {\n return this.chromaCache.get(tone);\n }\n const chroma = Hct.from(this.hue, this.maxChromaValue, tone).chroma;\n this.chromaCache.set(tone, chroma);\n return chroma;\n }\n}\n//# sourceMappingURL=tonal_palette.js.map","/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This file is automatically generated. Do not modify it.\nimport { Hct } from '../hct/hct.js';\nimport * as colorUtils from '../utils/color_utils.js';\nimport * as mathUtils from '../utils/math_utils.js';\n/**\n * Design utilities using color temperature theory.\n *\n * Analogous colors, complementary color, and cache to efficiently, lazily,\n * generate data for calculations when needed.\n */\nexport class TemperatureCache {\n constructor(input) {\n this.input = input;\n this.hctsByTempCache = [];\n this.hctsByHueCache = [];\n this.tempsByHctCache = new Map();\n this.inputRelativeTemperatureCache = -1.0;\n this.complementCache = null;\n }\n get hctsByTemp() {\n if (this.hctsByTempCache.length > 0) {\n return this.hctsByTempCache;\n }\n const hcts = this.hctsByHue.concat([this.input]);\n const temperaturesByHct = this.tempsByHct;\n hcts.sort((a, b) => temperaturesByHct.get(a) - temperaturesByHct.get(b));\n this.hctsByTempCache = hcts;\n return hcts;\n }\n get warmest() {\n return this.hctsByTemp[this.hctsByTemp.length - 1];\n }\n get coldest() {\n return this.hctsByTemp[0];\n }\n /**\n * A set of colors with differing hues, equidistant in temperature.\n *\n * In art, this is usually described as a set of 5 colors on a color wheel\n * divided into 12 sections. This method allows provision of either of those\n * values.\n *\n * Behavior is undefined when [count] or [divisions] is 0.\n * When divisions < count, colors repeat.\n *\n * [count] The number of colors to return, includes the input color.\n * [divisions] The number of divisions on the color wheel.\n */\n analogous(count = 5, divisions = 12) {\n const startHue = Math.round(this.input.hue);\n const startHct = this.hctsByHue[startHue];\n let lastTemp = this.relativeTemperature(startHct);\n const allColors = [startHct];\n let absoluteTotalTempDelta = 0.0;\n for (let i = 0; i < 360; i++) {\n const hue = mathUtils.sanitizeDegreesInt(startHue + i);\n const hct = this.hctsByHue[hue];\n const temp = this.relativeTemperature(hct);\n const tempDelta = Math.abs(temp - lastTemp);\n lastTemp = temp;\n absoluteTotalTempDelta += tempDelta;\n }\n let hueAddend = 1;\n const tempStep = absoluteTotalTempDelta / divisions;\n let totalTempDelta = 0.0;\n lastTemp = this.relativeTemperature(startHct);\n while (allColors.length < divisions) {\n const hue = mathUtils.sanitizeDegreesInt(startHue + hueAddend);\n const hct = this.hctsByHue[hue];\n const temp = this.relativeTemperature(hct);\n const tempDelta = Math.abs(temp - lastTemp);\n totalTempDelta += tempDelta;\n const desiredTotalTempDeltaForIndex = allColors.length * tempStep;\n let indexSatisfied = totalTempDelta >= desiredTotalTempDeltaForIndex;\n let indexAddend = 1;\n // Keep adding this hue to the answers until its temperature is\n // insufficient. This ensures consistent behavior when there aren't\n // [divisions] discrete steps between 0 and 360 in hue with [tempStep]\n // delta in temperature between them.\n //\n // For example, white and black have no analogues: there are no other\n // colors at T100/T0. Therefore, they should just be added to the array\n // as answers.\n while (indexSatisfied && allColors.length < divisions) {\n allColors.push(hct);\n const desiredTotalTempDeltaForIndex = ((allColors.length + indexAddend) * tempStep);\n indexSatisfied = totalTempDelta >= desiredTotalTempDeltaForIndex;\n indexAddend++;\n }\n lastTemp = temp;\n hueAddend++;\n if (hueAddend > 360) {\n while (allColors.length < divisions) {\n allColors.push(hct);\n }\n break;\n }\n }\n const answers = [this.input];\n // First, generate analogues from rotating counter-clockwise.\n const increaseHueCount = Math.floor((count - 1) / 2.0);\n for (let i = 1; i < (increaseHueCount + 1); i++) {\n let index = 0 - i;\n while (index < 0) {\n index = allColors.length + index;\n }\n if (index >= allColors.length) {\n index = index % allColors.length;\n }\n answers.splice(0, 0, allColors[index]);\n }\n // Second, generate analogues from rotating clockwise.\n const decreaseHueCount = count - increaseHueCount - 1;\n for (let i = 1; i < (decreaseHueCount + 1); i++) {\n let index = i;\n while (index < 0) {\n index = allColors.length + index;\n }\n if (index >= allColors.length) {\n index = index % allColors.length;\n }\n answers.push(allColors[index]);\n }\n return answers;\n }\n /**\n * A color that complements the input color aesthetically.\n *\n * In art, this is usually described as being across the color wheel.\n * History of this shows intent as a color that is just as cool-warm as the\n * input color is warm-cool.\n */\n get complement() {\n if (this.complementCache != null) {\n return this.complementCache;\n }\n const coldestHue = this.coldest.hue;\n const coldestTemp = this.tempsByHct.get(this.coldest);\n const warmestHue = this.warmest.hue;\n const warmestTemp = this.tempsByHct.get(this.warmest);\n const range = warmestTemp - coldestTemp;\n const startHueIsColdestToWarmest = TemperatureCache.isBetween(this.input.hue, coldestHue, warmestHue);\n const startHue = startHueIsColdestToWarmest ? warmestHue : coldestHue;\n const endHue = startHueIsColdestToWarmest ? coldestHue : warmestHue;\n const directionOfRotation = 1.0;\n let smallestError = 1000.0;\n let answer = this.hctsByHue[Math.round(this.input.hue)];\n const complementRelativeTemp = 1.0 - this.inputRelativeTemperature;\n // Find the color in the other section, closest to the inverse percentile\n // of the input color. This is the complement.\n for (let hueAddend = 0.0; hueAddend <= 360.0; hueAddend += 1.0) {\n const hue = mathUtils.sanitizeDegreesDouble(startHue + directionOfRotation * hueAddend);\n if (!TemperatureCache.isBetween(hue, startHue, endHue)) {\n continue;\n }\n const possibleAnswer = this.hctsByHue[Math.round(hue)];\n const relativeTemp = (this.tempsByHct.get(possibleAnswer) - coldestTemp) / range;\n const error = Math.abs(complementRelativeTemp - relativeTemp);\n if (error < smallestError) {\n smallestError = error;\n answer = possibleAnswer;\n }\n }\n this.complementCache = answer;\n return this.complementCache;\n }\n /**\n * Temperature relative to all colors with the same chroma and tone.\n * Value on a scale from 0 to 1.\n */\n relativeTemperature(hct) {\n const range = this.tempsByHct.get(this.warmest) - this.tempsByHct.get(this.coldest);\n const differenceFromColdest = this.tempsByHct.get(hct) - this.tempsByHct.get(this.coldest);\n // Handle when there's no difference in temperature between warmest and\n // coldest: for example, at T100, only one color is available, white.\n if (range === 0.0) {\n return 0.5;\n }\n return differenceFromColdest / range;\n }\n /** Relative temperature of the input color. See [relativeTemperature]. */\n get inputRelativeTemperature() {\n if (this.inputRelativeTemperatureCache >= 0.0) {\n return this.inputRelativeTemperatureCache;\n }\n this.inputRelativeTemperatureCache = this.relativeTemperature(this.input);\n return this.inputRelativeTemperatureCache;\n }\n /** A Map with keys of HCTs in [hctsByTemp], values of raw temperature. */\n get tempsByHct() {\n if (this.tempsByHctCache.size > 0) {\n return this.tempsByHctCache;\n }\n const allHcts = this.hctsByHue.concat([this.input]);\n const temperaturesByHct = new Map();\n for (const e of allHcts) {\n temperaturesByHct.set(e, TemperatureCache.rawTemperature(e));\n }\n this.tempsByHctCache = temperaturesByHct;\n return temperaturesByHct;\n }\n /**\n * HCTs for all hues, with the same chroma/tone as the input.\n * Sorted ascending, hue 0 to 360.\n */\n get hctsByHue() {\n if (this.hctsByHueCache.length > 0) {\n return this.hctsByHueCache;\n }\n const hcts = [];\n for (let hue = 0.0; hue <= 360.0; hue += 1.0) {\n const colorAtHue = Hct.from(hue, this.input.chroma, this.input.tone);\n hcts.push(colorAtHue);\n }\n this.hctsByHueCache = hcts;\n return this.hctsByHueCache;\n }\n /** Determines if an angle is between two other angles, rotating clockwise. */\n static isBetween(angle, a, b) {\n if (a < b) {\n return a <= angle && angle <= b;\n }\n return a <= angle || angle <= b;\n }\n /**\n * Value representing cool-warm factor of a color.\n * Values below 0 are considered cool, above, warm.\n *\n * Color science has researched emotion and harmony, which art uses to select\n * colors. Warm-cool is the foundation of analogous and complementary colors.\n * See:\n * - Li-Chen Ou's Chapter 19 in Handbook of Color Psychology (2015).\n * - Josef Albers' Interaction of Color chapters 19 and 21.\n *\n * Implementation of Ou, Woodcock and Wright's algorithm, which uses\n * L*a*b* / LCH color space.\n * Return value has these properties:\n * - Values below 0 are cool, above 0 are warm.\n * - Lower bound: -0.52 - (chroma ^ 1.07 / 20). L*a*b* chroma is infinite.\n * Assuming max of 130 chroma, -9.66.\n * - Upper bound: -0.52 + (chroma ^ 1.07 / 20). L*a*b* chroma is infinite.\n * Assuming max of 130 chroma, 8.61.\n */\n static rawTemperature(color) {\n const lab = colorUtils.labFromArgb(color.toInt());\n const hue = mathUtils.sanitizeDegreesDouble(Math.atan2(lab[2], lab[1]) * 180.0 / Math.PI);\n const chroma = Math.sqrt((lab[1] * lab[1]) + (lab[2] * lab[2]));\n const temperature = -0.5 +\n 0.02 * Math.pow(chroma, 1.07) *\n Math.cos(mathUtils.sanitizeDegreesDouble(hue - 50.0) * Math.PI / 180.0);\n return temperature;\n }\n}\n//# sourceMappingURL=temperature_cache.js.map","/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as math from '../utils/math_utils.js';\n/**\n * A class containing a value that changes with the contrast level.\n *\n * Usually represents the contrast requirements for a dynamic color on its\n * background. The four values correspond to values for contrast levels -1.0,\n * 0.0, 0.5, and 1.0, respectively.\n */\nexport class ContrastCurve {\n /**\n * Creates a `ContrastCurve` object.\n *\n * @param low Value for contrast level -1.0\n * @param normal Value for contrast level 0.0\n * @param medium Value for contrast level 0.5\n * @param high Value for contrast level 1.0\n */\n constructor(low, normal, medium, high) {\n this.low = low;\n this.normal = normal;\n this.medium = medium;\n this.high = high;\n }\n /**\n * Returns the value at a given contrast level.\n *\n * @param contrastLevel The contrast level. 0.0 is the default (normal); -1.0\n * is the lowest; 1.0 is the highest.\n * @return The value. For contrast ratios, a number between 1.0 and 21.0.\n */\n get(contrastLevel) {\n if (contrastLevel <= -1.0) {\n return this.low;\n }\n else if (contrastLevel < 0.0) {\n return math.lerp(this.low, this.normal, (contrastLevel - (-1)) / 1);\n }\n else if (contrastLevel < 0.5) {\n return math.lerp(this.normal, this.medium, (contrastLevel - 0) / 0.5);\n }\n else if (contrastLevel < 1.0) {\n return math.lerp(this.medium, this.high, (contrastLevel - 0.5) / 0.5);\n }\n else {\n return this.high;\n }\n }\n}\n//# sourceMappingURL=contrast_curve.js.map","/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Documents a constraint between two DynamicColors, in which their tones must\n * have a certain distance from each other.\n *\n * Prefer a DynamicColor with a background, this is for special cases when\n * designers want tonal distance, literally contrast, between two colors that\n * don't have a background / foreground relationship or a contrast guarantee.\n */\nexport class ToneDeltaPair {\n /**\n * Documents a constraint in tone distance between two DynamicColors.\n *\n * The polarity is an adjective that describes \"A\", compared to \"B\".\n *\n * For instance, ToneDeltaPair(A, B, 15, 'darker', 'exact') states that\n * A's tone should be exactly 15 darker than B's.\n *\n * 'relative_darker' and 'relative_lighter' describes the tone adjustment\n * relative to the surface color trend (white in light mode; black in dark\n * mode). For instance, ToneDeltaPair(A, B, 10, 'relative_lighter',\n * 'farther') states that A should be at least 10 lighter than B in light\n * mode, and at least 10 darker than B in dark mode.\n *\n * @param roleA The first role in a pair.\n * @param roleB The second role in a pair.\n * @param delta Required difference between tones. Absolute value, negative\n * values have undefined behavior.\n * @param polarity The relative relation between tones of roleA and roleB,\n * as described above.\n * @param constraint How to fulfill the tone delta pair constraint.\n * @param stayTogether Whether these two roles should stay on the same side\n * of the \"awkward zone\" (T50-59). This is necessary for certain cases where\n * one role has two backgrounds.\n */\n constructor(roleA, roleB, delta, polarity, stayTogether, constraint) {\n this.roleA = roleA;\n this.roleB = roleB;\n this.delta = delta;\n this.polarity = polarity;\n this.stayTogether = stayTogether;\n this.constraint = constraint;\n this.constraint = constraint ?? 'exact';\n }\n}\n//# sourceMappingURL=tone_delta_pair.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Set of themes supported by Dynamic Color.\n * Instantiate the corresponding subclass, ex. SchemeTonalSpot, to create\n * colors corresponding to the theme.\n */\nexport var Variant;\n(function (Variant) {\n Variant[Variant[\"MONOCHROME\"] = 0] = \"MONOCHROME\";\n Variant[Variant[\"NEUTRAL\"] = 1] = \"NEUTRAL\";\n Variant[Variant[\"TONAL_SPOT\"] = 2] = \"TONAL_SPOT\";\n Variant[Variant[\"VIBRANT\"] = 3] = \"VIBRANT\";\n Variant[Variant[\"EXPRESSIVE\"] = 4] = \"EXPRESSIVE\";\n Variant[Variant[\"FIDELITY\"] = 5] = \"FIDELITY\";\n Variant[Variant[\"CONTENT\"] = 6] = \"CONTENT\";\n Variant[Variant[\"RAINBOW\"] = 7] = \"RAINBOW\";\n Variant[Variant[\"FRUIT_SALAD\"] = 8] = \"FRUIT_SALAD\";\n})(Variant || (Variant = {}));\n//# sourceMappingURL=variant.js.map","/**\n * @license\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DislikeAnalyzer } from '../dislike/dislike_analyzer.js';\nimport { Hct } from '../hct/hct.js';\nimport { ContrastCurve } from './contrast_curve.js';\nimport { DynamicColor } from './dynamic_color.js';\nimport { ToneDeltaPair } from './tone_delta_pair.js';\nimport { Variant } from './variant.js';\n/**\n * Returns true if the scheme is Fidelity or Content.\n */\nfunction isFidelity(scheme) {\n return scheme.variant === Variant.FIDELITY ||\n scheme.variant === Variant.CONTENT;\n}\n/**\n * Returns true if the scheme is Monochrome.\n */\nfunction isMonochrome(scheme) {\n return scheme.variant === Variant.MONOCHROME;\n}\n/**\n * Returns the desired chroma for a given tone at a specific hue.\n *\n * @param hue The given hue.\n * @param chroma The target chroma.\n * @param tone The tone to start with.\n * @param byDecreasingTone Whether to search for lower tones.\n */\nfunction findDesiredChromaByTone(hue, chroma, tone, byDecreasingTone) {\n let answer = tone;\n let closestToChroma = Hct.from(hue, chroma, tone);\n if (closestToChroma.chroma < chroma) {\n let chromaPeak = closestToChroma.chroma;\n while (closestToChroma.chroma < chroma) {\n answer += byDecreasingTone ? -1.0 : 1.0;\n const potentialSolution = Hct.from(hue, chroma, answer);\n if (chromaPeak > potentialSolution.chroma) {\n break;\n }\n if (Math.abs(potentialSolution.chroma - chroma) < 0.4) {\n break;\n }\n const potentialDelta = Math.abs(potentialSolution.chroma - chroma);\n const currentDelta = Math.abs(closestToChroma.chroma - chroma);\n if (potentialDelta < currentDelta) {\n closestToChroma = potentialSolution;\n }\n chromaPeak = Math.max(chromaPeak, potentialSolution.chroma);\n }\n }\n return answer;\n}\n/**\n * A delegate for the dynamic color spec of a DynamicScheme in the 2021 spec.\n */\nexport class ColorSpecDelegateImpl2021 {\n ////////////////////////////////////////////////////////////////\n // Main Palettes //\n ////////////////////////////////////////////////////////////////\n primaryPaletteKeyColor() {\n return DynamicColor.fromPalette({\n name: 'primary_palette_key_color',\n palette: (s) => s.primaryPalette,\n tone: (s) => s.primaryPalette.keyColor.tone,\n });\n }\n secondaryPaletteKeyColor() {\n return DynamicColor.fromPalette({\n name: 'secondary_palette_key_color',\n palette: (s) => s.secondaryPalette,\n tone: (s) => s.secondaryPalette.keyColor.tone,\n });\n }\n tertiaryPaletteKeyColor() {\n return DynamicColor.fromPalette({\n name: 'tertiary_palette_key_color',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => s.tertiaryPalette.keyColor.tone,\n });\n }\n neutralPaletteKeyColor() {\n return DynamicColor.fromPalette({\n name: 'neutral_palette_key_color',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.neutralPalette.keyColor.tone,\n });\n }\n neutralVariantPaletteKeyColor() {\n return DynamicColor.fromPalette({\n name: 'neutral_variant_palette_key_color',\n palette: (s) => s.neutralVariantPalette,\n tone: (s) => s.neutralVariantPalette.keyColor.tone,\n });\n }\n errorPaletteKeyColor() {\n return DynamicColor.fromPalette({\n name: 'error_palette_key_color',\n palette: (s) => s.errorPalette,\n tone: (s) => s.errorPalette.keyColor.tone,\n });\n }\n ////////////////////////////////////////////////////////////////\n // Surfaces [S] //\n ////////////////////////////////////////////////////////////////\n background() {\n return DynamicColor.fromPalette({\n name: 'background',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 6 : 98,\n isBackground: true,\n });\n }\n onBackground() {\n return DynamicColor.fromPalette({\n name: 'on_background',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 90 : 10,\n background: (s) => this.background(),\n contrastCurve: (s) => new ContrastCurve(3, 3, 4.5, 7),\n });\n }\n surface() {\n return DynamicColor.fromPalette({\n name: 'surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 6 : 98,\n isBackground: true,\n });\n }\n surfaceDim() {\n return DynamicColor.fromPalette({\n name: 'surface_dim',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 6 : new ContrastCurve(87, 87, 80, 75).get(s.contrastLevel),\n isBackground: true,\n });\n }\n surfaceBright() {\n return DynamicColor.fromPalette({\n name: 'surface_bright',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ?\n new ContrastCurve(24, 24, 29, 34).get(s.contrastLevel) :\n 98,\n isBackground: true,\n });\n }\n surfaceContainerLowest() {\n return DynamicColor.fromPalette({\n name: 'surface_container_lowest',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? new ContrastCurve(4, 4, 2, 0).get(s.contrastLevel) : 100,\n isBackground: true,\n });\n }\n surfaceContainerLow() {\n return DynamicColor.fromPalette({\n name: 'surface_container_low',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ?\n new ContrastCurve(10, 10, 11, 12).get(s.contrastLevel) :\n new ContrastCurve(96, 96, 96, 95).get(s.contrastLevel),\n isBackground: true,\n });\n }\n surfaceContainer() {\n return DynamicColor.fromPalette({\n name: 'surface_container',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ?\n new ContrastCurve(12, 12, 16, 20).get(s.contrastLevel) :\n new ContrastCurve(94, 94, 92, 90).get(s.contrastLevel),\n isBackground: true,\n });\n }\n surfaceContainerHigh() {\n return DynamicColor.fromPalette({\n name: 'surface_container_high',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ?\n new ContrastCurve(17, 17, 21, 25).get(s.contrastLevel) :\n new ContrastCurve(92, 92, 88, 85).get(s.contrastLevel),\n isBackground: true,\n });\n }\n surfaceContainerHighest() {\n return DynamicColor.fromPalette({\n name: 'surface_container_highest',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ?\n new ContrastCurve(22, 22, 26, 30).get(s.contrastLevel) :\n new ContrastCurve(90, 90, 84, 80).get(s.contrastLevel),\n isBackground: true,\n });\n }\n onSurface() {\n return DynamicColor.fromPalette({\n name: 'on_surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 90 : 10,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n surfaceVariant() {\n return DynamicColor.fromPalette({\n name: 'surface_variant',\n palette: (s) => s.neutralVariantPalette,\n tone: (s) => s.isDark ? 30 : 90,\n isBackground: true,\n });\n }\n onSurfaceVariant() {\n return DynamicColor.fromPalette({\n name: 'on_surface_variant',\n palette: (s) => s.neutralVariantPalette,\n tone: (s) => s.isDark ? 80 : 30,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11),\n });\n }\n inverseSurface() {\n return DynamicColor.fromPalette({\n name: 'inverse_surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 90 : 20,\n isBackground: true,\n });\n }\n inverseOnSurface() {\n return DynamicColor.fromPalette({\n name: 'inverse_on_surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 20 : 95,\n background: (s) => this.inverseSurface(),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n outline() {\n return DynamicColor.fromPalette({\n name: 'outline',\n palette: (s) => s.neutralVariantPalette,\n tone: (s) => s.isDark ? 60 : 50,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1.5, 3, 4.5, 7),\n });\n }\n outlineVariant() {\n return DynamicColor.fromPalette({\n name: 'outline_variant',\n palette: (s) => s.neutralVariantPalette,\n tone: (s) => s.isDark ? 30 : 80,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n });\n }\n shadow() {\n return DynamicColor.fromPalette({\n name: 'shadow',\n palette: (s) => s.neutralPalette,\n tone: (s) => 0,\n });\n }\n scrim() {\n return DynamicColor.fromPalette({\n name: 'scrim',\n palette: (s) => s.neutralPalette,\n tone: (s) => 0,\n });\n }\n surfaceTint() {\n return DynamicColor.fromPalette({\n name: 'surface_tint',\n palette: (s) => s.primaryPalette,\n tone: (s) => s.isDark ? 80 : 40,\n isBackground: true,\n });\n }\n ////////////////////////////////////////////////////////////////\n // Primary [P]. //\n ////////////////////////////////////////////////////////////////\n primary() {\n return DynamicColor.fromPalette({\n name: 'primary',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 100 : 0;\n }\n return s.isDark ? 80 : 40;\n },\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 7),\n toneDeltaPair: (s) => new ToneDeltaPair(this.primaryContainer(), this.primary(), 10, 'nearer', false),\n });\n }\n primaryDim() {\n return undefined;\n }\n onPrimary() {\n return DynamicColor.fromPalette({\n name: 'on_primary',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 10 : 90;\n }\n return s.isDark ? 20 : 100;\n },\n background: (s) => this.primary(),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n primaryContainer() {\n return DynamicColor.fromPalette({\n name: 'primary_container',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (isFidelity(s)) {\n return s.sourceColorHct.tone;\n }\n if (isMonochrome(s)) {\n return s.isDark ? 85 : 25;\n }\n return s.isDark ? 30 : 90;\n },\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.primaryContainer(), this.primary(), 10, 'nearer', false),\n });\n }\n onPrimaryContainer() {\n return DynamicColor.fromPalette({\n name: 'on_primary_container',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (isFidelity(s)) {\n return DynamicColor.foregroundTone(this.primaryContainer().tone(s), 4.5);\n }\n if (isMonochrome(s)) {\n return s.isDark ? 0 : 100;\n }\n return s.isDark ? 90 : 30;\n },\n background: (s) => this.primaryContainer(),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11),\n });\n }\n inversePrimary() {\n return DynamicColor.fromPalette({\n name: 'inverse_primary',\n palette: (s) => s.primaryPalette,\n tone: (s) => s.isDark ? 40 : 80,\n background: (s) => this.inverseSurface(),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 7),\n });\n }\n /////////////////////////////////////////////////////////////////\n // Secondary [Q]. //\n /////////////////////////////////////////////////////////////////\n secondary() {\n return DynamicColor.fromPalette({\n name: 'secondary',\n palette: (s) => s.secondaryPalette,\n tone: (s) => s.isDark ? 80 : 40,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 7),\n toneDeltaPair: (s) => new ToneDeltaPair(this.secondaryContainer(), this.secondary(), 10, 'nearer', false),\n });\n }\n secondaryDim() {\n return undefined;\n }\n onSecondary() {\n return DynamicColor.fromPalette({\n name: 'on_secondary',\n palette: (s) => s.secondaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 10 : 100;\n }\n else {\n return s.isDark ? 20 : 100;\n }\n },\n background: (s) => this.secondary(),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n secondaryContainer() {\n return DynamicColor.fromPalette({\n name: 'secondary_container',\n palette: (s) => s.secondaryPalette,\n tone: (s) => {\n const initialTone = s.isDark ? 30 : 90;\n if (isMonochrome(s)) {\n return s.isDark ? 30 : 85;\n }\n if (!isFidelity(s)) {\n return initialTone;\n }\n return findDesiredChromaByTone(s.secondaryPalette.hue, s.secondaryPalette.chroma, initialTone, s.isDark ? false : true);\n },\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.secondaryContainer(), this.secondary(), 10, 'nearer', false),\n });\n }\n onSecondaryContainer() {\n return DynamicColor.fromPalette({\n name: 'on_secondary_container',\n palette: (s) => s.secondaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 90 : 10;\n }\n if (!isFidelity(s)) {\n return s.isDark ? 90 : 30;\n }\n return DynamicColor.foregroundTone(this.secondaryContainer().tone(s), 4.5);\n },\n background: (s) => this.secondaryContainer(),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11),\n });\n }\n /////////////////////////////////////////////////////////////////\n // Tertiary [T]. //\n /////////////////////////////////////////////////////////////////\n tertiary() {\n return DynamicColor.fromPalette({\n name: 'tertiary',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 90 : 25;\n }\n return s.isDark ? 80 : 40;\n },\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 7),\n toneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryContainer(), this.tertiary(), 10, 'nearer', false),\n });\n }\n tertiaryDim() {\n return undefined;\n }\n onTertiary() {\n return DynamicColor.fromPalette({\n name: 'on_tertiary',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 10 : 90;\n }\n return s.isDark ? 20 : 100;\n },\n background: (s) => this.tertiary(),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n tertiaryContainer() {\n return DynamicColor.fromPalette({\n name: 'tertiary_container',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 60 : 49;\n }\n if (!isFidelity(s)) {\n return s.isDark ? 30 : 90;\n }\n const proposedHct = s.tertiaryPalette.getHct(s.sourceColorHct.tone);\n return DislikeAnalyzer.fixIfDisliked(proposedHct).tone;\n },\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryContainer(), this.tertiary(), 10, 'nearer', false),\n });\n }\n onTertiaryContainer() {\n return DynamicColor.fromPalette({\n name: 'on_tertiary_container',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 0 : 100;\n }\n if (!isFidelity(s)) {\n return s.isDark ? 90 : 30;\n }\n return DynamicColor.foregroundTone(this.tertiaryContainer().tone(s), 4.5);\n },\n background: (s) => this.tertiaryContainer(),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11),\n });\n }\n //////////////////////////////////////////////////////////////////\n // Error [E]. //\n //////////////////////////////////////////////////////////////////\n error() {\n return DynamicColor.fromPalette({\n name: 'error',\n palette: (s) => s.errorPalette,\n tone: (s) => s.isDark ? 80 : 40,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 7),\n toneDeltaPair: (s) => new ToneDeltaPair(this.errorContainer(), this.error(), 10, 'nearer', false),\n });\n }\n errorDim() {\n return undefined;\n }\n onError() {\n return DynamicColor.fromPalette({\n name: 'on_error',\n palette: (s) => s.errorPalette,\n tone: (s) => s.isDark ? 20 : 100,\n background: (s) => this.error(),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n errorContainer() {\n return DynamicColor.fromPalette({\n name: 'error_container',\n palette: (s) => s.errorPalette,\n tone: (s) => s.isDark ? 30 : 90,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.errorContainer(), this.error(), 10, 'nearer', false),\n });\n }\n onErrorContainer() {\n return DynamicColor.fromPalette({\n name: 'on_error_container',\n palette: (s) => s.errorPalette,\n tone: (s) => {\n if (isMonochrome(s)) {\n return s.isDark ? 90 : 10;\n }\n return s.isDark ? 90 : 30;\n },\n background: (s) => this.errorContainer(),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11),\n });\n }\n //////////////////////////////////////////////////////////////////\n // Primary Fixed [PF] //\n //////////////////////////////////////////////////////////////////\n primaryFixed() {\n return DynamicColor.fromPalette({\n name: 'primary_fixed',\n palette: (s) => s.primaryPalette,\n tone: (s) => isMonochrome(s) ? 40.0 : 90.0,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.primaryFixed(), this.primaryFixedDim(), 10, 'lighter', true),\n });\n }\n primaryFixedDim() {\n return DynamicColor.fromPalette({\n name: 'primary_fixed_dim',\n palette: (s) => s.primaryPalette,\n tone: (s) => isMonochrome(s) ? 30.0 : 80.0,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.primaryFixed(), this.primaryFixedDim(), 10, 'lighter', true),\n });\n }\n onPrimaryFixed() {\n return DynamicColor.fromPalette({\n name: 'on_primary_fixed',\n palette: (s) => s.primaryPalette,\n tone: (s) => isMonochrome(s) ? 100.0 : 10.0,\n background: (s) => this.primaryFixedDim(),\n secondBackground: (s) => this.primaryFixed(),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n onPrimaryFixedVariant() {\n return DynamicColor.fromPalette({\n name: 'on_primary_fixed_variant',\n palette: (s) => s.primaryPalette,\n tone: (s) => isMonochrome(s) ? 90.0 : 30.0,\n background: (s) => this.primaryFixedDim(),\n secondBackground: (s) => this.primaryFixed(),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11),\n });\n }\n ///////////////////////////////////////////////////////////////////\n // Secondary Fixed [QF] //\n ///////////////////////////////////////////////////////////////////\n secondaryFixed() {\n return DynamicColor.fromPalette({\n name: 'secondary_fixed',\n palette: (s) => s.secondaryPalette,\n tone: (s) => isMonochrome(s) ? 80.0 : 90.0,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.secondaryFixed(), this.secondaryFixedDim(), 10, 'lighter', true),\n });\n }\n secondaryFixedDim() {\n return DynamicColor.fromPalette({\n name: 'secondary_fixed_dim',\n palette: (s) => s.secondaryPalette,\n tone: (s) => isMonochrome(s) ? 70.0 : 80.0,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.secondaryFixed(), this.secondaryFixedDim(), 10, 'lighter', true),\n });\n }\n onSecondaryFixed() {\n return DynamicColor.fromPalette({\n name: 'on_secondary_fixed',\n palette: (s) => s.secondaryPalette,\n tone: (s) => 10.0,\n background: (s) => this.secondaryFixedDim(),\n secondBackground: (s) => this.secondaryFixed(),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n onSecondaryFixedVariant() {\n return DynamicColor.fromPalette({\n name: 'on_secondary_fixed_variant',\n palette: (s) => s.secondaryPalette,\n tone: (s) => isMonochrome(s) ? 25.0 : 30.0,\n background: (s) => this.secondaryFixedDim(),\n secondBackground: (s) => this.secondaryFixed(),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11),\n });\n }\n /////////////////////////////////////////////////////////////////\n // Tertiary Fixed [TF] //\n /////////////////////////////////////////////////////////////////\n tertiaryFixed() {\n return DynamicColor.fromPalette({\n name: 'tertiary_fixed',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => isMonochrome(s) ? 40.0 : 90.0,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryFixed(), this.tertiaryFixedDim(), 10, 'lighter', true),\n });\n }\n tertiaryFixedDim() {\n return DynamicColor.fromPalette({\n name: 'tertiary_fixed_dim',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => isMonochrome(s) ? 30.0 : 80.0,\n isBackground: true,\n background: (s) => this.highestSurface(s),\n contrastCurve: (s) => new ContrastCurve(1, 1, 3, 4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryFixed(), this.tertiaryFixedDim(), 10, 'lighter', true),\n });\n }\n onTertiaryFixed() {\n return DynamicColor.fromPalette({\n name: 'on_tertiary_fixed',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => isMonochrome(s) ? 100.0 : 10.0,\n background: (s) => this.tertiaryFixedDim(),\n secondBackground: (s) => this.tertiaryFixed(),\n contrastCurve: (s) => new ContrastCurve(4.5, 7, 11, 21),\n });\n }\n onTertiaryFixedVariant() {\n return DynamicColor.fromPalette({\n name: 'on_tertiary_fixed_variant',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => isMonochrome(s) ? 90.0 : 30.0,\n background: (s) => this.tertiaryFixedDim(),\n secondBackground: (s) => this.tertiaryFixed(),\n contrastCurve: (s) => new ContrastCurve(3, 4.5, 7, 11),\n });\n }\n ////////////////////////////////////////////////////////////////\n // Other //\n ////////////////////////////////////////////////////////////////\n highestSurface(s) {\n return s.isDark ? this.surfaceBright() : this.surfaceDim();\n }\n}\n//# sourceMappingURL=color_spec_2021.js.map","/**\n * @license\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct.js';\nimport * as math from '../utils/math_utils.js';\nimport { ColorSpecDelegateImpl2021 } from './color_spec_2021.js';\nimport { ContrastCurve } from './contrast_curve.js';\nimport { DynamicColor, extendSpecVersion } from './dynamic_color';\nimport { ToneDeltaPair } from './tone_delta_pair.js';\nimport { Variant } from './variant.js';\n/**\n * Returns the maximum tone for a given chroma in the palette.\n *\n * @param palette The tonal palette to use.\n * @param lowerBound The lower bound of the tone.\n * @param upperBound The upper bound of the tone.\n */\nfunction tMaxC(palette, lowerBound = 0, upperBound = 100, chromaMultiplier = 1) {\n let answer = findBestToneForChroma(palette.hue, palette.chroma * chromaMultiplier, 100, true);\n return math.clampDouble(lowerBound, upperBound, answer);\n}\n/**\n * Returns the minimum tone for a given chroma in the palette.\n *\n * @param palette The tonal palette to use.\n * @param lowerBound The lower bound of the tone.\n * @param upperBound The upper bound of the tone.\n */\nfunction tMinC(palette, lowerBound = 0, upperBound = 100) {\n let answer = findBestToneForChroma(palette.hue, palette.chroma, 0, false);\n return math.clampDouble(lowerBound, upperBound, answer);\n}\n/**\n * Searches for the best tone with a given chroma from a given tone at a\n * specific hue.\n *\n * @param hue The given hue.\n * @param chroma The target chroma.\n * @param tone The tone to start with.\n * @param byDecreasingTone Whether to search for lower tones.\n */\nfunction findBestToneForChroma(hue, chroma, tone, byDecreasingTone) {\n let answer = tone;\n let bestCandidate = Hct.from(hue, chroma, answer);\n while (bestCandidate.chroma < chroma) {\n if (tone < 0 || tone > 100) {\n break;\n }\n tone += byDecreasingTone ? -1.0 : 1.0;\n const newCandidate = Hct.from(hue, chroma, tone);\n if (bestCandidate.chroma < newCandidate.chroma) {\n bestCandidate = newCandidate;\n answer = tone;\n }\n }\n return answer;\n}\n/**\n * Returns the contrast curve for a given default contrast.\n *\n * @param defaultContrast The default contrast to use.\n */\nfunction getCurve(defaultContrast) {\n if (defaultContrast === 1.5) {\n return new ContrastCurve(1.5, 1.5, 3, 5.5);\n }\n else if (defaultContrast === 3) {\n return new ContrastCurve(3, 3, 4.5, 7);\n }\n else if (defaultContrast === 4.5) {\n return new ContrastCurve(4.5, 4.5, 7, 11);\n }\n else if (defaultContrast === 6) {\n return new ContrastCurve(6, 6, 7, 11);\n }\n else if (defaultContrast === 7) {\n return new ContrastCurve(7, 7, 11, 21);\n }\n else if (defaultContrast === 9) {\n return new ContrastCurve(9, 9, 11, 21);\n }\n else if (defaultContrast === 11) {\n return new ContrastCurve(11, 11, 21, 21);\n }\n else if (defaultContrast === 21) {\n return new ContrastCurve(21, 21, 21, 21);\n }\n else {\n // Shouldn't happen.\n return new ContrastCurve(defaultContrast, defaultContrast, 7, 21);\n }\n}\n/**\n * A delegate for the dynamic color spec of a DynamicScheme in the 2025 spec.\n */\nexport class ColorSpecDelegateImpl2025 extends ColorSpecDelegateImpl2021 {\n ////////////////////////////////////////////////////////////////\n // Surfaces [S] //\n ////////////////////////////////////////////////////////////////\n surface() {\n const color2025 = DynamicColor.fromPalette({\n name: 'surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => {\n super.surface().tone(s);\n if (s.platform === 'phone') {\n if (s.isDark) {\n return 4;\n }\n else {\n if (Hct.isYellow(s.neutralPalette.hue)) {\n return 99;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 97;\n }\n else {\n return 98;\n }\n }\n }\n else {\n return 0;\n }\n },\n isBackground: true,\n });\n return extendSpecVersion(super.surface(), '2025', color2025);\n }\n surfaceDim() {\n const color2025 = DynamicColor.fromPalette({\n name: 'surface_dim',\n palette: (s) => s.neutralPalette,\n tone: (s) => {\n if (s.isDark) {\n return 4;\n }\n else {\n if (Hct.isYellow(s.neutralPalette.hue)) {\n return 90;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 85;\n }\n else {\n return 87;\n }\n }\n },\n isBackground: true,\n chromaMultiplier: (s) => {\n if (!s.isDark) {\n if (s.variant === Variant.NEUTRAL) {\n return 2.5;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.7;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? 2.7 : 1.75;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 1.36;\n }\n }\n return 1;\n },\n });\n return extendSpecVersion(super.surfaceDim(), '2025', color2025);\n }\n surfaceBright() {\n const color2025 = DynamicColor.fromPalette({\n name: 'surface_bright',\n palette: (s) => s.neutralPalette,\n tone: (s) => {\n if (s.isDark) {\n return 18;\n }\n else {\n if (Hct.isYellow(s.neutralPalette.hue)) {\n return 99;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 97;\n }\n else {\n return 98;\n }\n }\n },\n isBackground: true,\n chromaMultiplier: (s) => {\n if (s.isDark) {\n if (s.variant === Variant.NEUTRAL) {\n return 2.5;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.7;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? 2.7 : 1.75;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 1.36;\n }\n }\n return 1;\n },\n });\n return extendSpecVersion(super.surfaceBright(), '2025', color2025);\n }\n surfaceContainerLowest() {\n const color2025 = DynamicColor.fromPalette({\n name: 'surface_container_lowest',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 0 : 100,\n isBackground: true,\n });\n return extendSpecVersion(super.surfaceContainerLowest(), '2025', color2025);\n }\n surfaceContainerLow() {\n const color2025 = DynamicColor.fromPalette({\n name: 'surface_container_low',\n palette: (s) => s.neutralPalette,\n tone: (s) => {\n if (s.platform === 'phone') {\n if (s.isDark) {\n return 6;\n }\n else {\n if (Hct.isYellow(s.neutralPalette.hue)) {\n return 98;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 95;\n }\n else {\n return 96;\n }\n }\n }\n else {\n return 15;\n }\n },\n isBackground: true,\n chromaMultiplier: (s) => {\n if (s.platform === 'phone') {\n if (s.variant === Variant.NEUTRAL) {\n return 1.3;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.25;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? 1.3 : 1.15;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 1.08;\n }\n }\n return 1;\n },\n });\n return extendSpecVersion(super.surfaceContainerLow(), '2025', color2025);\n }\n surfaceContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'surface_container',\n palette: (s) => s.neutralPalette,\n tone: (s) => {\n if (s.platform === 'phone') {\n if (s.isDark) {\n return 9;\n }\n else {\n if (Hct.isYellow(s.neutralPalette.hue)) {\n return 96;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 92;\n }\n else {\n return 94;\n }\n }\n }\n else {\n return 20;\n }\n },\n isBackground: true,\n chromaMultiplier: (s) => {\n if (s.platform === 'phone') {\n if (s.variant === Variant.NEUTRAL) {\n return 1.6;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.4;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? 1.6 : 1.3;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 1.15;\n }\n }\n return 1;\n },\n });\n return extendSpecVersion(super.surfaceContainer(), '2025', color2025);\n }\n surfaceContainerHigh() {\n const color2025 = DynamicColor.fromPalette({\n name: 'surface_container_high',\n palette: (s) => s.neutralPalette,\n tone: (s) => {\n if (s.platform === 'phone') {\n if (s.isDark) {\n return 12;\n }\n else {\n if (Hct.isYellow(s.neutralPalette.hue)) {\n return 94;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 90;\n }\n else {\n return 92;\n }\n }\n }\n else {\n return 25;\n }\n },\n isBackground: true,\n chromaMultiplier: (s) => {\n if (s.platform === 'phone') {\n if (s.variant === Variant.NEUTRAL) {\n return 1.9;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.5;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? 1.95 : 1.45;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 1.22;\n }\n }\n return 1;\n },\n });\n return extendSpecVersion(super.surfaceContainerHigh(), '2025', color2025);\n }\n surfaceContainerHighest() {\n const color2025 = DynamicColor.fromPalette({\n name: 'surface_container_highest',\n palette: (s) => s.neutralPalette,\n tone: (s) => {\n if (s.isDark) {\n return 15;\n }\n else {\n if (Hct.isYellow(s.neutralPalette.hue)) {\n return 92;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 88;\n }\n else {\n return 90;\n }\n }\n },\n isBackground: true,\n chromaMultiplier: (s) => {\n if (s.variant === Variant.NEUTRAL) {\n return 2.2;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.7;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? 2.3 : 1.6;\n }\n else if (s.variant === Variant.VIBRANT) {\n return 1.29;\n }\n else { // default\n return 1;\n }\n },\n });\n return extendSpecVersion(super.surfaceContainerHighest(), '2025', color2025);\n }\n onSurface() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => {\n if (s.variant === Variant.VIBRANT) {\n return tMaxC(s.neutralPalette, 0, 100, 1.1);\n }\n else {\n // For all other variants, the initial tone should be the default\n // tone, which is the same as the background color.\n return DynamicColor.getInitialToneFromBackground((s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh())(s);\n }\n },\n chromaMultiplier: (s) => {\n if (s.platform === 'phone') {\n if (s.variant === Variant.NEUTRAL) {\n return 2.2;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.7;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? (s.isDark ? 3.0 : 2.3) :\n 1.6;\n }\n }\n return 1;\n },\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh(),\n contrastCurve: (s) => s.isDark && s.platform === 'phone' ? getCurve(11) : getCurve(9),\n });\n return extendSpecVersion(super.onSurface(), '2025', color2025);\n }\n onSurfaceVariant() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_surface_variant',\n palette: (s) => s.neutralPalette,\n chromaMultiplier: (s) => {\n if (s.platform === 'phone') {\n if (s.variant === Variant.NEUTRAL) {\n return 2.2;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.7;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? (s.isDark ? 3.0 : 2.3) :\n 1.6;\n }\n }\n return 1;\n },\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh(),\n contrastCurve: (s) => s.platform === 'phone' ?\n (s.isDark ? getCurve(6) : getCurve(4.5)) :\n getCurve(7),\n });\n return extendSpecVersion(super.onSurfaceVariant(), '2025', color2025);\n }\n outline() {\n const color2025 = DynamicColor.fromPalette({\n name: 'outline',\n palette: (s) => s.neutralPalette,\n chromaMultiplier: (s) => {\n if (s.platform === 'phone') {\n if (s.variant === Variant.NEUTRAL) {\n return 2.2;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.7;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? (s.isDark ? 3.0 : 2.3) :\n 1.6;\n }\n }\n return 1;\n },\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(3) : getCurve(4.5),\n });\n return extendSpecVersion(super.outline(), '2025', color2025);\n }\n outlineVariant() {\n const color2025 = DynamicColor.fromPalette({\n name: 'outline_variant',\n palette: (s) => s.neutralPalette,\n chromaMultiplier: (s) => {\n if (s.platform === 'phone') {\n if (s.variant === Variant.NEUTRAL) {\n return 2.2;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return 1.7;\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return Hct.isYellow(s.neutralPalette.hue) ? (s.isDark ? 3.0 : 2.3) :\n 1.6;\n }\n }\n return 1;\n },\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(1.5) : getCurve(3),\n });\n return extendSpecVersion(super.outlineVariant(), '2025', color2025);\n }\n inverseSurface() {\n const color2025 = DynamicColor.fromPalette({\n name: 'inverse_surface',\n palette: (s) => s.neutralPalette,\n tone: (s) => s.isDark ? 98 : 4,\n isBackground: true,\n });\n return extendSpecVersion(super.inverseSurface(), '2025', color2025);\n }\n inverseOnSurface() {\n const color2025 = DynamicColor.fromPalette({\n name: 'inverse_on_surface',\n palette: (s) => s.neutralPalette,\n background: (s) => this.inverseSurface(),\n contrastCurve: (s) => getCurve(7),\n });\n return extendSpecVersion(super.inverseOnSurface(), '2025', color2025);\n }\n ////////////////////////////////////////////////////////////////\n // Primaries [P] //\n ////////////////////////////////////////////////////////////////\n primary() {\n const color2025 = DynamicColor.fromPalette({\n name: 'primary',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (s.variant === Variant.NEUTRAL) {\n if (s.platform === 'phone') {\n return s.isDark ? 80 : 40;\n }\n else {\n return 90;\n }\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n if (s.platform === 'phone') {\n if (s.isDark) {\n return 80;\n }\n else {\n return tMaxC(s.primaryPalette);\n }\n }\n else {\n return tMaxC(s.primaryPalette, 0, 90);\n }\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n if (s.platform === 'phone') {\n return tMaxC(s.primaryPalette, 0, Hct.isYellow(s.primaryPalette.hue) ? 25 :\n Hct.isCyan(s.primaryPalette.hue) ? 88 :\n 98);\n }\n else { // WATCH\n return tMaxC(s.primaryPalette);\n }\n }\n else { // VIBRANT\n if (s.platform === 'phone') {\n return tMaxC(s.primaryPalette, 0, Hct.isCyan(s.primaryPalette.hue) ? 88 : 98);\n }\n else { // WATCH\n return tMaxC(s.primaryPalette);\n }\n }\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(4.5) : getCurve(7),\n toneDeltaPair: (s) => s.platform === 'phone' ?\n new ToneDeltaPair(this.primaryContainer(), this.primary(), 5, 'relative_lighter', true, 'farther') :\n undefined,\n });\n return extendSpecVersion(super.primary(), '2025', color2025);\n }\n primaryDim() {\n return DynamicColor.fromPalette({\n name: 'primary_dim',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (s.variant === Variant.NEUTRAL) {\n return 85;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return tMaxC(s.primaryPalette, 0, 90);\n }\n else {\n return tMaxC(s.primaryPalette);\n }\n },\n isBackground: true,\n background: (s) => this.surfaceContainerHigh(),\n contrastCurve: (s) => getCurve(4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.primaryDim(), this.primary(), 5, 'darker', true, 'farther'),\n });\n }\n onPrimary() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_primary',\n palette: (s) => s.primaryPalette,\n background: (s) => s.platform === 'phone' ? this.primary() : this.primaryDim(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(6) : getCurve(7),\n });\n return extendSpecVersion(super.onPrimary(), '2025', color2025);\n }\n primaryContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'primary_container',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n if (s.platform === 'watch') {\n return 30;\n }\n else if (s.variant === Variant.NEUTRAL) {\n return s.isDark ? 30 : 90;\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return s.isDark ? tMinC(s.primaryPalette, 35, 93) :\n tMaxC(s.primaryPalette, 0, 90);\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return s.isDark ? tMaxC(s.primaryPalette, 30, 93) :\n tMaxC(s.primaryPalette, 78, Hct.isCyan(s.primaryPalette.hue) ? 88 : 90);\n }\n else { // VIBRANT\n return s.isDark ? tMinC(s.primaryPalette, 66, 93) :\n tMaxC(s.primaryPalette, 66, Hct.isCyan(s.primaryPalette.hue) ? 88 : 93);\n }\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) : undefined,\n toneDeltaPair: (s) => s.platform === 'phone' ?\n undefined :\n new ToneDeltaPair(this.primaryContainer(), this.primaryDim(), 10, 'darker', true, 'farther'),\n contrastCurve: (s) => s.platform === 'phone' && s.contrastLevel > 0 ?\n getCurve(1.5) :\n undefined,\n });\n return extendSpecVersion(super.primaryContainer(), '2025', color2025);\n }\n onPrimaryContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_primary_container',\n palette: (s) => s.primaryPalette,\n background: (s) => this.primaryContainer(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(6) : getCurve(7),\n });\n return extendSpecVersion(super.onPrimaryContainer(), '2025', color2025);\n }\n primaryFixed() {\n const color2025 = DynamicColor.fromPalette({\n name: 'primary_fixed',\n palette: (s) => s.primaryPalette,\n tone: (s) => {\n let tempS = Object.assign({}, s, { isDark: false, contrastLevel: 0 });\n return this.primaryContainer().getTone(tempS);\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) : undefined,\n contrastCurve: (s) => s.platform === 'phone' && s.contrastLevel > 0 ?\n getCurve(1.5) :\n undefined,\n });\n return extendSpecVersion(super.primaryFixed(), '2025', color2025);\n }\n primaryFixedDim() {\n const color2025 = DynamicColor.fromPalette({\n name: 'primary_fixed_dim',\n palette: (s) => s.primaryPalette,\n tone: (s) => this.primaryFixed().getTone(s),\n isBackground: true,\n toneDeltaPair: (s) => new ToneDeltaPair(this.primaryFixedDim(), this.primaryFixed(), 5, 'darker', true, 'exact'),\n });\n return extendSpecVersion(super.primaryFixedDim(), '2025', color2025);\n }\n onPrimaryFixed() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_primary_fixed',\n palette: (s) => s.primaryPalette,\n background: (s) => this.primaryFixedDim(),\n contrastCurve: (s) => getCurve(7),\n });\n return extendSpecVersion(super.onPrimaryFixed(), '2025', color2025);\n }\n onPrimaryFixedVariant() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_primary_fixed_variant',\n palette: (s) => s.primaryPalette,\n background: (s) => this.primaryFixedDim(),\n contrastCurve: (s) => getCurve(4.5),\n });\n return extendSpecVersion(super.onPrimaryFixedVariant(), '2025', color2025);\n }\n inversePrimary() {\n const color2025 = DynamicColor.fromPalette({\n name: 'inverse_primary',\n palette: (s) => s.primaryPalette,\n tone: (s) => tMaxC(s.primaryPalette),\n background: (s) => this.inverseSurface(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(6) : getCurve(7),\n });\n return extendSpecVersion(super.inversePrimary(), '2025', color2025);\n }\n ////////////////////////////////////////////////////////////////\n // Secondaries [Q] //\n ////////////////////////////////////////////////////////////////\n secondary() {\n const color2025 = DynamicColor.fromPalette({\n name: 'secondary',\n palette: (s) => s.secondaryPalette,\n tone: (s) => {\n if (s.platform === 'watch') {\n return s.variant === Variant.NEUTRAL ?\n 90 :\n tMaxC(s.secondaryPalette, 0, 90);\n }\n else if (s.variant === Variant.NEUTRAL) {\n return s.isDark ? tMinC(s.secondaryPalette, 0, 98) :\n tMaxC(s.secondaryPalette);\n }\n else if (s.variant === Variant.VIBRANT) {\n return tMaxC(s.secondaryPalette, 0, s.isDark ? 90 : 98);\n }\n else { // EXPRESSIVE and TONAL_SPOT\n return s.isDark ? 80 : tMaxC(s.secondaryPalette);\n }\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(4.5) : getCurve(7),\n toneDeltaPair: (s) => s.platform === 'phone' ?\n new ToneDeltaPair(this.secondaryContainer(), this.secondary(), 5, 'relative_lighter', true, 'farther') :\n undefined,\n });\n return extendSpecVersion(super.secondary(), '2025', color2025);\n }\n secondaryDim() {\n return DynamicColor.fromPalette({\n name: 'secondary_dim',\n palette: (s) => s.secondaryPalette,\n tone: (s) => {\n if (s.variant === Variant.NEUTRAL) {\n return 85;\n }\n else {\n return tMaxC(s.secondaryPalette, 0, 90);\n }\n },\n isBackground: true,\n background: (s) => this.surfaceContainerHigh(),\n contrastCurve: (s) => getCurve(4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.secondaryDim(), this.secondary(), 5, 'darker', true, 'farther'),\n });\n }\n onSecondary() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_secondary',\n palette: (s) => s.secondaryPalette,\n background: (s) => s.platform === 'phone' ? this.secondary() : this.secondaryDim(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(6) : getCurve(7),\n });\n return extendSpecVersion(super.onSecondary(), '2025', color2025);\n }\n secondaryContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'secondary_container',\n palette: (s) => s.secondaryPalette,\n tone: (s) => {\n if (s.platform === 'watch') {\n return 30;\n }\n else if (s.variant === Variant.VIBRANT) {\n return s.isDark ? tMinC(s.secondaryPalette, 30, 40) :\n tMaxC(s.secondaryPalette, 84, 90);\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return s.isDark ? 15 : tMaxC(s.secondaryPalette, 90, 95);\n }\n else {\n return s.isDark ? 25 : 90;\n }\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) : undefined,\n toneDeltaPair: (s) => s.platform === 'watch' ?\n new ToneDeltaPair(this.secondaryContainer(), this.secondaryDim(), 10, 'darker', true, 'farther') :\n undefined,\n contrastCurve: (s) => s.platform === 'phone' && s.contrastLevel > 0 ?\n getCurve(1.5) :\n undefined,\n });\n return extendSpecVersion(super.secondaryContainer(), '2025', color2025);\n }\n onSecondaryContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_secondary_container',\n palette: (s) => s.secondaryPalette,\n background: (s) => this.secondaryContainer(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(6) : getCurve(7),\n });\n return extendSpecVersion(super.onSecondaryContainer(), '2025', color2025);\n }\n secondaryFixed() {\n const color2025 = DynamicColor.fromPalette({\n name: 'secondary_fixed',\n palette: (s) => s.secondaryPalette,\n tone: (s) => {\n let tempS = Object.assign({}, s, { isDark: false, contrastLevel: 0 });\n return this.secondaryContainer().getTone(tempS);\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) : undefined,\n contrastCurve: (s) => s.platform === 'phone' && s.contrastLevel > 0 ?\n getCurve(1.5) :\n undefined,\n });\n return extendSpecVersion(super.secondaryFixed(), '2025', color2025);\n }\n secondaryFixedDim() {\n const color2025 = DynamicColor.fromPalette({\n name: 'secondary_fixed_dim',\n palette: (s) => s.secondaryPalette,\n tone: (s) => this.secondaryFixed().getTone(s),\n isBackground: true,\n toneDeltaPair: (s) => new ToneDeltaPair(this.secondaryFixedDim(), this.secondaryFixed(), 5, 'darker', true, 'exact'),\n });\n return extendSpecVersion(super.secondaryFixedDim(), '2025', color2025);\n }\n onSecondaryFixed() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_secondary_fixed',\n palette: (s) => s.secondaryPalette,\n background: (s) => this.secondaryFixedDim(),\n contrastCurve: (s) => getCurve(7),\n });\n return extendSpecVersion(super.onSecondaryFixed(), '2025', color2025);\n }\n onSecondaryFixedVariant() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_secondary_fixed_variant',\n palette: (s) => s.secondaryPalette,\n background: (s) => this.secondaryFixedDim(),\n contrastCurve: (s) => getCurve(4.5),\n });\n return extendSpecVersion(super.onSecondaryFixedVariant(), '2025', color2025);\n }\n ////////////////////////////////////////////////////////////////\n // Tertiaries [T] //\n ////////////////////////////////////////////////////////////////\n tertiary() {\n const color2025 = DynamicColor.fromPalette({\n name: 'tertiary',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (s.platform === 'watch') {\n return s.variant === Variant.TONAL_SPOT ?\n tMaxC(s.tertiaryPalette, 0, 90) :\n tMaxC(s.tertiaryPalette);\n }\n else if (s.variant === Variant.EXPRESSIVE || s.variant === Variant.VIBRANT) {\n return tMaxC(s.tertiaryPalette, 0, Hct.isCyan(s.tertiaryPalette.hue) ? 88 : (s.isDark ? 98 : 100));\n }\n else { // NEUTRAL and TONAL_SPOT\n return s.isDark ? tMaxC(s.tertiaryPalette, 0, 98) :\n tMaxC(s.tertiaryPalette);\n }\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(4.5) : getCurve(7),\n toneDeltaPair: (s) => s.platform === 'phone' ?\n new ToneDeltaPair(this.tertiaryContainer(), this.tertiary(), 5, 'relative_lighter', true, 'farther') :\n undefined,\n });\n return extendSpecVersion(super.tertiary(), '2025', color2025);\n }\n tertiaryDim() {\n return DynamicColor.fromPalette({\n name: 'tertiary_dim',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (s.variant === Variant.TONAL_SPOT) {\n return tMaxC(s.tertiaryPalette, 0, 90);\n }\n else {\n return tMaxC(s.tertiaryPalette);\n }\n },\n isBackground: true,\n background: (s) => this.surfaceContainerHigh(),\n contrastCurve: (s) => getCurve(4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryDim(), this.tertiary(), 5, 'darker', true, 'farther'),\n });\n }\n onTertiary() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_tertiary',\n palette: (s) => s.tertiaryPalette,\n background: (s) => s.platform === 'phone' ? this.tertiary() : this.tertiaryDim(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(6) : getCurve(7),\n });\n return extendSpecVersion(super.onTertiary(), '2025', color2025);\n }\n tertiaryContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'tertiary_container',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n if (s.platform === 'watch') {\n return s.variant === Variant.TONAL_SPOT ?\n tMaxC(s.tertiaryPalette, 0, 90) :\n tMaxC(s.tertiaryPalette);\n }\n else {\n if (s.variant === Variant.NEUTRAL) {\n return s.isDark ? tMaxC(s.tertiaryPalette, 0, 93) :\n tMaxC(s.tertiaryPalette, 0, 96);\n }\n else if (s.variant === Variant.TONAL_SPOT) {\n return tMaxC(s.tertiaryPalette, 0, s.isDark ? 93 : 100);\n }\n else if (s.variant === Variant.EXPRESSIVE) {\n return tMaxC(s.tertiaryPalette, 75, Hct.isCyan(s.tertiaryPalette.hue) ? 88 : (s.isDark ? 93 : 100));\n }\n else { // VIBRANT\n return s.isDark ? tMaxC(s.tertiaryPalette, 0, 93) :\n tMaxC(s.tertiaryPalette, 72, 100);\n }\n }\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) : undefined,\n toneDeltaPair: (s) => s.platform === 'watch' ?\n new ToneDeltaPair(this.tertiaryContainer(), this.tertiaryDim(), 10, 'darker', true, 'farther') :\n undefined,\n contrastCurve: (s) => s.platform === 'phone' && s.contrastLevel > 0 ?\n getCurve(1.5) :\n undefined,\n });\n return extendSpecVersion(super.tertiaryContainer(), '2025', color2025);\n }\n onTertiaryContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_tertiary_container',\n palette: (s) => s.tertiaryPalette,\n background: (s) => this.tertiaryContainer(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(6) : getCurve(7),\n });\n return extendSpecVersion(super.onTertiaryContainer(), '2025', color2025);\n }\n tertiaryFixed() {\n const color2025 = DynamicColor.fromPalette({\n name: 'tertiary_fixed',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => {\n let tempS = Object.assign({}, s, { isDark: false, contrastLevel: 0 });\n return this.tertiaryContainer().getTone(tempS);\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) : undefined,\n contrastCurve: (s) => s.platform === 'phone' && s.contrastLevel > 0 ?\n getCurve(1.5) :\n undefined,\n });\n return extendSpecVersion(super.tertiaryFixed(), '2025', color2025);\n }\n tertiaryFixedDim() {\n const color2025 = DynamicColor.fromPalette({\n name: 'tertiary_fixed_dim',\n palette: (s) => s.tertiaryPalette,\n tone: (s) => this.tertiaryFixed().getTone(s),\n isBackground: true,\n toneDeltaPair: (s) => new ToneDeltaPair(this.tertiaryFixedDim(), this.tertiaryFixed(), 5, 'darker', true, 'exact'),\n });\n return extendSpecVersion(super.tertiaryFixedDim(), '2025', color2025);\n }\n onTertiaryFixed() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_tertiary_fixed',\n palette: (s) => s.tertiaryPalette,\n background: (s) => this.tertiaryFixedDim(),\n contrastCurve: (s) => getCurve(7),\n });\n return extendSpecVersion(super.onTertiaryFixed(), '2025', color2025);\n }\n onTertiaryFixedVariant() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_tertiary_fixed_variant',\n palette: (s) => s.tertiaryPalette,\n background: (s) => this.tertiaryFixedDim(),\n contrastCurve: (s) => getCurve(4.5),\n });\n return extendSpecVersion(super.onTertiaryFixedVariant(), '2025', color2025);\n }\n ////////////////////////////////////////////////////////////////\n // Errors [E] //\n ////////////////////////////////////////////////////////////////\n error() {\n const color2025 = DynamicColor.fromPalette({\n name: 'error',\n palette: (s) => s.errorPalette,\n tone: (s) => {\n if (s.platform === 'phone') {\n return s.isDark ? tMinC(s.errorPalette, 0, 98) :\n tMaxC(s.errorPalette);\n }\n else {\n return tMinC(s.errorPalette);\n }\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) :\n this.surfaceContainerHigh(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(4.5) : getCurve(7),\n toneDeltaPair: (s) => s.platform === 'phone' ?\n new ToneDeltaPair(this.errorContainer(), this.error(), 5, 'relative_lighter', true, 'farther') :\n undefined,\n });\n return extendSpecVersion(super.error(), '2025', color2025);\n }\n errorDim() {\n return DynamicColor.fromPalette({\n name: 'error_dim',\n palette: (s) => s.errorPalette,\n tone: (s) => tMinC(s.errorPalette),\n isBackground: true,\n background: (s) => this.surfaceContainerHigh(),\n contrastCurve: (s) => getCurve(4.5),\n toneDeltaPair: (s) => new ToneDeltaPair(this.errorDim(), this.error(), 5, 'darker', true, 'farther'),\n });\n }\n onError() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_error',\n palette: (s) => s.errorPalette,\n background: (s) => s.platform === 'phone' ? this.error() : this.errorDim(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(6) : getCurve(7),\n });\n return extendSpecVersion(super.onError(), '2025', color2025);\n }\n errorContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'error_container',\n palette: (s) => s.errorPalette,\n tone: (s) => {\n if (s.platform === 'watch') {\n return 30;\n }\n else {\n return s.isDark ? tMinC(s.errorPalette, 30, 93) :\n tMaxC(s.errorPalette, 0, 90);\n }\n },\n isBackground: true,\n background: (s) => s.platform === 'phone' ? this.highestSurface(s) : undefined,\n toneDeltaPair: (s) => s.platform === 'watch' ?\n new ToneDeltaPair(this.errorContainer(), this.errorDim(), 10, 'darker', true, 'farther') :\n undefined,\n contrastCurve: (s) => s.platform === 'phone' && s.contrastLevel > 0 ?\n getCurve(1.5) :\n undefined,\n });\n return extendSpecVersion(super.errorContainer(), '2025', color2025);\n }\n onErrorContainer() {\n const color2025 = DynamicColor.fromPalette({\n name: 'on_error_container',\n palette: (s) => s.errorPalette,\n background: (s) => this.errorContainer(),\n contrastCurve: (s) => s.platform === 'phone' ? getCurve(4.5) : getCurve(7),\n });\n return extendSpecVersion(super.onErrorContainer(), '2025', color2025);\n }\n /////////////////////////////////////////////////////////////////\n // Remapped Colors //\n /////////////////////////////////////////////////////////////////\n surfaceVariant() {\n const color2025 = Object.assign(this.surfaceContainerHighest().clone(), { name: 'surface_variant' });\n return extendSpecVersion(super.surfaceVariant(), '2025', color2025);\n }\n surfaceTint() {\n const color2025 = Object.assign(this.primary().clone(), { name: 'surface_tint' });\n return extendSpecVersion(super.surfaceTint(), '2025', color2025);\n }\n background() {\n const color2025 = Object.assign(this.surface().clone(), { name: 'background' });\n return extendSpecVersion(super.background(), '2025', color2025);\n }\n onBackground() {\n const color2025 = Object.assign(this.onSurface().clone(), {\n name: 'on_background',\n tone: (s) => {\n return s.platform === 'watch' ? 100.0 : this.onSurface().getTone(s);\n }\n });\n return extendSpecVersion(super.onBackground(), '2025', color2025);\n }\n}\n//# sourceMappingURL=color_spec_2025.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ColorSpecDelegateImpl2025 } from './color_spec_2025.js';\n/**\n * DynamicColors for the colors in the Material Design system.\n */\n// Material Color Utilities namespaces the various utilities it provides.\n// tslint:disable-next-line:class-as-namespace\nexport class MaterialDynamicColors {\n constructor() {\n ////////////////////////////////////////////////////////////////\n // All Colors //\n ////////////////////////////////////////////////////////////////\n this.allColors = [\n this.background(),\n this.onBackground(),\n this.surface(),\n this.surfaceDim(),\n this.surfaceBright(),\n this.surfaceContainerLowest(),\n this.surfaceContainerLow(),\n this.surfaceContainer(),\n this.surfaceContainerHigh(),\n this.surfaceContainerHighest(),\n this.onSurface(),\n this.onSurfaceVariant(),\n this.outline(),\n this.outlineVariant(),\n this.inverseSurface(),\n this.inverseOnSurface(),\n this.primary(),\n this.primaryDim(),\n this.onPrimary(),\n this.primaryContainer(),\n this.onPrimaryContainer(),\n this.primaryFixed(),\n this.primaryFixedDim(),\n this.onPrimaryFixed(),\n this.onPrimaryFixedVariant(),\n this.inversePrimary(),\n this.secondary(),\n this.secondaryDim(),\n this.onSecondary(),\n this.secondaryContainer(),\n this.onSecondaryContainer(),\n this.secondaryFixed(),\n this.secondaryFixedDim(),\n this.onSecondaryFixed(),\n this.onSecondaryFixedVariant(),\n this.tertiary(),\n this.tertiaryDim(),\n this.onTertiary(),\n this.tertiaryContainer(),\n this.onTertiaryContainer(),\n this.tertiaryFixed(),\n this.tertiaryFixedDim(),\n this.onTertiaryFixed(),\n this.onTertiaryFixedVariant(),\n this.error(),\n this.errorDim(),\n this.onError(),\n this.errorContainer(),\n this.onErrorContainer(),\n ].filter((c) => c !== undefined);\n }\n highestSurface(s) {\n return MaterialDynamicColors.colorSpec.highestSurface(s);\n }\n ////////////////////////////////////////////////////////////////\n // Main Palettes //\n ////////////////////////////////////////////////////////////////\n primaryPaletteKeyColor() {\n return MaterialDynamicColors.colorSpec.primaryPaletteKeyColor();\n }\n secondaryPaletteKeyColor() {\n return MaterialDynamicColors.colorSpec.secondaryPaletteKeyColor();\n }\n tertiaryPaletteKeyColor() {\n return MaterialDynamicColors.colorSpec.tertiaryPaletteKeyColor();\n }\n neutralPaletteKeyColor() {\n return MaterialDynamicColors.colorSpec.neutralPaletteKeyColor();\n }\n neutralVariantPaletteKeyColor() {\n return MaterialDynamicColors.colorSpec.neutralVariantPaletteKeyColor();\n }\n errorPaletteKeyColor() {\n return MaterialDynamicColors.colorSpec.errorPaletteKeyColor();\n }\n ////////////////////////////////////////////////////////////////\n // Surfaces [S] //\n ////////////////////////////////////////////////////////////////\n background() {\n return MaterialDynamicColors.colorSpec.background();\n }\n onBackground() {\n return MaterialDynamicColors.colorSpec.onBackground();\n }\n surface() {\n return MaterialDynamicColors.colorSpec.surface();\n }\n surfaceDim() {\n return MaterialDynamicColors.colorSpec.surfaceDim();\n }\n surfaceBright() {\n return MaterialDynamicColors.colorSpec.surfaceBright();\n }\n surfaceContainerLowest() {\n return MaterialDynamicColors.colorSpec.surfaceContainerLowest();\n }\n surfaceContainerLow() {\n return MaterialDynamicColors.colorSpec.surfaceContainerLow();\n }\n surfaceContainer() {\n return MaterialDynamicColors.colorSpec.surfaceContainer();\n }\n surfaceContainerHigh() {\n return MaterialDynamicColors.colorSpec.surfaceContainerHigh();\n }\n surfaceContainerHighest() {\n return MaterialDynamicColors.colorSpec.surfaceContainerHighest();\n }\n onSurface() {\n return MaterialDynamicColors.colorSpec.onSurface();\n }\n surfaceVariant() {\n return MaterialDynamicColors.colorSpec.surfaceVariant();\n }\n onSurfaceVariant() {\n return MaterialDynamicColors.colorSpec.onSurfaceVariant();\n }\n outline() {\n return MaterialDynamicColors.colorSpec.outline();\n }\n outlineVariant() {\n return MaterialDynamicColors.colorSpec.outlineVariant();\n }\n inverseSurface() {\n return MaterialDynamicColors.colorSpec.inverseSurface();\n }\n inverseOnSurface() {\n return MaterialDynamicColors.colorSpec.inverseOnSurface();\n }\n shadow() {\n return MaterialDynamicColors.colorSpec.shadow();\n }\n scrim() {\n return MaterialDynamicColors.colorSpec.scrim();\n }\n surfaceTint() {\n return MaterialDynamicColors.colorSpec.surfaceTint();\n }\n ////////////////////////////////////////////////////////////////\n // Primaries [P] //\n ////////////////////////////////////////////////////////////////\n primary() {\n return MaterialDynamicColors.colorSpec.primary();\n }\n primaryDim() {\n return MaterialDynamicColors.colorSpec.primaryDim();\n }\n onPrimary() {\n return MaterialDynamicColors.colorSpec.onPrimary();\n }\n primaryContainer() {\n return MaterialDynamicColors.colorSpec.primaryContainer();\n }\n onPrimaryContainer() {\n return MaterialDynamicColors.colorSpec.onPrimaryContainer();\n }\n inversePrimary() {\n return MaterialDynamicColors.colorSpec.inversePrimary();\n }\n /////////////////////////////////////////////////////////////////\n // Primary Fixed [PF] //\n /////////////////////////////////////////////////////////////////\n primaryFixed() {\n return MaterialDynamicColors.colorSpec.primaryFixed();\n }\n primaryFixedDim() {\n return MaterialDynamicColors.colorSpec.primaryFixedDim();\n }\n onPrimaryFixed() {\n return MaterialDynamicColors.colorSpec.onPrimaryFixed();\n }\n onPrimaryFixedVariant() {\n return MaterialDynamicColors.colorSpec.onPrimaryFixedVariant();\n }\n ////////////////////////////////////////////////////////////////\n // Secondaries [Q] //\n ////////////////////////////////////////////////////////////////\n secondary() {\n return MaterialDynamicColors.colorSpec.secondary();\n }\n secondaryDim() {\n return MaterialDynamicColors.colorSpec.secondaryDim();\n }\n onSecondary() {\n return MaterialDynamicColors.colorSpec.onSecondary();\n }\n secondaryContainer() {\n return MaterialDynamicColors.colorSpec.secondaryContainer();\n }\n onSecondaryContainer() {\n return MaterialDynamicColors.colorSpec.onSecondaryContainer();\n }\n /////////////////////////////////////////////////////////////////\n // Secondary Fixed [QF] //\n /////////////////////////////////////////////////////////////////\n secondaryFixed() {\n return MaterialDynamicColors.colorSpec.secondaryFixed();\n }\n secondaryFixedDim() {\n return MaterialDynamicColors.colorSpec.secondaryFixedDim();\n }\n onSecondaryFixed() {\n return MaterialDynamicColors.colorSpec.onSecondaryFixed();\n }\n onSecondaryFixedVariant() {\n return MaterialDynamicColors.colorSpec.onSecondaryFixedVariant();\n }\n ////////////////////////////////////////////////////////////////\n // Tertiaries [T] //\n ////////////////////////////////////////////////////////////////\n tertiary() {\n return MaterialDynamicColors.colorSpec.tertiary();\n }\n tertiaryDim() {\n return MaterialDynamicColors.colorSpec.tertiaryDim();\n }\n onTertiary() {\n return MaterialDynamicColors.colorSpec.onTertiary();\n }\n tertiaryContainer() {\n return MaterialDynamicColors.colorSpec.tertiaryContainer();\n }\n onTertiaryContainer() {\n return MaterialDynamicColors.colorSpec.onTertiaryContainer();\n }\n /////////////////////////////////////////////////////////////////\n // Tertiary Fixed [TF] //\n /////////////////////////////////////////////////////////////////\n tertiaryFixed() {\n return MaterialDynamicColors.colorSpec.tertiaryFixed();\n }\n tertiaryFixedDim() {\n return MaterialDynamicColors.colorSpec.tertiaryFixedDim();\n }\n onTertiaryFixed() {\n return MaterialDynamicColors.colorSpec.onTertiaryFixed();\n }\n onTertiaryFixedVariant() {\n return MaterialDynamicColors.colorSpec.onTertiaryFixedVariant();\n }\n ////////////////////////////////////////////////////////////////\n // Errors [E] //\n ////////////////////////////////////////////////////////////////\n error() {\n return MaterialDynamicColors.colorSpec.error();\n }\n errorDim() {\n return MaterialDynamicColors.colorSpec.errorDim();\n }\n onError() {\n return MaterialDynamicColors.colorSpec.onError();\n }\n errorContainer() {\n return MaterialDynamicColors.colorSpec.errorContainer();\n }\n onErrorContainer() {\n return MaterialDynamicColors.colorSpec.onErrorContainer();\n }\n // Static variables are deprecated. Use the instance methods to get correct\n // specs based on request.\n /** @deprecated Use highestSurface() instead. */\n static highestSurface(s) {\n return MaterialDynamicColors.colorSpec.highestSurface(s);\n }\n}\nMaterialDynamicColors.contentAccentToneDelta = 15.0;\nMaterialDynamicColors.colorSpec = new ColorSpecDelegateImpl2025();\n/** @deprecated Use primaryPaletteKeyColor() instead. */\nMaterialDynamicColors.primaryPaletteKeyColor = MaterialDynamicColors.colorSpec.primaryPaletteKeyColor();\n/** @deprecated Use secondaryPaletteKeyColor() instead. */\nMaterialDynamicColors.secondaryPaletteKeyColor = MaterialDynamicColors.colorSpec.secondaryPaletteKeyColor();\n/** @deprecated Use tertiaryPaletteKeyColor() instead. */\nMaterialDynamicColors.tertiaryPaletteKeyColor = MaterialDynamicColors.colorSpec.tertiaryPaletteKeyColor();\n/** @deprecated Use neutralPaletteKeyColor() instead. */\nMaterialDynamicColors.neutralPaletteKeyColor = MaterialDynamicColors.colorSpec.neutralPaletteKeyColor();\n/** @deprecated Use neutralVariantPaletteKeyColor() instead. */\nMaterialDynamicColors.neutralVariantPaletteKeyColor = MaterialDynamicColors.colorSpec.neutralVariantPaletteKeyColor();\n/** @deprecated Use background() instead. */\nMaterialDynamicColors.background = MaterialDynamicColors.colorSpec.background();\n/** @deprecated Use background() instead. */\nMaterialDynamicColors.onBackground = MaterialDynamicColors.colorSpec.onBackground();\n/** @deprecated Use surface() instead. */\nMaterialDynamicColors.surface = MaterialDynamicColors.colorSpec.surface();\n/** @deprecated Use surfaceDim() instead. */\nMaterialDynamicColors.surfaceDim = MaterialDynamicColors.colorSpec.surfaceDim();\n/** @deprecated Use surfaceBright() instead. */\nMaterialDynamicColors.surfaceBright = MaterialDynamicColors.colorSpec.surfaceBright();\n/** @deprecated Use surfaceContainerLowest() instead. */\nMaterialDynamicColors.surfaceContainerLowest = MaterialDynamicColors.colorSpec.surfaceContainerLowest();\n/** @deprecated Use surfaceContainerLow() instead. */\nMaterialDynamicColors.surfaceContainerLow = MaterialDynamicColors.colorSpec.surfaceContainerLow();\n/** @deprecated Use surfaceContainer() instead. */\nMaterialDynamicColors.surfaceContainer = MaterialDynamicColors.colorSpec.surfaceContainer();\n/** @deprecated Use surfaceContainerHigh() instead. */\nMaterialDynamicColors.surfaceContainerHigh = MaterialDynamicColors.colorSpec.surfaceContainerHigh();\n/** @deprecated Use surfaceContainerHighest() instead. */\nMaterialDynamicColors.surfaceContainerHighest = MaterialDynamicColors.colorSpec.surfaceContainerHighest();\n/** @deprecated Use onSurface() instead. */\nMaterialDynamicColors.onSurface = MaterialDynamicColors.colorSpec.onSurface();\n/** @deprecated Use surfaceVariant() instead. */\nMaterialDynamicColors.surfaceVariant = MaterialDynamicColors.colorSpec.surfaceVariant();\n/** @deprecated Use onSurfaceVariant() instead. */\nMaterialDynamicColors.onSurfaceVariant = MaterialDynamicColors.colorSpec.onSurfaceVariant();\n/** @deprecated Use inverseSurface() instead. */\nMaterialDynamicColors.inverseSurface = MaterialDynamicColors.colorSpec.inverseSurface();\n/** @deprecated Use inverseOnSurface() instead. */\nMaterialDynamicColors.inverseOnSurface = MaterialDynamicColors.colorSpec.inverseOnSurface();\n/** @deprecated Use outline() instead. */\nMaterialDynamicColors.outline = MaterialDynamicColors.colorSpec.outline();\n/** @deprecated Use outlineVariant() instead. */\nMaterialDynamicColors.outlineVariant = MaterialDynamicColors.colorSpec.outlineVariant();\n/** @deprecated Use shadow() instead. */\nMaterialDynamicColors.shadow = MaterialDynamicColors.colorSpec.shadow();\n/** @deprecated Use scrim() instead. */\nMaterialDynamicColors.scrim = MaterialDynamicColors.colorSpec.scrim();\n/** @deprecated Use surfaceTint() instead. */\nMaterialDynamicColors.surfaceTint = MaterialDynamicColors.colorSpec.surfaceTint();\n/** @deprecated Use primary() instead. */\nMaterialDynamicColors.primary = MaterialDynamicColors.colorSpec.primary();\n/** @deprecated Use onPrimary() instead. */\nMaterialDynamicColors.onPrimary = MaterialDynamicColors.colorSpec.onPrimary();\n/** @deprecated Use primaryContainer() instead. */\nMaterialDynamicColors.primaryContainer = MaterialDynamicColors.colorSpec.primaryContainer();\n/** @deprecated Use onPrimaryContainer() instead. */\nMaterialDynamicColors.onPrimaryContainer = MaterialDynamicColors.colorSpec.onPrimaryContainer();\n/** @deprecated Use inversePrimary() instead. */\nMaterialDynamicColors.inversePrimary = MaterialDynamicColors.colorSpec.inversePrimary();\n/** @deprecated Use secondary() instead. */\nMaterialDynamicColors.secondary = MaterialDynamicColors.colorSpec.secondary();\n/** @deprecated Use onSecondary() instead. */\nMaterialDynamicColors.onSecondary = MaterialDynamicColors.colorSpec.onSecondary();\n/** @deprecated Use secondaryContainer() instead. */\nMaterialDynamicColors.secondaryContainer = MaterialDynamicColors.colorSpec.secondaryContainer();\n/** @deprecated Use onSecondaryContainer() instead. */\nMaterialDynamicColors.onSecondaryContainer = MaterialDynamicColors.colorSpec.onSecondaryContainer();\n/** @deprecated Use tertiary() instead. */\nMaterialDynamicColors.tertiary = MaterialDynamicColors.colorSpec.tertiary();\n/** @deprecated Use onTertiary() instead. */\nMaterialDynamicColors.onTertiary = MaterialDynamicColors.colorSpec.onTertiary();\n/** @deprecated Use tertiaryContainer() instead. */\nMaterialDynamicColors.tertiaryContainer = MaterialDynamicColors.colorSpec.tertiaryContainer();\n/** @deprecated Use onTertiaryContainer() instead. */\nMaterialDynamicColors.onTertiaryContainer = MaterialDynamicColors.colorSpec.onTertiaryContainer();\n/** @deprecated Use error() instead. */\nMaterialDynamicColors.error = MaterialDynamicColors.colorSpec.error();\n/** @deprecated Use onError() instead. */\nMaterialDynamicColors.onError = MaterialDynamicColors.colorSpec.onError();\n/** @deprecated Use errorContainer() instead. */\nMaterialDynamicColors.errorContainer = MaterialDynamicColors.colorSpec.errorContainer();\n/** @deprecated Use onErrorContainer() instead. */\nMaterialDynamicColors.onErrorContainer = MaterialDynamicColors.colorSpec.onErrorContainer();\n/** @deprecated Use primaryFixed() instead. */\nMaterialDynamicColors.primaryFixed = MaterialDynamicColors.colorSpec.primaryFixed();\n/** @deprecated Use primaryFixedDim() instead. */\nMaterialDynamicColors.primaryFixedDim = MaterialDynamicColors.colorSpec.primaryFixedDim();\n/** @deprecated Use onPrimaryFixed() instead. */\nMaterialDynamicColors.onPrimaryFixed = MaterialDynamicColors.colorSpec.onPrimaryFixed();\n/** @deprecated Use onPrimaryFixedVariant() instead. */\nMaterialDynamicColors.onPrimaryFixedVariant = MaterialDynamicColors.colorSpec.onPrimaryFixedVariant();\n/** @deprecated Use secondaryFixed() instead. */\nMaterialDynamicColors.secondaryFixed = MaterialDynamicColors.colorSpec.secondaryFixed();\n/** @deprecated Use secondaryFixedDim() instead. */\nMaterialDynamicColors.secondaryFixedDim = MaterialDynamicColors.colorSpec.secondaryFixedDim();\n/** @deprecated Use onSecondaryFixed() instead. */\nMaterialDynamicColors.onSecondaryFixed = MaterialDynamicColors.colorSpec.onSecondaryFixed();\n/** @deprecated Use onSecondaryFixedVariant() instead. */\nMaterialDynamicColors.onSecondaryFixedVariant = MaterialDynamicColors.colorSpec.onSecondaryFixedVariant();\n/** @deprecated Use tertiaryFixed() instead. */\nMaterialDynamicColors.tertiaryFixed = MaterialDynamicColors.colorSpec.tertiaryFixed();\n/** @deprecated Use tertiaryFixedDim() instead. */\nMaterialDynamicColors.tertiaryFixedDim = MaterialDynamicColors.colorSpec.tertiaryFixedDim();\n/** @deprecated Use onTertiaryFixed() instead. */\nMaterialDynamicColors.onTertiaryFixed = MaterialDynamicColors.colorSpec.onTertiaryFixed();\n/** @deprecated Use onTertiaryFixedVariant() instead. */\nMaterialDynamicColors.onTertiaryFixedVariant = MaterialDynamicColors.colorSpec.onTertiaryFixedVariant();\n//# sourceMappingURL=material_dynamic_colors.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DislikeAnalyzer } from '../dislike/dislike_analyzer.js';\nimport { Hct } from '../hct/hct.js';\nimport { TonalPalette } from '../palettes/tonal_palette.js';\nimport { TemperatureCache } from '../temperature/temperature_cache.js';\nimport * as math from '../utils/math_utils.js';\nimport { MaterialDynamicColors } from './material_dynamic_colors.js';\nimport { Variant } from './variant.js';\n/**\n * Constructed by a set of values representing the current UI state (such as\n * whether or not its dark theme, what the theme style is, etc.), and\n * provides a set of TonalPalettes that can create colors that fit in\n * with the theme style. Used by DynamicColor to resolve into a color.\n */\nexport class DynamicScheme {\n static maybeFallbackSpecVersion(specVersion, variant) {\n switch (variant) {\n case Variant.EXPRESSIVE:\n case Variant.VIBRANT:\n case Variant.TONAL_SPOT:\n case Variant.NEUTRAL:\n return specVersion;\n default:\n return '2021';\n }\n }\n constructor(args) {\n this.sourceColorArgb = args.sourceColorHct.toInt();\n this.variant = args.variant;\n this.contrastLevel = args.contrastLevel;\n this.isDark = args.isDark;\n this.platform = args.platform ?? 'phone';\n this.specVersion = DynamicScheme.maybeFallbackSpecVersion(args.specVersion ?? '2021', this.variant);\n this.sourceColorHct = args.sourceColorHct;\n this.primaryPalette = args.primaryPalette ??\n getSpec(this.specVersion)\n .getPrimaryPalette(this.variant, args.sourceColorHct, this.isDark, this.platform, this.contrastLevel);\n this.secondaryPalette = args.secondaryPalette ??\n getSpec(this.specVersion)\n .getSecondaryPalette(this.variant, args.sourceColorHct, this.isDark, this.platform, this.contrastLevel);\n this.tertiaryPalette = args.tertiaryPalette ??\n getSpec(this.specVersion)\n .getTertiaryPalette(this.variant, args.sourceColorHct, this.isDark, this.platform, this.contrastLevel);\n this.neutralPalette = args.neutralPalette ??\n getSpec(this.specVersion)\n .getNeutralPalette(this.variant, args.sourceColorHct, this.isDark, this.platform, this.contrastLevel);\n this.neutralVariantPalette = args.neutralVariantPalette ??\n getSpec(this.specVersion)\n .getNeutralVariantPalette(this.variant, args.sourceColorHct, this.isDark, this.platform, this.contrastLevel);\n this.errorPalette = args.errorPalette ??\n getSpec(this.specVersion)\n .getErrorPalette(this.variant, args.sourceColorHct, this.isDark, this.platform, this.contrastLevel) ??\n TonalPalette.fromHueAndChroma(25.0, 84.0);\n this.colors = new MaterialDynamicColors();\n }\n toString() {\n return `Scheme: ` +\n `variant=${Variant[this.variant]}, ` +\n `mode=${this.isDark ? 'dark' : 'light'}, ` +\n `platform=${this.platform}, ` +\n `contrastLevel=${this.contrastLevel.toFixed(1)}, ` +\n `seed=${this.sourceColorHct.toString()}, ` +\n `specVersion=${this.specVersion}`;\n }\n /**\n * Returns a new hue based on a piecewise function and input color hue.\n *\n * For example, for the following function:\n * result = 26 if 0 <= hue < 101\n * result = 39 if 101 <= hue < 210\n * result = 28 if 210 <= hue < 360\n *\n * call the function as:\n *\n * const hueBreakpoints = [0, 101, 210, 360];\n * const hues = [26, 39, 28];\n * const result = scheme.piecewise(hue, hueBreakpoints, hues);\n *\n * @param sourceColorHct The input value.\n * @param hueBreakpoints The breakpoints, in sorted order. No default lower or\n * upper bounds are assumed.\n * @param hues The hues that should be applied when source color's hue is >=\n * the same index in hueBrakpoints array, and < the hue at the next index\n * in hueBrakpoints array. Otherwise, the source color's hue is returned.\n */\n static getPiecewiseHue(sourceColorHct, hueBreakpoints, hues) {\n const size = Math.min(hueBreakpoints.length - 1, hues.length);\n const sourceHue = sourceColorHct.hue;\n for (let i = 0; i < size; i++) {\n if (sourceHue >= hueBreakpoints[i] && sourceHue < hueBreakpoints[i + 1]) {\n return math.sanitizeDegreesDouble(hues[i]);\n }\n }\n // No condition matched, return the source hue.\n return sourceHue;\n }\n /**\n * Returns a shifted hue based on a piecewise function and input color hue.\n *\n * For example, for the following function:\n * result = hue + 26 if 0 <= hue < 101\n * result = hue - 39 if 101 <= hue < 210\n * result = hue + 28 if 210 <= hue < 360\n *\n * call the function as:\n *\n * const hueBreakpoints = [0, 101, 210, 360];\n * const hues = [26, -39, 28];\n * const result = scheme.getRotatedHue(hue, hueBreakpoints, hues);\n *\n * @param sourceColorHct the source color of the theme, in HCT.\n * @param hueBreakpoints The \"breakpoints\", i.e. the hues at which a rotation\n * should be apply. No default lower or upper bounds are assumed.\n * @param rotations The rotation that should be applied when source color's\n * hue is >= the same index in hues array, and < the hue at the next\n * index in hues array. Otherwise, the source color's hue is returned.\n */\n static getRotatedHue(sourceColorHct, hueBreakpoints, rotations) {\n let rotation = DynamicScheme.getPiecewiseHue(sourceColorHct, hueBreakpoints, rotations);\n if (Math.min(hueBreakpoints.length - 1, rotations.length) <= 0) {\n // No condition matched, return the source hue.\n rotation = 0;\n }\n return math.sanitizeDegreesDouble(sourceColorHct.hue + rotation);\n }\n getArgb(dynamicColor) {\n return dynamicColor.getArgb(this);\n }\n getHct(dynamicColor) {\n return dynamicColor.getHct(this);\n }\n // Palette key colors\n get primaryPaletteKeyColor() {\n return this.getArgb(this.colors.primaryPaletteKeyColor());\n }\n get secondaryPaletteKeyColor() {\n return this.getArgb(this.colors.secondaryPaletteKeyColor());\n }\n get tertiaryPaletteKeyColor() {\n return this.getArgb(this.colors.tertiaryPaletteKeyColor());\n }\n get neutralPaletteKeyColor() {\n return this.getArgb(this.colors.neutralPaletteKeyColor());\n }\n get neutralVariantPaletteKeyColor() {\n return this.getArgb(this.colors.neutralVariantPaletteKeyColor());\n }\n get errorPaletteKeyColor() {\n return this.getArgb(this.colors.errorPaletteKeyColor());\n }\n // Surface colors\n get background() {\n return this.getArgb(this.colors.background());\n }\n get onBackground() {\n return this.getArgb(this.colors.onBackground());\n }\n get surface() {\n return this.getArgb(this.colors.surface());\n }\n get surfaceDim() {\n return this.getArgb(this.colors.surfaceDim());\n }\n get surfaceBright() {\n return this.getArgb(this.colors.surfaceBright());\n }\n get surfaceContainerLowest() {\n return this.getArgb(this.colors.surfaceContainerLowest());\n }\n get surfaceContainerLow() {\n return this.getArgb(this.colors.surfaceContainerLow());\n }\n get surfaceContainer() {\n return this.getArgb(this.colors.surfaceContainer());\n }\n get surfaceContainerHigh() {\n return this.getArgb(this.colors.surfaceContainerHigh());\n }\n get surfaceContainerHighest() {\n return this.getArgb(this.colors.surfaceContainerHighest());\n }\n get onSurface() {\n return this.getArgb(this.colors.onSurface());\n }\n get surfaceVariant() {\n return this.getArgb(this.colors.surfaceVariant());\n }\n get onSurfaceVariant() {\n return this.getArgb(this.colors.onSurfaceVariant());\n }\n get inverseSurface() {\n return this.getArgb(this.colors.inverseSurface());\n }\n get inverseOnSurface() {\n return this.getArgb(this.colors.inverseOnSurface());\n }\n get outline() {\n return this.getArgb(this.colors.outline());\n }\n get outlineVariant() {\n return this.getArgb(this.colors.outlineVariant());\n }\n get shadow() {\n return this.getArgb(this.colors.shadow());\n }\n get scrim() {\n return this.getArgb(this.colors.scrim());\n }\n get surfaceTint() {\n return this.getArgb(this.colors.surfaceTint());\n }\n // Primary colors\n get primary() {\n return this.getArgb(this.colors.primary());\n }\n get primaryDim() {\n const primaryDim = this.colors.primaryDim();\n if (primaryDim === undefined) {\n throw new Error('`primaryDim` color is undefined prior to 2025 spec.');\n }\n return this.getArgb(primaryDim);\n }\n get onPrimary() {\n return this.getArgb(this.colors.onPrimary());\n }\n get primaryContainer() {\n return this.getArgb(this.colors.primaryContainer());\n }\n get onPrimaryContainer() {\n return this.getArgb(this.colors.onPrimaryContainer());\n }\n get primaryFixed() {\n return this.getArgb(this.colors.primaryFixed());\n }\n get primaryFixedDim() {\n return this.getArgb(this.colors.primaryFixedDim());\n }\n get onPrimaryFixed() {\n return this.getArgb(this.colors.onPrimaryFixed());\n }\n get onPrimaryFixedVariant() {\n return this.getArgb(this.colors.onPrimaryFixedVariant());\n }\n get inversePrimary() {\n return this.getArgb(this.colors.inversePrimary());\n }\n // Secondary colors\n get secondary() {\n return this.getArgb(this.colors.secondary());\n }\n get secondaryDim() {\n const secondaryDim = this.colors.secondaryDim();\n if (secondaryDim === undefined) {\n throw new Error('`secondaryDim` color is undefined prior to 2025 spec.');\n }\n return this.getArgb(secondaryDim);\n }\n get onSecondary() {\n return this.getArgb(this.colors.onSecondary());\n }\n get secondaryContainer() {\n return this.getArgb(this.colors.secondaryContainer());\n }\n get onSecondaryContainer() {\n return this.getArgb(this.colors.onSecondaryContainer());\n }\n get secondaryFixed() {\n return this.getArgb(this.colors.secondaryFixed());\n }\n get secondaryFixedDim() {\n return this.getArgb(this.colors.secondaryFixedDim());\n }\n get onSecondaryFixed() {\n return this.getArgb(this.colors.onSecondaryFixed());\n }\n get onSecondaryFixedVariant() {\n return this.getArgb(this.colors.onSecondaryFixedVariant());\n }\n // Tertiary colors\n get tertiary() {\n return this.getArgb(this.colors.tertiary());\n }\n get tertiaryDim() {\n const tertiaryDim = this.colors.tertiaryDim();\n if (tertiaryDim === undefined) {\n throw new Error('`tertiaryDim` color is undefined prior to 2025 spec.');\n }\n return this.getArgb(tertiaryDim);\n }\n get onTertiary() {\n return this.getArgb(this.colors.onTertiary());\n }\n get tertiaryContainer() {\n return this.getArgb(this.colors.tertiaryContainer());\n }\n get onTertiaryContainer() {\n return this.getArgb(this.colors.onTertiaryContainer());\n }\n get tertiaryFixed() {\n return this.getArgb(this.colors.tertiaryFixed());\n }\n get tertiaryFixedDim() {\n return this.getArgb(this.colors.tertiaryFixedDim());\n }\n get onTertiaryFixed() {\n return this.getArgb(this.colors.onTertiaryFixed());\n }\n get onTertiaryFixedVariant() {\n return this.getArgb(this.colors.onTertiaryFixedVariant());\n }\n // Error colors\n get error() {\n return this.getArgb(this.colors.error());\n }\n get errorDim() {\n const errorDim = this.colors.errorDim();\n if (errorDim === undefined) {\n throw new Error('`errorDim` color is undefined prior to 2025 spec.');\n }\n return this.getArgb(errorDim);\n }\n get onError() {\n return this.getArgb(this.colors.onError());\n }\n get errorContainer() {\n return this.getArgb(this.colors.errorContainer());\n }\n get onErrorContainer() {\n return this.getArgb(this.colors.onErrorContainer());\n }\n}\nDynamicScheme.DEFAULT_SPEC_VERSION = '2021';\nDynamicScheme.DEFAULT_PLATFORM = 'phone';\n/**\n * A delegate for the palettes of a DynamicScheme in the 2021 spec.\n */\nclass DynamicSchemePalettesDelegateImpl2021 {\n //////////////////////////////////////////////////////////////////\n // Scheme Palettes //\n //////////////////////////////////////////////////////////////////\n getPrimaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.CONTENT:\n case Variant.FIDELITY:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, sourceColorHct.chroma);\n case Variant.FRUIT_SALAD:\n return TonalPalette.fromHueAndChroma(math.sanitizeDegreesDouble(sourceColorHct.hue - 50.0), 48.0);\n case Variant.MONOCHROME:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0.0);\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 12.0);\n case Variant.RAINBOW:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 48.0);\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 36.0);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(math.sanitizeDegreesDouble(sourceColorHct.hue + 240), 40);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 200.0);\n default:\n throw new Error(`Unsupported variant: ${variant}`);\n }\n }\n getSecondaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.CONTENT:\n case Variant.FIDELITY:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, Math.max(sourceColorHct.chroma - 32.0, sourceColorHct.chroma * 0.5));\n case Variant.FRUIT_SALAD:\n return TonalPalette.fromHueAndChroma(math.sanitizeDegreesDouble(sourceColorHct.hue - 50.0), 36.0);\n case Variant.MONOCHROME:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0.0);\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 8.0);\n case Variant.RAINBOW:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 16.0);\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 16.0);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 21, 51, 121, 151, 191, 271, 321, 360], [45, 95, 45, 20, 45, 90, 45, 45, 45]), 24.0);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 41, 61, 101, 131, 181, 251, 301, 360], [18, 15, 10, 12, 15, 18, 15, 12, 12]), 24.0);\n default:\n throw new Error(`Unsupported variant: ${variant}`);\n }\n }\n getTertiaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.CONTENT:\n return TonalPalette.fromHct(DislikeAnalyzer.fixIfDisliked(new TemperatureCache(sourceColorHct)\n .analogous(/* count= */ 3, /* divisions= */ 6)[2]));\n case Variant.FIDELITY:\n return TonalPalette.fromHct(DislikeAnalyzer.fixIfDisliked(new TemperatureCache(sourceColorHct).complement));\n case Variant.FRUIT_SALAD:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 36.0);\n case Variant.MONOCHROME:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0.0);\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 16.0);\n case Variant.RAINBOW:\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(math.sanitizeDegreesDouble(sourceColorHct.hue + 60.0), 24.0);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 21, 51, 121, 151, 191, 271, 321, 360], [120, 120, 20, 45, 20, 15, 20, 120, 120]), 32.0);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 41, 61, 101, 131, 181, 251, 301, 360], [35, 30, 20, 25, 30, 35, 30, 25, 25]), 32.0);\n default:\n throw new Error(`Unsupported variant: ${variant}`);\n }\n }\n getNeutralPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.CONTENT:\n case Variant.FIDELITY:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, sourceColorHct.chroma / 8.0);\n case Variant.FRUIT_SALAD:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 10.0);\n case Variant.MONOCHROME:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0.0);\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 2.0);\n case Variant.RAINBOW:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0.0);\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 6.0);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(math.sanitizeDegreesDouble(sourceColorHct.hue + 15), 8);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 10);\n default:\n throw new Error(`Unsupported variant: ${variant}`);\n }\n }\n getNeutralVariantPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.CONTENT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, (sourceColorHct.chroma / 8.0) + 4.0);\n case Variant.FIDELITY:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, (sourceColorHct.chroma / 8.0) + 4.0);\n case Variant.FRUIT_SALAD:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 16.0);\n case Variant.MONOCHROME:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0.0);\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 2.0);\n case Variant.RAINBOW:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 0.0);\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 8.0);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(math.sanitizeDegreesDouble(sourceColorHct.hue + 15), 12);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 12);\n default:\n throw new Error(`Unsupported variant: ${variant}`);\n }\n }\n getErrorPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n return undefined;\n }\n}\n/**\n * A delegate for the palettes of a DynamicScheme in the 2025 spec.\n */\nclass DynamicSchemePalettesDelegateImpl2025 extends DynamicSchemePalettesDelegateImpl2021 {\n //////////////////////////////////////////////////////////////////\n // Scheme Palettes //\n //////////////////////////////////////////////////////////////////\n getPrimaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === 'phone' ? (Hct.isBlue(sourceColorHct.hue) ? 12 : 8) :\n (Hct.isBlue(sourceColorHct.hue) ? 16 : 12));\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === 'phone' && isDark ? 26 : 32);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === 'phone' ? (isDark ? 36 : 48) : 40);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === 'phone' ? 74 : 56);\n default:\n return super.getPrimaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n }\n }\n getSecondaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === 'phone' ? (Hct.isBlue(sourceColorHct.hue) ? 6 : 4) :\n (Hct.isBlue(sourceColorHct.hue) ? 10 : 6));\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, 16);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 105, 140, 204, 253, 278, 300, 333, 360], [-160, 155, -100, 96, -96, -156, -165, -160]), platform === 'phone' ? (isDark ? 16 : 24) : 24);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 38, 105, 140, 333, 360], [-14, 10, -14, 10, -14]), platform === 'phone' ? 56 : 36);\n default:\n return super.getSecondaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n }\n }\n getTertiaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 38, 105, 161, 204, 278, 333, 360], [-32, 26, 10, -39, 24, -15, -32]), platform === 'phone' ? 20 : 36);\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 20, 71, 161, 333, 360], [-40, 48, -32, 40, -32]), platform === 'phone' ? 28 : 32);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 105, 140, 204, 253, 278, 300, 333, 360], [-165, 160, -105, 101, -101, -160, -170, -165]), 48);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(DynamicScheme.getRotatedHue(sourceColorHct, [0, 38, 71, 105, 140, 161, 253, 333, 360], [-72, 35, 24, -24, 62, 50, 62, -72]), 56);\n default:\n return super.getTertiaryPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n }\n }\n static getExpressiveNeutralHue(sourceColorHct) {\n const hue = DynamicScheme.getRotatedHue(sourceColorHct, [0, 71, 124, 253, 278, 300, 360], [10, 0, 10, 0, 10, 0]);\n return hue;\n }\n static getExpressiveNeutralChroma(sourceColorHct, isDark, platform) {\n const neutralHue = DynamicSchemePalettesDelegateImpl2025.getExpressiveNeutralHue(sourceColorHct);\n return platform === 'phone' ?\n (isDark ? (Hct.isYellow(neutralHue) ? 6 : 14) : 18) :\n 12;\n }\n static getVibrantNeutralHue(sourceColorHct) {\n return DynamicScheme.getRotatedHue(sourceColorHct, [0, 38, 105, 140, 333, 360], [-14, 10, -14, 10, -14]);\n }\n static getVibrantNeutralChroma(sourceColorHct, platform) {\n const neutralHue = DynamicSchemePalettesDelegateImpl2025.getVibrantNeutralHue(sourceColorHct);\n return platform === 'phone' ? 28 : (Hct.isBlue(neutralHue) ? 28 : 20);\n }\n getNeutralPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === 'phone' ? 1.4 : 6);\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, platform === 'phone' ? 5 : 10);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(DynamicSchemePalettesDelegateImpl2025.getExpressiveNeutralHue(sourceColorHct), DynamicSchemePalettesDelegateImpl2025.getExpressiveNeutralChroma(sourceColorHct, isDark, platform));\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(DynamicSchemePalettesDelegateImpl2025.getVibrantNeutralHue(sourceColorHct), DynamicSchemePalettesDelegateImpl2025.getVibrantNeutralChroma(sourceColorHct, platform));\n default:\n return super.getNeutralPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n }\n }\n getNeutralVariantPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n switch (variant) {\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, (platform === 'phone' ? 1.4 : 6) * 2.2);\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(sourceColorHct.hue, (platform === 'phone' ? 5 : 10) * 1.7);\n case Variant.EXPRESSIVE:\n const expressiveNeutralHue = DynamicSchemePalettesDelegateImpl2025.getExpressiveNeutralHue(sourceColorHct);\n const expressiveNeutralChroma = DynamicSchemePalettesDelegateImpl2025.getExpressiveNeutralChroma(sourceColorHct, isDark, platform);\n return TonalPalette.fromHueAndChroma(expressiveNeutralHue, expressiveNeutralChroma *\n (expressiveNeutralHue >= 105 && expressiveNeutralHue < 125 ?\n 1.6 :\n 2.3));\n case Variant.VIBRANT:\n const vibrantNeutralHue = DynamicSchemePalettesDelegateImpl2025.getVibrantNeutralHue(sourceColorHct);\n const vibrantNeutralChroma = DynamicSchemePalettesDelegateImpl2025.getVibrantNeutralChroma(sourceColorHct, platform);\n return TonalPalette.fromHueAndChroma(vibrantNeutralHue, vibrantNeutralChroma * 1.29);\n default:\n return super.getNeutralVariantPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n }\n }\n getErrorPalette(variant, sourceColorHct, isDark, platform, contrastLevel) {\n const errorHue = DynamicScheme.getPiecewiseHue(sourceColorHct, [0, 3, 13, 23, 33, 43, 153, 273, 360], [12, 22, 32, 12, 22, 32, 22, 12]);\n switch (variant) {\n case Variant.NEUTRAL:\n return TonalPalette.fromHueAndChroma(errorHue, platform === 'phone' ? 50 : 40);\n case Variant.TONAL_SPOT:\n return TonalPalette.fromHueAndChroma(errorHue, platform === 'phone' ? 60 : 48);\n case Variant.EXPRESSIVE:\n return TonalPalette.fromHueAndChroma(errorHue, platform === 'phone' ? 64 : 48);\n case Variant.VIBRANT:\n return TonalPalette.fromHueAndChroma(errorHue, platform === 'phone' ? 80 : 60);\n default:\n return super.getErrorPalette(variant, sourceColorHct, isDark, platform, contrastLevel);\n }\n }\n}\nconst spec2021 = new DynamicSchemePalettesDelegateImpl2021();\nconst spec2025 = new DynamicSchemePalettesDelegateImpl2025();\n/**\n * Returns the DynamicSchemePalettesDelegate for the given spec version.\n */\nfunction getSpec(specVersion) {\n return specVersion === '2025' ? spec2025 : spec2021;\n}\n//# sourceMappingURL=dynamic_scheme.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct.js';\nimport { TonalPalette } from './tonal_palette.js';\n/**\n * An intermediate concept between the key color for a UI theme, and a full\n * color scheme. 5 sets of tones are generated, all except one use the same hue\n * as the key color, and all vary in chroma.\n *\n * @deprecated Use {@link DynamicScheme} for color scheme generation.\n * Use {@link CorePalettes} for core palettes container class.\n */\nexport class CorePalette {\n /**\n * @param argb ARGB representation of a color\n *\n * @deprecated Use {@link DynamicScheme} for color scheme generation.\n * Use {@link CorePalettes} for core palettes container class.\n */\n static of(argb) {\n return new CorePalette(argb, false);\n }\n /**\n * @param argb ARGB representation of a color\n *\n * @deprecated Use {@link DynamicScheme} for color scheme generation.\n * Use {@link CorePalettes} for core palettes container class.\n */\n static contentOf(argb) {\n return new CorePalette(argb, true);\n }\n /**\n * Create a [CorePalette] from a set of colors\n *\n * @deprecated Use {@link DynamicScheme} for color scheme generation.\n * Use {@link CorePalettes} for core palettes container class.\n */\n static fromColors(colors) {\n return CorePalette.createPaletteFromColors(false, colors);\n }\n /**\n * Create a content [CorePalette] from a set of colors\n *\n * @deprecated Use {@link DynamicScheme} for color scheme generation.\n * Use {@link CorePalettes} for core palettes container class.\n */\n static contentFromColors(colors) {\n return CorePalette.createPaletteFromColors(true, colors);\n }\n static createPaletteFromColors(content, colors) {\n const palette = new CorePalette(colors.primary, content);\n if (colors.secondary) {\n const p = new CorePalette(colors.secondary, content);\n palette.a2 = p.a1;\n }\n if (colors.tertiary) {\n const p = new CorePalette(colors.tertiary, content);\n palette.a3 = p.a1;\n }\n if (colors.error) {\n const p = new CorePalette(colors.error, content);\n palette.error = p.a1;\n }\n if (colors.neutral) {\n const p = new CorePalette(colors.neutral, content);\n palette.n1 = p.n1;\n }\n if (colors.neutralVariant) {\n const p = new CorePalette(colors.neutralVariant, content);\n palette.n2 = p.n2;\n }\n return palette;\n }\n constructor(argb, isContent) {\n const hct = Hct.fromInt(argb);\n const hue = hct.hue;\n const chroma = hct.chroma;\n if (isContent) {\n this.a1 = TonalPalette.fromHueAndChroma(hue, chroma);\n this.a2 = TonalPalette.fromHueAndChroma(hue, chroma / 3);\n this.a3 = TonalPalette.fromHueAndChroma(hue + 60, chroma / 2);\n this.n1 = TonalPalette.fromHueAndChroma(hue, Math.min(chroma / 12, 4));\n this.n2 = TonalPalette.fromHueAndChroma(hue, Math.min(chroma / 6, 8));\n }\n else {\n this.a1 = TonalPalette.fromHueAndChroma(hue, Math.max(48, chroma));\n this.a2 = TonalPalette.fromHueAndChroma(hue, 16);\n this.a3 = TonalPalette.fromHueAndChroma(hue + 60, 24);\n this.n1 = TonalPalette.fromHueAndChroma(hue, 4);\n this.n2 = TonalPalette.fromHueAndChroma(hue, 8);\n }\n this.error = TonalPalette.fromHueAndChroma(25, 84);\n }\n}\n//# sourceMappingURL=core_palette.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This file is automatically generated. Do not modify it.\nimport { CorePalette } from '../palettes/core_palette.js';\n/**\n * DEPRECATED. The `Scheme` class is deprecated in favor of `DynamicScheme`.\n * Please see\n * https://github.com/material-foundation/material-color-utilities/blob/main/make_schemes.md\n * for migration guidance.\n *\n * Represents a Material color scheme, a mapping of color roles to colors.\n */\nexport class Scheme {\n get primary() {\n return this.props.primary;\n }\n get onPrimary() {\n return this.props.onPrimary;\n }\n get primaryContainer() {\n return this.props.primaryContainer;\n }\n get onPrimaryContainer() {\n return this.props.onPrimaryContainer;\n }\n get secondary() {\n return this.props.secondary;\n }\n get onSecondary() {\n return this.props.onSecondary;\n }\n get secondaryContainer() {\n return this.props.secondaryContainer;\n }\n get onSecondaryContainer() {\n return this.props.onSecondaryContainer;\n }\n get tertiary() {\n return this.props.tertiary;\n }\n get onTertiary() {\n return this.props.onTertiary;\n }\n get tertiaryContainer() {\n return this.props.tertiaryContainer;\n }\n get onTertiaryContainer() {\n return this.props.onTertiaryContainer;\n }\n get error() {\n return this.props.error;\n }\n get onError() {\n return this.props.onError;\n }\n get errorContainer() {\n return this.props.errorContainer;\n }\n get onErrorContainer() {\n return this.props.onErrorContainer;\n }\n get background() {\n return this.props.background;\n }\n get onBackground() {\n return this.props.onBackground;\n }\n get surface() {\n return this.props.surface;\n }\n get onSurface() {\n return this.props.onSurface;\n }\n get surfaceVariant() {\n return this.props.surfaceVariant;\n }\n get onSurfaceVariant() {\n return this.props.onSurfaceVariant;\n }\n get outline() {\n return this.props.outline;\n }\n get outlineVariant() {\n return this.props.outlineVariant;\n }\n get shadow() {\n return this.props.shadow;\n }\n get scrim() {\n return this.props.scrim;\n }\n get inverseSurface() {\n return this.props.inverseSurface;\n }\n get inverseOnSurface() {\n return this.props.inverseOnSurface;\n }\n get inversePrimary() {\n return this.props.inversePrimary;\n }\n /**\n * @param argb ARGB representation of a color.\n * @return Light Material color scheme, based on the color's hue.\n */\n static light(argb) {\n return Scheme.lightFromCorePalette(CorePalette.of(argb));\n }\n /**\n * @param argb ARGB representation of a color.\n * @return Dark Material color scheme, based on the color's hue.\n */\n static dark(argb) {\n return Scheme.darkFromCorePalette(CorePalette.of(argb));\n }\n /**\n * @param argb ARGB representation of a color.\n * @return Light Material content color scheme, based on the color's hue.\n */\n static lightContent(argb) {\n return Scheme.lightFromCorePalette(CorePalette.contentOf(argb));\n }\n /**\n * @param argb ARGB representation of a color.\n * @return Dark Material content color scheme, based on the color's hue.\n */\n static darkContent(argb) {\n return Scheme.darkFromCorePalette(CorePalette.contentOf(argb));\n }\n /**\n * Light scheme from core palette\n */\n static lightFromCorePalette(core) {\n return new Scheme({\n primary: core.a1.tone(40),\n onPrimary: core.a1.tone(100),\n primaryContainer: core.a1.tone(90),\n onPrimaryContainer: core.a1.tone(10),\n secondary: core.a2.tone(40),\n onSecondary: core.a2.tone(100),\n secondaryContainer: core.a2.tone(90),\n onSecondaryContainer: core.a2.tone(10),\n tertiary: core.a3.tone(40),\n onTertiary: core.a3.tone(100),\n tertiaryContainer: core.a3.tone(90),\n onTertiaryContainer: core.a3.tone(10),\n error: core.error.tone(40),\n onError: core.error.tone(100),\n errorContainer: core.error.tone(90),\n onErrorContainer: core.error.tone(10),\n background: core.n1.tone(99),\n onBackground: core.n1.tone(10),\n surface: core.n1.tone(99),\n onSurface: core.n1.tone(10),\n surfaceVariant: core.n2.tone(90),\n onSurfaceVariant: core.n2.tone(30),\n outline: core.n2.tone(50),\n outlineVariant: core.n2.tone(80),\n shadow: core.n1.tone(0),\n scrim: core.n1.tone(0),\n inverseSurface: core.n1.tone(20),\n inverseOnSurface: core.n1.tone(95),\n inversePrimary: core.a1.tone(80)\n });\n }\n /**\n * Dark scheme from core palette\n */\n static darkFromCorePalette(core) {\n return new Scheme({\n primary: core.a1.tone(80),\n onPrimary: core.a1.tone(20),\n primaryContainer: core.a1.tone(30),\n onPrimaryContainer: core.a1.tone(90),\n secondary: core.a2.tone(80),\n onSecondary: core.a2.tone(20),\n secondaryContainer: core.a2.tone(30),\n onSecondaryContainer: core.a2.tone(90),\n tertiary: core.a3.tone(80),\n onTertiary: core.a3.tone(20),\n tertiaryContainer: core.a3.tone(30),\n onTertiaryContainer: core.a3.tone(90),\n error: core.error.tone(80),\n onError: core.error.tone(20),\n errorContainer: core.error.tone(30),\n onErrorContainer: core.error.tone(80),\n background: core.n1.tone(10),\n onBackground: core.n1.tone(90),\n surface: core.n1.tone(10),\n onSurface: core.n1.tone(90),\n surfaceVariant: core.n2.tone(30),\n onSurfaceVariant: core.n2.tone(80),\n outline: core.n2.tone(60),\n outlineVariant: core.n2.tone(30),\n shadow: core.n1.tone(0),\n scrim: core.n1.tone(0),\n inverseSurface: core.n1.tone(90),\n inverseOnSurface: core.n1.tone(20),\n inversePrimary: core.a1.tone(40)\n });\n }\n constructor(props) {\n this.props = props;\n }\n toJSON() {\n return {\n ...this.props\n };\n }\n}\n//# sourceMappingURL=scheme.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct.js';\nimport * as math from '../utils/math_utils.js';\nconst SCORE_OPTION_DEFAULTS = {\n desired: 4,\n fallbackColorARGB: 0xff4285f4,\n filter: true, // Avoid unsuitable colors.\n};\nfunction compare(a, b) {\n if (a.score > b.score) {\n return -1;\n }\n else if (a.score < b.score) {\n return 1;\n }\n return 0;\n}\n/**\n * Given a large set of colors, remove colors that are unsuitable for a UI\n * theme, and rank the rest based on suitability.\n *\n * Enables use of a high cluster count for image quantization, thus ensuring\n * colors aren't muddied, while curating the high cluster count to a much\n * smaller number of appropriate choices.\n */\nexport class Score {\n constructor() { }\n /**\n * Given a map with keys of colors and values of how often the color appears,\n * rank the colors based on suitability for being used for a UI theme.\n *\n * @param colorsToPopulation map with keys of colors and values of how often\n * the color appears, usually from a source image.\n * @param {ScoreOptions} options optional parameters.\n * @return Colors sorted by suitability for a UI theme. The most suitable\n * color is the first item, the least suitable is the last. There will\n * always be at least one color returned. If all the input colors\n * were not suitable for a theme, a default fallback color will be\n * provided, Google Blue.\n */\n static score(colorsToPopulation, options) {\n const { desired, fallbackColorARGB, filter } = { ...SCORE_OPTION_DEFAULTS, ...options };\n // Get the HCT color for each Argb value, while finding the per hue count and\n // total count.\n const colorsHct = [];\n const huePopulation = new Array(360).fill(0);\n let populationSum = 0;\n for (const [argb, population] of colorsToPopulation.entries()) {\n const hct = Hct.fromInt(argb);\n colorsHct.push(hct);\n const hue = Math.floor(hct.hue);\n huePopulation[hue] += population;\n populationSum += population;\n }\n // Hues with more usage in neighboring 30 degree slice get a larger number.\n const hueExcitedProportions = new Array(360).fill(0.0);\n for (let hue = 0; hue < 360; hue++) {\n const proportion = huePopulation[hue] / populationSum;\n for (let i = hue - 14; i < hue + 16; i++) {\n const neighborHue = math.sanitizeDegreesInt(i);\n hueExcitedProportions[neighborHue] += proportion;\n }\n }\n // Scores each HCT color based on usage and chroma, while optionally\n // filtering out values that do not have enough chroma or usage.\n const scoredHct = new Array();\n for (const hct of colorsHct) {\n const hue = math.sanitizeDegreesInt(Math.round(hct.hue));\n const proportion = hueExcitedProportions[hue];\n if (filter && (hct.chroma < Score.CUTOFF_CHROMA || proportion <= Score.CUTOFF_EXCITED_PROPORTION)) {\n continue;\n }\n const proportionScore = proportion * 100.0 * Score.WEIGHT_PROPORTION;\n const chromaWeight = hct.chroma < Score.TARGET_CHROMA ? Score.WEIGHT_CHROMA_BELOW : Score.WEIGHT_CHROMA_ABOVE;\n const chromaScore = (hct.chroma - Score.TARGET_CHROMA) * chromaWeight;\n const score = proportionScore + chromaScore;\n scoredHct.push({ hct, score });\n }\n // Sorted so that colors with higher scores come first.\n scoredHct.sort(compare);\n // Iterates through potential hue differences in degrees in order to select\n // the colors with the largest distribution of hues possible. Starting at\n // 90 degrees(maximum difference for 4 colors) then decreasing down to a\n // 15 degree minimum.\n const chosenColors = [];\n for (let differenceDegrees = 90; differenceDegrees >= 15; differenceDegrees--) {\n chosenColors.length = 0;\n for (const { hct } of scoredHct) {\n const duplicateHue = chosenColors.find(chosenHct => {\n return math.differenceDegrees(hct.hue, chosenHct.hue) < differenceDegrees;\n });\n if (!duplicateHue) {\n chosenColors.push(hct);\n }\n if (chosenColors.length >= desired)\n break;\n }\n if (chosenColors.length >= desired)\n break;\n }\n const colors = [];\n if (chosenColors.length === 0) {\n colors.push(fallbackColorARGB);\n }\n for (const chosenHct of chosenColors) {\n colors.push(chosenHct.toInt());\n }\n return colors;\n }\n}\nScore.TARGET_CHROMA = 48.0; // A1 Chroma\nScore.WEIGHT_PROPORTION = 0.7;\nScore.WEIGHT_CHROMA_ABOVE = 0.3;\nScore.WEIGHT_CHROMA_BELOW = 0.1;\nScore.CUTOFF_CHROMA = 5.0;\nScore.CUTOFF_EXCITED_PROPORTION = 0.01;\n//# sourceMappingURL=score.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as colorUtils from './color_utils.js';\n/**\n * Utility methods for hexadecimal representations of colors.\n */\n/**\n * @param argb ARGB representation of a color.\n * @return Hex string representing color, ex. #ff0000 for red.\n */\nexport function hexFromArgb(argb) {\n const r = colorUtils.redFromArgb(argb);\n const g = colorUtils.greenFromArgb(argb);\n const b = colorUtils.blueFromArgb(argb);\n const outParts = [r.toString(16), g.toString(16), b.toString(16)];\n // Pad single-digit output values\n for (const [i, part] of outParts.entries()) {\n if (part.length === 1) {\n outParts[i] = '0' + part;\n }\n }\n return '#' + outParts.join('');\n}\n/**\n * @param hex String representing color as hex code. Accepts strings with or\n * without leading #, and string representing the color using 3, 6, or 8\n * hex characters.\n * @return ARGB representation of color.\n */\nexport function argbFromHex(hex) {\n hex = hex.replace('#', '');\n const isThree = hex.length === 3;\n const isSix = hex.length === 6;\n const isEight = hex.length === 8;\n if (!isThree && !isSix && !isEight) {\n throw new Error('unexpected hex ' + hex);\n }\n let r = 0;\n let g = 0;\n let b = 0;\n if (isThree) {\n r = parseIntHex(hex.slice(0, 1).repeat(2));\n g = parseIntHex(hex.slice(1, 2).repeat(2));\n b = parseIntHex(hex.slice(2, 3).repeat(2));\n }\n else if (isSix) {\n r = parseIntHex(hex.slice(0, 2));\n g = parseIntHex(hex.slice(2, 4));\n b = parseIntHex(hex.slice(4, 6));\n }\n else if (isEight) {\n r = parseIntHex(hex.slice(2, 4));\n g = parseIntHex(hex.slice(4, 6));\n b = parseIntHex(hex.slice(6, 8));\n }\n return (((255 << 24) | ((r & 0x0ff) << 16) | ((g & 0x0ff) << 8) | (b & 0x0ff)) >>>\n 0);\n}\nfunction parseIntHex(value) {\n // tslint:disable-next-line:ban\n return parseInt(value, 16);\n}\n//# sourceMappingURL=string_utils.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Blend } from '../blend/blend.js';\nimport { CorePalette } from '../palettes/core_palette.js';\nimport { Scheme } from '../scheme/scheme.js';\nimport { sourceColorFromImage } from './image_utils.js';\nimport { hexFromArgb } from './string_utils.js';\n/**\n * Generate a theme from a source color\n *\n * @param source Source color\n * @param customColors Array of custom colors\n * @return Theme object\n */\nexport function themeFromSourceColor(source, customColors = []) {\n const palette = CorePalette.of(source);\n return {\n source,\n schemes: {\n light: Scheme.light(source),\n dark: Scheme.dark(source),\n },\n palettes: {\n primary: palette.a1,\n secondary: palette.a2,\n tertiary: palette.a3,\n neutral: palette.n1,\n neutralVariant: palette.n2,\n error: palette.error,\n },\n customColors: customColors.map((c) => customColor(source, c)),\n };\n}\n/**\n * Generate a theme from an image source\n *\n * @param image Image element\n * @param customColors Array of custom colors\n * @return Theme object\n */\nexport async function themeFromImage(image, customColors = []) {\n const source = await sourceColorFromImage(image);\n return themeFromSourceColor(source, customColors);\n}\n/**\n * Generate custom color group from source and target color\n *\n * @param source Source color\n * @param color Custom color\n * @return Custom color group\n *\n * @link https://m3.material.io/styles/color/the-color-system/color-roles\n */\nexport function customColor(source, color) {\n let value = color.value;\n const from = value;\n const to = source;\n if (color.blend) {\n value = Blend.harmonize(from, to);\n }\n const palette = CorePalette.of(value);\n const tones = palette.a1;\n return {\n color,\n value,\n light: {\n color: tones.tone(40),\n onColor: tones.tone(100),\n colorContainer: tones.tone(90),\n onColorContainer: tones.tone(10),\n },\n dark: {\n color: tones.tone(80),\n onColor: tones.tone(20),\n colorContainer: tones.tone(30),\n onColorContainer: tones.tone(90),\n },\n };\n}\n/**\n * Apply a theme to an element\n *\n * @param theme Theme object\n * @param options Options\n */\nexport function applyTheme(theme, options) {\n const target = options?.target || document.body;\n const isDark = options?.dark ?? false;\n const scheme = isDark ? theme.schemes.dark : theme.schemes.light;\n setSchemeProperties(target, scheme);\n if (options?.brightnessSuffix) {\n setSchemeProperties(target, theme.schemes.dark, '-dark');\n setSchemeProperties(target, theme.schemes.light, '-light');\n }\n if (options?.paletteTones) {\n const tones = options?.paletteTones ?? [];\n for (const [key, palette] of Object.entries(theme.palettes)) {\n const paletteKey = key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n for (const tone of tones) {\n const token = `--md-ref-palette-${paletteKey}-${paletteKey}${tone}`;\n const color = hexFromArgb(palette.tone(tone));\n target.style.setProperty(token, color);\n }\n }\n }\n}\nfunction setSchemeProperties(target, scheme, suffix = '') {\n for (const [key, value] of Object.entries(scheme.toJSON())) {\n const token = key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n const color = hexFromArgb(value);\n target.style.setProperty(`--md-sys-color-${token}${suffix}`, color);\n }\n}\n//# sourceMappingURL=theme_utils.js.map","import { argbFromHex, Hct, hexFromArgb, Theme, TonalPalette } from '@material/material-color-utilities'\nimport { TSchmancyTheme } from './theme.interface'\n\n/**\n * Material Design 3 Theme Formatter\n * Generates complete M3 theme with all tonal values and design tokens\n * @see https://m3.material.io/styles/color/the-color-system\n */\n\n/**\n * Converts ARGB integer to hex string\n */\nfunction argbToHex(argb: number): string {\n\treturn hexFromArgb(argb)\n}\n\n/**\n * Creates a complete tonal palette from a source color\n */\nfunction createTonalPalette(sourceColor: number): Record<string, string> {\n\tconst hct = Hct.fromInt(sourceColor)\n\tconst palette = TonalPalette.fromHueAndChroma(hct.hue, hct.chroma)\n\n\treturn {\n\t\t'0': argbToHex(palette.tone(0)),\n\t\t'10': argbToHex(palette.tone(10)),\n\t\t'20': argbToHex(palette.tone(20)),\n\t\t'30': argbToHex(palette.tone(30)),\n\t\t'40': argbToHex(palette.tone(40)),\n\t\t'50': argbToHex(palette.tone(50)),\n\t\t'60': argbToHex(palette.tone(60)),\n\t\t'70': argbToHex(palette.tone(70)),\n\t\t'80': argbToHex(palette.tone(80)),\n\t\t'90': argbToHex(palette.tone(90)),\n\t\t'95': argbToHex(palette.tone(95)),\n\t\t'99': argbToHex(palette.tone(99)),\n\t\t'100': argbToHex(palette.tone(100)),\n\t}\n}\n\n/**\n * Generates a complete Material Design 3 theme\n * @param originalTheme The generated theme from Material Color Utilities\n * @param isDark Whether to generate a dark theme\n * @param extendedColors Optional extended colors (success, warning, info)\n */\nexport function formatTheme(\n\toriginalTheme: Theme,\n\tisDark = false,\n\textendedColors?: {\n\t\tsuccess?: number\n\t\twarning?: number\n\t\tinfo?: number\n\t}\n): Partial<TSchmancyTheme> {\n\tconst scheme = isDark ? originalTheme.schemes.dark : originalTheme.schemes.light\n\n\t// Generate complete tonal palettes\n\tconst primaryPalette = TonalPalette.fromHueAndChroma(\n\t\toriginalTheme.palettes.primary.hue,\n\t\toriginalTheme.palettes.primary.chroma\n\t)\n\tconst secondaryPalette = TonalPalette.fromHueAndChroma(\n\t\toriginalTheme.palettes.secondary.hue,\n\t\toriginalTheme.palettes.secondary.chroma\n\t)\n\tconst tertiaryPalette = TonalPalette.fromHueAndChroma(\n\t\toriginalTheme.palettes.tertiary.hue,\n\t\toriginalTheme.palettes.tertiary.chroma\n\t)\n\tconst neutralPalette = TonalPalette.fromHueAndChroma(\n\t\toriginalTheme.palettes.neutral.hue,\n\t\toriginalTheme.palettes.neutral.chroma\n\t)\n\tconst neutralVariantPalette = TonalPalette.fromHueAndChroma(\n\t\toriginalTheme.palettes.neutralVariant.hue,\n\t\toriginalTheme.palettes.neutralVariant.chroma\n\t)\n\tconst errorPalette = TonalPalette.fromHueAndChroma(\n\t\toriginalTheme.palettes.error.hue,\n\t\toriginalTheme.palettes.error.chroma\n\t)\n\n\t// Generate extended color palettes\n\tconst successPalette = extendedColors?.success\n\t\t? createTonalPalette(extendedColors.success)\n\t\t: createTonalPalette(argbFromHex('#00C853')) // Green A700\n\n\tconst warningPalette = extendedColors?.warning\n\t\t? createTonalPalette(extendedColors.warning)\n\t\t: createTonalPalette(argbFromHex('#FFCA28')) // Amber 400 - softer golden yellow\n\n\tconst infoPalette = extendedColors?.info\n\t\t? createTonalPalette(extendedColors.info)\n\t\t: createTonalPalette(argbFromHex('#2979FF')) // Blue A400\n\n\t// M3 tone values for each color role in light/dark themes\n\tconst tones = {\n\t\tprimary: isDark ? 80 : 40,\n\t\tonPrimary: isDark ? 20 : 100,\n\t\tprimaryContainer: isDark ? 30 : 90,\n\t\tonPrimaryContainer: isDark ? 90 : 10,\n\t\tprimaryFixed: 90,\n\t\tprimaryFixedDim: 80,\n\t\tonPrimaryFixed: 10,\n\t\tonPrimaryFixedVariant: 30,\n\t\tinversePrimary: isDark ? 40 : 80,\n\n\t\tsecondary: isDark ? 80 : 40,\n\t\tonSecondary: isDark ? 20 : 100,\n\t\tsecondaryContainer: isDark ? 30 : 90,\n\t\tonSecondaryContainer: isDark ? 90 : 10,\n\t\tsecondaryFixed: 90,\n\t\tsecondaryFixedDim: 80,\n\t\tonSecondaryFixed: 10,\n\t\tonSecondaryFixedVariant: 30,\n\n\t\ttertiary: isDark ? 80 : 40,\n\t\tonTertiary: isDark ? 20 : 100,\n\t\ttertiaryContainer: isDark ? 30 : 90,\n\t\tonTertiaryContainer: isDark ? 90 : 10,\n\t\ttertiaryFixed: 90,\n\t\ttertiaryFixedDim: 80,\n\t\tonTertiaryFixed: 10,\n\t\tonTertiaryFixedVariant: 30,\n\n\t\terror: isDark ? 50 : 40,\n\t\tonError: isDark ? 100 : 100,\n\t\terrorContainer: isDark ? 30 : 90,\n\t\tonErrorContainer: isDark ? 90 : 10,\n\n\t\tsurface: isDark ? 6 : 98,\n\t\tsurfaceDim: isDark ? 6 : 87,\n\t\tsurfaceBright: isDark ? 24 : 98,\n\t\tsurfaceContainerLowest: isDark ? 4 : 100,\n\t\tsurfaceContainerLow: isDark ? 10 : 96,\n\t\tsurfaceContainer: isDark ? 12 : 94,\n\t\tsurfaceContainerHigh: isDark ? 17 : 92,\n\t\tsurfaceContainerHighest: isDark ? 22 : 90,\n\t\tonSurface: isDark ? 90 : 10,\n\t\tonSurfaceVariant: isDark ? 80 : 30,\n\t\tsurfaceTint: isDark ? 80 : 40,\n\t\tinverseSurface: isDark ? 90 : 20,\n\t\tinverseOnSurface: isDark ? 20 : 95,\n\n\t\toutline: isDark ? 60 : 50,\n\t\toutlineVariant: isDark ? 15 : 80,\n\t\tshadow: 0,\n\t\tscrim: 0,\n\t}\n\n\tconst newTheme: Partial<TSchmancyTheme> = {\n\t\tsys: {\n\t\t\tcolor: {\n\t\t\t\t// Neutral colors\n\t\t\t\tscrim: argbToHex(scheme.scrim),\n\t\t\t\toutline: argbToHex(neutralVariantPalette.tone(tones.outline)),\n\t\t\t\toutlineVariant: argbToHex(neutralVariantPalette.tone(tones.outlineVariant)),\n\t\t\t\tshadow: argbToHex(neutralPalette.tone(tones.shadow)),\n\n\t\t\t\t// Surface colors with complete tonal values\n\t\t\t\tsurface: {\n\t\t\t\t\tdefault: argbToHex(neutralPalette.tone(tones.surface)),\n\t\t\t\t\tdim: argbToHex(neutralPalette.tone(tones.surfaceDim)),\n\t\t\t\t\tbright: argbToHex(neutralPalette.tone(tones.surfaceBright)),\n\t\t\t\t\tcontainer: argbToHex(neutralPalette.tone(tones.surfaceContainer)),\n\t\t\t\t\tcontainerLow: argbToHex(neutralPalette.tone(tones.surfaceContainerLow)),\n\t\t\t\t\tcontainerLowest: argbToHex(neutralPalette.tone(tones.surfaceContainerLowest)),\n\t\t\t\t\tcontainerHigh: argbToHex(neutralPalette.tone(tones.surfaceContainerHigh)),\n\t\t\t\t\tcontainerHighest: argbToHex(neutralPalette.tone(tones.surfaceContainerHighest)),\n\t\t\t\t\ton: argbToHex(neutralPalette.tone(tones.onSurface)),\n\t\t\t\t\tonVariant: argbToHex(neutralVariantPalette.tone(tones.onSurfaceVariant)),\n\t\t\t\t\ttint: argbToHex(primaryPalette.tone(tones.surfaceTint)),\n\t\t\t\t\tinverse: argbToHex(neutralPalette.tone(tones.inverseSurface)),\n\t\t\t\t\tinverseOn: argbToHex(neutralPalette.tone(tones.inverseOnSurface)),\n\t\t\t\t\t// Deprecated mappings for backward compatibility\n\t\t\t\t\tlow: argbToHex(neutralPalette.tone(tones.surfaceContainerLow)),\n\t\t\t\t\thigh: argbToHex(neutralPalette.tone(tones.surfaceContainerHigh)),\n\t\t\t\t\thighest: argbToHex(neutralPalette.tone(tones.surfaceContainerHighest)),\n\t\t\t\t\tlowest: argbToHex(neutralPalette.tone(tones.surfaceContainerLowest)),\n\t\t\t\t},\n\n\t\t\t\t// Primary color roles with fixed variants\n\t\t\t\tprimary: {\n\t\t\t\t\tdefault: argbToHex(primaryPalette.tone(tones.primary)),\n\t\t\t\t\ton: argbToHex(primaryPalette.tone(tones.onPrimary)),\n\t\t\t\t\tcontainer: argbToHex(primaryPalette.tone(tones.primaryContainer)),\n\t\t\t\t\tonContainer: argbToHex(primaryPalette.tone(tones.onPrimaryContainer)),\n\t\t\t\t\tfixed: argbToHex(primaryPalette.tone(tones.primaryFixed)),\n\t\t\t\t\tfixedDim: argbToHex(primaryPalette.tone(tones.primaryFixedDim)),\n\t\t\t\t\tonFixed: argbToHex(primaryPalette.tone(tones.onPrimaryFixed)),\n\t\t\t\t\tonFixedVariant: argbToHex(primaryPalette.tone(tones.onPrimaryFixedVariant)),\n\t\t\t\t\tinverse: argbToHex(primaryPalette.tone(tones.inversePrimary)),\n\t\t\t\t},\n\n\t\t\t\t// Secondary color roles with fixed variants\n\t\t\t\tsecondary: {\n\t\t\t\t\tdefault: argbToHex(secondaryPalette.tone(tones.secondary)),\n\t\t\t\t\ton: argbToHex(secondaryPalette.tone(tones.onSecondary)),\n\t\t\t\t\tcontainer: argbToHex(secondaryPalette.tone(tones.secondaryContainer)),\n\t\t\t\t\tonContainer: argbToHex(secondaryPalette.tone(tones.onSecondaryContainer)),\n\t\t\t\t\tfixed: argbToHex(secondaryPalette.tone(tones.secondaryFixed)),\n\t\t\t\t\tfixedDim: argbToHex(secondaryPalette.tone(tones.secondaryFixedDim)),\n\t\t\t\t\tonFixed: argbToHex(secondaryPalette.tone(tones.onSecondaryFixed)),\n\t\t\t\t\tonFixedVariant: argbToHex(secondaryPalette.tone(tones.onSecondaryFixedVariant)),\n\t\t\t\t},\n\n\t\t\t\t// Tertiary color roles with fixed variants\n\t\t\t\ttertiary: {\n\t\t\t\t\tdefault: argbToHex(tertiaryPalette.tone(tones.tertiary)),\n\t\t\t\t\ton: argbToHex(tertiaryPalette.tone(tones.onTertiary)),\n\t\t\t\t\tcontainer: argbToHex(tertiaryPalette.tone(tones.tertiaryContainer)),\n\t\t\t\t\tonContainer: argbToHex(tertiaryPalette.tone(tones.onTertiaryContainer)),\n\t\t\t\t\tfixed: argbToHex(tertiaryPalette.tone(tones.tertiaryFixed)),\n\t\t\t\t\tfixedDim: argbToHex(tertiaryPalette.tone(tones.tertiaryFixedDim)),\n\t\t\t\t\tonFixed: argbToHex(tertiaryPalette.tone(tones.onTertiaryFixed)),\n\t\t\t\t\tonFixedVariant: argbToHex(tertiaryPalette.tone(tones.onTertiaryFixedVariant)),\n\t\t\t\t},\n\n\t\t\t\t// Error color roles\n\t\t\t\terror: {\n\t\t\t\t\tdefault: argbToHex(errorPalette.tone(tones.error)),\n\t\t\t\t\ton: argbToHex(errorPalette.tone(tones.onError)),\n\t\t\t\t\tcontainer: argbToHex(errorPalette.tone(tones.errorContainer)),\n\t\t\t\t\tonContainer: argbToHex(errorPalette.tone(tones.onErrorContainer)),\n\t\t\t\t},\n\n\t\t\t\t// Extended color roles - Success (M3 spec: same tones as error)\n\t\t\t\tsuccess: {\n\t\t\t\t\tdefault: successPalette[isDark ? '80' : '40'],\n\t\t\t\t\ton: successPalette['100'],\n\t\t\t\t\tcontainer: successPalette[isDark ? '30' : '90'],\n\t\t\t\t\tonContainer: successPalette[isDark ? '90' : '10'],\n\t\t\t\t},\n\n\t\t\t\t// Extended color roles - Warning (M3 spec: same tones as error)\n\t\t\t\twarning: {\n\t\t\t\t\tdefault: warningPalette[isDark ? '80' : '40'],\n\t\t\t\t\ton: warningPalette['100'],\n\t\t\t\t\tcontainer: warningPalette[isDark ? '30' : '90'],\n\t\t\t\t\tonContainer: warningPalette[isDark ? '90' : '10'],\n\t\t\t\t},\n\n\t\t\t\t// Extended color roles - Info (M3 spec: same tones as error)\n\t\t\t\tinfo: {\n\t\t\t\t\tdefault: infoPalette[isDark ? '80' : '40'],\n\t\t\t\t\ton: infoPalette['100'],\n\t\t\t\t\tcontainer: infoPalette[isDark ? '30' : '90'],\n\t\t\t\t\tonContainer: infoPalette[isDark ? '90' : '10'],\n\t\t\t\t},\n\t\t\t},\n\n\t\t\t// M3 Typography System values (will be properly set in CSS)\n\t\t\ttypography: {\n\t\t\t\tdisplay: {\n\t\t\t\t\tlarge: 'display-large',\n\t\t\t\t\tmedium: 'display-medium',\n\t\t\t\t\tsmall: 'display-small',\n\t\t\t\t},\n\t\t\t\theadline: {\n\t\t\t\t\tlarge: 'headline-large',\n\t\t\t\t\tmedium: 'headline-medium',\n\t\t\t\t\tsmall: 'headline-small',\n\t\t\t\t},\n\t\t\t\ttitle: {\n\t\t\t\t\tlarge: 'title-large',\n\t\t\t\t\tmedium: 'title-medium',\n\t\t\t\t\tsmall: 'title-small',\n\t\t\t\t},\n\t\t\t\tbody: {\n\t\t\t\t\tlarge: 'body-large',\n\t\t\t\t\tmedium: 'body-medium',\n\t\t\t\t\tsmall: 'body-small',\n\t\t\t\t},\n\t\t\t\tlabel: {\n\t\t\t\t\tlarge: 'label-large',\n\t\t\t\t\tmedium: 'label-medium',\n\t\t\t\t\tsmall: 'label-small',\n\t\t\t\t},\n\t\t\t},\n\n\t\t\t// M3 Shape System\n\t\t\tshape: {\n\t\t\t\tcorner: {\n\t\t\t\t\tnone: '0',\n\t\t\t\t\textraSmall: '4px',\n\t\t\t\t\tsmall: '8px',\n\t\t\t\t\tmedium: '12px',\n\t\t\t\t\tlarge: '16px',\n\t\t\t\t\textraLarge: '28px',\n\t\t\t\t\tfull: '9999px',\n\t\t\t\t},\n\t\t\t},\n\n\t\t\t// Luminous Glow Elevation — primary-colored glow replaces dark M3 shadows\n\t\t\televation: {\n\t\t\t\t0: '0 0 0 0 rgba(0, 0, 0, 0)',\n\t\t\t\t1: `0 2px 12px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) ${isDark ? '18%' : '15%'}, transparent)`,\n\t\t\t\t2: `0 4px 20px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) ${isDark ? '26%' : '22%'}, transparent)`,\n\t\t\t\t3: `0 8px 32px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) ${isDark ? '32%' : '28%'}, transparent)`,\n\t\t\t\t4: `0 12px 44px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) ${isDark ? '40%' : '35%'}, transparent)`,\n\t\t\t\t5: `0 20px 60px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) ${isDark ? '48%' : '42%'}, transparent)`,\n\t\t\t},\n\n\t\t\t// M3 Motion System\n\t\t\tmotion: {\n\t\t\t\teasing: {\n\t\t\t\t\temphasized: 'cubic-bezier(0.2, 0.0, 0, 1.0)',\n\t\t\t\t\temphasizedDecelerate: 'cubic-bezier(0.05, 0.7, 0.1, 1.0)',\n\t\t\t\t\temphasizedAccelerate: 'cubic-bezier(0.3, 0.0, 0.8, 0.15)',\n\t\t\t\t\tstandard: 'cubic-bezier(0.2, 0.0, 0, 1.0)',\n\t\t\t\t\tstandardDecelerate: 'cubic-bezier(0, 0, 0, 1)',\n\t\t\t\t\tstandardAccelerate: 'cubic-bezier(0.3, 0, 1, 1)',\n\t\t\t\t\tlegacy: 'cubic-bezier(0.4, 0, 0.2, 1)',\n\t\t\t\t\tlinear: 'linear',\n\t\t\t\t},\n\t\t\t\tduration: {\n\t\t\t\t\tshort1: '50ms',\n\t\t\t\t\tshort2: '100ms',\n\t\t\t\t\tshort3: '150ms',\n\t\t\t\t\tshort4: '200ms',\n\t\t\t\t\tmedium1: '250ms',\n\t\t\t\t\tmedium2: '300ms',\n\t\t\t\t\tmedium3: '350ms',\n\t\t\t\t\tmedium4: '400ms',\n\t\t\t\t\tlong1: '450ms',\n\t\t\t\t\tlong2: '500ms',\n\t\t\t\t\tlong3: '550ms',\n\t\t\t\t\tlong4: '600ms',\n\t\t\t\t\textraLong1: '700ms',\n\t\t\t\t\textraLong2: '800ms',\n\t\t\t\t\textraLong3: '900ms',\n\t\t\t\t\textraLong4: '1000ms',\n\t\t\t\t},\n\t\t\t},\n\n\t\t\t// M3 State Layers\n\t\t\tstate: {\n\t\t\t\topacity: {\n\t\t\t\t\thover: '0.08',\n\t\t\t\t\tfocus: '0.12',\n\t\t\t\t\tpressed: '0.12',\n\t\t\t\t\tdragged: '0.16',\n\t\t\t\t\tdisabled: '0.38',\n\t\t\t\t\tdisabledContainer: '0.12',\n\t\t\t\t},\n\t\t\t},\n\n\t\t\t// M3 Spacing System (4dp grid)\n\t\t\tspacing: {\n\t\t\t\t0: '0',\n\t\t\t\t1: '4px',\n\t\t\t\t2: '8px',\n\t\t\t\t3: '12px',\n\t\t\t\t4: '16px',\n\t\t\t\t5: '20px',\n\t\t\t\t6: '24px',\n\t\t\t\t7: '28px',\n\t\t\t\t8: '32px',\n\t\t\t\t9: '36px',\n\t\t\t\t10: '40px',\n\t\t\t\t11: '44px',\n\t\t\t\t12: '48px',\n\t\t\t},\n\n\t\t\t// Legacy outline for backward compatibility\n\t\t\toutline: {\n\t\t\t\t1: '1px',\n\t\t\t},\n\t\t},\n\n\t\t// Reference palette - complete tonal values\n\t\tref: {\n\t\t\tpalette: {\n\t\t\t\tprimary: createTonalPalette(primaryPalette.tone(40)) as any,\n\t\t\t\tsecondary: createTonalPalette(secondaryPalette.tone(40)) as any,\n\t\t\t\ttertiary: createTonalPalette(tertiaryPalette.tone(40)) as any,\n\t\t\t\tneutral: createTonalPalette(neutralPalette.tone(40)) as any,\n\t\t\t\tneutralVariant: createTonalPalette(neutralVariantPalette.tone(40)) as any,\n\t\t\t\terror: createTonalPalette(errorPalette.tone(40)) as any,\n\t\t\t},\n\t\t},\n\t}\n\n\treturn newTheme\n}\n\n/**\n * Backward compatibility wrapper for the old API\n */\nexport function createLightTonalPaletteFromBaseColor(hue: number, chroma: number) {\n\tconst tonalPalette = TonalPalette.fromHueAndChroma(hue, chroma)\n\treturn {\n\t\tcLowest: tonalPalette.tone(100),\n\t\tcLow: tonalPalette.tone(96),\n\t\tc: tonalPalette.tone(94),\n\t\tcHigh: tonalPalette.tone(92),\n\t\tcHighest: tonalPalette.tone(90),\n\t\tsDim: tonalPalette.tone(87),\n\t\ts: tonalPalette.tone(98),\n\t\tsBright: tonalPalette.tone(100),\n\t}\n}\n\nexport function createDarkTonalPaletteFromBaseColor(hue: number, chroma: number) {\n\tconst tonalPalette = TonalPalette.fromHueAndChroma(hue, chroma)\n\treturn {\n\t\tcLowest: tonalPalette.tone(4),\n\t\tcLow: tonalPalette.tone(10),\n\t\tc: tonalPalette.tone(12),\n\t\tcHigh: tonalPalette.tone(17),\n\t\tcHighest: tonalPalette.tone(22),\n\t\tsDim: tonalPalette.tone(6),\n\t\ts: tonalPalette.tone(6),\n\t\tsBright: tonalPalette.tone(24),\n\t}\n}\n",":host,\n:root {\n\t--md-ref-typeface-brand: var(--schmancy-font-family, sans-serif);\n\t--md-ref-typeface-plain: var(--schmancy-font-family, sans-serif);\n\t--md-sys-color-primary: var(--schmancy-sys-color-primary-default);\n\t--md-sys-color-secondary: var(--schmancy-sys-color-secondary-default);\n\n\t--default-font-family: var(--schmancy-font-family);\n\t--border-style: solid;\n\t--spacing: 4px;\n\t--color-scrim: var(--schmancy-sys-color-scrim);\n\t--color-shadow: var(--schmancy-sys-color-shadow);\n\t--color-outline: var(--schmancy-sys-color-outline);\n\t--color-outlineVariant: var(--schmancy-sys-color-outlineVariant);\n\t--color-outline-variant: var(--schmancy-sys-color-outlineVariant);\n\t--color-surface-default: var(--schmancy-sys-color-surface-default);\n\t--color-surface-dim: var(--schmancy-sys-color-surface-dim);\n\t--color-surface-bright: var(--schmancy-sys-color-surface-bright);\n\t--color-surface-container: var(--schmancy-sys-color-surface-container);\n\t--color-surface-low: var(--schmancy-sys-color-surface-low);\n\t--color-surface-high: var(--schmancy-sys-color-surface-high);\n\t--color-surface-highest: var(--schmancy-sys-color-surface-highest);\n\t--color-surface-lowest: var(--schmancy-sys-color-surface-lowest);\n\t/* CamelCase variants for Tailwind compatibility */\n\t--color-surface-containerLow: var(--schmancy-sys-color-surface-containerLow);\n\t--color-surface-containerHigh: var(--schmancy-sys-color-surface-containerHigh);\n\t--color-surface-containerLowest: var(--schmancy-sys-color-surface-containerLowest);\n\t--color-surface-containerHighest: var(--schmancy-sys-color-surface-containerHighest);\n\t--color-surface-on: var(--schmancy-sys-color-surface-on);\n\t--color-surface-onVariant: var(--schmancy-sys-color-surface-onVariant);\n\t--color-surface-on-variant: var(--schmancy-sys-color-surface-onVariant);\n\t--color-surface-tint: var(--schmancy-sys-color-surface-tint);\n\t--color-surface-inverse: var(--schmancy-sys-color-inverse-surface);\n\t--color-surface-inverseOn: var(--schmancy-sys-color-inverse-onSurface);\n\t--color-inverse-surface: var(--schmancy-sys-color-inverse-surface);\n\t--color-inverse-on-surface: var(--schmancy-sys-color-inverse-onSurface);\n\t--color-primary-default: var(--schmancy-sys-color-primary-default);\n\t--color-primary-on: var(--schmancy-sys-color-primary-on);\n\t--color-primary-container: var(--schmancy-sys-color-primary-container);\n\t--color-primary-onContainer: var(--schmancy-sys-color-primary-onContainer);\n\t--color-primary-on-container: var(--schmancy-sys-color-primary-onContainer);\n\t--color-primary-fixed: var(--schmancy-sys-color-primary-fixed);\n\t--color-primary-fixedDim: var(--schmancy-sys-color-primary-fixedDim);\n\t--color-primary-fixed-dim: var(--schmancy-sys-color-primary-fixedDim);\n\t--color-primary-onFixed: var(--schmancy-sys-color-primary-onFixed);\n\t--color-primary-on-fixed: var(--schmancy-sys-color-primary-onFixed);\n\t--color-primary-onFixedVariant: var(--schmancy-sys-color-primary-onFixedVariant);\n\t--color-primary-on-fixed-variant: var(--schmancy-sys-color-primary-onFixedVariant);\n\t--color-primary-inverse: var(--schmancy-sys-color-inverse-primary);\n\t--color-inverse-primary: var(--schmancy-sys-color-inverse-primary);\n\t--color-secondary-default: var(--schmancy-sys-color-secondary-default);\n\t--color-secondary-on: var(--schmancy-sys-color-secondary-on);\n\t--color-secondary-container: var(--schmancy-sys-color-secondary-container);\n\t--color-secondary-onContainer: var(--schmancy-sys-color-secondary-onContainer);\n\t--color-secondary-on-container: var(--schmancy-sys-color-secondary-onContainer);\n\t--color-secondary-fixed: var(--schmancy-sys-color-secondary-fixed);\n\t--color-secondary-fixedDim: var(--schmancy-sys-color-secondary-fixedDim);\n\t--color-secondary-fixed-dim: var(--schmancy-sys-color-secondary-fixedDim);\n\t--color-secondary-onFixed: var(--schmancy-sys-color-secondary-onFixed);\n\t--color-secondary-on-fixed: var(--schmancy-sys-color-secondary-onFixed);\n\t--color-secondary-onFixedVariant: var(--schmancy-sys-color-secondary-onFixedVariant);\n\t--color-secondary-on-fixed-variant: var(--schmancy-sys-color-secondary-onFixedVariant);\n\t--color-tertiary-default: var(--schmancy-sys-color-tertiary-default);\n\t--color-tertiary-on: var(--schmancy-sys-color-tertiary-on);\n\t--color-tertiary-container: var(--schmancy-sys-color-tertiary-container);\n\t--color-tertiary-onContainer: var(--schmancy-sys-color-tertiary-onContainer);\n\t--color-tertiary-on-container: var(--schmancy-sys-color-tertiary-onContainer);\n\t--color-tertiary-fixed: var(--schmancy-sys-color-tertiary-fixed);\n\t--color-tertiary-fixedDim: var(--schmancy-sys-color-tertiary-fixedDim);\n\t--color-tertiary-fixed-dim: var(--schmancy-sys-color-tertiary-fixedDim);\n\t--color-tertiary-onFixed: var(--schmancy-sys-color-tertiary-onFixed);\n\t--color-tertiary-on-fixed: var(--schmancy-sys-color-tertiary-onFixed);\n\t--color-tertiary-onFixedVariant: var(--schmancy-sys-color-tertiary-onFixedVariant);\n\t--color-tertiary-on-fixed-variant: var(--schmancy-sys-color-tertiary-onFixedVariant);\n\t--color-error-default: var(--schmancy-sys-color-error-default);\n\t--color-error-on: var(--schmancy-sys-color-error-on);\n\t--color-error-container: var(--schmancy-sys-color-error-container);\n\t--color-error-onContainer: var(--schmancy-sys-color-error-onContainer);\n\t--color-error-on-container: var(--schmancy-sys-color-error-onContainer);\n\t--color-success-default: var(--schmancy-sys-color-success-default);\n\t--color-success-on: var(--schmancy-sys-color-success-on);\n\t--color-success-container: var(--schmancy-sys-color-success-container);\n\t--color-success-onContainer: var(--schmancy-sys-color-success-onContainer);\n\t--color-success-on-container: var(--schmancy-sys-color-success-onContainer);\n\t--color-warning-default: var(--schmancy-sys-color-warning-default);\n\t--color-warning-on: var(--schmancy-sys-color-warning-on);\n\t--color-warning-container: var(--schmancy-sys-color-warning-container);\n\t--color-warning-onContainer: var(--schmancy-sys-color-warning-onContainer);\n\t--color-warning-on-container: var(--schmancy-sys-color-warning-onContainer);\n\t--color-info-default: var(--schmancy-sys-color-info-default);\n\t--color-info-on: var(--schmancy-sys-color-info-on);\n\t--color-info-container: var(--schmancy-sys-color-info-container);\n\t--color-info-onContainer: var(--schmancy-sys-color-info-onContainer);\n\t--color-info-on-container: var(--schmancy-sys-color-info-onContainer);\n\t--shadow-xs: var(--schmancy-sys-elevation-0);\n\t--shadow-sm: var(--schmancy-sys-elevation-1);\n\t--shadow-md: var(--schmancy-sys-elevation-2);\n\t--shadow-lg: var(--schmancy-sys-elevation-3);\n\t--shadow-xl: var(--schmancy-sys-elevation-4);\n\t--shadow-2xl: var(--schmancy-sys-elevation-5);\n\t--outline-1: var(--schmancy-sys-outline-1);\n\t--font-sans:\n\t\tui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\n\t--font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;\n\t--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;\n\t--color-red-50: oklch(0.971 0.013 17.38);\n\t--color-red-100: oklch(0.936 0.032 17.717);\n\t--color-red-200: oklch(0.885 0.062 18.334);\n\t--color-red-300: oklch(0.808 0.114 19.571);\n\t--color-red-400: oklch(0.704 0.191 22.216);\n\t--color-red-500: oklch(0.637 0.237 25.331);\n\t--color-red-600: oklch(0.577 0.245 27.325);\n\t--color-red-700: oklch(0.505 0.213 27.518);\n\t--color-red-800: oklch(0.444 0.177 26.899);\n\t--color-red-900: oklch(0.396 0.141 25.723);\n\t--color-red-950: oklch(0.258 0.092 26.042);\n\t--color-orange-50: oklch(0.98 0.016 73.684);\n\t--color-orange-100: oklch(0.954 0.038 75.164);\n\t--color-orange-200: oklch(0.901 0.076 70.697);\n\t--color-orange-300: oklch(0.837 0.128 66.29);\n\t--color-orange-400: oklch(0.75 0.183 55.934);\n\t--color-orange-500: oklch(0.705 0.213 47.604);\n\t--color-orange-600: oklch(0.646 0.222 41.116);\n\t--color-orange-700: oklch(0.553 0.195 38.402);\n\t--color-orange-800: oklch(0.47 0.157 37.304);\n\t--color-orange-900: oklch(0.408 0.123 38.172);\n\t--color-orange-950: oklch(0.266 0.079 36.259);\n\t--color-amber-50: oklch(0.987 0.022 95.277);\n\t--color-amber-100: oklch(0.962 0.059 95.617);\n\t--color-amber-200: oklch(0.924 0.12 95.746);\n\t--color-amber-300: oklch(0.879 0.169 91.605);\n\t--color-amber-400: oklch(0.828 0.189 84.429);\n\t--color-amber-500: oklch(0.769 0.188 70.08);\n\t--color-amber-600: oklch(0.666 0.179 58.318);\n\t--color-amber-700: oklch(0.555 0.163 48.998);\n\t--color-amber-800: oklch(0.473 0.137 46.201);\n\t--color-amber-900: oklch(0.414 0.112 45.904);\n\t--color-amber-950: oklch(0.279 0.077 45.635);\n\t--color-yellow-50: oklch(0.987 0.026 102.212);\n\t--color-yellow-100: oklch(0.973 0.071 103.193);\n\t--color-yellow-200: oklch(0.945 0.129 101.54);\n\t--color-yellow-300: oklch(0.905 0.182 98.111);\n\t--color-yellow-400: oklch(0.852 0.199 91.936);\n\t--color-yellow-500: oklch(0.795 0.184 86.047);\n\t--color-yellow-600: oklch(0.681 0.162 75.834);\n\t--color-yellow-700: oklch(0.554 0.135 66.442);\n\t--color-yellow-800: oklch(0.476 0.114 61.907);\n\t--color-yellow-900: oklch(0.421 0.095 57.708);\n\t--color-yellow-950: oklch(0.286 0.066 53.813);\n\t--color-lime-50: oklch(0.986 0.031 120.757);\n\t--color-lime-100: oklch(0.967 0.067 122.328);\n\t--color-lime-200: oklch(0.938 0.127 124.321);\n\t--color-lime-300: oklch(0.897 0.196 126.665);\n\t--color-lime-400: oklch(0.841 0.238 128.85);\n\t--color-lime-500: oklch(0.768 0.233 130.85);\n\t--color-lime-600: oklch(0.648 0.2 131.684);\n\t--color-lime-700: oklch(0.532 0.157 131.589);\n\t--color-lime-800: oklch(0.453 0.124 130.933);\n\t--color-lime-900: oklch(0.405 0.101 131.063);\n\t--color-lime-950: oklch(0.274 0.072 132.109);\n\t--color-green-50: oklch(0.982 0.018 155.826);\n\t--color-green-100: oklch(0.962 0.044 156.743);\n\t--color-green-200: oklch(0.925 0.084 155.995);\n\t--color-green-300: oklch(0.871 0.15 154.449);\n\t--color-green-400: oklch(0.792 0.209 151.711);\n\t--color-green-500: oklch(0.723 0.219 149.579);\n\t--color-green-600: oklch(0.627 0.194 149.214);\n\t--color-green-700: oklch(0.527 0.154 150.069);\n\t--color-green-800: oklch(0.448 0.119 151.328);\n\t--color-green-900: oklch(0.393 0.095 152.535);\n\t--color-green-950: oklch(0.266 0.065 152.934);\n\t--color-emerald-50: oklch(0.979 0.021 166.113);\n\t--color-emerald-100: oklch(0.95 0.052 163.051);\n\t--color-emerald-200: oklch(0.905 0.093 164.15);\n\t--color-emerald-300: oklch(0.845 0.143 164.978);\n\t--color-emerald-400: oklch(0.765 0.177 163.223);\n\t--color-emerald-500: oklch(0.696 0.17 162.48);\n\t--color-emerald-600: oklch(0.596 0.145 163.225);\n\t--color-emerald-700: oklch(0.508 0.118 165.612);\n\t--color-emerald-800: oklch(0.432 0.095 166.913);\n\t--color-emerald-900: oklch(0.378 0.077 168.94);\n\t--color-emerald-950: oklch(0.262 0.051 172.552);\n\t--color-teal-50: oklch(0.984 0.014 180.72);\n\t--color-teal-100: oklch(0.953 0.051 180.801);\n\t--color-teal-200: oklch(0.91 0.096 180.426);\n\t--color-teal-300: oklch(0.855 0.138 181.071);\n\t--color-teal-400: oklch(0.777 0.152 181.912);\n\t--color-teal-500: oklch(0.704 0.14 182.503);\n\t--color-teal-600: oklch(0.6 0.118 184.704);\n\t--color-teal-700: oklch(0.511 0.096 186.391);\n\t--color-teal-800: oklch(0.437 0.078 188.216);\n\t--color-teal-900: oklch(0.386 0.063 188.416);\n\t--color-teal-950: oklch(0.277 0.046 192.524);\n\t--color-cyan-50: oklch(0.984 0.019 200.873);\n\t--color-cyan-100: oklch(0.956 0.045 203.388);\n\t--color-cyan-200: oklch(0.917 0.08 205.041);\n\t--color-cyan-300: oklch(0.865 0.127 207.078);\n\t--color-cyan-400: oklch(0.789 0.154 211.53);\n\t--color-cyan-500: oklch(0.715 0.143 215.221);\n\t--color-cyan-600: oklch(0.609 0.126 221.723);\n\t--color-cyan-700: oklch(0.52 0.105 223.128);\n\t--color-cyan-800: oklch(0.45 0.085 224.283);\n\t--color-cyan-900: oklch(0.398 0.07 227.392);\n\t--color-cyan-950: oklch(0.302 0.056 229.695);\n\t--color-sky-50: oklch(0.977 0.013 236.62);\n\t--color-sky-100: oklch(0.951 0.026 236.824);\n\t--color-sky-200: oklch(0.901 0.058 230.902);\n\t--color-sky-300: oklch(0.828 0.111 230.318);\n\t--color-sky-400: oklch(0.746 0.16 232.661);\n\t--color-sky-500: oklch(0.685 0.169 237.323);\n\t--color-sky-600: oklch(0.588 0.158 241.966);\n\t--color-sky-700: oklch(0.5 0.134 242.749);\n\t--color-sky-800: oklch(0.443 0.11 240.79);\n\t--color-sky-900: oklch(0.391 0.09 240.876);\n\t--color-sky-950: oklch(0.293 0.066 243.157);\n\t--color-blue-50: oklch(0.97 0.014 254.604);\n\t--color-blue-100: oklch(0.932 0.032 255.585);\n\t--color-blue-200: oklch(0.882 0.059 254.128);\n\t--color-blue-300: oklch(0.809 0.105 251.813);\n\t--color-blue-400: oklch(0.707 0.165 254.624);\n\t--color-blue-500: oklch(0.623 0.214 259.815);\n\t--color-blue-600: oklch(0.546 0.245 262.881);\n\t--color-blue-700: oklch(0.488 0.243 264.376);\n\t--color-blue-800: oklch(0.424 0.199 265.638);\n\t--color-blue-900: oklch(0.379 0.146 265.522);\n\t--color-blue-950: oklch(0.282 0.091 267.935);\n\t--color-indigo-50: oklch(0.962 0.018 272.314);\n\t--color-indigo-100: oklch(0.93 0.034 272.788);\n\t--color-indigo-200: oklch(0.87 0.065 274.039);\n\t--color-indigo-300: oklch(0.785 0.115 274.713);\n\t--color-indigo-400: oklch(0.673 0.182 276.935);\n\t--color-indigo-500: oklch(0.585 0.233 277.117);\n\t--color-indigo-600: oklch(0.511 0.262 276.966);\n\t--color-indigo-700: oklch(0.457 0.24 277.023);\n\t--color-indigo-800: oklch(0.398 0.195 277.366);\n\t--color-indigo-900: oklch(0.359 0.144 278.697);\n\t--color-indigo-950: oklch(0.257 0.09 281.288);\n\t--color-violet-50: oklch(0.969 0.016 293.756);\n\t--color-violet-100: oklch(0.943 0.029 294.588);\n\t--color-violet-200: oklch(0.894 0.057 293.283);\n\t--color-violet-300: oklch(0.811 0.111 293.571);\n\t--color-violet-400: oklch(0.702 0.183 293.541);\n\t--color-violet-500: oklch(0.606 0.25 292.717);\n\t--color-violet-600: oklch(0.541 0.281 293.009);\n\t--color-violet-700: oklch(0.491 0.27 292.581);\n\t--color-violet-800: oklch(0.432 0.232 292.759);\n\t--color-violet-900: oklch(0.38 0.189 293.745);\n\t--color-violet-950: oklch(0.283 0.141 291.089);\n\t--color-purple-50: oklch(0.977 0.014 308.299);\n\t--color-purple-100: oklch(0.946 0.033 307.174);\n\t--color-purple-200: oklch(0.902 0.063 306.703);\n\t--color-purple-300: oklch(0.827 0.119 306.383);\n\t--color-purple-400: oklch(0.714 0.203 305.504);\n\t--color-purple-500: oklch(0.627 0.265 303.9);\n\t--color-purple-600: oklch(0.558 0.288 302.321);\n\t--color-purple-700: oklch(0.496 0.265 301.924);\n\t--color-purple-800: oklch(0.438 0.218 303.724);\n\t--color-purple-900: oklch(0.381 0.176 304.987);\n\t--color-purple-950: oklch(0.291 0.149 302.717);\n\t--color-fuchsia-50: oklch(0.977 0.017 320.058);\n\t--color-fuchsia-100: oklch(0.952 0.037 318.852);\n\t--color-fuchsia-200: oklch(0.903 0.076 319.62);\n\t--color-fuchsia-300: oklch(0.833 0.145 321.434);\n\t--color-fuchsia-400: oklch(0.74 0.238 322.16);\n\t--color-fuchsia-500: oklch(0.667 0.295 322.15);\n\t--color-fuchsia-600: oklch(0.591 0.293 322.896);\n\t--color-fuchsia-700: oklch(0.518 0.253 323.949);\n\t--color-fuchsia-800: oklch(0.452 0.211 324.591);\n\t--color-fuchsia-900: oklch(0.401 0.17 325.612);\n\t--color-fuchsia-950: oklch(0.293 0.136 325.661);\n\t--color-pink-50: oklch(0.971 0.014 343.198);\n\t--color-pink-100: oklch(0.948 0.028 342.258);\n\t--color-pink-200: oklch(0.899 0.061 343.231);\n\t--color-pink-300: oklch(0.823 0.12 346.018);\n\t--color-pink-400: oklch(0.718 0.202 349.761);\n\t--color-pink-500: oklch(0.656 0.241 354.308);\n\t--color-pink-600: oklch(0.592 0.249 0.584);\n\t--color-pink-700: oklch(0.525 0.223 3.958);\n\t--color-pink-800: oklch(0.459 0.187 3.815);\n\t--color-pink-900: oklch(0.408 0.153 2.432);\n\t--color-pink-950: oklch(0.284 0.109 3.907);\n\t--color-rose-50: oklch(0.969 0.015 12.422);\n\t--color-rose-100: oklch(0.941 0.03 12.58);\n\t--color-rose-200: oklch(0.892 0.058 10.001);\n\t--color-rose-300: oklch(0.81 0.117 11.638);\n\t--color-rose-400: oklch(0.712 0.194 13.428);\n\t--color-rose-500: oklch(0.645 0.246 16.439);\n\t--color-rose-600: oklch(0.586 0.253 17.585);\n\t--color-rose-700: oklch(0.514 0.222 16.935);\n\t--color-rose-800: oklch(0.455 0.188 13.697);\n\t--color-rose-900: oklch(0.41 0.159 10.272);\n\t--color-rose-950: oklch(0.271 0.105 12.094);\n\t--color-slate-50: oklch(0.984 0.003 247.858);\n\t--color-slate-100: oklch(0.968 0.007 247.896);\n\t--color-slate-200: oklch(0.929 0.013 255.508);\n\t--color-slate-300: oklch(0.869 0.022 252.894);\n\t--color-slate-400: oklch(0.704 0.04 256.788);\n\t--color-slate-500: oklch(0.554 0.046 257.417);\n\t--color-slate-600: oklch(0.446 0.043 257.281);\n\t--color-slate-700: oklch(0.372 0.044 257.287);\n\t--color-slate-800: oklch(0.279 0.041 260.031);\n\t--color-slate-900: oklch(0.208 0.042 265.755);\n\t--color-slate-950: oklch(0.129 0.042 264.695);\n\t--color-gray-50: oklch(0.985 0.002 247.839);\n\t--color-gray-100: oklch(0.967 0.003 264.542);\n\t--color-gray-200: oklch(0.928 0.006 264.531);\n\t--color-gray-300: oklch(0.872 0.01 258.338);\n\t--color-gray-400: oklch(0.707 0.022 261.325);\n\t--color-gray-500: oklch(0.551 0.027 264.364);\n\t--color-gray-600: oklch(0.446 0.03 256.802);\n\t--color-gray-700: oklch(0.373 0.034 259.733);\n\t--color-gray-800: oklch(0.278 0.033 256.848);\n\t--color-gray-900: oklch(0.21 0.034 264.665);\n\t--color-gray-950: oklch(0.13 0.028 261.692);\n\t--color-zinc-50: oklch(0.985 0 0);\n\t--color-zinc-100: oklch(0.967 0.001 286.375);\n\t--color-zinc-200: oklch(0.92 0.004 286.32);\n\t--color-zinc-300: oklch(0.871 0.006 286.286);\n\t--color-zinc-400: oklch(0.705 0.015 286.067);\n\t--color-zinc-500: oklch(0.552 0.016 285.938);\n\t--color-zinc-600: oklch(0.442 0.017 285.786);\n\t--color-zinc-700: oklch(0.37 0.013 285.805);\n\t--color-zinc-800: oklch(0.274 0.006 286.033);\n\t--color-zinc-900: oklch(0.21 0.006 285.885);\n\t--color-zinc-950: oklch(0.141 0.005 285.823);\n\t--color-neutral-50: oklch(0.985 0 0);\n\t--color-neutral-100: oklch(0.97 0 0);\n\t--color-neutral-200: oklch(0.922 0 0);\n\t--color-neutral-300: oklch(0.87 0 0);\n\t--color-neutral-400: oklch(0.708 0 0);\n\t--color-neutral-500: oklch(0.556 0 0);\n\t--color-neutral-600: oklch(0.439 0 0);\n\t--color-neutral-700: oklch(0.371 0 0);\n\t--color-neutral-800: oklch(0.269 0 0);\n\t--color-neutral-900: oklch(0.205 0 0);\n\t--color-neutral-950: oklch(0.145 0 0);\n\t--color-stone-50: oklch(0.985 0.001 106.423);\n\t--color-stone-100: oklch(0.97 0.001 106.424);\n\t--color-stone-200: oklch(0.923 0.003 48.717);\n\t--color-stone-300: oklch(0.869 0.005 56.366);\n\t--color-stone-400: oklch(0.709 0.01 56.259);\n\t--color-stone-500: oklch(0.553 0.013 58.071);\n\t--color-stone-600: oklch(0.444 0.011 73.639);\n\t--color-stone-700: oklch(0.374 0.01 67.558);\n\t--color-stone-800: oklch(0.268 0.007 34.298);\n\t--color-stone-900: oklch(0.216 0.006 56.043);\n\t--color-stone-950: oklch(0.147 0.004 49.25);\n\t--color-black: #000;\n\t--color-white: #fff;\n\t--spacing: 0.25rem;\n\t--breakpoint-sm: 40rem;\n\t--breakpoint-md: 48rem;\n\t--breakpoint-lg: 64rem;\n\t--breakpoint-xl: 80rem;\n\t--breakpoint-2xl: 96rem;\n\t--container-3xs: 16rem;\n\t--container-2xs: 18rem;\n\t--container-xs: 20rem;\n\t--container-sm: 24rem;\n\t--container-md: 28rem;\n\t--container-lg: 32rem;\n\t--container-xl: 36rem;\n\t--container-2xl: 42rem;\n\t--container-3xl: 48rem;\n\t--container-4xl: 56rem;\n\t--container-5xl: 64rem;\n\t--container-6xl: 72rem;\n\t--container-7xl: 80rem;\n\t--text-xs: 0.75rem;\n\t--text-xs--line-height: calc(1 / 0.75);\n\t--text-sm: 0.875rem;\n\t--text-sm--line-height: calc(1.25 / 0.875);\n\t--text-base: 1rem;\n\t--text-base--line-height: calc(1.5 / 1);\n\t--text-lg: 1.125rem;\n\t--text-lg--line-height: calc(1.75 / 1.125);\n\t--text-xl: 1.25rem;\n\t--text-xl--line-height: calc(1.75 / 1.25);\n\t--text-2xl: 1.5rem;\n\t--text-2xl--line-height: calc(2 / 1.5);\n\t--text-3xl: 1.875rem;\n\t--text-3xl--line-height: calc(2.25 / 1.875);\n\t--text-4xl: 2.25rem;\n\t--text-4xl--line-height: calc(2.5 / 2.25);\n\t--text-5xl: 3rem;\n\t--text-5xl--line-height: 1;\n\t--text-6xl: 3.75rem;\n\t--text-6xl--line-height: 1;\n\t--text-7xl: 4.5rem;\n\t--text-7xl--line-height: 1;\n\t--text-8xl: 6rem;\n\t--text-8xl--line-height: 1;\n\t--text-9xl: 8rem;\n\t--text-9xl--line-height: 1;\n\t--font-weight-thin: 100;\n\t--font-weight-extralight: 200;\n\t--font-weight-light: 300;\n\t--font-weight-normal: 400;\n\t--font-weight-medium: 500;\n\t--font-weight-semibold: 600;\n\t--font-weight-bold: 700;\n\t--font-weight-extrabold: 800;\n\t--font-weight-black: 900;\n\t--tracking-tighter: -0.05em;\n\t--tracking-tight: -0.025em;\n\t--tracking-normal: 0em;\n\t--tracking-wide: 0.025em;\n\t--tracking-wider: 0.05em;\n\t--tracking-widest: 0.1em;\n\t--leading-tight: 1.25;\n\t--leading-snug: 1.375;\n\t--leading-normal: 1.5;\n\t--leading-relaxed: 1.625;\n\t--leading-loose: 2;\n\t--radius-xs: 0.125rem;\n\t--radius-sm: 0.25rem;\n\t--radius-md: 0.375rem;\n\t--radius-lg: 0.5rem;\n\t--radius-xl: 0.75rem;\n\t--radius-2xl: 1rem;\n\t--radius-3xl: 1.5rem;\n\t--radius-4xl: 2rem;\n\t--shadow-smxs: 0 1px rgb(0 0 0 / 0.05);\n\t--shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n\t--shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n\t--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n\t--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n\t--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n\t--shadow-smxl: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n\t--inset-shadow-smxs: inset 0 1px rgb(0 0 0 / 0.05);\n\t--inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / 0.05);\n\t--inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / 0.05);\n\t--drop-shadow-xs: 0 1px 1px rgb(0 0 0 / 0.05);\n\t--drop-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.15);\n\t--drop-shadow-md: 0 3px 3px rgb(0 0 0 / 0.12);\n\t--drop-shadow-lg: 0 4px 4px rgb(0 0 0 / 0.15);\n\t--drop-shadow-xl: 0 9px 7px rgb(0 0 0 / 0.1);\n\t--drop-shadow-smxl: 0 25px 25px rgb(0 0 0 / 0.15);\n\t--blur-xs: 4px;\n\t--blur-sm: 8px;\n\t--blur-md: 12px;\n\t--blur-lg: 16px;\n\t--blur-xl: 24px;\n\t--blur-2xl: 40px;\n\t--blur-3xl: 64px;\n\t--perspective-dramatic: 100px;\n\t--perspective-near: 300px;\n\t--perspective-normal: 500px;\n\t--perspective-midrange: 800px;\n\t--perspective-distant: 1200px;\n\t--aspect-video: 16 / 9;\n\t--aspect-a4: 210 / 297;\n\t--ease-in: cubic-bezier(0.4, 0, 1, 1);\n\t--ease-out: cubic-bezier(0, 0, 0.2, 1);\n\t--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n\t--animate-spin: spin 1s linear infinite;\n\t--animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;\n\t--animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n\t--animate-bounce: bounce 1s infinite;\n\t/* Presentation animations */\n\t--animate-float-1: float-drift 20s ease-in-out infinite;\n\t--animate-float-2: float-drift-alt 25s ease-in-out infinite;\n\t--animate-float-3: float-drift 30s ease-in-out infinite reverse;\n\t--animate-pulse-glow: pulse-glow 8s ease-in-out infinite;\n\t--animate-spin-slow: slow-spin 120s linear infinite;\n\n\t/* Scene nebula layers */\n\t--animate-aurora-drift: aurora-drift 30s ease-in-out infinite;\n\t--animate-scene-enter: scene-enter 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;\n\n\n\n\t/* Color System */\n\t--md-sys-color-scrim: var(--schmancy-sys-color-scrim);\n\t--md-sys-color-outline: var(--schmancy-sys-color-outline);\n\t--md-sys-color-outlineVariant: var(--schmancy-sys-color-outlineVariant);\n\t/* Surface Colors */\n\t--md-sys-color-surface-default: var(--schmancy-sys-color-surface-default);\n\t--md-sys-color-surface-dim: var(--schmancy-sys-color-surface-dim);\n\t--md-sys-color-surface-bright: var(--schmancy-sys-color-surface-bright);\n\t--md-sys-color-surface-container: var(--schmancy-sys-color-surface-container);\n\t--md-sys-color-surface-low: var(--schmancy-sys-color-surface-low);\n\t--md-sys-color-surface-high: var(--schmancy-sys-color-surface-high);\n\t--md-sys-color-surface-highest: var(--schmancy-sys-color-surface-highest);\n\t--md-sys-color-surface-lowest: var(--schmancy-sys-color-surface-lowest);\n\t--md-sys-color-surface-on: var(--schmancy-sys-color-surface-on);\n\t--md-sys-color-on-surface-variant: var(--schmancy-sys-color-surface-onVariant);\n\t--md-sys-color-on-secondary-container: var(--schmancy-sys-color-secondary-onContainer);\n\t/* Primary Colors */\n\t--md-sys-color-primary-default: var(--schmancy-sys-color-primary-default);\n\t--md-sys-color-primary-on: var(--schmancy-sys-color-primary-on);\n\t--md-sys-color-primary-container: var(--schmancy-sys-color-primary-container);\n\t--md-sys-color-primary-onContainer: var(--schmancy-sys-color-primary-onContainer);\n\n\t/* Secondary Colors */\n\t--md-sys-color-secondary-default: var(--schmancy-sys-color-secondary-default);\n\t--md-sys-color-secondary-on: var(--schmancy-sys-color-secondary-on);\n\t--md-sys-color-secondary-container: var(--schmancy-sys-color-secondary-container);\n\t--md-sys-color-secondary-onContainer: var(--schmancy-sys-color-secondary-onContainer);\n\n\t/* Tertiary Colors */\n\t--md-sys-color-tertiary-default: var(--schmancy-sys-color-tertiary-default);\n\t--md-sys-color-tertiary-on: var(--schmancy-sys-color-tertiary-on);\n\t--md-sys-color-tertiary-container: var(--schmancy-sys-color-tertiary-container);\n\t--md-sys-color-tertiary-onContainer: var(--schmancy-sys-color-tertiary-onContainer);\n\n\t/* Error Colors */\n\t--md-sys-color-error-default: var(--schmancy-sys-color-error-default);\n\t--md-sys-color-error-on: var(--schmancy-sys-color-error-on);\n\t--md-sys-color-error-container: var(--schmancy-sys-color-error-container);\n\t--md-sys-color-error-onContainer: var(--schmancy-sys-color-error-onContainer);\n\n\t/* Success Colors */\n\t--md-sys-color-success-default: var(--schmancy-sys-color-success-default);\n\t--md-sys-color-success-on: var(--schmancy-sys-color-success-on);\n\t--md-sys-color-success-container: var(--schmancy-sys-color-success-container);\n\t--md-sys-color-success-onContainer: var(--schmancy-sys-color-success-onContainer);\n\n\t/* Warning Colors */\n\t--md-sys-color-warning-default: var(--schmancy-sys-color-warning-default);\n\t--md-sys-color-warning-on: var(--schmancy-sys-color-warning-on);\n\t--md-sys-color-warning-container: var(--schmancy-sys-color-warning-container);\n\t--md-sys-color-warning-onContainer: var(--schmancy-sys-color-warning-onContainer);\n\n\t/* Info Colors */\n\t--md-sys-color-info-default: var(--schmancy-sys-color-info-default);\n\t--md-sys-color-info-on: var(--schmancy-sys-color-info-on);\n\t--md-sys-color-info-container: var(--schmancy-sys-color-info-container);\n\t--md-sys-color-info-onContainer: var(--schmancy-sys-color-info-onContainer);\n\n\t/* Elevation Levels */\n\t--md-sys-elevation-0: var(--schmancy-sys-elevation-0);\n\t--md-sys-elevation-1: var(--schmancy-sys-elevation-1);\n\t--md-sys-elevation-2: var(--schmancy-sys-elevation-2);\n\t--md-sys-elevation-3: var(--schmancy-sys-elevation-3);\n\t--md-sys-elevation-4: var(--schmancy-sys-elevation-4);\n\t--md-sys-elevation-5: var(--schmancy-sys-elevation-5);\n\n\t/* Outline */\n\t--md-sys-outline-1: var(--schmancy-sys-outline-1);\n\n\t/* Chips */\n\t--md-filter-chip-label-text-color: var(--schmancy-sys-color-surface-on);\n\n\t/* Checkbox */\n\t--md-checkbox-focus-outline-color: var(--schmancy-sys-color-surface-on);\n\t--md-checkbox-focus-outline-width: 2px;\n\t--md-checkbox-hover-outline-color: var(--schmancy-sys-color-surface-on);\n\t--md-checkbox-hover-outline-width: 2px;\n\t--md-checkbox-pressed-outline-color: var(--schmancy-sys-color-surface-on);\n\t--md-checkbox-pressed-outline-width: 2px;\n\t--md-checkbox-disabled-outline-color: var(--schmancy-sys-color-surface-on);\n\t--md-checkbox-disabled-outline-width: 2px;\n}\n\n@keyframes spin {\n\tto {\n\t\ttransform: rotate(360deg);\n\t}\n}\n@keyframes ping {\n\t75%,\n\t100% {\n\t\ttransform: scale(2);\n\t\topacity: 0;\n\t}\n}\n@keyframes pulse {\n\t50% {\n\t\topacity: 0.5;\n\t}\n}\n@keyframes bounce {\n\t0%,\n\t100% {\n\t\ttransform: translateY(-25%);\n\t\tanimation-timing-function: cubic-bezier(0.8, 0, 1, 1);\n\t}\n\t50% {\n\t\ttransform: none;\n\t\tanimation-timing-function: cubic-bezier(0, 0, 0.2, 1);\n\t}\n}\n@keyframes float-drift {\n\t0%, 100% { transform: translate(0, 0) rotate(0deg); }\n\t25% { transform: translate(20px, -30px) rotate(2deg); }\n\t50% { transform: translate(-10px, -50px) rotate(-1deg); }\n\t75% { transform: translate(15px, -20px) rotate(1deg); }\n}\n@keyframes float-drift-alt {\n\t0%, 100% { transform: translate(0, 0) rotate(0deg); }\n\t25% { transform: translate(-25px, 20px) rotate(-2deg); }\n\t50% { transform: translate(15px, 40px) rotate(1deg); }\n\t75% { transform: translate(-20px, 15px) rotate(-1deg); }\n}\n@keyframes pulse-glow {\n\t0%, 100% { opacity: 0.15; transform: scale(1); }\n\t50% { opacity: 0.25; transform: scale(1.05); }\n}\n@keyframes slow-spin {\n\tfrom { transform: rotate(0deg); }\n\tto { transform: rotate(360deg); }\n}\n@keyframes aurora-drift {\n\t0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }\n\t33% { transform: translate(3%, -5%) scale(1.05) rotate(1deg); }\n\t66% { transform: translate(-3%, 3%) scale(0.95) rotate(-1deg); }\n}\n@keyframes scene-enter {\n\tfrom { opacity: 0; transform: scale(0.92); filter: blur(12px); }\n\tto { opacity: 1; transform: scale(1); filter: blur(0px); }\n}\n@keyframes star-appear {\n\tfrom { opacity: 0; transform: scale(0.5); }\n\tto { opacity: 1; transform: scale(1); }\n}\n@keyframes star-twinkle {\n\t0%, 100% { opacity: 1; transform: scale(1); }\n\t50% { opacity: 0.4; transform: scale(0.92); }\n}\n","import { provide } from '@lit/context'\nimport { argbFromHex, themeFromSourceColor } from '@material/material-color-utilities'\nimport { SchmancyElement } from '../../mixins/index'\nimport { html, unsafeCSS } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { Observable, of, switchMap, fromEvent, takeUntil } from 'rxjs'\nimport { themeContext } from './context'\nimport { formatTheme } from './theme.format'\nimport { TSchmancyTheme } from './theme.interface'\nimport { ThemeHereIAm, ThemeWhereAreYou, ThemeWhereAreYouEvent } from './theme.events'\nimport style from './theme.style.css?inline'\nexport const tailwindStyles = unsafeCSS(style)\nconst mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')\nconst $colorScheme = new Observable<string>(subscriber => {\n\t// Emit the initial value\n\tconst initialColorScheme = mediaQuery.matches ? 'dark' : 'light'\n\tsubscriber.next(initialColorScheme)\n\n\t// Subscribe to media query changes using RxJS\n\tconst subscription = fromEvent<MediaQueryListEvent>(mediaQuery, 'change').subscribe(e => {\n\t\tconst newColorScheme = e.matches ? 'dark' : 'light'\n\t\tsubscriber.next(newColorScheme)\n\t})\n\n\t// On unsubscribe, unsubscribe from the RxJS subscription\n\treturn () => subscription.unsubscribe()\n})\n\n/**\n * SchmancyThemeComponent - Provides theming capabilities for Schmancy components.\n *\n * This component manages color schemes, primary colors, and theme distribution\n * throughout the component tree. It can be used at the root level or nested\n * to provide different themes to different parts of the application.\n *\n * @element schmancy-theme\n *\n * @example\n * ```html\n * <!-- Root theme provider -->\n * <schmancy-theme color=\"#6200ee\" scheme=\"auto\" root>\n * <your-app></your-app>\n * </schmancy-theme>\n *\n * <!-- Nested theme for specific section -->\n * <schmancy-theme color=\"#2196f3\" scheme=\"dark\">\n * <div class=\"dark-section\">\n * <!-- Components here will use blue dark theme -->\n * </div>\n * </schmancy-theme>\n * ```\n */\n@customElement('schmancy-theme')\nexport class SchmancyThemeComponent extends SchmancyElement {\n\tstatic styles = [tailwindStyles]\n\n\t/**\n\t * Primary color for the theme in hex format.\n\t * @attr color\n\t * @type {string}\n\t * @default Random generated color\n\t * @example \"#6200ee\"\n\t */\n\t@property({ type: String, reflect: true })\n\tcolor: string\n\n\t/**\n\t * Color scheme for the theme.\n\t * @attr scheme\n\t * @type {'dark' | 'light' | 'auto'}\n\t * @default 'auto'\n\t */\n\t@property({ type: String }) scheme: 'dark' | 'light' | 'auto' = 'auto'\n\n\t/**\n\t * Whether this theme should be applied at the root level (document.body).\n\t * @attr root\n\t * @type {boolean}\n\t * @default false\n\t */\n\t@property({ type: Boolean }) root = false\n\n\t/**\n\t * Locale for number/date formatting. Overrides navigator.language when set.\n\t * @attr locale\n\t * @type {string}\n\t * @default navigator.language\n\t * @example \"de-DE\", \"en-US\", \"ar-SA\"\n\t */\n\t@property({ type: String }) locale: string = typeof navigator !== 'undefined' ? navigator.language : 'de-DE'\n\n\t/**\n\t * Unique name for this theme instance (used for session storage).\n\t * If not provided, will be generated from DOM path.\n\t * @attr name\n\t * @type {string}\n\t */\n\t@property({ type: String }) name?: string\n\n\t/**\n\t * Theme configuration object containing all theme variables.\n\t * @property {Partial<TSchmancyTheme>} theme\n\t * @internal\n\t */\n\t@provide({\n\t\tcontext: themeContext,\n\t})\n\t@property({ type: Object })\n\ttheme: Partial<TSchmancyTheme> = {}\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\n\t\t// Generate unique theme name for session storage\n\t\tconst themeName = this.generateThemeName()\n\n\t\t// Priority 1: Session storage\n\t\tconst storedColor = sessionStorage.getItem(`schmancy-theme-${themeName}-color`)\n\t\tconst storedScheme = sessionStorage.getItem(`schmancy-theme-${themeName}-scheme`)\n\n\t\t// Priority 2: Properties (if set via attributes)\n\t\t// Priority 3: Random generation\n\t\tif (!this.color) {\n\t\t\tthis.color = storedColor || this.generateRandomColor()\n\t\t\t// Save the initial color to session storage\n\t\t\tsessionStorage.setItem(`schmancy-theme-${themeName}-color`, this.color)\n\t\t}\n\n\t\tif (!this.hasAttribute('scheme') && storedScheme) {\n\t\t\tthis.scheme = storedScheme as 'dark' | 'light' | 'auto'\n\t\t}\n\n\t\t// Watch only OWN scheme property (independent per instance)\n\t\tof(this.scheme)\n\t\t\t.pipe(\n\t\t\t\tswitchMap(scheme => {\n\t\t\t\t\tif (scheme === 'auto') return $colorScheme\n\t\t\t\t\treturn of(scheme)\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(scheme => {\n\t\t\t\tthis.scheme = scheme as 'dark' | 'light'\n\t\t\t\t// Defer registerTheme() to next microtask to prevent scheduling update during update\n\t\t\t\tqueueMicrotask(() => {\n\t\t\t\t\tthis.registerTheme()\n\t\t\t\t\t// Save to session storage with unique theme name\n\t\t\t\t\tsessionStorage.setItem(`schmancy-theme-${themeName}-scheme`, this.scheme)\n\t\t\t\t})\n\t\t\t})\n\n\t\t// Listen for generic theme discovery events\n\t\tfromEvent<ThemeWhereAreYouEvent>(this, ThemeWhereAreYou)\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(e => {\n\t\t\t\te.stopPropagation()\n\t\t\t\te.preventDefault()\n\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(ThemeHereIAm, {\n\t\t\t\t\t\tdetail: { theme: this },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\t}\n\n\tupdated(changedProperties: Map<string | number | symbol, unknown>): void {\n\t\tsuper.updated(changedProperties)\n\n\t\t// Generate unique theme name for session storage\n\t\tconst themeName = this.generateThemeName()\n\n\t\t// Re-register theme and save to session when properties change\n\t\tif (changedProperties.has('color')) {\n\t\t\tsessionStorage.setItem(`schmancy-theme-${themeName}-color`, this.color)\n\t\t\tthis.registerTheme()\n\t\t}\n\n\t\tif (changedProperties.has('scheme')) {\n\t\t\tsessionStorage.setItem(`schmancy-theme-${themeName}-scheme`, this.scheme)\n\t\t\tthis.registerTheme()\n\t\t}\n\n\t\t// Note: Don't call registerTheme() when 'theme' changes because\n\t\t// registerTheme() sets this.theme - would cause infinite loop\n\n\t\tif (changedProperties.has('locale')) {\n\t\t\tthis.registerTheme()\n\t\t}\n\t}\n\n\tregisterTheme() {\n\t\t// Ensure color is a valid hex string\n\t\tconst colorHex = typeof this.color === 'string' ? this.color : '#6200ee'\n\n\t\tconst formattedTheme = formatTheme(\n\t\t\tthemeFromSourceColor(argbFromHex(colorHex)),\n\t\t\tthis.scheme === 'dark',\n\t\t\t{\n\t\t\t\tsuccess: argbFromHex('#4CAF50'), // Material Green 500 - vibrant but balanced\n\t\t\t\twarning: argbFromHex('#FF9800'), // Material Orange 500 - better contrast than amber\n\t\t\t\tinfo: argbFromHex('#2196F3'), // Material Blue 500 - classic info blue\n\t\t\t},\n\t\t)\n\n\t\t// Update the provided context with locale included\n\t\t// This ensures consumers get the locale via @consume\n\t\tthis.theme = { ...formattedTheme, ...this.theme, locale: this.locale }\n\n\t\tthis.registerThemeValues('schmancy', '', this.theme)\n\n\t\t// Backward compatibility: Map old variable names to new ones\n\t\tconst hostElement = this.root ? document.body : (this.shadowRoot.host as HTMLElement)\n\t\tconst getVar = (name: string) => hostElement.style.getPropertyValue(name)\n\n\t\t// Map old surface container names to new M3 names\n\t\thostElement.style.setProperty(\n\t\t\t'--schmancy-sys-color-surface-low',\n\t\t\tgetVar('--schmancy-sys-color-surface-containerLow'),\n\t\t)\n\t\thostElement.style.setProperty(\n\t\t\t'--schmancy-sys-color-surface-high',\n\t\t\tgetVar('--schmancy-sys-color-surface-containerHigh'),\n\t\t)\n\t\thostElement.style.setProperty(\n\t\t\t'--schmancy-sys-color-surface-highest',\n\t\t\tgetVar('--schmancy-sys-color-surface-containerHighest'),\n\t\t)\n\t\thostElement.style.setProperty(\n\t\t\t'--schmancy-sys-color-surface-lowest',\n\t\t\tgetVar('--schmancy-sys-color-surface-containerLowest'),\n\t\t)\n\n\t\t// Set the color-scheme CSS property on the host element\n\t\thostElement.style.colorScheme = this.scheme === 'dark' ? 'dark' : 'light'\n\t}\n\n\tregisterThemeValues(prefix = 'schmancy', path: string, value: Partial<TSchmancyTheme>): string | undefined {\n\t\t// if the value is an object\n\t\tif (typeof value === 'object') {\n\t\t\t// generate the code for each property of the object\n\t\t\treturn Object.keys(value)\n\t\t\t\t.map(key => {\n\t\t\t\t\t// if the path is empty, don't add a dash\n\t\t\t\t\treturn this.registerThemeValues(\n\t\t\t\t\t\tprefix,\n\t\t\t\t\t\tpath + `${path ? '-' : ''}` + key,\n\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\tvalue[key],\n\t\t\t\t\t)\n\t\t\t\t})\n\t\t\t\t.join('\\n')\n\t\t} else {\n\t\t\t;(this.root ? document.body : (this.shadowRoot.host as HTMLElement)).style.setProperty(\n\t\t\t\t`--${prefix}-${path}`,\n\t\t\t\tvalue,\n\t\t\t)\n\n\t\t\treturn\n\t\t}\n\t}\n\tgenerateRandomColor() {\n\t\t// Generates a random hexadecimal color code\n\t\tconst randomColor = Math.floor(Math.random() * 16777215).toString(16)\n\t\t// Pad with leading zeros if necessary to ensure 6 characters\n\t\treturn '#' + randomColor.padStart(6, '0')\n\t}\n\n\t/**\n\t * Generate a unique theme name based on DOM path\n\t */\n\tprivate generateThemeName(): string {\n\t\t// If name is provided, use it\n\t\tif (this.name) return this.name\n\n\t\t// Generate from DOM path\n\t\tconst path: string[] = []\n\t\tlet element: Element | null = this as Element\n\n\t\twhile (element && element !== document.body) {\n\t\t\tconst parent = element.parentElement\n\t\t\tif (parent) {\n\t\t\t\tconst index = Array.from(parent.children).indexOf(element)\n\t\t\t\tconst tag = element.tagName.toLowerCase()\n\t\t\t\tpath.unshift(`${tag}[${index}]`)\n\t\t\t}\n\t\t\telement = parent\n\t\t}\n\n\t\treturn path.join('>')\n\t}\n\n\tprotected render(): unknown {\n\t\treturn html`\n\t\t\t<schmancy-surface type=\"containerLowest\">\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-theme': SchmancyThemeComponent\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { debounceTime, Subject, takeUntil, tap, switchMap, of } from 'rxjs'\nimport type { SchmancyThemeComponent } from './theme.component'\n\nexport interface ColorPreset {\n\tname: string\n\tvalue: string\n\tcategory?: 'primary' | 'secondary' | 'accent'\n}\n\n// Re-export for convenience\nexport type { ColorPreset as ThemeColorPreset }\n\n/**\n * Base theme controller component providing color and scheme controls.\n * Can be used standalone without any specific UI container.\n *\n * @element schmancy-theme-controller\n *\n * @property {ColorPreset[]} customColors - Optional custom color presets\n *\n * @example\n * ```html\n * <schmancy-theme-controller></schmancy-theme-controller>\n *\n * <!-- With custom colors -->\n * <schmancy-theme-controller\n * .customColors=\"${[\n * { name: 'Brand', value: '#FF5722', category: 'primary' }\n * ]}\"\n * ></schmancy-theme-controller>\n * ```\n */\n@customElement('schmancy-theme-controller')\nexport class SchmancyThemeController extends SchmancyElement {\n\t@state() protected currentScheme: 'dark' | 'light' | 'auto' = 'auto'\n\t@state() protected currentColor: string = '#6200ee'\n\t@state() protected resolvedScheme: 'dark' | 'light' = 'light'\n\t@state() private themeComponent: SchmancyThemeComponent | null = null\n\n\t@property({ type: Array }) customColors?: ColorPreset[]\n\n\tprotected colorInput$ = new Subject<string>()\n\n\tprotected get presetColors(): ColorPreset[] {\n\t\tif (this.customColors) return this.customColors\n\n\t\treturn [\n\t\t\t{ name: 'Lavender', value: '#9D8FE8', category: 'primary' },\n\t\t\t{ name: 'Rose', value: '#F48B9D', category: 'accent' },\n\t\t\t{ name: 'Mint', value: '#7ED997', category: 'accent' },\n\t\t\t{ name: 'Amber', value: '#FFC875', category: 'accent' },\n\t\t\t{ name: 'Sky', value: '#6DD5FA', category: 'primary' },\n\t\t\t{ name: 'Coral', value: '#FF9E7C', category: 'secondary' },\n\t\t\t{ name: 'Indigo', value: '#7380E8', category: 'primary' },\n\t\t\t{ name: 'Blush', value: '#FF79A8', category: 'secondary' },\n\t\t\t{ name: 'Aqua', value: '#64E0F0', category: 'accent' },\n\t\t\t{ name: 'Gold', value: '#FFE066', category: 'accent' },\n\t\t\t{ name: 'Slate', value: '#6B7E91', category: 'primary' },\n\t\t\t{ name: 'Onyx', value: '#3D4451', category: 'primary' },\n\t\t\t{ name: 'Plum', value: '#8E6BA8', category: 'secondary' },\n\t\t\t{ name: 'Forest', value: '#5A7A5F', category: 'accent' },\n\t\t\t{ name: 'Navy', value: '#3D5A80', category: 'primary' },\n\t\t\t{ name: 'Burgundy', value: '#994F5E', category: 'accent' },\n\t\t]\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Discover the nearest theme component\n\t\tthis.discover<SchmancyThemeComponent>('schmancy-theme').pipe(\n\t\t\tswitchMap(theme => {\n\t\t\t\tif (theme) {\n\t\t\t\t\tthis.themeComponent = theme\n\t\t\t\t\t// Set initial values from discovered theme\n\t\t\t\t\tthis.currentScheme = theme.scheme\n\t\t\t\t\tthis.currentColor = theme.color\n\n\t\t\t\t\t// Watch for theme property changes\n\t\t\t\t\treturn new Subject().pipe(\n\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\tif (this.themeComponent) {\n\t\t\t\t\t\t\t\tthis.currentScheme = this.themeComponent.scheme\n\t\t\t\t\t\t\t\tthis.currentColor = this.themeComponent.color\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\treturn of(null)\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting)\n\t\t).subscribe()\n\n\t\t// Debounced color input\n\t\tthis.colorInput$.pipe(\n\t\t\tdebounceTime(150),\n\t\t\ttap(color => {\n\t\t\t\tif (this.themeComponent) {\n\t\t\t\t\tthis.themeComponent.color = color\n\t\t\t\t}\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting)\n\t\t).subscribe()\n\t}\n\n\tprotected setScheme(scheme: 'dark' | 'light' | 'auto') {\n\t\tif (this.themeComponent) {\n\t\t\tthis.themeComponent.scheme = scheme\n\t\t\tthis.currentScheme = scheme\n\t\t}\n\t}\n\n\tprotected setColor(color: string) {\n\t\tif (this.themeComponent) {\n\t\t\tthis.themeComponent.color = color\n\t\t\tthis.currentColor = color\n\t\t}\n\t}\n\n\tprotected handleColorInput(e: Event) {\n\t\tconst input = e.target as HTMLInputElement\n\t\tthis.colorInput$.next(input.value)\n\t}\n\n\tprotected randomColor() {\n\t\tconst random = this.presetColors[Math.floor(Math.random() * this.presetColors.length)]\n\t\tthis.setColor(random.value)\n\t}\n\n\tprotected triggerColorPicker() {\n\t\tconst input = this.renderRoot.querySelector('input[type=\"color\"]') as HTMLInputElement\n\t\tinput?.click()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"space-y-4\">\n\t\t\t\t<!-- Color Display -->\n\t\t\t\t<div class=\"flex items-center gap-3\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"w-16 h-16 rounded-xl border-2 border-outline cursor-pointer transition-transform hover:scale-105 active:scale-95\"\n\t\t\t\t\t\tstyle=\"background: ${this.currentColor}\"\n\t\t\t\t\t\t@click=\"${this.triggerColorPicker}\"\n\t\t\t\t\t\ttitle=\"Click to change color\"\n\t\t\t\t\t></div>\n\t\t\t\t\t<div class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t<schmancy-typography type=\"body\" class=\"font-mono opacity-60\"> ${this.currentColor} </schmancy-typography>\n\t\t\t\t\t\t<div class=\"flex gap-1 mt-2\">\n\t\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t\tvariant=\"${this.currentScheme === 'light' ? 'tonal' : 'text'}\"\n\t\t\t\t\t\t\t\t@click=\"${() => this.setScheme('light')}\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<schmancy-icon>light_mode</schmancy-icon>\n\t\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t\tvariant=\"${this.currentScheme === 'dark' ? 'tonal' : 'text'}\"\n\t\t\t\t\t\t\t\t@click=\"${() => this.setScheme('dark')}\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<schmancy-icon>dark_mode</schmancy-icon>\n\t\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t\tvariant=\"${this.currentScheme === 'auto' ? 'tonal' : 'text'}\"\n\t\t\t\t\t\t\t\t@click=\"${() => this.setScheme('auto')}\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<schmancy-icon>contrast</schmancy-icon>\n\t\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t\t<schmancy-button variant=\"text\" @click=\"${this.randomColor}\">\n\t\t\t\t\t\t\t\t<schmancy-icon>shuffle</schmancy-icon>\n\t\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Palette -->\n\t\t\t\t<div class=\"flex flex-wrap gap-1.5\">\n\t\t\t\t\t${this.presetColors.map(\n\t\t\t\t\t\tcolor => html`\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tclass=\"w-7 h-7 rounded-full transition-all hover:scale-110 active:scale-95 ${this.currentColor ===\n\t\t\t\t\t\t\t\tcolor.value\n\t\t\t\t\t\t\t\t\t? 'ring-2 ring-primary ring-offset-1'\n\t\t\t\t\t\t\t\t\t: ''}\"\n\t\t\t\t\t\t\t\tstyle=\"background: ${color.value}\"\n\t\t\t\t\t\t\t\t@click=\"${() => this.setColor(color.value)}\"\n\t\t\t\t\t\t\t\ttitle=\"${color.name}\"\n\t\t\t\t\t\t\t></button>\n\t\t\t\t\t\t`,\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Hidden Color Input -->\n\t\t\t\t<input type=\"color\" .value=\"${this.currentColor}\" @input=\"${this.handleColorInput}\" class=\"hidden\" />\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-theme-controller': SchmancyThemeController\n\t}\n}","/**\n * Theme Audio Player Component\n *\n * A generic audio player that generates emotional sounds based on user mood and theme color.\n * Integrates with the Sound Service for playback and theme management.\n * Uses local storage for persistence via the Sound Service.\n *\n * @element schmancy-theme-audio-player\n *\n * @fires schmancy-generate-mood-audio - Dispatched when user requests audio generation\n * detail: { moodText: string, themeColor: string, scheme: 'dark' | 'light' | 'auto' }\n *\n * @example\n * ```html\n * <schmancy-theme-audio-player\n * @schmancy-generate-mood-audio=${(e) => handleGenerate(e.detail)}\n * ></schmancy-theme-audio-player>\n * ```\n */\n\nimport { SchmancyElement } from '@mixins/index'\nimport { html, css } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\nimport { debounceTime, Subject, takeUntil, tap, switchMap, of } from 'rxjs'\nimport { sound } from '../audio/sound.service'\nimport type { SchmancyThemeComponent } from './theme.component'\nimport type {\n\tAudioSequence,\n\tGenerateMoodAudioRequest,\n\tGenerateMoodAudioResponse,\n\tSoundTheme,\n\tFeeling,\n} from '@schmancy/types/mood-audio.types'\n\n/** Event detail for mood audio generation request */\nexport interface GenerateMoodAudioEventDetail extends GenerateMoodAudioRequest {}\n\n/** Custom event for requesting mood audio generation */\nexport class SchmancyGenerateMoodAudioEvent extends CustomEvent<GenerateMoodAudioEventDetail> {\n\tconstructor(detail: GenerateMoodAudioEventDetail) {\n\t\tsuper('schmancy-generate-mood-audio', {\n\t\t\tdetail,\n\t\t\tbubbles: true,\n\t\t\tcomposed: true,\n\t\t})\n\t}\n}\n\n// Add to global event map\ndeclare global {\n\tinterface HTMLElementEventMap {\n\t\t'schmancy-generate-mood-audio': SchmancyGenerateMoodAudioEvent\n\t}\n}\n\n/**\n * Mood Audio Player - Generates emotional sounds based on mood and theme\n * Integrates with the Sound Service for consistent sound management\n */\n@customElement('schmancy-theme-audio-player')\nexport class SchmancyThemeAudioPlayer extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`]\n\n\t/** Current theme color */\n\t@state() private currentColor: string = '#6200ee'\n\n\t/** Current color scheme */\n\t@state() private currentScheme: 'dark' | 'light' | 'auto' = 'auto'\n\n\t/** User's mood input */\n\t@state() private moodText: string = ''\n\n\t/** Loading state for AI generation */\n\t@state() private isGenerating: boolean = false\n\n\t/** Generated audio sequence */\n\t@state() private audioSequence: AudioSequence | null = null\n\n\t/** Detected mood from AI */\n\t@state() private detectedMood: string = ''\n\n\t/** Error message */\n\t@state() private error: string = ''\n\n\t/** Current volume from sound service */\n\t@state() private volume: number = 0.15\n\n\t/** Current sound theme name */\n\t@state() private currentThemeName: string = 'default'\n\n\t/** Reference to theme component */\n\tprivate themeComponent: SchmancyThemeComponent | null = null\n\n\t/** Subject for mood input changes */\n\tprivate moodInput$ = new Subject<string>()\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Sync with sound service\n\t\tsound.volume$.pipe(takeUntil(this.disconnecting)).subscribe(vol => {\n\t\t\tthis.volume = vol\n\t\t})\n\n\t\tsound.themeName$.pipe(takeUntil(this.disconnecting)).subscribe(name => {\n\t\t\tthis.currentThemeName = name\n\t\t})\n\n\t\t// Sync the current theme from local storage to update UI\n\t\tsound.theme$.pipe(takeUntil(this.disconnecting)).subscribe(theme => {\n\t\t\tif (theme) {\n\t\t\t\tthis.detectedMood = theme.name.replace('AI: ', '')\n\t\t\t}\n\t\t})\n\n\t\t// Discover the nearest theme component\n\t\tthis.discover<SchmancyThemeComponent>('schmancy-theme')\n\t\t\t.pipe(\n\t\t\t\tswitchMap(theme => {\n\t\t\t\t\tif (theme) {\n\t\t\t\t\t\tthis.themeComponent = theme\n\t\t\t\t\t\tthis.currentScheme = theme.scheme\n\t\t\t\t\t\tthis.currentColor = theme.color\n\n\t\t\t\t\t\t// Create observer for theme changes\n\t\t\t\t\t\treturn new Subject().pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\tif (this.themeComponent) {\n\t\t\t\t\t\t\t\t\tthis.currentScheme = this.themeComponent.scheme\n\t\t\t\t\t\t\t\t\tthis.currentColor = this.themeComponent.color\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t\treturn of(null)\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\t// Debounced mood input for AI generation\n\t\tthis.moodInput$\n\t\t\t.pipe(\n\t\t\t\tdebounceTime(500),\n\t\t\t\ttap(text => {\n\t\t\t\t\tthis.moodText = text\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t/** Handle mood input change */\n\tprivate handleMoodInput(e: Event): void {\n\t\tconst input = e.target as HTMLInputElement\n\t\tthis.moodInput$.next(input.value)\n\t}\n\n\t/** Request mood audio generation - dispatches event for host app to handle */\n\tprivate requestMoodAudio(): void {\n\t\tif (!this.moodText.trim()) {\n\t\t\tthis.error = 'Please enter how you are feeling'\n\t\t\treturn\n\t\t}\n\n\t\tthis.error = ''\n\t\tthis.isGenerating = true\n\t\tthis.audioSequence = null\n\t\tthis.detectedMood = ''\n\n\t\t// Dispatch event for host app to handle the API call\n\t\tthis.dispatchEvent(\n\t\t\tnew SchmancyGenerateMoodAudioEvent({\n\t\t\t\tmoodText: this.moodText.trim(),\n\t\t\t\tthemeColor: this.currentColor,\n\t\t\t\tscheme: this.currentScheme,\n\t\t\t})\n\t\t)\n\t}\n\n\t/**\n\t * Set the response from the API call.\n\t * Called by the host app after handling the schmancy-generate-mood-audio event.\n\t */\n\tpublic setResponse(response: GenerateMoodAudioResponse): void {\n\t\tthis.isGenerating = false\n\n\t\tif (response.success && response.audioSequence) {\n\t\t\tthis.audioSequence = response.audioSequence\n\t\t\tthis.detectedMood = response.detectedMood\n\n\t\t\t// Convert AudioSequence to a SoundTheme and apply it (persists to local storage)\n\t\t\tconst soundTheme = this.audioSequenceToSoundTheme(response.audioSequence, response.detectedMood)\n\t\t\tsound.setTheme(soundTheme)\n\n\t\t\t// Play the detected mood feeling\n\t\t\tthis.playDetectedMood(response.detectedMood)\n\t\t} else {\n\t\t\tthis.error = response.error || 'Failed to generate audio'\n\t\t}\n\t}\n\n\t/**\n\t * Convert an AI-generated AudioSequence to a SoundTheme\n\t */\n\tprivate audioSequenceToSoundTheme(sequence: AudioSequence, detectedMood: string): SoundTheme {\n\t\tconst feeling = this.mapMoodToFeeling(detectedMood)\n\n\t\treturn {\n\t\t\tname: `AI: ${detectedMood}`,\n\t\t\tdescription: sequence.emotionalDescription,\n\t\t\tmasterVolume: sequence.masterVolume,\n\t\t\tfeelings: {\n\t\t\t\t[feeling]: {\n\t\t\t\t\tpuffs: sequence.puffs,\n\t\t\t\t\ttones: sequence.tones,\n\t\t\t\t\tdescription: sequence.emotionalDescription,\n\t\t\t\t},\n\t\t\t},\n\t\t\tmetadata: {\n\t\t\t\tsourceColor: this.currentColor,\n\t\t\t\tsourceMood: this.moodText,\n\t\t\t\tscheme: this.currentScheme,\n\t\t\t\tgeneratedAt: new Date().toISOString(),\n\t\t\t\tgeneratedBy: 'AI',\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Map a detected mood string to a Feeling type\n\t */\n\tprivate mapMoodToFeeling(mood: string): Feeling {\n\t\tconst normalizedMood = mood.toLowerCase().trim()\n\n\t\tconst directMatches: Record<string, Feeling> = {\n\t\t\tjoyful: 'joyful',\n\t\t\thappy: 'joyful',\n\t\t\tjoy: 'joyful',\n\t\t\tcontent: 'content',\n\t\t\tsatisfied: 'content',\n\t\t\texcited: 'excited',\n\t\t\tthrilled: 'excited',\n\t\t\tproud: 'proud',\n\t\t\thopeful: 'hopeful',\n\t\t\trelieved: 'relieved',\n\t\t\tgrateful: 'grateful',\n\t\t\tthankful: 'grateful',\n\t\t\tpeaceful: 'peaceful',\n\t\t\tserene: 'peaceful',\n\t\t\tplayful: 'playful',\n\t\t\tamused: 'amused',\n\t\t\tcurious: 'curious',\n\t\t\tinterested: 'curious',\n\t\t\tinspired: 'inspired',\n\t\t\tconfident: 'confident',\n\t\t\tloved: 'loved',\n\t\t\tcomforted: 'comforted',\n\t\t\tenergized: 'energized',\n\t\t\tcelebrated: 'celebrated',\n\t\t\tsad: 'sad',\n\t\t\tunhappy: 'sad',\n\t\t\tlonely: 'lonely',\n\t\t\talone: 'lonely',\n\t\t\tdisappointed: 'disappointed',\n\t\t\tmelancholic: 'melancholic',\n\t\t\tanxious: 'anxious',\n\t\t\tworried: 'worried',\n\t\t\tnervous: 'nervous',\n\t\t\tstressed: 'stressed',\n\t\t\toverwhelmed: 'overwhelmed',\n\t\t\tannoyed: 'annoyed',\n\t\t\tfrustrated: 'frustrated',\n\t\t\tangry: 'angry',\n\t\t\ttired: 'tired',\n\t\t\texhausted: 'exhausted',\n\t\t\tbored: 'bored',\n\t\t\tcalm: 'calm',\n\t\t\trelaxed: 'relaxed',\n\t\t\tconnected: 'connected',\n\t\t\tnostalgic: 'nostalgic',\n\t\t\tsurprised: 'surprised',\n\t\t\tconfused: 'confused',\n\t\t}\n\n\t\tif (directMatches[normalizedMood]) {\n\t\t\treturn directMatches[normalizedMood]\n\t\t}\n\n\t\tfor (const [keyword, feeling] of Object.entries(directMatches)) {\n\t\t\tif (normalizedMood.includes(keyword)) {\n\t\t\t\treturn feeling\n\t\t\t}\n\t\t}\n\n\t\treturn 'calm'\n\t}\n\n\t/**\n\t * Play the detected mood using the sound service\n\t */\n\tprivate playDetectedMood(mood: string): void {\n\t\tconst feeling = this.mapMoodToFeeling(mood)\n\t\tsound.play(feeling)\n\t}\n\n\t/**\n\t * Set an error state. Called by host app if API call fails.\n\t */\n\tpublic setError(message: string): void {\n\t\tthis.isGenerating = false\n\t\tthis.error = message\n\t}\n\n\t/** Replay the current audio sequence using sound service */\n\tprivate replay(): void {\n\t\tif (this.detectedMood) {\n\t\t\tthis.playDetectedMood(this.detectedMood)\n\t\t}\n\t}\n\n\t/** Handle volume change */\n\tprivate handleVolumeChange(e: Event): void {\n\t\tconst value = parseInt((e.target as HTMLInputElement).value) / 100\n\t\tsound.setVolume(value)\n\t}\n\n\t/** Reset to default sounds */\n\tprivate resetToDefaults(): void {\n\t\tsound.resetTheme()\n\t\tthis.audioSequence = null\n\t\tthis.detectedMood = ''\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"space-y-4\">\n\t\t\t\t<!-- Current Theme Status -->\n\t\t\t\t<div class=\"flex items-center justify-between\">\n\t\t\t\t\t<schmancy-typography type=\"label\" token=\"sm\" class=\"opacity-60\">\n\t\t\t\t\t\tSound Theme: ${this.currentThemeName}\n\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t${when(\n\t\t\t\t\t\tthis.currentThemeName !== 'default',\n\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t<schmancy-button variant=\"text\" size=\"sm\" @click=${() => this.resetToDefaults()}>\n\t\t\t\t\t\t\t\t<schmancy-icon size=\"16px\">refresh</schmancy-icon>\n\t\t\t\t\t\t\t\tReset\n\t\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t`\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Mood Input -->\n\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t<schmancy-typography type=\"label\" token=\"lg\" class=\"text-surface-on\">\n\t\t\t\t\t\tHow are you feeling today?\n\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t<schmancy-input\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tplaceholder=\"I'm feeling...\"\n\t\t\t\t\t\t.value=${this.moodText}\n\t\t\t\t\t\t@input=${this.handleMoodInput}\n\t\t\t\t\t\t.disabled=${this.isGenerating}\n\t\t\t\t\t\tclass=\"w-full\"\n\t\t\t\t\t></schmancy-input>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Current Color Preview -->\n\t\t\t\t<div class=\"flex items-center gap-3\">\n\t\t\t\t\t<div class=\"w-10 h-10 rounded-lg border border-outline\" style=\"background: ${this.currentColor}\"></div>\n\t\t\t\t\t<schmancy-typography type=\"body\" token=\"sm\" class=\"opacity-60\"> Current theme color </schmancy-typography>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Generate Button -->\n\t\t\t\t<schmancy-button\n\t\t\t\t\tvariant=\"filled\"\n\t\t\t\t\t@click=${() => this.requestMoodAudio()}\n\t\t\t\t\t?disabled=${this.isGenerating || !this.moodText.trim()}\n\t\t\t\t\tclass=\"w-full\"\n\t\t\t\t>\n\t\t\t\t\t${when(\n\t\t\t\t\t\tthis.isGenerating,\n\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t<schmancy-progress indeterminate size=\"sm\"></schmancy-progress>\n\t\t\t\t\t\t\t<span class=\"ml-2\">Generating...</span>\n\t\t\t\t\t\t`,\n\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t<schmancy-icon>music_note</schmancy-icon>\n\t\t\t\t\t\t\t<span class=\"ml-2\">Generate Mood Sound</span>\n\t\t\t\t\t\t`\n\t\t\t\t\t)}\n\t\t\t\t</schmancy-button>\n\n\t\t\t\t<!-- Error Message -->\n\t\t\t\t${when(\n\t\t\t\t\tthis.error,\n\t\t\t\t\t() => html`\n\t\t\t\t\t\t<schmancy-surface type=\"error\" class=\"p-3 rounded-lg\">\n\t\t\t\t\t\t\t<schmancy-typography type=\"body\" token=\"sm\" class=\"text-error\"> ${this.error} </schmancy-typography>\n\t\t\t\t\t\t</schmancy-surface>\n\t\t\t\t\t`\n\t\t\t\t)}\n\n\t\t\t\t<!-- Generated Audio Info -->\n\t\t\t\t${when(\n\t\t\t\t\tthis.audioSequence,\n\t\t\t\t\t() => html`\n\t\t\t\t\t\t<schmancy-surface type=\"subtle\" rounded=\"all\" class=\"p-4 space-y-3\">\n\t\t\t\t\t\t\t<div class=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<schmancy-typography type=\"label\" token=\"lg\"> ${this.detectedMood} </schmancy-typography>\n\t\t\t\t\t\t\t\t\t<schmancy-typography type=\"body\" token=\"sm\" class=\"opacity-70\">\n\t\t\t\t\t\t\t\t\t\t${this.audioSequence?.emotionalDescription}\n\t\t\t\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<schmancy-button variant=\"tonal\" @click=${() => this.replay()}>\n\t\t\t\t\t\t\t\t\t<schmancy-icon>replay</schmancy-icon>\n\t\t\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<!-- Audio Visualization -->\n\t\t\t\t\t\t\t<div class=\"flex items-center gap-1 h-8\">\n\t\t\t\t\t\t\t\t${this.audioSequence?.puffs.map(\n\t\t\t\t\t\t\t\t\t(_, i) => html`\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclass=\"w-2 bg-primary rounded-full animate-pulse\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"height: ${20 + i * 8}px; animation-delay: ${i * 0.1}s\"\n\t\t\t\t\t\t\t\t\t\t></div>\n\t\t\t\t\t\t\t\t\t`\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t${this.audioSequence?.tones.map(\n\t\t\t\t\t\t\t\t\tt => html`\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclass=\"w-1 bg-secondary rounded-full\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"height: ${Math.min(32, t.frequency / 40)}px; opacity: ${0.5 + t.volume * 0.5}\"\n\t\t\t\t\t\t\t\t\t\t></div>\n\t\t\t\t\t\t\t\t\t`\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<!-- Volume Control -->\n\t\t\t\t\t\t\t<div class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<schmancy-icon class=\"opacity-50\">volume_down</schmancy-icon>\n\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\ttype=\"range\"\n\t\t\t\t\t\t\t\t\tmin=\"0\"\n\t\t\t\t\t\t\t\t\tmax=\"100\"\n\t\t\t\t\t\t\t\t\t.value=${String(this.volume * 100)}\n\t\t\t\t\t\t\t\t\t@input=${this.handleVolumeChange}\n\t\t\t\t\t\t\t\t\tclass=\"flex-1 h-1 bg-surface-containerHighest rounded-full appearance-none cursor-pointer\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<schmancy-icon class=\"opacity-50\">volume_up</schmancy-icon>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</schmancy-surface>\n\t\t\t\t\t`\n\t\t\t\t)}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-theme-audio-player': SchmancyThemeAudioPlayer\n\t}\n}\n","import { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { SchmancyThemeController } from './theme-controller'\nimport './theme-audio-player'\n\n/**\n * BOAT UX theme controller - Wraps the base theme controller in a schmancy-boat component.\n * Provides a floating, draggable container for theme controls.\n *\n * @element schmancy-theme-controller-boat\n *\n * @extends SchmancyThemeController\n *\n * @example\n * ```html\n * <schmancy-theme-controller-boat></schmancy-theme-controller-boat>\n *\n * <!-- With custom colors -->\n * <schmancy-theme-controller-boat\n * .customColors=\"${[\n * { name: 'Brand', value: '#FF5722', category: 'primary' }\n * ]}\"\n * ></schmancy-theme-controller-boat>\n * ```\n */\n@customElement('schmancy-theme-controller-boat')\nexport class SchmancyThemeControllerBoat extends SchmancyThemeController {\n\trender() {\n\t\treturn html`\n\t\t\t<schmancy-boat id=\"schmancy-theme-component\">\n\t\t\t\t<schmancy-icon slot=\"header\">palette</schmancy-icon>\n\n\t\t\t\t<div class=\"p-4 space-y-6\">\n\t\t\t\t\t${super.render()}\n\n\t\t\t\t\t<!-- Audio Player Section -->\n\t\t\t\t\t<schmancy-divider></schmancy-divider>\n\t\t\t\t\t<schmancy-theme-audio-player></schmancy-theme-audio-player>\n\t\t\t\t</div>\n\t\t\t</schmancy-boat>\n\t\t`\n\t}\n}\n\ndeclare global {\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