@mhmo91/schmancy 0.5.24 → 0.5.26
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/{animated-text-BLtDcshf.js → animated-text-BF-_41Hw.js} +3 -3
- package/dist/{animated-text-BLtDcshf.js.map → animated-text-BF-_41Hw.js.map} +1 -1
- package/dist/{animated-text-1UeLx0sc.cjs → animated-text-D7XcIPvJ.cjs} +2 -2
- package/dist/{animated-text-1UeLx0sc.cjs.map → animated-text-D7XcIPvJ.cjs.map} +1 -1
- package/dist/animated-text.cjs +1 -1
- package/dist/animated-text.js +1 -1
- package/dist/area.cjs +1 -1
- package/dist/{area.component-B5V5Bg5B.cjs → area.component-C1EzgnER.cjs} +2 -2
- package/dist/{area.component-B5V5Bg5B.cjs.map → area.component-C1EzgnER.cjs.map} +1 -1
- package/dist/{area.component-BIRswT0J.js → area.component-C5wZ7yAA.js} +3 -3
- package/dist/{area.component-BIRswT0J.js.map → area.component-C5wZ7yAA.js.map} +1 -1
- package/dist/area.js +1 -1
- package/dist/{autocomplete-BlTQIvvt.js → autocomplete-C2KCl8gZ.js} +4 -4
- package/dist/{autocomplete-BlTQIvvt.js.map → autocomplete-C2KCl8gZ.js.map} +1 -1
- package/dist/{autocomplete-gIoxR7_t.cjs → autocomplete-Dp2pvQ1J.cjs} +2 -2
- package/dist/{autocomplete-gIoxR7_t.cjs.map → autocomplete-Dp2pvQ1J.cjs.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/{avatar-BCOzG2-D.js → avatar-BISA1L6R.js} +51 -51
- package/dist/{avatar-BCOzG2-D.js.map → avatar-BISA1L6R.js.map} +1 -1
- package/dist/{avatar-BAVfTtEM.cjs → avatar-dRvfep6e.cjs} +2 -2
- package/dist/{avatar-BAVfTtEM.cjs.map → avatar-dRvfep6e.cjs.map} +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/boat-B7y4ZeDv.cjs +83 -0
- package/dist/boat-B7y4ZeDv.cjs.map +1 -0
- package/dist/boat-BDARBzjf.js +240 -0
- package/dist/boat-BDARBzjf.js.map +1 -0
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +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.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-Dim_q5YB.js → checkbox-Bo5DWgmR.js} +2 -2
- package/dist/{checkbox-Dim_q5YB.js.map → checkbox-Bo5DWgmR.js.map} +1 -1
- package/dist/{checkbox-DShC2A6P.cjs → checkbox-Dyj95Cob.cjs} +2 -2
- package/dist/{checkbox-DShC2A6P.cjs.map → checkbox-Dyj95Cob.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{code-preview-Ci_x_fdP.js → code-preview-BkLf1Tjt.js} +2 -2
- package/dist/{code-preview-Ci_x_fdP.js.map → code-preview-BkLf1Tjt.js.map} +1 -1
- package/dist/{code-preview-DI4Fdnf1.cjs → code-preview-Ci4_9dyI.cjs} +2 -2
- package/dist/{code-preview-DI4Fdnf1.cjs.map → code-preview-Ci4_9dyI.cjs.map} +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{date-range-BiLjEqjs.js → date-range-BriVhMyA.js} +3 -3
- package/dist/{date-range-BiLjEqjs.js.map → date-range-BriVhMyA.js.map} +1 -1
- package/dist/{date-range--H8CYCUX.cjs → date-range-BzJ_GFAW.cjs} +2 -2
- package/dist/{date-range--H8CYCUX.cjs.map → date-range-BzJ_GFAW.cjs.map} +1 -1
- package/dist/{date-range-inline-CQ0p9Gk0.js → date-range-inline-C5gZQxPv.js} +3 -3
- package/dist/{date-range-inline-CQ0p9Gk0.js.map → date-range-inline-C5gZQxPv.js.map} +1 -1
- package/dist/{date-range-inline-B91UEouL.cjs → date-range-inline-egzlYgWB.cjs} +2 -2
- package/dist/{date-range-inline-B91UEouL.cjs.map → date-range-inline-egzlYgWB.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-Byxv_EuC.js → delay-3A6yeHgq.js} +2 -2
- package/dist/{delay-Byxv_EuC.js.map → delay-3A6yeHgq.js.map} +1 -1
- package/dist/{delay-D65ijCZW.cjs → delay-9mVh_ncQ.cjs} +2 -2
- package/dist/{delay-D65ijCZW.cjs.map → delay-9mVh_ncQ.cjs.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{details-D7EmD6Vy.cjs → details-BVo7N1R-.cjs} +2 -2
- package/dist/{details-D7EmD6Vy.cjs.map → details-BVo7N1R-.cjs.map} +1 -1
- package/dist/{details-D3krTZot.js → details-b0374YYL.js} +2 -2
- package/dist/{details-D3krTZot.js.map → details-b0374YYL.js.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{dialog-content-BCmJU6-6.js → dialog-content-B2mWmFZf.js} +3 -3
- package/dist/{dialog-content-BCmJU6-6.js.map → dialog-content-B2mWmFZf.js.map} +1 -1
- package/dist/{dialog-content-CIbrBTyn.cjs → dialog-content-B9OkO5fD.cjs} +2 -2
- package/dist/{dialog-content-CIbrBTyn.cjs.map → dialog-content-B9OkO5fD.cjs.map} +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/{divider-2GPNgq-E.cjs → divider-7QB9lkg8.cjs} +2 -2
- package/dist/{divider-2GPNgq-E.cjs.map → divider-7QB9lkg8.cjs.map} +1 -1
- package/dist/{divider-BPrA36H2.js → divider-gwQsKA8E.js} +3 -3
- package/dist/{divider-BPrA36H2.js.map → divider-gwQsKA8E.js.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{dropdown-content-BbekqPxj.cjs → dropdown-content-B8jF14WR.cjs} +2 -2
- package/dist/{dropdown-content-BbekqPxj.cjs.map → dropdown-content-B8jF14WR.cjs.map} +1 -1
- package/dist/{dropdown-content-mlUSVOyD.js → dropdown-content-wWiQrGbJ.js} +3 -3
- package/dist/{dropdown-content-mlUSVOyD.js.map → dropdown-content-wWiQrGbJ.js.map} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{email-recipients-CDD_g5yN.js → email-recipients-BerOPRSS.js} +5 -5
- package/dist/{email-recipients-CDD_g5yN.js.map → email-recipients-BerOPRSS.js.map} +1 -1
- package/dist/{email-recipients-CIg2Zr1g.cjs → email-recipients-DDPOQ6GR.cjs} +2 -2
- package/dist/{email-recipients-CIg2Zr1g.cjs.map → email-recipients-DDPOQ6GR.cjs.map} +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{flex-Dt_5LiZY.cjs → flex-A9QGoIZO.cjs} +2 -2
- package/dist/{flex-Dt_5LiZY.cjs.map → flex-A9QGoIZO.cjs.map} +1 -1
- package/dist/{flex-B80ttpFK.js → flex-CMaGJmsr.js} +2 -2
- package/dist/{flex-B80ttpFK.js.map → flex-CMaGJmsr.js.map} +1 -1
- package/dist/{form-DQy6kwCm.cjs → form-B1MHwY2q.cjs} +2 -2
- package/dist/{form-DQy6kwCm.cjs.map → form-B1MHwY2q.cjs.map} +1 -1
- package/dist/{form-BMsARji5.js → form-TwzAo9l7.js} +2 -2
- package/dist/{form-BMsARji5.js.map → form-TwzAo9l7.js.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{formField.mixin-CvAbYIRF.cjs → formField.mixin-BnEz6ZwN.cjs} +2 -2
- package/dist/{formField.mixin-CvAbYIRF.cjs.map → formField.mixin-BnEz6ZwN.cjs.map} +1 -1
- package/dist/{formField.mixin-6n9T0jO7.js → formField.mixin-BssBYPia.js} +2 -2
- package/dist/{formField.mixin-6n9T0jO7.js.map → formField.mixin-BssBYPia.js.map} +1 -1
- package/dist/{icon-FPVUigzr.cjs → icon-BAcc1N7i.cjs} +2 -2
- package/dist/{icon-FPVUigzr.cjs.map → icon-BAcc1N7i.cjs.map} +1 -1
- package/dist/{icon-TyfiEK7a.js → icon-Bc-fZOsV.js} +2 -2
- package/dist/{icon-TyfiEK7a.js.map → icon-Bc-fZOsV.js.map} +1 -1
- package/dist/{icon-button-DOk1cdCw.js → icon-button-bMlXZsaD.js} +3 -3
- package/dist/{icon-button-DOk1cdCw.js.map → icon-button-bMlXZsaD.js.map} +1 -1
- package/dist/{icon-button-CVTYisTH.cjs → icon-button-u2JxLUVz.cjs} +2 -2
- package/dist/{icon-button-CVTYisTH.cjs.map → icon-button-u2JxLUVz.cjs.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +166 -163
- package/dist/{input-Cf5oQC-b.cjs → input-64Amkh7B.cjs} +2 -2
- package/dist/{input-Cf5oQC-b.cjs.map → input-64Amkh7B.cjs.map} +1 -1
- package/dist/{input-DdSxDY3S.js → input-CBpMXWq5.js} +3 -3
- package/dist/{input-DdSxDY3S.js.map → input-CBpMXWq5.js.map} +1 -1
- package/dist/{input-chip-Bps8lWjC.cjs → input-chip-BOD5fjLj.cjs} +2 -2
- package/dist/{input-chip-Bps8lWjC.cjs.map → input-chip-BOD5fjLj.cjs.map} +1 -1
- package/dist/{input-chip-BwjgX7hk.js → input-chip-BdOr_Bst.js} +2 -2
- package/dist/{input-chip-BwjgX7hk.js.map → input-chip-BdOr_Bst.js.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/{list-6DG-gWkP.cjs → list-D_RsjBt7.cjs} +2 -2
- package/dist/{list-6DG-gWkP.cjs.map → list-D_RsjBt7.cjs.map} +1 -1
- package/dist/{list-lGihowZf.js → list-kbaJkd6g.js} +2 -2
- package/dist/{list-lGihowZf.js.map → list-kbaJkd6g.js.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-COkgumbp.js → litElement.mixin-BjvDNbpd.js} +2 -2
- package/dist/{litElement.mixin-COkgumbp.js.map → litElement.mixin-BjvDNbpd.js.map} +1 -1
- package/dist/{litElement.mixin-BOqWtWD7.cjs → litElement.mixin-wU3TW8NU.cjs} +2 -2
- package/dist/{litElement.mixin-BOqWtWD7.cjs.map → litElement.mixin-wU3TW8NU.cjs.map} +1 -1
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-CEmUG79Z.cjs → map-C3aSKiL1.cjs} +2 -2
- package/dist/{map-CEmUG79Z.cjs.map → map-C3aSKiL1.cjs.map} +1 -1
- package/dist/{map-Dm6-Ldi2.js → map-DhyZmeSW.js} +2 -2
- package/dist/{map-Dm6-Ldi2.js.map → map-DhyZmeSW.js.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/{media-I-gnfGOG.js → media-CXD15d1H.js} +2 -2
- package/dist/{media-I-gnfGOG.js.map → media-CXD15d1H.js.map} +1 -1
- package/dist/{media-DR-39DF4.cjs → media-DPyw2ILI.cjs} +2 -2
- package/dist/{media-DR-39DF4.cjs.map → media-DPyw2ILI.cjs.map} +1 -1
- package/dist/{menu-ybFe4rip.js → menu-BWAj2ToG.js} +3 -3
- package/dist/{menu-ybFe4rip.js.map → menu-BWAj2ToG.js.map} +1 -1
- package/dist/{menu-CBV9tC7E.cjs → menu-GScOP0tp.cjs} +2 -2
- package/dist/{menu-CBV9tC7E.cjs.map → menu-GScOP0tp.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/mixins/tailwind.css +0 -247
- 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-BdV-lakC.js → navigation-rail-Cwhii1Km.js} +3 -3
- package/dist/{navigation-rail-BdV-lakC.js.map → navigation-rail-Cwhii1Km.js.map} +1 -1
- package/dist/{navigation-rail-B8P5mauT.cjs → navigation-rail-DpffIkNR.cjs} +2 -2
- package/dist/{navigation-rail-B8P5mauT.cjs.map → navigation-rail-DpffIkNR.cjs.map} +1 -1
- package/dist/navigation-rail.cjs +1 -1
- package/dist/navigation-rail.js +1 -1
- package/dist/{notification-service-Dnfci5v7.cjs → notification-service-CiS9cxNM.cjs} +2 -2
- package/dist/{notification-service-Dnfci5v7.cjs.map → notification-service-CiS9cxNM.cjs.map} +1 -1
- package/dist/{notification-service-CGsSCCzQ.js → notification-service-D9FrcaYV.js} +5 -5
- package/dist/{notification-service-CGsSCCzQ.js.map → notification-service-D9FrcaYV.js.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +2 -2
- package/dist/{notify-B6FU_L5j.cjs → notify-BmlPVAHr.cjs} +2 -2
- package/dist/{notify-B6FU_L5j.cjs.map → notify-BmlPVAHr.cjs.map} +1 -1
- package/dist/{notify-CaLeiAjP.js → notify-CHdshRyb.js} +2 -2
- package/dist/{notify-CaLeiAjP.js.map → notify-CHdshRyb.js.map} +1 -1
- package/dist/{option-6lIpPpmL.cjs → option-DA812L2R.cjs} +2 -2
- package/dist/{option-6lIpPpmL.cjs.map → option-DA812L2R.cjs.map} +1 -1
- package/dist/{option-CaU38vIH.js → option-DYw6IjKG.js} +2 -2
- package/dist/{option-CaU38vIH.js.map → option-DYw6IjKG.js.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{payment-card-form-BoiyJ200.cjs → payment-card-form-DI7uO_75.cjs} +2 -2
- package/dist/{payment-card-form-BoiyJ200.cjs.map → payment-card-form-DI7uO_75.cjs.map} +1 -1
- package/dist/{payment-card-form-D1Jwf62h.js → payment-card-form-K2w6cCIE.js} +3 -3
- package/dist/{payment-card-form-D1Jwf62h.js.map → payment-card-form-K2w6cCIE.js.map} +1 -1
- package/dist/{progress-CCDeBrWN.js → progress-CHHtHq7e.js} +2 -2
- package/dist/{progress-CCDeBrWN.js.map → progress-CHHtHq7e.js.map} +1 -1
- package/dist/{progress-D5HItcIt.cjs → progress-DDWci51w.cjs} +2 -2
- package/dist/{progress-D5HItcIt.cjs.map → progress-DDWci51w.cjs.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-button-DBvcq1he.cjs → radio-button-BFWrUvoQ.cjs} +2 -2
- package/dist/{radio-button-DBvcq1he.cjs.map → radio-button-BFWrUvoQ.cjs.map} +1 -1
- package/dist/{radio-button-T2_iDIjn.js → radio-button-Uzt9IgG3.js} +3 -3
- package/dist/{radio-button-T2_iDIjn.js.map → radio-button-Uzt9IgG3.js.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/{schmancy-steps-container-DWIMp6LQ.cjs → schmancy-steps-container-DCIjNVl9.cjs} +2 -2
- package/dist/{schmancy-steps-container-DWIMp6LQ.cjs.map → schmancy-steps-container-DCIjNVl9.cjs.map} +1 -1
- package/dist/{schmancy-steps-container-CqzKB-CU.js → schmancy-steps-container-fxA9vvA6.js} +2 -2
- package/dist/{schmancy-steps-container-CqzKB-CU.js.map → schmancy-steps-container-fxA9vvA6.js.map} +1 -1
- package/dist/{select-BRMGRukN.cjs → select-HByOFIgf.cjs} +2 -2
- package/dist/{select-BRMGRukN.cjs.map → select-HByOFIgf.cjs.map} +1 -1
- package/dist/{select-D609EFnZ.js → select-s2RGXov_.js} +4 -4
- package/dist/{select-D609EFnZ.js.map → select-s2RGXov_.js.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-Dn1oACXH.cjs → sheet-B3SYJ5bI.cjs} +2 -2
- package/dist/{sheet-Dn1oACXH.cjs.map → sheet-B3SYJ5bI.cjs.map} +1 -1
- package/dist/{sheet-bNj12Jep.js → sheet-CHMqdnPC.js} +3 -3
- package/dist/{sheet-bNj12Jep.js.map → sheet-CHMqdnPC.js.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/{slider-DlMSimST.js → slider-B5sg-McD.js} +3 -3
- package/dist/{slider-DlMSimST.js.map → slider-B5sg-McD.js.map} +1 -1
- package/dist/{slider-C5tqF0nO.cjs → slider-C34Lp0Ns.cjs} +2 -2
- package/dist/{slider-C5tqF0nO.cjs.map → slider-C34Lp0Ns.cjs.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-C5gsrJLF.js → spinner-CsdQec_Y.js} +2 -2
- package/dist/{spinner-C5gsrJLF.js.map → spinner-CsdQec_Y.js.map} +1 -1
- package/dist/{spinner-CAlukL4U.cjs → spinner-D2zUun1n.cjs} +2 -2
- package/dist/{spinner-CAlukL4U.cjs.map → spinner-D2zUun1n.cjs.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/{suggestion-chip-Cnwn6c0a.js → suggestion-chip-BE4I1i8Z.js} +3 -3
- package/dist/{suggestion-chip-Cnwn6c0a.js.map → suggestion-chip-BE4I1i8Z.js.map} +1 -1
- package/dist/{suggestion-chip-BVfyK0NJ.cjs → suggestion-chip-jPIhloJG.cjs} +2 -2
- package/dist/{suggestion-chip-BVfyK0NJ.cjs.map → suggestion-chip-jPIhloJG.cjs.map} +1 -1
- package/dist/{surface-DsGqOf5R.cjs → surface-D8fzaQOr.cjs} +2 -2
- package/dist/{surface-DsGqOf5R.cjs.map → surface-D8fzaQOr.cjs.map} +1 -1
- package/dist/{surface-DkMPuTve.js → surface-QCZ627r4.js} +2 -2
- package/dist/{surface-DkMPuTve.js.map → surface-QCZ627r4.js.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-m3BFqpLy.cjs → table-CzHvHTwO.cjs} +2 -2
- package/dist/{table-m3BFqpLy.cjs.map → table-CzHvHTwO.cjs.map} +1 -1
- package/dist/{table-i-NLS62P.js → table-Zvpbmts7.js} +2 -2
- package/dist/{table-i-NLS62P.js.map → table-Zvpbmts7.js.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-compatibility-CorELwOP.cjs → tabs-compatibility-BIwTX2f5.cjs} +2 -2
- package/dist/{tabs-compatibility-CorELwOP.cjs.map → tabs-compatibility-BIwTX2f5.cjs.map} +1 -1
- package/dist/{tabs-compatibility-o-QpicRH.js → tabs-compatibility-BRxG6DfR.js} +2 -2
- package/dist/{tabs-compatibility-o-QpicRH.js.map → tabs-compatibility-BRxG6DfR.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-CvLC4LGm.cjs +2 -0
- package/dist/{tailwind.mixin-B5ggvnsv.cjs.map → tailwind.mixin-CvLC4LGm.cjs.map} +1 -1
- package/dist/tailwind.mixin-DXMWx0zN.js +43 -0
- package/dist/{tailwind.mixin-t4qdJZYU.js.map → tailwind.mixin-DXMWx0zN.js.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-nsQCj801.cjs → textarea-BStwsU5t.cjs} +2 -2
- package/dist/{textarea-nsQCj801.cjs.map → textarea-BStwsU5t.cjs.map} +1 -1
- package/dist/{textarea-Bf4ki8zE.js → textarea-BmfkGMl_.js} +3 -3
- package/dist/{textarea-Bf4ki8zE.js.map → textarea-BmfkGMl_.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-C3276dwN.cjs → theme-button-8UOIxNBy.cjs} +2 -2
- package/dist/{theme-button-C3276dwN.cjs.map → theme-button-8UOIxNBy.cjs.map} +1 -1
- package/dist/{theme-button-Ct614su5.js → theme-button-C0aKpjew.js} +2 -2
- package/dist/{theme-button-Ct614su5.js.map → theme-button-C0aKpjew.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.component-BvUi2mvO.cjs +3 -0
- package/dist/{theme.component-sclZlwEH.cjs.map → theme.component-BvUi2mvO.cjs.map} +1 -1
- package/dist/theme.component-DPfWc8Tz.js +818 -0
- package/dist/{theme.component-BjZrB7ia.js.map → theme.component-DPfWc8Tz.js.map} +1 -1
- package/dist/theme.interface-BLfE5J_1.js +5 -0
- package/dist/theme.interface-BLfE5J_1.js.map +1 -0
- package/dist/theme.interface-BMeNadVb.cjs +2 -0
- package/dist/theme.interface-BMeNadVb.cjs.map +1 -0
- package/dist/theme.js +13 -10
- package/dist/{timezone-Dac-JVch.cjs → timezone-BqVai0NU.cjs} +2 -2
- package/dist/{timezone-Dac-JVch.cjs.map → timezone-BqVai0NU.cjs.map} +1 -1
- package/dist/{timezone-YRr3A-Lm.js → timezone-CyWZzj5y.js} +3 -3
- package/dist/{timezone-YRr3A-Lm.js.map → timezone-CyWZzj5y.js.map} +1 -1
- package/dist/{tooltip-6Oyr6pbf.js → tooltip-ADFA2Hhl.js} +2 -2
- package/dist/{tooltip-6Oyr6pbf.js.map → tooltip-ADFA2Hhl.js.map} +1 -1
- package/dist/{tooltip-DmyzYkj4.cjs → tooltip-B3OI6L58.cjs} +2 -2
- package/dist/{tooltip-DmyzYkj4.cjs.map → tooltip-B3OI6L58.cjs.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-Dykg9PVs.js → tree-B8U0nKLT.js} +2 -2
- package/dist/{tree-Dykg9PVs.js.map → tree-B8U0nKLT.js.map} +1 -1
- package/dist/{tree-Bzi_9Pyn.cjs → tree-Dn_LFln3.cjs} +2 -2
- package/dist/{tree-Bzi_9Pyn.cjs.map → tree-Dn_LFln3.cjs.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-BAWBxSs8.cjs → typewriter-D16QiY6_.cjs} +2 -2
- package/dist/{typewriter-BAWBxSs8.cjs.map → typewriter-D16QiY6_.cjs.map} +1 -1
- package/dist/{typewriter-Bv4bwE0O.js → typewriter-eEIOUfNO.js} +4 -4
- package/dist/{typewriter-Bv4bwE0O.js.map → typewriter-eEIOUfNO.js.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-DpkgWs15.cjs → typography-9tbZm7OD.cjs} +2 -2
- package/dist/{typography-DpkgWs15.cjs.map → typography-9tbZm7OD.cjs.map} +1 -1
- package/dist/{typography-lNs92vU0.js → typography-BuYmtWlY.js} +2 -2
- package/dist/{typography-lNs92vU0.js.map → typography-BuYmtWlY.js.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/package.json +1 -1
- package/types/src/boat/boat.d.ts +34 -18
- package/types/src/theme/context.d.ts +222 -2
- package/types/src/theme/index.d.ts +10 -3
- package/types/src/theme/theme.elevation.d.ts +131 -0
- package/types/src/theme/theme.format.d.ts +32 -5
- package/types/src/theme/theme.interface.d.ts +231 -5
- package/types/src/theme/theme.motion.d.ts +198 -0
- package/types/src/theme/theme.service.d.ts +222 -2
- package/types/src/theme/theme.shape.d.ts +144 -0
- package/types/src/theme/theme.state.d.ts +546 -0
- package/types/src/theme/theme.typography.d.ts +74 -0
- package/dist/boat-Du6EgSxQ.js +0 -157
- package/dist/boat-Du6EgSxQ.js.map +0 -1
- package/dist/boat-Nd_h9cld.cjs +0 -51
- package/dist/boat-Nd_h9cld.cjs.map +0 -1
- package/dist/tailwind.mixin-B5ggvnsv.cjs +0 -2
- package/dist/tailwind.mixin-t4qdJZYU.js +0 -43
- package/dist/theme.component-BjZrB7ia.js +0 -814
- package/dist/theme.component-sclZlwEH.cjs +0 -3
- package/dist/theme.interface-C5Kj6WjD.js +0 -5
- package/dist/theme.interface-C5Kj6WjD.js.map +0 -1
- package/dist/theme.interface-Xg5Zi46a.cjs +0 -2
- package/dist/theme.interface-Xg5Zi46a.cjs.map +0 -1
|
@@ -0,0 +1,818 @@
|
|
|
1
|
+
import { n as Ge, e as Je } from "./provide-tcktw8xB.js";
|
|
2
|
+
import { T as Ke } from "./tailwind.mixin-DXMWx0zN.js";
|
|
3
|
+
import { unsafeCSS as We, html as Qe } from "lit";
|
|
4
|
+
import { property as ue, customElement as Ze } from "lit/decorators.js";
|
|
5
|
+
import { BehaviorSubject as de, distinctUntilChanged as Z, shareReplay as ae, switchMap as xe, Observable as Ee, of as Ce, fromEvent as pe, takeUntil as be, timer as Ve, map as ye, defaultIfEmpty as Be, tap as ge } from "rxjs";
|
|
6
|
+
import { a as we, T as He } from "./theme.events-CPSLaOlR.js";
|
|
7
|
+
function z(r) {
|
|
8
|
+
return r < 0 ? -1 : r === 0 ? 0 : 1;
|
|
9
|
+
}
|
|
10
|
+
function ce(r, e, t) {
|
|
11
|
+
return (1 - t) * r + t * e;
|
|
12
|
+
}
|
|
13
|
+
function fe(r, e, t) {
|
|
14
|
+
return t < r ? r : t > e ? e : t;
|
|
15
|
+
}
|
|
16
|
+
function ve(r) {
|
|
17
|
+
return (r %= 360) < 0 && (r += 360), r;
|
|
18
|
+
}
|
|
19
|
+
function Pe(r, e) {
|
|
20
|
+
return [r[0] * e[0][0] + r[1] * e[0][1] + r[2] * e[0][2], r[0] * e[1][0] + r[1] * e[1][1] + r[2] * e[1][2], r[0] * e[2][0] + r[1] * e[2][1] + r[2] * e[2][2]];
|
|
21
|
+
}
|
|
22
|
+
const Ne = [[0.41233895, 0.35762064, 0.18051042], [0.2126, 0.7152, 0.0722], [0.01932141, 0.11916382, 0.95034478]], Xe = [[3.2413774792388685, -1.5376652402851851, -0.49885366846268053], [-0.9691452513005321, 1.8758853451067872, 0.04156585616912061], [0.05562093689691305, -0.20395524564742123, 1.0571799111220335]], er = [95.047, 100, 108.883];
|
|
23
|
+
function Se(r, e, t) {
|
|
24
|
+
return (255 << 24 | (255 & r) << 16 | (255 & e) << 8 | 255 & t) >>> 0;
|
|
25
|
+
}
|
|
26
|
+
function Oe(r) {
|
|
27
|
+
return Se(Q(r[0]), Q(r[1]), Q(r[2]));
|
|
28
|
+
}
|
|
29
|
+
function Re(r) {
|
|
30
|
+
return r >> 16 & 255;
|
|
31
|
+
}
|
|
32
|
+
function ze(r) {
|
|
33
|
+
return r >> 8 & 255;
|
|
34
|
+
}
|
|
35
|
+
function $e(r) {
|
|
36
|
+
return 255 & r;
|
|
37
|
+
}
|
|
38
|
+
function Me(r) {
|
|
39
|
+
const e = function(t) {
|
|
40
|
+
return Pe([re(Re(t)), re(ze(t)), re($e(t))], Ne);
|
|
41
|
+
}(r)[1];
|
|
42
|
+
return 116 * _e(e / 100) - 16;
|
|
43
|
+
}
|
|
44
|
+
function K(r) {
|
|
45
|
+
return 100 * function(e) {
|
|
46
|
+
const t = 0.008856451679035631, o = 24389 / 27, a = e * e * e;
|
|
47
|
+
return a > t ? a : (116 * e - 16) / o;
|
|
48
|
+
}((r + 16) / 116);
|
|
49
|
+
}
|
|
50
|
+
function De(r) {
|
|
51
|
+
return 116 * _e(r / 100) - 16;
|
|
52
|
+
}
|
|
53
|
+
function re(r) {
|
|
54
|
+
const e = r / 255;
|
|
55
|
+
return e <= 0.040449936 ? e / 12.92 * 100 : 100 * Math.pow((e + 0.055) / 1.055, 2.4);
|
|
56
|
+
}
|
|
57
|
+
function Q(r) {
|
|
58
|
+
const e = r / 100;
|
|
59
|
+
let t = 0;
|
|
60
|
+
return t = e <= 31308e-7 ? 12.92 * e : 1.055 * Math.pow(e, 1 / 2.4) - 0.055, o = 0, a = 255, (n = Math.round(255 * t)) < o ? o : n > a ? a : n;
|
|
61
|
+
var o, a, n;
|
|
62
|
+
}
|
|
63
|
+
function _e(r) {
|
|
64
|
+
return r > 216 / 24389 ? Math.pow(r, 1 / 3) : (903.2962962962963 * r + 16) / 116;
|
|
65
|
+
}
|
|
66
|
+
class q {
|
|
67
|
+
static make(e = /* @__PURE__ */ function() {
|
|
68
|
+
return er;
|
|
69
|
+
}(), t = 200 / Math.PI * K(50) / 100, o = 50, a = 2, n = !1) {
|
|
70
|
+
const s = e, i = 0.401288 * s[0] + 0.650173 * s[1] + -0.051461 * s[2], m = -0.250268 * s[0] + 1.204414 * s[1] + 0.045854 * s[2], h = -2079e-6 * s[0] + 0.048952 * s[1] + 0.953127 * s[2], u = 0.8 + a / 10, k = u >= 0.9 ? ce(0.59, 0.69, 10 * (u - 0.9)) : ce(0.525, 0.59, 10 * (u - 0.8));
|
|
71
|
+
let x = n ? 1 : u * (1 - 1 / 3.6 * Math.exp((-t - 42) / 92));
|
|
72
|
+
x = x > 1 ? 1 : x < 0 ? 0 : x;
|
|
73
|
+
const l = u, g = [x * (100 / i) + 1 - x, x * (100 / m) + 1 - x, x * (100 / h) + 1 - x], v = 1 / (5 * t + 1), P = v * v * v * v, T = 1 - P, C = P * t + 0.1 * T * T * Math.cbrt(5 * t), A = K(o) / e[1], b = 1.48 + Math.sqrt(A), w = 0.725 / Math.pow(A, 0.2), V = w, D = [Math.pow(C * g[0] * i / 100, 0.42), Math.pow(C * g[1] * m / 100, 0.42), Math.pow(C * g[2] * h / 100, 0.42)], I = [400 * D[0] / (D[0] + 27.13), 400 * D[1] / (D[1] + 27.13), 400 * D[2] / (D[2] + 27.13)];
|
|
74
|
+
return new q(A, (2 * I[0] + I[1] + 0.05 * I[2]) * w, w, V, k, l, g, C, Math.pow(C, 0.25), b);
|
|
75
|
+
}
|
|
76
|
+
constructor(e, t, o, a, n, s, i, m, h, u) {
|
|
77
|
+
this.n = e, this.aw = t, this.nbb = o, this.ncb = a, this.c = n, this.nc = s, this.rgbD = i, this.fl = m, this.fLRoot = h, this.z = u;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
q.DEFAULT = q.make();
|
|
81
|
+
class O {
|
|
82
|
+
constructor(e, t, o, a, n, s, i, m, h) {
|
|
83
|
+
this.hue = e, this.chroma = t, this.j = o, this.q = a, this.m = n, this.s = s, this.jstar = i, this.astar = m, this.bstar = h;
|
|
84
|
+
}
|
|
85
|
+
distance(e) {
|
|
86
|
+
const t = this.jstar - e.jstar, o = this.astar - e.astar, a = this.bstar - e.bstar, n = Math.sqrt(t * t + o * o + a * a);
|
|
87
|
+
return 1.41 * Math.pow(n, 0.63);
|
|
88
|
+
}
|
|
89
|
+
static fromInt(e) {
|
|
90
|
+
return O.fromIntInViewingConditions(e, q.DEFAULT);
|
|
91
|
+
}
|
|
92
|
+
static fromIntInViewingConditions(e, t) {
|
|
93
|
+
const o = (65280 & e) >> 8, a = 255 & e, n = re((16711680 & e) >> 16), s = re(o), i = re(a), m = 0.41233895 * n + 0.35762064 * s + 0.18051042 * i, h = 0.2126 * n + 0.7152 * s + 0.0722 * i, u = 0.01932141 * n + 0.11916382 * s + 0.95034478 * i, k = 0.401288 * m + 0.650173 * h - 0.051461 * u, x = -0.250268 * m + 1.204414 * h + 0.045854 * u, l = -2079e-6 * m + 0.048952 * h + 0.953127 * u, g = t.rgbD[0] * k, v = t.rgbD[1] * x, P = t.rgbD[2] * l, T = Math.pow(t.fl * Math.abs(g) / 100, 0.42), C = Math.pow(t.fl * Math.abs(v) / 100, 0.42), A = Math.pow(t.fl * Math.abs(P) / 100, 0.42), b = 400 * z(g) * T / (T + 27.13), w = 400 * z(v) * C / (C + 27.13), V = 400 * z(P) * A / (A + 27.13), D = (11 * b + -12 * w + V) / 11, I = (b + w - 2 * V) / 9, F = (20 * b + 20 * w + 21 * V) / 20, ie = (40 * b + 20 * w + V) / 20, $ = 180 * Math.atan2(I, D) / Math.PI, _ = $ < 0 ? $ + 360 : $ >= 360 ? $ - 360 : $, j = _ * Math.PI / 180, H = ie * t.nbb, U = 100 * Math.pow(H / t.aw, t.c * t.z), te = 4 / t.c * Math.sqrt(U / 100) * (t.aw + 4) * t.fLRoot, oe = _ < 20.14 ? _ + 360 : _, le = 5e4 / 13 * (0.25 * (Math.cos(oe * Math.PI / 180 + 2) + 3.8)) * t.nc * t.ncb * Math.sqrt(D * D + I * I) / (F + 0.305), he = Math.pow(le, 0.9) * Math.pow(1.64 - Math.pow(0.29, t.n), 0.73), me = he * Math.sqrt(U / 100), Ie = me * t.fLRoot, Ue = 50 * Math.sqrt(he * t.c / (t.aw + 4)), qe = (1 + 100 * 7e-3) * U / (1 + 7e-3 * U), Le = 1 / 0.0228 * Math.log(1 + 0.0228 * Ie), je = Le * Math.cos(j), Ye = Le * Math.sin(j);
|
|
94
|
+
return new O(_, me, U, te, Ie, Ue, qe, je, Ye);
|
|
95
|
+
}
|
|
96
|
+
static fromJch(e, t, o) {
|
|
97
|
+
return O.fromJchInViewingConditions(e, t, o, q.DEFAULT);
|
|
98
|
+
}
|
|
99
|
+
static fromJchInViewingConditions(e, t, o, a) {
|
|
100
|
+
const n = 4 / a.c * Math.sqrt(e / 100) * (a.aw + 4) * a.fLRoot, s = t * a.fLRoot, i = t / Math.sqrt(e / 100), m = 50 * Math.sqrt(i * a.c / (a.aw + 4)), h = o * Math.PI / 180, u = (1 + 100 * 7e-3) * e / (1 + 7e-3 * e), k = 1 / 0.0228 * Math.log(1 + 0.0228 * s), x = k * Math.cos(h), l = k * Math.sin(h);
|
|
101
|
+
return new O(o, t, e, n, s, m, u, x, l);
|
|
102
|
+
}
|
|
103
|
+
static fromUcs(e, t, o) {
|
|
104
|
+
return O.fromUcsInViewingConditions(e, t, o, q.DEFAULT);
|
|
105
|
+
}
|
|
106
|
+
static fromUcsInViewingConditions(e, t, o, a) {
|
|
107
|
+
const n = t, s = o, i = Math.sqrt(n * n + s * s), m = (Math.exp(0.0228 * i) - 1) / 0.0228 / a.fLRoot;
|
|
108
|
+
let h = Math.atan2(s, n) * (180 / Math.PI);
|
|
109
|
+
h < 0 && (h += 360);
|
|
110
|
+
const u = e / (1 - 7e-3 * (e - 100));
|
|
111
|
+
return O.fromJchInViewingConditions(u, m, h, a);
|
|
112
|
+
}
|
|
113
|
+
toInt() {
|
|
114
|
+
return this.viewed(q.DEFAULT);
|
|
115
|
+
}
|
|
116
|
+
viewed(e) {
|
|
117
|
+
const t = this.chroma === 0 || this.j === 0 ? 0 : this.chroma / Math.sqrt(this.j / 100), o = Math.pow(t / Math.pow(1.64 - Math.pow(0.29, e.n), 0.73), 1 / 0.9), a = this.hue * Math.PI / 180, n = 0.25 * (Math.cos(a + 2) + 3.8), s = e.aw * Math.pow(this.j / 100, 1 / e.c / e.z), i = n * (5e4 / 13) * e.nc * e.ncb, m = s / e.nbb, h = Math.sin(a), u = Math.cos(a), k = 23 * (m + 0.305) * o / (23 * i + 11 * o * u + 108 * o * h), x = k * u, l = k * h, g = (460 * m + 451 * x + 288 * l) / 1403, v = (460 * m - 891 * x - 261 * l) / 1403, P = (460 * m - 220 * x - 6300 * l) / 1403, T = Math.max(0, 27.13 * Math.abs(g) / (400 - Math.abs(g))), C = z(g) * (100 / e.fl) * Math.pow(T, 1 / 0.42), A = Math.max(0, 27.13 * Math.abs(v) / (400 - Math.abs(v))), b = z(v) * (100 / e.fl) * Math.pow(A, 1 / 0.42), w = Math.max(0, 27.13 * Math.abs(P) / (400 - Math.abs(P))), V = z(P) * (100 / e.fl) * Math.pow(w, 1 / 0.42), D = C / e.rgbD[0], I = b / e.rgbD[1], F = V / e.rgbD[2];
|
|
118
|
+
return function($, _, j) {
|
|
119
|
+
const H = Xe, U = H[0][0] * $ + H[0][1] * _ + H[0][2] * j, te = H[1][0] * $ + H[1][1] * _ + H[1][2] * j, oe = H[2][0] * $ + H[2][1] * _ + H[2][2] * j;
|
|
120
|
+
return Se(Q(U), Q(te), Q(oe));
|
|
121
|
+
}(1.86206786 * D - 1.01125463 * I + 0.14918677 * F, 0.38752654 * D + 0.62144744 * I - 897398e-8 * F, -0.0158415 * D - 0.03412294 * I + 1.04996444 * F);
|
|
122
|
+
}
|
|
123
|
+
static fromXyzInViewingConditions(e, t, o, a) {
|
|
124
|
+
const n = 0.401288 * e + 0.650173 * t - 0.051461 * o, s = -0.250268 * e + 1.204414 * t + 0.045854 * o, i = -2079e-6 * e + 0.048952 * t + 0.953127 * o, m = a.rgbD[0] * n, h = a.rgbD[1] * s, u = a.rgbD[2] * i, k = Math.pow(a.fl * Math.abs(m) / 100, 0.42), x = Math.pow(a.fl * Math.abs(h) / 100, 0.42), l = Math.pow(a.fl * Math.abs(u) / 100, 0.42), g = 400 * z(m) * k / (k + 27.13), v = 400 * z(h) * x / (x + 27.13), P = 400 * z(u) * l / (l + 27.13), T = (11 * g + -12 * v + P) / 11, C = (g + v - 2 * P) / 9, A = (20 * g + 20 * v + 21 * P) / 20, b = (40 * g + 20 * v + P) / 20, w = 180 * Math.atan2(C, T) / Math.PI, V = w < 0 ? w + 360 : w >= 360 ? w - 360 : w, D = V * Math.PI / 180, I = b * a.nbb, F = 100 * Math.pow(I / a.aw, a.c * a.z), ie = 4 / a.c * Math.sqrt(F / 100) * (a.aw + 4) * a.fLRoot, $ = V < 20.14 ? V + 360 : V, _ = 5e4 / 13 * (1 / 4 * (Math.cos($ * Math.PI / 180 + 2) + 3.8)) * a.nc * a.ncb * Math.sqrt(T * T + C * C) / (A + 0.305), j = Math.pow(_, 0.9) * Math.pow(1.64 - Math.pow(0.29, a.n), 0.73), H = j * Math.sqrt(F / 100), U = H * a.fLRoot, te = 50 * Math.sqrt(j * a.c / (a.aw + 4)), oe = (1 + 100 * 7e-3) * F / (1 + 7e-3 * F), le = Math.log(1 + 0.0228 * U) / 0.0228, he = le * Math.cos(D), me = le * Math.sin(D);
|
|
125
|
+
return new O(V, H, F, ie, U, te, oe, he, me);
|
|
126
|
+
}
|
|
127
|
+
xyzInViewingConditions(e) {
|
|
128
|
+
const t = this.chroma === 0 || this.j === 0 ? 0 : this.chroma / Math.sqrt(this.j / 100), o = Math.pow(t / Math.pow(1.64 - Math.pow(0.29, e.n), 0.73), 1 / 0.9), a = this.hue * Math.PI / 180, n = 0.25 * (Math.cos(a + 2) + 3.8), s = e.aw * Math.pow(this.j / 100, 1 / e.c / e.z), i = n * (5e4 / 13) * e.nc * e.ncb, m = s / e.nbb, h = Math.sin(a), u = Math.cos(a), k = 23 * (m + 0.305) * o / (23 * i + 11 * o * u + 108 * o * h), x = k * u, l = k * h, g = (460 * m + 451 * x + 288 * l) / 1403, v = (460 * m - 891 * x - 261 * l) / 1403, P = (460 * m - 220 * x - 6300 * l) / 1403, T = Math.max(0, 27.13 * Math.abs(g) / (400 - Math.abs(g))), C = z(g) * (100 / e.fl) * Math.pow(T, 1 / 0.42), A = Math.max(0, 27.13 * Math.abs(v) / (400 - Math.abs(v))), b = z(v) * (100 / e.fl) * Math.pow(A, 1 / 0.42), w = Math.max(0, 27.13 * Math.abs(P) / (400 - Math.abs(P))), V = z(P) * (100 / e.fl) * Math.pow(w, 1 / 0.42), D = C / e.rgbD[0], I = b / e.rgbD[1], F = V / e.rgbD[2];
|
|
129
|
+
return [1.86206786 * D - 1.01125463 * I + 0.14918677 * F, 0.38752654 * D + 0.62144744 * I - 897398e-8 * F, -0.0158415 * D - 0.03412294 * I + 1.04996444 * F];
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
class p {
|
|
133
|
+
static sanitizeRadians(e) {
|
|
134
|
+
return (e + 8 * Math.PI) % (2 * Math.PI);
|
|
135
|
+
}
|
|
136
|
+
static trueDelinearized(e) {
|
|
137
|
+
const t = e / 100;
|
|
138
|
+
let o = 0;
|
|
139
|
+
return o = t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - 0.055, 255 * o;
|
|
140
|
+
}
|
|
141
|
+
static chromaticAdaptation(e) {
|
|
142
|
+
const t = Math.pow(Math.abs(e), 0.42);
|
|
143
|
+
return 400 * z(e) * t / (t + 27.13);
|
|
144
|
+
}
|
|
145
|
+
static hueOf(e) {
|
|
146
|
+
const t = Pe(e, p.SCALED_DISCOUNT_FROM_LINRGB), o = p.chromaticAdaptation(t[0]), a = p.chromaticAdaptation(t[1]), n = p.chromaticAdaptation(t[2]), s = (11 * o + -12 * a + n) / 11, i = (o + a - 2 * n) / 9;
|
|
147
|
+
return Math.atan2(i, s);
|
|
148
|
+
}
|
|
149
|
+
static areInCyclicOrder(e, t, o) {
|
|
150
|
+
return p.sanitizeRadians(t - e) < p.sanitizeRadians(o - e);
|
|
151
|
+
}
|
|
152
|
+
static intercept(e, t, o) {
|
|
153
|
+
return (t - e) / (o - e);
|
|
154
|
+
}
|
|
155
|
+
static lerpPoint(e, t, o) {
|
|
156
|
+
return [e[0] + (o[0] - e[0]) * t, e[1] + (o[1] - e[1]) * t, e[2] + (o[2] - e[2]) * t];
|
|
157
|
+
}
|
|
158
|
+
static setCoordinate(e, t, o, a) {
|
|
159
|
+
const n = p.intercept(e[a], t, o[a]);
|
|
160
|
+
return p.lerpPoint(e, n, o);
|
|
161
|
+
}
|
|
162
|
+
static isBounded(e) {
|
|
163
|
+
return 0 <= e && e <= 100;
|
|
164
|
+
}
|
|
165
|
+
static nthVertex(e, t) {
|
|
166
|
+
const o = p.Y_FROM_LINRGB[0], a = p.Y_FROM_LINRGB[1], n = p.Y_FROM_LINRGB[2], s = t % 4 <= 1 ? 0 : 100, i = t % 2 == 0 ? 0 : 100;
|
|
167
|
+
if (t < 4) {
|
|
168
|
+
const m = s, h = i, u = (e - m * a - h * n) / o;
|
|
169
|
+
return p.isBounded(u) ? [u, m, h] : [-1, -1, -1];
|
|
170
|
+
}
|
|
171
|
+
if (t < 8) {
|
|
172
|
+
const m = s, h = i, u = (e - h * o - m * n) / a;
|
|
173
|
+
return p.isBounded(u) ? [h, u, m] : [-1, -1, -1];
|
|
174
|
+
}
|
|
175
|
+
{
|
|
176
|
+
const m = s, h = i, u = (e - m * o - h * a) / n;
|
|
177
|
+
return p.isBounded(u) ? [m, h, u] : [-1, -1, -1];
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
static bisectToSegment(e, t) {
|
|
181
|
+
let o = [-1, -1, -1], a = o, n = 0, s = 0, i = !1, m = !0;
|
|
182
|
+
for (let h = 0; h < 12; h++) {
|
|
183
|
+
const u = p.nthVertex(e, h);
|
|
184
|
+
if (u[0] < 0) continue;
|
|
185
|
+
const k = p.hueOf(u);
|
|
186
|
+
i ? (m || p.areInCyclicOrder(n, k, s)) && (m = !1, p.areInCyclicOrder(n, t, k) ? (a = u, s = k) : (o = u, n = k)) : (o = u, a = u, n = k, s = k, i = !0);
|
|
187
|
+
}
|
|
188
|
+
return [o, a];
|
|
189
|
+
}
|
|
190
|
+
static midpoint(e, t) {
|
|
191
|
+
return [(e[0] + t[0]) / 2, (e[1] + t[1]) / 2, (e[2] + t[2]) / 2];
|
|
192
|
+
}
|
|
193
|
+
static criticalPlaneBelow(e) {
|
|
194
|
+
return Math.floor(e - 0.5);
|
|
195
|
+
}
|
|
196
|
+
static criticalPlaneAbove(e) {
|
|
197
|
+
return Math.ceil(e - 0.5);
|
|
198
|
+
}
|
|
199
|
+
static bisectToLimit(e, t) {
|
|
200
|
+
const o = p.bisectToSegment(e, t);
|
|
201
|
+
let a = o[0], n = p.hueOf(a), s = o[1];
|
|
202
|
+
for (let i = 0; i < 3; i++) if (a[i] !== s[i]) {
|
|
203
|
+
let m = -1, h = 255;
|
|
204
|
+
a[i] < s[i] ? (m = p.criticalPlaneBelow(p.trueDelinearized(a[i])), h = p.criticalPlaneAbove(p.trueDelinearized(s[i]))) : (m = p.criticalPlaneAbove(p.trueDelinearized(a[i])), h = p.criticalPlaneBelow(p.trueDelinearized(s[i])));
|
|
205
|
+
for (let u = 0; u < 8 && !(Math.abs(h - m) <= 1); u++) {
|
|
206
|
+
const k = Math.floor((m + h) / 2), x = p.CRITICAL_PLANES[k], l = p.setCoordinate(a, x, s, i), g = p.hueOf(l);
|
|
207
|
+
p.areInCyclicOrder(n, t, g) ? (s = l, h = k) : (a = l, n = g, m = k);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return p.midpoint(a, s);
|
|
211
|
+
}
|
|
212
|
+
static inverseChromaticAdaptation(e) {
|
|
213
|
+
const t = Math.abs(e), o = Math.max(0, 27.13 * t / (400 - t));
|
|
214
|
+
return z(e) * Math.pow(o, 1 / 0.42);
|
|
215
|
+
}
|
|
216
|
+
static findResultByJ(e, t, o) {
|
|
217
|
+
let a = 11 * Math.sqrt(o);
|
|
218
|
+
const n = q.DEFAULT, s = 1 / Math.pow(1.64 - Math.pow(0.29, n.n), 0.73), i = 0.25 * (Math.cos(e + 2) + 3.8) * (5e4 / 13) * n.nc * n.ncb, m = Math.sin(e), h = Math.cos(e);
|
|
219
|
+
for (let u = 0; u < 5; u++) {
|
|
220
|
+
const k = a / 100, x = t === 0 || a === 0 ? 0 : t / Math.sqrt(k), l = Math.pow(x * s, 1 / 0.9), g = n.aw * Math.pow(k, 1 / n.c / n.z) / n.nbb, v = 23 * (g + 0.305) * l / (23 * i + 11 * l * h + 108 * l * m), P = v * h, T = v * m, C = (460 * g + 451 * P + 288 * T) / 1403, A = (460 * g - 891 * P - 261 * T) / 1403, b = (460 * g - 220 * P - 6300 * T) / 1403, w = Pe([p.inverseChromaticAdaptation(C), p.inverseChromaticAdaptation(A), p.inverseChromaticAdaptation(b)], p.LINRGB_FROM_SCALED_DISCOUNT);
|
|
221
|
+
if (w[0] < 0 || w[1] < 0 || w[2] < 0) return 0;
|
|
222
|
+
const V = p.Y_FROM_LINRGB[0], D = p.Y_FROM_LINRGB[1], I = p.Y_FROM_LINRGB[2], F = V * w[0] + D * w[1] + I * w[2];
|
|
223
|
+
if (F <= 0) return 0;
|
|
224
|
+
if (u === 4 || Math.abs(F - o) < 2e-3) return w[0] > 100.01 || w[1] > 100.01 || w[2] > 100.01 ? 0 : Oe(w);
|
|
225
|
+
a -= (F - o) * a / (2 * F);
|
|
226
|
+
}
|
|
227
|
+
return 0;
|
|
228
|
+
}
|
|
229
|
+
static solveToInt(e, t, o) {
|
|
230
|
+
if (t < 1e-4 || o < 1e-4 || o > 99.9999) return function(i) {
|
|
231
|
+
const m = Q(K(i));
|
|
232
|
+
return Se(m, m, m);
|
|
233
|
+
}(o);
|
|
234
|
+
const a = (e = ve(e)) / 180 * Math.PI, n = K(o), s = p.findResultByJ(a, t, n);
|
|
235
|
+
return s !== 0 ? s : Oe(p.bisectToLimit(n, a));
|
|
236
|
+
}
|
|
237
|
+
static solveToCam(e, t, o) {
|
|
238
|
+
return O.fromInt(p.solveToInt(e, t, o));
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
p.SCALED_DISCOUNT_FROM_LINRGB = [[0.001200833568784504, 0.002389694492170889, 2795742885861124e-19], [5891086651375999e-19, 0.0029785502573438758, 3270666104008398e-19], [10146692491640572e-20, 5364214359186694e-19, 0.0032979401770712076]], p.LINRGB_FROM_SCALED_DISCOUNT = [[1373.2198709594231, -1100.4251190754821, -7.278681089101213], [-271.815969077903, 559.6580465940733, -32.46047482791194], [1.9622899599665666, -57.173814538844006, 308.7233197812385]], p.Y_FROM_LINRGB = [0.2126, 0.7152, 0.0722], p.CRITICAL_PLANES = [0.015176349177441876, 0.045529047532325624, 0.07588174588720938, 0.10623444424209313, 0.13658714259697685, 0.16693984095186062, 0.19729253930674434, 0.2276452376616281, 0.2579979360165119, 0.28835063437139563, 0.3188300904430532, 0.350925934958123, 0.3848314933096426, 0.42057480301049466, 0.458183274052838, 0.4976837250274023, 0.5391024159806381, 0.5824650784040898, 0.6277969426914107, 0.6751227633498623, 0.7244668422128921, 0.775853049866786, 0.829304845476233, 0.8848452951698498, 0.942497089126609, 1.0022825574869039, 1.0642236851973577, 1.1283421258858297, 1.1946592148522128, 1.2631959812511864, 1.3339731595349034, 1.407011200216447, 1.4823302800086415, 1.5599503113873272, 1.6398909516233677, 1.7221716113234105, 1.8068114625156377, 1.8938294463134073, 1.9832442801866852, 2.075074464868551, 2.1693382909216234, 2.2660538449872063, 2.36523901573795, 2.4669114995532007, 2.5710888059345764, 2.6777882626779785, 2.7870270208169257, 2.898822059350997, 3.0131901897720907, 3.1301480604002863, 3.2497121605402226, 3.3718988244681087, 3.4967242352587946, 3.624204428461639, 3.754355295633311, 3.887192587735158, 4.022731918402185, 4.160988767090289, 4.301978482107941, 4.445716283538092, 4.592217266055746, 4.741496401646282, 4.893568542229298, 5.048448422192488, 5.20615066083972, 5.3666897647573375, 5.5300801301023865, 5.696336044816294, 5.865471690767354, 6.037501145825082, 6.212438385869475, 6.390297286737924, 6.571091626112461, 6.7548350853498045, 6.941541251256611, 7.131223617812143, 7.323895587840543, 7.5195704746346665, 7.7182615035334345, 7.919981813454504, 8.124744458384042, 8.332562408825165, 8.543448553206703, 8.757415699253682, 8.974476575321063, 9.194643831691977, 9.417930041841839, 9.644347703669503, 9.873909240696694, 10.106627003236781, 10.342513269534024, 10.58158024687427, 10.8238400726681, 11.069304815507364, 11.317986476196008, 11.569896988756009, 11.825048221409341, 12.083451977536606, 12.345119996613247, 12.610063955123938, 12.878295467455942, 13.149826086772048, 13.42466730586372, 13.702830557985108, 13.984327217668513, 14.269168601521828, 14.55736596900856, 14.848930523210871, 15.143873411576273, 15.44220572664832, 15.743938506781891, 16.04908273684337, 16.35764934889634, 16.66964922287304, 16.985093187232053, 17.30399201960269, 17.62635644741625, 17.95219714852476, 18.281524751807332, 18.614349837764564, 18.95068293910138, 19.290534541298456, 19.633915083172692, 19.98083495742689, 20.331304511189067, 20.685334046541502, 21.042933821039977, 21.404114048223256, 21.76888489811322, 22.137256497705877, 22.50923893145328, 22.884842241736916, 23.264076429332462, 23.6469514538663, 24.033477234264016, 24.42366364919083, 24.817520537484558, 25.21505769858089, 25.61628489293138, 26.021211842414342, 26.429848230738664, 26.842203703840827, 27.258287870275353, 27.678110301598522, 28.10168053274597, 28.529008062403893, 28.96010235337422, 29.39497283293396, 29.83362889318845, 30.276079891419332, 30.722335150426627, 31.172403958865512, 31.62629557157785, 32.08401920991837, 32.54558406207592, 33.010999283389665, 33.4802739966603, 33.953417292456834, 34.430438229418264, 34.911345834551085, 35.39614910352207, 35.88485700094671, 36.37747846067349, 36.87402238606382, 37.37449765026789, 37.87891309649659, 38.38727753828926, 38.89959975977785, 39.41588851594697, 39.93615253289054, 40.460400508064545, 40.98864111053629, 41.520882981230194, 42.05713473317016, 42.597404951718396, 43.141702194811224, 43.6900349931913, 44.24241185063697, 44.798841244188324, 45.35933162437017, 45.92389141541209, 46.49252901546552, 47.065252796817916, 47.64207110610409, 48.22299226451468, 48.808024568002054, 49.3971762874833, 49.9904556690408, 50.587870934119984, 51.189430279724725, 51.79514187861014, 52.40501387947288, 53.0190544071392, 53.637271562750364, 54.259673423945976, 54.88626804504493, 55.517063457223934, 56.15206766869424, 56.79128866487574, 57.43473440856916, 58.08241284012621, 58.734331877617365, 59.39049941699807, 60.05092333227251, 60.715611475655585, 61.38457167773311, 62.057811747619894, 62.7353394731159, 63.417162620860914, 64.10328893648692, 64.79372614476921, 65.48848194977529, 66.18756403501224, 66.89098006357258, 67.59873767827808, 68.31084450182222, 69.02730813691093, 69.74813616640164, 70.47333615344107, 71.20291564160104, 71.93688215501312, 72.67524319850172, 73.41800625771542, 74.16517879925733, 74.9167682708136, 75.67278210128072, 76.43322770089146, 77.1981124613393, 77.96744375590167, 78.74122893956174, 79.51947534912904, 80.30219030335869, 81.08938110306934, 81.88105503125999, 82.67721935322541, 83.4778813166706, 84.28304815182372, 85.09272707154808, 85.90692527145302, 86.72564993000343, 87.54890820862819, 88.3767072518277, 89.2090541872801, 90.04595612594655, 90.88742016217518, 91.73345337380438, 92.58406282226491, 93.43925555268066, 94.29903859396902, 95.16341895893969, 96.03240364439274, 96.9059996312159, 97.78421388448044, 98.6670533535366, 99.55452497210776];
|
|
242
|
+
class L {
|
|
243
|
+
static from(e, t, o) {
|
|
244
|
+
return new L(p.solveToInt(e, t, o));
|
|
245
|
+
}
|
|
246
|
+
static fromInt(e) {
|
|
247
|
+
return new L(e);
|
|
248
|
+
}
|
|
249
|
+
toInt() {
|
|
250
|
+
return this.argb;
|
|
251
|
+
}
|
|
252
|
+
get hue() {
|
|
253
|
+
return this.internalHue;
|
|
254
|
+
}
|
|
255
|
+
set hue(e) {
|
|
256
|
+
this.setInternalState(p.solveToInt(e, this.internalChroma, this.internalTone));
|
|
257
|
+
}
|
|
258
|
+
get chroma() {
|
|
259
|
+
return this.internalChroma;
|
|
260
|
+
}
|
|
261
|
+
set chroma(e) {
|
|
262
|
+
this.setInternalState(p.solveToInt(this.internalHue, e, this.internalTone));
|
|
263
|
+
}
|
|
264
|
+
get tone() {
|
|
265
|
+
return this.internalTone;
|
|
266
|
+
}
|
|
267
|
+
set tone(e) {
|
|
268
|
+
this.setInternalState(p.solveToInt(this.internalHue, this.internalChroma, e));
|
|
269
|
+
}
|
|
270
|
+
constructor(e) {
|
|
271
|
+
this.argb = e;
|
|
272
|
+
const t = O.fromInt(e);
|
|
273
|
+
this.internalHue = t.hue, this.internalChroma = t.chroma, this.internalTone = Me(e), this.argb = e;
|
|
274
|
+
}
|
|
275
|
+
setInternalState(e) {
|
|
276
|
+
const t = O.fromInt(e);
|
|
277
|
+
this.internalHue = t.hue, this.internalChroma = t.chroma, this.internalTone = Me(e), this.argb = e;
|
|
278
|
+
}
|
|
279
|
+
inViewingConditions(e) {
|
|
280
|
+
const t = O.fromInt(this.toInt()).xyzInViewingConditions(e), o = O.fromXyzInViewingConditions(t[0], t[1], t[2], q.make());
|
|
281
|
+
return L.from(o.hue, o.chroma, De(t[1]));
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
class Te {
|
|
285
|
+
static harmonize(e, t) {
|
|
286
|
+
const o = L.fromInt(e), a = L.fromInt(t), n = (s = o.hue, i = a.hue, 180 - Math.abs(Math.abs(s - i) - 180));
|
|
287
|
+
var s, i;
|
|
288
|
+
const m = Math.min(0.5 * n, 15), h = ve(o.hue + m * (u = o.hue, ve(a.hue - u) <= 180 ? 1 : -1));
|
|
289
|
+
var u;
|
|
290
|
+
return L.from(h, o.chroma, o.tone).toInt();
|
|
291
|
+
}
|
|
292
|
+
static hctHue(e, t, o) {
|
|
293
|
+
const a = Te.cam16Ucs(e, t, o), n = O.fromInt(a), s = O.fromInt(e);
|
|
294
|
+
return L.from(n.hue, s.chroma, Me(e)).toInt();
|
|
295
|
+
}
|
|
296
|
+
static cam16Ucs(e, t, o) {
|
|
297
|
+
const a = O.fromInt(e), n = O.fromInt(t), s = a.jstar, i = a.astar, m = a.bstar, h = s + (n.jstar - s) * o, u = i + (n.astar - i) * o, k = m + (n.bstar - m) * o;
|
|
298
|
+
return O.fromUcs(h, u, k).toInt();
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
class B {
|
|
302
|
+
static ratioOfTones(e, t) {
|
|
303
|
+
return e = fe(0, 100, e), t = fe(0, 100, t), B.ratioOfYs(K(e), K(t));
|
|
304
|
+
}
|
|
305
|
+
static ratioOfYs(e, t) {
|
|
306
|
+
const o = e > t ? e : t;
|
|
307
|
+
return (o + 5) / ((o === t ? e : t) + 5);
|
|
308
|
+
}
|
|
309
|
+
static lighter(e, t) {
|
|
310
|
+
if (e < 0 || e > 100) return -1;
|
|
311
|
+
const o = K(e), a = t * (o + 5) - 5, n = B.ratioOfYs(a, o), s = Math.abs(n - t);
|
|
312
|
+
if (n < t && s > 0.04) return -1;
|
|
313
|
+
const i = De(a) + 0.4;
|
|
314
|
+
return i < 0 || i > 100 ? -1 : i;
|
|
315
|
+
}
|
|
316
|
+
static darker(e, t) {
|
|
317
|
+
if (e < 0 || e > 100) return -1;
|
|
318
|
+
const o = K(e), a = (o + 5) / t - 5, n = B.ratioOfYs(o, a), s = Math.abs(n - t);
|
|
319
|
+
if (n < t && s > 0.04) return -1;
|
|
320
|
+
const i = De(a) - 0.4;
|
|
321
|
+
return i < 0 || i > 100 ? -1 : i;
|
|
322
|
+
}
|
|
323
|
+
static lighterUnsafe(e, t) {
|
|
324
|
+
const o = B.lighter(e, t);
|
|
325
|
+
return o < 0 ? 100 : o;
|
|
326
|
+
}
|
|
327
|
+
static darkerUnsafe(e, t) {
|
|
328
|
+
const o = B.darker(e, t);
|
|
329
|
+
return o < 0 ? 0 : o;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
class Fe {
|
|
333
|
+
static isDisliked(e) {
|
|
334
|
+
const t = Math.round(e.hue) >= 90 && Math.round(e.hue) <= 111, o = Math.round(e.chroma) > 16, a = Math.round(e.tone) < 65;
|
|
335
|
+
return t && o && a;
|
|
336
|
+
}
|
|
337
|
+
static fixIfDisliked(e) {
|
|
338
|
+
return Fe.isDisliked(e) ? L.from(e.hue, e.chroma, 70) : e;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
class d {
|
|
342
|
+
static fromPalette(e) {
|
|
343
|
+
return new d(e.name ?? "", e.palette, e.tone, e.isBackground ?? !1, e.background, e.secondBackground, e.contrastCurve, e.toneDeltaPair);
|
|
344
|
+
}
|
|
345
|
+
constructor(e, t, o, a, n, s, i, m) {
|
|
346
|
+
if (this.name = e, this.palette = t, this.tone = o, this.isBackground = a, this.background = n, this.secondBackground = s, this.contrastCurve = i, this.toneDeltaPair = m, this.hctCache = /* @__PURE__ */ new Map(), !n && s) throw new Error(`Color ${e} has secondBackgrounddefined, but background is not defined.`);
|
|
347
|
+
if (!n && i) throw new Error(`Color ${e} has contrastCurvedefined, but background is not defined.`);
|
|
348
|
+
if (n && !i) throw new Error(`Color ${e} has backgrounddefined, but contrastCurve is not defined.`);
|
|
349
|
+
}
|
|
350
|
+
getArgb(e) {
|
|
351
|
+
return this.getHct(e).toInt();
|
|
352
|
+
}
|
|
353
|
+
getHct(e) {
|
|
354
|
+
const t = this.hctCache.get(e);
|
|
355
|
+
if (t != null) return t;
|
|
356
|
+
const o = this.getTone(e), a = this.palette(e).getHct(o);
|
|
357
|
+
return this.hctCache.size > 4 && this.hctCache.clear(), this.hctCache.set(e, a), a;
|
|
358
|
+
}
|
|
359
|
+
getTone(e) {
|
|
360
|
+
const t = e.contrastLevel < 0;
|
|
361
|
+
if (this.toneDeltaPair) {
|
|
362
|
+
const o = this.toneDeltaPair(e), a = o.roleA, n = o.roleB, s = o.delta, i = o.polarity, m = o.stayTogether, h = this.background(e).getTone(e), u = i === "nearer" || i === "lighter" && !e.isDark || i === "darker" && e.isDark, k = u ? a : n, x = u ? n : a, l = this.name === k.name, g = e.isDark ? 1 : -1, v = k.contrastCurve.get(e.contrastLevel), P = x.contrastCurve.get(e.contrastLevel), T = k.tone(e);
|
|
363
|
+
let C = B.ratioOfTones(h, T) >= v ? T : d.foregroundTone(h, v);
|
|
364
|
+
const A = x.tone(e);
|
|
365
|
+
let b = B.ratioOfTones(h, A) >= P ? A : d.foregroundTone(h, P);
|
|
366
|
+
return t && (C = d.foregroundTone(h, v), b = d.foregroundTone(h, P)), (b - C) * g >= s || (b = fe(0, 100, C + s * g), (b - C) * g >= s || (C = fe(0, 100, b - s * g))), 50 <= C && C < 60 ? g > 0 ? (C = 60, b = Math.max(b, C + s * g)) : (C = 49, b = Math.min(b, C + s * g)) : 50 <= b && b < 60 && (m ? g > 0 ? (C = 60, b = Math.max(b, C + s * g)) : (C = 49, b = Math.min(b, C + s * g)) : b = g > 0 ? 60 : 49), l ? C : b;
|
|
367
|
+
}
|
|
368
|
+
{
|
|
369
|
+
let o = this.tone(e);
|
|
370
|
+
if (this.background == null) return o;
|
|
371
|
+
const a = this.background(e).getTone(e), n = this.contrastCurve.get(e.contrastLevel);
|
|
372
|
+
if (B.ratioOfTones(a, o) >= n || (o = d.foregroundTone(a, n)), t && (o = d.foregroundTone(a, n)), this.isBackground && 50 <= o && o < 60 && (o = B.ratioOfTones(49, a) >= n ? 49 : 60), this.secondBackground) {
|
|
373
|
+
const [s, i] = [this.background, this.secondBackground], [m, h] = [s(e).getTone(e), i(e).getTone(e)], [u, k] = [Math.max(m, h), Math.min(m, h)];
|
|
374
|
+
if (B.ratioOfTones(u, o) >= n && B.ratioOfTones(k, o) >= n) return o;
|
|
375
|
+
const x = B.lighter(u, n), l = B.darker(k, n), g = [];
|
|
376
|
+
return x !== -1 && g.push(x), l !== -1 && g.push(l), d.tonePrefersLightForeground(m) || d.tonePrefersLightForeground(h) ? x < 0 ? 100 : x : g.length === 1 ? g[0] : l < 0 ? 0 : l;
|
|
377
|
+
}
|
|
378
|
+
return o;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
static foregroundTone(e, t) {
|
|
382
|
+
const o = B.lighterUnsafe(e, t), a = B.darkerUnsafe(e, t), n = B.ratioOfTones(o, e), s = B.ratioOfTones(a, e);
|
|
383
|
+
if (d.tonePrefersLightForeground(e)) {
|
|
384
|
+
const i = Math.abs(n - s) < 0.1 && n < t && s < t;
|
|
385
|
+
return n >= t || n >= s || i ? o : a;
|
|
386
|
+
}
|
|
387
|
+
return s >= t || s >= n ? a : o;
|
|
388
|
+
}
|
|
389
|
+
static tonePrefersLightForeground(e) {
|
|
390
|
+
return Math.round(e) < 60;
|
|
391
|
+
}
|
|
392
|
+
static toneAllowsLightForeground(e) {
|
|
393
|
+
return Math.round(e) <= 49;
|
|
394
|
+
}
|
|
395
|
+
static enableLightForeground(e) {
|
|
396
|
+
return d.tonePrefersLightForeground(e) && !d.toneAllowsLightForeground(e) ? 49 : e;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
class M {
|
|
400
|
+
static fromInt(e) {
|
|
401
|
+
const t = L.fromInt(e);
|
|
402
|
+
return M.fromHct(t);
|
|
403
|
+
}
|
|
404
|
+
static fromHct(e) {
|
|
405
|
+
return new M(e.hue, e.chroma, e);
|
|
406
|
+
}
|
|
407
|
+
static fromHueAndChroma(e, t) {
|
|
408
|
+
const o = new rr(e, t).create();
|
|
409
|
+
return new M(e, t, o);
|
|
410
|
+
}
|
|
411
|
+
constructor(e, t, o) {
|
|
412
|
+
this.hue = e, this.chroma = t, this.keyColor = o, this.cache = /* @__PURE__ */ new Map();
|
|
413
|
+
}
|
|
414
|
+
tone(e) {
|
|
415
|
+
let t = this.cache.get(e);
|
|
416
|
+
return t === void 0 && (t = L.from(this.hue, this.chroma, e).toInt(), this.cache.set(e, t)), t;
|
|
417
|
+
}
|
|
418
|
+
getHct(e) {
|
|
419
|
+
return L.fromInt(this.tone(e));
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
class rr {
|
|
423
|
+
constructor(e, t) {
|
|
424
|
+
this.hue = e, this.requestedChroma = t, this.chromaCache = /* @__PURE__ */ new Map(), this.maxChromaValue = 200;
|
|
425
|
+
}
|
|
426
|
+
create() {
|
|
427
|
+
let e = 0, t = 100;
|
|
428
|
+
for (; e < t; ) {
|
|
429
|
+
const o = Math.floor((e + t) / 2), a = this.maxChroma(o) < this.maxChroma(o + 1);
|
|
430
|
+
if (this.maxChroma(o) >= this.requestedChroma - 0.01) if (Math.abs(e - 50) < Math.abs(t - 50)) t = o;
|
|
431
|
+
else {
|
|
432
|
+
if (e === o) return L.from(this.hue, this.requestedChroma, e);
|
|
433
|
+
e = o;
|
|
434
|
+
}
|
|
435
|
+
else a ? e = o + 1 : t = o;
|
|
436
|
+
}
|
|
437
|
+
return L.from(this.hue, this.requestedChroma, e);
|
|
438
|
+
}
|
|
439
|
+
maxChroma(e) {
|
|
440
|
+
if (this.chromaCache.has(e)) return this.chromaCache.get(e);
|
|
441
|
+
const t = L.from(this.hue, this.maxChromaValue, e).chroma;
|
|
442
|
+
return this.chromaCache.set(e, t), t;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
class f {
|
|
446
|
+
constructor(e, t, o, a) {
|
|
447
|
+
this.low = e, this.normal = t, this.medium = o, this.high = a;
|
|
448
|
+
}
|
|
449
|
+
get(e) {
|
|
450
|
+
return e <= -1 ? this.low : e < 0 ? ce(this.low, this.normal, (e - -1) / 1) : e < 0.5 ? ce(this.normal, this.medium, (e - 0) / 0.5) : e < 1 ? ce(this.medium, this.high, (e - 0.5) / 0.5) : this.high;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
class R {
|
|
454
|
+
constructor(e, t, o, a, n) {
|
|
455
|
+
this.roleA = e, this.roleB = t, this.delta = o, this.polarity = a, this.stayTogether = n;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
var se;
|
|
459
|
+
function N(r) {
|
|
460
|
+
return r.variant === se.FIDELITY || r.variant === se.CONTENT;
|
|
461
|
+
}
|
|
462
|
+
function S(r) {
|
|
463
|
+
return r.variant === se.MONOCHROME;
|
|
464
|
+
}
|
|
465
|
+
(function(r) {
|
|
466
|
+
r[r.MONOCHROME = 0] = "MONOCHROME", r[r.NEUTRAL = 1] = "NEUTRAL", r[r.TONAL_SPOT = 2] = "TONAL_SPOT", r[r.VIBRANT = 3] = "VIBRANT", r[r.EXPRESSIVE = 4] = "EXPRESSIVE", r[r.FIDELITY = 5] = "FIDELITY", r[r.CONTENT = 6] = "CONTENT", r[r.RAINBOW = 7] = "RAINBOW", r[r.FRUIT_SALAD = 8] = "FRUIT_SALAD";
|
|
467
|
+
})(se || (se = {}));
|
|
468
|
+
class c {
|
|
469
|
+
static highestSurface(e) {
|
|
470
|
+
return e.isDark ? c.surfaceBright : c.surfaceDim;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
c.contentAccentToneDelta = 15, c.primaryPaletteKeyColor = d.fromPalette({ name: "primary_palette_key_color", palette: (r) => r.primaryPalette, tone: (r) => r.primaryPalette.keyColor.tone }), c.secondaryPaletteKeyColor = d.fromPalette({ name: "secondary_palette_key_color", palette: (r) => r.secondaryPalette, tone: (r) => r.secondaryPalette.keyColor.tone }), c.tertiaryPaletteKeyColor = d.fromPalette({ name: "tertiary_palette_key_color", palette: (r) => r.tertiaryPalette, tone: (r) => r.tertiaryPalette.keyColor.tone }), c.neutralPaletteKeyColor = d.fromPalette({ name: "neutral_palette_key_color", palette: (r) => r.neutralPalette, tone: (r) => r.neutralPalette.keyColor.tone }), c.neutralVariantPaletteKeyColor = d.fromPalette({ name: "neutral_variant_palette_key_color", palette: (r) => r.neutralVariantPalette, tone: (r) => r.neutralVariantPalette.keyColor.tone }), c.background = d.fromPalette({ name: "background", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 6 : 98, isBackground: !0 }), c.onBackground = d.fromPalette({ name: "on_background", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 90 : 10, background: (r) => c.background, contrastCurve: new f(3, 3, 4.5, 7) }), c.surface = d.fromPalette({ name: "surface", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 6 : 98, isBackground: !0 }), c.surfaceDim = d.fromPalette({ name: "surface_dim", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 6 : new f(87, 87, 80, 75).get(r.contrastLevel), isBackground: !0 }), c.surfaceBright = d.fromPalette({ name: "surface_bright", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(24, 24, 29, 34).get(r.contrastLevel) : 98, isBackground: !0 }), c.surfaceContainerLowest = d.fromPalette({ name: "surface_container_lowest", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(4, 4, 2, 0).get(r.contrastLevel) : 100, isBackground: !0 }), c.surfaceContainerLow = d.fromPalette({ name: "surface_container_low", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(10, 10, 11, 12).get(r.contrastLevel) : new f(96, 96, 96, 95).get(r.contrastLevel), isBackground: !0 }), c.surfaceContainer = d.fromPalette({ name: "surface_container", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(12, 12, 16, 20).get(r.contrastLevel) : new f(94, 94, 92, 90).get(r.contrastLevel), isBackground: !0 }), c.surfaceContainerHigh = d.fromPalette({ name: "surface_container_high", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(17, 17, 21, 25).get(r.contrastLevel) : new f(92, 92, 88, 85).get(r.contrastLevel), isBackground: !0 }), c.surfaceContainerHighest = d.fromPalette({ name: "surface_container_highest", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(22, 22, 26, 30).get(r.contrastLevel) : new f(90, 90, 84, 80).get(r.contrastLevel), isBackground: !0 }), c.onSurface = d.fromPalette({ name: "on_surface", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 90 : 10, background: (r) => c.highestSurface(r), contrastCurve: new f(4.5, 7, 11, 21) }), c.surfaceVariant = d.fromPalette({ name: "surface_variant", palette: (r) => r.neutralVariantPalette, tone: (r) => r.isDark ? 30 : 90, isBackground: !0 }), c.onSurfaceVariant = d.fromPalette({ name: "on_surface_variant", palette: (r) => r.neutralVariantPalette, tone: (r) => r.isDark ? 80 : 30, background: (r) => c.highestSurface(r), contrastCurve: new f(3, 4.5, 7, 11) }), c.inverseSurface = d.fromPalette({ name: "inverse_surface", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 90 : 20 }), c.inverseOnSurface = d.fromPalette({ name: "inverse_on_surface", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 20 : 95, background: (r) => c.inverseSurface, contrastCurve: new f(4.5, 7, 11, 21) }), c.outline = d.fromPalette({ name: "outline", palette: (r) => r.neutralVariantPalette, tone: (r) => r.isDark ? 60 : 50, background: (r) => c.highestSurface(r), contrastCurve: new f(1.5, 3, 4.5, 7) }), c.outlineVariant = d.fromPalette({ name: "outline_variant", palette: (r) => r.neutralVariantPalette, tone: (r) => r.isDark ? 30 : 80, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5) }), c.shadow = d.fromPalette({ name: "shadow", palette: (r) => r.neutralPalette, tone: (r) => 0 }), c.scrim = d.fromPalette({ name: "scrim", palette: (r) => r.neutralPalette, tone: (r) => 0 }), c.surfaceTint = d.fromPalette({ name: "surface_tint", palette: (r) => r.primaryPalette, tone: (r) => r.isDark ? 80 : 40, isBackground: !0 }), c.primary = d.fromPalette({ name: "primary", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? r.isDark ? 100 : 0 : r.isDark ? 80 : 40, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(3, 4.5, 7, 7), toneDeltaPair: (r) => new R(c.primaryContainer, c.primary, 10, "nearer", !1) }), c.onPrimary = d.fromPalette({ name: "on_primary", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? r.isDark ? 10 : 90 : r.isDark ? 20 : 100, background: (r) => c.primary, contrastCurve: new f(4.5, 7, 11, 21) }), c.primaryContainer = d.fromPalette({ name: "primary_container", palette: (r) => r.primaryPalette, tone: (r) => N(r) ? r.sourceColorHct.tone : S(r) ? r.isDark ? 85 : 25 : r.isDark ? 30 : 90, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.primaryContainer, c.primary, 10, "nearer", !1) }), c.onPrimaryContainer = d.fromPalette({ name: "on_primary_container", palette: (r) => r.primaryPalette, tone: (r) => N(r) ? d.foregroundTone(c.primaryContainer.tone(r), 4.5) : S(r) ? r.isDark ? 0 : 100 : r.isDark ? 90 : 30, background: (r) => c.primaryContainer, contrastCurve: new f(3, 4.5, 7, 11) }), c.inversePrimary = d.fromPalette({ name: "inverse_primary", palette: (r) => r.primaryPalette, tone: (r) => r.isDark ? 40 : 80, background: (r) => c.inverseSurface, contrastCurve: new f(3, 4.5, 7, 7) }), c.secondary = d.fromPalette({ name: "secondary", palette: (r) => r.secondaryPalette, tone: (r) => r.isDark ? 80 : 40, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(3, 4.5, 7, 7), toneDeltaPair: (r) => new R(c.secondaryContainer, c.secondary, 10, "nearer", !1) }), c.onSecondary = d.fromPalette({ name: "on_secondary", palette: (r) => r.secondaryPalette, tone: (r) => S(r) ? r.isDark ? 10 : 100 : r.isDark ? 20 : 100, background: (r) => c.secondary, contrastCurve: new f(4.5, 7, 11, 21) }), c.secondaryContainer = d.fromPalette({ name: "secondary_container", palette: (r) => r.secondaryPalette, tone: (r) => {
|
|
474
|
+
const e = r.isDark ? 30 : 90;
|
|
475
|
+
return S(r) ? r.isDark ? 30 : 85 : N(r) ? function(t, o, a, n) {
|
|
476
|
+
let s = a, i = L.from(t, o, a);
|
|
477
|
+
if (i.chroma < o) {
|
|
478
|
+
let m = i.chroma;
|
|
479
|
+
for (; i.chroma < o; ) {
|
|
480
|
+
s += n ? -1 : 1;
|
|
481
|
+
const h = L.from(t, o, s);
|
|
482
|
+
if (m > h.chroma || Math.abs(h.chroma - o) < 0.4) break;
|
|
483
|
+
Math.abs(h.chroma - o) < Math.abs(i.chroma - o) && (i = h), m = Math.max(m, h.chroma);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
return s;
|
|
487
|
+
}(r.secondaryPalette.hue, r.secondaryPalette.chroma, e, !r.isDark) : e;
|
|
488
|
+
}, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.secondaryContainer, c.secondary, 10, "nearer", !1) }), c.onSecondaryContainer = d.fromPalette({ name: "on_secondary_container", palette: (r) => r.secondaryPalette, tone: (r) => S(r) ? r.isDark ? 90 : 10 : N(r) ? d.foregroundTone(c.secondaryContainer.tone(r), 4.5) : r.isDark ? 90 : 30, background: (r) => c.secondaryContainer, contrastCurve: new f(3, 4.5, 7, 11) }), c.tertiary = d.fromPalette({ name: "tertiary", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? r.isDark ? 90 : 25 : r.isDark ? 80 : 40, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(3, 4.5, 7, 7), toneDeltaPair: (r) => new R(c.tertiaryContainer, c.tertiary, 10, "nearer", !1) }), c.onTertiary = d.fromPalette({ name: "on_tertiary", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? r.isDark ? 10 : 90 : r.isDark ? 20 : 100, background: (r) => c.tertiary, contrastCurve: new f(4.5, 7, 11, 21) }), c.tertiaryContainer = d.fromPalette({ name: "tertiary_container", palette: (r) => r.tertiaryPalette, tone: (r) => {
|
|
489
|
+
if (S(r)) return r.isDark ? 60 : 49;
|
|
490
|
+
if (!N(r)) return r.isDark ? 30 : 90;
|
|
491
|
+
const e = r.tertiaryPalette.getHct(r.sourceColorHct.tone);
|
|
492
|
+
return Fe.fixIfDisliked(e).tone;
|
|
493
|
+
}, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.tertiaryContainer, c.tertiary, 10, "nearer", !1) }), c.onTertiaryContainer = d.fromPalette({ name: "on_tertiary_container", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? r.isDark ? 0 : 100 : N(r) ? d.foregroundTone(c.tertiaryContainer.tone(r), 4.5) : r.isDark ? 90 : 30, background: (r) => c.tertiaryContainer, contrastCurve: new f(3, 4.5, 7, 11) }), c.error = d.fromPalette({ name: "error", palette: (r) => r.errorPalette, tone: (r) => r.isDark ? 80 : 40, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(3, 4.5, 7, 7), toneDeltaPair: (r) => new R(c.errorContainer, c.error, 10, "nearer", !1) }), c.onError = d.fromPalette({ name: "on_error", palette: (r) => r.errorPalette, tone: (r) => r.isDark ? 20 : 100, background: (r) => c.error, contrastCurve: new f(4.5, 7, 11, 21) }), c.errorContainer = d.fromPalette({ name: "error_container", palette: (r) => r.errorPalette, tone: (r) => r.isDark ? 30 : 90, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.errorContainer, c.error, 10, "nearer", !1) }), c.onErrorContainer = d.fromPalette({ name: "on_error_container", palette: (r) => r.errorPalette, tone: (r) => S(r) ? r.isDark ? 90 : 10 : r.isDark ? 90 : 30, background: (r) => c.errorContainer, contrastCurve: new f(3, 4.5, 7, 11) }), c.primaryFixed = d.fromPalette({ name: "primary_fixed", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? 40 : 90, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.primaryFixed, c.primaryFixedDim, 10, "lighter", !0) }), c.primaryFixedDim = d.fromPalette({ name: "primary_fixed_dim", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? 30 : 80, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.primaryFixed, c.primaryFixedDim, 10, "lighter", !0) }), c.onPrimaryFixed = d.fromPalette({ name: "on_primary_fixed", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? 100 : 10, background: (r) => c.primaryFixedDim, secondBackground: (r) => c.primaryFixed, contrastCurve: new f(4.5, 7, 11, 21) }), c.onPrimaryFixedVariant = d.fromPalette({ name: "on_primary_fixed_variant", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? 90 : 30, background: (r) => c.primaryFixedDim, secondBackground: (r) => c.primaryFixed, contrastCurve: new f(3, 4.5, 7, 11) }), c.secondaryFixed = d.fromPalette({ name: "secondary_fixed", palette: (r) => r.secondaryPalette, tone: (r) => S(r) ? 80 : 90, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.secondaryFixed, c.secondaryFixedDim, 10, "lighter", !0) }), c.secondaryFixedDim = d.fromPalette({ name: "secondary_fixed_dim", palette: (r) => r.secondaryPalette, tone: (r) => S(r) ? 70 : 80, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.secondaryFixed, c.secondaryFixedDim, 10, "lighter", !0) }), c.onSecondaryFixed = d.fromPalette({ name: "on_secondary_fixed", palette: (r) => r.secondaryPalette, tone: (r) => 10, background: (r) => c.secondaryFixedDim, secondBackground: (r) => c.secondaryFixed, contrastCurve: new f(4.5, 7, 11, 21) }), c.onSecondaryFixedVariant = d.fromPalette({ name: "on_secondary_fixed_variant", palette: (r) => r.secondaryPalette, tone: (r) => S(r) ? 25 : 30, background: (r) => c.secondaryFixedDim, secondBackground: (r) => c.secondaryFixed, contrastCurve: new f(3, 4.5, 7, 11) }), c.tertiaryFixed = d.fromPalette({ name: "tertiary_fixed", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? 40 : 90, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.tertiaryFixed, c.tertiaryFixedDim, 10, "lighter", !0) }), c.tertiaryFixedDim = d.fromPalette({ name: "tertiary_fixed_dim", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? 30 : 80, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.tertiaryFixed, c.tertiaryFixedDim, 10, "lighter", !0) }), c.onTertiaryFixed = d.fromPalette({ name: "on_tertiary_fixed", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? 100 : 10, background: (r) => c.tertiaryFixedDim, secondBackground: (r) => c.tertiaryFixed, contrastCurve: new f(4.5, 7, 11, 21) }), c.onTertiaryFixedVariant = d.fromPalette({ name: "on_tertiary_fixed_variant", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? 90 : 30, background: (r) => c.tertiaryFixedDim, secondBackground: (r) => c.tertiaryFixed, contrastCurve: new f(3, 4.5, 7, 11) });
|
|
494
|
+
class E {
|
|
495
|
+
static of(e) {
|
|
496
|
+
return new E(e, !1);
|
|
497
|
+
}
|
|
498
|
+
static contentOf(e) {
|
|
499
|
+
return new E(e, !0);
|
|
500
|
+
}
|
|
501
|
+
static fromColors(e) {
|
|
502
|
+
return E.createPaletteFromColors(!1, e);
|
|
503
|
+
}
|
|
504
|
+
static contentFromColors(e) {
|
|
505
|
+
return E.createPaletteFromColors(!0, e);
|
|
506
|
+
}
|
|
507
|
+
static createPaletteFromColors(e, t) {
|
|
508
|
+
const o = new E(t.primary, e);
|
|
509
|
+
if (t.secondary) {
|
|
510
|
+
const a = new E(t.secondary, e);
|
|
511
|
+
o.a2 = a.a1;
|
|
512
|
+
}
|
|
513
|
+
if (t.tertiary) {
|
|
514
|
+
const a = new E(t.tertiary, e);
|
|
515
|
+
o.a3 = a.a1;
|
|
516
|
+
}
|
|
517
|
+
if (t.error) {
|
|
518
|
+
const a = new E(t.error, e);
|
|
519
|
+
o.error = a.a1;
|
|
520
|
+
}
|
|
521
|
+
if (t.neutral) {
|
|
522
|
+
const a = new E(t.neutral, e);
|
|
523
|
+
o.n1 = a.n1;
|
|
524
|
+
}
|
|
525
|
+
if (t.neutralVariant) {
|
|
526
|
+
const a = new E(t.neutralVariant, e);
|
|
527
|
+
o.n2 = a.n2;
|
|
528
|
+
}
|
|
529
|
+
return o;
|
|
530
|
+
}
|
|
531
|
+
constructor(e, t) {
|
|
532
|
+
const o = L.fromInt(e), a = o.hue, n = o.chroma;
|
|
533
|
+
t ? (this.a1 = M.fromHueAndChroma(a, n), this.a2 = M.fromHueAndChroma(a, n / 3), this.a3 = M.fromHueAndChroma(a + 60, n / 2), this.n1 = M.fromHueAndChroma(a, Math.min(n / 12, 4)), this.n2 = M.fromHueAndChroma(a, Math.min(n / 6, 8))) : (this.a1 = M.fromHueAndChroma(a, Math.max(48, n)), this.a2 = M.fromHueAndChroma(a, 16), this.a3 = M.fromHueAndChroma(a + 60, 24), this.n1 = M.fromHueAndChroma(a, 4), this.n2 = M.fromHueAndChroma(a, 8)), this.error = M.fromHueAndChroma(25, 84);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
class J {
|
|
537
|
+
get primary() {
|
|
538
|
+
return this.props.primary;
|
|
539
|
+
}
|
|
540
|
+
get onPrimary() {
|
|
541
|
+
return this.props.onPrimary;
|
|
542
|
+
}
|
|
543
|
+
get primaryContainer() {
|
|
544
|
+
return this.props.primaryContainer;
|
|
545
|
+
}
|
|
546
|
+
get onPrimaryContainer() {
|
|
547
|
+
return this.props.onPrimaryContainer;
|
|
548
|
+
}
|
|
549
|
+
get secondary() {
|
|
550
|
+
return this.props.secondary;
|
|
551
|
+
}
|
|
552
|
+
get onSecondary() {
|
|
553
|
+
return this.props.onSecondary;
|
|
554
|
+
}
|
|
555
|
+
get secondaryContainer() {
|
|
556
|
+
return this.props.secondaryContainer;
|
|
557
|
+
}
|
|
558
|
+
get onSecondaryContainer() {
|
|
559
|
+
return this.props.onSecondaryContainer;
|
|
560
|
+
}
|
|
561
|
+
get tertiary() {
|
|
562
|
+
return this.props.tertiary;
|
|
563
|
+
}
|
|
564
|
+
get onTertiary() {
|
|
565
|
+
return this.props.onTertiary;
|
|
566
|
+
}
|
|
567
|
+
get tertiaryContainer() {
|
|
568
|
+
return this.props.tertiaryContainer;
|
|
569
|
+
}
|
|
570
|
+
get onTertiaryContainer() {
|
|
571
|
+
return this.props.onTertiaryContainer;
|
|
572
|
+
}
|
|
573
|
+
get error() {
|
|
574
|
+
return this.props.error;
|
|
575
|
+
}
|
|
576
|
+
get onError() {
|
|
577
|
+
return this.props.onError;
|
|
578
|
+
}
|
|
579
|
+
get errorContainer() {
|
|
580
|
+
return this.props.errorContainer;
|
|
581
|
+
}
|
|
582
|
+
get onErrorContainer() {
|
|
583
|
+
return this.props.onErrorContainer;
|
|
584
|
+
}
|
|
585
|
+
get background() {
|
|
586
|
+
return this.props.background;
|
|
587
|
+
}
|
|
588
|
+
get onBackground() {
|
|
589
|
+
return this.props.onBackground;
|
|
590
|
+
}
|
|
591
|
+
get surface() {
|
|
592
|
+
return this.props.surface;
|
|
593
|
+
}
|
|
594
|
+
get onSurface() {
|
|
595
|
+
return this.props.onSurface;
|
|
596
|
+
}
|
|
597
|
+
get surfaceVariant() {
|
|
598
|
+
return this.props.surfaceVariant;
|
|
599
|
+
}
|
|
600
|
+
get onSurfaceVariant() {
|
|
601
|
+
return this.props.onSurfaceVariant;
|
|
602
|
+
}
|
|
603
|
+
get outline() {
|
|
604
|
+
return this.props.outline;
|
|
605
|
+
}
|
|
606
|
+
get outlineVariant() {
|
|
607
|
+
return this.props.outlineVariant;
|
|
608
|
+
}
|
|
609
|
+
get shadow() {
|
|
610
|
+
return this.props.shadow;
|
|
611
|
+
}
|
|
612
|
+
get scrim() {
|
|
613
|
+
return this.props.scrim;
|
|
614
|
+
}
|
|
615
|
+
get inverseSurface() {
|
|
616
|
+
return this.props.inverseSurface;
|
|
617
|
+
}
|
|
618
|
+
get inverseOnSurface() {
|
|
619
|
+
return this.props.inverseOnSurface;
|
|
620
|
+
}
|
|
621
|
+
get inversePrimary() {
|
|
622
|
+
return this.props.inversePrimary;
|
|
623
|
+
}
|
|
624
|
+
static light(e) {
|
|
625
|
+
return J.lightFromCorePalette(E.of(e));
|
|
626
|
+
}
|
|
627
|
+
static dark(e) {
|
|
628
|
+
return J.darkFromCorePalette(E.of(e));
|
|
629
|
+
}
|
|
630
|
+
static lightContent(e) {
|
|
631
|
+
return J.lightFromCorePalette(E.contentOf(e));
|
|
632
|
+
}
|
|
633
|
+
static darkContent(e) {
|
|
634
|
+
return J.darkFromCorePalette(E.contentOf(e));
|
|
635
|
+
}
|
|
636
|
+
static lightFromCorePalette(e) {
|
|
637
|
+
return new J({ primary: e.a1.tone(40), onPrimary: e.a1.tone(100), primaryContainer: e.a1.tone(90), onPrimaryContainer: e.a1.tone(10), secondary: e.a2.tone(40), onSecondary: e.a2.tone(100), secondaryContainer: e.a2.tone(90), onSecondaryContainer: e.a2.tone(10), tertiary: e.a3.tone(40), onTertiary: e.a3.tone(100), tertiaryContainer: e.a3.tone(90), onTertiaryContainer: e.a3.tone(10), error: e.error.tone(40), onError: e.error.tone(100), errorContainer: e.error.tone(90), onErrorContainer: e.error.tone(10), background: e.n1.tone(99), onBackground: e.n1.tone(10), surface: e.n1.tone(99), onSurface: e.n1.tone(10), surfaceVariant: e.n2.tone(90), onSurfaceVariant: e.n2.tone(30), outline: e.n2.tone(50), outlineVariant: e.n2.tone(80), shadow: e.n1.tone(0), scrim: e.n1.tone(0), inverseSurface: e.n1.tone(20), inverseOnSurface: e.n1.tone(95), inversePrimary: e.a1.tone(80) });
|
|
638
|
+
}
|
|
639
|
+
static darkFromCorePalette(e) {
|
|
640
|
+
return new J({ primary: e.a1.tone(80), onPrimary: e.a1.tone(20), primaryContainer: e.a1.tone(30), onPrimaryContainer: e.a1.tone(90), secondary: e.a2.tone(80), onSecondary: e.a2.tone(20), secondaryContainer: e.a2.tone(30), onSecondaryContainer: e.a2.tone(90), tertiary: e.a3.tone(80), onTertiary: e.a3.tone(20), tertiaryContainer: e.a3.tone(30), onTertiaryContainer: e.a3.tone(90), error: e.error.tone(80), onError: e.error.tone(20), errorContainer: e.error.tone(30), onErrorContainer: e.error.tone(80), background: e.n1.tone(10), onBackground: e.n1.tone(90), surface: e.n1.tone(10), onSurface: e.n1.tone(90), surfaceVariant: e.n2.tone(30), onSurfaceVariant: e.n2.tone(80), outline: e.n2.tone(60), outlineVariant: e.n2.tone(30), shadow: e.n1.tone(0), scrim: e.n1.tone(0), inverseSurface: e.n1.tone(90), inverseOnSurface: e.n1.tone(20), inversePrimary: e.a1.tone(40) });
|
|
641
|
+
}
|
|
642
|
+
constructor(e) {
|
|
643
|
+
this.props = e;
|
|
644
|
+
}
|
|
645
|
+
toJSON() {
|
|
646
|
+
return { ...this.props };
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
function W(r) {
|
|
650
|
+
const e = (r = r.replace("#", "")).length === 3, t = r.length === 6, o = r.length === 8;
|
|
651
|
+
if (!e && !t && !o) throw new Error("unexpected hex " + r);
|
|
652
|
+
let a = 0, n = 0, s = 0;
|
|
653
|
+
return e ? (a = Y(r.slice(0, 1).repeat(2)), n = Y(r.slice(1, 2).repeat(2)), s = Y(r.slice(2, 3).repeat(2))) : t ? (a = Y(r.slice(0, 2)), n = Y(r.slice(2, 4)), s = Y(r.slice(4, 6))) : o && (a = Y(r.slice(2, 4)), n = Y(r.slice(4, 6)), s = Y(r.slice(6, 8))), (255 << 24 | (255 & a) << 16 | (255 & n) << 8 | 255 & s) >>> 0;
|
|
654
|
+
}
|
|
655
|
+
function Y(r) {
|
|
656
|
+
return parseInt(r, 16);
|
|
657
|
+
}
|
|
658
|
+
function tr(r, e = []) {
|
|
659
|
+
const t = E.of(r);
|
|
660
|
+
return { source: r, schemes: { light: J.light(r), dark: J.dark(r) }, palettes: { primary: t.a1, secondary: t.a2, tertiary: t.a3, neutral: t.n1, neutralVariant: t.n2, error: t.error }, customColors: e.map((o) => function(a, n) {
|
|
661
|
+
let s = n.value;
|
|
662
|
+
const i = s, m = a;
|
|
663
|
+
n.blend && (s = Te.harmonize(i, m));
|
|
664
|
+
const h = E.of(s), u = h.a1;
|
|
665
|
+
return { color: n, value: s, light: { color: u.tone(40), onColor: u.tone(100), colorContainer: u.tone(90), onColorContainer: u.tone(10) }, dark: { color: u.tone(80), onColor: u.tone(20), colorContainer: u.tone(30), onColorContainer: u.tone(90) } };
|
|
666
|
+
}(r, o)) };
|
|
667
|
+
}
|
|
668
|
+
function y(r) {
|
|
669
|
+
return function(e) {
|
|
670
|
+
const t = Re(e), o = ze(e), a = $e(e), n = [t.toString(16), o.toString(16), a.toString(16)];
|
|
671
|
+
for (const [s, i] of n.entries()) i.length === 1 && (n[s] = "0" + i);
|
|
672
|
+
return "#" + n.join("");
|
|
673
|
+
}(r);
|
|
674
|
+
}
|
|
675
|
+
function G(r) {
|
|
676
|
+
const e = L.fromInt(r), t = M.fromHueAndChroma(e.hue, e.chroma);
|
|
677
|
+
return { 0: y(t.tone(0)), 10: y(t.tone(10)), 20: y(t.tone(20)), 30: y(t.tone(30)), 40: y(t.tone(40)), 50: y(t.tone(50)), 60: y(t.tone(60)), 70: y(t.tone(70)), 80: y(t.tone(80)), 90: y(t.tone(90)), 95: y(t.tone(95)), 99: y(t.tone(99)), 100: y(t.tone(100)) };
|
|
678
|
+
}
|
|
679
|
+
function or(r, e = !1, t) {
|
|
680
|
+
const o = e ? r.schemes.dark : r.schemes.light, a = M.fromHueAndChroma(r.palettes.primary.hue, r.palettes.primary.chroma), n = M.fromHueAndChroma(r.palettes.secondary.hue, r.palettes.secondary.chroma), s = M.fromHueAndChroma(r.palettes.tertiary.hue, r.palettes.tertiary.chroma), i = M.fromHueAndChroma(r.palettes.neutral.hue, r.palettes.neutral.chroma), m = M.fromHueAndChroma(r.palettes.neutralVariant.hue, r.palettes.neutralVariant.chroma), h = M.fromHueAndChroma(r.palettes.error.hue, r.palettes.error.chroma), u = G(t?.success ? t.success : W("#00C853")), k = G(t?.warning ? t.warning : W("#FFD600")), x = G(t?.info ? t.info : W("#2979FF")), l = { primary: e ? 80 : 40, onPrimary: e ? 20 : 100, primaryContainer: e ? 30 : 90, onPrimaryContainer: e ? 90 : 10, primaryFixed: 90, primaryFixedDim: 80, onPrimaryFixed: 10, onPrimaryFixedVariant: 30, inversePrimary: e ? 40 : 80, secondary: e ? 80 : 40, onSecondary: e ? 20 : 100, secondaryContainer: e ? 30 : 90, onSecondaryContainer: e ? 90 : 10, secondaryFixed: 90, secondaryFixedDim: 80, onSecondaryFixed: 10, onSecondaryFixedVariant: 30, tertiary: e ? 80 : 40, onTertiary: e ? 20 : 100, tertiaryContainer: e ? 30 : 90, onTertiaryContainer: e ? 90 : 10, tertiaryFixed: 90, tertiaryFixedDim: 80, onTertiaryFixed: 10, onTertiaryFixedVariant: 30, error: e ? 80 : 40, onError: e ? 20 : 100, errorContainer: e ? 30 : 90, onErrorContainer: e ? 90 : 10, surface: e ? 6 : 98, surfaceDim: e ? 6 : 87, surfaceBright: e ? 24 : 98, surfaceContainerLowest: e ? 4 : 100, surfaceContainerLow: e ? 10 : 96, surfaceContainer: e ? 12 : 94, surfaceContainerHigh: e ? 17 : 92, surfaceContainerHighest: e ? 22 : 90, onSurface: e ? 90 : 10, onSurfaceVariant: e ? 80 : 30, surfaceTint: e ? 80 : 40, inverseSurface: e ? 90 : 20, inverseOnSurface: e ? 20 : 95, outline: e ? 60 : 50, outlineVariant: e ? 30 : 80, shadow: 0 };
|
|
681
|
+
return { sys: { color: { scrim: y(o.scrim), outline: y(m.tone(l.outline)), outlineVariant: y(m.tone(l.outlineVariant)), shadow: y(i.tone(l.shadow)), surface: { default: y(i.tone(l.surface)), dim: y(i.tone(l.surfaceDim)), bright: y(i.tone(l.surfaceBright)), container: y(i.tone(l.surfaceContainer)), containerLow: y(i.tone(l.surfaceContainerLow)), containerLowest: y(i.tone(l.surfaceContainerLowest)), containerHigh: y(i.tone(l.surfaceContainerHigh)), containerHighest: y(i.tone(l.surfaceContainerHighest)), on: y(i.tone(l.onSurface)), onVariant: y(m.tone(l.onSurfaceVariant)), tint: y(a.tone(l.surfaceTint)), inverse: y(i.tone(l.inverseSurface)), inverseOn: y(i.tone(l.inverseOnSurface)), low: y(i.tone(l.surfaceContainerLow)), high: y(i.tone(l.surfaceContainerHigh)), highest: y(i.tone(l.surfaceContainerHighest)), lowest: y(i.tone(l.surfaceContainerLowest)) }, primary: { default: y(a.tone(l.primary)), on: y(a.tone(l.onPrimary)), container: y(a.tone(l.primaryContainer)), onContainer: y(a.tone(l.onPrimaryContainer)), fixed: y(a.tone(l.primaryFixed)), fixedDim: y(a.tone(l.primaryFixedDim)), onFixed: y(a.tone(l.onPrimaryFixed)), onFixedVariant: y(a.tone(l.onPrimaryFixedVariant)), inverse: y(a.tone(l.inversePrimary)) }, secondary: { default: y(n.tone(l.secondary)), on: y(n.tone(l.onSecondary)), container: y(n.tone(l.secondaryContainer)), onContainer: y(n.tone(l.onSecondaryContainer)), fixed: y(n.tone(l.secondaryFixed)), fixedDim: y(n.tone(l.secondaryFixedDim)), onFixed: y(n.tone(l.onSecondaryFixed)), onFixedVariant: y(n.tone(l.onSecondaryFixedVariant)) }, tertiary: { default: y(s.tone(l.tertiary)), on: y(s.tone(l.onTertiary)), container: y(s.tone(l.tertiaryContainer)), onContainer: y(s.tone(l.onTertiaryContainer)), fixed: y(s.tone(l.tertiaryFixed)), fixedDim: y(s.tone(l.tertiaryFixedDim)), onFixed: y(s.tone(l.onTertiaryFixed)), onFixedVariant: y(s.tone(l.onTertiaryFixedVariant)) }, error: { default: y(h.tone(l.error)), on: y(h.tone(l.onError)), container: y(h.tone(l.errorContainer)), onContainer: y(h.tone(l.onErrorContainer)) }, success: { default: u[e ? "80" : "40"], on: u[e ? "20" : "100"], container: u[e ? "30" : "90"], onContainer: u[e ? "90" : "10"] }, warning: { default: k[e ? "80" : "40"], on: k[e ? "20" : "100"], container: k[e ? "30" : "90"], onContainer: k[e ? "90" : "10"] }, info: { default: x[e ? "80" : "40"], on: x[e ? "20" : "100"], container: x[e ? "30" : "90"], onContainer: x[e ? "90" : "10"] } }, typography: { display: { large: "display-large", medium: "display-medium", small: "display-small" }, headline: { large: "headline-large", medium: "headline-medium", small: "headline-small" }, title: { large: "title-large", medium: "title-medium", small: "title-small" }, body: { large: "body-large", medium: "body-medium", small: "body-small" }, label: { large: "label-large", medium: "label-medium", small: "label-small" } }, shape: { corner: { none: "0", extraSmall: "4px", small: "8px", medium: "12px", large: "16px", extraLarge: "28px", full: "9999px" } }, elevation: { 0: "0 0 0 0 rgba(0, 0, 0, 0)", 1: `0px 1px 2px rgba(0, 0, 0, ${e ? "0.3" : "0.15"}), 0px 1px 3px 1px rgba(0, 0, 0, ${e ? "0.15" : "0.1"})`, 2: `0px 1px 2px rgba(0, 0, 0, ${e ? "0.3" : "0.15"}), 0px 2px 6px 2px rgba(0, 0, 0, ${e ? "0.15" : "0.1"})`, 3: `0px 1px 3px rgba(0, 0, 0, ${e ? "0.3" : "0.15"}), 0px 4px 8px 3px rgba(0, 0, 0, ${e ? "0.15" : "0.1"})`, 4: `0px 2px 3px rgba(0, 0, 0, ${e ? "0.3" : "0.15"}), 0px 6px 10px 4px rgba(0, 0, 0, ${e ? "0.15" : "0.1"})`, 5: `0px 4px 4px rgba(0, 0, 0, ${e ? "0.3" : "0.15"}), 0px 8px 12px 6px rgba(0, 0, 0, ${e ? "0.15" : "0.1"})` }, motion: { easing: { emphasized: "cubic-bezier(0.2, 0.0, 0, 1.0)", emphasizedDecelerate: "cubic-bezier(0.05, 0.7, 0.1, 1.0)", emphasizedAccelerate: "cubic-bezier(0.3, 0.0, 0.8, 0.15)", standard: "cubic-bezier(0.2, 0.0, 0, 1.0)", standardDecelerate: "cubic-bezier(0, 0, 0, 1)", standardAccelerate: "cubic-bezier(0.3, 0, 1, 1)", legacy: "cubic-bezier(0.4, 0, 0.2, 1)", linear: "linear" }, duration: { short1: "50ms", short2: "100ms", short3: "150ms", short4: "200ms", medium1: "250ms", medium2: "300ms", medium3: "350ms", medium4: "400ms", long1: "450ms", long2: "500ms", long3: "550ms", long4: "600ms", extraLong1: "700ms", extraLong2: "800ms", extraLong3: "900ms", extraLong4: "1000ms" } }, state: { opacity: { hover: "0.08", focus: "0.12", pressed: "0.12", dragged: "0.16", disabled: "0.38", disabledContainer: "0.12" } }, spacing: { 0: "0", 1: "4px", 2: "8px", 3: "12px", 4: "16px", 5: "20px", 6: "24px", 7: "28px", 8: "32px", 9: "36px", 10: "40px", 11: "44px", 12: "48px" }, outline: { 1: "1px" } }, ref: { palette: { primary: G(a.tone(40)), secondary: G(n.tone(40)), tertiary: G(s.tone(40)), neutral: G(i.tone(40)), neutralVariant: G(m.tone(40)), error: G(h.tone(40)) } } };
|
|
682
|
+
}
|
|
683
|
+
function pr(r, e) {
|
|
684
|
+
const t = M.fromHueAndChroma(r, e);
|
|
685
|
+
return { cLowest: t.tone(100), cLow: t.tone(96), c: t.tone(94), cHigh: t.tone(92), cHighest: t.tone(90), sDim: t.tone(87), s: t.tone(98), sBright: t.tone(100) };
|
|
686
|
+
}
|
|
687
|
+
function fr(r, e) {
|
|
688
|
+
const t = M.fromHueAndChroma(r, e);
|
|
689
|
+
return { cLowest: t.tone(4), cLow: t.tone(10), c: t.tone(12), cHigh: t.tone(17), cHighest: t.tone(22), sDim: t.tone(6), s: t.tone(6), sBright: t.tone(24) };
|
|
690
|
+
}
|
|
691
|
+
class ee {
|
|
692
|
+
constructor() {
|
|
693
|
+
this._scheme$ = new de("auto"), this._color$ = new de("#6200ee"), this._theme$ = new de({}), this._themeComponent$ = new de(null), this.scheme$ = this._scheme$.asObservable().pipe(Z(), ae(1)), this.color$ = this._color$.asObservable().pipe(Z(), ae(1)), this.theme$ = this._theme$.asObservable().pipe(Z((e, t) => JSON.stringify(e) === JSON.stringify(t)), ae(1)), this.themeComponent$ = this._themeComponent$.asObservable().pipe(Z(), ae(1)), this.resolvedScheme$ = this.scheme$.pipe(xe((e) => {
|
|
694
|
+
if (e === "auto") {
|
|
695
|
+
const t = window.matchMedia("(prefers-color-scheme: dark)");
|
|
696
|
+
return new Ee((o) => {
|
|
697
|
+
const a = (n) => {
|
|
698
|
+
o.next(n.matches ? "dark" : "light");
|
|
699
|
+
};
|
|
700
|
+
return t.addEventListener("change", a), o.next(t.matches ? "dark" : "light"), () => t.removeEventListener("change", a);
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
return Ce(e);
|
|
704
|
+
}), Z(), ae(1)), this.discoverTheme();
|
|
705
|
+
}
|
|
706
|
+
get scheme() {
|
|
707
|
+
return this._scheme$.getValue();
|
|
708
|
+
}
|
|
709
|
+
get color() {
|
|
710
|
+
return this._color$.getValue();
|
|
711
|
+
}
|
|
712
|
+
get theme() {
|
|
713
|
+
return this._theme$.getValue();
|
|
714
|
+
}
|
|
715
|
+
get themeComponent() {
|
|
716
|
+
return this._themeComponent$.getValue();
|
|
717
|
+
}
|
|
718
|
+
discoverTheme() {
|
|
719
|
+
return pe(window, we).pipe(be(Ve(100)), ye((e) => e.detail.theme), Be(null), ge((e) => {
|
|
720
|
+
e && this.registerThemeComponent(e);
|
|
721
|
+
})).pipe(ge(() => {
|
|
722
|
+
window.dispatchEvent(new CustomEvent(He, { bubbles: !0, composed: !0 }));
|
|
723
|
+
}), xe(() => pe(window, we).pipe(be(Ve(100)), ye((e) => e.detail.theme), Be(null), ge((e) => {
|
|
724
|
+
e && this.registerThemeComponent(e);
|
|
725
|
+
}))));
|
|
726
|
+
}
|
|
727
|
+
registerThemeComponent(e) {
|
|
728
|
+
this._themeComponent$.next(e), this._scheme$.next(e.scheme), this._color$.next(e.color), this._theme$.next(e.theme);
|
|
729
|
+
}
|
|
730
|
+
updateTheme(e) {
|
|
731
|
+
e.scheme !== void 0 && this._scheme$.next(e.scheme), e.color !== void 0 && this._color$.next(e.color), e.theme !== void 0 && this._theme$.next(e.theme);
|
|
732
|
+
}
|
|
733
|
+
setScheme(e) {
|
|
734
|
+
const t = this.themeComponent;
|
|
735
|
+
t ? (t.scheme = e, this._scheme$.next(e)) : this._scheme$.next(e);
|
|
736
|
+
}
|
|
737
|
+
setColor(e) {
|
|
738
|
+
const t = this.themeComponent;
|
|
739
|
+
t ? (t.color = e, this._color$.next(e)) : this._color$.next(e);
|
|
740
|
+
}
|
|
741
|
+
isDarkMode() {
|
|
742
|
+
return this.resolvedScheme$.pipe(ye((e) => e === "dark"));
|
|
743
|
+
}
|
|
744
|
+
toggleScheme() {
|
|
745
|
+
const e = this.scheme, t = e === "dark" ? "light" : e === "light" ? "dark" : "light";
|
|
746
|
+
this.setScheme(t);
|
|
747
|
+
}
|
|
748
|
+
getCSSVariable(e) {
|
|
749
|
+
const t = this.themeComponent;
|
|
750
|
+
if (t) {
|
|
751
|
+
const o = t.root ? document.body : t.shadowRoot?.host;
|
|
752
|
+
if (o) return getComputedStyle(o).getPropertyValue(`--schmancy-${e}`).trim();
|
|
753
|
+
}
|
|
754
|
+
return "";
|
|
755
|
+
}
|
|
756
|
+
watchCSSVariable(e) {
|
|
757
|
+
return this.theme$.pipe(ye(() => this.getCSSVariable(e)), Z());
|
|
758
|
+
}
|
|
759
|
+
static getInstance() {
|
|
760
|
+
return ee.instance || (ee.instance = new ee()), ee.instance;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
const ke = ee.getInstance(), ar = Ge("theme-context");
|
|
764
|
+
var nr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, ne = (r, e, t, o) => {
|
|
765
|
+
for (var a, n = o > 1 ? void 0 : o ? cr(e, t) : e, s = r.length - 1; s >= 0; s--) (a = r[s]) && (n = (o ? a(e, t, n) : a(n)) || n);
|
|
766
|
+
return o && n && nr(e, t, n), n;
|
|
767
|
+
};
|
|
768
|
+
const sr = We(':host,:root{--md-ref-typeface-brand: "Josefin Sans", sans-serif;--md-ref-typeface-plain: "Josefin Sans", sans-serif;--md-sys-color-primary: var(--schmancy-sys-color-primary-default);--md-sys-color-secondary: var(--schmancy-sys-color-secondary-default);--default-font-family: var(--schmancy-font-family);--border-style: solid;--spacing: 4px;--color-scrim: var(--schmancy-sys-color-scrim);--color-outline: var(--schmancy-sys-color-outline);--color-outlineVariant: var(--schmancy-sys-color-outlineVariant);--color-surface-default: var(--schmancy-sys-color-surface-default);--color-surface-dim: var(--schmancy-sys-color-surface-dim);--color-surface-bright: var(--schmancy-sys-color-surface-bright);--color-surface-container: var(--schmancy-sys-color-surface-container);--color-surface-low: var(--schmancy-sys-color-surface-low);--color-surface-high: var(--schmancy-sys-color-surface-high);--color-surface-highest: var(--schmancy-sys-color-surface-highest);--color-surface-lowest: var(--schmancy-sys-color-surface-lowest);--color-surface-on: var(--schmancy-sys-color-surface-on);--color-surface-onVariant: var(--schmancy-sys-color-surface-onVariant);--color-primary-default: var(--schmancy-sys-color-primary-default);--color-primary-on: var(--schmancy-sys-color-primary-on);--color-primary-container: var(--schmancy-sys-color-primary-container);--color-primary-onContainer: var(--schmancy-sys-color-primary-onContainer);--color-secondary-default: var(--schmancy-sys-color-secondary-default);--color-secondary-on: var(--schmancy-sys-color-secondary-on);--color-secondary-container: var(--schmancy-sys-color-secondary-container);--color-secondary-onContainer: var(--schmancy-sys-color-secondary-onContainer);--color-tertiary-default: var(--schmancy-sys-color-tertiary-default);--color-tertiary-on: var(--schmancy-sys-color-tertiary-on);--color-tertiary-container: var(--schmancy-sys-color-tertiary-container);--color-tertiary-onContainer: var(--schmancy-sys-color-tertiary-onContainer);--color-error-default: var(--schmancy-sys-color-error-default);--color-error-on: var(--schmancy-sys-color-error-on);--color-error-container: var(--schmancy-sys-color-error-container);--color-error-onContainer: var(--schmancy-sys-color-error-onContainer);--color-success-default: var(--schmancy-sys-color-success-default);--color-success-on: var(--schmancy-sys-color-success-on);--color-success-container: var(--schmancy-sys-color-success-container);--color-success-onContainer: var(--schmancy-sys-color-success-onContainer);--shadow-xs: var(--schmancy-sys-elevation-0);--shadow-sm: var(--schmancy-sys-elevation-1);--shadow-md: var(--schmancy-sys-elevation-2);--shadow-lg: var(--schmancy-sys-elevation-3);--shadow-xl: var(--schmancy-sys-elevation-4);--shadow-2xl: var(--schmancy-sys-elevation-5);--outline-1: var(--schmancy-sys-outline-1);--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50: oklch(.971 .013 17.38);--color-red-100: oklch(.936 .032 17.717);--color-red-200: oklch(.885 .062 18.334);--color-red-300: oklch(.808 .114 19.571);--color-red-400: oklch(.704 .191 22.216);--color-red-500: oklch(.637 .237 25.331);--color-red-600: oklch(.577 .245 27.325);--color-red-700: oklch(.505 .213 27.518);--color-red-800: oklch(.444 .177 26.899);--color-red-900: oklch(.396 .141 25.723);--color-red-950: oklch(.258 .092 26.042);--color-orange-50: oklch(.98 .016 73.684);--color-orange-100: oklch(.954 .038 75.164);--color-orange-200: oklch(.901 .076 70.697);--color-orange-300: oklch(.837 .128 66.29);--color-orange-400: oklch(.75 .183 55.934);--color-orange-500: oklch(.705 .213 47.604);--color-orange-600: oklch(.646 .222 41.116);--color-orange-700: oklch(.553 .195 38.402);--color-orange-800: oklch(.47 .157 37.304);--color-orange-900: oklch(.408 .123 38.172);--color-orange-950: oklch(.266 .079 36.259);--color-amber-50: oklch(.987 .022 95.277);--color-amber-100: oklch(.962 .059 95.617);--color-amber-200: oklch(.924 .12 95.746);--color-amber-300: oklch(.879 .169 91.605);--color-amber-400: oklch(.828 .189 84.429);--color-amber-500: oklch(.769 .188 70.08);--color-amber-600: oklch(.666 .179 58.318);--color-amber-700: oklch(.555 .163 48.998);--color-amber-800: oklch(.473 .137 46.201);--color-amber-900: oklch(.414 .112 45.904);--color-amber-950: oklch(.279 .077 45.635);--color-yellow-50: oklch(.987 .026 102.212);--color-yellow-100: oklch(.973 .071 103.193);--color-yellow-200: oklch(.945 .129 101.54);--color-yellow-300: oklch(.905 .182 98.111);--color-yellow-400: oklch(.852 .199 91.936);--color-yellow-500: oklch(.795 .184 86.047);--color-yellow-600: oklch(.681 .162 75.834);--color-yellow-700: oklch(.554 .135 66.442);--color-yellow-800: oklch(.476 .114 61.907);--color-yellow-900: oklch(.421 .095 57.708);--color-yellow-950: oklch(.286 .066 53.813);--color-lime-50: oklch(.986 .031 120.757);--color-lime-100: oklch(.967 .067 122.328);--color-lime-200: oklch(.938 .127 124.321);--color-lime-300: oklch(.897 .196 126.665);--color-lime-400: oklch(.841 .238 128.85);--color-lime-500: oklch(.768 .233 130.85);--color-lime-600: oklch(.648 .2 131.684);--color-lime-700: oklch(.532 .157 131.589);--color-lime-800: oklch(.453 .124 130.933);--color-lime-900: oklch(.405 .101 131.063);--color-lime-950: oklch(.274 .072 132.109);--color-green-50: oklch(.982 .018 155.826);--color-green-100: oklch(.962 .044 156.743);--color-green-200: oklch(.925 .084 155.995);--color-green-300: oklch(.871 .15 154.449);--color-green-400: oklch(.792 .209 151.711);--color-green-500: oklch(.723 .219 149.579);--color-green-600: oklch(.627 .194 149.214);--color-green-700: oklch(.527 .154 150.069);--color-green-800: oklch(.448 .119 151.328);--color-green-900: oklch(.393 .095 152.535);--color-green-950: oklch(.266 .065 152.934);--color-emerald-50: oklch(.979 .021 166.113);--color-emerald-100: oklch(.95 .052 163.051);--color-emerald-200: oklch(.905 .093 164.15);--color-emerald-300: oklch(.845 .143 164.978);--color-emerald-400: oklch(.765 .177 163.223);--color-emerald-500: oklch(.696 .17 162.48);--color-emerald-600: oklch(.596 .145 163.225);--color-emerald-700: oklch(.508 .118 165.612);--color-emerald-800: oklch(.432 .095 166.913);--color-emerald-900: oklch(.378 .077 168.94);--color-emerald-950: oklch(.262 .051 172.552);--color-teal-50: oklch(.984 .014 180.72);--color-teal-100: oklch(.953 .051 180.801);--color-teal-200: oklch(.91 .096 180.426);--color-teal-300: oklch(.855 .138 181.071);--color-teal-400: oklch(.777 .152 181.912);--color-teal-500: oklch(.704 .14 182.503);--color-teal-600: oklch(.6 .118 184.704);--color-teal-700: oklch(.511 .096 186.391);--color-teal-800: oklch(.437 .078 188.216);--color-teal-900: oklch(.386 .063 188.416);--color-teal-950: oklch(.277 .046 192.524);--color-cyan-50: oklch(.984 .019 200.873);--color-cyan-100: oklch(.956 .045 203.388);--color-cyan-200: oklch(.917 .08 205.041);--color-cyan-300: oklch(.865 .127 207.078);--color-cyan-400: oklch(.789 .154 211.53);--color-cyan-500: oklch(.715 .143 215.221);--color-cyan-600: oklch(.609 .126 221.723);--color-cyan-700: oklch(.52 .105 223.128);--color-cyan-800: oklch(.45 .085 224.283);--color-cyan-900: oklch(.398 .07 227.392);--color-cyan-950: oklch(.302 .056 229.695);--color-sky-50: oklch(.977 .013 236.62);--color-sky-100: oklch(.951 .026 236.824);--color-sky-200: oklch(.901 .058 230.902);--color-sky-300: oklch(.828 .111 230.318);--color-sky-400: oklch(.746 .16 232.661);--color-sky-500: oklch(.685 .169 237.323);--color-sky-600: oklch(.588 .158 241.966);--color-sky-700: oklch(.5 .134 242.749);--color-sky-800: oklch(.443 .11 240.79);--color-sky-900: oklch(.391 .09 240.876);--color-sky-950: oklch(.293 .066 243.157);--color-blue-50: oklch(.97 .014 254.604);--color-blue-100: oklch(.932 .032 255.585);--color-blue-200: oklch(.882 .059 254.128);--color-blue-300: oklch(.809 .105 251.813);--color-blue-400: oklch(.707 .165 254.624);--color-blue-500: oklch(.623 .214 259.815);--color-blue-600: oklch(.546 .245 262.881);--color-blue-700: oklch(.488 .243 264.376);--color-blue-800: oklch(.424 .199 265.638);--color-blue-900: oklch(.379 .146 265.522);--color-blue-950: oklch(.282 .091 267.935);--color-indigo-50: oklch(.962 .018 272.314);--color-indigo-100: oklch(.93 .034 272.788);--color-indigo-200: oklch(.87 .065 274.039);--color-indigo-300: oklch(.785 .115 274.713);--color-indigo-400: oklch(.673 .182 276.935);--color-indigo-500: oklch(.585 .233 277.117);--color-indigo-600: oklch(.511 .262 276.966);--color-indigo-700: oklch(.457 .24 277.023);--color-indigo-800: oklch(.398 .195 277.366);--color-indigo-900: oklch(.359 .144 278.697);--color-indigo-950: oklch(.257 .09 281.288);--color-violet-50: oklch(.969 .016 293.756);--color-violet-100: oklch(.943 .029 294.588);--color-violet-200: oklch(.894 .057 293.283);--color-violet-300: oklch(.811 .111 293.571);--color-violet-400: oklch(.702 .183 293.541);--color-violet-500: oklch(.606 .25 292.717);--color-violet-600: oklch(.541 .281 293.009);--color-violet-700: oklch(.491 .27 292.581);--color-violet-800: oklch(.432 .232 292.759);--color-violet-900: oklch(.38 .189 293.745);--color-violet-950: oklch(.283 .141 291.089);--color-purple-50: oklch(.977 .014 308.299);--color-purple-100: oklch(.946 .033 307.174);--color-purple-200: oklch(.902 .063 306.703);--color-purple-300: oklch(.827 .119 306.383);--color-purple-400: oklch(.714 .203 305.504);--color-purple-500: oklch(.627 .265 303.9);--color-purple-600: oklch(.558 .288 302.321);--color-purple-700: oklch(.496 .265 301.924);--color-purple-800: oklch(.438 .218 303.724);--color-purple-900: oklch(.381 .176 304.987);--color-purple-950: oklch(.291 .149 302.717);--color-fuchsia-50: oklch(.977 .017 320.058);--color-fuchsia-100: oklch(.952 .037 318.852);--color-fuchsia-200: oklch(.903 .076 319.62);--color-fuchsia-300: oklch(.833 .145 321.434);--color-fuchsia-400: oklch(.74 .238 322.16);--color-fuchsia-500: oklch(.667 .295 322.15);--color-fuchsia-600: oklch(.591 .293 322.896);--color-fuchsia-700: oklch(.518 .253 323.949);--color-fuchsia-800: oklch(.452 .211 324.591);--color-fuchsia-900: oklch(.401 .17 325.612);--color-fuchsia-950: oklch(.293 .136 325.661);--color-pink-50: oklch(.971 .014 343.198);--color-pink-100: oklch(.948 .028 342.258);--color-pink-200: oklch(.899 .061 343.231);--color-pink-300: oklch(.823 .12 346.018);--color-pink-400: oklch(.718 .202 349.761);--color-pink-500: oklch(.656 .241 354.308);--color-pink-600: oklch(.592 .249 .584);--color-pink-700: oklch(.525 .223 3.958);--color-pink-800: oklch(.459 .187 3.815);--color-pink-900: oklch(.408 .153 2.432);--color-pink-950: oklch(.284 .109 3.907);--color-rose-50: oklch(.969 .015 12.422);--color-rose-100: oklch(.941 .03 12.58);--color-rose-200: oklch(.892 .058 10.001);--color-rose-300: oklch(.81 .117 11.638);--color-rose-400: oklch(.712 .194 13.428);--color-rose-500: oklch(.645 .246 16.439);--color-rose-600: oklch(.586 .253 17.585);--color-rose-700: oklch(.514 .222 16.935);--color-rose-800: oklch(.455 .188 13.697);--color-rose-900: oklch(.41 .159 10.272);--color-rose-950: oklch(.271 .105 12.094);--color-slate-50: oklch(.984 .003 247.858);--color-slate-100: oklch(.968 .007 247.896);--color-slate-200: oklch(.929 .013 255.508);--color-slate-300: oklch(.869 .022 252.894);--color-slate-400: oklch(.704 .04 256.788);--color-slate-500: oklch(.554 .046 257.417);--color-slate-600: oklch(.446 .043 257.281);--color-slate-700: oklch(.372 .044 257.287);--color-slate-800: oklch(.279 .041 260.031);--color-slate-900: oklch(.208 .042 265.755);--color-slate-950: oklch(.129 .042 264.695);--color-gray-50: oklch(.985 .002 247.839);--color-gray-100: oklch(.967 .003 264.542);--color-gray-200: oklch(.928 .006 264.531);--color-gray-300: oklch(.872 .01 258.338);--color-gray-400: oklch(.707 .022 261.325);--color-gray-500: oklch(.551 .027 264.364);--color-gray-600: oklch(.446 .03 256.802);--color-gray-700: oklch(.373 .034 259.733);--color-gray-800: oklch(.278 .033 256.848);--color-gray-900: oklch(.21 .034 264.665);--color-gray-950: oklch(.13 .028 261.692);--color-zinc-50: oklch(.985 0 0);--color-zinc-100: oklch(.967 .001 286.375);--color-zinc-200: oklch(.92 .004 286.32);--color-zinc-300: oklch(.871 .006 286.286);--color-zinc-400: oklch(.705 .015 286.067);--color-zinc-500: oklch(.552 .016 285.938);--color-zinc-600: oklch(.442 .017 285.786);--color-zinc-700: oklch(.37 .013 285.805);--color-zinc-800: oklch(.274 .006 286.033);--color-zinc-900: oklch(.21 .006 285.885);--color-zinc-950: oklch(.141 .005 285.823);--color-neutral-50: oklch(.985 0 0);--color-neutral-100: oklch(.97 0 0);--color-neutral-200: oklch(.922 0 0);--color-neutral-300: oklch(.87 0 0);--color-neutral-400: oklch(.708 0 0);--color-neutral-500: oklch(.556 0 0);--color-neutral-600: oklch(.439 0 0);--color-neutral-700: oklch(.371 0 0);--color-neutral-800: oklch(.269 0 0);--color-neutral-900: oklch(.205 0 0);--color-neutral-950: oklch(.145 0 0);--color-stone-50: oklch(.985 .001 106.423);--color-stone-100: oklch(.97 .001 106.424);--color-stone-200: oklch(.923 .003 48.717);--color-stone-300: oklch(.869 .005 56.366);--color-stone-400: oklch(.709 .01 56.259);--color-stone-500: oklch(.553 .013 58.071);--color-stone-600: oklch(.444 .011 73.639);--color-stone-700: oklch(.374 .01 67.558);--color-stone-800: oklch(.268 .007 34.298);--color-stone-900: oklch(.216 .006 56.043);--color-stone-950: oklch(.147 .004 49.25);--color-black: #000;--color-white: #fff;--spacing: .25rem;--breakpoint-sm: 40rem;--breakpoint-md: 48rem;--breakpoint-lg: 64rem;--breakpoint-xl: 80rem;--breakpoint-2xl: 96rem;--container-3xs: 16rem;--container-2xs: 18rem;--container-xs: 20rem;--container-sm: 24rem;--container-md: 28rem;--container-lg: 32rem;--container-xl: 36rem;--container-2xl: 42rem;--container-3xl: 48rem;--container-4xl: 56rem;--container-5xl: 64rem;--container-6xl: 72rem;--container-7xl: 80rem;--text-xs: .75rem;--text-xs--line-height: calc(1 / .75);--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--text-base: 1rem;--text-base--line-height: 1.5 ;--text-lg: 1.125rem;--text-lg--line-height: calc(1.75 / 1.125);--text-xl: 1.25rem;--text-xl--line-height: calc(1.75 / 1.25);--text-2xl: 1.5rem;--text-2xl--line-height: calc(2 / 1.5);--text-3xl: 1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl: 2.25rem;--text-4xl--line-height: calc(2.5 / 2.25);--text-5xl: 3rem;--text-5xl--line-height: 1;--text-6xl: 3.75rem;--text-6xl--line-height: 1;--text-7xl: 4.5rem;--text-7xl--line-height: 1;--text-8xl: 6rem;--text-8xl--line-height: 1;--text-9xl: 8rem;--text-9xl--line-height: 1;--font-weight-thin: 100;--font-weight-extralight: 200;--font-weight-light: 300;--font-weight-normal: 400;--font-weight-medium: 500;--font-weight-semibold: 600;--font-weight-bold: 700;--font-weight-extrabold: 800;--font-weight-black: 900;--tracking-tighter: -.05em;--tracking-tight: -.025em;--tracking-normal: 0em;--tracking-wide: .025em;--tracking-wider: .05em;--tracking-widest: .1em;--leading-tight: 1.25;--leading-snug: 1.375;--leading-normal: 1.5;--leading-relaxed: 1.625;--leading-loose: 2;--radius-xs: .125rem;--radius-sm: .25rem;--radius-md: .375rem;--radius-lg: .5rem;--radius-xl: .75rem;--radius-2xl: 1rem;--radius-3xl: 1.5rem;--radius-4xl: 2rem;--shadow-smxs: 0 1px rgb(0 0 0 / .05);--shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05);--shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--shadow-smxl: 0 25px 50px -12px rgb(0 0 0 / .25);--inset-shadow-smxs: inset 0 1px rgb(0 0 0 / .05);--inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / .05);--inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / .05);--drop-shadow-xs: 0 1px 1px rgb(0 0 0 / .05);--drop-shadow-sm: 0 1px 2px rgb(0 0 0 / .15);--drop-shadow-md: 0 3px 3px rgb(0 0 0 / .12);--drop-shadow-lg: 0 4px 4px rgb(0 0 0 / .15);--drop-shadow-xl: 0 9px 7px rgb(0 0 0 / .1);--drop-shadow-smxl: 0 25px 25px rgb(0 0 0 / .15);--blur-xs: 4px;--blur-sm: 8px;--blur-md: 12px;--blur-lg: 16px;--blur-xl: 24px;--blur-2xl: 40px;--blur-3xl: 64px;--perspective-dramatic: 100px;--perspective-near: 300px;--perspective-normal: 500px;--perspective-midrange: 800px;--perspective-distant: 1200px;--aspect-video: 16 / 9;--ease-in: cubic-bezier(.4, 0, 1, 1);--ease-out: cubic-bezier(0, 0, .2, 1);--ease-in-out: cubic-bezier(.4, 0, .2, 1);--animate-spin: spin 1s linear infinite;--animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--animate-bounce: bounce 1s infinite;@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}--md-sys-color-scrim: var(--schmancy-sys-color-scrim);--md-sys-color-outline: var(--schmancy-sys-color-outline);--md-sys-color-outlineVariant: var(--schmancy-sys-color-outlineVariant);--md-sys-color-surface-default: var(--schmancy-sys-color-surface-default);--md-sys-color-surface-dim: var(--schmancy-sys-color-surface-dim);--md-sys-color-surface-bright: var(--schmancy-sys-color-surface-bright);--md-sys-color-surface-container: var(--schmancy-sys-color-surface-container);--md-sys-color-surface-low: var(--schmancy-sys-color-surface-low);--md-sys-color-surface-high: var(--schmancy-sys-color-surface-high);--md-sys-color-surface-highest: var(--schmancy-sys-color-surface-highest);--md-sys-color-surface-lowest: var(--schmancy-sys-color-surface-lowest);--md-sys-color-surface-on: var(--schmancy-sys-color-surface-on);--md-sys-color-on-surface-variant: var(--schmancy-sys-color-surface-onVariant);--md-sys-color-on-secondary-container: var(--schmancy-sys-color-secondary-onContainer);--md-sys-color-primary-default: var(--schmancy-sys-color-primary-default);--md-sys-color-primary-on: var(--schmancy-sys-color-primary-on);--md-sys-color-primary-container: var(--schmancy-sys-color-primary-container);--md-sys-color-primary-onContainer: var(--schmancy-sys-color-primary-onContainer);--md-sys-color-secondary-default: var(--schmancy-sys-color-secondary-default);--md-sys-color-secondary-on: var(--schmancy-sys-color-secondary-on);--md-sys-color-secondary-container: var(--schmancy-sys-color-secondary-container);--md-sys-color-secondary-onContainer: var(--schmancy-sys-color-secondary-onContainer);--md-sys-color-tertiary-default: var(--schmancy-sys-color-tertiary-default);--md-sys-color-tertiary-on: var(--schmancy-sys-color-tertiary-on);--md-sys-color-tertiary-container: var(--schmancy-sys-color-tertiary-container);--md-sys-color-tertiary-onContainer: var(--schmancy-sys-color-tertiary-onContainer);--md-sys-color-error-default: var(--schmancy-sys-color-error-default);--md-sys-color-error-on: var(--schmancy-sys-color-error-on);--md-sys-color-error-container: var(--schmancy-sys-color-error-container);--md-sys-color-error-onContainer: var(--schmancy-sys-color-error-onContainer);--md-sys-color-success-default: var(--schmancy-sys-color-success-default);--md-sys-color-success-on: var(--schmancy-sys-color-success-on);--md-sys-color-success-container: var(--schmancy-sys-color-success-container);--md-sys-color-success-onContainer: var(--schmancy-sys-color-success-onContainer);--md-sys-elevation-0: var(--schmancy-sys-elevation-0);--md-sys-elevation-1: var(--schmancy-sys-elevation-1);--md-sys-elevation-2: var(--schmancy-sys-elevation-2);--md-sys-elevation-3: var(--schmancy-sys-elevation-3);--md-sys-elevation-4: var(--schmancy-sys-elevation-4);--md-sys-elevation-5: var(--schmancy-sys-elevation-5);--md-sys-outline-1: var(--schmancy-sys-outline-1);--md-filter-chip-label-text-color: var(--schmancy-sys-color-surface-on);--md-checkbox-focus-outline-color: var(--schmancy-sys-color-surface-on);--md-checkbox-focus-outline-width: 2px;--md-checkbox-hover-outline-color: var(--schmancy-sys-color-surface-on);--md-checkbox-hover-outline-width: 2px;--md-checkbox-pressed-outline-color: var(--schmancy-sys-color-surface-on);--md-checkbox-pressed-outline-width: 2px;--md-checkbox-disabled-outline-color: var(--schmancy-sys-color-surface-on);--md-checkbox-disabled-outline-width: 2px}'), Ae = window.matchMedia("(prefers-color-scheme: dark)"), ir = new Ee((r) => {
|
|
769
|
+
const e = Ae.matches ? "dark" : "light";
|
|
770
|
+
r.next(e);
|
|
771
|
+
const t = pe(Ae, "change").subscribe((o) => {
|
|
772
|
+
const a = o.matches ? "dark" : "light";
|
|
773
|
+
r.next(a);
|
|
774
|
+
});
|
|
775
|
+
return () => t.unsubscribe();
|
|
776
|
+
});
|
|
777
|
+
let X = class extends Ke(sr) {
|
|
778
|
+
constructor() {
|
|
779
|
+
super(...arguments), this.scheme = "auto", this.root = !1, this.theme = {};
|
|
780
|
+
}
|
|
781
|
+
connectedCallback() {
|
|
782
|
+
super.connectedCallback(), this.color || (this.color = this.generateRandomColor()), ke.registerThemeComponent(this), Ce(this.scheme).pipe(xe((r) => r === "auto" ? ir : Ce(r))).subscribe((r) => {
|
|
783
|
+
this.scheme = r, this.registerTheme(), ke.updateTheme({ scheme: this.scheme, color: this.color, theme: this.theme });
|
|
784
|
+
}), pe(this, He).pipe(be(this.disconnecting)).subscribe((r) => {
|
|
785
|
+
r.stopPropagation(), r.preventDefault(), window.dispatchEvent(new CustomEvent(we, { detail: { theme: this }, bubbles: !0, composed: !0 }));
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
updated(r) {
|
|
789
|
+
super.updated(r), (r.has("color") || r.has("scheme") || r.has("theme")) && ke.updateTheme({ scheme: this.scheme, color: this.color, theme: this.theme });
|
|
790
|
+
}
|
|
791
|
+
registerTheme() {
|
|
792
|
+
let r = or(tr(W(this.color)), this.scheme === "dark", { success: W("#34B334"), warning: W("#FFA726"), info: W("#29B6F6") });
|
|
793
|
+
r = { ...r, ...this.theme }, this.registerThemeValues("schmancy", "", r);
|
|
794
|
+
const e = this.root ? document.body : this.shadowRoot.host, t = (o) => e.style.getPropertyValue(o);
|
|
795
|
+
e.style.setProperty("--schmancy-sys-color-surface-low", t("--schmancy-sys-color-surface-containerLow")), e.style.setProperty("--schmancy-sys-color-surface-high", t("--schmancy-sys-color-surface-containerHigh")), e.style.setProperty("--schmancy-sys-color-surface-highest", t("--schmancy-sys-color-surface-containerHighest")), e.style.setProperty("--schmancy-sys-color-surface-lowest", t("--schmancy-sys-color-surface-containerLowest")), e.style.colorScheme = this.scheme === "dark" ? "dark" : "light";
|
|
796
|
+
}
|
|
797
|
+
registerThemeValues(r = "schmancy", e, t) {
|
|
798
|
+
return typeof t == "object" ? Object.keys(t).map((o) => this.registerThemeValues(r, e + (e ? "-" : "") + o, t[o])).join(`
|
|
799
|
+
`) : void (this.root ? document.body : this.shadowRoot.host).style.setProperty(`--${r}-${e}`, t);
|
|
800
|
+
}
|
|
801
|
+
generateRandomColor() {
|
|
802
|
+
return "#" + Math.floor(16777215 * Math.random()).toString(16).padStart(6, "0");
|
|
803
|
+
}
|
|
804
|
+
render() {
|
|
805
|
+
return Qe`<slot></slot>`;
|
|
806
|
+
}
|
|
807
|
+
};
|
|
808
|
+
ne([ue({ type: String, reflect: !0 })], X.prototype, "color", 2), ne([ue({ type: String })], X.prototype, "scheme", 2), ne([ue({ type: Boolean })], X.prototype, "root", 2), ne([Je({ context: ar }), ue({ type: Object })], X.prototype, "theme", 2), X = ne([Ze("schmancy-theme")], X);
|
|
809
|
+
export {
|
|
810
|
+
X as S,
|
|
811
|
+
fr as a,
|
|
812
|
+
sr as b,
|
|
813
|
+
pr as c,
|
|
814
|
+
ar as d,
|
|
815
|
+
or as f,
|
|
816
|
+
ke as t
|
|
817
|
+
};
|
|
818
|
+
//# sourceMappingURL=theme.component-DPfWc8Tz.js.map
|