@oiz/stzh-components 3.4.0-beta1 → 3.4.0-beta2
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/cjs/{app-globals-1074eba6.js → app-globals-d9805497.js} +2 -2
- package/dist/cjs/{app-globals-1074eba6.js.map → app-globals-d9805497.js.map} +1 -1
- package/dist/cjs/index-92254d32.js +40 -16
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-actions.cjs.entry.js +10 -8
- package/dist/cjs/stzh-actions.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-archivelist.cjs.entry.js +6 -16
- package/dist/cjs/stzh-archivelist.cjs.entry.js.map +1 -1
- package/dist/cjs/{stzh-card_2.cjs.entry.js → stzh-card.cjs.entry.js} +55 -143
- package/dist/cjs/stzh-card.cjs.entry.js.map +1 -0
- package/dist/cjs/{stzh-sortable.cjs.entry.js → stzh-cardlist_2.cjs.entry.js} +92 -1
- package/dist/cjs/stzh-cardlist_2.cjs.entry.js.map +1 -0
- package/dist/cjs/{stzh-checkbox_4.cjs.entry.js → stzh-checkbox_3.cjs.entry.js} +4 -91
- package/dist/cjs/stzh-checkbox_3.cjs.entry.js.map +1 -0
- package/dist/cjs/{stzh-chip_2.cjs.entry.js → stzh-chip.cjs.entry.js} +1 -215
- package/dist/cjs/stzh-chip.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-chipgroup.cjs.entry.js +25 -0
- package/dist/cjs/stzh-chipgroup.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-chipselect.cjs.entry.js +234 -0
- package/dist/cjs/stzh-chipselect.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-dropdown.cjs.entry.js +53 -55
- package/dist/cjs/stzh-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-fieldset.cjs.entry.js +1 -1
- package/dist/cjs/stzh-fieldset.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-geo-ref-data.cjs.entry.js +98 -41
- package/dist/cjs/stzh-geo-ref-data.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-input.cjs.entry.js +6 -2
- package/dist/cjs/stzh-input.cjs.entry.js.map +1 -1
- package/dist/cjs/{stzh-chipgroup_2.cjs.entry.js → stzh-message.cjs.entry.js} +1 -18
- package/dist/cjs/stzh-message.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-overlay.cjs.entry.js +97 -0
- package/dist/cjs/stzh-overlay.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-pi-teaser.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pi-teaser.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-poicard.cjs.entry.js +52 -0
- package/dist/cjs/stzh-poicard.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-poilist.cjs.entry.js +122 -0
- package/dist/cjs/stzh-poilist.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-popover.cjs.entry.js +445 -0
- package/dist/cjs/stzh-popover.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-saptcha.cjs.entry.js +10 -9
- package/dist/cjs/stzh-saptcha.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-search.cjs.entry.js +52 -3
- package/dist/cjs/stzh-search.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-section.cjs.entry.js +1 -1
- package/dist/cjs/stzh-section.cjs.entry.js.map +1 -1
- package/dist/cjs/{stzh-popover_2.cjs.entry.js → stzh-text.cjs.entry.js} +1 -438
- package/dist/cjs/stzh-text.cjs.entry.js.map +1 -0
- package/dist/cjs/stzh-vbz-connection-finder.cjs.entry.js +1 -1
- package/dist/cjs/stzh-vbz-connection-finder.cjs.entry.js.map +1 -1
- package/dist/collection/assets/i18n/de.json +9 -0
- package/dist/collection/assets/i18n/en.json +9 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/stzh-actions/stzh-actions.css +27 -0
- package/dist/collection/components/stzh-actions/stzh-actions.js +30 -10
- package/dist/collection/components/stzh-actions/stzh-actions.js.map +1 -1
- package/dist/collection/components/stzh-archivelist/stzh-archivelist.css +3 -0
- package/dist/collection/components/stzh-archivelist/stzh-archivelist.js +42 -16
- package/dist/collection/components/stzh-archivelist/stzh-archivelist.js.map +1 -1
- package/dist/collection/components/stzh-archivelist/stzh-archivelist.stories.js +109 -102
- package/dist/collection/components/stzh-card/stzh-card.css +5 -0
- package/dist/collection/components/stzh-card/stzh-card.js +72 -51
- package/dist/collection/components/stzh-card/stzh-card.js.map +1 -1
- package/dist/collection/components/stzh-cardlist/stzh-cardlist.css +5 -0
- package/dist/collection/components/stzh-chipselect/stzh-chipselect.css +8 -8
- package/dist/collection/components/stzh-chipselect/stzh-chipselect.js +13 -1
- package/dist/collection/components/stzh-chipselect/stzh-chipselect.js.map +1 -1
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.css +11 -1
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.js +89 -55
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.js.map +1 -1
- package/dist/collection/components/stzh-fieldset/stzh-fieldset.css +120 -0
- package/dist/collection/components/stzh-geo-ref-data/stzh-geo-ref-data.css +2 -0
- package/dist/collection/components/stzh-geo-ref-data/stzh-geo-ref-data.js +156 -51
- package/dist/collection/components/stzh-geo-ref-data/stzh-geo-ref-data.js.map +1 -1
- package/dist/collection/components/stzh-geo-ref-data/stzh-geo-ref-data.stories.js +64 -63
- package/dist/collection/components/stzh-input/stzh-input.css +6 -0
- package/dist/collection/components/stzh-input/stzh-input.js +23 -1
- package/dist/collection/components/stzh-input/stzh-input.js.map +1 -1
- package/dist/collection/components/stzh-pi-teaser/stzh-pi-teaser.css +18 -3
- package/dist/collection/components/stzh-pi-teaser/stzh-pi-teaser.stories.js +30 -29
- package/dist/collection/components/stzh-poicard/stzh-poicard.css +231 -0
- package/dist/collection/components/stzh-poicard/stzh-poicard.e2e.js +16 -0
- package/dist/collection/components/stzh-poicard/stzh-poicard.e2e.js.map +1 -0
- package/dist/collection/components/stzh-poicard/stzh-poicard.js +86 -0
- package/dist/collection/components/stzh-poicard/stzh-poicard.js.map +1 -0
- package/dist/collection/components/stzh-poicard/stzh-poicard.stories.js +117 -0
- package/dist/collection/components/stzh-poilist/stzh-poilist.css +210 -0
- package/dist/collection/components/stzh-poilist/stzh-poilist.e2e.js +16 -0
- package/dist/collection/components/stzh-poilist/stzh-poilist.e2e.js.map +1 -0
- package/dist/collection/components/stzh-poilist/stzh-poilist.js +181 -0
- package/dist/collection/components/stzh-poilist/stzh-poilist.js.map +1 -0
- package/dist/collection/components/stzh-poilist/stzh-poilist.localization.js +2 -0
- package/dist/collection/components/stzh-poilist/stzh-poilist.localization.js.map +1 -0
- package/dist/collection/components/stzh-poilist/stzh-poilist.stories.js +31 -0
- package/dist/collection/components/stzh-richtext/stzh-richtext.stories.js +31 -16
- package/dist/collection/components/stzh-saptcha/stzh-saptcha.js +34 -17
- package/dist/collection/components/stzh-saptcha/stzh-saptcha.js.map +1 -1
- package/dist/collection/components/stzh-saptcha/stzh-saptcha.stories.js +3 -0
- package/dist/collection/components/stzh-search/stzh-search.css +4 -4
- package/dist/collection/components/stzh-search/stzh-search.js +122 -2
- package/dist/collection/components/stzh-search/stzh-search.js.map +1 -1
- package/dist/collection/components/stzh-section/stzh-section.css +19 -6
- package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.js +1 -1
- package/dist/collection/components/stzh-vbz-connection-finder/stzh-vbz-connection-finder.js.map +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/pages/jobsearch/jobsearch.e2e.js +16 -0
- package/dist/collection/pages/jobsearch/jobsearch.e2e.js.map +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/stzh-actions.js +12 -9
- package/dist/components/stzh-actions.js.map +1 -1
- package/dist/components/stzh-archivelist.js +20 -22
- package/dist/components/stzh-archivelist.js.map +1 -1
- package/dist/components/stzh-card2.js +55 -51
- package/dist/components/stzh-card2.js.map +1 -1
- package/dist/components/stzh-cardlist2.js +1 -1
- package/dist/components/stzh-cardlist2.js.map +1 -1
- package/dist/components/stzh-chipselect2.js +14 -2
- package/dist/components/stzh-chipselect2.js.map +1 -1
- package/dist/components/stzh-dropdown2.js +55 -55
- package/dist/components/stzh-dropdown2.js.map +1 -1
- package/dist/components/stzh-fieldset.js +1 -1
- package/dist/components/stzh-fieldset.js.map +1 -1
- package/dist/components/stzh-geo-ref-data.js +109 -45
- package/dist/components/stzh-geo-ref-data.js.map +1 -1
- package/dist/components/stzh-input2.js +7 -2
- package/dist/components/stzh-input2.js.map +1 -1
- package/dist/components/stzh-pi-teaser.js +1 -1
- package/dist/components/stzh-pi-teaser.js.map +1 -1
- package/dist/components/stzh-poicard.d.ts +11 -0
- package/dist/components/stzh-poicard.js +8 -0
- package/dist/components/stzh-poicard.js.map +1 -0
- package/dist/components/stzh-poicard2.js +108 -0
- package/dist/components/stzh-poicard2.js.map +1 -0
- package/dist/components/stzh-poilist.d.ts +11 -0
- package/dist/components/stzh-poilist.js +246 -0
- package/dist/components/stzh-poilist.js.map +1 -0
- package/dist/components/stzh-saptcha.js +13 -14
- package/dist/components/stzh-saptcha.js.map +1 -1
- package/dist/components/stzh-search.js +57 -3
- package/dist/components/stzh-search.js.map +1 -1
- package/dist/components/stzh-section.js +1 -1
- package/dist/components/stzh-section.js.map +1 -1
- package/dist/components/stzh-vbz-connection-finder.js +1 -1
- package/dist/components/stzh-vbz-connection-finder.js.map +1 -1
- package/dist/esm/{app-globals-fbb949bd.js → app-globals-ca13b6e3.js} +2 -2
- package/dist/esm/{app-globals-fbb949bd.js.map → app-globals-ca13b6e3.js.map} +1 -1
- package/dist/esm/index-e3050b18.js +40 -16
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-actions.entry.js +10 -8
- package/dist/esm/stzh-actions.entry.js.map +1 -1
- package/dist/esm/stzh-archivelist.entry.js +6 -16
- package/dist/esm/stzh-archivelist.entry.js.map +1 -1
- package/dist/esm/{stzh-card_2.entry.js → stzh-card.entry.js} +56 -143
- package/dist/esm/stzh-card.entry.js.map +1 -0
- package/dist/esm/{stzh-sortable.entry.js → stzh-cardlist_2.entry.js} +92 -2
- package/dist/esm/stzh-cardlist_2.entry.js.map +1 -0
- package/dist/esm/{stzh-checkbox_4.entry.js → stzh-checkbox_3.entry.js} +5 -91
- package/dist/esm/stzh-checkbox_3.entry.js.map +1 -0
- package/dist/esm/{stzh-chip_2.entry.js → stzh-chip.entry.js} +3 -216
- package/dist/esm/stzh-chip.entry.js.map +1 -0
- package/dist/esm/stzh-chipgroup.entry.js +21 -0
- package/dist/esm/stzh-chipgroup.entry.js.map +1 -0
- package/dist/esm/stzh-chipselect.entry.js +230 -0
- package/dist/esm/stzh-chipselect.entry.js.map +1 -0
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-dropdown.entry.js +53 -55
- package/dist/esm/stzh-dropdown.entry.js.map +1 -1
- package/dist/esm/stzh-fieldset.entry.js +1 -1
- package/dist/esm/stzh-fieldset.entry.js.map +1 -1
- package/dist/esm/stzh-geo-ref-data.entry.js +98 -41
- package/dist/esm/stzh-geo-ref-data.entry.js.map +1 -1
- package/dist/esm/stzh-input.entry.js +6 -2
- package/dist/esm/stzh-input.entry.js.map +1 -1
- package/dist/esm/{stzh-chipgroup_2.entry.js → stzh-message.entry.js} +3 -19
- package/dist/esm/stzh-message.entry.js.map +1 -0
- package/dist/esm/stzh-overlay.entry.js +93 -0
- package/dist/esm/stzh-overlay.entry.js.map +1 -0
- package/dist/esm/stzh-pi-teaser.entry.js +1 -1
- package/dist/esm/stzh-pi-teaser.entry.js.map +1 -1
- package/dist/esm/stzh-poicard.entry.js +48 -0
- package/dist/esm/stzh-poicard.entry.js.map +1 -0
- package/dist/esm/stzh-poilist.entry.js +118 -0
- package/dist/esm/stzh-poilist.entry.js.map +1 -0
- package/dist/esm/stzh-popover.entry.js +441 -0
- package/dist/esm/stzh-popover.entry.js.map +1 -0
- package/dist/esm/stzh-saptcha.entry.js +11 -10
- package/dist/esm/stzh-saptcha.entry.js.map +1 -1
- package/dist/esm/stzh-search.entry.js +52 -3
- package/dist/esm/stzh-search.entry.js.map +1 -1
- package/dist/esm/stzh-section.entry.js +1 -1
- package/dist/esm/stzh-section.entry.js.map +1 -1
- package/dist/esm/{stzh-popover_2.entry.js → stzh-text.entry.js} +3 -439
- package/dist/esm/stzh-text.entry.js.map +1 -0
- package/dist/esm/stzh-vbz-connection-finder.entry.js +1 -1
- package/dist/esm/stzh-vbz-connection-finder.entry.js.map +1 -1
- package/dist/stzh-components/assets/i18n/de.json +9 -0
- package/dist/stzh-components/assets/i18n/en.json +9 -0
- package/dist/stzh-components/index.esm.js.map +1 -1
- package/dist/stzh-components/{p-206ec94f.entry.js → p-0846f5a7.entry.js} +2 -2
- package/dist/stzh-components/p-0846f5a7.entry.js.map +1 -0
- package/dist/stzh-components/p-0d092d58.entry.js +2 -0
- package/dist/stzh-components/p-0d092d58.entry.js.map +1 -0
- package/dist/stzh-components/{p-38cd406c.entry.js → p-10c2c688.entry.js} +2 -2
- package/dist/stzh-components/p-10c2c688.entry.js.map +1 -0
- package/dist/stzh-components/{p-23de5712.entry.js → p-1391115f.entry.js} +2 -2
- package/dist/stzh-components/{p-23de5712.entry.js.map → p-1391115f.entry.js.map} +1 -1
- package/dist/stzh-components/p-1b2fb680.entry.js +9 -0
- package/dist/stzh-components/p-1b2fb680.entry.js.map +1 -0
- package/dist/stzh-components/p-1e121c5f.entry.js +2 -0
- package/dist/stzh-components/p-1e121c5f.entry.js.map +1 -0
- package/dist/stzh-components/p-35d842ce.entry.js +2 -0
- package/dist/stzh-components/p-35d842ce.entry.js.map +1 -0
- package/dist/stzh-components/p-3e2b4d92.entry.js +2 -0
- package/dist/stzh-components/p-3e2b4d92.entry.js.map +1 -0
- package/dist/stzh-components/p-47cb71af.entry.js +2 -0
- package/dist/stzh-components/p-47cb71af.entry.js.map +1 -0
- package/dist/stzh-components/p-4e2db8e9.entry.js +8 -0
- package/dist/stzh-components/p-4e2db8e9.entry.js.map +1 -0
- package/dist/stzh-components/{p-cded8c4a.js → p-57caee36.js} +2 -2
- package/dist/stzh-components/p-616ae3be.entry.js +2 -0
- package/dist/stzh-components/p-616ae3be.entry.js.map +1 -0
- package/dist/stzh-components/{p-15d008ea.entry.js → p-72c9db89.entry.js} +3 -3
- package/dist/stzh-components/p-72c9db89.entry.js.map +1 -0
- package/dist/stzh-components/p-7bb2eb4e.entry.js +2 -0
- package/dist/stzh-components/p-7bb2eb4e.entry.js.map +1 -0
- package/dist/stzh-components/p-8c4d543d.entry.js +2 -0
- package/dist/stzh-components/p-8c4d543d.entry.js.map +1 -0
- package/dist/stzh-components/p-9506f599.entry.js +2 -0
- package/dist/stzh-components/p-9506f599.entry.js.map +1 -0
- package/dist/stzh-components/p-9b1267a6.entry.js +2 -0
- package/dist/stzh-components/p-9b1267a6.entry.js.map +1 -0
- package/dist/stzh-components/p-a9216459.entry.js +2 -0
- package/dist/stzh-components/p-a9216459.entry.js.map +1 -0
- package/dist/stzh-components/p-b2920d7f.entry.js +2 -0
- package/dist/stzh-components/p-b2920d7f.entry.js.map +1 -0
- package/dist/stzh-components/p-b6f19446.entry.js +2 -0
- package/dist/stzh-components/p-b6f19446.entry.js.map +1 -0
- package/dist/stzh-components/p-b75800da.entry.js +2 -0
- package/dist/stzh-components/p-b75800da.entry.js.map +1 -0
- package/dist/stzh-components/{p-d058fc1e.entry.js → p-c4bbdbfe.entry.js} +2 -2
- package/dist/stzh-components/p-c4bbdbfe.entry.js.map +1 -0
- package/dist/stzh-components/p-c6504f41.entry.js +2 -0
- package/dist/stzh-components/p-c6504f41.entry.js.map +1 -0
- package/dist/stzh-components/p-d29fd503.entry.js +2 -0
- package/dist/stzh-components/p-d29fd503.entry.js.map +1 -0
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/stzh-components/stzh-components.esm.js.map +1 -1
- package/dist/types/components/stzh-actions/stzh-actions.d.ts +3 -1
- package/dist/types/components/stzh-archivelist/stzh-archivelist.d.ts +4 -0
- package/dist/types/components/stzh-card/stzh-card.d.ts +4 -2
- package/dist/types/components/stzh-dropdown/stzh-dropdown.d.ts +6 -2
- package/dist/types/components/stzh-geo-ref-data/stzh-geo-ref-data.d.ts +16 -2
- package/dist/types/components/stzh-input/stzh-input.d.ts +2 -0
- package/dist/types/components/stzh-poicard/stzh-poicard.d.ts +14 -0
- package/dist/types/components/stzh-poilist/stzh-poilist.d.ts +31 -0
- package/dist/types/components/stzh-poilist/stzh-poilist.localization.d.ts +10 -0
- package/dist/types/components/stzh-saptcha/stzh-saptcha.d.ts +5 -4
- package/dist/types/components/stzh-search/stzh-search.d.ts +13 -0
- package/dist/types/components.d.ts +190 -10
- package/dist/types/index.d.ts +28 -0
- package/dist/vscode-data.json +104 -3
- package/package.json +1 -1
- package/dist/cjs/stzh-card_2.cjs.entry.js.map +0 -1
- package/dist/cjs/stzh-checkbox_4.cjs.entry.js.map +0 -1
- package/dist/cjs/stzh-chip_2.cjs.entry.js.map +0 -1
- package/dist/cjs/stzh-chipgroup_2.cjs.entry.js.map +0 -1
- package/dist/cjs/stzh-popover_2.cjs.entry.js.map +0 -1
- package/dist/cjs/stzh-sortable.cjs.entry.js.map +0 -1
- package/dist/esm/stzh-card_2.entry.js.map +0 -1
- package/dist/esm/stzh-checkbox_4.entry.js.map +0 -1
- package/dist/esm/stzh-chip_2.entry.js.map +0 -1
- package/dist/esm/stzh-chipgroup_2.entry.js.map +0 -1
- package/dist/esm/stzh-popover_2.entry.js.map +0 -1
- package/dist/esm/stzh-sortable.entry.js.map +0 -1
- package/dist/stzh-components/p-12851c24.entry.js +0 -2
- package/dist/stzh-components/p-12851c24.entry.js.map +0 -1
- package/dist/stzh-components/p-15d008ea.entry.js.map +0 -1
- package/dist/stzh-components/p-1b31cd8a.entry.js +0 -2
- package/dist/stzh-components/p-1b31cd8a.entry.js.map +0 -1
- package/dist/stzh-components/p-206ec94f.entry.js.map +0 -1
- package/dist/stzh-components/p-38cd406c.entry.js.map +0 -1
- package/dist/stzh-components/p-50c32fd1.entry.js +0 -2
- package/dist/stzh-components/p-50c32fd1.entry.js.map +0 -1
- package/dist/stzh-components/p-55349f2e.entry.js +0 -2
- package/dist/stzh-components/p-55349f2e.entry.js.map +0 -1
- package/dist/stzh-components/p-9c643610.entry.js +0 -2
- package/dist/stzh-components/p-9c643610.entry.js.map +0 -1
- package/dist/stzh-components/p-9cdd5e6f.entry.js +0 -2
- package/dist/stzh-components/p-9cdd5e6f.entry.js.map +0 -1
- package/dist/stzh-components/p-a672aaea.entry.js +0 -8
- package/dist/stzh-components/p-a672aaea.entry.js.map +0 -1
- package/dist/stzh-components/p-a77b49cb.entry.js +0 -2
- package/dist/stzh-components/p-a77b49cb.entry.js.map +0 -1
- package/dist/stzh-components/p-b509dedd.entry.js +0 -2
- package/dist/stzh-components/p-b509dedd.entry.js.map +0 -1
- package/dist/stzh-components/p-b870c799.entry.js +0 -2
- package/dist/stzh-components/p-b870c799.entry.js.map +0 -1
- package/dist/stzh-components/p-d058fc1e.entry.js.map +0 -1
- package/dist/stzh-components/p-da043311.entry.js +0 -9
- package/dist/stzh-components/p-da043311.entry.js.map +0 -1
- package/dist/stzh-components/p-fb077fd5.entry.js +0 -2
- package/dist/stzh-components/p-fb077fd5.entry.js.map +0 -1
- /package/dist/stzh-components/{p-cded8c4a.js.map → p-57caee36.js.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as s,c as e,h as t,a,g as i}from"./p-c7bfac7a.js";const n=".sc-stzh-message-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-message-h{display:none}.sc-stzh-message-h::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-message-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-message-h *.sc-stzh-message,.sc-stzh-message-h *.sc-stzh-message::before,.sc-stzh-message-h *.sc-stzh-message::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-message-h .has-focus.sc-stzh-message{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-message-h .stzh-fylingfocus-focused.sc-stzh-message{outline-style:none !important}.sc-stzh-message-h .stzh-fylingfocus-focused.sc-stzh-message::-moz-focus-inner{border:0 !important}.sc-stzh-message-h{--background-color:var(--stzh-color-grey20);--icon-color:var(--stzh-color-info70);--close-color:var(--stzh-color-grey90);--label-color:var(--stzh-color-info70);--description-color:var(--stzh-color-grey90)}[type=success].sc-stzh-message-h{--label-color:var(--stzh-color-success70);--icon-color:var(--stzh-color-success70);--background-color:var(--stzh-color-success20)}[type=warning].sc-stzh-message-h{--label-color:var(--stzh-color-warning90);--icon-color:var(--stzh-color-warning90);--background-color:var(--stzh-color-warning20)}[type=error].sc-stzh-message-h{--label-color:var(--stzh-color-error70);--icon-color:var(--stzh-color-error70);--background-color:var(--stzh-color-error20)}.stzh-message.sc-stzh-message{position:relative;display:flex;box-shadow:var(--stzh-box-shadow-message);background-color:var(--background-color);border-radius:var(--stzh-button-border-radius)}.stzh-message__content.sc-stzh-message{padding-top:var(--stzh-space-medium);padding-bottom:var(--stzh-space-medium);padding-right:var(--stzh-space-xlarge);gap:var(--stzh-space-small);display:flex;flex-direction:column;flex-grow:1;padding-left:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-message__content.sc-stzh-message{padding-top:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-message__content.sc-stzh-message{padding-top:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-message__content.sc-stzh-message{padding-top:var(--stzh-space-xxlarge)}}@media screen and (min-width: 600px){.stzh-message__content.sc-stzh-message{padding-bottom:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-message__content.sc-stzh-message{padding-bottom:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-message__content.sc-stzh-message{padding-bottom:var(--stzh-space-xxlarge)}}@media screen and (min-width: 900px){.stzh-message__content.sc-stzh-message{padding-right:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-message__content.sc-stzh-message{padding-right:var(--stzh-space-xxxlarge)}}@media screen and (min-width: 900px){.stzh-message__content.sc-stzh-message{gap:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-message__content.sc-stzh-message{gap:var(--stzh-space-large)}}@media screen and (min-width: 600px){.stzh-message__content.sc-stzh-message{flex-direction:row;align-items:flex-start}}@media screen and (min-width: 900px){.stzh-message__content.sc-stzh-message{padding-left:var(--stzh-space-large)}}.stzh-message__icon-wrapper.sc-stzh-message{display:flex;flex-shrink:0}.stzh-message__icon.sc-stzh-message{--size:var(--stzh-icon-size-large);color:var(--icon-color)}@media screen and (min-width: 600px){.stzh-message__text-wrapper.sc-stzh-message{flex-grow:1}}.stzh-message__label.sc-stzh-message{font-family:var(--stzh-font-family-title);font-weight:var(--stzh-font-weight-title);font-style:var(--stzh-font-style-title);font-size:var(--stzh-font-curve-h4-default-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-h4-default-heading-line-height, var(--stzh-font-milli-heading-line-height));letter-spacing:var(--stzh-font-curve-h4-default-heading-letter-spacing);color:var(--label-color)}@media screen and (min-width: 600px){.stzh-message__label.sc-stzh-message{font-size:var(--stzh-font-curve-h4-small-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-h4-small-heading-line-height, var(--stzh-font-centi-heading-line-height));letter-spacing:var(--stzh-font-curve-h4-small-heading-letter-spacing)}}@media screen and (min-width: 1260px){.stzh-message__label.sc-stzh-message{font-size:var(--stzh-font-curve-h4-large-font-size, var(--stzh-font-deci-font-size));line-height:var(--stzh-font-curve-h4-large-heading-line-height, var(--stzh-font-deci-heading-line-height));letter-spacing:var(--stzh-font-curve-h4-large-heading-letter-spacing)}}@media screen and (min-width: 1600px){.stzh-message__label.sc-stzh-message{font-size:var(--stzh-font-curve-h4-ultra-font-size, var(--stzh-font-deca-font-size));line-height:var(--stzh-font-curve-h4-ultra-heading-line-height, var(--stzh-font-deca-text-line-height));letter-spacing:var(--stzh-font-curve-h4-ultra-heading-letter-spacing, var(--stzh-font-deca-text-letter-spacing))}}.stzh-message__label.sc-stzh-message:not(:empty){margin-bottom:var(--stzh-space-xsmall)}.stzh-message__description.sc-stzh-message{font-size:var(--stzh-font-curve-p1-default-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-p1-default-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-p1-default-text-letter-spacing);color:var(--description-color)}@media screen and (min-width: 900px){.stzh-message__description.sc-stzh-message{font-size:var(--stzh-font-curve-p1-medium-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-p1-medium-text-line-height, var(--stzh-font-centi-text-line-height));letter-spacing:var(--stzh-font-curve-p1-medium-text-letter-spacing)}}.stzh-message__description.sc-stzh-message:not(:empty)+.stzh-message__link.sc-stzh-message:not(:empty){margin-top:var(--stzh-space-small)}@media screen and (min-width: 900px){.stzh-message__description.sc-stzh-message:not(:empty)+.stzh-message__link.sc-stzh-message:not(:empty){margin-top:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-message__description.sc-stzh-message:not(:empty)+.stzh-message__link.sc-stzh-message:not(:empty){margin-top:var(--stzh-space-large)}}.stzh-message__close[variant=tertiary].sc-stzh-message{--color:var(--close-color);position:absolute;top:0;right:0}.stzh-message.sc-stzh-message:has(.stzh-message__description:empty):has(.stzh-message__link:empty) .stzh-message__label.sc-stzh-message:not(:empty){margin-top:var(--stzh-space-xxsmall);margin-bottom:0}";const h=class{constructor(t){s(this,t);this.stzhOpen=e(this,"stzhOpen",7);this.stzhClose=e(this,"stzhClose",7);this.onCloseButtonClick=()=>{this.hide()};this.label="";this.description="";this.type="info";this.hideClose=false;this.localization=undefined;this.open=true}async show(){this.open=true;this.stzhOpen.emit({component:"stzh-message"})}async hide(){this.open=false;this.stzhClose.emit({component:"stzh-message"})}async componentWillLoad(){if(!this.localization){this.localization=await window.stzhComponents.utils.fetchTranslations(this.element,"message")}}render(){const s={"stzh-message":true,"stzh-message--has-close-hidden":this.hideClose,[`stzh-message--type-${this.type}`]:!!this.type};return t(a,{hidden:!this.open},t("div",{class:s},t("div",{class:"stzh-message__content"},t("div",{class:"stzh-message__icon-wrapper"},t("stzh-icon",{class:"stzh-message__icon",name:this.type==="info"&&"info-help-filled"||this.type==="success"&&"checkmark-circle-filled"||this.type==="warning"&&"important-warning-filled"||this.type==="error"&&"warning-filled"})),t("div",{class:"stzh-message__text-wrapper"},t("div",{class:"stzh-message__label"},this.label?this.label:t("slot",{name:"label"})),t("div",{class:"stzh-message__description"},this.description?this.description:t("slot",null)),t("div",{class:"stzh-message__link"},t("slot",{name:"link"})))),!this.hideClose&&t("stzh-button",{class:"stzh-message__close",onClick:this.onCloseButtonClick,a11yLabel:this.localization.close,variant:"tertiary",size:"small",iconOnly:true,icon:"close-big"})))}get element(){return i(this)}};h.style=n;export{h as stzh_message};
|
|
2
|
+
//# sourceMappingURL=p-1e121c5f.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["stzhMessageCss","StzhMessage","this","onCloseButtonClick","hide","show","open","stzhOpen","emit","component","stzhClose","componentWillLoad","localization","window","stzhComponents","utils","fetchTranslations","element","render","classes","hideClose","type","h","Host","hidden","class","name","label","description","onClick","a11yLabel","close","variant","size","iconOnly","icon"],"sources":["src/components/stzh-message/stzh-message.scss?tag=stzh-message&encapsulation=scoped","src/components/stzh-message/stzh-message.tsx"],"sourcesContent":[":host {\n --background-color: #{$colorGrey20};\n --icon-color: #{$colorInfo70};\n --close-color: #{$colorGrey90};\n --label-color: #{$colorInfo70};\n --description-color: #{$colorGrey90};\n\n &[type=\"success\"] {\n --label-color: #{$colorSuccess70};\n --icon-color: #{$colorSuccess70};\n --background-color: #{$colorSuccess20};\n }\n\n &[type=\"warning\"] {\n --label-color: #{$colorWarning90};\n --icon-color: #{$colorWarning90};\n --background-color: #{$colorWarning20};\n }\n\n &[type=\"error\"] {\n --label-color: #{$colorError70};\n --icon-color: #{$colorError70};\n --background-color: #{$colorError20};\n }\n}\n\n.stzh-message {\n position: relative;\n display: flex;\n box-shadow: $boxShadowMessage;\n background-color: var(--background-color);\n border-radius: #{$buttonBorderRadius};\n\n &__content {\n @include spaceCurve('padding-top', 'regular');\n @include spaceCurve('padding-bottom', 'regular');\n @include spaceCurve('padding-right', 'medium');\n @include spaceCurve('gap', 'small');\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n padding-left: space('medium');\n\n @include mq($from: small) {\n flex-direction: row;\n align-items: flex-start;\n }\n\n @include mq($from: medium) {\n padding-left: space('large');\n }\n }\n\n &__icon-wrapper {\n display: flex;\n flex-shrink: 0;\n }\n\n &__icon {\n --size: #{iconSize('large')};\n color: var(--icon-color);\n }\n\n &__text-wrapper {\n @include mq($from: small) {\n flex-grow: 1;\n }\n }\n\n &__label {\n @include font('title');\n @include fontCurve('h4', 'heading');\n color: var(--label-color);\n\n &:not(:empty) {\n margin-bottom: var(--stzh-space-xsmall);\n }\n }\n\n &__description {\n @include fontCurve('p1');\n color: var(--description-color);\n }\n\n &__description:not(:empty) + &__link:not(:empty) {\n @include spaceCurve('margin-top', 'small');\n }\n\n &__close[variant=\"tertiary\"] {\n --color: var(--close-color);\n\n position: absolute;\n top: 0;\n right: 0;\n }\n\n /* Only label variant */\n\n &:has(#{&}__description:empty):has(#{&}__link:empty) &__label:not(:empty) {\n margin-top: space('xxsmall');\n margin-bottom: 0;\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Event,\n EventEmitter,\n Method,\n State\n} from \"@stencil/core\";\n\nimport { StzhMessageOpenEvent, StzhMessageCloseEvent } from \"../../index\";\n\nimport { StzhMessageLocalizedText } from \"./stzh-message.localization\"\n\n/**\n * @slot - Slot for description content (use instead of description property)\n * @slot label - Slot for label (use as alternative for property)\n * @slot link - Slot for optional stzh-link element\n */\n@Component({\n tag: \"stzh-message\",\n styleUrl: \"stzh-message.scss\",\n scoped: true\n})\nexport class StzhMessage {\n /** Label (slot can also be used as alternative) */\n @Prop() label: string = \"\";\n\n /** Description (use instead of default slot) */\n @Prop() description: string = \"\";\n\n /** Type */\n @Prop({ reflect: true }) type: \"info\" | \"success\" | \"warning\" | \"error\" = \"info\"\n\n /** Whether to hide close button */\n @Prop() hideClose: boolean = false;\n\n /** Translation strings. */\n @Prop() localization: StzhMessageLocalizedText;\n\n /** Message open event */\n @Event() stzhOpen: EventEmitter<StzhMessageOpenEvent>;\n\n /** Message close event */\n @Event() stzhClose: EventEmitter<StzhMessageCloseEvent>;\n\n @Element() element: HTMLStzhMessageElement;\n\n /** Open state */\n @State() open: boolean = true;\n\n @Method()\n async show() {\n this.open = true;\n this.stzhOpen.emit({\n component: \"stzh-message\"\n });\n }\n\n @Method()\n async hide() {\n this.open = false;\n this.stzhClose.emit({\n component: \"stzh-message\"\n });\n }\n\n private onCloseButtonClick = () => {\n this.hide();\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"message\");\n }\n }\n\n render() {\n const classes = {\n \"stzh-message\": true,\n \"stzh-message--has-close-hidden\": this.hideClose,\n [`stzh-message--type-${this.type}`]: !!this.type,\n };\n\n return (\n <Host hidden={!this.open}>\n <div class={classes}>\n <div class=\"stzh-message__content\">\n <div class=\"stzh-message__icon-wrapper\">\n <stzh-icon\n class=\"stzh-message__icon\"\n name={\n this.type === 'info' && \"info-help-filled\"\n || this.type === 'success' && \"checkmark-circle-filled\"\n || this.type === 'warning' && \"important-warning-filled\"\n || this.type === 'error' && \"warning-filled\"\n }\n ></stzh-icon>\n </div>\n <div class=\"stzh-message__text-wrapper\">\n <div class=\"stzh-message__label\">\n {this.label ? this.label : <slot name=\"label\"></slot>}\n </div>\n <div class=\"stzh-message__description\">\n {this.description ? this.description : <slot></slot>}\n </div>\n <div class=\"stzh-message__link\">\n <slot name=\"link\"></slot>\n </div>\n </div>\n </div>\n\n {!this.hideClose &&\n <stzh-button\n class=\"stzh-message__close\"\n onClick={this.onCloseButtonClick}\n a11yLabel={this.localization.close}\n variant=\"tertiary\"\n size=\"small\"\n iconOnly={true}\n icon=\"close-big\"\n ></stzh-button>\n }\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"2DAAA,MAAMA,EAAiB,w8N,MC0BVC,EAAW,M,iGA2CdC,KAAAC,mBAAqB,KAC3BD,KAAKE,MAAM,E,WA1CW,G,iBAGM,G,UAG4C,O,eAG7C,M,sCAcJ,I,CAGzB,UAAMC,GACJH,KAAKI,KAAO,KACZJ,KAAKK,SAASC,KAAK,CACjBC,UAAW,gB,CAKf,UAAML,GACJF,KAAKI,KAAO,MACZJ,KAAKQ,UAAUF,KAAK,CAClBC,UAAW,gB,CAQf,uBAAME,GACJ,IAAKT,KAAKU,aAAc,CACtBV,KAAKU,mBAAqBC,OAAOC,eAAeC,MAAMC,kBAAkBd,KAAKe,QAAS,U,EAI1F,MAAAC,GACE,MAAMC,EAAU,CACd,eAAgB,KAChB,iCAAkCjB,KAAKkB,UACvC,CAAC,sBAAsBlB,KAAKmB,UAAWnB,KAAKmB,MAG9C,OACEC,EAACC,EAAI,CAACC,QAAStB,KAAKI,MAClBgB,EAAA,OAAKG,MAAON,GACVG,EAAA,OAAKG,MAAM,yBACTH,EAAA,OAAKG,MAAM,8BACTH,EAAA,aACEG,MAAM,qBACNC,KACExB,KAAKmB,OAAS,QAAU,oBACrBnB,KAAKmB,OAAS,WAAa,2BAC3BnB,KAAKmB,OAAS,WAAa,4BAC3BnB,KAAKmB,OAAS,SAAW,oBAIlCC,EAAA,OAAKG,MAAM,8BACTH,EAAA,OAAKG,MAAM,uBACRvB,KAAKyB,MAAQzB,KAAKyB,MAAQL,EAAA,QAAMI,KAAK,WAExCJ,EAAA,OAAKG,MAAM,6BACRvB,KAAK0B,YAAc1B,KAAK0B,YAAcN,EAAA,cAEzCA,EAAA,OAAKG,MAAM,sBACTH,EAAA,QAAMI,KAAK,aAKfxB,KAAKkB,WACLE,EAAA,eACEG,MAAM,sBACNI,QAAS3B,KAAKC,mBACd2B,UAAW5B,KAAKU,aAAamB,MAC7BC,QAAQ,WACRC,KAAK,QACLC,SAAU,KACVC,KAAK,e"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as s,c as t,h as e,F as i,a as h,g as c}from"./p-c7bfac7a.js";import{S as l}from"./p-fc692303.js";const o=".sc-stzh-chipselect-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-chipselect-h{display:none}.sc-stzh-chipselect-h::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-chipselect-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-chipselect-h *.sc-stzh-chipselect,.sc-stzh-chipselect-h *.sc-stzh-chipselect::before,.sc-stzh-chipselect-h *.sc-stzh-chipselect::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-chipselect-h .has-focus.sc-stzh-chipselect{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-chipselect-h .stzh-fylingfocus-focused.sc-stzh-chipselect{outline-style:none !important}.sc-stzh-chipselect-h .stzh-fylingfocus-focused.sc-stzh-chipselect::-moz-focus-inner{border:0 !important}[disabled].sc-stzh-chipselect-h:not([disabled=false]){--description-color:var(--stzh-color-grey70)}.stzh-chipselect__marker-symbol.sc-stzh-chipselect{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium)}.stzh-chipselect__marker-text.sc-stzh-chipselect{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-chipselect__description-wrapper.sc-stzh-chipselect{display:flex;flex-direction:column-reverse;min-height:var(--description-min-height, var(--stzh-description-min-height, none))}.stzh-chipselect__error.sc-stzh-chipselect,.stzh-chipselect__description.sc-stzh-chipselect{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height)}.stzh-chipselect__error.sc-stzh-chipselect{color:var(--stzh-color-error60)}.stzh-chipselect__error-list.sc-stzh-chipselect{list-style:none;margin:0;padding:0}.stzh-chipselect__description.sc-stzh-chipselect{display:flex;align-items:flex-start;color:var(--stzh-input-description-color, var(--description-color, var(--stzh-color-coolgrey70)));transition:color var(--stzh-base-transition-animation-speed)}.stzh-chipselect__description-long.sc-stzh-chipselect{margin-right:var(--stzh-space-xxsmall);margin-top:0.125rem}@supports (font: -apple-system-body) and (-webkit-appearance: none){.stzh-chipselect__description-long.sc-stzh-chipselect{margin-top:0}}.stzh-chipselect__description-long-popover.sc-stzh-chipselect{--width:auto;--max-width:27.3125rem}.stzh-chipselect__description-long-button.sc-stzh-chipselect{display:flex;justify-content:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-family:inherit;padding:0;border:none;background-color:transparent;border-radius:0.5rem;cursor:pointer}.stzh-chipselect.sc-stzh-chipselect stzh-icon.stzh-chipselect__description-long-icon.sc-stzh-chipselect{--size:var(--stzh-icon-size-xsmall)}.stzh-chipselect--has-error.sc-stzh-chipselect .stzh-chipselect__error.sc-stzh-chipselect,.stzh-chipselect--has-description.sc-stzh-chipselect .stzh-chipselect__description.sc-stzh-chipselect{margin-top:var(--stzh-space-xxxsmall)}.stzh-chipselect__label.sc-stzh-chipselect{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:var(--stzh-heading-color);display:block;margin-bottom:var(--stzh-space-xsmall)}.stzh-chipselect__label.sc-stzh-chipselect:empty{display:none}.stzh-chipselect__marker.sc-stzh-chipselect{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);margin-left:calc(-0.25em + var(--stzh-space-xsmall))}.stzh-chipselect__chips.sc-stzh-chipselect{display:flex;align-items:center;flex-wrap:wrap;border-radius:var(--stzh-button-border-radius);-moz-column-gap:var(--stzh-space-medium);column-gap:var(--stzh-space-medium)}@media screen and (min-width: 900px){.stzh-chipselect__chips.sc-stzh-chipselect{row-gap:var(--stzh-space-medium)}}.stzh-chipselect__chips.sc-stzh-chipselect:focus-within .is-focused[active].sc-stzh-chipselect{--background-color:var(--stzh-color-primary90)}@media (forced-colors: active), (-ms-high-contrast: active){.stzh-chipselect__chips.sc-stzh-chipselect:focus-within .is-focused[active].sc-stzh-chipselect{--background-color:Canvas}}.stzh-chipselect__chip.is-focused.sc-stzh-chipselect{--background-color:var(--stzh-color-secondary40)}@media (forced-colors: active), (-ms-high-contrast: active){.stzh-chipselect__chip.is-focused.sc-stzh-chipselect{--background-color:Highlight}}.stzh-chipselect--has-error.sc-stzh-chipselect .stzh-chipselect__error.sc-stzh-chipselect,.stzh-chipselect--has-description.sc-stzh-chipselect .stzh-chipselect__description.sc-stzh-chipselect{margin-top:var(--stzh-space-xsmall)}.stzh-chipselect--has-label-hidden.sc-stzh-chipselect .stzh-chipselect__label.sc-stzh-chipselect{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-chipselect--is-disabled.sc-stzh-chipselect .stzh-chipselect__chips.sc-stzh-chipselect,.stzh-chipselect--is-disabled.sc-stzh-chipselect .stzh-chipselect__label.sc-stzh-chipselect{cursor:not-allowed}";let r=0;const n=class{constructor(e){s(this,e);this.stzhChange=t(this,"stzhChange",7);this._data=[];this._value=[];this.handleReset=async()=>{this.value=this.defaultValue};this.handleChipClick=async(s,t)=>{if(this.multiple){if(s.value===""&&this._value.length>0&&!(this._value.length===1&&this._value[0]==="")){this.value=[]}else if(s.value!==""){this.value=this._value.includes(s.value)?this._value.filter((t=>t!==s.value)):[...this._value,s.value]}}else{this.value=s.value}this.activeFocusOptionIndex=t;await this.waitForNextRender();this.stzhChange.emit({component:"stzh-chipselect",value:this.multiple?this._value:this._value[0]})};this.handleKeydown=s=>{let t=null;const e=this.activeFocusOptionIndex;if(s.key==="ArrowUp"||s.key==="ArrowLeft"){s.preventDefault();if(e>0){t=e-1}}else if(s.key==="ArrowDown"||s.key==="ArrowRight"){s.preventDefault();if(e<this._data.length-1){t=e+1}}else if(s.key===" "||s.key==="Enter"){s.preventDefault();if(this.multiple){if(this._data[e].value===""&&this._value.length>0&&!(this._value.length===1&&this._value[0]==="")){this.value=[]}else if(this._data[e].value!==""){this.value=this._value.includes(this._data[e].value)?this._value.filter((s=>s!==this._data[e].value)):[...this._value,this._data[e].value]}}else{this.value=this._data[e].value}this.stzhChange.emit({component:"stzh-chipselect",value:this.value})}if(t!==null){this.activeFocusOptionIndex=t}};this.localization=undefined;this.data=[];this.name=undefined;this.label="";this.labelHidden=false;this.multiple=false;this.value="";this.defaultValue="";this.description=undefined;this.descriptionLong=undefined;this.descriptionLongTitle=undefined;this.error=undefined;this.invalid=false;this.required=false;this.disabled=false;this.hideOptional=false;this.a11yDescribedby="";this.activeFocusOptionIndex=0}resetListener(s){if(s.target.contains(this.element)){requestAnimationFrame((()=>{this.handleReset()}))}}valueWatcher(s){if(typeof s==="string"){try{this._value=JSON.parse(s)}catch(t){this._value=s?[s]:[]}}else{this._value=s?s:[]}}dataWatcher(s){if(typeof s==="string"){this._data=JSON.parse(s)}else{this._data=s}}errorWatcher(s){if(typeof s==="string"){try{this._error=JSON.parse(s)}catch(t){if(s){this._error=[s]}else{this._error=[]}}}else if(s){this._error=s}else{this._error=[]}}waitForNextRender(){return new Promise((s=>this.renderPromiseResolve=s))}componentDidRender(){if(this.renderPromiseResolve){this.renderPromiseResolve()}}async componentWillLoad(){this.id=`stzh-chipselect-${r++}`;this.dataWatcher(this.data);this.errorWatcher(this.error);this.valueWatcher(this.value);this.defaultValue=this.defaultValue||this.value;if(!this.localization){this.localization=await window.stzhComponents.utils.fetchTranslations(this.element,"chipselect")}}render(){const s=!!this.description;const t=!!this.descriptionLong;const c=!!this.error;const o={"stzh-chipselect":true,"stzh-chipselect--has-description":s,"stzh-chipselect--has-description-long":t,"stzh-chipselect--has-error":c,"stzh-chipselect--is-invalid":this.invalid||c,"stzh-chipselect--is-disabled":this.disabled,"stzh-chipselect--is-required":this.required,"stzh-chipselect--has-label-hidden":this.labelHidden};return e(h,{"is-invalid":this.invalid||c},e("div",{class:o},this.multiple?e(i,null,this._value.map((s=>e("input",{type:"hidden",name:this.name,value:s})))):e("input",{type:"hidden",name:this.name,value:this.value}),e("label",{class:"stzh-chipselect__label",htmlFor:this.id},this.label?this.label:e("slot",null),!this.hideOptional&&e("span",{class:"stzh-chipselect__marker"},e("span",{class:"stzh-chipselect__marker-symbol","aria-hidden":"true"},this.required?this.localization.$globals.requiredFieldMarker:this.localization.$globals.optionalFieldMarker),e("span",{class:"stzh-chipselect__marker-text"},this.required?this.localization.$globals.requiredFieldText:this.localization.$globals.optionalFieldText))),this._data.length>0&&e(i,null,e("div",{id:this.id,class:"stzh-chipselect__chips",role:"listbox",tabindex:"0","aria-multiselectable":this.multiple?"true":"false","aria-activedescendant":`${this.id}-option-${this.activeFocusOptionIndex}`,"aria-describedby":`${this.id}-description ${this.a11yDescribedby}`,onKeyDown:this.handleKeydown},this._data.map(((s,t)=>e("stzh-chip",{role:"option",class:{"stzh-chipselect__chip":true,"is-focused":this.activeFocusOptionIndex===t},label:s.label,counter:s.counter,icon:s.icon,type:s.type,inverted:s.inverted,variant:s.variant,size:s.size||"small",disabled:this.disabled||s.disabled,active:this._value.includes(s.value)||!this.multiple&&!s.value&&(this._value.length===0||this._value[0]==="")||!s.value&&this.multiple&&(this._value.length===0||this._value.length===1&&this._value[0]===""),"aria-selected":this._value.includes(s.value)||!this.multiple&&!s.value&&(this._value.length===0||this._value[0]==="")||!s.value&&this.multiple&&(this._value.length===0||this._value.length===1&&this._value[0]==="")?"true":"false",id:`${this.id}-option-${t}`,a11yTabindex:"-1",onClick:()=>this.handleChipClick(s,t)})))),e(l,{classPrefix:"stzh-chipselect",id:`${this.id}-description`,error:this._error,description:this.description,descriptionLong:this.descriptionLong,descriptionLongTitle:this.descriptionLongTitle,descriptionLongUsed:t,moreInfoButtonLabel:this.localization.$globals.moreInfoButtonLabel}))))}get element(){return c(this)}static get watchers(){return{value:["valueWatcher"],data:["dataWatcher"],error:["errorWatcher"]}}};n.style=o;export{n as stzh_chipselect};
|
|
2
|
+
//# sourceMappingURL=p-35d842ce.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["stzhChipselectCss","chipselectCounter","StzhChipselect","this","_data","_value","handleReset","async","value","defaultValue","handleChipClick","data","index","multiple","length","includes","filter","activeFocusOptionIndex","waitForNextRender","stzhChange","emit","component","handleKeydown","event","newActiveIndex","activeOptionIndex","key","preventDefault","resetListener","target","contains","element","requestAnimationFrame","valueWatcher","newValue","JSON","parse","ex","dataWatcher","errorWatcher","_error","e","Promise","resolve","renderPromiseResolve","componentDidRender","componentWillLoad","id","error","localization","window","stzhComponents","utils","fetchTranslations","render","descriptionUsed","description","descriptionLongUsed","descriptionLong","errorUsed","classes","invalid","disabled","required","labelHidden","h","Host","class","Fragment","map","type","name","htmlFor","label","hideOptional","$globals","requiredFieldMarker","optionalFieldMarker","requiredFieldText","optionalFieldText","role","tabindex","a11yDescribedby","onKeyDown","counter","icon","inverted","variant","size","active","a11yTabindex","onClick","StzhInputDescription","classPrefix","descriptionLongTitle","moreInfoButtonLabel"],"sources":["src/components/stzh-chipselect/stzh-chipselect.scss?tag=stzh-chipselect&encapsulation=scoped","src/components/stzh-chipselect/stzh-chipselect.tsx"],"sourcesContent":[":host {\n &[disabled]:not([disabled=\"false\"]) {\n --description-color: #{$formDisabledColor};\n }\n}\n\n.stzh-chipselect {\n\t@include input-description;\n\n &__label {\n @include font('heavy');\n @include fontSize('micro');\n @include truncate;\n color: $headingColor;\n display: block;\n margin-bottom: space('xsmall');\n\n &:empty {\n display: none;\n }\n }\n\n &__marker {\n @include fontSize('nano');\n margin-left: calc(-0.25em + #{space('xsmall')});\n }\n\n &__chips {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n border-radius: $buttonBorderRadius;\n column-gap: space('medium');\n\n @include mq($from: medium) {\n row-gap: space('medium');\n }\n\n &:focus-within {\n .is-focused[active] {\n --background-color: #{$colorPrimary90};\n\n @include highContrast() {\n --background-color: Canvas;\n }\n }\n }\n\n // @include mq($to: medium) {\n // display: none;\n // }\n }\n\n &__chip {\n &.is-focused {\n --background-color: #{$colorSecondary40};\n\n @include highContrast() {\n --background-color: Highlight;\n }\n }\n }\n\n // &__dropdown {\n // @include mq($from: medium) {\n // display: none;\n // }\n // }\n\n // &__description-wrapper {\n // @include mq($to: medium) {\n // display: none;\n // }\n // }\n\n &--has-error &__error,\n &--has-description &__description {\n margin-top: space('xsmall');\n }\n\n /* Hidden label */\n\n &--has-label-hidden &__label {\n @include visuallyhidden;\n }\n\n /* Disabled */\n\n &--is-disabled &__chips,\n &--is-disabled &__label {\n cursor: not-allowed;\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Watch,\n Event,\n EventEmitter,\n State,\n Fragment,\n Listen,\n} from \"@stencil/core\";\n\nimport {\n StzhChipselectItem,\n StzhChipselectChangeEvent,\n // StzhDropdownChangeEvent\n} from \"../../index\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\n// import { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nlet chipselectCounter = 0;\n\n/**\n * @slot - Slot for `stzh-checkbox` elements\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot description-long-title - Slot for long description title (in popover) / instead of descriptionLongTitle or description property\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-chipselect\",\n styleUrl: \"stzh-chipselect.scss\",\n scoped: true\n})\nexport class StzhChipselect {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** The list of chips */\n @Prop() data: string | StzhChipselectItem[] = [];\n private _data: StzhChipselectItem[] = [];\n // private _dataDropdown: any[] = [];\n\n /** The name of the input element */\n @Prop({ reflect: true }) name: string;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Whether label is hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Multiple */\n @Prop({ mutable: true }) multiple: boolean = false;\n\n /** Value */\n @Prop({ mutable: true }) value: string | string[] = \"\";\n private _value: string[] = [];\n\n /** Default value (used by reset) */\n @Prop({ mutable: true }) defaultValue: string | string[] = \"\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** Long description title appearing in a popover (use description-long-title slot as or description property alternative) */\n @Prop() descriptionLongTitle: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Whether all chips are disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Hide `(optional)` label (or use `required` inside form to hide it) */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** Id for element which describes the input (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n @State() activeFocusOptionIndex: number = 0;\n\n @Element() element: HTMLStzhChipselectElement;\n\n /** Change event */\n @Event() stzhChange: EventEmitter<StzhChipselectChangeEvent>;\n\n @Listen(\"reset\", { target: \"document\" })\n resetListener(event: Event) {\n if ((event.target as HTMLElement).contains(this.element)) {\n requestAnimationFrame(() => {\n this.handleReset();\n });\n }\n }\n\n @Watch(\"value\")\n valueWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n try {\n this._value = JSON.parse(newValue);\n } catch(ex) {\n this._value = newValue ? [newValue] : [];\n }\n } else {\n this._value = newValue ? newValue : [];\n }\n }\n\n @Watch(\"data\")\n dataWatcher(newValue: StzhChipselectItem[] | string) {\n if (typeof newValue === \"string\") {\n this._data = JSON.parse(newValue);\n } else {\n this._data = newValue;\n }\n\n // this._dataDropdown = this._data.map((data) => {\n // return {\n // text: data.counter\n // ? `${data.label} (${data.counter})`\n // : data.label,\n // value: data.value\n // }\n // });\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n private id: string;\n private renderPromiseResolve: (value?: unknown) => void;\n\n private waitForNextRender() {\n return new Promise(resolve => this.renderPromiseResolve = resolve);\n }\n\n private handleReset = async () => {\n this.value = this.defaultValue;\n\n // this.stzhChange.emit({\n // component: \"stzh-chipselect\",\n // value: this.value\n // });\n }\n\n private handleChipClick = async (data: StzhChipselectItem, index: number) => {\n if (this.multiple) {\n if (data.value === \"\" && this._value.length > 0 && !(this._value.length === 1 && this._value[0] === \"\")) {\n this.value = [];\n } else if (data.value !== \"\") {\n this.value = this._value.includes(data.value)\n ? this._value.filter(value => value !== data.value)\n : [...this._value, data.value];\n }\n } else {\n this.value = data.value;\n }\n\n this.activeFocusOptionIndex = index;\n\n await this.waitForNextRender();\n\n this.stzhChange.emit({\n component: \"stzh-chipselect\",\n value: this.multiple ? this._value : this._value[0]\n });\n }\n\n // private handleDropdownChange = async (event: CustomEvent<StzhDropdownChangeEvent>) => {\n // this.value = Array.isArray(event.detail.value) ? event.detail.value[0] : event.detail.value;\n\n // this.activeFocusOptionIndex = this._data.findIndex(data => {\n // return data.value === this.value;\n // });\n\n // await this.waitForNextRender();\n\n // this.stzhChange.emit({\n // component: \"stzh-chipselect\",\n // value: this.value\n // })\n // }\n\n private handleKeydown = (event: KeyboardEvent) => {\n let newActiveIndex: number = null;\n const activeOptionIndex = this.activeFocusOptionIndex;\n\n if (event.key === \"ArrowUp\" || event.key === \"ArrowLeft\") {\n event.preventDefault();\n\n if (activeOptionIndex > 0) {\n newActiveIndex = activeOptionIndex - 1;\n }\n } else if (event.key === \"ArrowDown\" || event.key === \"ArrowRight\") {\n event.preventDefault();\n\n if (activeOptionIndex < this._data.length - 1) {\n newActiveIndex = activeOptionIndex + 1;\n }\n } else if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n if (this.multiple) {\n if (this._data[activeOptionIndex].value === \"\" && this._value.length > 0 && !(this._value.length === 1 && this._value[0] === \"\")) {\n this.value = [];\n } else if (this._data[activeOptionIndex].value !== \"\") {\n this.value = this._value.includes(this._data[activeOptionIndex].value)\n ? this._value.filter(value => value !== this._data[activeOptionIndex].value)\n : [...this._value, this._data[activeOptionIndex].value];\n }\n } else {\n this.value = this._data[activeOptionIndex].value; //HERE\n }\n this.stzhChange.emit({\n component: \"stzh-chipselect\",\n value: this.value\n });\n }\n\n if (newActiveIndex !== null) {\n this.activeFocusOptionIndex = newActiveIndex;\n }\n }\n\n componentDidRender() {\n if (this.renderPromiseResolve) {\n this.renderPromiseResolve();\n }\n }\n\n async componentWillLoad() {\n this.id = `stzh-chipselect-${chipselectCounter++}`;\n\n this.dataWatcher(this.data);\n this.errorWatcher(this.error);\n this.valueWatcher(this.value);\n\n this.defaultValue = this.defaultValue || this.value;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"chipselect\");\n }\n }\n\n render() {\n const descriptionUsed = !!this.description;\n const descriptionLongUsed = !!this.descriptionLong;\n const errorUsed = !!this.error;\n\n const classes = {\n \"stzh-chipselect\": true,\n \"stzh-chipselect--has-description\": descriptionUsed,\n \"stzh-chipselect--has-description-long\": descriptionLongUsed,\n \"stzh-chipselect--has-error\": errorUsed,\n \"stzh-chipselect--is-invalid\": this.invalid || errorUsed,\n \"stzh-chipselect--is-disabled\": this.disabled,\n \"stzh-chipselect--is-required\": this.required,\n \"stzh-chipselect--has-label-hidden\": this.labelHidden,\n };\n\n return (\n <Host is-invalid={this.invalid || errorUsed}>\n <div class={classes}>\n {this.multiple\n ?\n <Fragment>\n {this._value.map((value) =>\n <input type=\"hidden\" name={this.name} value={value} />\n )}\n </Fragment>\n :\n <input\n type=\"hidden\"\n name={this.name}\n value={this.value}\n />\n }\n\n <label class=\"stzh-chipselect__label\" htmlFor={this.id}>\n {this.label ? this.label : <slot></slot>}\n {!this.hideOptional &&\n <span class=\"stzh-chipselect__marker\">\n <span class=\"stzh-chipselect__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker\n }\n </span>\n <span class=\"stzh-chipselect__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText\n }\n </span>\n </span>\n }\n </label>\n\n {this._data.length > 0 &&\n <Fragment>\n <div\n id={this.id}\n class=\"stzh-chipselect__chips\"\n role=\"listbox\"\n tabindex=\"0\"\n aria-multiselectable={this.multiple ? \"true\" : \"false\"}\n aria-activedescendant={`${this.id}-option-${this.activeFocusOptionIndex}`}\n aria-describedby={`${this.id}-description ${this.a11yDescribedby}`}\n onKeyDown={this.handleKeydown}\n >\n {this._data.map((data, index) => (\n <stzh-chip\n role=\"option\"\n class={{\n \"stzh-chipselect__chip\": true,\n \"is-focused\": this.activeFocusOptionIndex === index\n }}\n label={data.label}\n counter={data.counter}\n icon={data.icon}\n type={data.type}\n inverted={data.inverted}\n variant={data.variant}\n size={data.size || \"small\"}\n disabled={this.disabled || data.disabled}\n active={\n this._value.includes(data.value)\n || (!this.multiple && !data.value && (this._value.length === 0 || this._value[0] === \"\"))\n || (!data.value && this.multiple && (this._value.length === 0 || (this._value.length === 1 && this._value[0] === \"\")))\n }\n aria-selected={\n this._value.includes(data.value)\n || (!this.multiple && !data.value && (this._value.length === 0 || this._value[0] === \"\"))\n || (!data.value && this.multiple && (this._value.length === 0 || (this._value.length === 1 && this._value[0] === \"\")))\n ? \"true\" : \"false\"\n }\n id={`${this.id}-option-${index}`}\n a11yTabindex=\"-1\"\n onClick={() => this.handleChipClick(data, index)}\n ></stzh-chip>\n ))}\n </div>\n\n <StzhInputDescription\n classPrefix=\"stzh-chipselect\"\n id={`${this.id}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongTitle={this.descriptionLongTitle}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n\n {/* <stzh-dropdown\n class=\"stzh-chipselect__dropdown\"\n multiple={this.multiple}\n disabled={this.disabled}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n required={this.required}\n invalid={this.invalid}\n items={[this.value]}\n label={this.label}\n labelHidden={this.labelHidden}\n options={this._dataDropdown}\n hideOptional={this.hideOptional}\n onStzhChange={this.handleDropdownChange}\n ></stzh-dropdown> */}\n </Fragment>\n }\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"2GAAA,MAAMA,EAAoB,6oLCyB1B,IAAIC,EAAoB,E,MAcXC,EAAc,M,gEAMjBC,KAAAC,MAA8B,GAiB9BD,KAAAE,OAAmB,GA0GnBF,KAAAG,YAAcC,UACpBJ,KAAKK,MAAQL,KAAKM,YAAY,EAQxBN,KAAAO,gBAAkBH,MAAOI,EAA0BC,KACzD,GAAIT,KAAKU,SAAU,CACjB,GAAIF,EAAKH,QAAU,IAAML,KAAKE,OAAOS,OAAS,KAAOX,KAAKE,OAAOS,SAAW,GAAKX,KAAKE,OAAO,KAAO,IAAK,CACvGF,KAAKK,MAAQ,E,MACR,GAAIG,EAAKH,QAAU,GAAI,CAC5BL,KAAKK,MAAQL,KAAKE,OAAOU,SAASJ,EAAKH,OACnCL,KAAKE,OAAOW,QAAOR,GAASA,IAAUG,EAAKH,QAC3C,IAAIL,KAAKE,OAAQM,EAAKH,M,MAEvB,CACLL,KAAKK,MAAQG,EAAKH,K,CAGpBL,KAAKc,uBAAyBL,QAExBT,KAAKe,oBAEXf,KAAKgB,WAAWC,KAAK,CACnBC,UAAW,kBACXb,MAAOL,KAAKU,SAAWV,KAAKE,OAASF,KAAKE,OAAO,IACjD,EAkBIF,KAAAmB,cAAiBC,IACvB,IAAIC,EAAyB,KAC7B,MAAMC,EAAoBtB,KAAKc,uBAE/B,GAAIM,EAAMG,MAAQ,WAAaH,EAAMG,MAAQ,YAAa,CACxDH,EAAMI,iBAEN,GAAIF,EAAoB,EAAG,CACzBD,EAAiBC,EAAoB,C,OAElC,GAAIF,EAAMG,MAAQ,aAAeH,EAAMG,MAAQ,aAAc,CAClEH,EAAMI,iBAEN,GAAIF,EAAoBtB,KAAKC,MAAMU,OAAS,EAAG,CAC7CU,EAAiBC,EAAoB,C,OAElC,GAAIF,EAAMG,MAAQ,KAAOH,EAAMG,MAAQ,QAAS,CACrDH,EAAMI,iBACN,GAAIxB,KAAKU,SAAU,CACjB,GAAIV,KAAKC,MAAMqB,GAAmBjB,QAAU,IAAML,KAAKE,OAAOS,OAAS,KAAOX,KAAKE,OAAOS,SAAW,GAAKX,KAAKE,OAAO,KAAO,IAAK,CAChIF,KAAKK,MAAQ,E,MACR,GAAIL,KAAKC,MAAMqB,GAAmBjB,QAAU,GAAI,CACrDL,KAAKK,MAAQL,KAAKE,OAAOU,SAASZ,KAAKC,MAAMqB,GAAmBjB,OAC5DL,KAAKE,OAAOW,QAAOR,GAASA,IAAUL,KAAKC,MAAMqB,GAAmBjB,QACpE,IAAIL,KAAKE,OAAQF,KAAKC,MAAMqB,GAAmBjB,M,MAEhD,CACLL,KAAKK,MAAQL,KAAKC,MAAMqB,GAAmBjB,K,CAE7CL,KAAKgB,WAAWC,KAAK,CACnBC,UAAW,kBACXb,MAAOL,KAAKK,O,CAIhB,GAAIgB,IAAmB,KAAM,CAC3BrB,KAAKc,uBAAyBO,C,yCA/MY,G,+BAQtB,G,iBAGO,M,cAGc,M,WAGO,G,kBAIO,G,gIAgBf,M,cAGC,M,cAGA,M,kBAGI,M,qBAGkB,G,4BAEzB,C,CAQ1C,aAAAI,CAAcL,GACZ,GAAKA,EAAMM,OAAuBC,SAAS3B,KAAK4B,SAAU,CACxDC,uBAAsB,KACpB7B,KAAKG,aAAa,G,EAMxB,YAAA2B,CAAaC,GACX,UAAWA,IAAa,SAAU,CAChC,IACE/B,KAAKE,OAAS8B,KAAKC,MAAMF,E,CACzB,MAAMG,GACNlC,KAAKE,OAAS6B,EAAW,CAACA,GAAY,E,MAEnC,CACL/B,KAAKE,OAAS6B,EAAWA,EAAW,E,EAKxC,WAAAI,CAAYJ,GACV,UAAWA,IAAa,SAAU,CAChC/B,KAAKC,MAAQ+B,KAAKC,MAAMF,E,KACnB,CACL/B,KAAKC,MAAQ8B,C,EAcjB,YAAAK,CAAaL,GACX,UAAWA,IAAa,SAAU,CAChC,IACE/B,KAAKqC,OAASL,KAAKC,MAAMF,E,CACzB,MAAOO,GACP,GAAIP,EAAU,CACZ/B,KAAKqC,OAAS,CAACN,E,KACV,CACL/B,KAAKqC,OAAS,E,QAGb,GAAIN,EAAU,CACnB/B,KAAKqC,OAASN,C,KACT,CACL/B,KAAKqC,OAAS,E,EAOV,iBAAAtB,GACN,OAAO,IAAIwB,SAAQC,GAAWxC,KAAKyC,qBAAuBD,G,CA0F5D,kBAAAE,GACE,GAAI1C,KAAKyC,qBAAsB,CAC7BzC,KAAKyC,sB,EAIT,uBAAME,GACJ3C,KAAK4C,GAAK,mBAAmB9C,MAE7BE,KAAKmC,YAAYnC,KAAKQ,MACtBR,KAAKoC,aAAapC,KAAK6C,OACvB7C,KAAK8B,aAAa9B,KAAKK,OAEvBL,KAAKM,aAAeN,KAAKM,cAAgBN,KAAKK,MAE9C,IAAKL,KAAK8C,aAAc,CACtB9C,KAAK8C,mBAAqBC,OAAOC,eAAeC,MAAMC,kBAAkBlD,KAAK4B,QAAS,a,EAI1F,MAAAuB,GACE,MAAMC,IAAoBpD,KAAKqD,YAC/B,MAAMC,IAAwBtD,KAAKuD,gBACnC,MAAMC,IAAcxD,KAAK6C,MAEzB,MAAMY,EAAU,CACd,kBAAmB,KACnB,mCAAoCL,EACpC,wCAAyCE,EACzC,6BAA8BE,EAC9B,8BAA+BxD,KAAK0D,SAAWF,EAC/C,+BAAgCxD,KAAK2D,SACrC,+BAAgC3D,KAAK4D,SACrC,oCAAqC5D,KAAK6D,aAG5C,OACEC,EAACC,EAAI,cAAa/D,KAAK0D,SAAWF,GAChCM,EAAA,OAAKE,MAAOP,GACTzD,KAAKU,SAEJoD,EAACG,EAAQ,KACNjE,KAAKE,OAAOgE,KAAK7D,GAChByD,EAAA,SAAOK,KAAK,SAASC,KAAMpE,KAAKoE,KAAM/D,MAAOA,OAIjDyD,EAAA,SACEK,KAAK,SACLC,KAAMpE,KAAKoE,KACX/D,MAAOL,KAAKK,QAIhByD,EAAA,SAAOE,MAAM,yBAAyBK,QAASrE,KAAK4C,IACjD5C,KAAKsE,MAAQtE,KAAKsE,MAAQR,EAAA,cACzB9D,KAAKuE,cACLT,EAAA,QAAME,MAAM,2BACVF,EAAA,QAAME,MAAM,iCAAgC,cAAa,QACtDhE,KAAK4D,SACF5D,KAAK8C,aAAa0B,SAASC,oBAC3BzE,KAAK8C,aAAa0B,SAASE,qBAGjCZ,EAAA,QAAME,MAAM,gCACThE,KAAK4D,SACF5D,KAAK8C,aAAa0B,SAASG,kBAC3B3E,KAAK8C,aAAa0B,SAASI,qBAOtC5E,KAAKC,MAAMU,OAAS,GACnBmD,EAACG,EAAQ,KACPH,EAAA,OACElB,GAAI5C,KAAK4C,GACToB,MAAM,yBACNa,KAAK,UACLC,SAAS,IAAG,uBACU9E,KAAKU,SAAW,OAAS,QAAO,wBAC/B,GAAGV,KAAK4C,aAAa5C,KAAKc,yBAAwB,mBACvD,GAAGd,KAAK4C,kBAAkB5C,KAAK+E,kBACjDC,UAAWhF,KAAKmB,eAEfnB,KAAKC,MAAMiE,KAAI,CAAC1D,EAAMC,IACrBqD,EAAA,aACEe,KAAK,SACLb,MAAO,CACL,wBAAyB,KACzB,aAAchE,KAAKc,yBAA2BL,GAEhD6D,MAAO9D,EAAK8D,MACZW,QAASzE,EAAKyE,QACdC,KAAM1E,EAAK0E,KACXf,KAAM3D,EAAK2D,KACXgB,SAAU3E,EAAK2E,SACfC,QAAS5E,EAAK4E,QACdC,KAAM7E,EAAK6E,MAAQ,QACnB1B,SAAU3D,KAAK2D,UAAYnD,EAAKmD,SAChC2B,OACEtF,KAAKE,OAAOU,SAASJ,EAAKH,SACrBL,KAAKU,WAAaF,EAAKH,QAAUL,KAAKE,OAAOS,SAAW,GAAKX,KAAKE,OAAO,KAAO,MAChFM,EAAKH,OAASL,KAAKU,WAAaV,KAAKE,OAAOS,SAAW,GAAMX,KAAKE,OAAOS,SAAW,GAAKX,KAAKE,OAAO,KAAO,IAAK,gBAGtHF,KAAKE,OAAOU,SAASJ,EAAKH,SACrBL,KAAKU,WAAaF,EAAKH,QAAUL,KAAKE,OAAOS,SAAW,GAAKX,KAAKE,OAAO,KAAO,MAChFM,EAAKH,OAASL,KAAKU,WAAaV,KAAKE,OAAOS,SAAW,GAAMX,KAAKE,OAAOS,SAAW,GAAKX,KAAKE,OAAO,KAAO,IAC7G,OAAS,QAEf0C,GAAI,GAAG5C,KAAK4C,aAAanC,IACzB8E,aAAa,KACbC,QAAS,IAAMxF,KAAKO,gBAAgBC,EAAMC,QAKhDqD,EAAC2B,EAAoB,CACnBC,YAAY,kBACZ9C,GAAI,GAAG5C,KAAK4C,iBACZC,MAAO7C,KAAKqC,OACZgB,YAAarD,KAAKqD,YAClBE,gBAAiBvD,KAAKuD,gBACtBoC,qBAAsB3F,KAAK2F,qBAC3BrC,oBAAqBA,EACrBsC,oBAAqB5F,KAAK8C,aAAa0B,SAASoB,wB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as s,h as a,a as h,g as i}from"./p-c7bfac7a.js";const e=".sc-stzh-saptcha-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-saptcha-h{display:none}.sc-stzh-saptcha-h::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-saptcha-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-saptcha-h *.sc-stzh-saptcha,.sc-stzh-saptcha-h *.sc-stzh-saptcha::before,.sc-stzh-saptcha-h *.sc-stzh-saptcha::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-saptcha-h .has-focus.sc-stzh-saptcha{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-saptcha-h .stzh-fylingfocus-focused.sc-stzh-saptcha{outline-style:none !important}.sc-stzh-saptcha-h .stzh-fylingfocus-focused.sc-stzh-saptcha::-moz-focus-inner{border:0 !important}.sc-stzh-saptcha-h{--color:var(--stzh-color-black);--background-color:var(--stzh-color-grey10)}.stzh-saptcha__box.sc-stzh-saptcha{padding-top:var(--stzh-space-medium);padding-bottom:var(--stzh-space-xlarge);padding-left:var(--stzh-space-medium);padding-right:var(--stzh-space-medium);color:var(--color);background-color:var(--background-color)}@media screen and (min-width: 600px){.stzh-saptcha__box.sc-stzh-saptcha{padding-top:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-saptcha__box.sc-stzh-saptcha{padding-top:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-saptcha__box.sc-stzh-saptcha{padding-top:var(--stzh-space-xxlarge)}}@media screen and (min-width: 900px){.stzh-saptcha__box.sc-stzh-saptcha{padding-bottom:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-saptcha__box.sc-stzh-saptcha{padding-bottom:var(--stzh-space-xxxlarge)}}@media screen and (min-width: 900px){.stzh-saptcha__box.sc-stzh-saptcha{padding-left:var(--stzh-space-large);padding-right:var(--stzh-space-large)}}.stzh-saptcha__info.sc-stzh-saptcha{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing)}.stzh-saptcha__answer.sc-stzh-saptcha{font-size:var(--stzh-font-regular-font-size);line-height:var(--stzh-font-regular-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);color:var(--stzh-color-primary);margin-top:var(--stzh-space-xsmall)}.stzh-saptcha__input.sc-stzh-saptcha{margin-top:var(--stzh-space-medium)}";let c=0;const r=class{constructor(a){t(this,a);this.stzhChange=s(this,"stzhChange",7);this._numbers=[];this.onInputChange=t=>{this.value=t.detail.value;this.stzhChange.emit({component:"stzh-saptcha",originalEvent:t,value:this.value})};this.localization=undefined;this.numbers=[];this.value="";this.name="saptcha";this.error=undefined;this.invalid=false;this.disabled=false}numbersWatcher(t){if(typeof t==="string"){this._numbers=JSON.parse(t)}else{this._numbers=t}}errorWatcher(t){if(typeof t==="string"){try{this._error=JSON.parse(t)}catch(s){if(t){this._error=[t]}else{this._error=[]}}}else if(t){this._error=t}else{this._error=[]}}async componentWillLoad(){this.saptchaId=`stzh-saptcha-${c++}`;this.numbersWatcher(this.numbers);this.errorWatcher(this.error);if(!this.localization){this.localization=await window.stzhComponents.utils.fetchTranslations(this.element,"saptcha")}}render(){const t={"stzh-saptcha":true};return a(h,{"is-invalid":this.invalid||this._error.length>0},a("div",{class:t},a("div",{class:"stzh-saptcha__box"},a("div",{class:"stzh-saptcha__info",id:`${this.saptchaId}-info`},this.localization.info," ",this.localization.question),a("div",{class:"stzh-saptcha__answer",id:`${this.saptchaId}-answer`},this._numbers.map(((t,s)=>a("span",{class:"stzh-saptcha__number"},t,s<this._numbers.length-1&&(s===this._numbers.length-2?this.localization.answerOr:", "))))),a("stzh-input",{class:"stzh-saptcha__input",label:this.localization.answer,name:this.name,invalid:this.invalid,error:this.error,disabled:this.disabled,value:this.value,onStzhChange:this.onInputChange,required:true,a11yDescribedby:`${this.saptchaId}-info ${this.saptchaId}-answer`}))))}get element(){return i(this)}static get watchers(){return{numbers:["numbersWatcher"],error:["errorWatcher"]}}};r.style=e;export{r as stzh_saptcha};
|
|
2
|
+
//# sourceMappingURL=p-3e2b4d92.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["stzhSaptchaCss","saptchaCounter","StzhSaptcha","this","_numbers","onInputChange","event","value","detail","stzhChange","emit","component","originalEvent","numbersWatcher","newValue","JSON","parse","errorWatcher","_error","e","componentWillLoad","saptchaId","numbers","error","localization","window","stzhComponents","utils","fetchTranslations","element","render","classes","h","Host","invalid","length","class","id","info","question","map","number","index","answerOr","label","answer","name","disabled","onStzhChange","required","a11yDescribedby"],"sources":["src/components/stzh-saptcha/stzh-saptcha.scss?tag=stzh-saptcha&encapsulation=scoped","src/components/stzh-saptcha/stzh-saptcha.tsx"],"sourcesContent":["/**\n * @prop --color: Color of section\n * @prop --background-color: Background color of section\n */\n\n:host {\n --color: #{$colorBlack};\n --background-color: #{$colorGrey10};\n}\n\n.stzh-saptcha {\n &__box {\n @include spaceCurve('padding-top', 'regular');\n @include spaceCurve('padding-bottom', 'medium');\n padding-left: space('medium');\n padding-right: space('medium');\n color: var(--color);\n background-color: var(--background-color);\n\n @include mq($from: medium) {\n padding-left: space('large');\n padding-right: space('large');\n }\n }\n\n &__info {\n @include fontSize('milli');\n }\n\n &__answer {\n @include fontSize('regular');\n color: $colorPrimary;\n margin-top: space('xsmall');\n }\n\n &__input {\n margin-top: space('medium');\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Event,\n Prop,\n Watch, EventEmitter,\n} from \"@stencil/core\";\n\nimport { StzhSaptchaLocalizedText } from './stzh-saptcha.localization';\nimport {StzhInputChangeEvent, StzhSaptchaChangeEvent} from '../../index';\n\nlet saptchaCounter = 0;\n\n/**\n * @slot - Slot for content\n */\n@Component({\n tag: \"stzh-saptcha\",\n styleUrl: \"stzh-saptcha.scss\",\n scoped: true\n})\nexport class StzhSaptcha {\n /** Translation strings */\n @Prop() localization: StzhSaptchaLocalizedText;\n\n /** Numbers shown to user for selection */\n @Prop() numbers: number[] | string = [];\n private _numbers: number[] = [];\n\n /** The value of the input element */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Name of input */\n @Prop({ reflect: true }) name: string = \"saptcha\";\n\n /** One or multiple error message */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n @Element() element: HTMLStzhSaptchaElement;\n\n /** Saptcha change event */\n @Event() stzhChange: EventEmitter<StzhSaptchaChangeEvent>;\n\n @Watch(\"numbers\")\n numbersWatcher(newValue: number[] | string) {\n if (typeof newValue === \"string\") {\n this._numbers = JSON.parse(newValue);\n } else {\n this._numbers = newValue;\n }\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n private saptchaId: string;\n\n private onInputChange = (event: CustomEvent<StzhInputChangeEvent>) => {\n this.value = event.detail.value;\n\n this.stzhChange.emit({\n component: \"stzh-saptcha\",\n originalEvent: event,\n value: this.value\n });\n }\n\n async componentWillLoad() {\n this.saptchaId = `stzh-saptcha-${saptchaCounter++}`;\n\n this.numbersWatcher(this.numbers);\n this.errorWatcher(this.error);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'saptcha');\n }\n }\n\n render() {\n const classes = {\n \"stzh-saptcha\": true\n };\n\n return (\n <Host is-invalid={this.invalid || this._error.length > 0}>\n <div class={classes}>\n <div class=\"stzh-saptcha__box\">\n <div class=\"stzh-saptcha__info\" id={`${this.saptchaId}-info`}>\n {this.localization.info} {this.localization.question}\n </div>\n <div class=\"stzh-saptcha__answer\" id={`${this.saptchaId}-answer`}>\n {this._numbers.map((number, index) =>\n <span class=\"stzh-saptcha__number\">\n {number}\n {index < this._numbers.length - 1 &&\n (index === this._numbers.length - 2\n ? this.localization.answerOr\n : \", \")\n }\n </span>\n )}\n </div>\n <stzh-input\n class=\"stzh-saptcha__input\"\n label={this.localization.answer}\n name={this.name}\n invalid={this.invalid}\n error={this.error}\n disabled={this.disabled}\n value={this.value}\n onStzhChange={this.onInputChange}\n required\n a11yDescribedby={`${this.saptchaId}-info ${this.saptchaId}-answer`}\n ></stzh-input>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"gEAAA,MAAMA,EAAiB,8vFCavB,IAAIC,EAAiB,E,MAURC,EAAW,M,gEAMdC,KAAAC,SAAqB,GAqDrBD,KAAAE,cAAiBC,IACvBH,KAAKI,MAAQD,EAAME,OAAOD,MAE1BJ,KAAKM,WAAWC,KAAK,CACnBC,UAAW,eACXC,cAAeN,EACfC,MAAOJ,KAAKI,OACZ,E,yCA7DiC,G,WAII,G,UAGD,U,kCAOI,M,cAGC,K,CAQ7C,cAAAM,CAAeC,GACb,UAAWA,IAAa,SAAU,CAChCX,KAAKC,SAAWW,KAAKC,MAAMF,E,KACtB,CACLX,KAAKC,SAAWU,C,EAKpB,YAAAG,CAAaH,GACX,UAAWA,IAAa,SAAU,CAChC,IACEX,KAAKe,OAASH,KAAKC,MAAMF,E,CACzB,MAAOK,GACP,GAAIL,EAAU,CACZX,KAAKe,OAAS,CAACJ,E,KACV,CACLX,KAAKe,OAAS,E,QAGb,GAAIJ,EAAU,CACnBX,KAAKe,OAASJ,C,KACT,CACLX,KAAKe,OAAS,E,EAgBlB,uBAAME,GACJjB,KAAKkB,UAAY,gBAAgBpB,MAEjCE,KAAKU,eAAeV,KAAKmB,SACzBnB,KAAKc,aAAad,KAAKoB,OAEvB,IAAKpB,KAAKqB,aAAc,CACtBrB,KAAKqB,mBAAqBC,OAAOC,eAAeC,MAAMC,kBAAkBzB,KAAK0B,QAAS,U,EAI1F,MAAAC,GACE,MAAMC,EAAU,CACd,eAAgB,MAGlB,OACEC,EAACC,EAAI,cAAa9B,KAAK+B,SAAW/B,KAAKe,OAAOiB,OAAS,GACrDH,EAAA,OAAKI,MAAOL,GACVC,EAAA,OAAKI,MAAM,qBACTJ,EAAA,OAAKI,MAAM,qBAAqBC,GAAI,GAAGlC,KAAKkB,kBACzClB,KAAKqB,aAAac,KAAI,IAAGnC,KAAKqB,aAAae,UAE9CP,EAAA,OAAKI,MAAM,uBAAuBC,GAAI,GAAGlC,KAAKkB,oBAC3ClB,KAAKC,SAASoC,KAAI,CAACC,EAAQC,IAC1BV,EAAA,QAAMI,MAAM,wBACTK,EACAC,EAAQvC,KAAKC,SAAS+B,OAAS,IAC7BO,IAAUvC,KAAKC,SAAS+B,OAAS,EAC9BhC,KAAKqB,aAAamB,SAClB,UAKZX,EAAA,cACEI,MAAM,sBACNQ,MAAOzC,KAAKqB,aAAaqB,OACzBC,KAAM3C,KAAK2C,KACXZ,QAAS/B,KAAK+B,QACdX,MAAOpB,KAAKoB,MACZwB,SAAU5C,KAAK4C,SACfxC,MAAOJ,KAAKI,MACZyC,aAAc7C,KAAKE,cACnB4C,SAAQ,KACRC,gBAAiB,GAAG/C,KAAKkB,kBAAkBlB,KAAKkB,uB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as e,h as s,a as i,g as a}from"./p-c7bfac7a.js";import{h as r}from"./p-d789f265.js";import"./p-9b063923.js";const h='.sc-stzh-pi-teaser-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-pi-teaser-h{display:none}.sc-stzh-pi-teaser-h::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-pi-teaser-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-pi-teaser-h *.sc-stzh-pi-teaser,.sc-stzh-pi-teaser-h *.sc-stzh-pi-teaser::before,.sc-stzh-pi-teaser-h *.sc-stzh-pi-teaser::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-pi-teaser-h .has-focus.sc-stzh-pi-teaser{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-pi-teaser-h .stzh-fylingfocus-focused.sc-stzh-pi-teaser{outline-style:none !important}.sc-stzh-pi-teaser-h .stzh-fylingfocus-focused.sc-stzh-pi-teaser::-moz-focus-inner{border:0 !important}.sc-stzh-pi-teaser-h{--image-background-color:var(--stzh-pi-teaser-image-background-color, var(--stzh-color-primary30));display:flex;flex-direction:column}.stzh-pi-teaser.sc-stzh-pi-teaser{position:relative;flex-grow:1;display:flex;flex-direction:column;background-color:var(--stzh-color-white)}.stzh-pi-teaser__wrapper.sc-stzh-pi-teaser{display:flex;flex-grow:1;padding-right:var(--stzh-space-medium);padding-left:var(--stzh-space-medium);padding-top:var(--stzh-space-medium);padding-bottom:var(--stzh-space-xlarge);flex-direction:column;align-items:flex-start}@media screen and (min-width: 900px){.stzh-pi-teaser__wrapper.sc-stzh-pi-teaser{padding-right:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-pi-teaser__wrapper.sc-stzh-pi-teaser{padding-left:var(--stzh-space-large)}}@media screen and (min-width: 600px){.stzh-pi-teaser__wrapper.sc-stzh-pi-teaser{padding-top:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-pi-teaser__wrapper.sc-stzh-pi-teaser{padding-top:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-pi-teaser__wrapper.sc-stzh-pi-teaser{padding-top:var(--stzh-space-xxlarge)}}@media screen and (min-width: 900px){.stzh-pi-teaser__wrapper.sc-stzh-pi-teaser{padding-bottom:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-pi-teaser__wrapper.sc-stzh-pi-teaser{padding-bottom:var(--stzh-space-xxxlarge)}}.stzh-pi-teaser__image.sc-stzh-pi-teaser{width:100%;display:none}.stzh-pi-teaser__dateline.sc-stzh-pi-teaser{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-curve-p1-default-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-p1-default-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-p1-default-text-letter-spacing);color:var(--stzh-color-coolgrey70);margin:0 0 var(--stzh-space-small)}@media screen and (min-width: 900px){.stzh-pi-teaser__dateline.sc-stzh-pi-teaser{font-size:var(--stzh-font-curve-p1-medium-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-p1-medium-text-line-height, var(--stzh-font-centi-text-line-height));letter-spacing:var(--stzh-font-curve-p1-medium-text-letter-spacing)}}.stzh-pi-teaser__title.sc-stzh-pi-teaser{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-deci-font-size);line-height:var(--stzh-font-deci-heading-line-height);letter-spacing:var(--stzh-font-curve---heading-letter-spacing);overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;-webkit-hyphens:auto;hyphens:auto;color:var(--stzh-color-black);margin:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;line-height:1 !important}@media screen and (min-width: 1600px){.stzh-pi-teaser__title.sc-stzh-pi-teaser{font-size:var(--stzh-font-deca-font-size);line-height:var(--stzh-font-deca-text-line-height);letter-spacing:var(--stzh-font-deca-text-letter-spacing)}}.stzh-pi-teaser__title-link.sc-stzh-pi-teaser{display:block;font-family:inherit;padding:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;color:var(--stzh-color-black);-webkit-text-decoration-line:none;text-decoration-line:none;transition:color var(--stzh-base-transition-animation-speed);border-radius:var(--stzh-button-border-radius);cursor:pointer}.stzh-pi-teaser__title-link.sc-stzh-pi-teaser::after{content:"";display:block;position:absolute;top:0;left:0;width:100%;height:100%}.stzh-pi-teaser__title-link.sc-stzh-pi-teaser::after{z-index:1}.stzh-pi-teaser__lead.sc-stzh-pi-teaser{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);margin-top:0;margin-bottom:var(--stzh-space-small)}@media screen and (min-width: 900px){.stzh-pi-teaser__lead.sc-stzh-pi-teaser{margin-bottom:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-pi-teaser__lead.sc-stzh-pi-teaser{margin-bottom:var(--stzh-space-large)}}.stzh-pi-teaser__date.sc-stzh-pi-teaser{color:var(--stzh-color-coolgrey70);margin:0;text-align:right;width:100%}.stzh-pi-teaser--has-image.sc-stzh-pi-teaser .stzh-pi-teaser__image.sc-stzh-pi-teaser{display:block}.stzh-pi-teaser--has-image.sc-stzh-pi-teaser .stzh-pi-teaser__lead.sc-stzh-pi-teaser{margin-top:var(--stzh-space-small)}@media screen and (min-width: 900px){.stzh-pi-teaser--has-image.sc-stzh-pi-teaser .stzh-pi-teaser__lead.sc-stzh-pi-teaser{margin-top:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-pi-teaser--has-image.sc-stzh-pi-teaser .stzh-pi-teaser__lead.sc-stzh-pi-teaser{margin-top:var(--stzh-space-large)}}.stzh-pi-teaser__title-ratio.sc-stzh-pi-teaser{--background-color:var(--image-background-color)}.stzh-pi-teaser__title-ratio.sc-stzh-pi-teaser .stzh-pi-teaser__title-wrapper.sc-stzh-pi-teaser{display:flex;flex-direction:column;padding-top:var(--stzh-space-medium);padding-right:var(--stzh-space-medium);padding-bottom:var(--stzh-space-medium);padding-left:var(--stzh-space-medium)}@media screen and (min-width: 900px){.stzh-pi-teaser__title-ratio.sc-stzh-pi-teaser .stzh-pi-teaser__title-wrapper.sc-stzh-pi-teaser{padding-top:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-pi-teaser__title-ratio.sc-stzh-pi-teaser .stzh-pi-teaser__title-wrapper.sc-stzh-pi-teaser{padding-right:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-pi-teaser__title-ratio.sc-stzh-pi-teaser .stzh-pi-teaser__title-wrapper.sc-stzh-pi-teaser{padding-bottom:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-pi-teaser__title-ratio.sc-stzh-pi-teaser .stzh-pi-teaser__title-wrapper.sc-stzh-pi-teaser{padding-left:var(--stzh-space-large)}}.stzh-pi-teaser__title-ratio.sc-stzh-pi-teaser .stzh-pi-teaser__dateline.sc-stzh-pi-teaser{margin-bottom:var(--stzh-space-xxsmall)}';const n=class{constructor(s){t(this,s);this.stzhClick=e(this,"stzhClick",7);this.handleCardClick=t=>{this.stzhClick.emit({component:"stzh-pi-teaser",originalEvent:t,href:this.href})};this.href=undefined;this.target=undefined;this.analyticsId=undefined;this.dateline="";this.heading="";this.headingLevel="3";this.lead="";this.date=""}componentDidRender(){requestAnimationFrame((()=>{var t,e;const s=this.analyticsId||((t=this.headingTextElement)===null||t===void 0?void 0:t.innerText);if(s){(e=this.titleLinkElement)===null||e===void 0?void 0:e.setAttribute("s-object-id",s)}}))}renderHeading(){const t=`h${this.headingLevel}`;const e=this.href?"a":"button";return s("div",{class:"stzh-pi-teaser__title-wrapper"},this.dateline&&s("p",{class:"stzh-pi-teaser__dateline"},this.dateline),s(t,{class:"stzh-pi-teaser__title"},s(e,{ref:t=>this.titleLinkElement=t,class:"stzh-pi-teaser__title-link",href:this.href,target:this.target,onClick:this.handleCardClick},s("div",{ref:t=>this.headingTextElement=t},this.heading?this.heading:s("slot",{name:"heading"})))))}render(){const t=!!this.lead||r(this.element,"lead");const e=r(this.element,"image");const a=!e;const h={"stzh-pi-teaser":true,"stzh-pi-teaser--has-lead":t,"stzh-pi-teaser--has-image":e};return s(i,{"has-lead":t},s("article",{class:h,"aria-label":this.heading,role:"listitem"},s("div",{class:"stzh-pi-teaser__image"},s("stzh-ratio",{ratio:"2:1"},s("slot",{name:"image"}))),a&&s("stzh-ratio",{class:"stzh-pi-teaser__title-ratio",ratio:"2:1"},this.renderHeading()),s("div",{class:"stzh-pi-teaser__wrapper"},!a&&this.renderHeading(),s("div",{class:"stzh-pi-teaser__lead"},this.lead?this.lead:s("slot",{name:"lead"})),this.date&&s("div",{class:"stzh-pi-teaser__date"},this.date))))}get element(){return a(this)}};n.style=h;export{n as stzh_pi_teaser};
|
|
2
|
+
//# sourceMappingURL=p-47cb71af.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["stzhPiTeaserCss","StzhPiTeaser","this","handleCardClick","originalEvent","stzhClick","emit","component","href","componentDidRender","requestAnimationFrame","objectId","analyticsId","_a","headingTextElement","innerText","_b","titleLinkElement","setAttribute","renderHeading","Heading","headingLevel","TitleLink","h","class","dateline","ref","el","target","onClick","heading","name","render","hasLead","lead","hasSlot","element","hasImageSlot","shouldRenderTitleRatio","classes","Host","role","ratio","date"],"sources":["src/components/stzh-pi-teaser/stzh-pi-teaser.scss?tag=stzh-pi-teaser&encapsulation=scoped","src/components/stzh-pi-teaser/stzh-pi-teaser.tsx"],"sourcesContent":["/**\n * @prop --stzh-pi-teaser-image-background-color: Background color if no image is present\n */\n\n:host {\n --image-background-color: var(--stzh-pi-teaser-image-background-color, #{$colorPrimary30});\n\n display: flex;\n flex-direction: column;\n}\n\n.stzh-pi-teaser {\n position: relative;\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n background-color: var(--stzh-color-white);\n\n &__wrapper {\n display: flex;\n flex-grow: 1;\n @include spaceCurve('padding-right', 'intermediary');\n @include spaceCurve('padding-left', 'intermediary');\n @include spaceCurve('padding-top', 'regular');\n @include spaceCurve('padding-bottom', 'medium');\n flex-direction: column;\n align-items: flex-start;\n }\n\n &__image {\n width: 100%;\n display: none;\n }\n\n &__dateline {\n @include font('heavy');\n @include fontCurve('p1');\n color: var(--stzh-color-coolgrey70);\n margin: 0 0 var(--stzh-space-small);\n }\n\n &__title {\n @include font('heavy');\n @include fontSize('deci', 'heading');\n @include wordWrap;\n\n color: var(--stzh-color-black);\n margin: 0;\n\n @include mq($from: ultra) {\n @include fontSize('deca', 'heading');\n }\n\n display: -webkit-box;\n -webkit-line-clamp: 3; /* Limit the text to 3 lines */\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis; /* Adds \"...\" at the end if truncated */\n line-height: 1.0 !important;\n }\n\n &__title-link {\n display: block;\n font-family: inherit;\n padding: 0;\n appearance: none;\n background-color: transparent;\n border: none;\n color: var(--stzh-color-black);\n text-decoration-line: none;\n transition: color $baseTransitionAnimationSpeed;\n border-radius: $buttonBorderRadius;\n cursor: pointer;\n\n &::after {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n &::after {\n z-index: 1;\n }\n }\n\n &__lead {\n @include fontSize('milli');\n margin-top: 0;\n @include spaceCurve('margin-bottom', 'small');\n }\n\n &__date {\n color: var(--stzh-color-coolgrey70);\n margin: 0;\n text-align: right;\n width: 100%;\n }\n\n /* Has image */\n &--has-image &__image {\n display: block;\n }\n\n &--has-image &__lead {\n @include spaceCurve('margin-top', 'small');\n }\n\n /* Title ratio styling (no image) */\n &__title-ratio {\n --background-color: var(--image-background-color);\n }\n\n &__title-ratio &__title-wrapper {\n display: flex;\n flex-direction: column;\n @include spaceCurve('padding-top', 'intermediary');\n @include spaceCurve('padding-right', 'intermediary');\n @include spaceCurve('padding-bottom', 'intermediary');\n @include spaceCurve('padding-left', 'intermediary');\n }\n\n &__title-ratio &__dateline {\n margin-bottom: var(--stzh-space-xxsmall);\n }\n}\n\n","import { Component, Element, Event, EventEmitter, h, Host, Prop } from \"@stencil/core\";\n\nimport { StzhPiTeaserClickEvent } from \"../../index\";\nimport { hasSlot } from \"../../utils/utils\";\n\n/**\n * @slot heading - Heading text (alternative for heading property)\n * @slot lead - Lead text (alternative for lead property)\n * @slot image - Image (rendered within ratio 2:1, hence the different slot name to prevent naming collision)\n */\n@Component({\n tag: \"stzh-pi-teaser\",\n styleUrl: \"stzh-pi-teaser.scss\",\n scoped: true,\n})\nexport class StzhPiTeaser {\n /** Href of card */\n @Prop({ reflect: true }) href: string;\n\n /** target if the button is used as link (if href used) */\n @Prop() target: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link elements.\n * Default value will be taken from `heading` prop/slot.\n */\n @Prop() analyticsId: string;\n\n /** Dateline */\n @Prop() dateline: string = \"\";\n\n /** Heading (alternative for heading slot) */\n @Prop() heading: string = \"\";\n\n /** Heading level */\n @Prop() headingLevel: \"1\" | \"2\" | \"3\" | \"4\" = \"3\";\n\n /** Lead text (alternative for lead slot) */\n @Prop() lead: string = \"\";\n\n /** Date */\n @Prop() date: string = \"\";\n\n @Element() element: HTMLStzhListElement;\n\n /** Click event (if href is used) */\n @Event() stzhClick: EventEmitter<StzhPiTeaserClickEvent>;\n\n private titleLinkElement: HTMLAnchorElement | HTMLButtonElement;\n private headingTextElement: HTMLDivElement;\n\n private handleCardClick = (originalEvent: MouseEvent) => {\n this.stzhClick.emit({\n component: \"stzh-pi-teaser\",\n originalEvent,\n href: this.href,\n });\n };\n\n componentDidRender() {\n requestAnimationFrame(() => {\n const objectId = this.analyticsId || this.headingTextElement?.innerText;\n\n if (objectId) {\n this.titleLinkElement?.setAttribute(\"s-object-id\", objectId);\n }\n });\n }\n\n renderHeading(): DocumentFragment {\n const Heading = `h${this.headingLevel}`;\n const TitleLink = this.href ? \"a\" : \"button\";\n return (\n <div class=\"stzh-pi-teaser__title-wrapper\">\n {this.dateline && <p class=\"stzh-pi-teaser__dateline\">{this.dateline}</p>}\n <Heading class=\"stzh-pi-teaser__title\">\n <TitleLink\n ref={el => (this.titleLinkElement = el as HTMLAnchorElement | HTMLButtonElement)}\n class=\"stzh-pi-teaser__title-link\"\n href={this.href}\n target={this.target}\n onClick={this.handleCardClick}\n >\n <div ref={el => (this.headingTextElement = el as HTMLDivElement)}>\n {this.heading ? this.heading : <slot name=\"heading\"></slot>}\n </div>\n </TitleLink>\n </Heading>\n </div>\n );\n }\n\n render() {\n const hasLead = !!this.lead || hasSlot(this.element, \"lead\");\n const hasImageSlot = hasSlot(this.element, \"image\");\n const shouldRenderTitleRatio = !hasImageSlot;\n\n const classes = {\n \"stzh-pi-teaser\": true,\n \"stzh-pi-teaser--has-lead\": hasLead,\n \"stzh-pi-teaser--has-image\": hasImageSlot,\n };\n\n return (\n <Host has-lead={hasLead}>\n <article class={classes} aria-label={this.heading} role=\"listitem\">\n <div class=\"stzh-pi-teaser__image\">\n <stzh-ratio ratio=\"2:1\">\n <slot name={\"image\"}></slot>\n </stzh-ratio>\n </div>\n {shouldRenderTitleRatio && (\n <stzh-ratio class=\"stzh-pi-teaser__title-ratio\" ratio={\"2:1\"}>\n {this.renderHeading()}\n </stzh-ratio>\n )}\n <div class=\"stzh-pi-teaser__wrapper\">\n {!shouldRenderTitleRatio && this.renderHeading()}\n <div class=\"stzh-pi-teaser__lead\">{this.lead ? this.lead : <slot name=\"lead\"></slot>}</div>\n {this.date && <div class=\"stzh-pi-teaser__date\">{this.date}</div>}\n </div>\n </article>\n </Host>\n );\n }\n}\n"],"mappings":"4HAAA,MAAMA,EAAkB,4pO,MCeXC,EAAY,M,8DAqCfC,KAAAC,gBAAmBC,IACzBF,KAAKG,UAAUC,KAAK,CAClBC,UAAW,iBACXH,gBACAI,KAAMN,KAAKM,MACX,E,mFA3BuB,G,aAGD,G,kBAGoB,I,UAGvB,G,UAGA,E,CAkBvB,kBAAAC,GACEC,uBAAsB,K,QACpB,MAAMC,EAAWT,KAAKU,eAAeC,EAAAX,KAAKY,sBAAkB,MAAAD,SAAA,SAAAA,EAAEE,WAE9D,GAAIJ,EAAU,EACZK,EAAAd,KAAKe,oBAAgB,MAAAD,SAAA,SAAAA,EAAEE,aAAa,cAAeP,E,KAKzD,aAAAQ,GACE,MAAMC,EAAU,IAAIlB,KAAKmB,eACzB,MAAMC,EAAYpB,KAAKM,KAAO,IAAM,SACpC,OACEe,EAAA,OAAKC,MAAM,iCACRtB,KAAKuB,UAAYF,EAAA,KAAGC,MAAM,4BAA4BtB,KAAKuB,UAC5DF,EAACH,EAAO,CAACI,MAAM,yBACbD,EAACD,EAAS,CACRI,IAAKC,GAAOzB,KAAKe,iBAAmBU,EACpCH,MAAM,6BACNhB,KAAMN,KAAKM,KACXoB,OAAQ1B,KAAK0B,OACbC,QAAS3B,KAAKC,iBAEdoB,EAAA,OAAKG,IAAKC,GAAOzB,KAAKY,mBAAqBa,GACxCzB,KAAK4B,QAAU5B,KAAK4B,QAAUP,EAAA,QAAMQ,KAAK,e,CAQtD,MAAAC,GACE,MAAMC,IAAY/B,KAAKgC,MAAQC,EAAQjC,KAAKkC,QAAS,QACrD,MAAMC,EAAeF,EAAQjC,KAAKkC,QAAS,SAC3C,MAAME,GAA0BD,EAEhC,MAAME,EAAU,CACd,iBAAkB,KAClB,2BAA4BN,EAC5B,4BAA6BI,GAG/B,OACEd,EAACiB,EAAI,YAAWP,GACdV,EAAA,WAASC,MAAOe,EAAO,aAAcrC,KAAK4B,QAASW,KAAK,YACtDlB,EAAA,OAAKC,MAAM,yBACTD,EAAA,cAAYmB,MAAM,OAChBnB,EAAA,QAAMQ,KAAM,YAGfO,GACCf,EAAA,cAAYC,MAAM,8BAA8BkB,MAAO,OACpDxC,KAAKiB,iBAGVI,EAAA,OAAKC,MAAM,4BACPc,GAA0BpC,KAAKiB,gBACjCI,EAAA,OAAKC,MAAM,wBAAwBtB,KAAKgC,KAAOhC,KAAKgC,KAAOX,EAAA,QAAMQ,KAAK,UACrE7B,KAAKyC,MAAQpB,EAAA,OAAKC,MAAM,wBAAwBtB,KAAKyC,Q"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{r as t,c as s,h as e,a as i,g as r}from"./p-c7bfac7a.js";const a=".sc-stzh-cardlist-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-cardlist-h{display:none}.sc-stzh-cardlist-h::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-cardlist-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-cardlist-h *.sc-stzh-cardlist,.sc-stzh-cardlist-h *.sc-stzh-cardlist::before,.sc-stzh-cardlist-h *.sc-stzh-cardlist::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-cardlist-h .has-focus.sc-stzh-cardlist{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-cardlist-h .stzh-fylingfocus-focused.sc-stzh-cardlist{outline-style:none !important}.sc-stzh-cardlist-h .stzh-fylingfocus-focused.sc-stzh-cardlist::-moz-focus-inner{border:0 !important}.sc-stzh-cardlist-h{--description-color:var(--stzh-cardlist-description-color, inherit);--background-color:var(--stzh-cardlist-background-color, inherit)}.stzh-cardlist__cards.sc-stzh-cardlist{display:grid;gap:var(--stzh-grid-gutter)}@media screen and (min-width: 600px){.stzh-cardlist__cards.sc-stzh-cardlist{gap:var(--stzh-grid-gutter-small)}}@media screen and (min-width: 900px){.stzh-cardlist__cards.sc-stzh-cardlist{gap:var(--stzh-grid-gutter-medium)}}@media screen and (min-width: 1260px){.stzh-cardlist__cards.sc-stzh-cardlist{gap:var(--stzh-grid-gutter-large)}}@media screen and (min-width: 1600px){.stzh-cardlist__cards.sc-stzh-cardlist{gap:var(--stzh-grid-gutter-ultra)}}.stzh-cardlist__header.sc-stzh-cardlist{display:flex;justify-content:space-between;flex-direction:column;align-items:flex-start}@media screen and (min-width: 900px){.stzh-cardlist__header.sc-stzh-cardlist{flex-direction:row}}.stzh-cardlist__description.sc-stzh-cardlist{font-size:var(--stzh-font-curve-p1-default-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-p1-default-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-p1-default-text-letter-spacing);--stzh-icon-color:var(--stzh-color-primary70)}@media screen and (min-width: 900px){.stzh-cardlist__description.sc-stzh-cardlist{font-size:var(--stzh-font-curve-p1-medium-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-p1-medium-text-line-height, var(--stzh-font-centi-text-line-height));letter-spacing:var(--stzh-font-curve-p1-medium-text-letter-spacing)}}.stzh-cardlist__description.sc-stzh-cardlist:not(:empty){margin-bottom:var(--stzh-space-xsmall)}@media screen and (min-width: 900px){.stzh-cardlist__description.sc-stzh-cardlist:not(:empty){margin-bottom:0}}.stzh-cardlist__description.sc-stzh-cardlist-s>stzh-heading,.stzh-cardlist__description .sc-stzh-cardlist-s>stzh-heading{--color:var(--description-color)}.stzh-cardlist__switch.sc-stzh-cardlist{--color:inherit;align-self:end}.stzh-cardlist.sc-stzh-cardlist:has(.stzh-cardlist__description:not(:empty)) .stzh-cardlist__header.sc-stzh-cardlist,.stzh-cardlist--has-toggle-link.sc-stzh-cardlist .stzh-cardlist__header.sc-stzh-cardlist{margin-bottom:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-cardlist.sc-stzh-cardlist:has(.stzh-cardlist__description:not(:empty)) .stzh-cardlist__header.sc-stzh-cardlist,.stzh-cardlist--has-toggle-link.sc-stzh-cardlist .stzh-cardlist__header.sc-stzh-cardlist{margin-bottom:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-cardlist.sc-stzh-cardlist:has(.stzh-cardlist__description:not(:empty)) .stzh-cardlist__header.sc-stzh-cardlist,.stzh-cardlist--has-toggle-link.sc-stzh-cardlist .stzh-cardlist__header.sc-stzh-cardlist{margin-bottom:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-cardlist.sc-stzh-cardlist:has(.stzh-cardlist__description:not(:empty)) .stzh-cardlist__header.sc-stzh-cardlist,.stzh-cardlist--has-toggle-link.sc-stzh-cardlist .stzh-cardlist__header.sc-stzh-cardlist{margin-bottom:var(--stzh-space-xxlarge)}}.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-card-navigation:not([has-lead])),.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-pi-content-navigation:not([has-lead])){row-gap:var(--stzh-space-xsmall)}@media screen and (min-width: 900px){.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-card-navigation:not([has-lead])),.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-pi-content-navigation:not([has-lead])){row-gap:var(--stzh-space-small)}}@media screen and (min-width: 1260px){.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-card-navigation:not([has-lead])),.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-pi-content-navigation:not([has-lead])){row-gap:var(--stzh-space-medium)}}@media screen and (min-width: 600px){.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-card-navigation:not([has-lead])),.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-pi-content-navigation:not([has-lead])){padding-left:calc(((100% - (var(--stzh-grid-gutter-small) * 3)) / 4) + var(--stzh-grid-gutter-small))}}@media screen and (min-width: 900px){.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-card-navigation:not([has-lead])),.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-pi-content-navigation:not([has-lead])){grid-template-columns:repeat(2, minmax(0, 1fr));padding-left:0}}@media screen and (min-width: 1260px){.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-pi-content-navigation:not([has-lead])){grid-template-columns:repeat(3, minmax(0, 1fr))}}.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-card-navigation[has-lead]),.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-pi-content-navigation[has-lead]){row-gap:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-card-navigation[has-lead]),.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-pi-content-navigation[has-lead]){row-gap:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-card-navigation[has-lead]),.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-pi-content-navigation[has-lead]){row-gap:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-card-navigation[has-lead]),.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-pi-content-navigation[has-lead]){row-gap:var(--stzh-space-xxlarge)}}@media screen and (min-width: 600px){.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-card-navigation[has-lead]),.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-pi-content-navigation[has-lead]){grid-template-columns:repeat(2, minmax(0, 1fr))}}@media screen and (min-width: 1260px){.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-card-navigation[has-lead]),.stzh-cardlist--layout-subpages.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist:has(stzh-pi-content-navigation[has-lead]){grid-template-columns:repeat(3, minmax(0, 1fr))}}.stzh-cardlist--layout-teasers.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist,.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist{row-gap:var(--stzh-space-xlarge)}@media screen and (min-width: 900px){.stzh-cardlist--layout-teasers.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist,.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist{row-gap:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-cardlist--layout-teasers.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist,.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist{row-gap:var(--stzh-space-xxxlarge)}}@media screen and (min-width: 600px){.stzh-cardlist--layout-teasers.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist,.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist{grid-template-columns:repeat(2, minmax(0, 1fr))}}@media screen and (min-width: 900px){.stzh-cardlist--layout-teasers.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist,.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist{grid-template-columns:repeat(3, minmax(0, 1fr))}}@media screen and (min-width: 1260px){.stzh-cardlist--layout-teasers.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist,.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist{grid-template-columns:repeat(4, minmax(0, 1fr))}}@media screen and (min-width: 1260px){.stzh-cardlist--layout-teasers.stzh-cardlist--max-3-cols.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist,.stzh-cardlist--layout-pi-teasers.stzh-cardlist--max-3-cols.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist{grid-template-columns:repeat(3, minmax(0, 1fr))}}.stzh-cardlist--layout-searchresults.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist{gap:var(--stzh-space-xlarge)}.stzh-cardlist--layout-fullwidth.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist{gap:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-cardlist--layout-fullwidth.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist{gap:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-cardlist--layout-fullwidth.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist{gap:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-cardlist--layout-fullwidth.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist{gap:var(--stzh-space-xxlarge)}}.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist{background-color:var(--background-color);position:relative;left:50%;right:50%;margin-left:calc(-50vw + var(--stzh-scrollbar-width) / 2);margin-right:calc(-50vw + var(--stzh-scrollbar-width) / 2);width:calc(100vw - var(--stzh-scrollbar-width));max-width:calc(100vw - var(--stzh-scrollbar-width));padding-top:var(--stzh-space-xxlarge);padding-bottom:var(--stzh-space-xxlarge)}@media screen and (min-width: 600px){.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist{padding-top:var(--stzh-space-xxxxlarge)}}@media screen and (min-width: 900px){.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist{padding-top:var(--stzh-space-xxxxlarge)}}@media screen and (min-width: 1260px){.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist{padding-top:var(--stzh-space-xbig)}}@media screen and (min-width: 600px){.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist{padding-bottom:var(--stzh-space-xxxxlarge)}}@media screen and (min-width: 900px){.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist{padding-bottom:var(--stzh-space-xxxxlarge)}}@media screen and (min-width: 1260px){.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist{padding-bottom:var(--stzh-space-xbig)}}.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist .stzh-cardlist__header.sc-stzh-cardlist,.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist{margin-left:1.25rem;margin-right:1.25rem}@media screen and (min-width: 600px){.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist .stzh-cardlist__header.sc-stzh-cardlist,.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist{margin-left:2rem;margin-right:2rem}}@media screen and (min-width: 900px){.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist .stzh-cardlist__header.sc-stzh-cardlist,.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist{margin-left:2.5rem;margin-right:2.5rem}}@media screen and (min-width: 1260px){.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist .stzh-cardlist__header.sc-stzh-cardlist,.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist{margin-left:4rem;margin-right:4rem}}@media screen and (min-width: 1600px){.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist .stzh-cardlist__header.sc-stzh-cardlist,.stzh-cardlist--layout-pi-teasers.sc-stzh-cardlist .stzh-cardlist__cards.sc-stzh-cardlist{margin-left:auto;margin-right:auto;max-width:84.25rem}}";const n=class{constructor(e){t(this,e);this.stzhCollapseAll=s(this,"stzhCollapseAll",7);this.collapseClick=()=>{const t=Array.from(this.element.querySelectorAll("stzh-card"));t.forEach((t=>{if(t.collapsible){t.collapsed=!this.allCollapsed}}));this.allCollapsed=!this.allCollapsed;this.stzhCollapseAll.emit({component:"stzh-cardlist",allCollapsed:this.allCollapsed})};this.updateCollapsedState=()=>{const t=Array.from(this.element.querySelectorAll("stzh-card"));this.allCollapsed=!t.some((t=>!t.collapsed))};this.sortableGhostClone=t=>{const s=t.tagName.toLowerCase()==="stzh-card"?t:t.querySelector("stzh-card");if(s){const s=t;const e=t.cloneNode(true);e.heading=s.heading;e.subtitle=s.subtitle;e.headerActions=s.headerActions;e.footerActions=s.footerActions;e.hideMovementActions=s.hideMovementActions;return e}};this.localization=undefined;this.layout="fullwidth";this.description=undefined;this.showToggleLink=false;this.sortableEnabled=false;this.sortableDataIdAttribute="data-id";this.allCollapsed=false;this.isStzhAnchornavVisible=false}collapseListener(){this.updateCollapsedState()}async componentWillLoad(){this.isStzhAnchornavVisible=document.documentElement.style.getPropertyValue("--stzh-anchornav-is-visible")==="1";if(!this.localization){this.localization=await window.stzhComponents.utils.fetchTranslations(this.element,"cardlist")}}componentDidLoad(){this.isStzhAnchornavVisible=document.documentElement.style.getPropertyValue("--stzh-anchornav-is-visible")==="1";this.updateCollapsedState()}render(){const t={"stzh-cardlist":true,"stzh-cardlist--has-toggle-link":this.showToggleLink,"stzh-cardlist--max-3-cols":this.isStzhAnchornavVisible,[`stzh-cardlist--layout-${this.layout}`]:!!this.layout};return e(i,null,e("div",{class:t},e("div",{class:"stzh-cardlist__header"},e("div",{class:"stzh-cardlist__description"},this.description?this.description:e("slot",{name:"description"})),this.showToggleLink&&e("stzh-link",{class:"stzh-cardlist__switch",icon:this.allCollapsed?"list-expanded":"list-shrinked",label:this.allCollapsed?this.localization.expandAll:this.localization.collapseAll,onClick:this.collapseClick})),e("stzh-sortable",{disabled:!this.sortableEnabled,dataIdAttribute:this.sortableDataIdAttribute,ghostClone:this.sortableGhostClone},e("div",{class:"stzh-cardlist__cards",role:"list"},e("slot",null)))))}get element(){return r(this)}};n.style=a;const l=t=>"object"==typeof t&&null!=t&&1===t.nodeType,o=(t,s)=>(!s||"hidden"!==t)&&("visible"!==t&&"clip"!==t),c=(t,s)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const e=getComputedStyle(t,null);return o(e.overflowY,s)||o(e.overflowX,s)||(t=>{const s=(t=>{if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}})(t);return!!s&&(s.clientHeight<t.scrollHeight||s.clientWidth<t.scrollWidth)})(t)}return!1},h=(t,s,e,i,r,a,n,l)=>a<t&&n>s||a>t&&n<s?0:a<=t&&l<=e||n>=s&&l>=e?a-t-i:n>s&&l<e||a<t&&l>e?n-s+r:0,d=t=>{const s=t.parentElement;return null==s?t.getRootNode().host||null:s},u=(t,s)=>{var e,i,r,a;if("undefined"==typeof document)return[];const{scrollMode:n,block:o,inline:u,boundary:f,skipOverflowHiddenElements:z}=s,m="function"==typeof f?f:t=>t!==f;if(!l(t))throw new TypeError("Invalid target");const p=document.scrollingElement||document.documentElement,g=[];let b=t;for(;l(b)&&m(b);){if(b=d(b),b===p){g.push(b);break}null!=b&&b===document.body&&c(b)&&!c(document.documentElement)||null!=b&&c(b,z)&&g.push(b)}const v=null!=(i=null==(e=window.visualViewport)?void 0:e.width)?i:innerWidth,w=null!=(a=null==(r=window.visualViewport)?void 0:r.height)?a:innerHeight,{scrollX:_,scrollY:y}=window,{height:x,width:E,top:k,right:S,bottom:I,left:M}=t.getBoundingClientRect();let T="start"===o||"nearest"===o?k:"end"===o?I:k+x/2,C="center"===u?M+E/2:"end"===u?S:M;const D=[];for(let t=0;t<g.length;t++){const s=g[t],{height:e,width:i,top:r,right:a,bottom:l,left:c}=s.getBoundingClientRect();if("if-needed"===n&&k>=0&&M>=0&&I<=w&&S<=v&&k>=r&&I<=l&&M>=c&&S<=a)return D;const d=getComputedStyle(s),f=parseInt(d.borderLeftWidth,10),z=parseInt(d.borderTopWidth,10),m=parseInt(d.borderRightWidth,10),b=parseInt(d.borderBottomWidth,10);let O=0,A=0;const N="offsetWidth"in s?s.offsetWidth-s.clientWidth-f-m:0,F="offsetHeight"in s?s.offsetHeight-s.clientHeight-z-b:0,$="offsetWidth"in s?0===s.offsetWidth?0:i/s.offsetWidth:0,W="offsetHeight"in s?0===s.offsetHeight?0:e/s.offsetHeight:0;if(p===s)O="start"===o?T:"end"===o?T-w:"nearest"===o?h(y,y+w,w,z,b,y+T,y+T+x,x):T-w/2,A="start"===u?C:"center"===u?C-v/2:"end"===u?C-v:h(_,_+v,v,f,m,_+C,_+C+E,E),O=Math.max(0,O+y),A=Math.max(0,A+_);else{O="start"===o?T-r-z:"end"===o?T-l+b+F:"nearest"===o?h(r,l,e,z,b+F,T,T+x,x):T-(r+e/2)+F/2,A="start"===u?C-c-f:"center"===u?C-(c+i/2)+N/2:"end"===u?C-a+m+N:h(c,a,i,f,m+N,C,C+E,E);const{scrollLeft:t,scrollTop:n}=s;O=Math.max(0,Math.min(n+O/W,s.scrollHeight-e/W+F)),A=Math.max(0,Math.min(t+A/$,s.scrollWidth-i/$+N)),T+=n-O,C+=t-A}D.push({el:s,top:O,left:A})}return D};const f=t=>!1===t?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&0!==Object.keys(t).length)(t)?t:{block:"start",inline:"nearest"};function z(t,s){if(!t.isConnected||!(t=>{let s=t;for(;s&&s.parentNode;){if(s.parentNode===document)return!0;s=s.parentNode instanceof ShadowRoot?s.parentNode.host:s.parentNode}return!1})(t))return;const e=(t=>{const s=window.getComputedStyle(t);return{top:parseFloat(s.scrollMarginTop)||0,right:parseFloat(s.scrollMarginRight)||0,bottom:parseFloat(s.scrollMarginBottom)||0,left:parseFloat(s.scrollMarginLeft)||0}})(t);if((t=>"object"==typeof t&&"function"==typeof t.behavior)(s))return s.behavior(u(t,s));const i="boolean"==typeof s||null==s?void 0:s.behavior;for(const{el:r,top:a,left:n}of u(t,f(s))){const t=a-e.top+e.bottom,s=n-e.left+e.right;r.scroll({top:t,left:s,behavior:i})}}
|
|
2
|
+
/**!
|
|
3
|
+
* Sortable 1.15.0
|
|
4
|
+
* @author RubaXa <trash@rubaxa.org>
|
|
5
|
+
* @author owenm <owen23355@gmail.com>
|
|
6
|
+
* @license MIT
|
|
7
|
+
*/function m(){m=Object.assign||function(t){for(var s=1;s<arguments.length;s++){var e=arguments[s];for(var i in e){if(Object.prototype.hasOwnProperty.call(e,i)){t[i]=e[i]}}}return t};return m.apply(this,arguments)}var p="1.15.0";function g(t){if(typeof window!=="undefined"&&window.navigator){return!!navigator.userAgent.match(t)}}const b=g(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);const v=g(/Edge/i);const w=g(/firefox/i);const _=g(/safari/i)&&!g(/chrome/i)&&!g(/android/i);const y=g(/iP(ad|od|hone)/i);const x=g(/chrome/i)&&g(/android/i);const E={capture:false,passive:false};function k(t,s,e){t.addEventListener(s,e,!b&&E)}function S(t,s,e){t.removeEventListener(s,e,!b&&E)}function I(t,s){if(!s)return;s[0]===">"&&(s=s.substring(1));if(t){try{if(t.matches){return t.matches(s)}else if(t.msMatchesSelector){return t.msMatchesSelector(s)}else if(t.webkitMatchesSelector){return t.webkitMatchesSelector(s)}}catch(t){return false}}return false}function M(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function T(t,s,e,i){if(t){e=e||document;do{if(s!=null&&(s[0]===">"?t.parentNode===e&&I(t,s):I(t,s))||i&&t===e){return t}if(t===e)break}while(t=M(t))}return null}const C=/\s+/g;function D(t,s,e){if(t&&s){if(t.classList){t.classList[e?"add":"remove"](s)}else{let i=(" "+t.className+" ").replace(C," ").replace(" "+s+" "," ");t.className=(i+(e?" "+s:"")).replace(C," ")}}}function O(t,s,e){let i=t&&t.style;if(i){if(e===void 0){if(document.defaultView&&document.defaultView.getComputedStyle){e=document.defaultView.getComputedStyle(t,"")}else if(t.currentStyle){e=t.currentStyle}return s===void 0?e:e[s]}else{if(!(s in i)&&s.indexOf("webkit")===-1){s="-webkit-"+s}i[s]=e+(typeof e==="string"?"":"px")}}}function A(t,s){let e="";if(typeof t==="string"){e=t}else{do{let s=O(t,"transform");if(s&&s!=="none"){e=s+" "+e}}while(!s&&(t=t.parentNode))}const i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(e)}function N(t,s,e){if(t){let i=t.getElementsByTagName(s),r=0,a=i.length;if(e){for(;r<a;r++){e(i[r],r)}}return i}return[]}function F(){let t=document.scrollingElement;if(t){return t}else{return document.documentElement}}function $(t,s,e,i,r){if(!t.getBoundingClientRect&&t!==window)return;let a,n,l,o,c,h,d;if(t!==window&&t.parentNode&&t!==F()){a=t.getBoundingClientRect();n=a.top;l=a.left;o=a.bottom;c=a.right;h=a.height;d=a.width}else{n=0;l=0;o=window.innerHeight;c=window.innerWidth;h=window.innerHeight;d=window.innerWidth}if((s||e)&&t!==window){r=r||t.parentNode;if(!b){do{if(r&&r.getBoundingClientRect&&(O(r,"transform")!=="none"||e&&O(r,"position")!=="static")){let t=r.getBoundingClientRect();n-=t.top+parseInt(O(r,"border-top-width"));l-=t.left+parseInt(O(r,"border-left-width"));o=n+a.height;c=l+a.width;break}}while(r=r.parentNode)}}if(i&&t!==window){let s=A(r||t),e=s&&s.a,i=s&&s.d;if(s){n/=i;l/=e;d/=e;h/=i;o=n+h;c=l+d}}return{top:n,left:l,bottom:o,right:c,width:d,height:h}}function W(t,s,e){let i=R(t,true),r=$(t)[s];while(i){let t=$(i)[e],s;if(e==="top"||e==="left"){s=r>=t}else{s=r<=t}if(!s)return i;if(i===F())break;i=R(i,false)}return false}function L(t,s,e,i){let r=0,a=0,n=t.children;while(a<n.length){if(n[a].style.display!=="none"&&n[a]!==ss.ghost&&(i||n[a]!==ss.dragged)&&T(n[a],e.draggable,t,false)){if(r===s){return n[a]}r++}a++}return null}function G(t,s){let e=t.lastElementChild;while(e&&(e===ss.ghost||O(e,"display")==="none"||s&&!I(e,s))){e=e.previousElementSibling}return e||null}function H(t,s){let e=0;if(!t||!t.parentNode){return-1}while(t=t.previousElementSibling){if(t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==ss.clone&&(!s||I(t,s))){e++}}return e}function P(t){let s=0,e=0,i=F();if(t){do{let i=A(t),r=i.a,a=i.d;s+=t.scrollLeft*r;e+=t.scrollTop*a}while(t!==i&&(t=t.parentNode))}return[s,e]}function j(t,s){for(let e in t){if(!t.hasOwnProperty(e))continue;for(let i in s){if(s.hasOwnProperty(i)&&s[i]===t[e][i])return Number(e)}}return-1}function R(t,s){if(!t||!t.getBoundingClientRect)return F();let e=t;let i=false;do{if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){let t=O(e);if(e.clientWidth<e.scrollWidth&&(t.overflowX=="auto"||t.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(t.overflowY=="auto"||t.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return F();if(i||s)return e;i=true}}}while(e=e.parentNode);return F()}function U(t,s){if(t&&s){for(let e in s){if(s.hasOwnProperty(e)){t[e]=s[e]}}}return t}function B(t,s){return Math.round(t.top)===Math.round(s.top)&&Math.round(t.left)===Math.round(s.left)&&Math.round(t.height)===Math.round(s.height)&&Math.round(t.width)===Math.round(s.width)}let K;function X(t,s){return function(){if(!K){let e=arguments,i=this;if(e.length===1){t.call(i,e[0])}else{t.apply(i,e)}K=setTimeout((function(){K=void 0}),s)}}}function Y(){clearTimeout(K);K=void 0}function V(t,s,e){t.scrollLeft+=s;t.scrollTop+=e}function J(t){let s=window.Polymer;let e=window.jQuery||window.Zepto;if(s&&s.dom){return s.dom(t).cloneNode(true)}else if(e){return e(t).clone(true)[0]}else{return t.cloneNode(true)}}function Z(t,s){O(t,"position","absolute");O(t,"top",s.top);O(t,"left",s.left);O(t,"width",s.width);O(t,"height",s.height)}function q(t){O(t,"position","");O(t,"top","");O(t,"left","");O(t,"width","");O(t,"height","")}const Q="Sortable"+(new Date).getTime();function tt(){let t=[],s;return{captureAnimationState(){t=[];if(!this.options.animation)return;let s=[].slice.call(this.el.children);s.forEach((s=>{if(O(s,"display")==="none"||s===ss.ghost)return;t.push({target:s,rect:$(s)});let e={...t[t.length-1].rect};if(s.thisAnimationDuration){let t=A(s,true);if(t){e.top-=t.f;e.left-=t.e}}s.fromRect=e}))},addAnimationState(s){t.push(s)},removeAnimationState(s){t.splice(j(t,{target:s}),1)},animateAll(e){if(!this.options.animation){clearTimeout(s);if(typeof e==="function")e();return}let i=false,r=0;t.forEach((t=>{let s=0,e=t.target,a=e.fromRect,n=$(e),l=e.prevFromRect,o=e.prevToRect,c=t.rect,h=A(e,true);if(h){n.top-=h.f;n.left-=h.e}e.toRect=n;if(e.thisAnimationDuration){if(B(l,n)&&!B(a,n)&&(c.top-n.top)/(c.left-n.left)===(a.top-n.top)/(a.left-n.left)){s=et(c,l,o,this.options)}}if(!B(n,a)){e.prevFromRect=a;e.prevToRect=n;if(!s){s=this.options.animation}this.animate(e,c,n,s)}if(s){i=true;r=Math.max(r,s);clearTimeout(e.animationResetTimer);e.animationResetTimer=setTimeout((function(){e.animationTime=0;e.prevFromRect=null;e.fromRect=null;e.prevToRect=null;e.thisAnimationDuration=null}),s);e.thisAnimationDuration=s}}));clearTimeout(s);if(!i){if(typeof e==="function")e()}else{s=setTimeout((function(){if(typeof e==="function")e()}),r)}t=[]},animate(t,s,e,i){if(i){O(t,"transition","");O(t,"transform","");let r=A(this.el),a=r&&r.a,n=r&&r.d,l=(s.left-e.left)/(a||1),o=(s.top-e.top)/(n||1);t.animatingX=!!l;t.animatingY=!!o;O(t,"transform","translate3d("+l+"px,"+o+"px,0)");this.forRepaintDummy=st(t);O(t,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:""));O(t,"transform","translate3d(0,0,0)");typeof t.animated==="number"&&clearTimeout(t.animated);t.animated=setTimeout((function(){O(t,"transition","");O(t,"transform","");t.animated=false;t.animatingX=false;t.animatingY=false}),i)}}}}function st(t){return t.offsetWidth}function et(t,s,e,i){return Math.sqrt(Math.pow(s.top-t.top,2)+Math.pow(s.left-t.left,2))/Math.sqrt(Math.pow(s.top-e.top,2)+Math.pow(s.left-e.left,2))*i.animation}let it=[];const rt={initializeByDefault:true};var at={mount(t){for(let s in rt){if(rt.hasOwnProperty(s)&&!(s in t)){t[s]=rt[s]}}it.forEach((s=>{if(s.pluginName===t.pluginName){throw`Sortable: Cannot mount plugin ${t.pluginName} more than once`}}));it.push(t)},pluginEvent(t,s,e){this.eventCanceled=false;e.cancel=()=>{this.eventCanceled=true};const i=t+"Global";it.forEach((r=>{if(!s[r.pluginName])return;if(s[r.pluginName][i]){s[r.pluginName][i]({sortable:s,...e})}if(s.options[r.pluginName]&&s[r.pluginName][t]){s[r.pluginName][t]({sortable:s,...e})}}))},initializePlugins(t,s,e,i){it.forEach((i=>{const r=i.pluginName;if(!t.options[r]&&!i.initializeByDefault)return;let a=new i(t,s,t.options);a.sortable=t;a.options=t.options;t[r]=a;m(e,a.defaults)}));for(let s in t.options){if(!t.options.hasOwnProperty(s))continue;let e=this.modifyOption(t,s,t.options[s]);if(typeof e!=="undefined"){t.options[s]=e}}},getEventProperties(t,s){let e={};it.forEach((i=>{if(typeof i.eventProperties!=="function")return;m(e,i.eventProperties.call(s[i.pluginName],t))}));return e},modifyOption(t,s,e){let i;it.forEach((r=>{if(!t[r.pluginName])return;if(r.optionListeners&&typeof r.optionListeners[s]==="function"){i=r.optionListeners[s].call(t[r.pluginName],e)}}));return i}};function nt({sortable:t,rootEl:s,name:e,targetEl:i,cloneEl:r,toEl:a,fromEl:n,oldIndex:l,newIndex:o,oldDraggableIndex:c,newDraggableIndex:h,originalEvent:d,putSortable:u,extraEventProperties:f}){t=t||s&&s[Q];if(!t)return;let z,m=t.options,p="on"+e.charAt(0).toUpperCase()+e.substr(1);if(window.CustomEvent&&!b&&!v){z=new CustomEvent(e,{bubbles:true,cancelable:true})}else{z=document.createEvent("Event");z.initEvent(e,true,true)}z.to=a||s;z.from=n||s;z.item=i||s;z.clone=r;z.oldIndex=l;z.newIndex=o;z.oldDraggableIndex=c;z.newDraggableIndex=h;z.originalEvent=d;z.pullMode=u?u.lastPutMode:undefined;let g={...f,...at.getEventProperties(e,t)};for(let t in g){z[t]=g[t]}if(s){s.dispatchEvent(z)}if(m[p]){m[p].call(t,z)}}let lt=function(t,s,{evt:e,...i}={}){at.pluginEvent.bind(ss)(t,s,{dragEl:ct,parentEl:ht,ghostEl:dt,rootEl:ut,nextEl:ft,lastDownEl:zt,cloneEl:mt,cloneHidden:pt,dragStarted:Ot,putSortable:yt,activeSortable:ss.active,originalEvent:e,oldIndex:gt,oldDraggableIndex:vt,newIndex:bt,newDraggableIndex:wt,hideGhostForTarget:Zt,unhideGhostForTarget:qt,cloneNowHidden(){pt=true},cloneNowShown(){pt=false},dispatchSortableEvent(t){ot({sortable:s,name:t,originalEvent:e})},...i})};function ot(t){nt({putSortable:yt,cloneEl:mt,targetEl:ct,rootEl:ut,oldIndex:gt,oldDraggableIndex:vt,newIndex:bt,newDraggableIndex:wt,...t})}let ct,ht,dt,ut,ft,zt,mt,pt,gt,bt,vt,wt,_t,yt,xt=false,Et=false,kt=[],St,It,Mt,Tt,Ct,Dt,Ot,At,Nt,Ft=false,$t=false,Wt,Lt,Gt=[],Ht=false,Pt=[];const jt=typeof document!=="undefined",Rt=y,Ut=v||b?"cssFloat":"float",Bt=jt&&!x&&!y&&"draggable"in document.createElement("div"),Kt=function(){if(!jt)return;if(b){return false}let t=document.createElement("x");t.style.cssText="pointer-events:auto";return t.style.pointerEvents==="auto"}(),Xt=function(t,s){let e=O(t),i=parseInt(e.width)-parseInt(e.paddingLeft)-parseInt(e.paddingRight)-parseInt(e.borderLeftWidth)-parseInt(e.borderRightWidth),r=L(t,0,s),a=L(t,1,s),n=r&&O(r),l=a&&O(a),o=n&&parseInt(n.marginLeft)+parseInt(n.marginRight)+$(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+$(a).width;if(e.display==="flex"){return e.flexDirection==="column"||e.flexDirection==="column-reverse"?"vertical":"horizontal"}if(e.display==="grid"){return e.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal"}if(r&&n.float&&n.float!=="none"){let t=n.float==="left"?"left":"right";return a&&(l.clear==="both"||l.clear===t)?"vertical":"horizontal"}return r&&(n.display==="block"||n.display==="flex"||n.display==="table"||n.display==="grid"||o>=i&&e[Ut]==="none"||a&&e[Ut]==="none"&&o+c>i)?"vertical":"horizontal"},Yt=function(t,s,e){let i=e?t.left:t.top,r=e?t.right:t.bottom,a=e?t.width:t.height,n=e?s.left:s.top,l=e?s.right:s.bottom,o=e?s.width:s.height;return i===n||r===l||i+a/2===n+o/2},Vt=function(t,s){let e;kt.some((i=>{const r=i[Q].options.emptyInsertThreshold;if(!r||G(i))return;const a=$(i),n=t>=a.left-r&&t<=a.right+r,l=s>=a.top-r&&s<=a.bottom+r;if(n&&l){return e=i}}));return e},Jt=function(t){function s(t,e){return function(i,r,a,n){let l=i.options.group.name&&r.options.group.name&&i.options.group.name===r.options.group.name;if(t==null&&(e||l)){return true}else if(t==null||t===false){return false}else if(e&&t==="clone"){return t}else if(typeof t==="function"){return s(t(i,r,a,n),e)(i,r,a,n)}else{let s=(e?i:r).options.group.name;return t===true||typeof t==="string"&&t===s||t.join&&t.indexOf(s)>-1}}}let e={};let i=t.group;if(!i||typeof i!="object"){i={name:i}}e.name=i.name;e.checkPull=s(i.pull,true);e.checkPut=s(i.put);e.revertClone=i.revertClone;t.group=e},Zt=function(){if(!Kt&&dt){O(dt,"display","none")}},qt=function(){if(!Kt&&dt){O(dt,"display","")}};if(jt&&!x){document.addEventListener("click",(function(t){if(Et){t.preventDefault();t.stopPropagation&&t.stopPropagation();t.stopImmediatePropagation&&t.stopImmediatePropagation();Et=false;return false}}),true)}let Qt=function(t){if(ct){t=t.touches?t.touches[0]:t;let s=Vt(t.clientX,t.clientY);if(s){let e={};for(let s in t){if(t.hasOwnProperty(s)){e[s]=t[s]}}e.target=e.rootEl=s;e.preventDefault=void 0;e.stopPropagation=void 0;s[Q]._onDragOver(e)}}};let ts=function(t){if(ct){ct.parentNode[Q]._isOutsideThisEl(t.target)}};function ss(t,s){if(!(t&&t.nodeType&&t.nodeType===1)){throw`Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(t)}`}this.el=t;this.options=s=m({},s);t[Q]=this;let e={group:null,sort:true,disabled:false,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:false,invertedSwapThreshold:null,removeCloneOnHide:true,direction:function(){return Xt(t,this.options)},ghostClone:function(t){return t.cloneNode(true)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:true,animation:0,easing:null,setData:function(t,s){t.setData("Text",s.textContent)},dropBubble:false,dragoverBubble:false,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:false,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:false,fallbackClass:"sortable-fallback",fallbackOnBody:false,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ss.supportPointer!==false&&"PointerEvent"in window&&!_,emptyInsertThreshold:5};at.initializePlugins(this,t,e);for(let t in e){!(t in s)&&(s[t]=e[t])}Jt(s);for(let t in this){if(t.charAt(0)==="_"&&typeof this[t]==="function"){this[t]=this[t].bind(this)}}this.nativeDraggable=s.forceFallback?false:Bt;if(this.nativeDraggable){this.options.touchStartThreshold=1}if(s.supportPointer){k(t,"pointerdown",this._onTapStart)}else{k(t,"mousedown",this._onTapStart);k(t,"touchstart",this._onTapStart)}if(this.nativeDraggable){k(t,"dragover",this);k(t,"dragenter",this)}kt.push(this.el);s.store&&s.store.get&&this.sort(s.store.get(this)||[]);m(this,tt())}ss.prototype={constructor:ss,_isOutsideThisEl:function(t){if(!this.el.contains(t)&&t!==this.el){At=null}},_getDirection:function(t,s){return typeof this.options.direction==="function"?this.options.direction.call(this,t,s,ct):this.options.direction},_onTapStart:function(t){if(!t.cancelable)return;let s=this,e=this.el,i=this.options,r=i.preventOnFilter,a=t.type,n=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(n||t).target,o=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=i.filter;ds(e);if(ct){return}if(/mousedown|pointerdown/.test(a)&&t.button!==0||i.disabled){return}if(o.isContentEditable){return}if(!this.nativeDraggable&&_&&l&&l.tagName.toUpperCase()==="SELECT"){return}l=T(l,i.draggable,e,false);if(l&&l.animated){return}if(zt===l){return}gt=H(l);vt=H(l,i.draggable);if(typeof c==="function"){if(c.call(this,t,l,this)){ot({sortable:s,rootEl:o,name:"filter",targetEl:l,toEl:e,fromEl:e});lt("filter",s,{evt:t});r&&t.cancelable&&t.preventDefault();return}}else if(c){c=c.split(",").some((function(i){i=T(o,i.trim(),e,false);if(i){ot({sortable:s,rootEl:i,name:"filter",targetEl:l,fromEl:e,toEl:e});lt("filter",s,{evt:t});return true}}));if(c){r&&t.cancelable&&t.preventDefault();return}}if(i.handle&&!T(o,i.handle,e,false)){return}this._prepareDragStart(t,n,l)},_prepareDragStart:function(t,s,e){let i=this,r=i.el,a=i.options,n=r.ownerDocument,l;if(e&&!ct&&e.parentNode===r){let o=$(e);ut=r;ct=e;ht=ct.parentNode;ft=ct.nextSibling;zt=e;_t=a.group;ss.dragged=ct;St={target:ct,clientX:(s||t).clientX,clientY:(s||t).clientY};Ct=St.clientX-o.left;Dt=St.clientY-o.top;this._lastX=(s||t).clientX;this._lastY=(s||t).clientY;ct.style["will-change"]="all";l=function(){lt("delayEnded",i,{evt:t});if(ss.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents();if(!w&&i.nativeDraggable){ct.draggable=true}i._triggerDragStart(t,s);ot({sortable:i,name:"choose",originalEvent:t});D(ct,a.chosenClass,true)};a.ignore.split(",").forEach((function(t){N(ct,t.trim(),rs)}));k(n,"dragover",Qt);k(n,"mousemove",Qt);k(n,"touchmove",Qt);k(n,"mouseup",i._onDrop);k(n,"touchend",i._onDrop);k(n,"touchcancel",i._onDrop);if(w&&this.nativeDraggable){this.options.touchStartThreshold=4;ct.draggable=true}lt("delayStart",this,{evt:t});if(a.delay&&(!a.delayOnTouchOnly||s)&&(!this.nativeDraggable||!(v||b))){if(ss.eventCanceled){this._onDrop();return}k(n,"mouseup",i._disableDelayedDrag);k(n,"touchend",i._disableDelayedDrag);k(n,"touchcancel",i._disableDelayedDrag);k(n,"mousemove",i._delayedDragTouchMoveHandler);k(n,"touchmove",i._delayedDragTouchMoveHandler);a.supportPointer&&k(n,"pointermove",i._delayedDragTouchMoveHandler);i._dragStartTimer=setTimeout(l,a.delay)}else{l()}}},_delayedDragTouchMoveHandler:function(t){let s=t.touches?t.touches[0]:t;if(Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))){this._disableDelayedDrag()}},_disableDelayedDrag:function(){ct&&rs(ct);clearTimeout(this._dragStartTimer);this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){let t=this.el.ownerDocument;S(t,"mouseup",this._disableDelayedDrag);S(t,"touchend",this._disableDelayedDrag);S(t,"touchcancel",this._disableDelayedDrag);S(t,"mousemove",this._delayedDragTouchMoveHandler);S(t,"touchmove",this._delayedDragTouchMoveHandler);S(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,s){s=s||t.pointerType=="touch"&&t;if(!this.nativeDraggable||s){if(this.options.supportPointer){k(document,"pointermove",this._onTouchMove)}else if(s){k(document,"touchmove",this._onTouchMove)}else{k(document,"mousemove",this._onTouchMove)}}else{k(ct,"dragend",this);k(ut,"dragstart",this._onDragStart)}try{if(document.selection){us((function(){document.selection.empty()}))}else{window.getSelection().removeAllRanges()}}catch(t){}},_dragStarted:function(t,s){xt=false;if(ut&&ct){lt("dragStarted",this,{evt:s});if(this.nativeDraggable){k(document,"dragover",ts)}let e=this.options;!t&&D(ct,e.dragClass,false);D(ct,e.ghostClass,true);ss.active=this;t&&this._appendGhost();ot({sortable:this,name:"start",originalEvent:s})}else{this._nulling()}},_emulateDragOver:function(){if(It){this._lastX=It.clientX;this._lastY=It.clientY;Zt();let t=document.elementFromPoint(It.clientX,It.clientY);let s=t;while(t&&t.shadowRoot){t=t.shadowRoot.elementFromPoint(It.clientX,It.clientY);if(t===s)break;s=t}ct.parentNode[Q]._isOutsideThisEl(t);if(s){do{if(s[Q]){let e;e=s[Q]._onDragOver({clientX:It.clientX,clientY:It.clientY,target:t,rootEl:s});if(e&&!this.options.dragoverBubble){break}}t=s}while(s=s.parentNode)}qt()}},_onTouchMove:function(t){if(St){let s=this.options,e=s.fallbackTolerance,i=s.fallbackOffset,r=t.touches?t.touches[0]:t,a=dt&&A(dt,true),n=dt&&a&&a.a,l=dt&&a&&a.d,o=Rt&&Lt&&P(Lt),c=(r.clientX-St.clientX+i.x)/(n||1)+(o?o[0]-Gt[0]:0)/(n||1),h=(r.clientY-St.clientY+i.y)/(l||1)+(o?o[1]-Gt[1]:0)/(l||1);if(!ss.active&&!xt){if(e&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<e){return}this._onDragStart(t,true)}if(dt){if(a){a.e+=c-(Mt||0);a.f+=h-(Tt||0)}else{a={a:1,b:0,c:0,d:1,e:c,f:h}}let t=`matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;O(dt,"webkitTransform",t);O(dt,"mozTransform",t);O(dt,"msTransform",t);O(dt,"transform",t);Mt=c;Tt=h;It=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!dt){let t=this.options.fallbackOnBody?document.body:ut,s=$(ct,true,Rt,true,t),e=this.options;if(Rt){Lt=t;while(O(Lt,"position")==="static"&&O(Lt,"transform")==="none"&&Lt!==document){Lt=Lt.parentNode}if(Lt!==document.body&&Lt!==document.documentElement){if(Lt===document)Lt=F();s.top+=Lt.scrollTop;s.left+=Lt.scrollLeft}else{Lt=F()}Gt=P(Lt)}dt=e.ghostClone(ct);D(dt,e.ghostClass,false);D(dt,e.fallbackClass,true);D(dt,e.dragClass,true);O(dt,"transition","");O(dt,"transform","");O(dt,"box-sizing","border-box");O(dt,"margin",0);O(dt,"top",s.top);O(dt,"left",s.left);O(dt,"width",s.width);O(dt,"height",s.height);O(dt,"opacity","0.8");O(dt,"position",Rt?"absolute":"fixed");O(dt,"zIndex","100000");O(dt,"pointerEvents","none");ss.ghost=dt;t.appendChild(dt);O(dt,"transform-origin",Ct/parseInt(dt.style.width)*100+"% "+Dt/parseInt(dt.style.height)*100+"%")}},_onDragStart:function(t,s){let e=this;let i=t.dataTransfer;let r=e.options;lt("dragStart",this,{evt:t});if(ss.eventCanceled){this._onDrop();return}lt("setupClone",this);if(!ss.eventCanceled){mt=J(ct);mt.removeAttribute("id");mt.draggable=false;mt.style["will-change"]="";this._hideClone();D(mt,this.options.chosenClass,false);ss.clone=mt}e.cloneId=us((function(){lt("clone",e);if(ss.eventCanceled)return;if(!e.options.removeCloneOnHide){ut.insertBefore(mt,ct)}e._hideClone();ot({sortable:e,name:"clone"})}));!s&&D(ct,r.dragClass,true);if(s){Et=true;e._loopId=setInterval(e._emulateDragOver,50)}else{S(document,"mouseup",e._onDrop);S(document,"touchend",e._onDrop);S(document,"touchcancel",e._onDrop);if(i){i.effectAllowed="move";r.setData&&r.setData.call(e,i,ct)}k(document,"drop",e);O(ct,"transform","translateZ(0)")}xt=true;e._dragStartId=us(e._dragStarted.bind(e,s,t));k(document,"selectstart",e);Ot=true;if(_){O(document.body,"user-select","none")}},_onDragOver:function(t){let s=this.el,e=t.target,i,r,a,n=this.options,l=n.group,o=ss.active,c=_t===l,h=n.sort,d=yt||o,u,f=this,z=false;if(Ht)return;function m(n,l){lt(n,f,{evt:t,isOwner:c,axis:u?"vertical":"horizontal",revert:a,dragRect:i,targetRect:r,canSort:h,fromSortable:d,target:e,completed:g,onMove(e,r){return is(ut,s,ct,i,e,$(e),t,r)},changed:b,...l})}function p(){m("dragOverAnimationCapture");f.captureAnimationState();if(f!==d){d.captureAnimationState()}}function g(i){m("dragOverCompleted",{insertion:i});if(i){if(c){o._hideClone()}else{o._showClone(f)}if(f!==d){D(ct,yt?yt.options.ghostClass:o.options.ghostClass,false);D(ct,n.ghostClass,true)}if(yt!==f&&f!==ss.active){yt=f}else if(f===ss.active&&yt){yt=null}if(d===f){f._ignoreWhileAnimating=e}f.animateAll((function(){m("dragOverAnimationComplete");f._ignoreWhileAnimating=null}));if(f!==d){d.animateAll();d._ignoreWhileAnimating=null}}if(e===ct&&!ct.animated||e===s&&!e.animated){At=null}if(!n.dragoverBubble&&!t.rootEl&&e!==document){ct.parentNode[Q]._isOutsideThisEl(t.target);!i&&Qt(t)}!n.dragoverBubble&&t.stopPropagation&&t.stopPropagation();return z=true}function b(){bt=H(ct);wt=H(ct,n.draggable);ot({sortable:f,name:"change",toEl:s,newIndex:bt,newDraggableIndex:wt,originalEvent:t})}if(t.preventDefault!==void 0){t.cancelable&&t.preventDefault()}e=T(e,n.draggable,s,true);m("dragOver");if(ss.eventCanceled)return z;if(ct.contains(t.target)||e.animated&&e.animatingX&&e.animatingY||f._ignoreWhileAnimating===e){return g(false)}Et=false;if(o&&!n.disabled&&(c?h||(a=ht!==ut):yt===this||(this.lastPutMode=_t.checkPull(this,o,ct,t))&&l.checkPut(this,o,ct,t))){u=this._getDirection(t,e)==="vertical";i=$(ct);m("dragOverValid");if(ss.eventCanceled)return z;if(a){ht=ut;p();this._hideClone();m("revert");if(!ss.eventCanceled){if(ft){ut.insertBefore(ct,ft)}else{ut.appendChild(ct)}}return g(true)}let l=G(s,n.draggable);if(!l||ls(t,u,this)&&!l.animated){if(l===ct){return g(false)}if(l&&s===t.target){e=l}if(e){r=$(e)}if(is(ut,s,ct,i,e,r,t,!!e)!==false){p();if(l&&l.nextSibling){s.insertBefore(ct,l.nextSibling)}else{s.appendChild(ct)}ht=s;b();return g(true)}}else if(l&&ns(t,u,this)){let a=L(s,0,n,true);if(a===ct){return g(false)}e=a;r=$(e);if(is(ut,s,ct,i,e,r,t,false)!==false){p();s.insertBefore(ct,a);ht=s;b();return g(true)}}else if(e.parentNode===s){r=$(e);let a=0,l,o=ct.parentNode!==s,c=!Yt(ct.animated&&ct.toRect||i,e.animated&&e.toRect||r,u),h=u?"top":"left",d=W(e,"top","top")||W(ct,"top","top"),f=d?d.scrollTop:void 0;if(At!==e){l=r[h];Ft=false;$t=!c&&n.invertSwap||o}a=os(t,e,r,u,c?1:n.swapThreshold,n.invertedSwapThreshold==null?n.swapThreshold:n.invertedSwapThreshold,$t,At===e);let z;if(a!==0){let t=H(ct);do{t-=a;z=ht.children[t]}while(z&&(O(z,"display")==="none"||z===dt))}if(a===0||z===e){return g(false)}At=e;Nt=a;let m=e.nextElementSibling,v=false;v=a===1;let w=is(ut,s,ct,i,e,r,t,v);if(w!==false){if(w===1||w===-1){v=w===1}Ht=true;setTimeout(as,30);p();if(v&&!m){s.appendChild(ct)}else{e.parentNode.insertBefore(ct,v?m:e)}if(d){V(d,0,f-d.scrollTop)}ht=ct.parentNode;if(l!==undefined&&!$t){Wt=Math.abs(l-$(e)[h])}b();return g(true)}}if(s.contains(ct)){return g(false)}}return false},_ignoreWhileAnimating:null,_offMoveEvents:function(){S(document,"mousemove",this._onTouchMove);S(document,"touchmove",this._onTouchMove);S(document,"pointermove",this._onTouchMove);S(document,"dragover",Qt);S(document,"mousemove",Qt);S(document,"touchmove",Qt)},_offUpEvents:function(){let t=this.el.ownerDocument;S(t,"mouseup",this._onDrop);S(t,"touchend",this._onDrop);S(t,"pointerup",this._onDrop);S(t,"touchcancel",this._onDrop);S(document,"selectstart",this)},_onDrop:function(t){let s=this.el,e=this.options;bt=H(ct);wt=H(ct,e.draggable);lt("drop",this,{evt:t});ht=ct&&ct.parentNode;bt=H(ct);wt=H(ct,e.draggable);if(ss.eventCanceled){this._nulling();return}xt=false;$t=false;Ft=false;clearInterval(this._loopId);clearTimeout(this._dragStartTimer);fs(this.cloneId);fs(this._dragStartId);if(this.nativeDraggable){S(document,"drop",this);S(s,"dragstart",this._onDragStart)}this._offMoveEvents();this._offUpEvents();if(_){O(document.body,"user-select","")}O(ct,"transform","");if(t){if(Ot){t.cancelable&&t.preventDefault();!e.dropBubble&&t.stopPropagation()}dt&&dt.parentNode&&dt.parentNode.removeChild(dt);if(ut===ht||yt&&yt.lastPutMode!=="clone"){mt&&mt.parentNode&&mt.parentNode.removeChild(mt)}if(ct){if(this.nativeDraggable){S(ct,"dragend",this)}rs(ct);ct.style["will-change"]="";if(Ot&&!xt){D(ct,yt?yt.options.ghostClass:this.options.ghostClass,false)}D(ct,this.options.chosenClass,false);ot({sortable:this,name:"unchoose",toEl:ht,newIndex:null,newDraggableIndex:null,originalEvent:t});if(ut!==ht){if(bt>=0){ot({rootEl:ht,name:"add",toEl:ht,fromEl:ut,originalEvent:t});ot({sortable:this,name:"remove",toEl:ht,originalEvent:t});ot({rootEl:ht,name:"sort",toEl:ht,fromEl:ut,originalEvent:t});ot({sortable:this,name:"sort",toEl:ht,originalEvent:t})}yt&&yt.save()}else{if(bt!==gt){if(bt>=0){ot({sortable:this,name:"update",toEl:ht,originalEvent:t});ot({sortable:this,name:"sort",toEl:ht,originalEvent:t})}}}if(ss.active){if(bt==null||bt===-1){bt=gt;wt=vt}ot({sortable:this,name:"end",toEl:ht,originalEvent:t});this.save()}}}this._nulling()},_nulling:function(){lt("nulling",this);ut=ct=ht=dt=ft=mt=zt=pt=St=It=Ot=bt=wt=gt=vt=At=Nt=yt=_t=ss.dragged=ss.ghost=ss.clone=ss.active=null;Pt.forEach((function(t){t.checked=true}));Pt.length=Mt=Tt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":if(ct){this._onDragOver(t);es(t)}break;case"selectstart":t.preventDefault();break}},toArray:function(){let t=[],s,e=this.el.children,i=0,r=e.length,a=this.options;for(;i<r;i++){s=e[i];if(T(s,a.draggable,this.el,false)){t.push(s.getAttribute(a.dataIdAttr)||hs(s))}}return t},sort:function(t,s){let e={},i=this.el;this.toArray().forEach((function(t,s){let r=i.children[s];if(T(r,this.options.draggable,i,false)){e[t]=r}}),this);s&&this.captureAnimationState();t.forEach((function(t){if(e[t]){i.removeChild(e[t]);i.appendChild(e[t])}}));s&&this.animateAll()},save:function(){let t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,s){return T(t,s||this.options.draggable,this.el,false)},option:function(t,s){let e=this.options;if(s===void 0){return e[t]}else{let i=at.modifyOption(this,t,s);if(typeof i!=="undefined"){e[t]=i}else{e[t]=s}if(t==="group"){Jt(e)}}},destroy:function(){lt("destroy",this);let t=this.el;t[Q]=null;S(t,"mousedown",this._onTapStart);S(t,"touchstart",this._onTapStart);S(t,"pointerdown",this._onTapStart);if(this.nativeDraggable){S(t,"dragover",this);S(t,"dragenter",this)}Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")}));this._onDrop();this._disableDelayedDragEvents();kt.splice(kt.indexOf(this.el),1);this.el=t=null},_hideClone:function(){if(!pt){lt("hideClone",this);if(ss.eventCanceled)return;O(mt,"display","none");if(this.options.removeCloneOnHide&&mt.parentNode){mt.parentNode.removeChild(mt)}pt=true}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(pt){lt("showClone",this);if(ss.eventCanceled)return;if(ct.parentNode==ut&&!this.options.group.revertClone){ut.insertBefore(mt,ct)}else if(ft){ut.insertBefore(mt,ft)}else{ut.appendChild(mt)}if(this.options.group.revertClone){this.animate(ct,mt)}O(mt,"display","");pt=false}}};function es(t){if(t.dataTransfer){t.dataTransfer.dropEffect="move"}t.cancelable&&t.preventDefault()}function is(t,s,e,i,r,a,n,l){let o,c=t[Q],h=c.options.onMove,d;if(window.CustomEvent&&!b&&!v){o=new CustomEvent("move",{bubbles:true,cancelable:true})}else{o=document.createEvent("Event");o.initEvent("move",true,true)}o.to=s;o.from=t;o.dragged=e;o.draggedRect=i;o.related=r||s;o.relatedRect=a||$(s);o.willInsertAfter=l;o.originalEvent=n;t.dispatchEvent(o);if(h){d=h.call(c,o,n)}return d}function rs(t){t.draggable=false}function as(){Ht=false}function ns(t,s,e){let i=$(L(e.el,0,e.options,true));const r=10;return s?t.clientX<i.left-r||t.clientY<i.top&&t.clientX<i.right:t.clientY<i.top-r||t.clientY<i.bottom&&t.clientX<i.left}function ls(t,s,e){let i=$(G(e.el,e.options.draggable));const r=10;return s?t.clientX>i.right+r||t.clientX<=i.right&&t.clientY>i.bottom&&t.clientX>=i.left:t.clientX>i.right&&t.clientY>i.top||t.clientX<=i.right&&t.clientY>i.bottom+r}function os(t,s,e,i,r,a,n,l){let o=i?t.clientY:t.clientX,c=i?e.height:e.width,h=i?e.top:e.left,d=i?e.bottom:e.right,u=false;if(!n){if(l&&Wt<c*r){if(!Ft&&(Nt===1?o>h+c*a/2:o<d-c*a/2)){Ft=true}if(!Ft){if(Nt===1?o<h+Wt:o>d-Wt){return-Nt}}else{u=true}}else{if(o>h+c*(1-r)/2&&o<d-c*(1-r)/2){return cs(s)}}}u=u||n;if(u){if(o<h+c*a/2||o>d-c*a/2){return o>h+c/2?1:-1}}return 0}function cs(t){if(H(ct)<H(t)){return 1}else{return-1}}function hs(t){let s=t.tagName+t.className+t.src+t.href+t.textContent,e=s.length,i=0;while(e--){i+=s.charCodeAt(e)}return i.toString(36)}function ds(t){Pt.length=0;let s=t.getElementsByTagName("input");let e=s.length;while(e--){let t=s[e];t.checked&&Pt.push(t)}}function us(t){return setTimeout(t,0)}function fs(t){return clearTimeout(t)}if(jt){k(document,"touchmove",(function(t){if((ss.active||xt)&&t.cancelable){t.preventDefault()}}))}ss.utils={on:k,off:S,css:O,find:N,is:function(t,s){return!!T(t,s,t,false)},extend:U,throttle:X,closest:T,toggleClass:D,clone:J,index:H,nextTick:us,cancelNextTick:fs,detectDirection:Xt,getChild:L};ss.get=function(t){return t[Q]};ss.mount=function(...t){if(t[0].constructor===Array)t=t[0];t.forEach((t=>{if(!t.prototype||!t.prototype.constructor){throw`Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(t)}`}if(t.utils)ss.utils={...ss.utils,...t.utils};at.mount(t)}))};ss.create=function(t,s){return new ss(t,s)};ss.version=p;let zs=[],ms,ps,gs=false,bs,vs,ws,_s;function ys(){function t(){this.defaults={scroll:true,forceAutoScrollFallback:false,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:true};for(let t in this){if(t.charAt(0)==="_"&&typeof this[t]==="function"){this[t]=this[t].bind(this)}}}t.prototype={dragStarted({originalEvent:t}){if(this.sortable.nativeDraggable){k(document,"dragover",this._handleAutoScroll)}else{if(this.options.supportPointer){k(document,"pointermove",this._handleFallbackAutoScroll)}else if(t.touches){k(document,"touchmove",this._handleFallbackAutoScroll)}else{k(document,"mousemove",this._handleFallbackAutoScroll)}}},dragOverCompleted({originalEvent:t}){if(!this.options.dragOverBubble&&!t.rootEl){this._handleAutoScroll(t)}},drop(){if(this.sortable.nativeDraggable){S(document,"dragover",this._handleAutoScroll)}else{S(document,"pointermove",this._handleFallbackAutoScroll);S(document,"touchmove",this._handleFallbackAutoScroll);S(document,"mousemove",this._handleFallbackAutoScroll)}Es();xs();Y()},nulling(){ws=ps=ms=gs=_s=bs=vs=null;zs.length=0},_handleFallbackAutoScroll(t){this._handleAutoScroll(t,true)},_handleAutoScroll(t,s){const e=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(e,i);ws=t;if(s||this.options.forceAutoScrollFallback||v||b||_){ks(t,this.options,r,s);let a=R(r,true);if(gs&&(!_s||e!==bs||i!==vs)){_s&&Es();_s=setInterval((()=>{let r=R(document.elementFromPoint(e,i),true);if(r!==a){a=r;xs()}ks(t,this.options,r,s)}),10);bs=e;vs=i}}else{if(!this.options.bubbleScroll||R(r,true)===F()){xs();return}ks(t,this.options,R(r,false),false)}}};return m(t,{pluginName:"scroll",initializeByDefault:true})}function xs(){zs.forEach((function(t){clearInterval(t.pid)}));zs=[]}function Es(){clearInterval(_s)}const ks=X((function(t,s,e,i){if(!s.scroll)return;const r=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,n=s.scrollSensitivity,l=s.scrollSpeed,o=F();let c=false,h;if(ps!==e){ps=e;xs();ms=s.scroll;h=s.scrollFn;if(ms===true){ms=R(e,true)}}let d=0;let u=ms;do{let s=u,e=$(s),f=e.top,z=e.bottom,m=e.left,p=e.right,g=e.width,b=e.height,v,w,_=s.scrollWidth,y=s.scrollHeight,x=O(s),E=s.scrollLeft,k=s.scrollTop;if(s===o){v=g<_&&(x.overflowX==="auto"||x.overflowX==="scroll"||x.overflowX==="visible");w=b<y&&(x.overflowY==="auto"||x.overflowY==="scroll"||x.overflowY==="visible")}else{v=g<_&&(x.overflowX==="auto"||x.overflowX==="scroll");w=b<y&&(x.overflowY==="auto"||x.overflowY==="scroll")}let S=v&&(Math.abs(p-r)<=n&&E+g<_)-(Math.abs(m-r)<=n&&!!E);let I=w&&(Math.abs(z-a)<=n&&k+b<y)-(Math.abs(f-a)<=n&&!!k);if(!zs[d]){for(let t=0;t<=d;t++){if(!zs[t]){zs[t]={}}}}if(zs[d].vx!=S||zs[d].vy!=I||zs[d].el!==s){zs[d].el=s;zs[d].vx=S;zs[d].vy=I;clearInterval(zs[d].pid);if(S!=0||I!=0){c=true;zs[d].pid=setInterval(function(){if(i&&this.layer===0){ss.active._onTouchMove(ws)}let s=zs[this.layer].vy?zs[this.layer].vy*l:0;let e=zs[this.layer].vx?zs[this.layer].vx*l:0;if(typeof h==="function"){if(h.call(ss.dragged.parentNode[Q],e,s,t,ws,zs[this.layer].el)!=="continue"){return}}V(zs[this.layer].el,e,s)}.bind({layer:d}),24)}}d++}while(s.bubbleScroll&&u!==o&&(u=R(u,false)));gs=c}),30);const Ss=function({originalEvent:t,putSortable:s,dragEl:e,activeSortable:i,dispatchSortableEvent:r,hideGhostForTarget:a,unhideGhostForTarget:n}){if(!t)return;let l=s||i;a();let o=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t;let c=document.elementFromPoint(o.clientX,o.clientY);n();if(l&&!l.el.contains(c)){r("spill");this.onSpill({dragEl:e,putSortable:s})}};function Is(){}Is.prototype={startIndex:null,dragStart({oldDraggableIndex:t}){this.startIndex=t},onSpill({dragEl:t,putSortable:s}){this.sortable.captureAnimationState();if(s){s.captureAnimationState()}let e=L(this.sortable.el,this.startIndex,this.options);if(e){this.sortable.el.insertBefore(t,e)}else{this.sortable.el.appendChild(t)}this.sortable.animateAll();if(s){s.animateAll()}},drop:Ss};m(Is,{pluginName:"revertOnSpill"});function Ms(){}Ms.prototype={onSpill({dragEl:t,putSortable:s}){const e=s||this.sortable;e.captureAnimationState();t.parentNode&&t.parentNode.removeChild(t);e.animateAll()},drop:Ss};m(Ms,{pluginName:"removeOnSpill"});let Ts;function Cs(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}t.prototype={dragStart({dragEl:t}){Ts=t},dragOverValid({completed:t,target:s,onMove:e,activeSortable:i,changed:r,cancel:a}){if(!i.options.swap)return;let n=this.sortable.el,l=this.options;if(s&&s!==n){let t=Ts;if(e(s)!==false){D(s,l.swapClass,true);Ts=s}else{Ts=null}if(t&&t!==Ts){D(t,l.swapClass,false)}}r();t(true);a()},drop({activeSortable:t,putSortable:s,dragEl:e}){let i=s||this.sortable;let r=this.options;Ts&&D(Ts,r.swapClass,false);if(Ts&&(r.swap||s&&s.options.swap)){if(e!==Ts){i.captureAnimationState();if(i!==t)t.captureAnimationState();Ds(e,Ts);i.animateAll();if(i!==t)t.animateAll()}}},nulling(){Ts=null}};return m(t,{pluginName:"swap",eventProperties(){return{swapItem:Ts}}})}function Ds(t,s){let e=t.parentNode,i=s.parentNode,r,a;if(!e||!i||e.isEqualNode(s)||i.isEqualNode(t))return;r=H(t);a=H(s);if(e.isEqualNode(i)&&r<a){a++}e.insertBefore(s,e.children[r]);i.insertBefore(t,i.children[a])}let Os=[],As=[],Ns,Fs,$s=false,Ws=false,Ls=false,Gs,Hs,Ps;function js(){function t(t){for(let t in this){if(t.charAt(0)==="_"&&typeof this[t]==="function"){this[t]=this[t].bind(this)}}if(!t.options.avoidImplicitDeselect){if(t.options.supportPointer){k(document,"pointerup",this._deselectMultiDrag)}else{k(document,"mouseup",this._deselectMultiDrag);k(document,"touchend",this._deselectMultiDrag)}}k(document,"keydown",this._checkKeyDown);k(document,"keyup",this._checkKeyUp);this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:false,setData(s,e){let i="";if(Os.length&&Fs===t){Os.forEach(((t,s)=>{i+=(!s?"":", ")+t.textContent}))}else{i=e.textContent}s.setData("Text",i)}}}t.prototype={multiDragKeyDown:false,isMultiDrag:false,delayStartGlobal({dragEl:t}){Gs=t},delayEnded(){this.isMultiDrag=~Os.indexOf(Gs)},setupClone({sortable:t,cancel:s}){if(!this.isMultiDrag)return;for(let t=0;t<Os.length;t++){As.push(J(Os[t]));As[t].sortableIndex=Os[t].sortableIndex;As[t].draggable=false;As[t].style["will-change"]="";D(As[t],this.options.selectedClass,false);Os[t]===Gs&&D(As[t],this.options.chosenClass,false)}t._hideClone();s()},clone({sortable:t,rootEl:s,dispatchSortableEvent:e,cancel:i}){if(!this.isMultiDrag)return;if(!this.options.removeCloneOnHide){if(Os.length&&Fs===t){Us(true,s);e("clone");i()}}},showClone({cloneNowShown:t,rootEl:s,cancel:e}){if(!this.isMultiDrag)return;Us(false,s);As.forEach((t=>{O(t,"display","")}));t();Ps=false;e()},hideClone({sortable:t,cloneNowHidden:s,cancel:e}){if(!this.isMultiDrag)return;As.forEach((t=>{O(t,"display","none");if(this.options.removeCloneOnHide&&t.parentNode){t.parentNode.removeChild(t)}}));s();Ps=true;e()},dragStartGlobal({sortable:t}){if(!this.isMultiDrag&&Fs){Fs.multiDrag._deselectMultiDrag()}Os.forEach((t=>{t.sortableIndex=H(t)}));Os=Os.sort((function(t,s){return t.sortableIndex-s.sortableIndex}));Ls=true},dragStarted({sortable:t}){if(!this.isMultiDrag)return;if(this.options.sort){t.captureAnimationState();if(this.options.animation){Os.forEach((t=>{if(t===Gs)return;O(t,"position","absolute")}));let t=$(Gs,false,true,true);Os.forEach((s=>{if(s===Gs)return;Z(s,t)}));Ws=true;$s=true}}t.animateAll((()=>{Ws=false;$s=false;if(this.options.animation){Os.forEach((t=>{q(t)}))}if(this.options.sort){Bs()}}))},dragOver({target:t,completed:s,cancel:e}){if(Ws&&~Os.indexOf(t)){s(false);e()}},revert({fromSortable:t,rootEl:s,sortable:e,dragRect:i}){if(Os.length>1){Os.forEach((s=>{e.addAnimationState({target:s,rect:Ws?$(s):i});q(s);s.fromRect=i;t.removeAnimationState(s)}));Ws=false;Rs(!this.options.removeCloneOnHide,s)}},dragOverCompleted({sortable:t,isOwner:s,insertion:e,activeSortable:i,parentEl:r,putSortable:a}){let n=this.options;if(e){if(s){i._hideClone()}$s=false;if(n.animation&&Os.length>1&&(Ws||!s&&!i.options.sort&&!a)){let t=$(Gs,false,true,true);Os.forEach((s=>{if(s===Gs)return;Z(s,t);r.appendChild(s)}));Ws=true}if(!s){if(!Ws){Bs()}if(Os.length>1){let s=Ps;i._showClone(t);if(i.options.animation&&!Ps&&s){As.forEach((t=>{i.addAnimationState({target:t,rect:Hs});t.fromRect=Hs;t.thisAnimationDuration=null}))}}else{i._showClone(t)}}}},dragOverAnimationCapture({dragRect:t,isOwner:s,activeSortable:e}){Os.forEach((t=>{t.thisAnimationDuration=null}));if(e.options.animation&&!s&&e.multiDrag.isMultiDrag){Hs=m({},t);let s=A(Gs,true);Hs.top-=s.f;Hs.left-=s.e}},dragOverAnimationComplete(){if(Ws){Ws=false;Bs()}},drop({originalEvent:t,rootEl:s,parentEl:e,sortable:i,dispatchSortableEvent:r,oldIndex:a,putSortable:n}){let l=n||this.sortable;if(!t)return;let o=this.options,c=e.children;if(!Ls){if(o.multiDragKey&&!this.multiDragKeyDown){this._deselectMultiDrag()}D(Gs,o.selectedClass,!~Os.indexOf(Gs));if(!~Os.indexOf(Gs)){Os.push(Gs);nt({sortable:i,rootEl:s,name:"select",targetEl:Gs,originalEvent:t});if(t.shiftKey&&Ns&&i.el.contains(Ns)){let e=H(Ns),r=H(Gs);if(~e&&~r&&e!==r){let a,n;if(r>e){n=e;a=r}else{n=r;a=e+1}for(;n<a;n++){if(~Os.indexOf(c[n]))continue;D(c[n],o.selectedClass,true);Os.push(c[n]);nt({sortable:i,rootEl:s,name:"select",targetEl:c[n],originalEvent:t})}}}else{Ns=Gs}Fs=l}else{Os.splice(Os.indexOf(Gs),1);Ns=null;nt({sortable:i,rootEl:s,name:"deselect",targetEl:Gs,originalEvent:t})}}if(Ls&&this.isMultiDrag){Ws=false;if((e[Q].options.sort||e!==s)&&Os.length>1){let t=$(Gs),s=H(Gs,":not(."+this.options.selectedClass+")");if(!$s&&o.animation)Gs.thisAnimationDuration=null;l.captureAnimationState();if(!$s){if(o.animation){Gs.fromRect=t;Os.forEach((s=>{s.thisAnimationDuration=null;if(s!==Gs){let e=Ws?$(s):t;s.fromRect=e;l.addAnimationState({target:s,rect:e})}}))}Bs();Os.forEach((t=>{if(c[s]){e.insertBefore(t,c[s])}else{e.appendChild(t)}s++}));if(a===H(Gs)){let t=false;Os.forEach((s=>{if(s.sortableIndex!==H(s)){t=true;return}}));if(t){r("update")}}}Os.forEach((t=>{q(t)}));l.animateAll()}Fs=l}if(s===e||n&&n.lastPutMode!=="clone"){As.forEach((t=>{t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal(){this.isMultiDrag=Ls=false;As.length=0},destroyGlobal(){this._deselectMultiDrag();S(document,"pointerup",this._deselectMultiDrag);S(document,"mouseup",this._deselectMultiDrag);S(document,"touchend",this._deselectMultiDrag);S(document,"keydown",this._checkKeyDown);S(document,"keyup",this._checkKeyUp)},_deselectMultiDrag(t){if(typeof Ls!=="undefined"&&Ls)return;if(Fs!==this.sortable)return;if(t&&T(t.target,this.options.draggable,this.sortable.el,false))return;if(t&&t.button!==0)return;while(Os.length){let s=Os[0];D(s,this.options.selectedClass,false);Os.shift();nt({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:s,originalEvent:t})}},_checkKeyDown(t){if(t.key===this.options.multiDragKey){this.multiDragKeyDown=true}},_checkKeyUp(t){if(t.key===this.options.multiDragKey){this.multiDragKeyDown=false}}};return m(t,{pluginName:"multiDrag",utils:{select(t){let s=t.parentNode[Q];if(!s||!s.options.multiDrag||~Os.indexOf(t))return;if(Fs&&Fs!==s){Fs.multiDrag._deselectMultiDrag();Fs=s}D(t,s.options.selectedClass,true);Os.push(t)},deselect(t){let s=t.parentNode[Q],e=Os.indexOf(t);if(!s||!s.options.multiDrag||!~e)return;D(t,s.options.selectedClass,false);Os.splice(e,1)}},eventProperties(){const t=[],s=[];Os.forEach((e=>{t.push({multiDragElement:e,index:e.sortableIndex});let i;if(Ws&&e!==Gs){i=-1}else if(Ws){i=H(e,":not(."+this.options.selectedClass+")")}else{i=H(e)}s.push({multiDragElement:e,index:i})}));return{items:[...Os],clones:[...As],oldIndicies:t,newIndicies:s}},optionListeners:{multiDragKey(t){t=t.toLowerCase();if(t==="ctrl"){t="Control"}else if(t.length>1){t=t.charAt(0).toUpperCase()+t.substr(1)}return t}}})}function Rs(t,s){Os.forEach(((e,i)=>{let r=s.children[e.sortableIndex+(t?Number(i):0)];if(r){s.insertBefore(e,r)}else{s.appendChild(e)}}))}function Us(t,s){As.forEach(((e,i)=>{let r=s.children[e.sortableIndex+(t?Number(i):0)];if(r){s.insertBefore(e,r)}else{s.appendChild(e)}}))}function Bs(){Os.forEach((t=>{if(t===Gs)return;t.parentNode&&t.parentNode.removeChild(t)}))}ss.mount(new ys);ss.mount(Ms,Is);ss.mount(new Cs);ss.mount(new js);const Ks='.sc-stzh-sortable-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-sortable-h{display:none}.sc-stzh-sortable-h::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-sortable-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-sortable-h *.sc-stzh-sortable,.sc-stzh-sortable-h *.sc-stzh-sortable::before,.sc-stzh-sortable-h *.sc-stzh-sortable::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-sortable-h .has-focus.sc-stzh-sortable{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-sortable-h .stzh-fylingfocus-focused.sc-stzh-sortable{outline-style:none !important}.sc-stzh-sortable-h .stzh-fylingfocus-focused.sc-stzh-sortable::-moz-focus-inner{border:0 !important}.sc-stzh-sortable-h{--cursor:grab;--grabbing-cursor:grabbing;--unselected-item-opacity:0.6;--ghost-item-background:var(--stzh-color-grey30);--ghost-item-box-shadow:none}[disabled].sc-stzh-sortable-h{--cursor:inherit}.sc-stzh-sortable-h[disabled] .sc-stzh-sortable-s *.is-sortable-item{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.sc-stzh-sortable-h .sc-stzh-sortable-s *.is-sortable-item{position:relative;transition:opacity var(--stzh-base-transition-animation-speed);-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:var(--cursor)}.sc-stzh-sortable-h .sc-stzh-sortable-s *.is-sortable-item.is-drag,.sc-stzh-sortable-h .sc-stzh-sortable-s *.is-sortable-item.is-chosen,.sc-stzh-sortable-h .sc-stzh-sortable-s *.is-sortable-item.is-ghost,.sc-stzh-sortable-h .sc-stzh-sortable-s *.is-sortable-item.is-selected{cursor:var(--grabbing-cursor)}.sc-stzh-sortable-h .sc-stzh-sortable-s *.is-sortable-item.is-drag{opacity:1 !important}.sc-stzh-sortable-h .sc-stzh-sortable-s *.is-sortable-item.is-ghost{z-index:0}.sc-stzh-sortable-h .sc-stzh-sortable-s *.is-sortable-item.is-ghost::after{z-index:99;content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:var(--ghost-item-background);box-shadow:var(--ghost-item-box-shadow)}.sc-stzh-sortable-h .sc-stzh-sortable-s>*.has-item-selected>*.is-sortable-item{opacity:var(--unselected-item-opacity)}.sc-stzh-sortable-h .sc-stzh-sortable-s>*.has-item-selected>*.is-sortable-item.is-selected{opacity:1}.stzh-sortable__description.sc-stzh-sortable,.stzh-sortable__aria-live.sc-stzh-sortable{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}';const Xs="is-sortable-item";const Ys="is-ghost";const Vs="is-selected";const Js="is-chosen";const Zs="is-drag";const qs="has-item-selected";let Qs=0;const te=class{constructor(e){t(this,e);this.stzhUpdate=s(this,"stzhUpdate",7);this.stzhDisable=s(this,"stzhDisable",7);this.selectedItem=null;this.resetItemOnBlur=false;this.init=()=>{if(!this.getContainer()||this.disabled){return}this.setAttributes()};this.updated=async t=>{let s;let e;let i;if(t){s=t.newIndex;e=t.oldIndex;i=t.item}else{s=this.getIndexOfSelectedItem();e=this.lastIndex;i=this.selectedItem}if(s!==e){this.stzhUpdate.emit({component:"stzh-sortable",data:await this.toArray(),item:i,newIndex:s,oldIndex:e})}};this.onKeydown=t=>{const s=t.currentTarget;const e=t.target;if(!this.getContainer()||this.disabled||s!==e){return}if(t.key===" "){t.preventDefault();if(!this.selectedItem){this.selectedItem=s;this.selectedItem.parentElement.classList.add(qs);this.selectedItem.classList.add(Vs);this.lastIndex=this.getIndexOfSelectedItem();this.resetItemOnBlur=true;this.updateAriaLive(this.localization.started)}else{this.resetItemOnBlur=false;this.updateAriaLive(this.localization.dropped);this.updated();this.resetActiveItem()}}else if(t.key==="Tab"&&this.selectedItem&&this.selectedItem===t.currentTarget){t.preventDefault()}else if(t.key==="Escape"&&this.selectedItem){this.resetItemOnBlur=false;this.updateAriaLive(this.localization.canceled);this.resetActiveItem(true)}else if(t.key==="ArrowUp"){t.preventDefault();if(this.selectedItem){this.moveItem(this.selectedItem,"up")}else{this.focusItem(s.previousElementSibling)}}else if(t.key==="ArrowDown"){t.preventDefault();if(this.selectedItem){this.moveItem(this.selectedItem,"down")}else{this.focusItem(s.nextElementSibling)}}};this.onBlur=()=>{if(this.resetItemOnBlur){this.resetItemOnBlur=false;this.updateAriaLive(this.localization.dropped);this.updated();this.resetActiveItem()}};this.localization=undefined;this.disabled=false;this.dataIdAttribute="data-id";this.container=()=>{var t;return(t=this.containerElement)===null||t===void 0?void 0:t.firstElementChild};this.ghostClone=t=>t.cloneNode(true);this.filterElements=["[data-stzh-sortable-filtered]","[sortable-disabled]","button","a[href]","input","select","textarea","label","iframe","details","area","stzh-sortable"]}async toArray(){return this.sortable.toArray()}async sort(t,s=true){return this.sortable.sort(t,s)}async moveItem(t,s){var e;if(!t||!t.nextElementSibling&&s==="down"||!t.previousElementSibling&&s==="up"){return}this.resetItemOnBlur=false;if(s==="up"){t.previousElementSibling.before(t)}else if(s==="down"){t.nextElementSibling.after(t)}this.updateAriaLive(this.localization.moved,t);this.focusItem(t);const i=Array.from((e=t.parentElement)===null||e===void 0?void 0:e.children).indexOf(t);this.stzhUpdate.emit({component:"stzh-sortable",data:await this.toArray(),item:t,newIndex:i,oldIndex:i+(s==="up"?1:-1)});this.resetItemOnBlur=true}disabledWatcher(t){if(t){this.setAttributes()}else{this.unsetAttributes()}this.stzhDisable.emit({component:"stzh-sortable",disabled:t})}filterElementsWatcher(t){if(typeof t==="string"){this._filterElements=JSON.parse(t)}else{this._filterElements=t}}getContainer(){return typeof this.container==="function"?this.container():this.container}updateAriaLive(t,s=this.selectedItem){if(!this.getContainer()){return}if(s){const e=s.getAttribute("aria-label")||"";const i=this.getIndexOfSelectedItem(s);t=t.replace("{title}",e).replace("{current}",(i+1).toString())}const e=this.getContainer().children.length;t=t.replace(/\{total\}/gi,e.toString());this.ariaLiveElement.textContent=t}getIndexOfSelectedItem(t=this.selectedItem){if(t){return Array.from(t.parentElement.children).indexOf(t)}}resetActiveItem(t=false){if(!this.selectedItem){return}const s=this.getIndexOfSelectedItem();const e=this.selectedItem.parentElement;if(t&&this.lastIndex!==s){if(this.lastIndex>s){e.children[this.lastIndex].after(this.selectedItem)}else{e.children[this.lastIndex].before(this.selectedItem)}this.selectedItem.focus()}e.classList.remove(qs);this.selectedItem.classList.remove(Vs);this.selectedItem=null;this.lastIndex=null}focusItem(t){if(!t){return}t.focus();const s=document.querySelector("stzh-flyingfocus");if(s){s.reposition()}z(t,{scrollMode:"if-needed",block:"nearest",inline:"nearest"})}setAttributes(){var t;Array.from((t=this.getContainer())===null||t===void 0?void 0:t.children).forEach((t=>{t.classList.add(Xs);t.addEventListener("blur",this.onBlur);t.addEventListener("keydown",this.onKeydown);t.setAttribute("tabindex","0");t.setAttribute("aria-describedby",`${this.sortableId}-description`)}))}unsetAttributes(){var t;Array.from((t=this.getContainer())===null||t===void 0?void 0:t.children).forEach((t=>{t.classList.remove(Xs);t.removeEventListener("blur",this.onBlur);t.removeEventListener("keydown",this.onKeydown);t.removeAttribute("tabindex");t.removeAttribute("aria-describedby")}))}async componentWillLoad(){this.sortableId=`stzh-sortable-${Qs++}`;this.filterElementsWatcher(this.filterElements);if(!this.localization){this.localization=await window.stzhComponents.utils.fetchTranslations(this.element,"sortable")}}componentWillUpdate(){if(this.sortable){this.sortable.destroy();this.sortable=null}}componentDidRender(){if(this.sortable){return}this.sortable=new ss(this.getContainer(),{animation:150,filter:this._filterElements.join(", "),ghostClass:Ys,chosenClass:Js,dragClass:Zs,dataIdAttr:this.dataIdAttribute,preventOnFilter:false,forceFallback:true,delay:200,delayOnTouchOnly:true,disabled:this.disabled,ghostClone:this.ghostClone,onUpdate:this.updated})}connectedCallback(){this.init();this.observer=new MutationObserver(this.init);this.observer.observe(this.element,{childList:true,subtree:true})}disconnectedCallback(){if(this.observer){this.observer.disconnect()}this.unsetAttributes();if(this.sortable){this.sortable.destroy();this.sortable=null}}render(){const t={"stzh-sortable":true,"stzh-sortable--disabled":this.disabled};return e(i,null,e("div",{class:t},e("div",{id:`${this.sortableId}-description`,class:"stzh-sortable__description"},this.localization.description),e("div",{ref:t=>this.ariaLiveElement=t,"aria-live":"assertive",class:"stzh-sortable__aria-live"}),e("div",{ref:t=>this.containerElement=t,class:"stzh-sortable__container"},e("slot",null))))}get element(){return r(this)}static get watchers(){return{disabled:["disabledWatcher"],filterElements:["filterElementsWatcher"]}}};te.style=Ks;export{n as stzh_cardlist,te as stzh_sortable};
|
|
8
|
+
//# sourceMappingURL=p-4e2db8e9.entry.js.map
|