@etus/design-system 2.0.1 → 2.0.3
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/lib/Accordion.css +1 -0
- package/lib/ActionCard.css +1 -0
- package/lib/Alert.css +1 -0
- package/lib/AutoComplete.css +1 -0
- package/lib/Badge.css +1 -0
- package/lib/Breadcrumb.css +1 -0
- package/lib/Button.css +1 -0
- package/lib/Calendar.css +1 -0
- package/lib/Carousel.css +1 -0
- package/lib/Checkbox.css +1 -0
- package/lib/Crop.css +1 -0
- package/lib/DatePicker.css +1 -0
- package/lib/Dropdown.css +1 -1
- package/lib/FileUpload.css +1 -0
- package/lib/Filter.css +1 -0
- package/lib/History.css +1 -0
- package/lib/IconCard.css +1 -0
- package/lib/Image.css +1 -0
- package/lib/MetricCard.css +1 -0
- package/lib/Navbar.css +1 -0
- package/lib/Pagination.css +1 -0
- package/lib/Profile.css +1 -0
- package/lib/ProgressBar.css +1 -0
- package/lib/Radio.css +1 -0
- package/lib/RichTextEditor.css +1 -0
- package/lib/RoundMenu.css +1 -0
- package/lib/Select.css +1 -0
- package/lib/Sidebar.css +1 -0
- package/lib/StatusBadge.css +1 -0
- package/lib/Stepper.css +1 -1
- package/lib/Switch.css +1 -0
- package/lib/Tab.css +1 -0
- package/lib/Table.css +1 -0
- package/lib/TagInput.css +1 -0
- package/lib/TagSelect.css +1 -0
- package/lib/Toggle.css +1 -0
- package/lib/Tree.css +1 -0
- package/lib/assets/Accordion-BFrTxcI9.css +1 -0
- package/lib/assets/Accordion-BLDionAq.js +1 -0
- package/lib/assets/Accordion-CgoVX19v.js +1 -0
- package/lib/assets/ActionCard-BWmyJT_9.js +1 -0
- package/lib/assets/ActionCard-BZb91dIW.css +1 -0
- package/lib/assets/ActionCard-Dnm8wc-V.js +1 -0
- package/lib/assets/Alert-D-09BScY.js +1 -0
- package/lib/assets/Alert-DduoTaDO.css +1 -0
- package/lib/assets/Alert-VaDDaJmV.js +1 -0
- package/lib/assets/AutoComplete-0HbU6b9V.js +1 -0
- package/lib/assets/AutoComplete-C0EjtIQ-.js +1 -0
- package/lib/assets/AutoComplete-DHFGDgEQ.css +1 -0
- package/lib/assets/Badge-GYjsY_3C.css +1 -0
- package/lib/assets/Badge-Te4ff3ej.js +1 -0
- package/lib/assets/Badge-xSUPZkRF.js +1 -0
- package/lib/assets/Breadcrumb-CUVLzPPD.js +1 -0
- package/lib/assets/Breadcrumb-DbGhoBPp.js +1 -0
- package/lib/assets/Breadcrumb-zzZevNgV.css +1 -0
- package/lib/assets/Button-1lnlGEU9.js +1 -0
- package/lib/assets/Button-CrBBrgy5.css +1 -0
- package/lib/assets/Button-PxUMi4c4.js +1 -0
- package/lib/assets/Calendar-CI3EoS57.js +1 -0
- package/lib/assets/Calendar-E1QPtZO1.js +1 -0
- package/lib/assets/Calendar-gS7wEU5v.css +1 -0
- package/lib/assets/Carousel-Cne2rOoP.js +1 -0
- package/lib/assets/Carousel-Dvr9ATv2.css +1 -0
- package/lib/assets/Carousel-iZhiqHr1.js +1 -0
- package/lib/assets/Checkbox-2PgbPjFv.js +1 -0
- package/lib/assets/Checkbox-Cj_gicnB.css +1 -0
- package/lib/assets/Checkbox-yFotY5Bn.js +1 -0
- package/lib/assets/ColorPicker-BsrGOt2x.js +1 -0
- package/lib/assets/ColorPicker-C8kkPONG.js +1 -0
- package/lib/assets/Confirm-D5SQRnzs.js +1 -0
- package/lib/assets/Confirm-D9ue91JY.js +1 -0
- package/lib/assets/Crop-COi25GCt.js +1 -0
- package/lib/assets/Crop-DXU8IEzK.js +1 -0
- package/lib/assets/Crop-WBOMB0XF.css +1 -0
- package/lib/assets/DatePicker-BqHgn0jP.js +1 -0
- package/lib/assets/DatePicker-Cv2SfuC2.css +1 -0
- package/lib/assets/DatePicker-DBb7Pq4-.js +1 -0
- package/lib/assets/DesignSystemProvider-DPbBh8_F.js +1 -0
- package/lib/assets/DesignSystemProvider-EOq0hjf5.js +1 -0
- package/lib/assets/Dialog-TzFU7H7M.js +1 -0
- package/lib/assets/Dialog-lFnC79hF.js +1 -0
- package/lib/assets/Drawer-BRhAt1cp.js +1 -0
- package/lib/assets/Drawer-BShyg2Md.js +1 -0
- package/lib/assets/Dropdown-BeObPypj.css +1 -0
- package/lib/assets/Dropdown-DOmq6yld.js +1 -0
- package/lib/assets/Dropdown-Di_QSp14.js +1 -0
- package/lib/assets/ExpandableContainer-BRU7oRQZ.js +1 -0
- package/lib/assets/ExpandableContainer-T1N4IU4P.js +1 -0
- package/lib/assets/FileUpload-BLhvkuKS.js +1 -0
- package/lib/assets/FileUpload-Bn2hN30U.css +1 -0
- package/lib/assets/FileUpload-Cc6WNrgH.js +1 -0
- package/lib/assets/Filter-BpZb369c.js +1 -0
- package/lib/assets/Filter-Deq8WR7s.css +1 -0
- package/lib/assets/Filter-QMWutHly.js +1 -0
- package/lib/assets/FloatCard-CpyZ6Sv2.js +1 -0
- package/lib/assets/FloatCard-hzT_yVsi.js +1 -0
- package/lib/assets/History-B8JQmONY.js +1 -0
- package/lib/assets/History-BBHRpFWw.js +1 -0
- package/lib/assets/History-DqZMdgvF.css +1 -0
- package/lib/assets/IconCard-BlV7E9dX.css +1 -0
- package/lib/assets/IconCard-CP-P2jyn.js +1 -0
- package/lib/assets/IconCard-DkDRKG8a.js +1 -0
- package/lib/assets/Image-CkMVrVxf.js +1 -0
- package/lib/assets/Image-CoinvfQ-.js +1 -0
- package/lib/assets/Image-DT7JkEC_.css +1 -0
- package/lib/assets/Input-C0RH5m66.js +1 -0
- package/lib/assets/Input-DZ17y4L_.js +1 -0
- package/lib/assets/Label-AiZCfFq1.js +1 -0
- package/lib/assets/Label-DhQPcDeH.js +1 -0
- package/lib/assets/MetricCard-BKni_xcO.js +1 -0
- package/lib/assets/MetricCard-Dkv9xWP4.css +1 -0
- package/lib/assets/MetricCard-Du95xvGv.js +1 -0
- package/lib/assets/Navbar-Ba75bp5L.css +1 -0
- package/lib/assets/Navbar-BaVZCyqJ.js +1 -0
- package/lib/assets/Navbar-DXhNGOsj.js +1 -0
- package/lib/assets/Option-B-lvFxi7.js +1 -0
- package/lib/assets/Option-C3L7jFYC.js +1 -0
- package/lib/assets/Overlay-D0w6z3ie.js +1 -0
- package/lib/assets/Overlay-D_ULC3j5.js +1 -0
- package/lib/assets/PINInput-Bh9Jd3rB.js +1 -0
- package/lib/assets/PINInput-DymwFX1G.js +1 -0
- package/lib/assets/Pagination-B5AR5_SP.js +1 -0
- package/lib/assets/Pagination-BeKkkgRb.css +1 -0
- package/lib/assets/Pagination-CbOpAka-.js +1 -0
- package/lib/assets/Profile-Bww3-jQ7.js +1 -0
- package/lib/assets/Profile-CV7wdM8h.css +1 -0
- package/lib/assets/Profile-Z0DOVCs2.js +1 -0
- package/lib/assets/ProgressBar-ClBOwZKj.css +1 -0
- package/lib/assets/ProgressBar-OifG1zbb.js +1 -0
- package/lib/assets/ProgressBar-_D7Nifw6.js +1 -0
- package/lib/assets/Radio-BmQ4hiBf.js +1 -0
- package/lib/assets/Radio-DFcsNAYE.css +1 -0
- package/lib/assets/Radio-HxZNKwDn.js +1 -0
- package/lib/assets/RichTextEditor-DR1hYKQF.js +1 -0
- package/lib/assets/RichTextEditor-L3swXum0.js +1 -0
- package/lib/assets/RichTextEditor-ZfE5A8C0.css +1 -0
- package/lib/assets/RoundMenu-BSoV9q6V.js +1 -0
- package/lib/assets/RoundMenu-CgxYetqt.js +1 -0
- package/lib/assets/RoundMenu-llkS0uLX.css +1 -0
- package/lib/assets/Select-B7JnRTcc.js +1 -0
- package/lib/assets/Select-Bqw3ZPOg.js +1 -0
- package/lib/assets/Select-Czly_-sH.css +1 -0
- package/lib/assets/SelectContainer-BRSv1LpP.js +1 -0
- package/lib/assets/SelectContainer-HFSZpyH5.js +1 -0
- package/lib/assets/SelectContent-CXvWzOVg.js +1 -0
- package/lib/assets/SelectContent-SGkP4IfD.js +1 -0
- package/lib/assets/Sidebar-Br7HMLj5.js +1 -0
- package/lib/assets/Sidebar-CBg_ZIzm.js +1 -0
- package/lib/assets/Sidebar-CJmPvQ0E.css +1 -0
- package/lib/assets/Slider-C1q6E2k3.js +1 -0
- package/lib/assets/Slider-CcOR39o6.js +1 -0
- package/lib/assets/StatusBadge-1hF5CQM2.js +1 -0
- package/lib/assets/StatusBadge-DxIUZ75l.css +1 -0
- package/lib/assets/StatusBadge-bK6dJmfs.js +1 -0
- package/lib/assets/Stepper-C6YCuF1p.js +1 -0
- package/lib/assets/Stepper-C8kEYcc4.js +1 -0
- package/lib/assets/Stepper-e-nPkc4n.css +1 -0
- package/lib/assets/Switch-BbmBI4t-.css +1 -0
- package/lib/assets/Switch-DfaIhPgH.js +1 -0
- package/lib/assets/Switch-MRgqLSwE.js +1 -0
- package/lib/assets/Tab-2xegrzwU.js +1 -0
- package/lib/assets/Tab-BWTafykp.css +1 -0
- package/lib/assets/Tab-r87Om7ti.js +1 -0
- package/lib/assets/Table-B8ifx_k_.js +1 -0
- package/lib/assets/Table-Bb_pB7xr.css +1 -0
- package/lib/assets/Table-BrRdo0rx.js +1 -0
- package/lib/assets/TagInput-B4odE2Wm.js +1 -0
- package/lib/assets/TagInput-CuDUKx0K.js +1 -0
- package/lib/assets/TagInput-D2zgaR5F.css +1 -0
- package/lib/assets/TagSelect-BFudFHoc.css +1 -0
- package/lib/assets/TagSelect-DQbDaMr-.js +1 -0
- package/lib/assets/TagSelect-DvtjzgB6.js +1 -0
- package/lib/assets/Textarea-BtSNZ8Gp.js +1 -0
- package/lib/assets/Textarea-CDPRSwRY.js +1 -0
- package/lib/assets/Toast-BP80UdpJ.js +1 -0
- package/lib/assets/Toast-CY1qe4HT.js +1 -0
- package/lib/assets/Toggle-BGajQcLP.js +1 -0
- package/lib/assets/Toggle-D51xo3o6.css +1 -0
- package/lib/assets/Toggle-ftaewjeK.js +1 -0
- package/lib/assets/Tooltip-DVq7Ij0P.js +1 -0
- package/lib/assets/Tooltip-chSVIpvZ.js +1 -0
- package/lib/assets/Tree-BU5IfND5.css +1 -0
- package/lib/assets/Tree-BWFRKUwY.js +1 -0
- package/lib/assets/Tree-BbVjt78W.js +1 -0
- package/lib/assets/index-B4fH-h2h.js +4 -0
- package/lib/assets/index-B86NDK_5.css +1 -0
- package/lib/assets/index-BmQ-r8Ut.css +1 -0
- package/lib/assets/index-C-RplXeX.js +4 -0
- package/lib/assets/index-DTN8b1mo.css +1 -0
- package/lib/assets/index-DVIEtHZd.css +1 -0
- package/lib/assets/index-ZXHbiWno.css +1 -0
- package/lib/assets/jsx-runtime-BubrbI3X.js +1 -0
- package/lib/assets/jsx-runtime-u17CrQMm.js +1 -0
- package/lib/components/Accordion/index.cjs.js +1 -1
- package/lib/components/Accordion/index.es.js +1 -1
- package/lib/components/ActionCard/index.cjs.js +1 -1
- package/lib/components/ActionCard/index.es.js +1 -1
- package/lib/components/Alert/index.cjs.js +1 -1
- package/lib/components/Alert/index.es.js +1 -1
- package/lib/components/AutoComplete/index.cjs.js +1 -1
- package/lib/components/AutoComplete/index.es.js +1 -1
- package/lib/components/Avatar/index.cjs.js +1 -1
- package/lib/components/Avatar/index.es.js +1 -1
- package/lib/components/Badge/index.cjs.js +1 -1
- package/lib/components/Badge/index.es.js +1 -1
- package/lib/components/Breadcrumb/index.cjs.js +1 -1
- package/lib/components/Breadcrumb/index.es.js +1 -1
- package/lib/components/Button/index.cjs.js +1 -1
- package/lib/components/Button/index.es.js +1 -1
- package/lib/components/Calendar/index.cjs.js +1 -1
- package/lib/components/Calendar/index.es.js +1 -1
- package/lib/components/Card/index.cjs.js +1 -1
- package/lib/components/Card/index.es.js +1 -1
- package/lib/components/Carousel/index.cjs.js +1 -1
- package/lib/components/Carousel/index.es.js +1 -1
- package/lib/components/Checkbox/index.cjs.js +1 -1
- package/lib/components/Checkbox/index.es.js +1 -1
- package/lib/components/ColorPicker/index.cjs.js +1 -1
- package/lib/components/ColorPicker/index.es.js +1 -1
- package/lib/components/Confirm/index.cjs.js +1 -1
- package/lib/components/Confirm/index.es.js +1 -1
- package/lib/components/Connector/index.cjs.js +1 -1
- package/lib/components/Connector/index.es.js +1 -1
- package/lib/components/Crop/index.cjs.js +1 -1
- package/lib/components/Crop/index.es.js +1 -1
- package/lib/components/DatePicker/index.cjs.js +1 -1
- package/lib/components/DatePicker/index.es.js +1 -1
- package/lib/components/Dialog/index.cjs.js +1 -1
- package/lib/components/Dialog/index.es.js +1 -1
- package/lib/components/Drawer/index.cjs.js +1 -1
- package/lib/components/Drawer/index.es.js +1 -1
- package/lib/components/Dropdown/index.cjs.js +1 -1
- package/lib/components/Dropdown/index.es.js +1 -1
- package/lib/components/FileUpload/index.cjs.js +1 -1
- package/lib/components/FileUpload/index.es.js +1 -1
- package/lib/components/Filter/index.cjs.js +1 -1
- package/lib/components/Filter/index.es.js +1 -1
- package/lib/components/FloatCard/index.cjs.js +1 -1
- package/lib/components/FloatCard/index.es.js +1 -1
- package/lib/components/History/index.cjs.js +1 -1
- package/lib/components/History/index.es.js +1 -1
- package/lib/components/Icon/index.cjs.js +1 -1
- package/lib/components/Icon/index.es.js +1 -1
- package/lib/components/IconCard/index.cjs.js +1 -1
- package/lib/components/IconCard/index.es.js +1 -1
- package/lib/components/Image/index.cjs.js +1 -1
- package/lib/components/Image/index.es.js +1 -1
- package/lib/components/Input/index.cjs.js +1 -1
- package/lib/components/Input/index.es.js +1 -1
- package/lib/components/MetricCard/index.cjs.js +1 -1
- package/lib/components/MetricCard/index.es.js +1 -1
- package/lib/components/Navbar/index.cjs.js +1 -1
- package/lib/components/Navbar/index.es.js +1 -1
- package/lib/components/PINInput/index.cjs.js +1 -1
- package/lib/components/PINInput/index.es.js +1 -1
- package/lib/components/Pagination/index.cjs.js +1 -1
- package/lib/components/Pagination/index.es.js +1 -1
- package/lib/components/Profile/index.cjs.js +1 -1
- package/lib/components/Profile/index.es.js +1 -1
- package/lib/components/ProgressBar/index.cjs.js +1 -1
- package/lib/components/ProgressBar/index.es.js +1 -1
- package/lib/components/Radio/index.cjs.js +1 -1
- package/lib/components/Radio/index.es.js +1 -1
- package/lib/components/RadioGroup/index.cjs.js +1 -1
- package/lib/components/RadioGroup/index.es.js +1 -1
- package/lib/components/RichTextEditor/index.cjs.js +1 -1
- package/lib/components/RichTextEditor/index.es.js +1 -1
- package/lib/components/RoundMenu/index.cjs.js +1 -1
- package/lib/components/RoundMenu/index.es.js +1 -1
- package/lib/components/Select/index.cjs.js +1 -1
- package/lib/components/Select/index.es.js +1 -1
- package/lib/components/Separator/index.cjs.js +1 -1
- package/lib/components/Separator/index.es.js +1 -1
- package/lib/components/Sidebar/index.cjs.js +1 -1
- package/lib/components/Sidebar/index.es.js +1 -1
- package/lib/components/Skeleton/index.cjs.js +1 -1
- package/lib/components/Skeleton/index.es.js +1 -1
- package/lib/components/Slider/index.cjs.js +1 -1
- package/lib/components/Slider/index.es.js +1 -1
- package/lib/components/Spinner/index.cjs.js +1 -1
- package/lib/components/Spinner/index.es.js +1 -1
- package/lib/components/StatusBadge/index.cjs.js +1 -1
- package/lib/components/StatusBadge/index.es.js +1 -1
- package/lib/components/Stepper/index.cjs.js +1 -1
- package/lib/components/Stepper/index.es.js +1 -1
- package/lib/components/Switch/index.cjs.js +1 -1
- package/lib/components/Switch/index.es.js +1 -1
- package/lib/components/Tab/index.cjs.js +1 -1
- package/lib/components/Tab/index.es.js +1 -1
- package/lib/components/Table/index.cjs.js +1 -1
- package/lib/components/Table/index.es.js +1 -1
- package/lib/components/TagInput/index.cjs.js +1 -1
- package/lib/components/TagInput/index.es.js +1 -1
- package/lib/components/TagSelect/index.cjs.js +1 -1
- package/lib/components/TagSelect/index.es.js +1 -1
- package/lib/components/Textarea/index.cjs.js +1 -1
- package/lib/components/Textarea/index.es.js +1 -1
- package/lib/components/Toast/index.cjs.js +1 -1
- package/lib/components/Toast/index.es.js +1 -1
- package/lib/components/Toggle/index.cjs.js +1 -1
- package/lib/components/Toggle/index.es.js +1 -1
- package/lib/components/ToggleGroup/index.cjs.js +1 -1
- package/lib/components/ToggleGroup/index.es.js +1 -1
- package/lib/components/Tooltip/index.cjs.js +1 -1
- package/lib/components/Tooltip/index.es.js +1 -1
- package/lib/components/Tree/index.cjs.js +1 -1
- package/lib/components/Tree/index.es.js +1 -1
- package/lib/design-system.cjs.js +1 -1
- package/lib/design-system.es.js +1 -1
- package/lib/design-system.umd.js +3 -3
- package/lib/hooks/useClickOutside.cjs.js +1 -1
- package/lib/hooks/useClickOutside.es.js +1 -1
- package/lib/hooks/useControllable.es.js +1 -1
- package/lib/hooks/useTransition.es.js +1 -1
- package/lib/index2.css +1 -1
- package/lib/index3.css +1 -1
- package/lib/index4.css +1 -0
- package/lib/index5.css +1 -0
- package/lib/index6.css +1 -0
- package/lib/index7.css +1 -0
- package/lib/index8.css +1 -0
- package/lib/providers/index.cjs.js +1 -0
- package/lib/providers/index.es.js +1 -0
- package/package.json +2 -2
- package/lib/assets/ColorPicker-BzlgPz70.js +0 -1
- package/lib/assets/ColorPicker-DRs5fhzn.js +0 -1
- package/lib/assets/Confirm-BE6kYeL-.js +0 -1
- package/lib/assets/Confirm-Dh3P9z1Y.js +0 -1
- package/lib/assets/Dropdown-CBRpgE72.css +0 -1
- package/lib/assets/FloatCard-BGxNbGZp.js +0 -1
- package/lib/assets/FloatCard-Ci8mP8y4.js +0 -1
- package/lib/assets/Input-BRokEqU3.js +0 -1
- package/lib/assets/Input-xnq3TVKa.js +0 -1
- package/lib/assets/Label-BTtohMHb.js +0 -1
- package/lib/assets/Label-bwrT7VIV.js +0 -1
- package/lib/assets/PINInput-deYOmkvM.js +0 -1
- package/lib/assets/PINInput-sc5bHYA7.js +0 -1
- package/lib/assets/RichTextEditor-BorOBshN.js +0 -1
- package/lib/assets/RichTextEditor-kBX-T9zz.js +0 -1
- package/lib/assets/Sidebar-0DxOZadF.js +0 -1
- package/lib/assets/Sidebar-CPpl8WM2.js +0 -1
- package/lib/assets/Slider-DManJgem.js +0 -1
- package/lib/assets/Slider-DPMaQG2C.js +0 -1
- package/lib/assets/Stepper-BKI03jce.css +0 -1
- package/lib/assets/Textarea-CFobhecb.js +0 -1
- package/lib/assets/Textarea-foQgQnsz.js +0 -1
- package/lib/assets/Toast-DIAVNK5L.js +0 -1
- package/lib/assets/Toast-w4v5o8DT.js +0 -1
- package/lib/assets/Tooltip-DbBhUsGz.js +0 -1
- package/lib/assets/Tooltip-Diruxnme.js +0 -1
- package/lib/assets/Tree-BbX0rS-d.js +0 -1
- package/lib/assets/Tree-DNsiZzdg.js +0 -1
- package/lib/assets/colors-C7f-Usn5.css +0 -1
- package/lib/assets/index-B_deyTVk.js +0 -1
- package/lib/assets/index-CX6wEu92.js +0 -1
- package/lib/colors.css +0 -1
- /package/lib/{Container.css → ExpandableContainer.css} +0 -0
- /package/lib/assets/{Container-BsNA9KWk.css → ExpandableContainer-BsNA9KWk.css} +0 -0
package/lib/design-system.umd.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(te,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],u):(te=typeof globalThis<"u"?globalThis:te||self,u(te.DesignSystem={},te.React,te.ReactDOM))})(this,(function(te,u,jt){"use strict";var Lt={exports:{}},wt={};var _n;function $s(){if(_n)return wt;_n=1;var t=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function n(o,a,r){var l=null;if(r!==void 0&&(l=""+r),a.key!==void 0&&(l=""+a.key),"key"in a){r={};for(var i in a)i!=="key"&&(r[i]=a[i])}else r=a;return a=r.ref,{$$typeof:t,type:o,key:l,ref:a!==void 0?a:null,props:r}}return wt.Fragment=s,wt.jsx=n,wt.jsxs=n,wt}var Nt={};var gn;function Is(){return gn||(gn=1,process.env.NODE_ENV!=="production"&&(function(){function t(j){if(j==null)return null;if(typeof j=="function")return j.$$typeof===H?null:j.displayName||j.name||null;if(typeof j=="string")return j;switch(j){case h:return"Fragment";case _:return"Profiler";case y:return"StrictMode";case R:return"Suspense";case k:return"SuspenseList";case V:return"Activity"}if(typeof j=="object")switch(typeof j.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),j.$$typeof){case x:return"Portal";case $:return j.displayName||"Context";case C:return(j._context.displayName||"Context")+".Consumer";case B:var U=j.render;return j=j.displayName,j||(j=U.displayName||U.name||"",j=j!==""?"ForwardRef("+j+")":"ForwardRef"),j;case w:return U=j.displayName||null,U!==null?U:t(j.type)||"Memo";case D:U=j._payload,j=j._init;try{return t(j(U))}catch{}}return null}function s(j){return""+j}function n(j){try{s(j);var U=!1}catch{U=!0}if(U){U=console;var I=U.error,O=typeof Symbol=="function"&&Symbol.toStringTag&&j[Symbol.toStringTag]||j.constructor.name||"Object";return I.call(U,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",O),s(j)}}function o(j){if(j===h)return"<>";if(typeof j=="object"&&j!==null&&j.$$typeof===D)return"<...>";try{var U=t(j);return U?"<"+U+">":"<...>"}catch{return"<...>"}}function a(){var j=L.A;return j===null?null:j.getOwner()}function r(){return Error("react-stack-top-frame")}function l(j){if(E.call(j,"key")){var U=Object.getOwnPropertyDescriptor(j,"key").get;if(U&&U.isReactWarning)return!1}return j.key!==void 0}function i(j,U){function I(){K||(K=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",U))}I.isReactWarning=!0,Object.defineProperty(j,"key",{get:I,configurable:!0})}function c(){var j=t(this.type);return Z[j]||(Z[j]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),j=this.props.ref,j!==void 0?j:null}function d(j,U,I,O,re,be){var ee=I.ref;return j={$$typeof:v,type:j,key:U,props:I,_owner:O},(ee!==void 0?ee:null)!==null?Object.defineProperty(j,"ref",{enumerable:!1,get:c}):Object.defineProperty(j,"ref",{enumerable:!1,value:null}),j._store={},Object.defineProperty(j._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(j,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(j,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:re}),Object.defineProperty(j,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:be}),Object.freeze&&(Object.freeze(j.props),Object.freeze(j)),j}function f(j,U,I,O,re,be){var ee=U.children;if(ee!==void 0)if(O)if(T(ee)){for(O=0;O<ee.length;O++)p(ee[O]);Object.freeze&&Object.freeze(ee)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(ee);if(E.call(U,"key")){ee=t(j);var me=Object.keys(U).filter(function(Se){return Se!=="key"});O=0<me.length?"{key: someKey, "+me.join(": ..., ")+": ...}":"{key: someKey}",ie[ee+O]||(me=0<me.length?"{"+me.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
2
|
let props = %s;
|
|
3
3
|
<%s {...props} />
|
|
4
4
|
React keys must be passed directly to JSX without using spread:
|
|
5
5
|
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,O,ne,de,ne),ie[ne+O]=!0)}if(ne=null,I!==void 0&&(n(I),ne=""+I),l(U)&&(n(U.key),ne=""+U.key),"key"in U){I={};for(var ue in U)ue!=="key"&&(I[ue]=U[ue])}else I=U;return ne&&i(I,typeof j=="function"?j.displayName||j.name||"Unknown":j),d(j,ne,I,a(),le,Ce)}function p(j){m(j)?j._store&&(j._store.validated=1):typeof j=="object"&&j!==null&&j.$$typeof===H&&(j._payload.status==="fulfilled"?m(j._payload.value)&&j._payload.value._store&&(j._payload.value._store.validated=1):j._store&&(j._store.validated=1))}function m(j){return typeof j=="object"&&j!==null&&j.$$typeof===b}var x=c,b=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),T=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),z=Symbol.for("react.client.reference"),B=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,E=Object.prototype.hasOwnProperty,A=Array.isArray,V=console.createTask?console.createTask:function(){return null};x={react_stack_bottom_frame:function(j){return j()}};var ee,J={},W=x.react_stack_bottom_frame.bind(x,o)(),te=V(r(o)),ie={};Nt.Fragment=h,Nt.jsx=function(j,U,I){var O=1e4>B.recentlyCreatedOwnerStacks++;return f(j,U,I,!1,O?Error("react-stack-top-frame"):W,O?V(r(j)):te)},Nt.jsxs=function(j,U,I){var O=1e4>B.recentlyCreatedOwnerStacks++;return f(j,U,I,!0,O?Error("react-stack-top-frame"):W,O?V(r(j)):te)}})()),Nt}var xn;function Ts(){return xn||(xn=1,process.env.NODE_ENV==="production"?Mt.exports=$s():Mt.exports=Is()),Mt.exports}var e=Ts();function bn(t){var s,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(s=0;s<a;s++)t[s]&&(n=bn(t[s]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function g(){for(var t,s,n=0,r="",a=arguments.length;n<a;n++)(t=arguments[n])&&(s=bn(t))&&(r&&(r+=" "),r+=s);return r}function pe(t){const{value:s,defaultValue:n,onChange:r}=t,a=s!==void 0,o=c.useRef(a),[l,i]=c.useState(n);return c.useEffect(()=>{if(process.env.NODE_ENV!=="production"){if(o.current!==a){const f=o.current?"controlled":"uncontrolled";console.warn(`[useControllable] Component switched from ${f} to ${a?"controlled":"uncontrolled"}. This is not recommended and may cause unexpected behavior.`)}o.current=a}}),[a?s:l,f=>{a||i(f),r?.(f)}]}const lt={accordion:"_accordion_1irbw_2",noShadow:"_noShadow_1irbw_2",header:"_header_1irbw_2",disabled:"_disabled_1irbw_2",headerText:"_headerText_1irbw_2",chevron:"_chevron_1irbw_2",expanded:"_expanded_1irbw_2",content:"_content_1irbw_2"};function re({name:t,filled:s=!1,className:n,style:r,onClick:a=()=>{}}){return e.jsx("span",{className:g("material-symbols-rounded","icon",s&&"filled",n),style:r,onClick:a,children:t})}function As({value:t,onChange:s,duration:n=300,noShadow:r=!1,disabled:a=!1,header:o,children:l,className:i}){const[u,d]=pe({value:t,defaultValue:!1,onChange:s}),f=Math.min(1e3,Math.max(150,n??300)),p=c.useRef(null),m=c.useRef(null),x=c.useRef(u);x.current=u,c.useLayoutEffect(()=>{!u&&m.current&&(m.current.style.maxHeight="0px")},[]);function b(){m.current&&(m.current.style.maxHeight=x.current?`${m.current.scrollHeight}px`:"0px")}c.useEffect(()=>{const h=p.current,C=m.current,_=new ResizeObserver(()=>b()),y=new MutationObserver(()=>b());return h&&_.observe(h,{box:"border-box"}),C&&(_.observe(C,{box:"border-box"}),y.observe(C,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-max-height"]})),()=>{_.disconnect(),y.disconnect()}},[]),c.useEffect(()=>{b()});function v(){a||d(!u)}return e.jsx("div",{className:g(lt.accordion,r&<.noShadow,i),children:e.jsxs("div",{ref:p,className:"w-full flex flex-col",children:[e.jsxs("div",{className:g(lt.header,a&<.disabled),onClick:v,children:[o&&e.jsx("span",{className:lt.headerText,children:o}),e.jsx(re,{className:g(lt.chevron,"material-symbols-rounded",u&<.expanded),name:"expand_more"})]}),e.jsx("div",{ref:m,className:lt.content,style:{transitionDuration:`${f}ms`},children:l})]})})}const Es={card:"_card_mycev_2"};function pt({children:t,className:s,style:n}={}){return e.jsx("div",{className:g(Es.card,s),style:n,children:t})}const Gt={actionCard:"_actionCard_1tvck_2",sideIcon:"_sideIcon_1tvck_2"};function Yt(t){return t instanceof TouchEvent?t.touches[0]:t}function vn({children:t}){return e.jsx("div",{className:"py-sm",children:t})}function Cn({icon:t="",color:s="",hideDrag:n=!1,children:r,className:a,onDragstart:o,onDragging:l,onDragend:i,onDelete:u}){const[d,f]=c.useState(!1),p=c.useRef(!1);p.current=d;const m=c.useCallback(_=>{p.current&&l?.(Yt(_))},[l]),x=c.useCallback(_=>{p.current&&(f(!1),p.current=!1,i?.(Yt(_)))},[i]);c.useEffect(()=>(window.addEventListener("mousemove",m),window.addEventListener("mouseup",x),window.addEventListener("touchmove",m),window.addEventListener("touchend",x),()=>{window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",x),window.removeEventListener("touchmove",m),window.removeEventListener("touchend",x)}),[m,x]);function b(_){const y=_.nativeEvent;f(!0),p.current=!0,o?.(Yt(y))}const v=[],h=[];c.Children.forEach(r,_=>{c.isValidElement(_)&&_.type===vn?v.push(_):h.push(_)});const C=v.length>0;return e.jsxs("div",{className:g(Gt.actionCard,a),children:[!n&&e.jsx("span",{className:g(Gt.sideIcon,d?"cursor-grabbing":"cursor-grab"),onMouseDown:b,onTouchStart:b,children:e.jsx(re,{name:"drag_indicator"})}),e.jsxs(pt,{className:"rounded-base [&>*]:px-xl",children:[e.jsxs("header",{className:g("flex items-center gap-xs bg-primary-interaction-default text-neutral-foreground-negative rounded-base py-sm",C&&"rounded-b-none"),style:{background:s||void 0},children:[t&&e.jsx(re,{name:t}),h]}),C&&v]}),e.jsx("span",{className:g(Gt.sideIcon,"cursor-pointer"),onClick:u,children:e.jsx(re,{name:"delete"})})]})}Cn.Card=vn;const Oe={alert:"_alert_1h5uu_2",itemsStart:"_itemsStart_1h5uu_2",itemsCenter:"_itemsCenter_1h5uu_2",contentWrapper:"_contentWrapper_1h5uu_2","items-start":"_items-start_1h5uu_2","items-center":"_items-center_1h5uu_2","items-end":"_items-end_1h5uu_2",body:"_body_1h5uu_2",textContent:"_textContent_1h5uu_2",small:"_small_1h5uu_2",title:"_title_1h5uu_2",message:"_message_1h5uu_2",typeIcon:"_typeIcon_1h5uu_2",medium:"_medium_1h5uu_2",large:"_large_1h5uu_2",info:"_info_1h5uu_2",success:"_success_1h5uu_2",warning:"_warning_1h5uu_2",danger:"_danger_1h5uu_2",neutral:"_neutral_1h5uu_2",actionIcon:"_actionIcon_1h5uu_2",expandToggle:"_expandToggle_1h5uu_2",rotated:"_rotated_1h5uu_2",clickable:"_clickable_1h5uu_2"};function Ls(t){switch(t){case"info":case"neutral":return"info";case"warning":case"danger":return"error";case"success":return"check_circle";default:return"info"}}function Xt({title:t,message:s="",type:n="info",size:r="medium",icon:a="",expandable:o=!1,closable:l=!1,hideIcon:i=!1,iconPosition:u="start",children:d,actions:f,onClose:p,className:m}){const[x,b]=c.useState(!1),v=c.useRef(null),h=c.useRef(null),C=c.useCallback(()=>{if(!h.current||!v.current)return;const y=getComputedStyle(v.current),T=parseInt(y.paddingTop),q=parseInt(y.paddingBottom);v.current.style.height=`${h.current.scrollHeight+T+q}px`,h.current.style.width="fit-content";const P=h.current.offsetWidth;v.current.style.width||v.current.offsetWidth!==P?h.current.style.width="100%":h.current.style.width=`${P}px`},[]);c.useEffect(()=>{const y=new ResizeObserver(C);return v.current&&y.observe(v.current,{box:"border-box"}),h.current&&y.observe(h.current,{box:"border-box"}),()=>y.disconnect()},[C]),c.useEffect(()=>{C()});const _=a||Ls(n);return e.jsxs("div",{ref:v,className:g(Oe.alert,Oe[n],Oe[r],o&&Oe.itemsStart,(!o||!x)&&Oe.itemsCenter,m),children:[e.jsxs("div",{ref:h,className:g(Oe.contentWrapper,Oe[`items-${u}`]),children:[!i&&e.jsx("div",{className:Oe.typeIcon,children:e.jsx(re,{name:_})}),e.jsx("div",{className:Oe.body,children:d||e.jsxs("div",{className:Oe.textContent,children:[t&&e.jsx("h6",{className:Oe.title,children:t}),(!o||x)&&s&&e.jsx("p",{className:Oe.message,children:s})]})})]}),f||e.jsxs("div",{className:g(Oe.typeIcon,Oe.actionIcon),children:[o&&e.jsx("div",{className:g(Oe.expandToggle,x&&Oe.rotated),onClick:()=>b(!x),children:e.jsx(re,{name:"expand_more"})}),l&&e.jsx(re,{name:"close",onClick:p,className:Oe.clickable})]})]})}Xt.Actions=function({children:s}){return e.jsx(e.Fragment,{children:s})};function Je(t,s){const[n,r]=c.useState(!1),[a,o]=c.useState(!1),l=c.useRef(null),i=c.useRef(null);return c.useEffect(()=>{if(t){r(!0);const u=requestAnimationFrame(()=>{const d=requestAnimationFrame(()=>{o(!0)});i.current=()=>cancelAnimationFrame(d)});return()=>{cancelAnimationFrame(u),i.current?.()}}else return o(!1),l.current=setTimeout(()=>{r(!1)},s.duration),()=>{l.current&&clearTimeout(l.current)}},[t,s.duration]),{isMounted:n,isActive:a}}const _t={tooltip:"_tooltip_ui48a_2",active:"_active_ui48a_2",tooltipTriangle:"_tooltipTriangle_ui48a_2",tooltipContent:"_tooltipContent_ui48a_2",right:"_right_ui48a_2",left:"_left_ui48a_2",top:"_top_ui48a_2",bottom:"_bottom_ui48a_2"};function yn({children:t}){return e.jsx(e.Fragment,{children:t})}function Ye({labelValue:t="",position:s="right",children:n,className:r,style:a}){let o=null;const l=[];c.Children.forEach(n,v=>{c.isValidElement(v)&&v.type===yn?o=v.props.children:l.push(v)});const i=o||t,[u,d]=c.useState(!1),f=c.useRef(null),p=c.useRef(null),{isMounted:m,isActive:x}=Je(u,{duration:500}),b=c.useCallback((v,h)=>{if(s==="left"||s==="right"){const _=s==="left"?v.left-h.offsetWidth-4:v.right+4;h.style.left=`${Math.max(0,_)}px`,h.style.top=`${v.top+v.height/2-h.offsetHeight/2}px`}else{const _=s==="top"?v.top-h.offsetHeight:v.bottom;h.style.top=`${Math.max(0,_)}px`,h.style.left=`${v.left+v.width/2-h.offsetWidth/2}px`}},[s]);return c.useEffect(()=>{if(!m||!f.current||!p.current)return;const v=(f.current.firstElementChild||f.current).getBoundingClientRect();b(v,p.current);const h=p.current,C=window.innerWidth,_=h.getBoundingClientRect(),y=h.querySelector(`.${_t.tooltipContent}`);if(y&&(y.style.maxWidth="none",y.style.wordBreak="normal",y.style.whiteSpace="normal",_.left+_.width>C)){const q=_.width-y.offsetWidth;y.style.maxWidth=`${C-_.left-4-q}px`,y.style.wordBreak="break-all",y.style.whiteSpace="wrap",b(v,h)}const T=()=>d(!1);return document.addEventListener("wheel",T),()=>document.removeEventListener("wheel",T)},[m,b]),e.jsxs("div",{ref:f,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),className:r,style:a,children:[m&&jt.createPortal(e.jsxs("div",{ref:p,className:g(_t.tooltip,_t[s],x&&_t.active),children:[e.jsx("div",{className:_t.tooltipTriangle}),e.jsx("div",{className:_t.tooltipContent,children:i})]}),document.body),l]})}Ye.Label=yn;function gt({labelValue:t,infoMessage:s,tooltipMinWidth:n,required:r,className:a}){return t?e.jsxs("h5",{className:`inline-flex items-center text-sm font-semibold leading-xs${a?` ${a}`:""}`,children:[t,r&&e.jsx("span",{className:"text-primary-foreground-low ml-xxs",children:"*"}),s&&e.jsxs(Ye,{className:"ml-xxs",children:[e.jsx(Ye.Label,{children:e.jsx("p",{className:"p-xxs text-neutral-foreground-negative",style:n?{minWidth:n}:void 0,children:s})}),e.jsx(re,{name:"info",className:"info-icon"})]})]}):null}const jn={floatCard:"_floatCard_1x7j3_2",active:"_active_1x7j3_2"};function xt({value:t,defaultValue:s=!1,onChange:n,mode:r="click",children:a,card:o,className:l}){const[i,u]=pe({value:t,defaultValue:s,onChange:n}),d=c.useRef(null),f=c.useRef(null),{isMounted:p,isActive:m}=Je(!!i,{duration:200}),x=c.useCallback(()=>{u(!1)},[u]),b=c.useCallback(()=>{if(!d.current||!f.current)return;const v=f.current.firstElementChild;if(!v)return;const h=(d.current.firstElementChild||d.current).getBoundingClientRect(),C=window.innerHeight,_=window.innerWidth,y=4;h.left+v.offsetWidth>_?v.style.left=`${h.right-v.offsetWidth}px`:v.style.left=`${h.left}px`,h.bottom+v.offsetHeight>C?v.style.top=`${h.top-v.offsetHeight-y}px`:v.style.top=`${h.bottom+y}px`},[]);return c.useEffect(()=>{if(!p)return;requestAnimationFrame(()=>b());const v=C=>{if(!f.current)return;const _=f.current.firstElementChild;if(!_)return;const y=C.type==="wheel",T=_.getBoundingClientRect(),q="clientX"in C?C.clientX:0,P="clientY"in C?C.clientY:0,N=q>=T.left&&q<=T.right&&P>=T.top&&P<=T.bottom;if(y&&N){let k=C.target;for(;k&&_.contains(k);){if(k.scrollHeight>k.clientHeight)return;if(k===_)break;k=k.parentElement}x()}else N||x()},h=setTimeout(()=>{document.addEventListener("click",v),document.addEventListener("wheel",v)},200);return()=>{clearTimeout(h),document.removeEventListener("click",v),document.removeEventListener("wheel",v)}},[p,b,x]),e.jsxs("div",{ref:d,onClick:r==="click"?v=>{d.current?.contains(v.target)&&u(!0)}:void 0,onMouseEnter:r==="hover"?()=>u(!0):void 0,onMouseLeave:r==="hover"?x:void 0,className:l,children:[p&&jt.createPortal(e.jsx("div",{ref:f,children:e.jsx(pt,{className:g(jn.floatCard,m&&jn.active),children:o})}),document.body),a]})}function Ms({value:t,defaultValue:s,onChange:n,labelValue:r="",role:a="listbox",disabled:o=!1,isError:l=!1,errorMessage:i="",infoMessage:u="",required:d=!1,closeOnBlur:f=!0,hideBottom:p=!1,maxHeight:m="none",minWidth:x="15em",secondary:b=!1,hideArrow:v=!1,icon:h="keyboard_arrow_down",disableLabelAutoWidth:C=!1,children:_,label:y,complement:T,leadingComplement:q,renderContent:P,className:N}){const[k,H]=pe({value:t,defaultValue:s}),F=o?!1:k??!1,z=c.useRef(null),B=c.useRef(null),[E,A]=c.useState(x);function V(){const W=(z.current?.scrollWidth??0)+"px";W!==E&&A(W),!C&&B.current&&z.current&&(B.current.style.width=z.current.scrollWidth+"px")}function ee(W){f&&k?(H(W),n?.(W,{source:"blur"})):(H(W),n?.(W,{source:"click"}))}c.useEffect(()=>{const W=new MutationObserver(V);return z.current&&W.observe(z.current,{attributes:!0}),V(),()=>W.disconnect()},[]),c.useEffect(()=>{V()});function J(){o||H(!k)}return e.jsx(xt,{value:F,card:P?.(E),onChange:ee,children:e.jsxs("div",{className:g("container",N),children:[r&&e.jsx("div",{className:"flex justify-between items-center",children:e.jsx(gt,{labelValue:r,infoMessage:u,required:d})}),e.jsx("div",{ref:z,role:a,"aria-disabled":o||void 0,"aria-required":d||void 0,className:"label-container",tabIndex:0,children:y||e.jsxs("div",{ref:B,className:g("label-content",{disabled:o,secondary:b,expanded:F,"hide-bottom":p,error:l}),style:{maxHeight:m,minWidth:x},onClick:J,onKeyUp:W=>{W.key===" "&&J()},children:[q,_,e.jsxs("div",{className:"flex items-center gap-xs ml-auto",children:[T,!v&&e.jsx(re,{name:h,className:g("arrow-icon leading-xs",{"text-neutral-interaction-disabled":o,"text-danger-interaction-default":l,expanded:F})})]})]})}),l&&e.jsx("small",{className:"text-danger-foreground-low text-start p3",children:i})]})})}function Zt({value:t,defaultValue:s,onChange:n,labelValue:r="",disabled:a=!1,isError:o=!1,errorMessage:l="",infoMessage:i="",required:u=!1,closeOnBlur:d=!0,maxHeight:f="40px",minWidth:p="unset",secondary:m=!1,hideArrow:x=!1,disableLabelAutoWidth:b=!1,icon:v,children:h,complement:C,leadingComplement:_,label:y,card:T,content:q,className:P}){const[N,k]=pe({value:t,defaultValue:s});function H(F,z){k(F),n?.(F,z)}return e.jsx(Ms,{className:g("expandable-container w-fit",P),value:N,onChange:H,labelValue:r,closeOnBlur:d,disabled:a,isError:o,errorMessage:l,infoMessage:i,required:u,maxHeight:f,minWidth:p,secondary:m,hideArrow:x,disableLabelAutoWidth:b,label:y,complement:C,leadingComplement:_,icon:v,renderContent:F=>e.jsx("div",{style:{minWidth:F},children:T||q}),children:h})}function Ot({value:t,defaultValue:s,onChange:n,labelValue:r="",absolute:a=!1,disabled:o=!1,isError:l=!1,errorMessage:i="",infoMessage:u="",required:d=!1,closeOnBlur:f=!0,dontHaveMaxHeight:p=!1,maxHeight:m="40px",minWidth:x="15em",secondary:b=!1,hideArrow:v=!1,disableLabelAutoWidth:h=!1,icon:C,children:_,complement:y,leadingComplement:T,label:q,content:P,options:N,actions:k,className:H}){const[F,z]=pe({value:t,defaultValue:s}),B=o?!1:F??!1,E=c.useRef(B);E.current=B;const A=c.useRef(null),V=c.useRef(null);function ee(){V.current&&(V.current.style.maxHeight=E.current?`${V.current.scrollHeight+1}px`:"0px")}return c.useEffect(()=>{const J=A.current;if(!J)return;const W=J.querySelector(".label-container"),te=V.current,ie=new ResizeObserver(()=>ee()),j=new MutationObserver(()=>ee());W&&(j.observe(W,{characterData:!0,subtree:!0,childList:!0}),ie.observe(W,{box:"border-box"})),te&&ie.observe(te,{box:"border-box"});const U=setTimeout(()=>ee(),200);return()=>{ie.disconnect(),j.disconnect(),clearTimeout(U)}},[]),c.useEffect(()=>{ee()}),e.jsx("div",{ref:A,children:e.jsx(Zt,{className:g("select-container",H),value:F,onChange:(J,W)=>{z(J),n?.(J,W)},absolute:a,labelValue:r,closeOnBlur:f,disabled:o,isError:l,errorMessage:i,infoMessage:u,required:d,maxHeight:m,minWidth:x,secondary:b,hideArrow:v,disableLabelAutoWidth:h,label:q,complement:y,leadingComplement:T,icon:C,content:e.jsx("div",{ref:V,className:"content-wrapper",children:e.jsxs("div",{className:g("sc-content","transition-translate",{secondary:b,expanded:B,"has-max-height":!p}),children:[P||e.jsx("ul",{role:"list",className:g("options-list",{"p-xxs [&>*]:p-xs":!p}),children:N}),k&&e.jsx("div",{className:"sc-actions",tabIndex:0,children:k})]})}),children:_})})}function Jt({selected:t=!1,disabled:s=!1,secondary:n=!1,noHover:r=!1,children:a,className:o,onClick:l}){return e.jsx("div",{role:"option",tabIndex:0,className:g("option-container",{selected:t,disabled:s,secondary:n,noHover:r},o),onClick:s?void 0:l,children:a})}const Os={noResults:"_noResults_f1k9p_2"};function Ps(t){const s=parseInt(t.slice(1,3),16),n=parseInt(t.slice(3,5),16),r=parseInt(t.slice(5,7),16),a=parseInt(t.slice(7,9),16)/255;return{r:s,g:n,b:r,a}}function wn(t,s,n,r){let a,o,l,i,u;t=t/60,n<=.5?o=n*(s+1):o=n+s-n*s,a=n*2-o;function d(f,p,m){return m<0&&(m+=6),m>=6&&(m-=6),m<1?(p-f)*m+f:m<3?p:m<4?(p-f)*(4-m)+f:f}return l=d(a,o,t+2)*255,i=d(a,o,t)*255,u=d(a,o,t-2)*255,{r:l,g:i,b:u,a:r}}function Ds(t,s,n,r){let a,o,l=[],i;for(o=wn(t,1,.5,1),l[0]=o.r/255,l[1]=o.g/255,l[2]=o.b/255,i=s+n,i>1&&(s=Number((s/i).toFixed(2)),n=Number((n/i).toFixed(2))),a=0;a<3;a++)l[a]*=1-s-n,l[a]+=s,l[a]=Number(l[a]*255);return{r:l[0],g:l[1],b:l[2],a:r}}function Nn(t,s,n,r){t=(t%360+360)%360,s=Math.max(0,Math.min(s,100))/100,n=Math.max(0,Math.min(n,100))/100;const a=n*s,o=a*(1-Math.abs(t/60%2-1)),l=n-a;let i,u,d;return t>=0&&t<60?(i=a,u=o,d=0):t>=60&&t<120?(i=o,u=a,d=0):t>=120&&t<180?(i=0,u=a,d=o):t>=180&&t<240?(i=0,u=o,d=a):t>=240&&t<300?(i=o,u=0,d=a):(i=a,u=0,d=o),i=Math.round((i+l)*255),u=Math.round((u+l)*255),d=Math.round((d+l)*255),{r:i,g:u,b:d,a:r}}function Bs(t,s,n,r){const a=Math.round(r*255).toString(16).padStart(2,"0");return`#${t.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}${a}`}function Vs(t,s,n,r){t/=255,s/=255,n/=255;const a=Math.max(t,s,n),o=Math.min(t,s,n),l=a-o;let i=0,u=0,d=(a+o)/2;if(l!==0){switch(u=d>.5?l/(2-a-o):l/(a+o),a){case t:i=(s-n)/l+(s<n?6:0);break;case s:i=(n-t)/l+2;break;case n:i=(t-s)/l+4;break}i*=60}return{h:i<0?i+360:i,s:`${(u*100).toFixed(0)}%`,l:`${(d*100).toFixed(0)}%`,a:r}}function Fs(t,s,n,r){const a=Math.max(t,s,n),o=Math.min(t,s,n);if(a===o)return{h:0,w:(100*o/255).toFixed(0)+"%",b:(100-100*a/255).toFixed(0)+"%",a:r};let l=0;switch(a){case t:l=(s-n)/(a-o)+0;break;case s:l=(n-t)/(a-o)+2;break;case n:l=(t-s)/(a-o)+4;break}return{h:(360*((l+6)%6/6)).toFixed(0),w:(100*o/255).toFixed(0)+"%",b:(100-100*a/255).toFixed(0)+"%",a:r}}function kt(t,s,n,r){let a,o,l,i,u,d,f=0,p,m,x,b,v;return a=t/255,o=s/255,l=n/255,m=Math.max(a,o,l),x=m-Math.min(a,o,l),b=h=>(m-h)/6/x+1/2,v=h=>Math.round(h*100)/100,x==0?f=p=0:(p=x/m,i=b(a),u=b(o),d=b(l),a===m?f=d-u:o===m?f=1/3+i-d:l===m&&(f=2/3+u-i),f<0?f+=1:f>1&&(f-=1)),{h:Math.round(f*360),s:`${v(p*100).toFixed(0)}%`,v:`${v(m*100).toFixed(0)}%`,a:r}}function kn(t){return t==null||t===""}function Se(t){return typeof t=="object"&&t!==null}function Sn(t,s,n,r=!1){const a=t?.toISOString().substr(0,10),o=s?.toISOString().substr(0,10),l=n?.toISOString().substr(0,10);if(r)return o==l||a==l;const i=`
|
|
6
|
+
<%s key={someKey} {...props} />`,O,ee,me,ee),ie[ee+O]=!0)}if(ee=null,I!==void 0&&(n(I),ee=""+I),l(U)&&(n(U.key),ee=""+U.key),"key"in U){I={};for(var _e in U)_e!=="key"&&(I[_e]=U[_e])}else I=U;return ee&&i(I,typeof j=="function"?j.displayName||j.name||"Unknown":j),d(j,ee,I,a(),re,be)}function p(j){m(j)?j._store&&(j._store.validated=1):typeof j=="object"&&j!==null&&j.$$typeof===D&&(j._payload.status==="fulfilled"?m(j._payload.value)&&j._payload.value._store&&(j._payload.value._store.validated=1):j._store&&(j._store.validated=1))}function m(j){return typeof j=="object"&&j!==null&&j.$$typeof===v}var b=u,v=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),$=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),H=Symbol.for("react.client.reference"),L=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,E=Object.prototype.hasOwnProperty,T=Array.isArray,P=console.createTask?console.createTask:function(){return null};b={react_stack_bottom_frame:function(j){return j()}};var K,Z={},W=b.react_stack_bottom_frame.bind(b,r)(),ue=P(o(r)),ie={};Nt.Fragment=h,Nt.jsx=function(j,U,I){var O=1e4>L.recentlyCreatedOwnerStacks++;return f(j,U,I,!1,O?Error("react-stack-top-frame"):W,O?P(o(j)):ue)},Nt.jsxs=function(j,U,I){var O=1e4>L.recentlyCreatedOwnerStacks++;return f(j,U,I,!0,O?Error("react-stack-top-frame"):W,O?P(o(j)):ue)}})()),Nt}var xn;function Ts(){return xn||(xn=1,process.env.NODE_ENV==="production"?Lt.exports=$s():Lt.exports=Is()),Lt.exports}var e=Ts();function bn(t){var s,n,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(s=0;s<a;s++)t[s]&&(n=bn(t[s]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}function g(){for(var t,s,n=0,o="",a=arguments.length;n<a;n++)(t=arguments[n])&&(s=bn(t))&&(o&&(o+=" "),o+=s);return o}function xe(t){const{value:s,defaultValue:n,onChange:o}=t,a=s!==void 0,r=u.useRef(a),[l,i]=u.useState(n);return u.useEffect(()=>{if(process.env.NODE_ENV!=="production"){if(r.current!==a){const f=r.current?"controlled":"uncontrolled";console.warn(`[useControllable] Component switched from ${f} to ${a?"controlled":"uncontrolled"}. This is not recommended and may cause unexpected behavior.`)}r.current=a}}),[a?s:l,f=>{a||i(f),o?.(f)}]}const at={accordion:"_accordion_1irbw_2",noShadow:"_noShadow_1irbw_2",header:"_header_1irbw_2",disabled:"_disabled_1irbw_2",headerText:"_headerText_1irbw_2",chevron:"_chevron_1irbw_2",expanded:"_expanded_1irbw_2",content:"_content_1irbw_2"};function oe({name:t,filled:s=!1,className:n,style:o,onClick:a=()=>{}}){return e.jsx("span",{className:g("material-symbols-rounded","icon",s&&"filled",n),style:o,onClick:a,children:t})}function As({value:t,onChange:s,duration:n=300,noShadow:o=!1,disabled:a=!1,header:r,children:l,className:i}){const[c,d]=xe({value:t,defaultValue:!1,onChange:s}),f=Math.min(1e3,Math.max(150,n??300)),p=u.useRef(null),m=u.useRef(null),b=u.useRef(c);b.current=c,u.useLayoutEffect(()=>{!c&&m.current&&(m.current.style.maxHeight="0px")},[]);function v(){m.current&&(m.current.style.maxHeight=b.current?`${m.current.scrollHeight}px`:"0px")}u.useEffect(()=>{const h=p.current,y=m.current,_=new ResizeObserver(()=>v()),C=new MutationObserver(()=>v());return h&&_.observe(h,{box:"border-box"}),y&&(_.observe(y,{box:"border-box"}),C.observe(y,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-max-height"]})),()=>{_.disconnect(),C.disconnect()}},[]),u.useEffect(()=>{v()});function x(){a||d(!c)}return e.jsx("div",{className:g(at.accordion,o&&at.noShadow,i),children:e.jsxs("div",{ref:p,className:"w-full flex flex-col",children:[e.jsxs("div",{className:g(at.header,a&&at.disabled),onClick:x,children:[r&&e.jsx("span",{className:at.headerText,children:r}),e.jsx(oe,{className:g(at.chevron,"material-symbols-rounded",c&&at.expanded),name:"expand_more"})]}),e.jsx("div",{ref:m,className:at.content,style:{transitionDuration:`${f}ms`},children:l})]})})}const Es={card:"_card_mycev_2"};function pt({children:t,className:s,style:n}={}){return e.jsx("div",{className:g(Es.card,s),style:n,children:t})}const Gt={actionCard:"_actionCard_1tvck_2",sideIcon:"_sideIcon_1tvck_2"};function Yt(t){return t instanceof TouchEvent?t.touches[0]:t}function vn({children:t}){return e.jsx("div",{className:"py-sm",children:t})}function Cn({icon:t="",color:s="",hideDrag:n=!1,children:o,className:a,onDragstart:r,onDragging:l,onDragend:i,onDelete:c}){const[d,f]=u.useState(!1),p=u.useRef(!1);p.current=d;const m=u.useCallback(_=>{p.current&&l?.(Yt(_))},[l]),b=u.useCallback(_=>{p.current&&(f(!1),p.current=!1,i?.(Yt(_)))},[i]);u.useEffect(()=>(window.addEventListener("mousemove",m),window.addEventListener("mouseup",b),window.addEventListener("touchmove",m),window.addEventListener("touchend",b),()=>{window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",b),window.removeEventListener("touchmove",m),window.removeEventListener("touchend",b)}),[m,b]);function v(_){const C=_.nativeEvent;f(!0),p.current=!0,r?.(Yt(C))}const x=[],h=[];u.Children.forEach(o,_=>{u.isValidElement(_)&&_.type===vn?x.push(_):h.push(_)});const y=x.length>0;return e.jsxs("div",{className:g(Gt.actionCard,a),children:[!n&&e.jsx("span",{className:g(Gt.sideIcon,d?"cursor-grabbing":"cursor-grab"),onMouseDown:v,onTouchStart:v,children:e.jsx(oe,{name:"drag_indicator"})}),e.jsxs(pt,{className:"rounded-base [&>*]:px-xl",children:[e.jsxs("header",{className:g("flex items-center gap-xs bg-primary-interaction-default text-neutral-foreground-negative rounded-base py-sm",y&&"rounded-b-none"),style:{background:s||void 0},children:[t&&e.jsx(oe,{name:t}),h]}),y&&x]}),e.jsx("span",{className:g(Gt.sideIcon,"cursor-pointer"),onClick:c,children:e.jsx(oe,{name:"delete"})})]})}Cn.Card=vn;const Oe={alert:"_alert_1h5uu_2",itemsStart:"_itemsStart_1h5uu_2",itemsCenter:"_itemsCenter_1h5uu_2",contentWrapper:"_contentWrapper_1h5uu_2","items-start":"_items-start_1h5uu_2","items-center":"_items-center_1h5uu_2","items-end":"_items-end_1h5uu_2",body:"_body_1h5uu_2",textContent:"_textContent_1h5uu_2",small:"_small_1h5uu_2",title:"_title_1h5uu_2",message:"_message_1h5uu_2",typeIcon:"_typeIcon_1h5uu_2",medium:"_medium_1h5uu_2",large:"_large_1h5uu_2",info:"_info_1h5uu_2",success:"_success_1h5uu_2",warning:"_warning_1h5uu_2",danger:"_danger_1h5uu_2",neutral:"_neutral_1h5uu_2",actionIcon:"_actionIcon_1h5uu_2",expandToggle:"_expandToggle_1h5uu_2",rotated:"_rotated_1h5uu_2",clickable:"_clickable_1h5uu_2"};function Ms(t){switch(t){case"info":case"neutral":return"info";case"warning":case"danger":return"error";case"success":return"check_circle";default:return"info"}}function Xt({title:t,message:s="",type:n="info",size:o="medium",icon:a="",expandable:r=!1,closable:l=!1,hideIcon:i=!1,iconPosition:c="start",children:d,actions:f,onClose:p,className:m}){const[b,v]=u.useState(!1),x=u.useRef(null),h=u.useRef(null),y=u.useCallback(()=>{if(!h.current||!x.current)return;const C=getComputedStyle(x.current),$=parseInt(C.paddingTop),B=parseInt(C.paddingBottom);x.current.style.height=`${h.current.scrollHeight+$+B}px`,h.current.style.width="fit-content";const R=h.current.offsetWidth;x.current.style.width||x.current.offsetWidth!==R?h.current.style.width="100%":h.current.style.width=`${R}px`},[]);u.useEffect(()=>{const C=new ResizeObserver(y);return x.current&&C.observe(x.current,{box:"border-box"}),h.current&&C.observe(h.current,{box:"border-box"}),()=>C.disconnect()},[y]),u.useEffect(()=>{y()});const _=a||Ms(n);return e.jsxs("div",{ref:x,className:g(Oe.alert,Oe[n],Oe[o],r&&Oe.itemsStart,(!r||!b)&&Oe.itemsCenter,m),children:[e.jsxs("div",{ref:h,className:g(Oe.contentWrapper,Oe[`items-${c}`]),children:[!i&&e.jsx("div",{className:Oe.typeIcon,children:e.jsx(oe,{name:_})}),e.jsx("div",{className:Oe.body,children:d||e.jsxs("div",{className:Oe.textContent,children:[t&&e.jsx("h6",{className:Oe.title,children:t}),(!r||b)&&s&&e.jsx("p",{className:Oe.message,children:s})]})})]}),f||e.jsxs("div",{className:g(Oe.typeIcon,Oe.actionIcon),children:[r&&e.jsx("div",{className:g(Oe.expandToggle,b&&Oe.rotated),onClick:()=>v(!b),children:e.jsx(oe,{name:"expand_more"})}),l&&e.jsx(oe,{name:"close",onClick:p,className:Oe.clickable})]})]})}Xt.Actions=function({children:s}){return e.jsx(e.Fragment,{children:s})};function Je(t,s){const[n,o]=u.useState(!1),[a,r]=u.useState(!1),l=u.useRef(null),i=u.useRef(null);return u.useEffect(()=>{if(t){o(!0);const c=requestAnimationFrame(()=>{const d=requestAnimationFrame(()=>{r(!0)});i.current=()=>cancelAnimationFrame(d)});return()=>{cancelAnimationFrame(c),i.current?.()}}else return r(!1),l.current=setTimeout(()=>{o(!1)},s.duration),()=>{l.current&&clearTimeout(l.current)}},[t,s.duration]),{isMounted:n,isActive:a}}const _t={tooltip:"_tooltip_ui48a_2",active:"_active_ui48a_2",tooltipTriangle:"_tooltipTriangle_ui48a_2",tooltipContent:"_tooltipContent_ui48a_2",right:"_right_ui48a_2",left:"_left_ui48a_2",top:"_top_ui48a_2",bottom:"_bottom_ui48a_2"};function yn({children:t}){return e.jsx(e.Fragment,{children:t})}function Ye({labelValue:t="",position:s="right",children:n,className:o,style:a}){let r=null;const l=[];u.Children.forEach(n,x=>{u.isValidElement(x)&&x.type===yn?r=x.props.children:l.push(x)});const i=r||t,[c,d]=u.useState(!1),f=u.useRef(null),p=u.useRef(null),{isMounted:m,isActive:b}=Je(c,{duration:500}),v=u.useCallback((x,h)=>{if(s==="left"||s==="right"){const _=s==="left"?x.left-h.offsetWidth-4:x.right+4;h.style.left=`${Math.max(0,_)}px`,h.style.top=`${x.top+x.height/2-h.offsetHeight/2}px`}else{const _=s==="top"?x.top-h.offsetHeight:x.bottom;h.style.top=`${Math.max(0,_)}px`,h.style.left=`${x.left+x.width/2-h.offsetWidth/2}px`}},[s]);return u.useEffect(()=>{if(!m||!f.current||!p.current)return;const x=(f.current.firstElementChild||f.current).getBoundingClientRect();v(x,p.current);const h=p.current,y=window.innerWidth,_=h.getBoundingClientRect(),C=h.querySelector(`.${_t.tooltipContent}`);if(C&&(C.style.maxWidth="none",C.style.wordBreak="normal",C.style.whiteSpace="normal",_.left+_.width>y)){const B=_.width-C.offsetWidth;C.style.maxWidth=`${y-_.left-4-B}px`,C.style.wordBreak="break-all",C.style.whiteSpace="wrap",v(x,h)}const $=()=>d(!1);return document.addEventListener("wheel",$),()=>document.removeEventListener("wheel",$)},[m,v]),e.jsxs("div",{ref:f,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),className:o,style:a,children:[m&&jt.createPortal(e.jsxs("div",{ref:p,className:g(_t.tooltip,_t[s],b&&_t.active),children:[e.jsx("div",{className:_t.tooltipTriangle}),e.jsx("div",{className:_t.tooltipContent,children:i})]}),document.body),l]})}Ye.Label=yn;function gt({labelValue:t,infoMessage:s,tooltipMinWidth:n,required:o,className:a}){return t?e.jsxs("h5",{className:`inline-flex items-center text-sm font-semibold leading-xs${a?` ${a}`:""}`,children:[t,o&&e.jsx("span",{className:"text-primary-foreground-low ml-xxs",children:"*"}),s&&e.jsxs(Ye,{className:"ml-xxs",children:[e.jsx(Ye.Label,{children:e.jsx("p",{className:"p-xxs text-neutral-foreground-negative",style:n?{minWidth:n}:void 0,children:s})}),e.jsx(oe,{name:"info",className:"info-icon"})]})]}):null}const jn={floatCard:"_floatCard_1x7j3_2",active:"_active_1x7j3_2"};function xt({value:t,defaultValue:s=!1,onChange:n,mode:o="click",children:a,card:r,className:l}){const[i,c]=xe({value:t,defaultValue:s,onChange:n}),d=u.useRef(null),f=u.useRef(null),{isMounted:p,isActive:m}=Je(!!i,{duration:200}),b=u.useCallback(()=>{c(!1)},[c]),v=u.useCallback(()=>{if(!d.current||!f.current)return;const x=f.current.firstElementChild;if(!x)return;const h=(d.current.firstElementChild||d.current).getBoundingClientRect(),y=window.innerHeight,_=window.innerWidth,C=4;h.left+x.offsetWidth>_?x.style.left=`${h.right-x.offsetWidth}px`:x.style.left=`${h.left}px`,h.bottom+x.offsetHeight>y?x.style.top=`${h.top-x.offsetHeight-C}px`:x.style.top=`${h.bottom+C}px`},[]);return u.useEffect(()=>{if(!p)return;requestAnimationFrame(()=>v());const x=y=>{if(!f.current)return;const _=f.current.firstElementChild;if(!_)return;const C=y.type==="wheel",$=_.getBoundingClientRect(),B="clientX"in y?y.clientX:0,R="clientY"in y?y.clientY:0,k=B>=$.left&&B<=$.right&&R>=$.top&&R<=$.bottom;if(C&&k){let w=y.target;for(;w&&_.contains(w);){if(w.scrollHeight>w.clientHeight)return;if(w===_)break;w=w.parentElement}b()}else k||b()},h=setTimeout(()=>{document.addEventListener("click",x),document.addEventListener("wheel",x)},200);return()=>{clearTimeout(h),document.removeEventListener("click",x),document.removeEventListener("wheel",x)}},[p,v,b]),e.jsxs("div",{ref:d,onClick:o==="click"?x=>{d.current?.contains(x.target)&&c(!0)}:void 0,onMouseEnter:o==="hover"?()=>c(!0):void 0,onMouseLeave:o==="hover"?b:void 0,className:l,children:[p&&jt.createPortal(e.jsx("div",{ref:f,children:e.jsx(pt,{className:g(jn.floatCard,m&&jn.active),children:r})}),document.body),a]})}function Ls({value:t,defaultValue:s,onChange:n,labelValue:o="",role:a="listbox",disabled:r=!1,isError:l=!1,errorMessage:i="",infoMessage:c="",required:d=!1,closeOnBlur:f=!0,hideBottom:p=!1,maxHeight:m="none",minWidth:b="15em",secondary:v=!1,hideArrow:x=!1,icon:h="keyboard_arrow_down",disableLabelAutoWidth:y=!1,children:_,label:C,complement:$,leadingComplement:B,renderContent:R,className:k}){const[w,D]=xe({value:t,defaultValue:s}),V=r?!1:w??!1,H=u.useRef(null),L=u.useRef(null),[E,T]=u.useState(b);function P(){const W=(H.current?.scrollWidth??0)+"px";W!==E&&T(W),!y&&L.current&&H.current&&(L.current.style.width=H.current.scrollWidth+"px")}function K(W){f&&w?(D(W),n?.(W,{source:"blur"})):(D(W),n?.(W,{source:"click"}))}u.useEffect(()=>{const W=new MutationObserver(P);return H.current&&W.observe(H.current,{attributes:!0}),P(),()=>W.disconnect()},[]),u.useEffect(()=>{P()});function Z(){r||D(!w)}return e.jsx(xt,{value:V,card:R?.(E),onChange:K,children:e.jsxs("div",{className:g("container",k),children:[o&&e.jsx("div",{className:"flex justify-between items-center",children:e.jsx(gt,{labelValue:o,infoMessage:c,required:d})}),e.jsx("div",{ref:H,role:a,"aria-disabled":r||void 0,"aria-required":d||void 0,className:"label-container",tabIndex:0,children:C||e.jsxs("div",{ref:L,className:g("label-content",{disabled:r,secondary:v,expanded:V,"hide-bottom":p,error:l}),style:{maxHeight:m,minWidth:b},onClick:Z,onKeyUp:W=>{W.key===" "&&Z()},children:[B,_,e.jsxs("div",{className:"flex items-center gap-xs ml-auto",children:[$,!x&&e.jsx(oe,{name:h,className:g("arrow-icon leading-xs",{"text-neutral-interaction-disabled":r,"text-danger-interaction-default":l,expanded:V})})]})]})}),l&&e.jsx("small",{className:"text-danger-foreground-low text-start p3",children:i})]})})}function Zt({value:t,defaultValue:s,onChange:n,labelValue:o="",disabled:a=!1,isError:r=!1,errorMessage:l="",infoMessage:i="",required:c=!1,closeOnBlur:d=!0,maxHeight:f="40px",minWidth:p="unset",secondary:m=!1,hideArrow:b=!1,disableLabelAutoWidth:v=!1,icon:x,children:h,complement:y,leadingComplement:_,label:C,card:$,content:B,className:R}){const[k,w]=xe({value:t,defaultValue:s});function D(V,H){w(V),n?.(V,H)}return e.jsx(Ls,{className:g("expandable-container w-fit",R),value:k,onChange:D,labelValue:o,closeOnBlur:d,disabled:a,isError:r,errorMessage:l,infoMessage:i,required:c,maxHeight:f,minWidth:p,secondary:m,hideArrow:b,disableLabelAutoWidth:v,label:C,complement:y,leadingComplement:_,icon:x,renderContent:V=>e.jsx("div",{style:{minWidth:V},children:$||B}),children:h})}function Ot({value:t,defaultValue:s,onChange:n,labelValue:o="",absolute:a=!1,disabled:r=!1,isError:l=!1,errorMessage:i="",infoMessage:c="",required:d=!1,closeOnBlur:f=!0,dontHaveMaxHeight:p=!1,maxHeight:m="40px",minWidth:b="15em",secondary:v=!1,hideArrow:x=!1,disableLabelAutoWidth:h=!1,icon:y,children:_,complement:C,leadingComplement:$,label:B,content:R,options:k,actions:w,className:D}){const[V,H]=xe({value:t,defaultValue:s}),L=r?!1:V??!1,E=u.useRef(L);E.current=L;const T=u.useRef(null),P=u.useRef(null);function K(){P.current&&(P.current.style.maxHeight=E.current?`${P.current.scrollHeight+1}px`:"0px")}return u.useEffect(()=>{const Z=T.current;if(!Z)return;const W=Z.querySelector(".label-container"),ue=P.current,ie=new ResizeObserver(()=>K()),j=new MutationObserver(()=>K());W&&(j.observe(W,{characterData:!0,subtree:!0,childList:!0}),ie.observe(W,{box:"border-box"})),ue&&ie.observe(ue,{box:"border-box"});const U=setTimeout(()=>K(),200);return()=>{ie.disconnect(),j.disconnect(),clearTimeout(U)}},[]),u.useEffect(()=>{K()}),e.jsx("div",{ref:T,children:e.jsx(Zt,{className:g("select-container",D),value:V,onChange:(Z,W)=>{H(Z),n?.(Z,W)},absolute:a,labelValue:o,closeOnBlur:f,disabled:r,isError:l,errorMessage:i,infoMessage:c,required:d,maxHeight:m,minWidth:b,secondary:v,hideArrow:x,disableLabelAutoWidth:h,label:B,complement:C,leadingComplement:$,icon:y,content:e.jsx("div",{ref:P,className:"content-wrapper",children:e.jsxs("div",{className:g("sc-content","transition-translate",{secondary:v,expanded:L,"has-max-height":!p}),children:[R||e.jsx("ul",{role:"list",className:g("options-list",{"p-xxs [&>*]:p-xs":!p}),children:k}),w&&e.jsx("div",{className:"sc-actions",tabIndex:0,children:w})]})}),children:_})})}function Jt({selected:t=!1,disabled:s=!1,secondary:n=!1,noHover:o=!1,children:a,className:r,onClick:l}){return e.jsx("div",{role:"option",tabIndex:0,className:g("option-container",{selected:t,disabled:s,secondary:n,noHover:o},r),onClick:s?void 0:l,children:a})}const Os={noResults:"_noResults_f1k9p_2"};function Ps(t){const s=parseInt(t.slice(1,3),16),n=parseInt(t.slice(3,5),16),o=parseInt(t.slice(5,7),16),a=parseInt(t.slice(7,9),16)/255;return{r:s,g:n,b:o,a}}function wn(t,s,n,o){let a,r,l,i,c;t=t/60,n<=.5?r=n*(s+1):r=n+s-n*s,a=n*2-r;function d(f,p,m){return m<0&&(m+=6),m>=6&&(m-=6),m<1?(p-f)*m+f:m<3?p:m<4?(p-f)*(4-m)+f:f}return l=d(a,r,t+2)*255,i=d(a,r,t)*255,c=d(a,r,t-2)*255,{r:l,g:i,b:c,a:o}}function Ds(t,s,n,o){let a,r,l=[],i;for(r=wn(t,1,.5,1),l[0]=r.r/255,l[1]=r.g/255,l[2]=r.b/255,i=s+n,i>1&&(s=Number((s/i).toFixed(2)),n=Number((n/i).toFixed(2))),a=0;a<3;a++)l[a]*=1-s-n,l[a]+=s,l[a]=Number(l[a]*255);return{r:l[0],g:l[1],b:l[2],a:o}}function Nn(t,s,n,o){t=(t%360+360)%360,s=Math.max(0,Math.min(s,100))/100,n=Math.max(0,Math.min(n,100))/100;const a=n*s,r=a*(1-Math.abs(t/60%2-1)),l=n-a;let i,c,d;return t>=0&&t<60?(i=a,c=r,d=0):t>=60&&t<120?(i=r,c=a,d=0):t>=120&&t<180?(i=0,c=a,d=r):t>=180&&t<240?(i=0,c=r,d=a):t>=240&&t<300?(i=r,c=0,d=a):(i=a,c=0,d=r),i=Math.round((i+l)*255),c=Math.round((c+l)*255),d=Math.round((d+l)*255),{r:i,g:c,b:d,a:o}}function Bs(t,s,n,o){const a=Math.round(o*255).toString(16).padStart(2,"0");return`#${t.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}${a}`}function Vs(t,s,n,o){t/=255,s/=255,n/=255;const a=Math.max(t,s,n),r=Math.min(t,s,n),l=a-r;let i=0,c=0,d=(a+r)/2;if(l!==0){switch(c=d>.5?l/(2-a-r):l/(a+r),a){case t:i=(s-n)/l+(s<n?6:0);break;case s:i=(n-t)/l+2;break;case n:i=(t-s)/l+4;break}i*=60}return{h:i<0?i+360:i,s:`${(c*100).toFixed(0)}%`,l:`${(d*100).toFixed(0)}%`,a:o}}function Fs(t,s,n,o){const a=Math.max(t,s,n),r=Math.min(t,s,n);if(a===r)return{h:0,w:(100*r/255).toFixed(0)+"%",b:(100-100*a/255).toFixed(0)+"%",a:o};let l=0;switch(a){case t:l=(s-n)/(a-r)+0;break;case s:l=(n-t)/(a-r)+2;break;case n:l=(t-s)/(a-r)+4;break}return{h:(360*((l+6)%6/6)).toFixed(0),w:(100*r/255).toFixed(0)+"%",b:(100-100*a/255).toFixed(0)+"%",a:o}}function kt(t,s,n,o){let a,r,l,i,c,d,f=0,p,m,b,v,x;return a=t/255,r=s/255,l=n/255,m=Math.max(a,r,l),b=m-Math.min(a,r,l),v=h=>(m-h)/6/b+1/2,x=h=>Math.round(h*100)/100,b==0?f=p=0:(p=b/m,i=v(a),c=v(r),d=v(l),a===m?f=d-c:r===m?f=1/3+i-d:l===m&&(f=2/3+c-i),f<0?f+=1:f>1&&(f-=1)),{h:Math.round(f*360),s:`${x(p*100).toFixed(0)}%`,v:`${x(m*100).toFixed(0)}%`,a:o}}function kn(t){return t==null||t===""}function $e(t){return typeof t=="object"&&t!==null}function Sn(t,s,n,o=!1){const a=t?.toISOString().substr(0,10),r=s?.toISOString().substr(0,10),l=n?.toISOString().substr(0,10);if(o)return r==l||a==l;const i=`
|
|
7
7
|
return (start < end && start < day && day < end) ||
|
|
8
8
|
(start > end && start > day && day > end)
|
|
9
|
-
`;return new Function("start","end","day",i)(a,o,l)}function Kt(t,s){let n=[];return s==="compare"?t?Array.isArray(t)&&!Array.isArray(t[0])?n=[[...t],[]]:n=[...t]:n=[[],[]]:t?Array.isArray(t)?Array.isArray(t)&&Array.isArray(t[0])?n=[...t[0]]:n=[...t]:n=[t]:n=[],n}function $n(t){return t&&t.charAt(0).toUpperCase()+t.slice(1)}function In(t){const s=t.getFullYear(),n=t.getMonth(),r=new Date(s,n,1).getDay(),a=new Date(s,n+1,0).getDate(),o=[];let l=1;for(let i=0;i<6;i++){const u=[];for(let d=0;d<7;d++)if(i===0&&d<r||l>a)u.push("");else{const f=new Date(s,n,l);u.push(f),l++}o.push(u)}return o}function qs(t="en-US"){const s=new Date("2021-01-03T23:15:30"),n=[];for(let r=0;r<12;r++){const a=s.toLocaleDateString(t,{month:"short"});n.push({label:a,value:r}),s.setMonth(s.getMonth()+1)}return n}function Tn(t,s,n,r={left:!0},a={},o={}){const l=t.clientX-s.clientWidth/2-n.getBoundingClientRect().left,i=n.clientWidth-(s.clientWidth-(typeof a.x=="number"?a.x:2)),u=Math.min(i,Math.max(o.x||0,r.left?l:i-l)),d=t.clientY-s.clientHeight/2-n.getBoundingClientRect().top,f=n.clientHeight-(s.clientHeight-(a.y||0)),p=Math.min(f,Math.max(o.y||0,r.top?d:f-d));return{x:u,y:p}}function Qt(t,s){switch(s){case"cpf":t=t.replace(/\D/g,""),t=t.slice(0,11),t=t.replace(/(\d{3})(\d)/,"$1.$2"),t=t.replace(/(\d{3})(\d)/,"$1.$2"),t=t.replace(/(\d{3})(\d{1,2})$/,"$1-$2");break;case"cnpj":t=t.replace(/\D/g,""),t=t.slice(0,14),t=t.replace(/(\d{2})(\d)/,"$1.$2"),t=t.replace(/(\d{2})\.(\d{3})(\d)/,"$1.$2.$3"),t=t.replace(/(\d{2})\.(\d{3})\.(\d{3})(\d)/,"$1.$2.$3/$4"),t=t.replace(/(\d{2})\.(\d{3})\.(\d{3})\/(\d{4})(\d)/,"$1.$2.$3/$4-$5");break;case"cep":t=t.replace(/\D/g,""),t=t.slice(0,8),t=t.replace(/(\d{5})(\d)/,"$1-$2");break}return t}function Hs(t){return/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(t)}function zs(t){return/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/.test(t)}function An(t){return/[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/.test(t)}function Ke(t,s=.3,n=[255,255,255]){const r=document.createElement("div");r.style.color=t,document.body.appendChild(r);const a=getComputedStyle(r).color;document.body.removeChild(r);const o=a.match(/\d+/g);if(!o)return"";const l=o.map(Number),i=Math.round(l[0]*s+n[0]*(1-s)),u=Math.round(l[1]*s+n[1]*(1-s)),d=Math.round(l[2]*s+n[2]*(1-s));return`rgb(${i}, ${u}, ${d})`}function Rs(t){const s=window.location.pathname.replace(/\/$/,"").split("/"),n=t.replace(/\/+$/,"").split("/");for(let r=0;r<n.length;r++)if(s[r]!==n[r])return!1;return s.length===n.length}const Pe={colorPicker:"_colorPicker_1sqmq_2",disabled:"_disabled_1sqmq_2",noShadow:"_noShadow_1sqmq_2",colorAreaWrapper:"_colorAreaWrapper_1sqmq_2",colorArea:"_colorArea_1sqmq_2",colorAreaCursor:"_colorAreaCursor_1sqmq_2",sliderTrack:"_sliderTrack_1sqmq_2",sliderCursor:"_sliderCursor_1sqmq_2",hueTrack:"_hueTrack_1sqmq_2",opacityTrack:"_opacityTrack_1sqmq_2",colorCircle:"_colorCircle_1sqmq_2",colorInput:"_colorInput_1sqmq_2",typeToggles:"_typeToggles_1sqmq_2",typeToggle:"_typeToggle_1sqmq_2",active:"_active_1sqmq_2"},Qe=["hexa","rgba","hsla","hsva","hwb"];function Pt(t,s="rgba",n=","){if(!t)return{};const r={},a=Array.from(s),o=t.split(n);return a.forEach((l,i)=>{r[l]=typeof o[i]=="string"?Number(o[i].replace("%","")):o[i]??1}),r}function Ws(t,s=","){if(!t)return null;const n={},r=t.split("(");if(r.length<2)return null;const a=Array.from(r[0]);r[1]=r[1].replace(")","");const o=r[1].split(s);return a.forEach((l,i)=>{n[l]=typeof o[i]=="string"?Number(o[i].replace("%","")):o[i]??1}),n}function Us(t){let s="",n="";const r=Object.keys(t);return r.forEach((a,o)=>{n+=a,s+=r.length-1===o?t[a]:`${t[a]}, `}),`${n}(${s})`}function en(t){const{value:s,onChange:n,showAlpha:r=!0,disabled:a=!1,noShadow:o=!1,className:l}=t,[i,u]=pe({value:s,defaultValue:"#ffffff",onChange:n}),[d,f]=c.useState(0),[p,m]=c.useState(()=>i||"#ffffff"),[x,b]=c.useState("hsl(0, 100%, 50%)"),[v,h]=c.useState(1),[C,_]=c.useState(i||""),[y,T]=c.useState(!1),[q,P]=c.useState(!1),[N,k]=c.useState("linear-gradient(to right, #ffffff 0%, hsl(0, 100%, 50%))"),H=c.useRef(!1),F=c.useRef(!1),z=c.useRef(!1),B=c.useRef(null),E=c.useRef(null),A=c.useRef(null),V=c.useRef(null),ee=c.useRef(null),J=c.useRef(null),W=c.useRef(x),te=c.useRef(v),ie=c.useRef(d);W.current=x,te.current=v,ie.current=d;function j(w){const X=ie.current;if(X===0)return Bs(w.r,w.g,w.b,w.a);if(X===1){const L=Vs(w.r,w.g,w.b,w.a);return`${L.h.toFixed(0)}, ${L.s}, ${L.l}, ${L.a<1?L.a.toFixed(2):L.a}`}else if(X===2){const L=Fs(w.r,w.g,w.b,w.a);return`${L.h} ${L.w} ${L.b} / ${L.a<1?L.a.toFixed(2):L.a}`}else if(X===3){const L=kt(w.r,w.g,w.b,w.a);return`${L.h}, ${L.s}, ${L.v}, ${L.a<1?L.a.toFixed(2):L.a}`}return`${w.r}, ${w.g}, ${w.b}, ${w.a<1?w.a.toFixed(2):w.a}`}function U(w,X){if(X===0){const M=Ps(w);return kt(M.r,M.g,M.b,isNaN(M.a)?1:M.a)}else if(X===1){const M=Pt(w,"hlsa"),G=wn(M.h,M.s,M.l,M.a);return kt(G.r,G.g,G.b,isNaN(G.a)?1:G.a)}else if(X===2){const M=Pt(w,"hwb"," "),G=w.split("/"),oe=Ds(M.h,M.w,M.b,Number(G[1]?.replace(")","")));return kt(oe.r,oe.g,oe.b,isNaN(oe.a)?1:oe.a)}else if(X===3)return Pt(w,"hsva");const L=Pt(w);return kt(L.r,L.g,L.b,isNaN(L.a)?1:L.a)}function I(w,X){const L=document.createElement("canvas");L.width=w.clientWidth,L.height=w.clientHeight;const M=L.getContext("2d");if(!M)return"hsl(0, 100%, 50%)";const G=M.createLinearGradient(0,0,L.width,0);G.addColorStop(0,"hsl(0, 100%, 50%)"),G.addColorStop(1/6,"hsl(60, 100%, 50%)"),G.addColorStop(2/6,"hsl(120, 100%, 50%)"),G.addColorStop(3/6,"hsl(180, 100%, 50%)"),G.addColorStop(4/6,"hsl(240, 100%, 50%)"),G.addColorStop(5/6,"hsl(300, 100%, 50%)"),G.addColorStop(1,"hsl(360, 100%, 50%)"),M.fillStyle=G,M.fillRect(0,0,L.width,L.height);const oe=M.getImageData(X,0,1,1).data;return`rgba(${oe[0]}, ${oe[1]}, ${oe[2]}, ${oe[3]/255})`}function O(w="hsl(0, 100%, 50%)",X=1){const L=V.current,M=L?.getContext("2d");if(!M||!L)return;L.width=L.clientWidth,L.height=L.clientHeight,M.clearRect(0,0,L.width,L.height),M.globalAlpha=X;const G=M.createLinearGradient(0,0,L.width,0);G.addColorStop(0,"#ffffff"),G.addColorStop(1,w);const oe=M.createLinearGradient(0,0,0,L.height);oe.addColorStop(0,"rgba(0, 0, 0, 0)"),oe.addColorStop(1,"#000000"),M.fillStyle=G,M.fillRect(0,0,L.width,L.height),M.fillStyle=oe,M.fillRect(0,0,L.width,L.height)}function le(w,X){const L=V.current;if(!L)return[0,0,0,255];const M=L.clientWidth,G=L.clientHeight,oe=Math.max(0,Math.min(1,w/M)),$e=Math.max(0,Math.min(1,X/G)),$=Math.round(Number(W.current.split(",")[0]?.replace("rgba(","").trim())/L.clientWidth*360),K=oe*100,fe=(1-$e)*100,he=Nn($||0,K,fe,te.current);return[Math.round(he.r),Math.round(he.g),Math.round(he.b),Math.round(he.a*255)]}function Ce(w,X,L,M=!1){const G=Tn(w,X,L,{top:!0,left:!0},{x:M?5:1,y:X.clientHeight},{x:M?-5:0});return{left:G.x,top:G.y}}function ne(w,X){let L=w[3]/255;L>=.98&&(L=1),L<=.02&&(L=0);const M=`rgba(${w[0]}, ${w[1]}, ${w[2]}, ${L})`,G=j({r:w[0],g:w[1],b:w[2],a:L});_(M),m(G),u(G)}function de(){const w=A.current,X=V.current;if(!w||!X)return;const L=Number(w.style.left.replace("px",""))+5,M=Number(w.style.top.replace("px","")),G=le(L,M);ne(G)}const ue=c.useRef(()=>{}),we=c.useRef(()=>{}),ce=c.useRef(()=>{}),Y=c.useRef(()=>{});c.useEffect(()=>{ue.current=w=>{R(w),ae(w),S(w)},we.current=()=>{H.current=!1,F.current=!1,z.current=!1},ce.current=w=>{w.touches[0]&&(R(w.touches[0]),ae(w.touches[0]),S(w.touches[0]))},Y.current=()=>{H.current=!1,F.current=!1,z.current=!1}}),c.useEffect(()=>{const w=G=>ue.current(G),X=()=>we.current(),L=G=>ce.current(G),M=()=>Y.current();return window.addEventListener("mousemove",w),window.addEventListener("mouseup",X),window.addEventListener("touchmove",L),window.addEventListener("touchend",M),()=>{window.removeEventListener("mousemove",w),window.removeEventListener("mouseup",X),window.removeEventListener("touchmove",L),window.removeEventListener("touchend",M)}},[]),c.useEffect(()=>{O();const w=setTimeout(()=>{Z()},100);return()=>clearTimeout(w)},[]);function R(w){if(!F.current)return;const X=E.current,L=J.current;if(!X||!L)return;const M=Ce(w,X,L);X.style.left=M.left+"px";const G=L.clientWidth-10;let oe=M.left/G;oe>=.98&&(oe=1),oe<=.02&&(oe=0),h(oe),te.current=oe,O(W.current,oe),de()}function ae(w){if(!H.current)return;const X=B.current,L=ee.current,M=J.current;if(!X||!L||!M)return;const G=Ce(w,X,L);X.style.left=G.left+"px";const oe=I(L,G.left);b(oe),W.current=oe;const $e=`linear-gradient(to right, #ffffff 0%, ${oe})`;k($e),O(oe,te.current),de()}function S(w){if(!z.current)return;const X=A.current,L=V.current;if(!X||!L)return;const M=Ce(w,X,L,!0);X.style.left=M.left+"px",X.style.top=M.top+"px";const G=le(M.left+5,M.top);ne(G)}function D(w){const X=V.current;if(!X)return{x:0,y:0};const L=typeof w.s=="string"?Number(w.s.replace("%","")):w.s??0,M=typeof w.v=="string"?Number(w.v.replace("%","")):w.v??0,G=Math.max(-5,Math.min(L/100*(X.clientWidth-5),X.clientWidth-5)),oe=Math.max(0,Math.min((1-M/100)*X.clientHeight,X.clientHeight));return{x:G,y:oe}}const Z=c.useCallback(()=>{const w=B.current,X=E.current,L=A.current,M=ee.current,G=J.current;if(!w||!X||!L||!M||!G)return;const $e=U(p,ie.current),$=Math.min(1,($e.h??0)/360),K=Math.min(M.clientWidth-10,Math.max(0,(M.clientWidth-10)*$)),fe=G.clientWidth-10,he=Math.min(fe,Math.max(0,fe*($e.a??1))),ke=fe>0?he/fe:1;h(ke),te.current=ke,w.style.left=K+"px",X.style.left=he+"px";const xe=I(M,K);b(xe),W.current=xe;const Ie=`linear-gradient(to right, #ffffff 0%, ${xe})`;k(Ie),O(xe,ke);const Ze=typeof $e.s=="string"?Number($e.s.replace("%","")):$e.s??0,We=typeof $e.v=="string"?Number($e.v.replace("%","")):$e.v??0,Yr=Nn($e.h??0,Ze,We,$e.a??1);_(Us(Yr));const Ss=D($e);L.style.left=Ss.x+"px",L.style.top=Ss.y+"px"},[p]);function ve(){T(!0),setTimeout(()=>{T(!1),f(w=>{const X=w+1>Qe.length-1?0:w+1;return _e(X),X})},600)}function Ne(){P(!0),setTimeout(()=>{P(!1),f(w=>{const X=w-1<0?Qe.length-1:w-1;return _e(X),X})},600)}function _e(w){ie.current=w;const X=Ws(C);if(!X)return;const L=j(X);m(L),u(L)}const Q=Qe[d],ge=Qe[d+1>Qe.length-1?0:d+1],je=Qe[d-1<0?Qe.length-1:d-1];return e.jsxs("div",{className:g(Pe.colorPicker,o&&Pe.noShadow,a&&Pe.disabled,l),"data-component":"ColorPicker",children:[e.jsxs("div",{className:Pe.colorAreaWrapper,children:[e.jsx("span",{ref:A,className:Pe.colorAreaCursor,style:{left:"-5px",top:"0px"},onMouseDown:w=>{a||(z.current=!0,S(w))},onTouchStart:w=>{a||(z.current=!0,S(w.touches[0]))}}),e.jsx("canvas",{ref:V,className:Pe.colorArea,onMouseDown:w=>{a||(z.current=!0,S(w))},onTouchStart:w=>{a||(z.current=!0,S(w.touches[0]))}})]}),e.jsxs("div",{className:"flex items-center gap-sm",children:[e.jsx("div",{className:Pe.colorCircle,style:{background:C}}),e.jsxs("div",{className:"flex flex-col gap-xs w-full",children:[e.jsx("div",{ref:ee,className:g(Pe.sliderTrack,Pe.hueTrack,"slider"),onMouseDown:w=>{a||(H.current=!0,ae(w))},onTouchStart:w=>{a||(H.current=!0,ae(w.touches[0]))},children:e.jsx("span",{ref:B,className:g(Pe.sliderCursor),style:{left:"0px"},onMouseDown:w=>{w.stopPropagation(),!a&&(H.current=!0)},onTouchStart:w=>{w.stopPropagation(),!a&&(H.current=!0)}})}),r&&e.jsx("div",{ref:J,className:g(Pe.sliderTrack,Pe.opacityTrack,"slider"),style:{background:N},onMouseDown:w=>{a||(F.current=!0,R(w))},onTouchStart:w=>{a||(F.current=!0,R(w.touches[0]))},children:e.jsx("span",{ref:E,className:g(Pe.sliderCursor),style:{left:"0px"},onMouseDown:w=>{w.stopPropagation(),!a&&(F.current=!0)},onTouchStart:w=>{w.stopPropagation(),!a&&(F.current=!0)}})})]})]}),e.jsxs("div",{className:"flex items-center gap-sm",children:[e.jsx("input",{type:"text",className:g(Pe.colorInput,"flex-1"),value:p,onChange:w=>{m(w.target.value),u(w.target.value),setTimeout(()=>Z(),0)},disabled:a}),e.jsxs("div",{className:"flex items-center gap-xxs",children:[e.jsxs("div",{className:"flex flex-col items-center overflow-hidden relative h-lg w-fit text-neutral-interaction-default",children:[y&&e.jsx("p",{className:"font-bold",style:{animation:"slide-down 0.6s ease"},children:ge.toUpperCase()}),e.jsx("p",{className:"font-bold",style:{animation:y?"slide-down 0.6s ease":q?"slide-up 0.6s ease":void 0},children:Q.toUpperCase()}),q&&e.jsx("p",{className:"font-bold",style:{animation:"slide-up 0.6s ease"},children:je.toUpperCase()})]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx(re,{name:"arrow_drop_up",className:"cursor-pointer text-neutral-interaction-default text-sm leading-none",onClick:a?void 0:Ne,style:{fontFamily:"Material Symbols Outlined",userSelect:"none"},"aria-label":"Previous color type"}),e.jsx(re,{name:"arrow_drop_down",className:"cursor-pointer text-neutral-interaction-default text-sm leading-none",onClick:a?void 0:ve,style:{fontFamily:"Material Symbols Outlined",userSelect:"none"},"aria-label":"Next color type"})]})]})]}),e.jsx("div",{className:Pe.typeToggles,children:Qe.map(w=>e.jsx("button",{type:"button",className:g(Pe.typeToggle,w===Q&&Pe.active),onClick:()=>{if(a)return;const X=Qe.indexOf(w);f(X),ie.current=X,_e(X)},disabled:a,children:w.toUpperCase()},w))})]})}const De={input:"_input_1a8ld_2",inputContainer:"_inputContainer_1a8ld_2",focused:"_focused_1a8ld_2",error:"_error_1a8ld_2",disabled:"_disabled_1a8ld_2",inputContent:"_inputContent_1a8ld_2",left:"_left_1a8ld_2",center:"_center_1a8ld_2",right:"_right_1a8ld_2",labelRow:"_labelRow_1a8ld_2",counter:"_counter_1a8ld_2",errorMessage:"_errorMessage_1a8ld_2",numberArrows:"_numberArrows_1a8ld_2"};function En({children:t}){return e.jsx(e.Fragment,{children:t})}function Ln({children:t}){return e.jsx(e.Fragment,{children:t})}const Dt=c.forwardRef(function(s,n){const{value:r,defaultValue:a,onChange:o,labelValue:l,type:i="text",mask:u,max:d,min:f,step:p=1,errorMessage:m,infoMessage:x,disabled:b=!1,isError:v=!1,required:h=!1,placeholder:C="",textAlign:_,tooltipMinWidth:y,icon:T,appendIcon:q,onFocus:P,onBlur:N,children:k,className:H}=s,[F,z]=pe({value:r,defaultValue:a??"",onChange:o}),[B,E]=c.useState(!1),[A,V]=c.useState(!1),[ee,J]=c.useState(!1),[W,te]=c.useState(""),ie=c.useRef(null),j=ce=>{ie.current=ce,typeof n=="function"?n(ce):n&&(n.current=ce)};let U=null,I=null;c.Children.forEach(k,ce=>{if(!c.isValidElement(ce))return;const Y=ce.props;ce.type===En&&(U=Y.children),ce.type===Ln&&(I=Y.children)});const O=i==="password"?ee?"text":"password":i==="number"||i==="search"||i==="email"||i==="url"||i==="domain"||i==="color"?"text":i;function le(ce){let Y=ce.target.value;if(u&&i==="text"&&(Y=Qt(Y,u)),d&&i==="text"&&(Y=Y.slice(0,d)),i==="number"){const R=Number(Y);isNaN(R)||(f!=null&&R<f?Y=String(f):d!=null&&R>d&&(Y=String(d)))}z(Y)}function Ce(){E(!0),P?.()}function ne(){E(!1);const ce=F??"";if(i==="email")V(!Hs(ce));else if(i==="domain"){const Y=!ce||zs(ce);V(!Y),te(ce&&!Y?"Invalid domain":"")}else if(i==="url"){const Y=!ce||An(ce);V(!Y),te(ce&&!Y?"Invalid URL":"")}N?.()}function de(){const Y=((isNaN(Number(F))?0:Number(F))*1e3+(p||1)*1e3)/1e3;z(String(d!=null?Math.min(Y,d):Y))}function ue(){const Y=((isNaN(Number(F))?0:Number(F))*1e3-(p||1)*1e3)/1e3;z(String(f!=null?Math.max(Y,f):Y))}const we=v||A;if(i==="color"){const ce=F??"#000000ff";return e.jsxs("div",{className:g(De.input,H),children:[(l||d!==void 0)&&e.jsx("div",{className:De.labelRow,children:e.jsx(gt,{labelValue:l,infoMessage:x,tooltipMinWidth:y,required:h})}),e.jsxs("div",{className:g(De.inputContainer,"flex items-center",b&&De.disabled),children:[e.jsx("input",{ref:j,type:"text",className:g(De.inputContent),value:ce,onChange:Y=>{z(Y.target.value)},disabled:b,placeholder:"#000000ff"}),e.jsx(xt,{card:e.jsx(en,{value:ce,onChange:Y=>z(Y)}),children:e.jsx("button",{type:"button",style:{width:"1.5em",height:"1.5em",background:ce,border:"1px solid var(--color-neutral-default, #ccc)",borderRadius:"4px",cursor:b?"not-allowed":"pointer",flexShrink:0},disabled:b,"aria-label":"Open color picker"})})]}),(m||W)&&(we||!!W)&&e.jsx("p",{className:De.errorMessage,children:m||W})]})}return e.jsxs("div",{className:g(De.input,H),children:[(l||d!==void 0)&&e.jsxs("div",{className:De.labelRow,children:[e.jsx(gt,{labelValue:l,infoMessage:x,tooltipMinWidth:y,required:h}),i==="text"&&d!==void 0&&e.jsxs("span",{className:De.counter,children:[(F??"").length,"/",d]})]}),e.jsxs("div",{className:"flex items-center h-fit",children:[e.jsxs("div",{className:g(De.inputContainer,"flex-1",B&&De.focused,we&&De.error,b&&De.disabled),children:[i==="search"?e.jsx(re,{name:"search",className:"text-neutral-foreground-low"}):T?e.jsx(re,{name:T}):U||null,e.jsx("input",{ref:j,type:O,className:g(De.inputContent,_&&De[_]),value:F??"",onChange:le,onFocus:Ce,onBlur:ne,placeholder:C,disabled:b,spellCheck:!1}),i==="password"?e.jsx(re,{name:ee?"visibility_off":"visibility",className:"cursor-pointer",onClick:()=>J(!ee)}):q?e.jsx(re,{name:q}):I||null]}),i==="number"&&e.jsxs("div",{className:g(De.numberArrows,"ml-xxs"),children:[e.jsx(re,{name:"arrow_drop_up",className:"arrow-icon",onClick:de}),e.jsx(re,{name:"arrow_drop_down",className:"arrow-icon",onClick:ue})]})]}),(m||W)&&(we||!!W)&&e.jsx("p",{className:De.errorMessage,children:m||W})]})});Dt.PrependIcon=En,Dt.AppendIcon=Ln;function Gs({value:t,defaultValue:s,onChange:n,options:r,disabled:a=!1,labelValue:o="",isError:l=!1,errorMessage:i="",infoMessage:u="",required:d=!1,placeholder:f="Search...",className:p}){const[m,x]=pe({value:t,defaultValue:s??null,onChange:n}),[b,v]=c.useState(!1);let h=!1;function C(P,N){N?.source=="blur"?v(P&&h):v(h?!0:P)}function _(P){h=P}const y=r.filter(P=>String(P).toLowerCase().includes(m?.toLowerCase()||""));function T(P){a||(x(P),v(!1))}const q=y.length>0?y.map((P,N)=>e.jsx(Jt,{selected:m===P,onClick:()=>T(P),children:P},N)):[e.jsx("div",{className:Os.noResults,children:"No options match your search"},"no-results")];return e.jsx("div",{onClick:()=>setTimeout(()=>C(h)),children:e.jsx(Ot,{value:b,onChange:C,labelValue:o,absolute:!0,disabled:a,isError:l,errorMessage:i,infoMessage:u,required:d,options:q,label:e.jsx(Dt,{value:m,disabled:a,isError:l,infoMessage:u,placeholder:f,appendIcon:"unfold_more",onChange:x,onFocus:()=>{_(!0)},onBlur:()=>_(!1)}),className:g("auto-complete",p)})})}const et={avatar:"_avatar_qygx1_2",avatarImg:"_avatarImg_qygx1_2",avatarInitials:"_avatarInitials_qygx1_2",small:"_small_qygx1_2",smallInitials:"_smallInitials_qygx1_2",medium:"_medium_qygx1_2",mediumInitials:"_mediumInitials_qygx1_2",large:"_large_qygx1_2",largeInitials:"_largeInitials_qygx1_2"};function Ys(t){if(!t)return"";const s=t.trim().split(" ");return s.length>1?(s[0][0]+s[s.length-1][0]).toUpperCase():t.slice(0,2).toUpperCase()}function Bt({name:t,src:s,alt:n,size:r="medium",className:a}={}){const o=Ys(t),l=r==="small"?et.small:r==="large"?et.large:et.medium,i=r==="small"?et.smallInitials:r==="large"?et.largeInitials:et.mediumInitials;return e.jsxs("div",{className:g(et.avatar,l,a),children:[s&&e.jsx("img",{className:et.avatarImg,src:s,alt:n||t}),e.jsx("span",{className:g(et.avatarInitials,i,s&&"opacity-0"),children:o})]})}const Mn={spinner:"_spinner_e0zgt_2",path:"_path_e0zgt_2"};function tn({className:t}={}){return e.jsx("svg",{className:g(Mn.spinner,t),viewBox:"0 0 50 50",children:e.jsx("circle",{className:Mn.path,cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"8",shapeRendering:"geometricPrecision"})})}const tt={badge:"_badge_3jfyt_2",label:"_label_3jfyt_2",small:"_small_3jfyt_2",medium:"_medium_3jfyt_2",large:"_large_3jfyt_2",secondary:"_secondary_3jfyt_2",heavy:"_heavy_3jfyt_2",colored:"_colored_3jfyt_2",clickable:"_clickable_3jfyt_2"};function On({labelValue:t="",color:s="",size:n="medium",type:r="default",loading:a=!1,closeable:o=!1,icon:l="",isAppendedIcon:i=!1,children:u,className:d,onClose:f}){const p=i?"":l,m=o?"close":i?l:"",x=r==="secondary"?"transparent":r==="heavy"?s:Ke(s),b=s?{color:s,borderColor:s,background:x}:{};return e.jsx("div",{className:g(tt.badge,tt[n],tt[r],d),style:b,children:a?e.jsx(tn,{className:tt.colored}):e.jsxs(e.Fragment,{children:[p&&e.jsx(re,{name:p,className:tt.colored}),e.jsx("p",{className:g(tt.colored,tt.label),children:u||t}),m&&e.jsx("span",{className:g(o&&tt.clickable,"leading-none"),onClick:o?f:void 0,children:e.jsx(re,{name:m,className:tt.colored})})]})})}const ut={breadcrumb:"_breadcrumb_130ur_2",itemWrapper:"_itemWrapper_130ur_2",option:"_option_130ur_2",active:"_active_130ur_2",moreOptions:"_moreOptions_130ur_2",subOption:"_subOption_130ur_2",moreIcon:"_moreIcon_130ur_2"};function Xs({value:t,defaultValue:s,onChange:n,options:r=[],labelKey:a="label",valueKey:o="value",getObject:l=!1,className:i}){const[u,d]=pe({value:t,defaultValue:s,onChange:n}),[f,p]=c.useState([]);function m(C){return Se(C)?C[a]:String(C)}function x(C){return Se(C)?C[o]:C}function b(C){const _=x(C);return x(u)==_}function v(C){const _=l?C:x(C);p(f.map(()=>!1)),setTimeout(()=>{d(_)},200)}const h=(()=>{if(!r?.length)return[];const C=[...r];let _=C.findIndex(T=>b(T));_===-1&&(_=0);const y=[];for(let T=0;T<C.length;T++)T===0||T===C.length-1||_===0&&T<2||_===C.length-1&&T>=C.length-2||_-1===T||_+1===T||_===T?y.push(C[T]):T===1&&_>1?y.push({icon:"more_horiz",options:C.slice(1,_-1)}):T===C.length-2&&_<C.length-2&&y.push({icon:"more_horiz",options:C.slice(_+2,C.length-1)});return y})();return e.jsx("div",{className:g(ut.breadcrumb,i),children:h.map((C,_)=>e.jsxs("span",{className:ut.itemWrapper,children:[Se(C)&&C.icon==="more_horiz"?e.jsx(xt,{value:f[_],onChange:y=>{const T=[...f];T[_]=y,p(T)},card:e.jsx("div",{className:ut.moreOptions,children:C.options.map((y,T)=>e.jsx("div",{className:ut.subOption,onClick:()=>v(y),children:m(y)},T))}),children:e.jsx(re,{name:"more_horiz",className:ut.moreIcon})}):e.jsx("h5",{className:g(ut.option,b(C)&&ut.active),onClick:()=>v(C),children:m(C)}),_<h.length-1&&e.jsx(re,{name:"chevron_right"})]},_))})}const He={button:"_button_1m59u_2",progress:"_progress_1m59u_2",progressComplete:"_progressComplete_1m59u_2",buttonLabel:"_buttonLabel_1m59u_2",label:"_label_1m59u_2",invisible:"_invisible_1m59u_2",pointerEventsNone:"_pointerEventsNone_1m59u_2",disabled:"_disabled_1m59u_2",round:"_round_1m59u_2",alwaysOpen:"_alwaysOpen_1m59u_2",hovered:"_hovered_1m59u_2",spinner:"_spinner_1m59u_2"};function Be({id:t,name:s,type:n="button",color:r="primary",size:a="medium",variant:o="default",disabled:l=!1,loading:i=!1,progress:u=0,icon:d="",round:f=!1,alwaysOpen:p=!1,background:m="",children:x,className:b,onClick:v}){const[h,C]=c.useState(!1),_=!!(u>0||i),y=d||(f?r==="danger"||r==="warning"||r==="neutral"?"close":"add":""),T=(()=>{const P={};if(l)return P;if(m&&o!=="plain"&&(P.borderColor=m),m&&o!=="default"?P.color=m:m&&(P.background=m),h&&typeof document<"u")if(m&&o==="default"){const N=Ke(m,.5,[0,0,0]);P.background=N,P.borderColor=N}else m&&o==="reverse"?(P.background=m,P.color="white"):m&&(P.background=Ke(m,.4));return P})(),q=s||t?"label":"div";return e.jsxs("button",{id:t,name:s||t,type:n,disabled:l,className:g(He.button,o,a,r,{[He.disabled]:l,disabled:l,[He.round]:f,round:f,[He.pointerEventsNone]:_,[He.alwaysOpen]:f&&p,"always-open":f&&p,[He.hovered]:h,hovered:h},b),style:T,onMouseOver:()=>C(!0),onMouseOut:()=>C(!1),onClick:v,children:[_&&e.jsx("div",{className:g(He.progress,u===1&&He.progressComplete),style:{width:`${u*100}%`}}),_&&e.jsx(tn,{className:He.spinner}),(x||f||y)&&e.jsxs(q,{htmlFor:s||t,className:g(He.buttonLabel,_&&He.invisible),children:[y&&e.jsx(re,{name:y}),x&&e.jsx("span",{className:He.label,children:x})]})]})}const me={calendar:"_calendar_7ms0e_2",header:"_header_7ms0e_2",monthYear:"_monthYear_7ms0e_2",navButton:"_navButton_7ms0e_2",weekdayHeader:"_weekdayHeader_7ms0e_2",dayCell:"_dayCell_7ms0e_2",disabled:"_disabled_7ms0e_2",outsideMonth:"_outsideMonth_7ms0e_2",selectedPrimary:"_selectedPrimary_7ms0e_2",selectedSecondary:"_selectedSecondary_7ms0e_2",noDate:"_noDate_7ms0e_2",dayLabel:"_dayLabel_7ms0e_2",hoveredPrimary:"_hoveredPrimary_7ms0e_2",rangePrimary:"_rangePrimary_7ms0e_2",hoveredSecondary:"_hoveredSecondary_7ms0e_2",rangeSecondary:"_rangeSecondary_7ms0e_2",isCompare:"_isCompare_7ms0e_2",isBigger:"_isBigger_7ms0e_2",isSmaller:"_isSmaller_7ms0e_2",start:"_start_7ms0e_2",middle:"_middle_7ms0e_2",end:"_end_7ms0e_2",splitOverlay:"_splitOverlay_7ms0e_2",halfPrimary:"_halfPrimary_7ms0e_2",halfSecondary:"_halfSecondary_7ms0e_2",halfHover:"_halfHover_7ms0e_2",today:"_today_7ms0e_2",grid:"_grid_7ms0e_2",doubleCalendar:"_doubleCalendar_7ms0e_2",doubleGrid:"_doubleGrid_7ms0e_2",slideContainer:"_slideContainer_7ms0e_2","slide-fade-forward":"_slide-fade-forward_7ms0e_2","slide-in-right":"_slide-in-right_7ms0e_1","slide-fade-back":"_slide-fade-back_7ms0e_2","slide-in-left":"_slide-in-left_7ms0e_1",dateDialog:"_dateDialog_7ms0e_2",dialogHeader:"_dialogHeader_7ms0e_2",headerToggle:"_headerToggle_7ms0e_2",headerToggleActive:"_headerToggleActive_7ms0e_2",monthGrid:"_monthGrid_7ms0e_2",monthButton:"_monthButton_7ms0e_2",monthActive:"_monthActive_7ms0e_2",yearList:"_yearList_7ms0e_2",yearButton:"_yearButton_7ms0e_2",yearActive:"_yearActive_7ms0e_2",dialogEnter:"_dialogEnter_7ms0e_2",dialogFadeIn:"_dialogFadeIn_7ms0e_1",dialogLeave:"_dialogLeave_7ms0e_2",dialogFadeOut:"_dialogFadeOut_7ms0e_1"};function Pn({date:t,rangePrimary:s,rangeSecondary:n,selectedPrimary:r,selectedSecondary:a,hoveredPrimary:o,hoveredSecondary:l,isCompare:i,differencePrimary:u,differenceSecondary:d,showSplit:f,splitIsSecondary:p,isToday:m,isOutsideMonth:x,isDisabled:b,position:v,onClick:h,onMouseEnter:C,onMouseLeave:_}){return t?e.jsxs("div",{className:g(me.dayCell,me[v],s&&me.rangePrimary,n&&me.rangeSecondary,r&&me.selectedPrimary,a&&me.selectedSecondary,o&&me.hoveredPrimary,l&&me.hoveredSecondary,i&&me.isCompare,u&&me[u],d&&me[d],m&&me.today,x&&me.outsideMonth,b&&me.disabled),onClick:b?void 0:h,onMouseEnter:C,onMouseLeave:_,role:"gridcell","aria-selected":r||a,children:[f&&e.jsxs("div",{className:me.splitOverlay,children:[e.jsx("div",{className:me.halfPrimary}),e.jsx("div",{className:p?me.halfSecondary:me.halfHover})]}),e.jsx("span",{className:me.dayLabel,children:t.getDate()})]}):e.jsx("div",{className:me.dayCell})}function Dn({months:t,currentMonth:s,currentYear:n,isOpen:r,header:a,onSelectMonth:o,onSelectYear:l}){const[i,u]=c.useState("month"),d=c.useRef(null),f=[];for(let m=n-10;m<=n+10;m++)f.push(m);function p(){if(typeof a=="function")return 0;const m=a.current;return`${m?m.scrollHeight:0}px`}return c.useEffect(()=>{if(i==="year"&&d.current){const m=d.current.querySelector(`.${me.yearActive}`);m&&m.scrollIntoView({block:"center",behavior:"smooth"})}},[i]),e.jsxs(pt,{className:g(me.dateDialog,r?me.dialogEnter:me.dialogLeave),style:{top:p()},children:[e.jsxs("div",{className:me.dialogHeader,children:[e.jsx("button",{className:g(me.headerToggle,i==="month"&&me.headerToggleActive),onClick:()=>u(m=>m==="month"?null:"month"),children:t[s]?.label??""}),e.jsx("button",{className:g(me.headerToggle,i==="year"&&me.headerToggleActive),onClick:()=>u(m=>m==="year"?null:"year"),children:n})]}),i==="month"&&e.jsx("div",{className:me.monthGrid,children:t.map(m=>e.jsx("button",{className:g(me.monthButton,m.value===s&&me.monthActive),onClick:()=>{o(m.value),u(null)},children:m.label},m.value))}),i==="year"&&e.jsx("div",{className:me.yearList,ref:d,children:f.map(m=>e.jsx("button",{className:g(me.yearButton,m===n&&me.yearActive),onClick:()=>{l(m),u(null)},children:m},m))})]})}function nn(t,s){return t.getFullYear()===s.getFullYear()&&t.getMonth()===s.getMonth()&&t.getDate()===s.getDate()}function Zs(t,s,n,r){const a=t.toISOString().substring(0,10);return!!(s&&a<s.toISOString().substring(0,10)||n&&a>n.toISOString().substring(0,10)||r?.some(o=>nn(o,t)))}function St(t,s,n){return t?s==="compare"?t[n]??[]:t:[]}function Vt(t,s,n,r,a){if(!s||r>0&&n!=="compare")return!1;const o=St(s,n,r);return o.length>1&&o[0]instanceof Date&&o[1]instanceof Date?Sn(o[0],o[1],t,a):a&&o[0]instanceof Date&&o[0].toISOString().substring(0,10)===t.toISOString().substring(0,10)}function Bn(t,s,n,r,a){if(!r||!s||n==="date"||a>0)return!1;const o=St(s,n,a);return o.length===1&&Sn(o[0],r,t)}function Vn(t,s,n,r,a){if(!s||n==="date")return!1;const o=St(s,n,a),l=t.toISOString().substring(0,10);let i=r?.toISOString().substring(0,10);const u=o[0]?.toISOString().substring(0,10);return o.length>1&&(i=o[1]?.toISOString().substring(0,10)),u!==l&&l!==i||(i===l&&(i=u),!i||!l)?!1:l<i?"isBigger":l>i?"isSmaller":!1}function Js(t,s,n,r,a,o,l,i){const u=nn(t,r),d=Zs(t,o,l,i),f=n!=="date",p=Vt(t,s,n,0,!1),m=Vt(t,s,n,1,!1),x=Vt(t,s,n,0,!0),b=Vt(t,s,n,1,!0),v=Bn(t,s,n,a,0),h=Bn(t,s,n,a,1),C=Vn(t,s,n,a,0),_=Vn(t,s,n,a,1),y=St(s,n,0),T=St(s,n,1),q=n!=="date"&&x&&(a!==null&&nn(a,t)&&y.length>1||b)&&(T.length<2||b);return{rangePrimary:p,rangeSecondary:m,selectedPrimary:x,selectedSecondary:b,hoveredPrimary:v,hoveredSecondary:h,isCompare:f,differencePrimary:C,differenceSecondary:_,showSplit:q,splitIsSecondary:b,isToday:u,isDisabled:d}}function Ks(t){const s=new Date;if(!t)return{month:s.getMonth(),year:s.getFullYear()};if(t instanceof Date)return{month:t.getMonth(),year:t.getFullYear()};if(Array.isArray(t)&&t.length>0){const n=Array.isArray(t[0])?t[0][0]:t[0];if(n instanceof Date)return{month:n.getMonth(),year:n.getFullYear()}}return{month:s.getMonth(),year:s.getFullYear()}}function Ft({value:t,defaultValue:s,onChange:n,type:r="date",doubleCalendar:a=!1,minDate:o,maxDate:l,disabledDates:i,lang:u="en",className:d}){const f=Ks(t??s),[p,m]=c.useState(f.month),[x,b]=c.useState(f.year),[v,h]=c.useState(!1),[C,_]=c.useState(0),[y,T]=c.useState(null),q=c.useRef(null),P=c.useRef(!1),{isMounted:N,isActive:k}=Je(C%2===0,{duration:300}),[H,F]=c.useState(()=>Kt(s,r)),z=t!==void 0?Kt(t,r):H,B=new Date,E=new Date(x,p,1),A=In(E),V=qs(u),ee=p===11?0:p+1,J=p===11?x+1:x,W=new Date(J,ee,1),te=In(W),ie=[],j=new Date("2021-10-03T23:15:30");for(let Y=0;Y<7;Y++){const R=j.toLocaleDateString(u,{weekday:"short"});ie.push(R.charAt(0).toUpperCase()+R.charAt(1).toLowerCase()),j.setDate(j.getDate()+1)}const U=$n(new Date(x,p,1).toLocaleDateString(u,{year:"numeric",month:"long"})),I=$n(new Date(J,ee,1).toLocaleDateString(u,{year:"numeric",month:"long"}));function O(){P.current=!0,_(Y=>Y+1),p===0?(m(11),b(Y=>Y-1)):m(Y=>Y-1)}function le(){P.current=!1,_(Y=>Y+1),p===11?(m(0),b(Y=>Y+1)):m(Y=>Y+1)}function Ce(Y){let R;if(r==="date")R=[Y];else if(r==="period"){const ae=z;if(ae.length===0||ae.length>=2)R=[Y];else{const[S]=ae;Y<S?R=[Y,S]:R=[S,Y]}}else{const ae=z;let S=[...ae[0]??[]],D=[...ae[1]??[]];(!ae[0]||D.length>1)&&(S=[],D=[]);const Z=S.length>1?1:0,ve=Z===0?S:D;let Ne;ve.length>1||ve.length===0?Ne=[Y]:Y<ve[0]?Ne=[Y,ve[0]]:Ne=[ve[0],Y],Z===0?R=[Ne,D]:R=[S,Ne]}t===void 0&&F(R),n&&(console.log("aqui"),n(r==="date"?Y:R))}function ne(Y){P.current=Y<p,_(R=>R+1),m(Y),h(!1)}function de(Y){P.current=Y<x,_(R=>R+1),b(Y),h(!1)}function ue(Y,R){return R===0?"start":Y.length-1===R?"end":"middle"}const we=P.current?me["slide-fade-back"]:me["slide-fade-forward"];function ce(Y,R){return e.jsxs("div",{role:"grid","aria-label":R,children:[e.jsx("div",{className:me.grid,children:ie.map(ae=>e.jsx("div",{className:me.weekdayHeader,children:ae},ae))}),Y.filter(ae=>ae.some(S=>S)).map((ae,S)=>e.jsx("div",{className:me.grid,children:ae.map((D,Z)=>{if(!D)return e.jsx("div",{className:me.noDate},Z);const ve=Js(D,z,r,B,y,o,l,i);return e.jsx(Pn,{date:D,position:ue(ae,Z),...ve,isOutsideMonth:!1,onClick:()=>Ce(D),onMouseEnter:()=>T(D),onMouseLeave:()=>T(null)},Z)})},S))]})}return e.jsxs("div",{className:g(me.calendar,a&&me.doubleCalendar,d),children:[e.jsxs("div",{className:me.header,ref:q,children:[e.jsx("button",{className:me.navButton,onClick:O,"aria-label":"Previous month",children:e.jsx(re,{name:"chevron_left"})}),e.jsx("span",{className:me.monthYear,onClick:()=>h(Y=>!Y),children:a?`${U} – ${I}`:U}),e.jsx("button",{className:me.navButton,onClick:le,"aria-label":"Next month",children:e.jsx(re,{name:"chevron_right"})})]}),v&&e.jsx(Dn,{header:q,months:V,currentMonth:p,currentYear:x,isOpen:v,onSelectMonth:ne,onSelectYear:de}),e.jsx("div",{className:me.slideContainer,children:e.jsxs("div",{className:g(we,a&&me.doubleGrid),children:[ce(A,U),a&&ce(te,I)]},C)})]})}Ft.Day=Pn,Ft.DateDialog=Dn;const Me={carousel:"_carousel_1dpr0_2",content:"_content_1dpr0_2",vertical:"_vertical_1dpr0_2",overflow:"_overflow_1dpr0_2",track:"_track_1dpr0_2",section:"_section_1dpr0_2",slide:"_slide_1dpr0_2",navButton:"_navButton_1dpr0_2",indicators:"_indicators_1dpr0_2",indicator:"_indicator_1dpr0_2",indicatorActive:"_indicatorActive_1dpr0_2",indicatorDisabled:"_indicatorDisabled_1dpr0_2"};function Qs({value:t,defaultValue:s,onChange:n,options:r,visible:a=1,vertical:o=!1,autoplay:l=!1,autoplayInterval:i=3e3,showArrows:u=!0,disabled:d=!1,circular:f=!1,children:p,className:m}){const[x,b]=pe({value:t,defaultValue:s??0,onChange:n}),v=c.useRef(null),[h,C]=c.useState("-0px"),[_,y]=c.useState({}),T=Math.ceil(r.length/a),q=x??0,P=[];for(let J=0;J<r.length;J+=a)P.push(r.slice(J,J+a));const N=T-1;function k(J){if(!d){if(J>N){if(!f)return;J=0}else if(J<0){if(!f)return;J=N}b(J)}}function H(){if(!v.current){y({}),C("-0px");return}const J=v.current.children;if(J.length===0){y({}),C("-0px");return}const W=getComputedStyle(document.documentElement).getPropertyValue("--spacing-xs"),te=parseFloat(W)||0;let ie=0,j=0;const U=J[q];U&&(o?ie=Math.max(ie,U.offsetHeight):ie+=U.offsetWidth);for(let I=0;I<q;I++){const le=J[I].getBoundingClientRect();o?j+=le.height:j+=le.width,q>0&&(j+=te)}C(`-${Math.floor(j)}px`),y({width:o?"":`${ie}px`,height:o?`${ie}px`:""})}c.useLayoutEffect(()=>{H()},[x,r.length,a]);const F=c.useRef(q);F.current=q;const z=c.useRef(N);z.current=N;const B=c.useRef(f);B.current=f,c.useEffect(()=>{if(!l||d)return;const J=setInterval(()=>{const W=F.current,te=z.current,ie=B.current,j=W+1;j>te?b(ie?0:W):b(j)},i);return()=>clearInterval(J)},[l,i,r.length,a,d,f]);function E(){k(q-1)}function A(){k(q+1)}const V=d||q===0&&!f,ee=d||q>=N&&!f;return e.jsxs("div",{className:g(Me.carousel,m),children:[e.jsxs("div",{className:g(Me.content,o&&Me.vertical),children:[u&&e.jsx("button",{className:g(Me.navButton,Me.prevButton,o&&Me.vertical),onClick:E,"aria-label":"Previous slide",disabled:V,children:e.jsx(re,{name:o?"expand_less":"chevron_left"})}),e.jsx("div",{className:Me.overflow,style:{width:"100%",overflow:"hidden",..._},children:e.jsx("div",{ref:v,className:g(Me.track,o&&Me.vertical),style:{transform:`translate${o?"Y":"X"}(${h})`},children:P.map((J,W)=>e.jsx("div",{className:Me.section,...W!==q?{inert:!0}:{},children:J.map((te,ie)=>e.jsx("div",{className:Me.slide,children:p?.(te,W*a+ie)},ie))},W))})}),u&&e.jsx("button",{className:g(Me.navButton,Me.nextButton,o&&Me.vertical),onClick:A,"aria-label":"Next slide",disabled:ee,children:e.jsx(re,{name:o?"expand_more":"chevron_right"})})]}),e.jsx("div",{className:Me.indicators,children:Array.from({length:T}).map((J,W)=>e.jsx("button",{className:g(Me.indicator,W===q&&Me.indicatorActive,d&&Me.indicatorDisabled),onClick:()=>!d&&b(W),"aria-label":`Go to slide ${W+1}`},W))})]})}const bt={checkbox:"_checkbox_19ecb_2",rhs:"_rhs_19ecb_2",disabled:"_disabled_19ecb_2",box:"_box_19ecb_2",active:"_active_19ecb_2",indeterminate:"_indeterminate_19ecb_2"};function dt({id:t,name:s,value:n,defaultValue:r,onChange:a,rhs:o=!1,allowIndeterminate:l=!1,disabled:i=!1,children:u,className:d}){const[f,p]=pe({value:n,defaultValue:r??!1,onChange:a});function m(){i||p(l?f===!0?null:f!==null:!f)}const x=()=>u?t||s?e.jsx("label",{htmlFor:t||s,className:"text-sm cursor-[inherit]",children:u}):e.jsx("span",{className:"text-sm",children:u}):null;return e.jsxs("div",{role:"checkbox","aria-checked":f===null?"mixed":!!f,"aria-disabled":i,className:g(bt.checkbox,o&&bt.rhs,i&&bt.disabled,d),onClick:m,children:[e.jsxs("div",{className:g(bt.box,f===!0&&bt.active,f===null&&bt.indeterminate),children:[f===!0&&e.jsx("svg",{viewBox:"0 0 16 16",className:"w-full h-full",fill:"none",children:e.jsx("path",{d:"M3.5 8L6.5 11L12.5 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),f===null&&e.jsx("svg",{viewBox:"0 0 16 16",className:"w-full h-full",fill:"none",children:e.jsx("line",{x1:"4",y1:"8",x2:"12",y2:"8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})]}),x()]})}function Fn({value:t=!1,zIndex:s=1e3,onClick:n,children:r,className:a}){const{isMounted:o,isActive:l}=Je(t,{duration:500});return e.jsx(e.Fragment,{children:o&&jt.createPortal(e.jsxs(e.Fragment,{children:[e.jsx("div",{className:g("overlay-backdrop",l&&"active",a),style:{zIndex:s},onClick:n}),r]}),document.body)})}function sn({value:t,onChange:s,width:n="fit-content",height:r="fit-content",noOutsideClose:a=!1,children:o,className:l}){const[i,u]=pe({value:t,defaultValue:!1,onChange:s}),{isMounted:d,isActive:f}=Je(i??!1,{duration:500}),p=c.useRef(null);function m(){a?(p.current?.classList.add("no-outside-close-warning"),setTimeout(()=>{p.current?.classList.remove("no-outside-close-warning")},100)):u(!1)}return e.jsx(Fn,{value:i,zIndex:1002,onClick:m,children:d&&e.jsx("div",{ref:p,className:g("dialog",f&&"active",l),style:{width:n,height:r},children:o})})}const qn=c.createContext(null),er=500;function Hn({children:t}){const[s,n]=c.useState(null),[r,a]=c.useState(!1),o=c.useRef(null),l=c.useRef(null);function i(d){return l.current&&(clearTimeout(l.current),l.current=null),new Promise(f=>{o.current=f,n({title:d.title??"",message:d.message??"",acceptLabel:d.acceptLabel??"Confirm",cancelLabel:d.cancelLabel??"Cancel"}),a(!0)})}function u(d){o.current?.(d),o.current=null,a(!1),l.current=setTimeout(()=>{n(null),l.current=null},er)}return e.jsxs(qn.Provider,{value:{confirm:i},children:[t,e.jsx(sn,{value:r,noOutsideClose:!0,className:"confirm",children:s&&e.jsxs("div",{className:"flex flex-col p-xl gap-sm",children:[s.title&&e.jsx("h2",{className:"font-bold text-lg text-neutral-foreground-high",children:s.title}),s.message&&e.jsx("p",{className:"text-sm text-neutral-foreground-low",children:s.message}),e.jsxs("div",{className:"flex justify-end w-full gap-xs mt-sm",children:[e.jsx(Be,{variant:"plain",onClick:()=>u(!1),children:s.cancelLabel}),e.jsx(Be,{onClick:()=>u(!0),children:s.acceptLabel})]})]})})]})}function tr(){const t=c.useContext(qn);if(!t)throw new Error("useConfirm must be used inside ConfirmProvider");return t}const rn={connector:"_connector_1gync_2",vert:"_vert_1gync_2",hor:"_hor_1gync_2"};function nr({vertical:t=!1,children:s,className:n}){return e.jsx("div",{className:g(rn.connector,t?rn.vert:rn.hor,n),children:s})}const Ae={slider:"_slider_rw7q0_2",small:"_small_rw7q0_2",medium:"_medium_rw7q0_2",large:"_large_rw7q0_2",vertical:"_vertical_rw7q0_2",disabled:"_disabled_rw7q0_2",stepSlider:"_stepSlider_rw7q0_2",neutralBg:"_neutralBg_rw7q0_2",track:"_track_rw7q0_2",fillBar:"_fillBar_rw7q0_2",fillBarVertical:"_fillBarVertical_rw7q0_2",haveFillColors:"_haveFillColors_rw7q0_2",cursor:"_cursor_rw7q0_2",dragging:"_dragging_rw7q0_2",stepsContainer:"_stepsContainer_rw7q0_2",step:"_step_rw7q0_2",stepActive:"_stepActive_rw7q0_2",stepNeutral:"_stepNeutral_rw7q0_2",stepMarker:"_stepMarker_rw7q0_2",stepMarkerActive:"_stepMarkerActive_rw7q0_2",stepMarkerNeutral:"_stepMarkerNeutral_rw7q0_2"},on=c.forwardRef(function(s,n){const{value:r,onChange:a,size:o="medium",max:l=0,unit:i="",color:u="",showTooltip:d=!1,disabled:f=!1,vertical:p=!1,fillColors:m,isRange:x=!1,steps:b,neutralBackground:v=!1,className:h}=s,C=r!==void 0,[_,y]=pe({value:r,defaultValue:x?[0,0]:0,onChange:a}),[T,q]=c.useState([!1,!1]),[P,N]=c.useState(void 0),k=c.useRef(null),H=c.useRef(null),F=c.useRef([]),z=c.useRef([!1,!1]),B=c.useRef(_),E=c.useRef(()=>{}),A=c.useRef(()=>{}),V=c.useRef(()=>{}),ee=c.useCallback(S=>{k.current=S,typeof n=="function"?n(S):n&&(n.current=S)},[n]);c.useEffect(()=>{B.current=_},[_]);function J(){return v||!u?"":Ke(u)}function W(S){return S===void 0?[0,0]:Array.isArray(S)?[S[0],S[1]]:[S,S]}function te(S){return!l||l===0?Math.min(1,Math.max(0,S)):Math.min(1,Math.max(0,S/l))}function ie(S){return!l||l===0?S:S*l}function j(S){return!b||!b.length?S:b.map(Z=>l?Z.value/l:Z.value).reduce((Z,ve)=>Math.abs(ve-S)<Math.abs(Z-S)?ve:Z)}const U=c.useCallback(()=>{const S=k.current,D=H.current;if(!S)return;const Z=W(B.current),ve=x?[te(Z[0]),te(Z[1])]:[te(Z[0])],Ne=F.current;if(Ne.forEach((_e,Q)=>{if(!_e)return;const ge=ve[Q]??0;if(p){const je=S.clientHeight,w=Math.min(je,Math.max(0,je*ge)),X=getComputedStyle(_e).getPropertyValue("--border-width-xs"),L=parseFloat(X)/2||0;_e.style.bottom=Z[Q]<(l*.99||.99)||b&&b.length?w-_e.clientHeight/3-L+"px":w-_e.clientHeight-L+"px",_e.style.left="50%"}else{const je=S.clientWidth,w=Math.min(je,Math.max(0,je*ge)),X=getComputedStyle(_e).getPropertyValue("--border-width-xs"),L=parseFloat(X)/2||0;_e.style.left=Z[Q]<(l*.99||.99)||b&&b.length?w-_e.clientWidth/3-L+"px":w-_e.clientWidth-L+"px",_e.style.bottom="50%"}}),!!D)if(p){const _e=S.clientHeight,Q=Ne.map(L=>L?L.clientHeight/2:0),je=Ne.map(L=>L?L.offsetTop:0).map((L,M)=>_e-L-Q[M]),w=x?Math.min(...je):0,X=Math.max(0,Math.max(...je));D.style.bottom=w+"px",D.style.height=Math.abs(X-w)+"px",D.style.left="50%",D.style.width="100%"}else{const _e=Ne.filter(Boolean);if(!_e.length)return;const Q=_e.map(w=>w.offsetLeft+w.clientWidth/3),ge=x?Math.min(...Q):0,je=Math.max(...Q);D.style.left=ge+"px",D.style.width=Math.abs(je-ge)+_e[0].clientWidth/6+"px",D.style.bottom="50%",D.style.height="100%"}},[x,p,l,b]),I=c.useCallback(S=>{const D=[!1,!1];D[S]=!0,z.current=D,q([...D])},[]),O=c.useCallback((S,D)=>{const Z=k.current;Z&&z.current.forEach((ve,Ne)=>{if(!ve)return;const _e=F.current[Ne];if(!_e)return;let Q;if(p){const X=Z.getBoundingClientRect(),L=Z.clientHeight-_e.clientHeight,M=D-_e.clientHeight/2-X.top,G=L,oe=Math.min(G,Math.max(0,G-M));Q=j(oe/(L||1))}else{const X=Z.getBoundingClientRect(),L=Z.clientWidth-_e.clientWidth,M=S-_e.clientWidth/2-X.left,G=Math.min(L,Math.max(0,M));Q=j(G/(L||1))}const ge=ie(Q),je=W(B.current);let w;if(x){const X=[...je];X[Ne]=ge,w=X}else w=ge;B.current=w,y(w),N(w),setTimeout(()=>U(),0)})},[x,p,l,b,y,U]),le=c.useCallback(()=>{z.current=[!1,!1],q([!1,!1]),C||N(void 0)},[]);c.useEffect(()=>{if(P===void 0)return;(Array.isArray(P)&&Array.isArray(_)?P[0]===_[0]&&P[1]===_[1]:P===_)&&N(void 0)},[_,P]),c.useEffect(()=>{E.current=S=>O(S.clientX,S.clientY),A.current=le,V.current=S=>{S.touches[0]&&O(S.touches[0].clientX,S.touches[0].clientY)}}),c.useEffect(()=>{const S=Ne=>E.current(Ne),D=()=>A.current(),Z=Ne=>V.current(Ne),ve=()=>A.current();return window.addEventListener("mousemove",S),window.addEventListener("mouseup",D),window.addEventListener("touchmove",Z),window.addEventListener("touchend",ve),()=>{window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",D),window.removeEventListener("touchmove",Z),window.removeEventListener("touchend",ve)}},[]),c.useEffect(()=>{const S=setTimeout(()=>U(),200);return()=>clearTimeout(S)},[]),c.useEffect(()=>{const S=setTimeout(()=>U(),100);return()=>clearTimeout(S)},[_,o,p]);const Ce=S=>{const D=i||"%";return`${S.toFixed(1)}${D}`},ne=x?2:1,ue=W(P??_),we=S=>{const D=l?S.value/l:S.value,Z={};return p?Z.bottom=D*100+"%":Z.left=D*100+"%",Z},ce=S=>{const D=l?S.value/l:S.value;if(x){const Z=Math.min(te(ue[0]),te(ue[1])),ve=Math.max(te(ue[0]),te(ue[1]));return D>=Z&&D<=ve}return D>=0&&D<=te(ue[0])},Y=(S,D)=>{if(!D||f)return{};if(m&&m.length){const Z=l?S.value/l:S.value,ve=x?Math.min(te(ue[0]),te(ue[1])):0,_e=(x?Math.max(te(ue[0]),te(ue[1])):te(ue[0]))-ve;if(_e<=0)return{};const Q=(Z-ve)/_e,ge=Math.min(m.length-1,Math.max(0,Math.floor(Q*m.length)));return{backgroundColor:m[ge]}}return u?{backgroundColor:u}:{}},R={};u&&!(m&&m.length)&&!f&&(R.backgroundColor=u);const ae=S=>{const D={};return u&&!f&&(D.borderColor=u),D};return e.jsxs("div",{ref:ee,className:g(Ae.slider,Ae[o],p?Ae.vertical:Ae.horizontal,f&&Ae.disabled,b&&b.length&&Ae.stepSlider,v&&Ae.neutralBg,h),style:{background:J()},"aria-disabled":f,onMouseDown:S=>{if(f)return;const D=k.current;if(!D)return;let Z=0;if(x&&F.current.length>1){let ve=1/0;F.current.forEach((Ne,_e)=>{if(Ne)if(p){const Q=D.getBoundingClientRect(),ge=D.clientHeight-Ne.offsetTop-Ne.clientHeight/2,je=Math.abs(D.clientHeight-(S.clientY-Q.top)-ge);je<ve&&(ve=je,Z=_e)}else{const Q=Math.abs(Ne.offsetLeft-(S.clientX-D.getBoundingClientRect().left));Q<ve&&(ve=Q,Z=_e)}})}I(Z),O(S.clientX,S.clientY)},onTouchStart:S=>{f||S.touches[0]&&O(S.touches[0].clientX,S.touches[0].clientY)},children:[e.jsx("div",{ref:H,className:g(Ae.fillBar,p&&Ae.fillBarVertical,m&&m.length&&Ae.haveFillColors),style:R,children:m&&m.map((S,D)=>e.jsx("div",{style:{background:S,width:"100%",height:"100%"}},D))}),Array.from({length:ne}).map((S,D)=>d?e.jsx(Ye,{labelValue:Ce(ue[D]),position:p?"right":"top",children:e.jsx("div",{ref:Z=>{F.current[D]=Z},className:g(Ae.cursor,T[D]&&Ae.dragging,u&&Ae.coloredCursor),style:ae(),onMouseDown:Z=>{Z.stopPropagation(),I(D)},onTouchStart:Z=>{Z.stopPropagation(),I(D)}})},D):e.jsx("div",{ref:Z=>{F.current[D]=Z},className:g(Ae.cursor,T[D]&&Ae.dragging,u&&Ae.coloredCursor),style:ae(),onMouseDown:Z=>{Z.stopPropagation(),I(D)},onTouchStart:Z=>{Z.stopPropagation(),I(D)}},D)),b&&b.map((S,D)=>{const Z=ce(S);return e.jsx("div",{className:g(Ae.step,Z&&Ae.stepActive,v&&Ae.stepNeutral),style:{...we(S),...Y(S,Z)},children:e.jsx("div",{className:g(Ae.stepMarker,Z&&Ae.stepMarkerActive,v&&!Z&&Ae.stepMarkerNeutral),style:Y(S,Z)})},D)})]})});on.displayName="Slider";const qt={crop:"_crop_1pofj_2",cropArea:"_cropArea_1pofj_2",cropImg:"_cropImg_1pofj_2",footer:"_footer_1pofj_2"};function sr({src:t,onChange:s,width:n="360px",height:r="200px",className:a}){const o=c.useId(),l=c.useRef(null),i=c.useRef(null),u=c.useRef(null),d=c.useRef(!1),f=c.useRef(new Image),p=c.useRef(new Image),[m,x]=c.useState(0),[b,v]=c.useState({width:0,height:0}),[h,C]=c.useState(""),_=c.useCallback(()=>{l.current&&v({width:l.current.clientWidth?l.current.clientWidth+10:0,height:l.current.clientHeight?l.current.clientHeight+10:0})},[]),y=c.useCallback((F,z)=>{const B=F.getBoundingClientRect(),E=document.createElement("canvas"),A=E.getContext("2d");if(!A)return;E.width=B.width,E.height=B.height;const V=z.getBoundingClientRect(),ee=B.left-V.left,J=B.top-V.top;A.drawImage(f.current,ee,J,B.width,B.height,0,0,B.width,B.height);const W=E.toDataURL("image/png");s?.(W)},[s]),T=c.useCallback(F=>{if(!i.current||!i.current.parentElement||!u.current||!d.current)return;const z=Tn(F,i.current,i.current.parentElement,{left:!0,top:!0},{x:-1,y:-3});i.current.style.top=`${z.y}px`,i.current.style.left=`${z.x}px`,u.current.setAttribute("x",z.x.toString()),u.current.setAttribute("y",z.y.toString()),y(i.current,i.current.parentElement)},[y]),q=c.useCallback(F=>{const z=document.createElement("canvas"),B=z.getContext("2d");if(!i.current||!i.current.parentElement||!B)return;const E=p.current,A=F+1,V=i.current.parentElement.getBoundingClientRect(),ee=i.current.getBoundingClientRect();z.width=V.width,z.height=V.height;const J=(V.width-E.width)/2,W=(V.height-E.height)/2;B.drawImage(E,J,W);const te=ee.left+ee.width/2-V.left,ie=ee.top+ee.height/2-V.top;B.clearRect(0,0,z.width,z.height),B.save(),B.translate(te,ie),B.scale(A,A),B.translate(-te,-ie),B.drawImage(E,J,W),B.restore();const j=z.toDataURL("image/png"),U=new Image;U.src=j,U.onload=()=>{f.current=U,C(j),i.current&&i.current.parentElement&&y(i.current,i.current.parentElement)}},[y]);c.useEffect(()=>{const F=V=>T(V),z=()=>{d.current=!1},B=V=>T(V.touches[0]),E=()=>{d.current=!1};window.addEventListener("mousemove",F),window.addEventListener("mouseup",z),window.addEventListener("touchmove",B),window.addEventListener("touchend",E);let A;return l.current&&(A=new ResizeObserver(_),A.observe(l.current,{box:"border-box"})),t&&(p.current.src=t,p.current.onload=()=>{C(t),f.current=p.current,q(0)}),()=>{window.removeEventListener("mousemove",F),window.removeEventListener("mouseup",z),window.removeEventListener("touchmove",B),window.removeEventListener("touchend",E),A?.disconnect()}},[]);function P(F){d.current=!0,T(F.nativeEvent)}function N(F){d.current=!0,T(F.touches[0])}function k(F){const z=typeof F=="number"?F:F[0];x(z),q(z)}const H=l.current&&getComputedStyle(l.current).getPropertyValue("--border-radius-xl")||"16px";return e.jsxs("div",{ref:l,className:`${qt.crop}${a?` ${a}`:""}`,children:[e.jsxs("div",{className:"relative w-full h-full bg-black rounded-xl",style:{minWidth:n,minHeight:r},children:[e.jsxs("div",{className:qt.cropImg,onClick:P,children:[e.jsxs("svg",{className:"absolute z-[1]",width:`${b.width||0}px`,height:`${b.height||0}px`,viewBox:`0 0 ${b.width||0} ${b.height||0}`,xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("defs",{children:e.jsxs("mask",{id:o,children:[e.jsx("rect",{width:"100%",height:"100%",fill:"white"}),e.jsx("rect",{ref:u,x:"0",y:"0",width:n,height:r,rx:H,ry:H,fill:"black"})]})}),e.jsx("rect",{width:"100%",height:"100%",fill:"rgba(255, 255, 255, 0.7)",mask:`url(#${o})`})]}),h&&e.jsx("img",{src:h,alt:"model value"}),t&&e.jsx("img",{src:t,style:{position:"relative",visibility:"hidden"},alt:""})]}),e.jsx("div",{ref:i,className:qt.cropArea,style:{width:n,height:r},onMouseDown:P,onTouchStart:N})]}),e.jsxs("footer",{className:qt.footer,children:[e.jsx(re,{name:"zoom_out",className:"select-none"}),e.jsx(on,{value:m,onChange:k,size:"small",max:2}),e.jsx(re,{name:"zoom_in",className:"select-none"})]})]})}const $t={actions:"_actions_1kvuy_2",displayLabel:"_displayLabel_1kvuy_2",presetSidebar:"_presetSidebar_1kvuy_2",presetOption:"_presetOption_1kvuy_2",presetActive:"_presetActive_1kvuy_2"};function it(t,s){return t.toLocaleDateString(s,{year:"numeric",month:"short",day:"2-digit"})}function rr(t){return t.includes("pt")?"e":"and"}function or(t,s,n,r){if(!t)return"";const a=Kt(t,s);if(s==="compare"){const i=a,u=i[0]??[],d=i[1]??[];if(d.length>0){const f=r??rr(n),p=it(u[0],n)+(u[1]?" - "+it(u[1],n):""),m=it(d[0],n)+(d[1]?" - "+it(d[1],n):"");return`${p} ${f} ${m}`}else if(u.length>0)return it(u[0],n)+(u[1]?" - "+it(u[1],n):"");return""}const o=a;return o.length===0?"":it(o[0],n)+(o[1]&&s!=="date"?" - "+it(o[1],n):"")}function ar({value:t,defaultValue:s,onChange:n,type:r="date",minDate:a,maxDate:o,disabledDates:l,disabled:i=!1,labelValue:u="",isError:d=!1,errorMessage:f="",infoMessage:p="",required:m=!1,clearLabel:x="Clear selection",applyLabel:b="Apply filters",compareLabel:v="Compare dates",lang:h="en",onApply:C,separator:_,isCompare:y=!1,allowChangeType:T=!1,expanded:q,onExpandedChange:P,options:N,hideActions:k=!1,onClear:H,onTypeChange:F,className:z}){const[B,E]=pe({value:t,defaultValue:s,onChange:n}),[A,V]=c.useState(B),[ee,J]=pe({value:r,defaultValue:r,onChange:F}),[W,te]=pe({value:q,defaultValue:!1,onChange:P}),[ie,j]=c.useState(null),[U,I]=c.useState(y||ee==="compare"),O=or(B,ee,h,_);c.useEffect(()=>{V(B)},[B]);function le(S){S&&V(B),te(S)}function Ce(S){E(S),j(null)}function ne(){E(void 0),j(null),H?.()}function de(){E(A),te(!1),C?.(A)}function ue(S){if(j(S.label),S.calculate){const D=S.calculate();E(D)}}function we(S){return ie===S.label}function ce(S){const D=!!S;I(D),J(D?"compare":"period"),console.log(D,r,ee),V(B),console.log(t,B,A)}const Y=e.jsxs("div",{className:g("flex items-center text-lg text-neutral-interaction-default",{expanded:W,error:d,disabled:i}),children:[e.jsx(re,{name:"calendar_month"}),e.jsx("h5",{className:g("whitespace-nowrap ml-xs",{"font-bold":W}),children:e.jsx("span",{className:$t.displayLabel,children:O||u||" "})})]}),R=(N&&N.length||T)&&ee!="date",ae=e.jsx("div",{children:e.jsxs("div",{className:"flex",children:[R&&e.jsxs("div",{className:$t.presetSidebar,children:[e.jsx("div",{className:"flex flex-col",children:N&&N.map((S,D)=>e.jsx("button",{className:g($t.presetOption,we(S)&&$t.presetActive),onClick:()=>ue(S),children:S.label},D))}),T&&e.jsx("div",{className:"px-xs py-sm",children:e.jsx(dt,{value:U,onChange:ce,children:v})})]}),e.jsxs("div",{className:"flex flex-col items-end gap-base relative overflow-hidden flex-1",children:[e.jsx("div",{className:"px-sm pt-xxs w-full",children:e.jsx(Ft,{value:A,onChange:Ce,type:ee,minDate:a,maxDate:o,disabledDates:l,lang:h})}),!k&&e.jsxs("div",{className:$t.actions,children:[e.jsx(Be,{size:"small",variant:"plain",color:"neutral",onClick:ne,children:x}),e.jsx(Be,{size:"small",variant:"default",color:"primary",onClick:de,children:b})]})]})]})});return e.jsx(Zt,{value:W,onChange:S=>le(S),disabled:i,isError:d,errorMessage:f,infoMessage:p,required:m,hideArrow:!0,disableLabelAutoWidth:!0,card:ae,className:g("date-picker",z),labelValue:u,children:Y})}function lr({value:t,onChange:s,position:n="right",width:r="fit-content",height:a="fit-content",noOutsideClose:o=!1,children:l,className:i}){const[u,d]=pe({value:t,defaultValue:!1,onChange:s}),{isMounted:f,isActive:p}=Je(u??!1,{duration:500}),m=c.useRef(null),x=typeof window<"u"&&window.innerWidth<768,b=x?"bottom":n,v=x?"100%":r;function h(){return n=="top"||n=="bottom"?{height:a,maxHeight:"calc(100% - var(--spacing-xl))"}:{width:v,maxWidth:"calc(100% - var(--spacing-xl))"}}function C(){o?(m.current?.classList.add("no-outside-close-warning"),setTimeout(()=>{m.current?.classList.remove("no-outside-close-warning")},100)):d(!1)}return e.jsx(Fn,{value:u,zIndex:1001,onClick:C,children:f&&e.jsx("div",{ref:m,className:g("drawer",b,p&&"active",i),style:h(),children:l})})}const Ue={optionItem:"_optionItem_1grfr_2",selected:"_selected_1grfr_2",disabled:"_disabled_1grfr_2",optionsContainer:"_optionsContainer_1grfr_2",groupLabel:"_groupLabel_1grfr_2",flyoutCard:"_flyoutCard_1grfr_2"};function zn({value:t,defaultValue:s="",onChange:n,options:r,icon:a,expanded:o,defaultExpanded:l,onExpandedChange:i,searchable:u=!1,disabled:d=!1,isError:f=!1,secondary:p=!1,searchLabel:m,status:x,appendIcon:b,className:v}){const[h,C]=pe({value:t,defaultValue:s,onChange:q=>n?.(q,{index:-1})}),[_,y]=pe({value:o,defaultValue:l,onChange:q=>i?.(q,{source:"click"})}),T=c.useRef(null);return c.useEffect(()=>{o&&!d&&T.current&&T.current.focus()},[o,d]),e.jsxs(e.Fragment,{children:[a&&e.jsx(re,{name:a,className:g("sc-icon",{expanded:_,disabled:d,error:f})}),e.jsxs("span",{className:g("flex items-center gap-xs truncate text-sm flex-1",v,{"text-neutral-foreground-low":!r}),children:[u&&!d&&e.jsxs("div",{className:g("flex items-center text-neutral-foreground-high w-full",{secondary:p,hidden:!_}),onClick:()=>y(!0),children:[e.jsx(re,{name:"search",className:g("sc-icon",{expanded:_,disabled:d,error:f})}),!h?.length&&e.jsx("div",{className:"relative pointer-events-none",children:e.jsx("span",{className:"search-placeholder",children:m||"Search"})}),e.jsx("input",{ref:T,type:"search",className:"search",disabled:d,value:h??"",onChange:q=>C(q.target.value)}),b&&e.jsx(re,{name:b,className:g("sc-icon",{expanded:_,disabled:d,error:f})})]}),x]})]})}const an={separator:"_separator_dbh0y_2",separatorLine:"_separatorLine_dbh0y_2"};function Rn({position:t="right",children:s,className:n}={}){return e.jsxs("div",{className:g(an.separator,n),children:[t!=="right"&&e.jsx("div",{className:an.separatorLine}),s,t!=="left"&&e.jsx("div",{className:an.separatorLine})]})}function Wn({option:t,labelKey:s,valueKey:n,selectedValue:r,onSelect:a,depth:o=0}){const[l,i]=c.useState(!1),u=p(t),d=m(t),f=r!=null&&r===d;function p(x){return Se(x)?x[s]||x.label:x}function m(x){return Se(x)?x[n]||x.value:x}if(t.options&&t.options.length>0){let x=function(b){return b.find(v=>{if(r==m(v))return!0;if(v?.options)return x(v.options)})};return e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:g(Ue.optionItem,{[Ue.disabled]:t.disabled,[Ue.selected]:x(t.options)},"justify-between"),onClick:()=>!t.disabled&&i(b=>!b),onKeyDown:b=>{b.key==="Enter"&&!t.disabled&&i(v=>!v)},tabIndex:t.disabled?-1:0,role:"option","aria-haspopup":"listbox","aria-expanded":l,children:[e.jsxs("div",{className:"flex item-center gap-xs",children:[t.icon&&e.jsx(re,{className:"dropdown-icon",name:t.icon}),e.jsx("span",{className:Ue.groupLabel,children:u})]}),e.jsx(re,{className:Ue.chevronIcon,name:"chevron_right"})]}),l&&e.jsx("div",{className:Ue.flyoutCard,children:e.jsx("div",{className:"bg-neutral-surface-default shadow-neutral-selected border-xxs border-neutral-default rounded-sm",children:e.jsx(ln,{options:t.options,labelKey:s,valueKey:n,selectedValue:r,onSelect:a,depth:o+1})})})]})}return e.jsxs("div",{className:g(Ue.optionItem,{[Ue.selected]:f,[Ue.disabled]:t.disabled}),onClick:()=>!t.disabled&&a(t),onKeyDown:x=>{x.key==="Enter"&&!t.disabled&&a(t)},tabIndex:t.disabled?-1:0,role:"option","aria-selected":f,children:[t.icon&&e.jsx(re,{className:"dropdown-icon",name:t.icon}),e.jsx("span",{children:u})]})}function ln({options:t,labelKey:s,valueKey:n,selectedValue:r,onSelect:a,depth:o=0}){const l=[t.filter(i=>!i.bottom),t.filter(i=>i.bottom)].filter(i=>i.length);return e.jsx("div",{role:"listbox",className:Ue.optionsContainer,children:l.map((i,u)=>e.jsxs(e.Fragment,{children:[i.map((d,f)=>e.jsx(Wn,{option:d,labelKey:s,valueKey:n,selectedValue:r,onSelect:a,depth:o},f)),u==0&&l.length>1&&e.jsx(Rn,{})]}))})}function Un(t,s,n){const r=[];for(const a of t){const o=(a[n]??a.label??"").toString().toLowerCase();if(a.options&&a.options.length>0){const l=Un(a.options,s,n);(o.includes(s.toLowerCase())||l.length>0)&&r.push({...a,options:l.length>0?l:a.options})}else o.includes(s.toLowerCase())&&r.push(a)}return r}function Gn(t,s,n,r){for(const a of t){if((a[n]??a.value)===(Se(s)?s[n]??s.value:s))return a;if(a.options&&a.options.length>0){const l=Gn(a.options,s,n);if(l)return l}}}function Ht({value:t,defaultValue:s,onChange:n,options:r,labelKey:a="label",valueKey:o="value",getObject:l=!1,disabled:i=!1,labelValue:u="",searchable:d=!1,alignRight:f=!1,isError:p=!1,errorMessage:m="",required:x=!1,infoMessage:b,maxHeight:v,minWidth:h,children:C,className:_}){const[y,T]=pe({value:t,defaultValue:s??null,onChange:n}),[q,P]=c.useState(""),[N,k]=c.useState(!1);function H(V){return Se(V)?V[o]??V.value:V}function F(V){const ee=l?V:H(V);T(ee),setTimeout(()=>k(!1)),P("")}const z=y!=null?Gn(r,y,o):void 0,B=d&&q?Un(r,q,a):r;let E;z?E=e.jsx("span",{className:Ue.displayLabel,children:z[a]??z.label??""}):E=C;const A=e.jsx(ln,{options:B,labelKey:a,valueKey:o,selectedValue:y!=null?H(y):null,onSelect:F});return e.jsx(Zt,{value:N,onChange:V=>k(V),labelValue:u,disabled:i,isError:p,errorMessage:m,alignRight:f,required:x,infoMessage:b,maxHeight:v,minWidth:h,card:A,className:g("dropdown",_),children:e.jsx(zn,{value:q,onChange:P,expanded:N,onExpandedChange:k,searchable:d,disabled:i,isError:p,status:E,options:z?r:void 0})})}Ht.Options=ln,Ht.Option=Wn;const nt={file:"_file_1b760_2",dragging:"_dragging_1b760_2",disabled:"_disabled_1b760_2",error:"_error_1b760_2",hiddenInput:"_hiddenInput_1b760_2",blurred:"_blurred_1b760_2",errorMessage:"_errorMessage_1b760_2",infoMessage:"_infoMessage_1b760_2",xs:"_xs_1b760_2",sm:"_sm_1b760_2",md:"_md_1b760_2",lg:"_lg_1b760_2",xl:"_xl_1b760_2"};function Yn({children:t}){return e.jsx(e.Fragment,{children:t})}const ir={xs:56,sm:66,md:76,lg:86,xl:96},cr={xs:"text-4xl",sm:"text-6xl",md:"text-7xl",lg:"text-8xl",xl:"text-9xl"},ur={xs:"text-base",sm:"text-lg",md:"text-xl",lg:"text-2xl",xl:"text-3xl"},dr={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"};function Xn({value:t,defaultValue:s,onChange:n,labelValue:r,errorMessage:a,infoMessage:o,size:l="md",disabled:i=!1,isError:u=!1,placeholder:d="or drag and drop it here",accept:f,multiple:p=!1,children:m,className:x}){const[b,v]=c.useState(t!==void 0?t:s??null),[h,C]=c.useState(!1),_=c.useRef(null);c.useEffect(()=>{t!==void 0&&v(t)},[t]);const y=b!==null&&(Array.isArray(b)?b.length>0:!0),T=p&&Array.isArray(b)?`${b.length} files selected`:b&&!Array.isArray(b)?b.name:"";function q(B){if(!(!B||B.length===0))if(p){const E=Array.from(B);v(E),n?.(E)}else v(B[0]),n?.(B[0])}function P(){v(null),n?.(null),_.current&&(_.current.value="")}const N=ir[l],k=cr[l],H=ur[l],F=dr[l];let z=null;return c.Children.forEach(m,B=>{c.isValidElement(B)&&B.type===Yn&&(z=B.props.children)}),e.jsxs("div",{className:x,children:[e.jsxs("div",{className:g(nt.file,nt[l],h&&nt.dragging,i&&nt.disabled,u&&nt.error),onDragEnter:B=>{B.preventDefault(),i||C(!0)},onDragLeave:()=>C(!1),onDragOver:B=>B.preventDefault(),onDrop:B=>{B.preventDefault(),C(!1),i||q(B.dataTransfer.files)},children:[!y&&e.jsx("input",{ref:_,type:"file",className:nt.hiddenInput,accept:f,multiple:p,disabled:i,onChange:B=>q(B.target.files)}),!y&&e.jsxs(e.Fragment,{children:[e.jsxs("svg",{width:N,height:N,viewBox:"0 0 76 76",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M63.5312 33.25H42.75C40.8603 33.25 39.0481 32.4993 37.7119 31.1631C36.3757 29.8269 35.625 28.0147 35.625 26.125V5.34375C35.625 5.18628 35.5624 5.03526 35.4511 4.92391C35.3397 4.81256 35.1887 4.75 35.0312 4.75H21.375C18.8554 4.75 16.4391 5.75089 14.6575 7.53249C12.8759 9.31408 11.875 11.7304 11.875 14.25V61.75C11.875 64.2696 12.8759 66.6859 14.6575 68.4675C16.4391 70.2491 18.8554 71.25 21.375 71.25H54.625C57.1446 71.25 59.5609 70.2491 61.3425 68.4675C63.1241 66.6859 64.125 64.2696 64.125 61.75V33.8438C64.125 33.6863 64.0624 33.5353 63.9511 33.4239C63.8397 33.3126 63.6887 33.25 63.5312 33.25Z",fill:"var(--neutral-border-default)"}),e.jsx("path",{d:"M62.228 27.9938L40.8812 6.647C40.8397 6.60573 40.7869 6.57766 40.7295 6.56631C40.672 6.55495 40.6125 6.56083 40.5584 6.5832C40.5043 6.60556 40.4581 6.64342 40.4254 6.69202C40.3928 6.74061 40.3752 6.79776 40.375 6.8563V26.125C40.375 26.7549 40.6252 27.3589 41.0706 27.8043C41.516 28.2497 42.1201 28.5 42.75 28.5H62.0187C62.0772 28.4997 62.1344 28.4822 62.183 28.4495C62.2315 28.4169 62.2694 28.3706 62.2918 28.3165C62.3141 28.2624 62.32 28.2029 62.3087 28.1455C62.2973 28.0881 62.2692 28.0353 62.228 27.9938Z",fill:"var(--neutral-border-default)"}),e.jsxs("g",{clipPath:"url(#clip0_2300_5309)",children:[e.jsx("circle",{cx:"63",cy:"63",r:"7",fill:"white"}),e.jsx("path",{d:"M63 50C55.8319 50 50 55.8319 50 63C50 70.1681 55.8319 76 63 76C70.1681 76 76 70.1681 76 63C76 55.8319 70.1681 50 63 50ZM68 64H64V68C64 68.2652 63.8946 68.5196 63.7071 68.7071C63.5196 68.8946 63.2652 69 63 69C62.7348 69 62.4804 68.8946 62.2929 68.7071C62.1054 68.5196 62 68.2652 62 68V64H58C57.7348 64 57.4804 63.8946 57.2929 63.7071C57.1054 63.5196 57 63.2652 57 63C57 62.7348 57.1054 62.4804 57.2929 62.2929C57.4804 62.1054 57.7348 62 58 62H62V58C62 57.7348 62.1054 57.4804 62.2929 57.2929C62.4804 57.1054 62.7348 57 63 57C63.2652 57 63.5196 57.1054 63.7071 57.2929C63.8946 57.4804 64 57.7348 64 58V62H68C68.2652 62 68.5196 62.1054 68.7071 62.2929C68.8946 62.4804 69 62.7348 69 63C69 63.2652 68.8946 63.5196 68.7071 63.7071C68.5196 63.8946 68.2652 64 68 64Z",fill:"var(--primary-interaction-default)"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_2300_5309",children:e.jsx("rect",{width:"26",height:"26",fill:"white",transform:"translate(50 50)"})})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-xs",children:[e.jsx("p",{className:"cursor-pointer text-primary-foreground-low",children:r||"Select a file"}),e.jsx("p",{className:"text-neutral-foreground-low",children:d})]})]}),y&&e.jsx("div",{className:g("flex gap-sm items-center justify-center",h&&nt.blurred),children:z??e.jsxs("div",{className:"flex flex-col items-center gap-xs",children:[e.jsx("span",{className:g("material-symbols-rounded text-neutral-foreground-low",k),children:"draft"}),e.jsxs("div",{className:"flex items-center gap-xs",children:[e.jsx("p",{className:g(F,"text-neutral-foreground-low truncate max-w-[96px]"),children:T}),!i&&e.jsx("span",{className:g("material-symbols-rounded cursor-pointer text-neutral-interaction-default hover:text-danger-interaction-default",H),onClick:P,"aria-label":"Remove file",children:"delete"})]})]})})]}),u&&a&&e.jsx("p",{className:nt.errorMessage,children:a}),o&&e.jsx("p",{className:nt.infoMessage,children:o})]})}Xn.Preview=Yn;const Ge={categoryHeader:"_categoryHeader_avnzh_2",categoryContent:"_categoryContent_avnzh_2",collapsed:"_collapsed_avnzh_2",chevron:"_chevron_avnzh_2",expanded:"_expanded_avnzh_2",subOption:"_subOption_avnzh_2",subOptionLabel:"_subOptionLabel_avnzh_2",actions:"_actions_avnzh_2",searchBox:"_searchBox_avnzh_2",searchInput:"_searchInput_avnzh_2",searchClear:"_searchClear_avnzh_2"};function fr({value:t,defaultValue:s,onChange:n,onApply:r,options:a=[],labelKey:o="label",valueKey:l="value",disabled:i=!1,searchable:u=!1,searchLabel:d="Search...",labelValue:f="",clearLabel:p="Clear selection",applyLabel:m="Apply filters",statusLabel:x="Status",isError:b=!1,errorMessage:v="",className:h}){const[C,_]=pe({value:t,defaultValue:s??{},onChange:n}),[y,T]=c.useState(!1),[q,P]=c.useState({}),[N,k]=c.useState(""),H=C??{};function F(O){return Se(O)?O[l]:String(O)}function z(O){return Se(O)?O[o]:String(O??"")}function B(O){return Se(O)?O[l]:O}function E(O){P(le=>({...le,[O]:!le[O]}))}function A(O,le){const Ce=H[O]??[],ne=B(le);return Ce.some(de=>B(de)===ne)}function V(O,le){if(i)return;const Ce=F(O),ne=[...H[Ce]??[]],de=B(le),ue=ne.findIndex(ce=>B(ce)===de);ue!==-1?ne.splice(ue,1):ne.push(de);const we={...H,[Ce]:ne};_(we)}function ee(){_({})}function J(){r?.(H)}const W=Object.values(H).reduce((O,le)=>O+(Array.isArray(le)?le.length:0),0),te=N.toLowerCase(),ie=u&&N?a.map(O=>{const le=z(O).toLowerCase(),Ce=O.options.filter(ne=>z(ne).toLowerCase().includes(te));return le.includes(te)||Ce.length>0?{...O,options:le.includes(te)?O.options:Ce}:null}).filter(Boolean):a,j=e.jsxs("div",{className:"w-full",children:[u&&e.jsxs("div",{className:Ge.searchBox,children:[e.jsx(re,{name:"search",className:"text-lg text-neutral-foreground-low"}),e.jsx("input",{type:"text",className:Ge.searchInput,placeholder:d,value:N,onChange:O=>k(O.target.value)}),N&&e.jsx("button",{className:Ge.searchClear,onClick:()=>k(""),"aria-label":"Clear search",type:"button",children:e.jsx(re,{name:"close",className:"text-base"})})]}),ie.map(O=>{const le=F(O),ne=u&&!!N||!!q[le],de=(H[le]??[]).length;return e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:Ge.categoryHeader,onClick:()=>E(le),role:"button",tabIndex:0,onKeyDown:ue=>{(ue.key===" "||ue.key==="Enter")&&E(le)},children:[e.jsx("span",{className:"text-sm text-neutral-interaction-default",children:z(O)}),e.jsxs("div",{className:"flex items-center gap-xs",children:[de>0&&e.jsx("span",{className:"flex items-center justify-center text-neutral-foreground-negative bg-primary-interaction-selected text-xs w-[1.6em] h-[1.6em] rounded-full",children:de}),e.jsx(re,{name:"expand_more",className:g(Ge.chevron,{[Ge.expanded]:ne})})]})]}),e.jsx("div",{className:g(Ge.categoryContent,{[Ge.collapsed]:!ne}),style:{maxHeight:ne?"400px":"0"},children:e.jsx("ul",{className:"flex flex-col",children:O.options.map((ue,we)=>e.jsxs("div",{className:Ge.subOption,role:"option","aria-selected":A(le,ue),onClick:()=>V(O,ue),children:[e.jsx(dt,{value:A(le,ue),className:"pointer-events-none"}),e.jsx("span",{className:Ge.subOptionLabel,children:z(ue)})]},we))})})]},le)})]}),U=e.jsx("span",{className:"font-bold text-neutral-interaction-default",children:W>0?`${x}: ${W}`:x}),I=e.jsxs("div",{className:Ge.actions,children:[e.jsx(Be,{variant:"plain",size:"small",disabled:W===0,onClick:ee,children:p}),e.jsx(Be,{size:"small",disabled:W===0,onClick:J,children:m})]});return e.jsx(Ot,{value:y,onChange:O=>T(O),labelValue:f,disabled:i,isError:b,errorMessage:v,dontHaveMaxHeight:!0,minWidth:"22em",content:j,actions:I,className:g("filter",h),children:U})}const Ve={history:"_history_57k37_2",flex:"_flex_57k37_2",option:"_option_57k37_2",disabled:"_disabled_57k37_2",firstOption:"_firstOption_57k37_2",dataList:"_dataList_57k37_2",circle:"_circle_57k37_2",lastOption:"_lastOption_57k37_2",customBorder:"_customBorder_57k37_2",roundIcon:"_roundIcon_57k37_2",icon:"_icon_57k37_2",primary:"_primary_57k37_2",info:"_info_57k37_2",success:"_success_57k37_2",warning:"_warning_57k37_2",danger:"_danger_57k37_2",neutral:"_neutral_57k37_2",active:"_active_57k37_2",circleIcon:"_circleIcon_57k37_2",right:"_right_57k37_2",left:"_left_57k37_2",top:"_top_57k37_2",haveIcon:"_haveIcon_57k37_2",bottom:"_bottom_57k37_2"};function mr({value:t,defaultValue:s,onChange:n,options:r,position:a="right",type:o="primary",disabled:l=!1,renderOption:i,className:u}){const[d,f]=pe({value:t,defaultValue:s??null,onChange:n}),p=(x,b)=>b===0&&!d&&!l||x===d,m=a==="top"||a==="bottom";return e.jsx("div",{className:g(Ve.history,m&&Ve.flex,u),children:r.map((x,b)=>{const v=p(x,b),h=x.type??o,C=b===0,_=!r[b+1],y=!!x.icon,T=y&&!x.isIconRound,q=y&&x.isIconRound;return e.jsxs("div",{className:g(Ve.option,Ve[a],Ve[h],C&&Ve.firstOption,_&&Ve.lastOption,v&&Ve.active,l&&Ve.disabled),onClick:()=>!l&&f(x),children:[e.jsx("div",{className:g(Ve.circle,T&&Ve.circleIcon,q&&Ve.roundIcon),children:y&&e.jsx(re,{name:x.icon,filled:!x.unfilled,className:Ve.icon})}),e.jsx("div",{className:g(Ve.customBorder,T&&Ve.haveIcon)}),e.jsx("div",{className:Ve.dataList,children:i?.(x,b,v)})]},b)})})}const ft={iconCard:"_iconCard_1d25o_2",iconContainer:"_iconContainer_1d25o_2",roundIcon:"_roundIcon_1d25o_2",cardTitle:"_cardTitle_1d25o_2"};function Zn({children:t}){return e.jsx(e.Fragment,{children:t})}function Jn({title:t="",icon:s="",color:n="",isIconRound:r=!1,children:a,className:o}){const l=[],i=[];c.Children.forEach(a,d=>{c.isValidElement(d)&&d.type===Zn?l.push(d):i.push(d)});const u=n?Ke(n):"";return e.jsxs("div",{className:g(ft.iconCard,o),children:[e.jsx("div",{className:g(ft.iconContainer,r&&ft.roundIcon,n&&ft.coloredBackground,n&&r&&ft.coloredText),style:n?{background:r?void 0:u,color:r?n:void 0}:void 0,children:e.jsx(re,{name:s,filled:r})}),e.jsxs(pt,{className:"p-lg",children:[e.jsxs("header",{className:"flex justify-between",children:[e.jsx("h4",{className:g(ft.cardTitle,n&&ft.coloredText),style:n?{color:n}:void 0,children:t}),l]}),i]})]})}Jn.TitleActions=Zn;const Fe={image:"_image_74lyr_2",imageContent:"_imageContent_74lyr_2",imagePreviewOverlay:"_imagePreviewOverlay_74lyr_2",imagePreviewOverlayVisible:"_imagePreviewOverlayVisible_74lyr_2",imagePreviewOverlayContent:"_imagePreviewOverlayContent_74lyr_2",backdrop:"_backdrop_74lyr_2",backdropActive:"_backdropActive_74lyr_2",previewModal:"_previewModal_74lyr_2",imagePreviewContainer:"_imagePreviewContainer_74lyr_2",previewImageActive:"_previewImageActive_74lyr_2",imagePreviewToolbar:"_imagePreviewToolbar_74lyr_2",toolbarActive:"_toolbarActive_74lyr_2",imagePreview:"_imagePreview_74lyr_2",tool:"_tool_74lyr_2"};function hr({src:t,alt:s,width:n,height:r,icon:a="visibility",preview:o=!1,className:l,onShow:i,onHide:u}){const[d,f]=c.useState(!1),[p,m]=c.useState(!1),[x,b]=c.useState(0),[v,h]=c.useState(1),{isMounted:C,isActive:_}=Je(p,{duration:150}),y={};n&&(y.width=typeof n=="number"?`${n}px`:n),r&&(y.height=typeof r=="number"?`${r}px`:r);const T={transform:`rotate(${x}deg) scale(${v})`,transition:"transform 0.15s"};function q(){m(!0),document.body.style.overflow="hidden",i?.()}function P(){m(!1),document.body.style.overflow="",b(0),h(1),u?.()}function N(){b(A=>A-90)}function k(){b(A=>A+90)}function H(){h(A=>Math.min(A+.1,1.5))}function F(){h(A=>Math.max(A-.1,.5))}c.useEffect(()=>{function A(V){p&&V.code==="Escape"&&P()}return document.addEventListener("keydown",A),()=>{document.removeEventListener("keydown",A)}},[p]),c.useEffect(()=>()=>{document.body.style.overflow=""},[]);const z=[{icon:"rotate_left",label:"Rotate Left",disabled:!1,onClick:N},{icon:"rotate_right",label:"Rotate Right",disabled:!1,onClick:k},{icon:"zoom_out",label:"Zoom Out",disabled:v<=.5,onClick:F},{icon:"zoom_in",label:"Zoom In",disabled:v>=1.5,onClick:H},{icon:"close",label:"Close",disabled:!1,onClick:P}],B=c.useRef(null);function E(A){A.target===B.current&&P()}return e.jsxs("span",{className:g(Fe.image,l),onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[e.jsx("img",{src:t,alt:s,style:y,className:Fe.imageContent}),o&&e.jsx("div",{className:g(Fe.imagePreviewOverlay,d&&Fe.imagePreviewOverlayVisible),onClick:q,children:e.jsx("div",{className:Fe.imagePreviewOverlayContent,children:e.jsx(re,{name:a})})}),C&&jt.createPortal(e.jsxs("div",{ref:B,className:g(Fe.backdrop,_&&Fe.backdropActive),onClick:E,children:[e.jsx("div",{className:g(Fe.previewModal,Fe.imagePreviewContainer,_&&Fe.previewImageActive),children:e.jsx("img",{src:t,alt:s,style:T,className:Fe.imagePreview})}),e.jsx("div",{className:g(Fe.previewModal,Fe.imagePreviewToolbar,_&&Fe.toolbarActive),role:"dialog","aria-modal":!0,children:z.map(A=>e.jsx(Be,{icon:A.icon,"aria-label":A.label,disabled:A.disabled,className:Fe.tool,color:"neutral",variant:"plain",round:!0,onClick:A.onClick},A.icon))})]}),document.body)]})}const pr={skeleton:"_skeleton_1tqah_2"};function vt({className:t}={}){return e.jsx("div",{className:g(pr.skeleton,t)})}const Ee={metricCard:"_metricCard_1rh9k_2",headerRow:"_headerRow_1rh9k_2",contentRow:"_contentRow_1rh9k_2",primary:"_primary_1rh9k_2",infoLabel:"_infoLabel_1rh9k_2",info:"_info_1rh9k_2",informative:"_informative_1rh9k_2",success:"_success_1rh9k_2",warning:"_warning_1rh9k_2",danger:"_danger_1rh9k_2",dashed:"_dashed_1rh9k_2",secondary:"_secondary_1rh9k_2",cardTitle:"_cardTitle_1rh9k_2",cardValue:"_cardValue_1rh9k_2","info-primary":"_info-primary_1rh9k_2","info-informative":"_info-informative_1rh9k_2","info-info":"_info-info_1rh9k_2","info-success":"_info-success_1rh9k_2","info-warning":"_info-warning_1rh9k_2","info-danger":"_info-danger_1rh9k_2","info-neutral":"_info-neutral_1rh9k_2",small:"_small_1rh9k_2",cardDescription:"_cardDescription_1rh9k_2",infoIcon:"_infoIcon_1rh9k_2",infoText:"_infoText_1rh9k_2",skeleton:"_skeleton_1rh9k_2",header:"_header_1rh9k_2",contentSkeleton:"_contentSkeleton_1rh9k_2",medium:"_medium_1rh9k_2",large:"_large_1rh9k_2",bold:"_bold_1rh9k_2"};function Kn({children:t}){return e.jsx(e.Fragment,{children:t})}function zt({title:t="",description:s="",value:n="",icon:r="",color:a="neutral",type:o="default",size:l="medium",infoMessage:i="",infoType:u="neutral",tooltipMinWidth:d="none",loading:f=!1,noTooltip:p=!1,boldTitle:m=!1,titleSlot:x,valueSlot:b,descriptionSlot:v,content:h,info:C,children:_,className:y}){const T=[],q=[];c.Children.forEach(_,k=>{c.isValidElement(k)&&k.type===Kn?T.push(k):q.push(k)});const P=v||(T.length>0?T:null),N=(t||r||x)&&!f;return e.jsxs(pt,{className:g(Ee.metricCard,Ee[o],Ee[a],Ee[l],y),children:[N?e.jsxs("div",{className:Ee.headerRow,children:[r&&e.jsx(re,{name:r,className:Ee.icon}),x||e.jsx("p",{className:g(Ee.cardTitle,m&&Ee.bold),children:t}),C||i&&(p?e.jsx("p",{className:g(Ee.infoText,Ee.infoLabel,Ee[`info-${u}`]),children:i}):e.jsx(Ye,{labelValue:i,children:e.jsx(re,{name:"info",className:g(Ee.infoIcon,Ee.infoLabel,Ee[`info-${u}`])})}))]}):f?e.jsx(vt,{className:g(Ee.skeleton,Ee.header)}):null,f?e.jsx(vt,{className:g(Ee.skeleton,Ee.contentSkeleton)}):h||e.jsxs("div",{className:Ee.contentRow,children:[b||e.jsx("p",{className:Ee.cardValue,children:n}),P||e.jsx("p",{className:Ee.cardDescription,children:s})]}),!f&&q]})}zt.TitleSlot=function({children:s}){return e.jsx(e.Fragment,{children:s})},zt.Content=function({children:s}){return e.jsx(e.Fragment,{children:s})},zt.DescriptionSlot=Kn;const ct={navbar:"_navbar_13gv0_2",left:"_left_13gv0_2",right:"_right_13gv0_2",logoSection:"_logoSection_13gv0_2",title:"_title_13gv0_2",divider:"_divider_13gv0_2",notificationButton:"_notificationButton_13gv0_2",avatarWrapper:"_avatarWrapper_13gv0_2"};function _r(){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"41",height:"40",viewBox:"0 0 41 40",fill:"none",children:[e.jsx("path",{d:"M40.5 20C40.5 8.95431 31.5457 0 20.5 0C9.4543 0 0.5 8.95431 0.5 20C0.5 31.0457 9.4543 40 20.5 40C31.5457 40 40.5 31.0457 40.5 20Z",fill:"url(#paint0_linear_navbar)"}),e.jsx("path",{d:"M38.1604 20.0001C38.1604 10.2455 30.2528 2.33789 20.4982 2.33789C10.7436 2.33789 2.83594 10.2455 2.83594 20.0001C2.83594 29.7547 10.7436 37.6624 20.4982 37.6624C30.2528 37.6624 38.1604 29.7547 38.1604 20.0001Z",stroke:"#FAFAFA",strokeWidth:"2.40312",strokeMiterlimit:"10"}),e.jsx("defs",{children:e.jsxs("linearGradient",{id:"paint0_linear_navbar",x1:"34.6407",y1:"5.85756",x2:"6.35756",y2:"34.1424",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#97D991"}),e.jsx("stop",{offset:"0.11",stopColor:"#92D691"}),e.jsx("stop",{offset:"0.22",stopColor:"#86D091"}),e.jsx("stop",{offset:"0.33",stopColor:"#74C691"}),e.jsx("stop",{offset:"0.42",stopColor:"#6DC192"}),e.jsx("stop",{offset:"0.55",stopColor:"#5CB597"}),e.jsx("stop",{offset:"0.66",stopColor:"#47A79E"}),e.jsx("stop",{offset:"0.74",stopColor:"#3B9C98"}),e.jsx("stop",{offset:"0.89",stopColor:"#1E7F88"}),e.jsx("stop",{offset:"1",stopColor:"#02657A"})]})})]})}function gr({options:t=[],value:s,onChange:n,logo:r,title:a,profile:o,notifications:l,showNotifications:i=!0,actions:u,children:d,className:f}){return e.jsxs("nav",{className:g(ct.navbar,f),role:"navigation",children:[e.jsxs("div",{className:ct.left,children:[e.jsxs("div",{className:ct.logoSection,children:[r||e.jsx(_r,{}),a&&e.jsx("span",{className:ct.title,children:a})]}),e.jsx("div",{className:ct.divider}),d||e.jsx(Ht,{options:t,value:s,onChange:n})]}),e.jsx("div",{className:ct.right,children:u||e.jsxs(e.Fragment,{children:[i&&e.jsx(xt,{card:l,children:e.jsx("button",{className:ct.notificationButton,type:"button","aria-label":"Notifications",children:e.jsx(re,{name:"notifications"})})}),e.jsx("div",{className:ct.avatarWrapper,children:e.jsx(Bt,{name:o?.name,src:o?.src})})]})})]})}const st={pagination:"_pagination_t8vwo_2",pageButton:"_pageButton_t8vwo_2",active:"_active_t8vwo_2",ellipsis:"_ellipsis_t8vwo_2",navButton:"_navButton_t8vwo_2",navIcon:"_navIcon_t8vwo_2"};function xr(t,s){const n=[];if(s<1)return n;for(let r=1;r<=s;r++)r===1||r===s||t===1&&r<4||t===s&&r>=s-2||t-1===r||t+1===r||t===r?n.push(r):(t<=s-2&&r===s-1&&s>3||t>2&&s>3&&r===2)&&n.push(-1);for(let r=0;r<2;r++){const a=n.findIndex(o=>o===-1);a!==-1&&n[a+1]-n[a-1]===2&&(n[a]=n[a-1]+1)}return n}function Qn({value:t,defaultValue:s,onChange:n,length:r,className:a}){const[o,l]=pe({value:t,defaultValue:s??1,onChange:n});if(c.useEffect(()=>{o!==void 0&&r>=1&&o>r&&l(r)},[r]),r<1)return null;const i=xr(o??1,r),u=o??1;return e.jsxs("div",{className:g(st.pagination,a),children:[e.jsx("button",{className:st.navButton,disabled:u===1,onClick:()=>l(u-1),"aria-label":"Previous page",children:e.jsx(re,{name:"chevron_left",className:g(st.navIcon)})}),e.jsx("div",{className:"flex",children:i.map((d,f)=>e.jsx("div",{className:"flex gap-xs",children:d===-1?e.jsx("button",{className:g(st.pageButton,st.ellipsis),disabled:!0,children:"..."}):e.jsx("button",{className:g(st.pageButton,d===u&&st.active),onClick:()=>l(d),children:d})},`${d}-${f}`))}),e.jsx("button",{className:st.navButton,disabled:u===r,onClick:()=>l(u+1),"aria-label":"Next page",children:e.jsx(re,{name:"chevron_right",className:g(st.navIcon)})})]})}const It={pinInput:"_pinInput_1l2sp_2",field:"_field_1l2sp_2",filled:"_filled_1l2sp_2",separator:"_separator_1l2sp_2",disabled:"_disabled_1l2sp_2"},br=c.forwardRef(function({value:s,defaultValue:n,onChange:r,onComplete:a,length:o=6,disabled:l=!1,placeholder:i,separator:u,type:d="text",otp:f=!1,className:p},m){const x=s!==void 0,[b,v]=c.useState(()=>{const N=x?s:n??"";return Array.from({length:o},(k,H)=>N?.[H]??"")}),h=c.useRef([]);c.useEffect(()=>{x&&s!==void 0&&v(Array.from({length:o},(N,k)=>s[k]??""))},[s,x,o]);const C=c.useRef("");c.useEffect(()=>{const N=b.join("");N!==C.current&&(C.current=N,r?.(N),N.length===o&&b.every(k=>k!=="")&&a?.(N))},[b,o,r,a]),c.useImperativeHandle(m,()=>({focus:()=>{const N=b.findIndex(k=>!k);h.current[N!==-1?N:0]?.focus()},clear:()=>{v(Array(o).fill("")),h.current[0]?.focus()}}));function _(N,k){const H=[...b];return H[N]=k,v(H),H}function y(N,k){const F=N.target.value.slice(-1);_(k,F),F&&k<o-1&&h.current[k+1]?.focus()}function T(N,k){if(N.key==="Backspace")if(!b[k]&&k>0){const H=h.current[k-1];H&&(H.focus(),H.select())}else _(k,"");else N.key==="ArrowLeft"&&k>0?(N.preventDefault(),h.current[k-1]?.focus()):N.key==="ArrowRight"&&k<o-1&&(N.preventDefault(),h.current[k+1]?.focus())}async function q(N,k){N.preventDefault();let H;try{H=await navigator.clipboard.readText()}catch{H=N.clipboardData.getData("text")}const F=[...b];H.split("").slice(0,o-k).forEach((E,A)=>{F[k+A]=E}),v(F);const z=F.reduce((E,A,V)=>A?V:E,k),B=Math.min(z+1,o-1);h.current[B]?.focus()}function P(N){N.target.select()}return e.jsx("div",{className:g(It.pinInput,p),children:Array.from({length:o},(N,k)=>e.jsxs(c.Fragment,{children:[u!==void 0&&k>0&&k%u===0&&e.jsx("span",{className:It.separator,children:"-"}),e.jsx("input",{ref:H=>{h.current[k]=H},className:g(It.field,b[k]&&It.filled,l&&It.disabled),value:b[k]||"",onChange:H=>y(H,k),onKeyDown:H=>T(H,k),onPaste:H=>q(H,k),onFocus:P,type:d,inputMode:"numeric",maxLength:1,placeholder:i,disabled:l,autoComplete:f?"one-time-code":void 0})]},k))})}),ze={profile:"_profile_19nii_2",absolute:"_absolute_19nii_2",dropdown:"_dropdown_19nii_2",disabled:"_disabled_19nii_2",trigger:"_trigger_19nii_2",profileOption:"_profileOption_19nii_2",profileOptionAction:"_profileOptionAction_19nii_2",searchIcon:"_searchIcon_19nii_2",inputDefault:"_inputDefault_19nii_2"};function es(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function vr({value:t,defaultValue:s,onChange:n,name:r,picture:a,options:o=[],labelKey:l="label",valueKey:i="value",absolute:u=!1,disabled:d=!1,getObject:f=!1,className:p,editLabel:m="Edit profile",editOptionLabel:x="Edit account",logoutLabel:b="Logout",privacyPolicyLabel:v="Privacy Policy",termsOfUseLabel:h="Terms of use",onLogout:C,onEdit:_,onEditOption:y,onPrivacyPolicy:T,onTermsOfUse:q,renderOption:P}){const[N,k]=pe({value:t,defaultValue:s,onChange:n}),[H,F]=c.useState(!1),[z,B]=c.useState(""),[E,A]=c.useState(!1),V=c.useRef(null);c.useEffect(()=>{function I(O){V.current&&!V.current.contains(O.target)&&F(!1)}return document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)}},[]);function ee(I){return es(I)?String(I[l]??""):String(I??"")}function J(I){return es(I)?I[i]:I}const W=o.find(I=>String(J(I))===String(J(N))),te=z?o.filter(I=>ee(I).toLowerCase().includes(z.toLowerCase())):o;function ie(I){F(!1);const O=f?I:J(I);k(O)}function j(){d||F(I=>!I)}const U=N&&W&&ee(W)||r;return e.jsxs("div",{ref:V,className:g(ze.profile,u&&ze.absolute,d&&ze.disabled,p),children:[!H&&e.jsxs("div",{className:g(ze.trigger,"flex items-center gap-xs text-2xl mr-xxs text-neutral-interaction-default"),onClick:j,children:[e.jsx(Bt,{name:r,src:a,size:"small",alt:"profile picture"}),e.jsx("p",{className:"text-sm font-bold",children:U})]}),H&&e.jsxs("div",{className:ze.dropdown,children:[e.jsxs("div",{className:"flex flex-col items-center gap-xs text-9xl px-xs py-sm text-neutral-interaction-default",children:[e.jsx(Bt,{name:r,src:a,size:"large",alt:"profile picture"}),!!(N&&ee(W)&&r)&&e.jsx("p",{className:"text-sm text-center",children:r}),(N&&ee(W)||r)&&e.jsx("h4",{className:"text-3xl font-bold m-xxs text-center",children:U}),e.jsx(Be,{type:"submit",color:"primary",onClick:_,className:"m-xxs truncate",disabled:!r&&!a,children:m})]}),o&&o.length>0&&e.jsxs("div",{className:"flex flex-col items-center text-neutral-interaction-default",children:[e.jsxs("div",{className:"flex items-center w-full relative",children:[e.jsx(re,{name:"search",className:g(ze.searchIcon,E&&"text-primary-interaction-default")}),e.jsx("input",{type:"search",value:z,onChange:I=>B(I.target.value),className:ze.inputDefault,onFocus:()=>A(!0),onBlur:()=>A(!1),placeholder:"Search"})]}),e.jsx("div",{className:g("w-full text-neutral-interaction-default",te.length>4&&"pr-xxs py-xxs"),children:e.jsx("div",{className:"w-full flex flex-col divide-y-xxs divide-neutral-default font-bold max-h-[12em] overflow-auto custom-scroll",children:te.map((I,O)=>{const le=JSON.stringify(N||{})===JSON.stringify(I||{});return e.jsx("div",{className:g(ze.profileOption,"justify-start w-full [&>*]:text-sm hover:bg-neutral-surface-highlight"),onClick:()=>ie(I),children:P?P({option:I,index:O,active:le}):e.jsx("p",{className:g("text-sm",le&&"[&>*]:underline"),children:ee(I)})},O)})})})]}),e.jsxs("div",{className:g("flex flex-col divide-y-xxs divide-neutral-default",te&&te.length?"border-t-xxs border-t-neutral-default":""),children:[!!N&&e.jsxs("div",{className:g(ze.profileOption,ze.profileOptionAction,"text-neutral-interaction-default hover:bg-neutral-surface-highlight"),onClick:y,children:[e.jsx(re,{name:"person",size:"xl"}),e.jsx("p",{className:"text-sm font-bold",children:x})]}),e.jsxs("div",{className:g(ze.profileOption,ze.profileOptionAction,"text-danger-interaction-default hover:bg-danger-surface-default"),onClick:C,children:[e.jsx(re,{name:"logout",size:"xl"}),e.jsx("p",{className:"text-sm font-bold",children:b})]})]}),e.jsxs("div",{className:"flex items-center justify-center px-xs py-sm pt-xl text-neutral-interaction-default font-bold text-xxs gap-5 [&>*]:cursor-pointer",children:[e.jsx("p",{onClick:T,className:"hover:underline",children:v}),e.jsx("p",{onClick:q,className:"hover:underline",children:h})]})]})]})}const Le={progressBar:"_progressBar_1gm9u_2",stepBar:"_stepBar_1gm9u_2",step:"_step_1gm9u_2",small:"_small_1gm9u_2",progressLabel:"_progressLabel_1gm9u_2",progressIcon:"_progressIcon_1gm9u_2",medium:"_medium_1gm9u_2",large:"_large_1gm9u_2",progressHolder:"_progressHolder_1gm9u_2",progressFill:"_progressFill_1gm9u_2",filled:"_filled_1gm9u_2",neutralBg:"_neutralBg_1gm9u_2",info:"_info_1gm9u_2",success:"_success_1gm9u_2",warning:"_warning_1gm9u_2",danger:"_danger_1gm9u_2",neutral:"_neutral_1gm9u_2",indeterminate:"_indeterminate_1gm9u_2",query:"_query_1gm9u_2"};function Cr({value:t=0,size:s="medium",type:n="primary",color:r="",icon:a="",infoMessage:o="",steps:l=0,animationType:i,displayPercentage:u,neutralBackground:d=!1,iconSlot:f,className:p}){const x=(()=>{let C=t*100;return l?C=t/l*100:i&&(C=50),Math.max(0,Math.min(100,C))+"%"})(),b=()=>d||!r?"":Ke(r),v=!i&&(a||f),h=e.jsx(e.Fragment,{children:f??e.jsx(re,{name:a})});return l?e.jsx("div",{className:g(Le.stepBar,"flex flex-row gap-xs",Le[s],Le[n],d&&Le.neutralBg,p),children:Array.from({length:l},(C,_)=>_+1).map(C=>e.jsx("div",{className:g(Le.step,C<=t&&Le.filled,d&&Le.neutralBg),style:{background:C<=t?r:b(),width:`${100/l}%`}},C))}):e.jsxs("div",{className:g(Le.progressBar,Le[s],Le[n],d&&Le.neutralBg,p),style:{background:b()},children:[e.jsxs("div",{className:Le.progressHolder,children:[e.jsx("div",{className:g(Le.progressFill,Le[s],i&&Le[i]),style:{background:r,width:x},children:u==="bar"&&!i&&e.jsx("label",{className:Le.progressLabel,children:x})}),u==="center"&&!i&&e.jsx("label",{className:g(Le.progressLabel,"absolute"),children:x})]}),v&&(o?e.jsx(Ye,{className:Le.progressIcon,style:{left:x,color:r},labelValue:o,position:"bottom",children:h}):e.jsx("div",{className:Le.progressIcon,style:{left:x,color:r},children:h}))]})}const cn={radioGroup:"_radioGroup_166p9_2",horizontal:"_horizontal_166p9_2",vertical:"_vertical_166p9_2"},ts=c.createContext(null);function yr({value:t,defaultValue:s,onChange:n,vertical:r=!1,disabled:a=!1,options:o,labelKey:l="label",valueKey:i="value",getObject:u=!1,children:d,className:f}){const[p,m]=pe({value:t,defaultValue:s,onChange:n});function x(_){if(u&&o){const y=o.find(T=>v(T)===_);if(y!==void 0){m(y);return}}m(_)}function b(_){return Se(_)?_[l]:String(_)}function v(_){return Se(_)?_[i]:_}function h(_){return Se(_)?_.disabled??!1:!1}const C=u&&Se(p)?p[i]:p;return e.jsx(ts.Provider,{value:{selected:C,disabled:a,select:x},children:e.jsx("div",{className:g(cn.radioGroup,r?cn.vertical:cn.horizontal,f),children:o?o.map(_=>{const y=v(_);return e.jsx(ns,{groupValue:y,disabled:h(_),children:b(_)},y)}):d})})}const rt={radio:"_radio_1gg7x_2",onboarding:"_onboarding_1gg7x_2",outerCircle:"_outerCircle_1gg7x_2",radioLabel:"_radioLabel_1gg7x_2",radioText:"_radioText_1gg7x_2",selected:"_selected_1gg7x_2",disabled:"_disabled_1gg7x_2",innerCircle:"_innerCircle_1gg7x_2",innerCircleActive:"_innerCircleActive_1gg7x_2"};function ns({id:t,name:s,value:n,defaultValue:r,onChange:a,groupValue:o,disabled:l,variant:i="default",children:u,className:d}){const f=c.useContext(ts),[p,m]=pe({value:f&&o!==void 0?void 0:n,defaultValue:f&&o!==void 0?void 0:r??!1,onChange:f&&o!==void 0?void 0:a}),x=f!==null&&o!==void 0,b=x?f.selected===o:p??!1,v=(f?.disabled??!1)||(l??!1);function h(){v||(x?f.select(o):m(!0))}const C=u?t||s?e.jsx("label",{htmlFor:t||s,className:g(rt.radioLabel,"cursor-[inherit]"),children:u}):e.jsx("div",{className:rt.radioText,children:u}):null;return e.jsxs("div",{id:t,role:"radio","aria-checked":b,"aria-disabled":v,className:g(rt.radio,rt[i],b&&rt.selected,v&&rt.disabled,d),onClick:h,children:[e.jsx("span",{tabIndex:0,className:rt.outerCircle,onKeyUp:_=>{_.key===" "&&h()},children:e.jsx("span",{className:g(rt.innerCircle,b&&rt.innerCircleActive)})}),C]})}const Ct={optionContent:"_optionContent_dkzu4_2",displayLabel:"_displayLabel_dkzu4_2",selectCount:"_selectCount_dkzu4_2"};function un({value:t,defaultValue:s,onChange:n,options:r=[],labelKey:a="label",valueKey:o="value",multiple:l=!1,searchable:i=!1,clearable:u=!1,disabled:d=!1,labelValue:f="",getObject:p=!1,isError:m=!1,errorMessage:x="",infoMessage:b="",required:v=!1,placeholder:h,secondary:C=!1,icon:_,expanded:y,onExpandedChange:T,renderSearchLabel:q,renderOption:P,renderStatus:N,renderStatusLabel:k,renderActions:H,renderClearLabel:F,children:z,className:B}){const E=l?Array.isArray(s)?s:s!=null?[s]:[]:Array.isArray(s)?s[0]:s??null,[A,V]=pe({value:t,defaultValue:E,onChange:n}),[ee,J]=c.useState(""),[W,te]=pe({value:y,defaultValue:!1,onChange:T}),[ie,j]=c.useState(-1);function U(Q){return Se(Q)?Q[a]:String(Q??"")}function I(Q){return Se(Q)?Q[o]:Q}function O(Q){return l?(Array.isArray(A)?A:[]).some(je=>I(je)===I(Q)):I(A)===I(Q)}function le(Q){if(d)return;const ge=p?Q:I(Q);if(l){const je=Array.isArray(A)?[...A]:[],w=je.findIndex(X=>I(X)===I(Q));w!==-1?je.splice(w,1):je.push(ge),V(je)}else V(ge),te(!1),j(-1)}function Ce(){V(l?[]:null)}const ne=i&&ee?r.filter(Q=>U(Q).toLowerCase().includes(ee.toLowerCase())):r;function de(){if(l){const ge=Array.isArray(A)?A:[];return ge.length===0?"":ge.map(je=>{const w=r.find(X=>I(X)===I(je));return U(w||je)}).join(", ")}if(A==null)return"";const Q=r.find(ge=>I(ge)===I(A));return U(Q||A)}const ue=de(),we=l?Array.isArray(A)&&A.length>0:A!=null;function ce(Q){if(!d)switch(Q.key){case"ArrowDown":Q.preventDefault(),W?j(ge=>ge<ne.length-1?ge+1:ge):(te(!0),j(0));break;case"ArrowUp":Q.preventDefault(),W?j(ge=>ge>0?ge-1:ge):(te(!0),j(ne.length-1));break;case"Home":Q.preventDefault(),W&&ne.length>0&&j(0);break;case"End":Q.preventDefault(),W&&ne.length>0&&j(ne.length-1);break;case"Enter":Q.preventDefault(),W&&ie>=0&&ie<ne.length&&le(ne[ie]);break;case"Escape":Q.preventDefault(),te(!1),j(-1);break}}function Y(Q){te(Q),Q||j(-1)}const R=typeof z=="function",ae=R?void 0:z,S=l&&Array.isArray(A)&&A.length>0&&!d&&(!W&&i||!i);let D;(!W||!i)&&(we&&N?D=N(A,r):S?D=k?k(A.length):e.jsx("span",{className:"font-bold",children:"Selected"}):ue&&!l?D=e.jsx("span",{className:Ct.displayLabel,children:ue}):we||(ae?D=e.jsx("span",{className:g(Ct.displayLabel,"text-neutral-foreground-low"),children:ae}):h&&(D=e.jsx("span",{className:g(Ct.displayLabel,"text-neutral-foreground-low"),children:h}))));function Z(Q,ge){const je=O(Q);return R?z(Q,ge,je):P?P(Q,je):e.jsx("span",{children:U(Q)})}const ve=ne.map((Q,ge)=>e.jsxs(Jt,{selected:!l&&O(Q),disabled:Q?.disabled,secondary:C,noHover:l,className:g(Ct.optionContent,ge===ie&&Ct.highlighted),onClick:()=>le(Q),children:[l&&e.jsx(dt,{value:O(Q),className:"pointer-events-none"}),Z(Q,ge)]},ge)),Ne=H?H():u?e.jsx(Be,{variant:"plain",size:"small",onClick:Ce,children:F?F():"Clear"}):void 0,_e=S&&l?e.jsx("span",{className:Ct.selectCount,children:A.length}):void 0;return e.jsx("div",{onKeyDown:ce,children:e.jsx(Ot,{value:W,onChange:Y,labelValue:f,disabled:d,isError:m,errorMessage:x,infoMessage:b,required:v,secondary:C,options:ve,actions:Ne,complement:_e,className:g("select",B),children:e.jsx(zn,{value:ee,onChange:Q=>J(Q),expanded:W,onExpandedChange:Q=>Y(Q),searchable:i,disabled:d,isError:m,secondary:C,icon:_,searchLabel:q?q():void 0,status:D,options:we?r:void 0})})})}const be={richTextEditor:"_richTextEditor_zftxo_2",noBorder:"_noBorder_zftxo_2",toolbar:"_toolbar_zftxo_2",toolbarGroup:"_toolbarGroup_zftxo_2",toolbarBtn:"_toolbarBtn_zftxo_2",toolbarBtnActive:"_toolbarBtnActive_zftxo_2",editorContent:"_editorContent_zftxo_2",focus:"_focus_zftxo_2",disabled:"_disabled_zftxo_2",error:"_error_zftxo_2",errorMessage:"_errorMessage_zftxo_2",colorPicker:"_colorPicker_zftxo_2",customColorPicker:"_customColorPicker_zftxo_2",colorColumn:"_colorColumn_zftxo_2",colorGrid:"_colorGrid_zftxo_2",colorRow:"_colorRow_zftxo_2",customRole:"_customRole_zftxo_2",colorOption:"_colorOption_zftxo_2",colorDivider:"_colorDivider_zftxo_2",addColorBtn:"_addColorBtn_zftxo_2",customColorActions:"_customColorActions_zftxo_2",imageInput:"_imageInput_zftxo_2",linkDialogContent:"_linkDialogContent_zftxo_2",linkInput:"_linkInput_zftxo_2",linkDialogActions:"_linkDialogActions_zftxo_2"};function jr(t){let s=0,n=0,r=0;if(t.startsWith("rgb(")){const o=t.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);o&&(s=parseInt(o[1]),n=parseInt(o[2]),r=parseInt(o[3]))}else if(t.startsWith("hsl(")){const o=t.match(/hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)/);if(o){const l=parseInt(o[1])/360,i=parseInt(o[2])/100,u=parseInt(o[3])/100,d=(f,p,m)=>(m<0&&(m+=1),m>1&&(m-=1),m<1/6?f+(p-f)*6*m:m<1/2?p:m<2/3?f+(p-f)*(2/3-m)*6:f);if(i===0)s=n=r=u;else{const f=u<.5?u*(1+i):u+i-u*i,p=2*u-f;s=d(p,f,l+1/3),n=d(p,f,l),r=d(p,f,l-1/3)}s=Math.round(s*255),n=Math.round(n*255),r=Math.round(r*255)}}else if(t.startsWith("#")){const o=t.replace("#","");/^[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$/i.test(o)&&(s=parseInt(o.substring(0,2),16),n=parseInt(o.substring(2,4),16),r=parseInt(o.substring(4,6),16))}return(.299*s+.587*n+.114*r)/255<.5?"text-white":"text-black"}function ss({color:t,selected:s,onClick:n,className:r}){const a=jr(t);return e.jsx("div",{className:g(be.colorOption,r),style:{backgroundColor:t},onClick:()=>n?.(t),children:s&&e.jsx(re,{name:"check",className:a})})}function wr(){const t=[],s=[];for(let o=10;o>=0;o--)s.push(Ke("#000000",o/10));t.push(s);const n=["hsl(0, 100%, 50%)","hsl(30, 100%, 50%)","hsl(60, 100%, 50%)","hsl(90, 100%, 50%)","hsl(120, 100%, 50%)","hsl(150, 100%, 50%)","hsl(180, 100%, 50%)","hsl(210, 100%, 50%)","hsl(240, 100%, 50%)","hsl(270, 100%, 50%)","hsl(300, 100%, 50%)"];t.push(n);const r=[];for(let o=0;o<3;o++){const l=[];n.forEach(i=>l.push(Ke(i,o*.2+.2))),r.push(l)}t.push(...r);const a=[];for(let o=2;o>=0;o--){const l=[];n.forEach(i=>l.push(Ke(i,o*.2+.2,[0,0,0]))),a.push(l)}return t.push(...a),t}const Nr=wr();function rs({value:t,expanded:s,custom:n,onValueChange:r,onExpandedChange:a,onCustomChange:o,children:l}){const[i,u]=c.useState(!1),[d,f]=c.useState(t);function p(b){r(b),f(b),a(!1)}function m(){r(d),n.includes(d)||o([...n,d]),setTimeout(()=>u(!1))}function x(){setTimeout(()=>u(!1))}return e.jsx(xt,{value:s,onChange:a,card:e.jsx("div",{className:g(be.colorPicker,i&&be.customColorPicker),children:i?e.jsxs(e.Fragment,{children:[e.jsx(en,{value:d,onChange:f,noShadow:!0}),e.jsxs("div",{className:be.customColorActions,children:[e.jsx(Be,{variant:"plain",color:"neutral",size:"small",onClick:x,children:"Cancel"}),e.jsx(Be,{size:"small",onClick:m,children:"Add"})]})]}):e.jsxs("div",{className:be.colorColumn,children:[e.jsx("div",{className:be.colorGrid,children:Nr.map((b,v)=>e.jsx("div",{className:be.colorRow,children:b.map(h=>e.jsx(ss,{color:h,selected:t===h,onClick:p},h))},v))}),e.jsx("hr",{className:be.colorDivider}),e.jsxs("div",{className:g(be.colorRow,be.customRole),children:[e.jsx("div",{className:be.addColorBtn,title:"Add custom color",onClick:()=>u(!0),children:e.jsx(re,{name:"add_circle",className:"text-neutral-interactive-default cursor-pointer"})}),n.map(b=>e.jsx(ss,{color:b,selected:t===b,onClick:p},b))]})]})}),children:l})}const kr=["b","i","u","strong","em","br","div","ul","ol","li","blockquote","a","img","span","font"],Sr=["style","href","src","alt","title","color"],os=Array.from({length:10},(t,s)=>s*4+12);function as(t){const n=new DOMParser().parseFromString(t,"text/html"),r=document.createElement("div");for(const a of Array.from(n.body.childNodes)){const o=ls(a);o&&r.appendChild(o)}return r.innerHTML}function ls(t){if(t.nodeType===Node.TEXT_NODE)return t;if(t.nodeType!==Node.ELEMENT_NODE)return null;const s=t,n=s.tagName.toLowerCase();if(!kr.includes(n))return document.createTextNode(s.textContent||"");const r=document.createElement(n);for(const a of Array.from(s.attributes))Sr.includes(a.name)&&r.setAttribute(a.name,a.value);for(const a of Array.from(s.childNodes)){const o=ls(a);o&&r.appendChild(o)}return r}function $r(t){return t.replace(/\s+/g," ").replace(/>\s+</g,"><").trim()}function Ir({value:t,defaultValue:s,onChange:n,placeholder:r,disabled:a=!1,labelValue:o,errorMessage:l,hasError:i=!1,infoMessage:u,required:d=!1,minHeight:f="200px",maxHeight:p="400px",noBorder:m=!1,className:x}){const[b,v]=pe({value:t,defaultValue:s??"",onChange:n}),h=c.useRef(null),C=c.useRef(null),_=c.useRef([]),y=c.useRef(-1),T=c.useRef(!1),[q,P]=c.useState(!1),[N,k]=c.useState({}),[H,F]=c.useState(16),[z,B]=c.useState("#000000"),[E,A]=c.useState(!1),[V,ee]=c.useState("#ffffff"),[J,W]=c.useState(!1),[te,ie]=c.useState([]),[j,U]=c.useState(!1),[I,O]=c.useState(""),[le,Ce]=c.useState(""),ne=c.useCallback($=>{if(T.current)return;const K=$r($);_.current[y.current]!==K&&(y.current<_.current.length-1&&(_.current=_.current.slice(0,y.current+1)),_.current.push(K),y.current=_.current.length-1,_.current.length>50&&(_.current.shift(),y.current--))},[]);function de(){try{const $=window.getSelection();if(!$||$.rangeCount===0)return;const K=$.getRangeAt(0);h.current?.contains(K.commonAncestorContainer)&&(C.current=K.cloneRange())}catch{C.current=null}}function ue(){try{const $=window.getSelection();if(!C.current||!h.current||!$)return;h.current.focus(),$.removeAllRanges();const K=C.current;if(h.current.contains(K.commonAncestorContainer))$.addRange(K);else{const fe=document.createRange();fe.setStart(h.current,0),fe.collapse(!0),$.addRange(fe)}}catch{C.current=null}}function we($){if(!h.current||!$||$.rangeCount===0)return!1;try{const K=$.getRangeAt(0);return h.current.contains(K.startContainer)&&h.current.contains(K.endContainer)&&h.current.contains(K.commonAncestorContainer)}catch{return!1}}const ce=c.useCallback(()=>{k({bold:document.queryCommandState("bold"),italic:document.queryCommandState("italic"),underline:document.queryCommandState("underline"),strikeThrough:document.queryCommandState("strikeThrough"),insertUnorderedList:document.queryCommandState("insertUnorderedList"),insertOrderedList:document.queryCommandState("insertOrderedList"),justifyLeft:document.queryCommandState("justifyLeft"),justifyCenter:document.queryCommandState("justifyCenter"),justifyRight:document.queryCommandState("justifyRight"),justifyFull:document.queryCommandState("justifyFull")});const $=window.getSelection();if(!$||$.rangeCount===0||!h.current)return;let K=$.getRangeAt(0).startContainer,fe=!1;for(;K&&K!==h.current;){if(K.nodeType===Node.ELEMENT_NODE){const he=window.getComputedStyle(K),ke=parseInt(he.fontSize),xe=os.find(Ie=>Math.abs(Ie-ke)<=1);if(xe){F(xe),fe=!0;break}}K=K.parentNode}fe||F(16)},[]);function Y(){if(!h.current)return;const $=getComputedStyle(h.current).getPropertyValue("--spacing-base");h.current.querySelectorAll("ul, ol").forEach(K=>{const fe=K;fe.style.listStyleType=K.tagName.toLowerCase()==="ul"?"disc":"decimal",fe.style.paddingLeft=$,fe.style.listStylePosition="outside"}),h.current.querySelectorAll("li").forEach(K=>{K.style.display="list-item",K.style.listStylePosition="outside"})}function R($){if(!h.current||!$.length)return;const K=getComputedStyle(h.current),fe=K.getPropertyValue("--border-width-sm"),he=K.getPropertyValue("--primary-border-default"),ke=K.getPropertyValue("--primary-surface-default"),xe=K.getPropertyValue("--spacing-base"),Ie=K.getPropertyValue("--spacing-xxs"),Ze=K.getPropertyValue("--border-radius-sm");$.forEach(We=>{We.style.borderLeft=`${fe} solid ${he}`,We.style.fontStyle="italic",We.style.backgroundColor=ke,We.style.padding=xe,We.style.margin=`${Ie} 0`,We.style.borderRadius=`0 ${Ze} ${Ze} 0`,We.style.position="relative"})}function ae(){requestAnimationFrame(()=>{if(!h.current)return;Y();const $=h.current.querySelectorAll("blockquote");$.length&&R(Array.from($))})}c.useEffect(()=>{h.current&&(h.current.innerHTML=as(b??""),ae(),ne(b??""))},[]),c.useEffect(()=>{!h.current||h.current.innerHTML===t||(h.current.innerHTML=as(t??""),ae())},[t]);function S($,K){const fe=window.getSelection();if(!(a||!h.current||!we(fe))){ue();try{document.execCommand($,!1,K)}catch{}if(h.current?.focus(),ce(),($==="insertUnorderedList"||$==="insertOrderedList")&&setTimeout(()=>Y()),h.current){const he=h.current.innerHTML;v(he),ne(he)}}}function D($){if(a||!h.current)return;const K=typeof $=="object"?$.value:$;ue();const fe=window.getSelection();if(!fe||fe.rangeCount===0)return;const he=fe.getRangeAt(0);if(he.collapsed){const xe=document.createElement("span");xe.style.fontSize=K+"px",xe.textContent="",he.insertNode(xe),he.setStartAfter(xe),he.collapse(!0)}else{const xe=he.extractContents(),Ie=document.createElement("span");Ie.style.fontSize=K+"px",Ie.appendChild(xe),he.insertNode(Ie),he.selectNodeContents(Ie)}fe.removeAllRanges(),fe.addRange(he),h.current.focus(),F(K);const ke=h.current.innerHTML;v(ke),ne(ke),ce()}function Z($,K){if(!window.getSelection()||a||!h.current)return;ue();try{document.execCommand(K,!1,$)}catch{}h.current.focus();const he=h.current.innerHTML;v(he),ne(he),ce()}function ve(){if(y.current<=0||!h.current)return;T.current=!0,y.current--;const $=_.current[y.current];h.current.innerHTML=$,v($),T.current=!1,h.current.focus(),ce()}function Ne(){if(y.current>=_.current.length-1||!h.current)return;T.current=!0,y.current++;const $=_.current[y.current];h.current.innerHTML=$,v($),T.current=!1,h.current.focus(),ce()}function _e(){if(a)return;de();const $=window.getSelection();$&&!$.isCollapsed&&q?Ce($.toString()):Ce(""),U(!0)}function Q(){if(!(!I.trim()||!An(I.trim())))try{ue();const $=window.getSelection();if(!$||!h.current)return;let K;$.rangeCount===0?(K=document.createRange(),h.current.lastChild?K.setStartAfter(h.current.lastChild):K.setStart(h.current,0),K.collapse(!0)):K=$.getRangeAt(0);const fe=document.createElement("a");fe.href=I.trim(),fe.target="_blank",fe.rel="noopener noreferrer",fe.textContent=le.trim()||I.trim(),K.collapsed||K.deleteContents(),K.insertNode(fe),K.setStartAfter(fe),K.collapse(!0),$.removeAllRanges(),$.addRange(K),U(!1),O(""),Ce(""),h.current.focus();const he=h.current.innerHTML;v(he),ne(he),ce()}catch{}}function ge($){const K=$.target.files;!K||!h.current||(Array.from(K).forEach(fe=>{if(h.current)try{const he=URL.createObjectURL(fe);ue();const ke=window.getSelection();if(!ke)return;let xe;ke.rangeCount===0?(xe=document.createRange(),h.current.lastChild?xe.setStartAfter(h.current.lastChild):xe.setStart(h.current,0),xe.collapse(!0)):xe=ke.getRangeAt(0);const Ie=document.createElement("img"),Ze=getComputedStyle(h.current);Ie.src=he,Ie.alt=fe.name,Ie.style.maxWidth="100%",Ie.style.height="auto",Ie.style.borderRadius=Ze.getPropertyValue("--border-radius-sm"),Ie.style.margin=Ze.getPropertyValue("--spacing-base"),xe.collapsed||xe.deleteContents(),xe.insertNode(Ie),xe.setStartAfter(Ie),xe.collapse(!0),ke.removeAllRanges(),ke.addRange(xe),h.current.focus();const We=h.current.innerHTML;v(We),ne(We),ce()}catch{}}),$.target.value="")}function je(){if(a||!h.current)return;const $=window.getSelection();if(!(!$||$.rangeCount===0))try{const K=$.getRangeAt(0),fe=K.startContainer.nodeType===Node.TEXT_NODE?K.startContainer.parentElement?.closest("blockquote"):K.startContainer?.closest?.("blockquote");if(fe){const ke=fe.parentNode;if(!ke)return;const xe=document.createElement("div");xe.innerHTML=fe.innerHTML,ke.replaceChild(xe,fe);const Ie=document.createRange();Ie.selectNodeContents(xe),$.removeAllRanges(),$.addRange(Ie)}else{const ke=document.createElement("blockquote");if(R([ke]),K.collapsed)ke.innerHTML="Type your quote here...";else{const Ie=K.extractContents();if(Ie.childNodes.length===1&&Ie.firstChild?.nodeType===Node.TEXT_NODE){const Ze=document.createElement("span");Ze.appendChild(Ie),ke.appendChild(Ze)}else ke.appendChild(Ie)}K.insertNode(ke);const xe=document.createRange();xe.selectNodeContents(ke),$.removeAllRanges(),$.addRange(xe)}h.current.focus();const he=h.current.innerHTML;v(he),ne(he),ce()}catch{}}function w(){if(T.current||!h.current)return;const $=h.current.innerHTML;v($),ne($),ce()}function X($){if(!a){if($.ctrlKey&&!$.shiftKey&&$.key==="z"){$.preventDefault(),ve();return}if($.ctrlKey&&($.shiftKey&&$.key==="Z"||$.key==="y")){$.preventDefault(),Ne();return}if($.key==="Tab"){$.preventDefault();const K=window.getSelection();if(!K||K.rangeCount===0)return;const fe=K.getRangeAt(0);let he=fe.startContainer,ke=!1;for(;he&&he!==h.current;){if(he.nodeType===Node.ELEMENT_NODE){const xe=he.tagName?.toLowerCase();if(["li","ul","ol"].includes(xe)){ke=!0;break}}he=he.parentNode}if(ke&&!$.shiftKey)document.execCommand("indent",!1);else if(ke&&$.shiftKey)document.execCommand("outdent",!1);else if(!$.shiftKey){const xe=document.createElement("span");xe.classList.add("tab"),xe.innerHTML=" ",fe.deleteContents(),fe.insertNode(xe),fe.setStartAfter(xe)}}["Enter","Tab","Backspace"].includes($.key)&&(w(),ce())}}function L(){P(!0),ce()}function M(){P(!1)}function G($){if(a)return;const K=window.getSelection();we(K)||$.preventDefault()}function oe($,K,fe,he){return e.jsx(Ye,{position:"bottom",labelValue:fe,children:e.jsx("button",{className:g(be.toolbarBtn,N[$]&&be.toolbarBtnActive),title:fe,onMouseDown:ke=>{ke.preventDefault(),de()},onClick:()=>he?he():S($),children:e.jsx(re,{name:K})},$)})}const $e=g(be.richTextEditor,q&&be.focus,a&&be.disabled,i&&be.error,m&&be.noBorder,x);return e.jsxs("div",{className:$e,children:[o&&e.jsx(gt,{labelValue:o,infoMessage:u,required:d,className:"mb-xxs"}),e.jsxs("div",{className:be.toolbar,children:[e.jsxs("div",{className:be.toolbarGroup,children:[e.jsx("button",{className:be.toolbarBtn,title:"Undo (Ctrl+Z)",disabled:y.current<=0,onMouseDown:$=>$.preventDefault(),onClick:ve,children:e.jsx(re,{name:"undo"})}),e.jsx("button",{className:be.toolbarBtn,title:"Redo (Ctrl+Y)",disabled:y.current>=_.current.length-1,onMouseDown:$=>$.preventDefault(),onClick:Ne,children:e.jsx(re,{name:"redo"})})]}),e.jsx("div",{className:be.toolbarGroup,children:e.jsx(un,{value:H,onChange:D,options:os.map($=>({label:String($),value:$})),disabled:a})}),e.jsxs("div",{className:be.toolbarGroup,children:[oe("bold","format_bold","Bold (Ctrl+B)"),oe("italic","format_italic","Italic (Ctrl+I)"),oe("underline","format_underlined","Underline (Ctrl+U)"),oe("strikeThrough","strikethrough_s","Strikethrough")]}),e.jsxs("div",{className:be.toolbarGroup,children:[e.jsx(rs,{value:z,expanded:E,custom:te,onValueChange:$=>{B($),Z($,"foreColor")},onExpandedChange:$=>{$&&de(),A($)},onCustomChange:ie,children:e.jsx("button",{className:be.toolbarBtn,title:"Text color",onMouseDown:$=>{$.preventDefault(),de()},onClick:()=>A(!E),children:e.jsx(re,{name:"format_color_text"})})}),e.jsx(rs,{value:V,expanded:J,custom:te,onValueChange:$=>{ee($),Z($,"backColor")},onExpandedChange:$=>{$&&de(),W($)},onCustomChange:ie,children:e.jsx("button",{className:be.toolbarBtn,title:"Background color",onMouseDown:$=>{$.preventDefault(),de()},onClick:()=>W(!J),children:e.jsx(re,{name:"format_color_fill"})})})]}),e.jsxs("div",{className:be.toolbarGroup,children:[oe("insertUnorderedList","format_list_bulleted","Bulleted list"),oe("insertOrderedList","format_list_numbered","Numbered list")]}),e.jsxs("div",{className:be.toolbarGroup,children:[oe("justifyLeft","format_align_left","Align left"),oe("justifyCenter","format_align_center","Align center"),oe("justifyRight","format_align_right","Align right"),oe("justifyFull","format_align_justify","Justify")]}),e.jsxs("div",{className:be.toolbarGroup,children:[oe("createLink","link","Insert link",_e),e.jsxs("button",{className:be.toolbarBtn,title:"Insert image",onMouseDown:$=>{$.preventDefault(),de()},children:[e.jsx(re,{name:"image"}),e.jsx("input",{type:"file",accept:"image/*",className:be.imageInput,onChange:ge})]}),oe("insertBlockquote","format_quote","Quote",je)]}),e.jsx("div",{className:be.toolbarGroup,children:oe("removeFormat","format_clear","Remove formatting")})]}),e.jsx("div",{ref:h,className:be.editorContent,role:"textbox",style:{minHeight:f,maxHeight:p},contentEditable:!a,"data-placeholder":r,"aria-label":o,"aria-required":d,"aria-invalid":i,onInput:w,onFocus:L,onBlur:M,onKeyDown:X,onKeyUp:ce,onMouseUp:ce,onPaste:G}),e.jsx(sn,{value:j,onChange:U,children:e.jsxs("div",{className:be.linkDialogContent,children:[e.jsx("input",{type:"text",placeholder:"URL (e.g. https://example.com)",value:I,onChange:$=>O($.target.value),onKeyDown:$=>{$.key==="Enter"&&Q()},className:be.linkInput,autoFocus:!0}),e.jsx("input",{type:"text",placeholder:"Link text (optional)",value:le,onChange:$=>Ce($.target.value),onKeyDown:$=>{$.key==="Enter"&&Q()},className:be.linkInput}),e.jsxs("div",{className:be.linkDialogActions,children:[e.jsx(Be,{className:be.linkCancelBtn,variant:"plain",color:"neutral",onClick:()=>{U(!1),O(""),Ce("")},children:"Cancel"}),e.jsx(Be,{className:be.linkInsertBtn,disabled:!I.trim(),onClick:Q,children:"Insert Link"})]})]})}),i&&l&&e.jsx("small",{className:be.errorMessage,children:l})]})}const Tt={roundMenu:"_roundMenu_1f5g9_2",menuItem:"_menuItem_1f5g9_2",collapsed:"_collapsed_1f5g9_2",trigger:"_trigger_1f5g9_2"};function Tr({options:t,iconKey:s="icon",labelKey:n="label",radius:r=80,className:a}){const[o,l]=c.useState(!1);function i(u,d){const f=2*Math.PI*u/d-Math.PI/2,p=Math.cos(f)*r,m=Math.sin(f)*r;return{transform:`translate3d(${p}px, ${m}px, 0)`}}return e.jsxs("div",{className:g(Tt.roundMenu,a),children:[t.map((u,d)=>{const f=o?i(d,t.length):void 0;return e.jsx("div",{className:g(Tt.menuItem,!o&&Tt.collapsed),style:f,"aria-label":u[n]??u.label,title:u[n]??u.label,children:e.jsx(Be,{round:!0,background:u.background,icon:u[s]??u.icon,onClick:u.onClick,children:u[n]??u.label})},d)}),e.jsx(Be,{round:!0,className:g(Tt.trigger,o&&Tt.expanded),onClick:()=>l(u=>!u),color:o?"neutral":"success",icon:o?"close":"add"})]})}const Te={sidebar:"_sidebar_1bq5p_2",collapsed:"_collapsed_1bq5p_2",expanded:"_expanded_1bq5p_2",optionsList:"_optionsList_1bq5p_2",optionsContainer:"_optionsContainer_1bq5p_2",bottomOptions:"_bottomOptions_1bq5p_2",option:"_option_1bq5p_2",optionActive:"_optionActive_1bq5p_2",optionIcon:"_optionIcon_1bq5p_2",optionLabel:"_optionLabel_1bq5p_2",optionLink:"_optionLink_1bq5p_2",disabled:"_disabled_1bq5p_2",subPanel:"_subPanel_1bq5p_2",subPanelHidden:"_subPanelHidden_1bq5p_2",subPanelVisible:"_subPanelVisible_1bq5p_2",subOption:"_subOption_1bq5p_2",subOptionActive:"_subOptionActive_1bq5p_2",subOptionIcon:"_subOptionIcon_1bq5p_2",subOptionLabel:"_subOptionLabel_1bq5p_2",subOptionChevron:"_subOptionChevron_1bq5p_2",rotated:"_rotated_1bq5p_2",subOptionLink:"_subOptionLink_1bq5p_2"};let At=null;try{At=require("react-router-dom").Link}catch{}const is=c.createContext({currentValue:void 0,onChange:()=>{}});function mt(t){return Se(t)?t.value:t}function dn(t){return t?t.startsWith("/")?t:"/"+t:""}function cs({option:t,depth:s,parentPath:n=""}){const[r,a]=c.useState(!1),{currentValue:o,onChange:l}=c.useContext(is);let i=n;t.path&&(!i.endsWith("/")&&!t.path.startsWith("/")?i+="/":i.endsWith("/")&&t.path.startsWith("/")&&(i=i.slice(0,-1)),i+=t.path);const u=!!(t.options&&t.options.length);function d(C=t){return mt(o)===mt(C)||!!C.options&&C.options.some(_=>d(_))}const f=d();function p(C){t.disabled||(u?a(_=>!_):l(t))}function m(C){C.key==="Enter"&&p()}const x=[Te.subOption,f?Te.subOptionActive:"",r?Te.subOptionExpanded:"",t.disabled?Te.disabled:""].filter(Boolean).join(" "),b={paddingLeft:`${s*16+16}px`},v=e.jsxs("div",{className:x,style:b,tabIndex:0,onClick:p,onKeyUp:m,role:u?"button":void 0,children:[t.icon&&e.jsx("span",{className:`${Te.subOptionIcon} material-symbols-rounded`,children:t.icon}),e.jsx("span",{className:Te.subOptionLabel,children:t.label}),u&&e.jsx("span",{className:`${Te.subOptionChevron} material-symbols-rounded${r?` ${Te.rotated}`:""}`,children:"keyboard_arrow_down"})]});let h;return u?h=v:At&&t.path?h=e.jsx(At,{to:i,tabIndex:0,className:Te.subOptionLink,onClick:()=>l(t),children:v}):t.path?h=e.jsx("a",{href:i,tabIndex:0,className:Te.subOptionLink,children:v}):h=v,e.jsxs(e.Fragment,{children:[h,u&&r&&t.options?.map(C=>e.jsx(cs,{option:C,depth:s+1,parentPath:i},C.value))]})}function Ar({option:t,sidebarExpanded:s,onRailClick:n,activeParentValue:r}){const a=!!(t.options&&t.options.length),o=mt(t)===mt(r),l=[Te.option,o?Te.optionActive:"",t.disabled?Te.disabled:""].filter(Boolean).join(" ");function i(){t.disabled||n(t)}function u(f){f.key==="Enter"&&i()}const d=e.jsxs("div",{className:l,tabIndex:0,onClick:i,onKeyUp:u,role:a?"button":void 0,"aria-expanded":a?o:void 0,children:[e.jsx("span",{className:Te.optionIcon,children:t.icon&&e.jsx("span",{className:"material-symbols-rounded",children:t.icon})}),s&&e.jsx("span",{className:Te.optionLabel,children:t.label})]});return a?d:At&&t.path?e.jsx(At,{to:dn(t.path),tabIndex:0,className:Te.optionLink,children:d}):t.path?e.jsx("a",{href:dn(t.path),tabIndex:0,className:Te.optionLink,children:d}):d}function Er({value:t,defaultValue:s,onChange:n,expanded:r=!1,options:a,getObject:o=!1,className:l}){const[i,u]=pe({value:t,defaultValue:s,onChange:n}),[d,f]=c.useState(!1),[p,m]=c.useState(void 0),[x,b]=c.useState("100vh"),v=c.useRef(null);c.useEffect(()=>{function E(){const A=document.querySelector(".navbar")?.getBoundingClientRect()?.height;b(A?`calc(100vh - ${A}px)`:"100vh")}return E(),window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]),c.useEffect(()=>{const E=h(a);E&&_(E)},[]);function h(E,A=""){for(const V of E){const ee=C(A,V.path);if(Rs(ee))return V;const J=h(V.options||[],ee);if(J)return J}}function C(E,A){if(!A)return E;let V=E;return!V.endsWith("/")&&!A.startsWith("/")?V+="/":V.endsWith("/")&&A.startsWith("/")&&(V=V.slice(0,-1)),V+A}function _(E){if(E.disabled)return;const A=o?E:mt(E);u(A)}function y(E,A){return E.find(V=>mt(V)===mt(A)?!0:!!y(V.options||[],A))}const T=y(a,i),q=a.filter(E=>!E.bottom),P=a.filter(E=>E.bottom);function N(E){if(E.disabled)return;!!(E.options&&E.options.length)?p?.value===E.value?f(V=>!V):(m(E),f(!0)):(f(!1),_(E))}function k(E){const A=E.relatedTarget,V=E.currentTarget;(!A||!V.contains(A))&&f(!1)}const H=[Te.sidebar,r?Te.expanded:Te.collapsed,l].filter(Boolean).join(" "),F=[Te.subPanel,d?Te.subPanelVisible:Te.subPanelHidden].filter(Boolean).join(" "),z={currentValue:i,onChange:_,getObject:o};function B(E){return e.jsx(Ar,{option:E,sidebarExpanded:r,onRailClick:N,activeParentValue:T},E.value)}return e.jsx(is.Provider,{value:z,children:e.jsxs("div",{ref:v,className:H,style:{height:x},tabIndex:0,onBlur:k,children:[e.jsxs("div",{className:Te.optionsList,children:[e.jsx("div",{className:Te.optionsContainer,children:q.map(B)}),P.length>0&&e.jsx("div",{className:Te.bottomOptions,children:P.map(B)})]}),e.jsx("div",{className:F,children:p&&p.options&&p.options.length>0&&p.options.map(E=>e.jsx(cs,{option:E,depth:0,parentPath:dn(p.path)},E.value))})]})})}const fn={statusBadge:"_statusBadge_xd68m_2",primary:"_primary_xd68m_2",info:"_info_xd68m_2",success:"_success_xd68m_2",warning:"_warning_xd68m_2",danger:"_danger_xd68m_2",neutral:"_neutral_xd68m_2",secondary:"_secondary_xd68m_2",heavy:"_heavy_xd68m_2"};function mn({labelValue:t="",color:s="primary",size:n="medium",type:r="default",loading:a=!1,closeable:o=!1,icon:l="",isAppendedIcon:i=!1,children:u,className:d,onClose:f}){return e.jsx(On,{className:g(fn.statusBadge,fn[s],fn[r],d),labelValue:t,type:r,size:n,loading:a,closeable:o,icon:l,isAppendedIcon:i,onClose:f,children:u||t})}const qe={stepper:"_stepper_iqqeu_2",stepContainer:"_stepContainer_iqqeu_2",noClick:"_noClick_iqqeu_2",step:"_step_iqqeu_2",small:"_small_iqqeu_2",large:"_large_iqqeu_2",past:"_past_iqqeu_2",active:"_active_iqqeu_2",future:"_future_iqqeu_2",label:"_label_iqqeu_2",connector:"_connector_iqqeu_2"};function Lr({value:t,onChange:s,options:n,labelKey:r="label",valueKey:a="label",iconKey:o="icon",size:l="medium",getObject:i=!1,noClick:u=!1,allowSkip:d=!1,className:f}){const[p,m]=pe({value:t,defaultValue:void 0,onChange:s}),x=h(p),[b,v]=c.useState(()=>Math.max(0,x!=-1?x:0));c.useEffect(()=>{const N=h(t);N!=-1&&v(N)},[p]);function h(N){return n.findIndex(k=>_(k)==_(N))}function C(N){return Se(N)?N[r]:N}function _(N){return Se(N)?N[a]:N}function y(N){return Se(N)?N[o]:"image"}function T(N){const k=p??0;return N===k?"active":N<k||N<=b?"past":"future"}function q(N){return N<b?"past":"future"}function P(N,k){if(!u){const H=h(p);if(!d&&k-H>1)return;v(F=>Math.max(F,k)),m(i?N:_(N))}}return e.jsx("div",{className:g(qe.stepper,f),children:n.map((N,k)=>{const H=T(k);return e.jsxs("div",{className:g("flex items-center",n[k+1]?"w-full":"w-fit",l,qe[l]),children:[e.jsxs("div",{className:g(qe.stepContainer,u&&qe.noClick),onClick:()=>P(N,k),children:[e.jsx("div",{className:g(qe[l],qe[H],qe.step,_(p)==_(N)&&qe.active,{[qe.past]:k<b,[qe.future]:k>b}),children:e.jsx(re,{className:"stepper-icon",name:y(N)})}),e.jsx("span",{className:qe.label,children:C(N)})]}),n[k+1]&&e.jsx("div",{className:g(qe.connector,qe[q(k)])})]},k)})})}const ht={switch:"_switch_1pjii_2",rhs:"_rhs_1pjii_2",disabled:"_disabled_1pjii_2",track:"_track_1pjii_2",active:"_active_1pjii_2",thumb:"_thumb_1pjii_2",thumbActive:"_thumbActive_1pjii_2"};function Mr({id:t,name:s,value:n,defaultValue:r,onChange:a,rhs:o=!1,disabled:l=!1,children:i,className:u}){const[d,f]=pe({value:n,defaultValue:r??!1,onChange:a});function p(){l||f(!d)}const m=()=>i?t||s?e.jsx("label",{htmlFor:t||s,className:"text-xs cursor-[inherit]",children:i}):e.jsx("span",{className:"text-xs",children:i}):null;return e.jsxs("div",{role:"switch","aria-checked":!!d,"aria-disabled":l,className:g(ht.switch,o&&ht.rhs,l&&ht.disabled,u),onClick:p,children:[e.jsx("div",{className:g(ht.track,d&&ht.active),children:e.jsx("div",{className:g(ht.thumb,d&&ht.thumbActive)})}),m()]})}const yt={container:"_container_1g3ce_2",notCard:"_notCard_1g3ce_2",tabButton:"_tabButton_1g3ce_2",icon:"_icon_1g3ce_2",active:"_active_1g3ce_2"};function Or({value:t,defaultValue:s,onChange:n,options:r=[],labelKey:a="label",isIcon:o=!1,notCard:l=!1,children:i,className:u}){const[d,f]=pe({value:t,defaultValue:s??0,onChange:n});function p(m){return typeof m=="string"?m:m[a]}return e.jsxs("div",{className:g(yt.container,l&&yt.notCard,u),children:[e.jsx("div",{className:"flex font-bold text-sm gap-xs w-fit",children:r.map((m,x)=>e.jsx("button",{className:g(yt.tabButton,d===x&&yt.active),onClick:()=>f(x),children:typeof m=="object"&&m.icon?e.jsxs(e.Fragment,{children:[e.jsx(re,{name:m.icon,className:yt.icon}),e.jsx("span",{children:p(m)})]}):o&&typeof m=="string"?e.jsx(re,{name:m,className:yt.icon}):e.jsx("span",{children:p(m)})},x))}),i]})}const ye={table:"_table_xchde_2",tableContent:"_tableContent_xchde_2",noShadow:"_noShadow_xchde_2",headerFixed:"_headerFixed_xchde_2",tableStyle:"_tableStyle_xchde_2",firstTh:"_firstTh_xchde_2",lastTh:"_lastTh_xchde_2",pointerNone:"_pointerNone_xchde_2",hoverBg:"_hoverBg_xchde_2",bgWhite:"_bgWhite_xchde_2",sortable:"_sortable_xchde_2",thContent:"_thContent_xchde_2",thLabel:"_thLabel_xchde_2",sortIcon:"_sortIcon_xchde_2",sortIconRotated:"_sortIconRotated_xchde_2",sortIconActive:"_sortIconActive_xchde_2",row:"_row_xchde_2",cell:"_cell_xchde_2",rowHover:"_rowHover_xchde_2",skeletonCell:"_skeletonCell_xchde_2",footer:"_footer_xchde_2",footerLeft:"_footerLeft_xchde_2",footerLabel:"_footerLabel_xchde_2"};function Pr(t,s,n){return[...t].sort((r,a)=>{const o=r[s],l=a[s];if(typeof o=="string"&&typeof l=="string"){const i=o.toLowerCase(),u=l.toLowerCase();return n?i.localeCompare(u):u.localeCompare(i)}else{if(typeof o=="number"&&typeof l=="number")return n?o-l:l-o;if(o instanceof Date&&l instanceof Date)return n?o.getTime()-l.getTime():l.getTime()-o.getTime();{const i=String(o).toLowerCase(),u=String(l).toLowerCase();return n?i.localeCompare(u):u.localeCompare(i)}}})}function hn(t,s){return c.Children.toArray(t).find(a=>c.isValidElement(a)&&a.type===s)||null}function us({children:t}){return e.jsx(e.Fragment,{children:t})}function ds({children:t}){return e.jsx(e.Fragment,{children:t})}function fs({children:t}){return e.jsx(e.Fragment,{children:t})}function Rt({columns:t,items:s,sortOptions:n,page:r,defaultPage:a,itemsPerPage:o,defaultItemsPerPage:l,numberOfItems:i,renderPaginationInBackEnd:u=!1,hideFooter:d=!1,isHeaderFixed:f=!1,enableSelection:p=!1,enableAggregation:m=!1,loading:x=!1,noShadow:b=!1,hasHover:v=!1,onPageChange:h,onItemsPerPageChange:C,onSortBy:_,onPageItems:y,onSelectAll:T,onSelectRow:q,renderAggregation:P,renderSelect:N,renderActions:k,renderChilds:H,renderEmptyState:F,renderFooter:z,renderItemsPerPage:B,renderShowingPage:E,children:A,className:V}){const[ee,J]=pe({value:r,defaultValue:a??1,onChange:h}),[W,te]=pe({value:o,defaultValue:l??10,onChange:C}),[ie,j]=c.useState(n?.by||null),[U,I]=c.useState(()=>{const M={};return t.forEach(G=>{M[G.value]=G.value===n?.by?!!n?.desc:!1}),M}),[O,le]=c.useState(new Set),[Ce,ne]=c.useState(!1),de=ee??1,ue=W??10,we=ie?Pr(s,ie,U[ie]??!1):s,ce=u?i??0:we?.length??0,Y=Math.ceil(ce/ue),R=u?we:we.slice((de-1)*ue,de*ue),ae=de===1?1:(de-1)*ue+1,S=(de-1)*ue+R.length;let D=t.length;p&&D++,m&&D++;const Z=hn(A,us),ve=hn(A,ds),Ne=hn(A,fs),_e=!!k||!!Z;_e&&D++;const Q=[5,10,20,50,100],ge=M=>{if(!M.sortable)return;const G=M.value,oe=ie===G?!U[G]:!1;j(G),I($e=>({...$e,[G]:oe})),_?.(G,oe)},je=(M,G)=>{le(oe=>{const $e=new Set(oe),$=$e.has(M);return $?$e.delete(M):$e.add(M),q?.(G,!$),$e})},w=M=>{const G=!!M;ne(G),le(G?new Set(R.map((oe,$e)=>$e)):new Set),s?.forEach(oe=>{oe.selected=G}),T?.(G)},X=M=>{J(M),y?.(M,ue)},L=M=>{te(M||10),J(1),y?.(1,M)};return e.jsxs("div",{className:g(ye.table,V),children:[e.jsx("div",{className:g(ye.tableContent,b&&ye.noShadow,f&&ye.headerFixed),children:e.jsxs("table",{className:ye.tableStyle,children:[x?e.jsx("thead",{children:e.jsx("tr",{children:Array.from({length:D||3}).map((M,G)=>e.jsx("th",{className:ye.skeletonCell,children:e.jsx(vt,{})},G))})}):e.jsx("thead",{children:e.jsxs("tr",{children:[m&&e.jsx("th",{className:g(ye.firstTh,ye.pointerNone),style:{width:"2%"}}),p&&e.jsx("th",{className:g(!m&&ye.firstTh,ye.hoverBg),style:{width:"2%"},children:e.jsx(dt,{value:Ce,onChange:w})}),t.map((M,G)=>e.jsx("th",{style:{width:M.width??"fit-content"},className:g(ye.sortable,G===0&&!p&&!m&&ye.firstTh,!t[G+1]&&!_e&&ye.lastTh,!M.sortable&&ye.pointerNone),onClick:()=>ge(M),children:e.jsxs("div",{className:ye.thContent,style:{justifyContent:M.align??"flex-start"},children:[e.jsx("p",{className:ye.thLabel,children:M.label}),M.sortable&&e.jsx("span",{className:g(ye.sortIcon,U[M.value]&&ye.sortIconRotated,M.value===ie&&ye.sortIconActive),children:e.jsx(re,{name:"arrow_upward"})})]})},M.value)),_e&&e.jsx("th",{style:{flex:1},className:g(ye.pointerNone,ye.bgWhite)})]})}),x||!R.length?e.jsx("tbody",{children:x?Array.from({length:10}).map((M,G)=>e.jsxs("tr",{children:[Array.from({length:D||3}).map((oe,$e)=>e.jsx("td",{className:ye.skeletonCell,children:e.jsx(vt,{})},$e)),_e&&e.jsx("td",{className:ye.skeletonCell,children:e.jsx(vt,{})})]},`skeleton-${G}`)):e.jsx("tr",{children:e.jsx("td",{colSpan:D,children:F?.()||Ne||null})})}):e.jsx("tbody",{children:R.map((M,G)=>e.jsxs(c.Fragment,{children:[e.jsxs("tr",{className:g(ye.row,v&&ye.rowHover),children:[m&&e.jsx("td",{className:ye.cell,children:P?.(M,G)}),p&&e.jsx("td",{className:ye.cell,children:N?N(M,G):e.jsx(dt,{value:O.has(G),onChange:()=>je(G,M)})}),t.map(oe=>e.jsx("td",{className:ye.cell,style:{textAlign:oe.align==="center"?"center":oe.align==="flex-end"?"right":"left"},children:oe.render?oe.render(M[oe.value],M,G):M[oe.value]},oe.value)),k&&e.jsx("td",{className:ye.cell,children:k(M,G)}),!k&&Z&&e.jsx("td",{className:ye.cell,children:Z})]}),M.expanded&&H&&H(M,G)]},G))}),(z||ve)&&e.jsx("tfoot",{children:z?.()||ve})]})}),!d&&e.jsxs("footer",{className:ye.footer,children:[e.jsxs("div",{className:ye.footerLeft,children:[e.jsx("p",{className:ye.footerLabel,children:B?.()||"Items per page"}),e.jsx(un,{value:ue,options:Q,onChange:M=>L(M)})]}),e.jsx(Qn,{value:de,onChange:X,length:Y}),e.jsx("div",{children:e.jsx("p",{className:ye.footerLabel,children:E?E(ae,S,ce):`Showing ${ae}-${S} of ${ce}`})})]})]})}Rt.Actions=us,Rt.Footer=ds,Rt.EmptyState=fs;const ot={tagInput:"_tagInput_10sgc_2",labelRow:"_labelRow_10sgc_2",container:"_container_10sgc_2",focused:"_focused_10sgc_2",error:"_error_10sgc_2",shake:"_shake_10sgc_2",disabled:"_disabled_10sgc_2",textarea:"_textarea_10sgc_2",errorMessage:"_errorMessage_10sgc_2"},pn={DUPLICATE:"Duplicated values are not allowed",INVALID_INPUT:"Please provide a valid input",MAX_VALUES:"Max number of values reached"};function ms({children:t}){return e.jsx(e.Fragment,{children:t})}function hs({children:t}){return e.jsx(e.Fragment,{children:t})}function ps({children:t}){return e.jsx(e.Fragment,{children:t})}function Wt({value:t,defaultValue:s,onChange:n,labelValue:r,errorMessage:a,infoMessage:o,disabled:l=!1,required:i=!1,allowDuplicate:u=!1,max:d,isError:f=!1,placeholder:p="",mask:m,icon:x,appendIcon:b=!1,tooltipMinWidth:v,children:h,className:C}){const[_,y]=pe({value:t,defaultValue:s??[],onChange:n}),[T,q]=c.useState(""),[P,N]=c.useState(!1),[k,H]=c.useState(""),[F,z]=c.useState(!1),B=c.useRef(null),E=c.useRef(void 0);c.useEffect(()=>()=>clearTimeout(E.current),[]);function A(I){N(!0),H(I),clearTimeout(E.current),E.current=setTimeout(()=>{N(!1),H("")},2e3)}function V(I){const O=I.trim();if(kn(O))return;if(m&&Qt(O,m)!==O){A(pn.INVALID_INPUT);return}const le=_??[];if(!u&&le.includes(O)){A(pn.DUPLICATE);return}if(d!==void 0&&le.length>=d){A(pn.MAX_VALUES);return}y([...le,O]),q("")}function ee(I){T===""&&y((_??[]).filter((O,le)=>le!==I))}function J(I){I.key==="Enter"&&!I.shiftKey?(I.preventDefault(),V(T)):I.key==="Tab"?(I.preventDefault(),T&&V(T)):I.key==="Backspace"&&T===""&&ee((_??[]).length-1)}function W(I){I.preventDefault();const le=I.clipboardData.getData("text").split(/[,\n]/).map(de=>de.trim()).filter(Boolean);if(le.length===0)return;const Ce=_??[],ne=[];for(const de of le){if(kn(de)||m&&Qt(de,m)!==de)continue;const ue=[...Ce,...ne];if(!(!u&&ue.includes(de))){if(d!==void 0&&ue.length>=d)break;ne.push(de)}}ne.length>0&&(y([...Ce,...ne]),q(""))}let te=null,ie=null,j=null;c.Children.forEach(h,I=>{if(c.isValidElement(I)){const O=I.props;I.type===ms?te=O.children:I.type===hs?ie=O.children:I.type===ps&&(j=O.children)}});const U=_??[];return e.jsxs("div",{className:g(ot.tagInput,C),children:[r&&e.jsxs("div",{className:ot.labelRow,children:[e.jsx(gt,{labelValue:r,infoMessage:o,tooltipMinWidth:v,required:i}),d!==void 0&&d>0&&e.jsxs("span",{className:"text-neutral-foreground-low font-bold text-xs",children:[U.length," / ",d]})]}),e.jsxs("div",{className:g(ot.container,F&&!l&&ot.focused,(f||P)&&ot.error,l&&ot.disabled,P&&ot.shake),onClick:()=>B.current?.focus(),children:[te||x&&!b&&e.jsx("span",{className:"material-symbols-rounded text-neutral-interaction-default",children:x}),U.map((I,O)=>e.jsxs(Ye,{className:"max-w-full",children:[e.jsx(Ye.Label,{children:e.jsx("div",{className:"max-w-[100%]",children:e.jsx("span",{className:"whitespace-normal break-all",children:String(I)})})}),e.jsx(mn,{labelValue:String(I),color:"neutral",closeable:!0,onClose:()=>ee(O),className:"py-xxs"})]},O)),e.jsx("textarea",{ref:B,className:ot.textarea,rows:1,value:T,onChange:I=>q(I.target.value),onKeyDown:J,onPaste:W,onFocus:()=>z(!0),onBlur:()=>z(!1),placeholder:U.length===0?p:"",disabled:l}),ie||b&&x&&e.jsx("span",{className:"material-symbols-rounded text-neutral-interaction-default",children:x})]}),j&&e.jsx("label",{className:"text-neutral-foreground-low text-sm",children:j}),(f||P)&&e.jsx("p",{className:ot.errorMessage,children:k||a})]})}Wt.PrependIcon=ms,Wt.AppendIcon=hs,Wt.Hint=ps;const Ut={tagContainer:"_tagContainer_1fr0s_2",optionContainer:"_optionContainer_1fr0s_2",containerText:"_containerText_1fr0s_2"};function Dr({value:t,defaultValue:s,onChange:n,options:r=[],labelKey:a="label",valueKey:o="value",getObject:l=!1,disabled:i=!1,labelValue:u="",searchable:d=!1,creatable:f=!1,isError:p=!1,errorMessage:m="",infoMessage:x="",required:b=!1,placeholder:v,icon:h,expanded:C,onExpandedChange:_,absolute:y=!0,buttonLabel:T,className:q}){const[P,N]=pe({value:t,defaultValue:s??[],onChange:n}),[k,H]=c.useState(""),[F,z]=c.useState([]),[B,E]=pe({value:C,defaultValue:!1,onChange:_}),A=B??!1,V=c.useRef(null),ee=Array.isArray(P)?P:[];c.useEffect(()=>{B?V.current?.focus():V.current?.blur()},[B]);function J(R){return Se(R)?R[a]:String(R??"")}function W(R){return Se(R)?R[o]:R}function te(R,ae){const S=Se(ae)?ae[o]:ae;return R.some(D=>(Se(D)?D[o]:D)===S)}function ie(R){if(i)return;const ae=l?R:W(R),S=[...ee],D=S.findIndex(Z=>Se(R)?J(Z)===J(R):W(Z)===W(R));D!==-1?S.splice(D,1):S.push(ae),N(S)}function j(R){const ae=[...ee];ae.splice(R,1),N(ae)}function U(){if(!f||!k||p)return;const ae=[...r,...F].find(ve=>J(ve).toLowerCase()===k.toLowerCase());if(ae){te(ee,ae)||ie(ae),H("");return}if(te(ee,k)){H("");return}const S={[a]:k,[o]:k};z(ve=>[...ve,S]);const D=l?S:k,Z=[...ee,D];N(Z),H("")}const I=[...r,...F],O=k?I.filter(R=>J(R).toLowerCase().includes(k.toLowerCase())):I,le=f&&k&&!O.some(R=>J(R).toLowerCase()===k.toLowerCase()),Ce=ee.length>0?e.jsx("div",{className:g(Ut.tagContainer),onClick:()=>setTimeout(()=>E(!1)),children:ee.map((R,ae)=>e.jsx(mn,{color:"neutral",className:"py-none max-w-full",closeable:!0,onClose:()=>j(ae),children:Se(R)?R[a]:R},ae))}):void 0,ne=e.jsx("div",{className:"flex items-center gap-xs w-full",children:(d||f)&&e.jsx("input",{ref:V,type:"text",value:k,onChange:R=>H(R.target.value),onKeyDown:R=>{R.key==="Enter"&&f&&U()},placeholder:v??"Search",disabled:i,className:g("text-neutral-interaction-default h-full w-full p-none m-none border-none shadow-none outline-none text-sm",{"text-danger-foreground-low":p,"bg-neutral-surface-disabled text-neutral-foreground-low":i}),style:{boxShadow:"none"},onClick:()=>setTimeout(()=>E(!0))})}),de=!A&&ee.length>0?Ce:d||f?ne:void 0;function ue(R){const ae=Array.from(R.currentTarget.querySelectorAll('[role="option"],[data-option]'));if(ae.length===0)return;const S=document.activeElement,D=ae.indexOf(S);R.key==="ArrowDown"?(R.preventDefault(),(D<ae.length-1?ae[D+1]:ae[0])?.focus()):R.key==="ArrowUp"?(R.preventDefault(),(D>0?ae[D-1]:ae[ae.length-1])?.focus()):R.key==="Home"?(R.preventDefault(),ae[0]?.focus()):R.key==="End"?(R.preventDefault(),ae[ae.length-1]?.focus()):R.key==="Tab"&&f&&k&&(R.preventDefault(),U())}const we=e.jsx("div",{className:Ut.optionContainer,onKeyDown:ue,children:O.length===0&&k?e.jsx("div",{className:Ut.containerText,children:"No result found"}):I.length===0?e.jsx("div",{className:Ut.containerText,children:"No tags created yet"}):O.map((R,ae)=>e.jsx(Jt,{selected:te(ee,R),onClick:()=>ie(R),className:g({"font-bold":te(ee,R)},"p-xs"),children:J(R)},ae))}),ce=le?e.jsx("div",{className:"flex justify-center w-full",children:e.jsxs("button",{type:"button",className:"text-xs text-primary-interaction-default hover:underline px-xs py-xxs",onClick:U,children:['Add "',k,'"']})}):void 0,Y=h?e.jsx(re,{name:h,className:"text-neutral-interaction-default"}):void 0;return e.jsx(Ot,{value:A,onChange:R=>E(R),labelValue:T??u,disabled:i,isError:p,errorMessage:m,infoMessage:x,required:b,absolute:y,maxHeight:"none",minWidth:"12em",leadingComplement:Y,options:we,actions:ce,className:g("tag-select",q),children:de})}const at={textarea:"_textarea_187gm_2",labelRow:"_labelRow_187gm_2",counter:"_counter_187gm_2",textareaContainer:"_textareaContainer_187gm_2",focused:"_focused_187gm_2",error:"_error_187gm_2",disabled:"_disabled_187gm_2",textareaContent:"_textareaContent_187gm_2",errorMessage:"_errorMessage_187gm_2"},Br=c.forwardRef(function({value:s,onChange:n,labelValue:r,max:a,errorMessage:o,infoMessage:l,disabled:i=!1,isError:u=!1,required:d=!1,placeholder:f,textAlign:p,tooltipMinWidth:m,onFocus:x,onBlur:b,className:v},h){const[C,_]=pe({value:s,defaultValue:"",onChange:n}),[y,T]=c.useState(!1);function q(){T(!0),x?.()}function P(){T(!1),b?.()}function N(F){const z=a?F.target.value.slice(0,a):F.target.value;_(z)}const k=C?.length??0,H=r||a!==void 0;return e.jsxs("div",{className:g(at.textarea,v),children:[H&&e.jsxs("div",{className:at.labelRow,children:[e.jsx(gt,{labelValue:r,infoMessage:l,tooltipMinWidth:m,required:d}),a!==void 0&&e.jsxs("span",{className:at.counter,children:[k,"/",a]})]}),e.jsx("div",{className:g(at.textareaContainer,y&&at.focused,u&&at.error,i&&at.disabled),children:e.jsx("textarea",{ref:h,className:at.textareaContent,value:C??"",onChange:N,onFocus:q,onBlur:P,placeholder:f,disabled:i,style:p?{textAlign:p}:void 0})}),(u||o)&&o&&e.jsx("small",{className:at.errorMessage,children:o})]})});function Vr(t,s){switch(s.type){case"ADD":return[...t,s.toast];case"HIDE":return t.map(n=>n.id===s.id?{...n,visible:!1}:n);case"REMOVE":return t.filter(n=>n.id!==s.id)}}const _s=c.createContext(null);function Fr({toast:t,onClose:s}){const{isMounted:n,isActive:r}=Je(t.visible,{duration:600}),a=t.right?"slide-right":"slide-left";return n?e.jsx("div",{className:g("toast-wrapper",a,r&&"active"),children:e.jsx(Xt,{title:t.title,message:t.message,type:t.type,iconPosition:"center",closable:!0,onClose:()=>s(t.id),actions:t.buttonLabel?e.jsx(Be,{size:"small",variant:"secondary",color:t.type,className:"whitespace-nowrap",onClick:t.action,children:t.buttonLabel}):void 0,className:"toast"})}):null}const qr=[{vertical:"top",horizontal:"left"},{vertical:"top",horizontal:"right"},{vertical:"bottom",horizontal:"left"},{vertical:"bottom",horizontal:"right"}];function Hr({toasts:t,onClose:s}){return e.jsx(e.Fragment,{children:qr.map(n=>e.jsx("div",{className:g("toast-container",n.vertical,n.horizontal),children:t.filter(r=>r[n.vertical]&&r[n.horizontal]).map(r=>e.jsx(Fr,{toast:r,onClose:s},r.id))},`${n.vertical}-${n.horizontal}`))})}function gs({children:t}){const[s,n]=c.useReducer(Vr,[]),r=c.useRef(new Map);c.useEffect(()=>()=>{r.current.forEach(l=>clearTimeout(l))},[]);function a(l){const i=r.current.get(l);i!==void 0&&(clearTimeout(i),r.current.delete(l)),n({type:"HIDE",id:l}),setTimeout(()=>n({type:"REMOVE",id:l}),600)}function o(l){const i=l.id??crypto.randomUUID(),u={id:i,title:"",message:"",type:"danger",top:!1,bottom:!1,right:!1,left:!1,buttonLabel:"",action:void 0,...l,visible:!0,timeout:l.timeout};n({type:"ADD",toast:u});const d=l.timeout;if(d){const f=setTimeout(()=>a(i),d);r.current.set(i,f)}return{id:i,close:()=>a(i)}}return e.jsxs(_s.Provider,{value:{toast:o},children:[t,typeof document<"u"&&jt.createPortal(e.jsx(Hr,{toasts:s,onClose:a}),document.body)]})}function zr(){const t=c.useContext(_s);if(!t)throw new Error("useToast must be used inside ToastProvider");return t}const Et={toggleGroup:"_toggleGroup_1jngx_2",vertical:"_vertical_1jngx_2",default:"_default_1jngx_2",secondary:"_secondary_1jngx_2",secondaryVertical:"_secondaryVertical_1jngx_2"},xs=c.createContext(null);function Rr({value:t,defaultValue:s,onChange:n,vertical:r=!1,disabled:a=!1,type:o="default",options:l,labelKey:i="label",valueKey:u="value",getObject:d=!1,children:f,className:p}){const[m,x]=pe({value:t,defaultValue:s,onChange:n});function b(y){return Se(y)?y[i]:y}function v(y){return Se(y)?y[u]:y}function h(y){return Se(y)?y.disabled:!1}function C(y){let T=y;if(d&&l){const q=l.find(P=>v(P)===y);q!==void 0&&(T=q)}x(T)}const _={selected:m,disabled:a,type:o,select:C};return e.jsx(xs.Provider,{value:_,children:e.jsx("div",{className:g(Et.toggleGroup,r&&Et.vertical,o==="default"&&Et.default,o==="secondary"&&!r&&Et.secondary,o==="secondary"&&r&&Et.secondaryVertical,p),children:l?l.map(y=>e.jsx(bs,{groupValue:v(y),disabled:h(y),children:b(y)},v(y))):f})})}const Lt={toggle:"_toggle_1mzau_2",default:"_default_1mzau_2",secondary:"_secondary_1mzau_2",active:"_active_1mzau_2",disabled:"_disabled_1mzau_2"};function bs({value:t,defaultValue:s,onChange:n,id:r,name:a,groupValue:o,disabled:l,type:i,children:u,className:d}){const f=c.useContext(xs),[p,m]=pe({value:f&&o!==void 0?void 0:t,defaultValue:f&&o!==void 0?void 0:s??!1,onChange:n}),x=f&&o!==void 0?f.selected===o:p??!1,b=f?.type??i??"default",v=!!(f?.disabled||l);function h(){v||(f&&o!==void 0?f.select(o):m(!0))}return e.jsx("button",{id:r,name:a||r,type:"button",role:"button","aria-pressed":x,"aria-disabled":v,disabled:v,tabIndex:0,className:g(Lt.toggle,b==="secondary"?Lt.secondary:Lt.default,x&&Lt.active,v&&Lt.disabled,d),onClick:h,children:u})}const Xe={tree:"_tree_1wlbq_2",treeOption:"_treeOption_1wlbq_2",nodeRow:"_nodeRow_1wlbq_2",multiple:"_multiple_1wlbq_2",nodeIcon:"_nodeIcon_1wlbq_2",selected:"_selected_1wlbq_2",disabled:"_disabled_1wlbq_2",expandIcon:"_expandIcon_1wlbq_2",expandIconOpen:"_expandIconOpen_1wlbq_2",nodeLabel:"_nodeLabel_1wlbq_2"},vs=c.createContext(null);function Re(t,s){return typeof t=="object"&&t!==null?t[s]:t}function Cs(t,s,n){return s?.find(r=>{if(!r.options||!r.options.length)return!1;const a=r.options.find(o=>Re(o,n)===Re(t,n));return a||Cs(t,r.options,n)})}function ys(t,s,n,r){const a=s.findIndex(o=>Re(o,r)===Re(t,r));a!==-1&&s.splice(a,1),n&&s.push(JSON.parse(JSON.stringify(t)))}function js(t,s,n,r,a){if(!s.options)return;const o=s.options.findIndex(i=>Re(i,a)===Re(t,a));let l=n.findIndex(i=>Re(i,a)===Re(s,a));if((!n.length||l===-1)&&r&&(l=n.length,n.push({...s,options:[]})),o===-1){const i=Cs(t,s.options,a);n[l]?.options&&i&&js(t,i,n[l].options,r,a);return}ys(t,n[l].options,r,a),l!==-1&&n[l]?.options&&!n[l]?.options?.length&&!r&&n.splice(l,1)}function ws(t,s,n,r,a){const o=[...n];if(a){const l=(()=>{for(const i of o)if(i.options&&i.options.find(d=>Re(d,r)===Re(t,r)))return i})();return l?js(t,l,o,s,r):ys(t,o,s,r),o.filter(i=>i.options?.length)}else{const l=Re(t,r),i=o.findIndex(u=>Re(u,r)===l);return i!==-1?o.splice(i,1):t.options?.length||o.push(l),t.options?.length&&t.options.forEach(u=>{const d=ws(u,s,o,r,a);o.length=0,d.forEach(f=>o.push(f))}),o}}function Ns(t,s){const n=[];for(const r of t)r.options?.length?n.push(...Ns(r.options,s)):n.push(r[s]);return n}function Wr(t,s,n,r){if(n.multiple){if(!Array.isArray(t))return!1;const a=l=>n.getObject&&typeof l=="object"&&l!==null?l[n.valueKey]===s:(typeof l=="object"&&l!==null?l[n.valueKey]:l)===s;if(t.some(a))return!0;if(r?.options?.length){const l=Ns(r.options,n.valueKey),i=f=>t.some(p=>n.getObject&&typeof p=="object"&&p!==null?p[n.valueKey]===f:(typeof p=="object"&&p!==null?p[n.valueKey]:p)===f),u=l.some(i);if(l.length>0&&l.every(i))return!0;if(u)return null}return!1}else return n.getObject&&typeof t=="object"&&t!==null?t[n.valueKey]===s:t===s}function ks({option:t,depth:s=0}){const n=c.useContext(vs),r=t[n.valueKey],a=t[n.labelKey],o=n.expandedNodes.has(r),l=!!(t.options&&t.options.length>0),i=Wr(n.selectedValue,r,n,t);return e.jsxs("div",{className:Xe.treeOption,style:{paddingLeft:s*16},children:[e.jsxs("div",{className:g(Xe.nodeRow,i===!0&&Xe.selected,n.multiple&&Xe.multiple,(n.disabled||t.disabled)&&Xe.disabled),onClick:()=>{!n.disabled&&!t.disabled&&n.onSelect(t,!i)},children:[l&&e.jsx(re,{name:"keyboard_arrow_right",className:g(Xe.expandIcon,o&&Xe.expandIconOpen),onClick:u=>{u.stopPropagation(),n.onToggleExpand(r)}}),n.multiple&&e.jsx(dt,{value:i,onChange:()=>{},disabled:n.disabled||t.disabled,allowIndeterminate:!0}),t.icon&&e.jsx(re,{name:t.icon,className:Xe.nodeIcon}),e.jsx("span",{className:g(Xe.nodeLabel),children:a})]}),o&&l&&t.options.map(u=>e.jsx(ks,{option:u,depth:s+1},u[n.valueKey]))]})}function Ur({value:t,defaultValue:s,onChange:n,options:r,labelKey:a="label",valueKey:o="value",getObject:l=!1,multiple:i=!1,disabled:u=!1,className:d}){const[f,p]=pe({value:t,defaultValue:s??(i?[]:void 0),onChange:n}),[m,x]=c.useState(new Set),b=h=>{x(C=>{const _=new Set(C);return _.has(h)?_.delete(h):_.add(h),_})},v=(h,C)=>{if(i){const _=ws(h,C,f??[],o,l);p(_)}else{const _=l?h:h[o];p(_)}};return e.jsx(vs.Provider,{value:{selectedValue:f,onSelect:v,expandedNodes:m,onToggleExpand:b,labelKey:a,valueKey:o,getObject:l,multiple:i,disabled:u},children:e.jsx("div",{className:g(Xe.tree,d),children:r.map(h=>e.jsx(ks,{option:h},h[o]))})})}function Gr({children:t}){return e.jsx(Hn,{children:e.jsx(gs,{children:t})})}se.Accordion=As,se.ActionCard=Cn,se.Alert=Xt,se.AutoComplete=Gs,se.Avatar=Bt,se.Badge=On,se.Breadcrumb=Xs,se.Button=Be,se.Calendar=Ft,se.Card=pt,se.Carousel=Qs,se.Checkbox=dt,se.ColorPicker=en,se.ConfirmProvider=Hn,se.Connector=nr,se.Crop=sr,se.DatePicker=ar,se.DesignSystemProvider=Gr,se.Dialog=sn,se.Drawer=lr,se.Dropdown=Ht,se.FileUpload=Xn,se.Filter=fr,se.FloatCard=xt,se.History=mr,se.Icon=re,se.IconCard=Jn,se.Image=hr,se.Input=Dt,se.MetricCard=zt,se.Navbar=gr,se.PINInput=br,se.Pagination=Qn,se.Profile=vr,se.ProgressBar=Cr,se.Radio=ns,se.RadioGroup=yr,se.RichTextEditor=Ir,se.RoundMenu=Tr,se.Select=un,se.Separator=Rn,se.Sidebar=Er,se.Skeleton=vt,se.Slider=on,se.Spinner=tn,se.StatusBadge=mn,se.Stepper=Lr,se.Switch=Mr,se.Tab=Or,se.Table=Rt,se.TagInput=Wt,se.TagSelect=Dr,se.Textarea=Br,se.ToastProvider=gs,se.Toggle=bs,se.ToggleGroup=Rr,se.Tooltip=Ye,se.Tree=Ur,se.useConfirm=tr,se.useControllable=pe,se.useToast=zr,se.useTransition=Je,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})}));
|
|
9
|
+
`;return new Function("start","end","day",i)(a,r,l)}function Kt(t,s){let n=[];return s==="compare"?t?Array.isArray(t)&&!Array.isArray(t[0])?n=[[...t],[]]:n=[...t]:n=[[],[]]:t?Array.isArray(t)?Array.isArray(t)&&Array.isArray(t[0])?n=[...t[0]]:n=[...t]:n=[t]:n=[],n}function $n(t){return t&&t.charAt(0).toUpperCase()+t.slice(1)}function In(t){const s=t.getFullYear(),n=t.getMonth(),o=new Date(s,n,1).getDay(),a=new Date(s,n+1,0).getDate(),r=[];let l=1;for(let i=0;i<6;i++){const c=[];for(let d=0;d<7;d++)if(i===0&&d<o||l>a)c.push("");else{const f=new Date(s,n,l);c.push(f),l++}r.push(c)}return r}function qs(t="en-US"){const s=new Date("2021-01-03T23:15:30"),n=[];for(let o=0;o<12;o++){const a=s.toLocaleDateString(t,{month:"short"});n.push({label:a,value:o}),s.setMonth(s.getMonth()+1)}return n}function Tn(t,s,n,o={left:!0},a={},r={}){const l=t.clientX-s.clientWidth/2-n.getBoundingClientRect().left,i=n.clientWidth-(s.clientWidth-(typeof a.x=="number"?a.x:2)),c=Math.min(i,Math.max(r.x||0,o.left?l:i-l)),d=t.clientY-s.clientHeight/2-n.getBoundingClientRect().top,f=n.clientHeight-(s.clientHeight-(a.y||0)),p=Math.min(f,Math.max(r.y||0,o.top?d:f-d));return{x:c,y:p}}function Qt(t,s){switch(s){case"cpf":t=t.replace(/\D/g,""),t=t.slice(0,11),t=t.replace(/(\d{3})(\d)/,"$1.$2"),t=t.replace(/(\d{3})(\d)/,"$1.$2"),t=t.replace(/(\d{3})(\d{1,2})$/,"$1-$2");break;case"cnpj":t=t.replace(/\D/g,""),t=t.slice(0,14),t=t.replace(/(\d{2})(\d)/,"$1.$2"),t=t.replace(/(\d{2})\.(\d{3})(\d)/,"$1.$2.$3"),t=t.replace(/(\d{2})\.(\d{3})\.(\d{3})(\d)/,"$1.$2.$3/$4"),t=t.replace(/(\d{2})\.(\d{3})\.(\d{3})\/(\d{4})(\d)/,"$1.$2.$3/$4-$5");break;case"cep":t=t.replace(/\D/g,""),t=t.slice(0,8),t=t.replace(/(\d{5})(\d)/,"$1-$2");break}return t}function Hs(t){return/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(t)}function zs(t){return/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/.test(t)}function An(t){return/[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/.test(t)}function lt(t,s=.3,n=[255,255,255]){const o=document.createElement("div");o.style.color=t,document.body.appendChild(o);const a=getComputedStyle(o).color;document.body.removeChild(o);const r=a.match(/\d+/g);if(!r)return"";const l=r.map(Number),i=Math.round(l[0]*s+n[0]*(1-s)),c=Math.round(l[1]*s+n[1]*(1-s)),d=Math.round(l[2]*s+n[2]*(1-s));return`rgb(${i}, ${c}, ${d})`}function Rs(t){const s=window.location.pathname.replace(/\/$/,"").split("/"),n=t.replace(/\/+$/,"").split("/");for(let o=0;o<n.length;o++)if(s[o]!==n[o])return!1;return s.length===n.length}const Pe={colorPicker:"_colorPicker_1sqmq_2",disabled:"_disabled_1sqmq_2",noShadow:"_noShadow_1sqmq_2",colorAreaWrapper:"_colorAreaWrapper_1sqmq_2",colorArea:"_colorArea_1sqmq_2",colorAreaCursor:"_colorAreaCursor_1sqmq_2",sliderTrack:"_sliderTrack_1sqmq_2",sliderCursor:"_sliderCursor_1sqmq_2",hueTrack:"_hueTrack_1sqmq_2",opacityTrack:"_opacityTrack_1sqmq_2",colorCircle:"_colorCircle_1sqmq_2",colorInput:"_colorInput_1sqmq_2",typeToggles:"_typeToggles_1sqmq_2",typeToggle:"_typeToggle_1sqmq_2",active:"_active_1sqmq_2"},Ke=["hexa","rgba","hsla","hsva","hwb"];function Pt(t,s="rgba",n=","){if(!t)return{};const o={},a=Array.from(s),r=t.split(n);return a.forEach((l,i)=>{o[l]=typeof r[i]=="string"?Number(r[i].replace("%","")):r[i]??1}),o}function Ws(t,s=","){if(!t)return null;const n={},o=t.split("(");if(o.length<2)return null;const a=Array.from(o[0]);o[1]=o[1].replace(")","");const r=o[1].split(s);return a.forEach((l,i)=>{n[l]=typeof r[i]=="string"?Number(r[i].replace("%","")):r[i]??1}),n}function Us(t){let s="",n="";const o=Object.keys(t);return o.forEach((a,r)=>{n+=a,s+=o.length-1===r?t[a]:`${t[a]}, `}),`${n}(${s})`}function en(t){const{value:s,onChange:n,showAlpha:o=!0,disabled:a=!1,noShadow:r=!1,className:l}=t,[i,c]=xe({value:s,defaultValue:"#ffffff",onChange:n}),[d,f]=u.useState(0),[p,m]=u.useState(()=>i||"#ffffff"),[b,v]=u.useState("hsl(0, 100%, 50%)"),[x,h]=u.useState(1),[y,_]=u.useState(i||""),[C,$]=u.useState(!1),[B,R]=u.useState(!1),[k,w]=u.useState("linear-gradient(to right, #ffffff 0%, hsl(0, 100%, 50%))"),D=u.useRef(!1),V=u.useRef(!1),H=u.useRef(!1),L=u.useRef(null),E=u.useRef(null),T=u.useRef(null),P=u.useRef(null),K=u.useRef(null),Z=u.useRef(null),W=u.useRef(b),ue=u.useRef(x),ie=u.useRef(d);W.current=b,ue.current=x,ie.current=d;function j(N){const G=ie.current;if(G===0)return Bs(N.r,N.g,N.b,N.a);if(G===1){const M=Vs(N.r,N.g,N.b,N.a);return`${M.h.toFixed(0)}, ${M.s}, ${M.l}, ${M.a<1?M.a.toFixed(2):M.a}`}else if(G===2){const M=Fs(N.r,N.g,N.b,N.a);return`${M.h} ${M.w} ${M.b} / ${M.a<1?M.a.toFixed(2):M.a}`}else if(G===3){const M=kt(N.r,N.g,N.b,N.a);return`${M.h}, ${M.s}, ${M.v}, ${M.a<1?M.a.toFixed(2):M.a}`}return`${N.r}, ${N.g}, ${N.b}, ${N.a<1?N.a.toFixed(2):N.a}`}function U(N,G){if(G===0){const A=Ps(N);return kt(A.r,A.g,A.b,isNaN(A.a)?1:A.a)}else if(G===1){const A=Pt(N,"hlsa"),q=wn(A.h,A.s,A.l,A.a);return kt(q.r,q.g,q.b,isNaN(q.a)?1:q.a)}else if(G===2){const A=Pt(N,"hwb"," "),q=N.split("/"),ne=Ds(A.h,A.w,A.b,Number(q[1]?.replace(")","")));return kt(ne.r,ne.g,ne.b,isNaN(ne.a)?1:ne.a)}else if(G===3)return Pt(N,"hsva");const M=Pt(N);return kt(M.r,M.g,M.b,isNaN(M.a)?1:M.a)}function I(N,G){const M=document.createElement("canvas");M.width=N.clientWidth,M.height=N.clientHeight;const A=M.getContext("2d");if(!A)return"hsl(0, 100%, 50%)";const q=A.createLinearGradient(0,0,M.width,0);q.addColorStop(0,"hsl(0, 100%, 50%)"),q.addColorStop(1/6,"hsl(60, 100%, 50%)"),q.addColorStop(2/6,"hsl(120, 100%, 50%)"),q.addColorStop(3/6,"hsl(180, 100%, 50%)"),q.addColorStop(4/6,"hsl(240, 100%, 50%)"),q.addColorStop(5/6,"hsl(300, 100%, 50%)"),q.addColorStop(1,"hsl(360, 100%, 50%)"),A.fillStyle=q,A.fillRect(0,0,M.width,M.height);const ne=A.getImageData(G,0,1,1).data;return`rgba(${ne[0]}, ${ne[1]}, ${ne[2]}, ${ne[3]/255})`}function O(N="hsl(0, 100%, 50%)",G=1){const M=P.current,A=M?.getContext("2d");if(!A||!M)return;M.width=M.clientWidth,M.height=M.clientHeight,A.clearRect(0,0,M.width,M.height),A.globalAlpha=G;const q=A.createLinearGradient(0,0,M.width,0);q.addColorStop(0,"#ffffff"),q.addColorStop(1,N);const ne=A.createLinearGradient(0,0,0,M.height);ne.addColorStop(0,"rgba(0, 0, 0, 0)"),ne.addColorStop(1,"#000000"),A.fillStyle=q,A.fillRect(0,0,M.width,M.height),A.fillStyle=ne,A.fillRect(0,0,M.width,M.height)}function re(N,G){const M=P.current;if(!M)return[0,0,0,255];const A=M.clientWidth,q=M.clientHeight,ne=Math.max(0,Math.min(1,N/A)),we=Math.max(0,Math.min(1,G/q)),S=Math.round(Number(W.current.split(",")[0]?.replace("rgba(","").trim())/M.clientWidth*360),J=ne*100,he=(1-we)*100,ge=Nn(S||0,J,he,ue.current);return[Math.round(ge.r),Math.round(ge.g),Math.round(ge.b),Math.round(ge.a*255)]}function be(N,G,M,A=!1){const q=Tn(N,G,M,{top:!0,left:!0},{x:A?5:1,y:G.clientHeight},{x:A?-5:0});return{left:q.x,top:q.y}}function ee(N,G){let M=N[3]/255;M>=.98&&(M=1),M<=.02&&(M=0);const A=`rgba(${N[0]}, ${N[1]}, ${N[2]}, ${M})`,q=j({r:N[0],g:N[1],b:N[2],a:M});_(A),m(q),c(q)}function me(){const N=T.current,G=P.current;if(!N||!G)return;const M=Number(N.style.left.replace("px",""))+5,A=Number(N.style.top.replace("px","")),q=re(M,A);ee(q)}const _e=u.useRef(()=>{}),Se=u.useRef(()=>{}),se=u.useRef(()=>{}),Y=u.useRef(()=>{});u.useEffect(()=>{_e.current=N=>{z(N),le(N),ce(N)},Se.current=()=>{D.current=!1,V.current=!1,H.current=!1},se.current=N=>{N.touches[0]&&(z(N.touches[0]),le(N.touches[0]),ce(N.touches[0]))},Y.current=()=>{D.current=!1,V.current=!1,H.current=!1}}),u.useEffect(()=>{const N=q=>_e.current(q),G=()=>Se.current(),M=q=>se.current(q),A=()=>Y.current();return window.addEventListener("mousemove",N),window.addEventListener("mouseup",G),window.addEventListener("touchmove",M),window.addEventListener("touchend",A),()=>{window.removeEventListener("mousemove",N),window.removeEventListener("mouseup",G),window.removeEventListener("touchmove",M),window.removeEventListener("touchend",A)}},[]),u.useEffect(()=>{O();const N=setTimeout(()=>{F()},100);return()=>clearTimeout(N)},[]);function z(N){if(!V.current)return;const G=E.current,M=Z.current;if(!G||!M)return;const A=be(N,G,M);G.style.left=A.left+"px";const q=M.clientWidth-10;let ne=A.left/q;ne>=.98&&(ne=1),ne<=.02&&(ne=0),h(ne),ue.current=ne,O(W.current,ne),me()}function le(N){if(!D.current)return;const G=L.current,M=K.current,A=Z.current;if(!G||!M||!A)return;const q=be(N,G,M);G.style.left=q.left+"px";const ne=I(M,q.left);v(ne),W.current=ne;const we=`linear-gradient(to right, #ffffff 0%, ${ne})`;w(we),O(ne,ue.current),me()}function ce(N){if(!H.current)return;const G=T.current,M=P.current;if(!G||!M)return;const A=be(N,G,M,!0);G.style.left=A.left+"px",G.style.top=A.top+"px";const q=re(A.left+5,A.top);ee(q)}function fe(N){const G=P.current;if(!G)return{x:0,y:0};const M=typeof N.s=="string"?Number(N.s.replace("%","")):N.s??0,A=typeof N.v=="string"?Number(N.v.replace("%","")):N.v??0,q=Math.max(-5,Math.min(M/100*(G.clientWidth-5),G.clientWidth-5)),ne=Math.max(0,Math.min((1-A/100)*G.clientHeight,G.clientHeight));return{x:q,y:ne}}const F=u.useCallback(()=>{const N=L.current,G=E.current,M=T.current,A=K.current,q=Z.current;if(!N||!G||!M||!A||!q)return;const we=U(p,ie.current),S=Math.min(1,(we.h??0)/360),J=Math.min(A.clientWidth-10,Math.max(0,(A.clientWidth-10)*S)),he=q.clientWidth-10,ge=Math.min(he,Math.max(0,he*(we.a??1))),ke=he>0?ge/he:1;h(ke),ue.current=ke,N.style.left=J+"px",G.style.left=ge+"px";const ve=I(A,J);v(ve),W.current=ve;const Ie=`linear-gradient(to right, #ffffff 0%, ${ve})`;w(Ie),O(ve,ke);const Ze=typeof we.s=="string"?Number(we.s.replace("%","")):we.s??0,We=typeof we.v=="string"?Number(we.v.replace("%","")):we.v??0,Gr=Nn(we.h??0,Ze,We,we.a??1);_(Us(Gr));const Ss=fe(we);M.style.left=Ss.x+"px",M.style.top=Ss.y+"px"},[p]);function X(){$(!0),setTimeout(()=>{$(!1),f(N=>{const G=N+1>Ke.length-1?0:N+1;return Ne(G),G})},600)}function ae(){R(!0),setTimeout(()=>{R(!1),f(N=>{const G=N-1<0?Ke.length-1:N-1;return Ne(G),G})},600)}function Ne(N){ie.current=N;const G=Ws(y);if(!G)return;const M=j(G);m(M),c(M)}const Q=Ke[d],de=Ke[d+1>Ke.length-1?0:d+1],ye=Ke[d-1<0?Ke.length-1:d-1];return e.jsxs("div",{className:g(Pe.colorPicker,r&&Pe.noShadow,a&&Pe.disabled,l),"data-component":"ColorPicker",children:[e.jsxs("div",{className:Pe.colorAreaWrapper,children:[e.jsx("span",{ref:T,className:Pe.colorAreaCursor,style:{left:"-5px",top:"0px"},onMouseDown:N=>{a||(H.current=!0,ce(N))},onTouchStart:N=>{a||(H.current=!0,ce(N.touches[0]))}}),e.jsx("canvas",{ref:P,className:Pe.colorArea,onMouseDown:N=>{a||(H.current=!0,ce(N))},onTouchStart:N=>{a||(H.current=!0,ce(N.touches[0]))}})]}),e.jsxs("div",{className:"flex items-center gap-sm",children:[e.jsx("div",{className:Pe.colorCircle,style:{background:y}}),e.jsxs("div",{className:"flex flex-col gap-xs w-full",children:[e.jsx("div",{ref:K,className:g(Pe.sliderTrack,Pe.hueTrack,"slider"),onMouseDown:N=>{a||(D.current=!0,le(N))},onTouchStart:N=>{a||(D.current=!0,le(N.touches[0]))},children:e.jsx("span",{ref:L,className:g(Pe.sliderCursor),style:{left:"0px"},onMouseDown:N=>{N.stopPropagation(),!a&&(D.current=!0)},onTouchStart:N=>{N.stopPropagation(),!a&&(D.current=!0)}})}),o&&e.jsx("div",{ref:Z,className:g(Pe.sliderTrack,Pe.opacityTrack,"slider"),style:{background:k},onMouseDown:N=>{a||(V.current=!0,z(N))},onTouchStart:N=>{a||(V.current=!0,z(N.touches[0]))},children:e.jsx("span",{ref:E,className:g(Pe.sliderCursor),style:{left:"0px"},onMouseDown:N=>{N.stopPropagation(),!a&&(V.current=!0)},onTouchStart:N=>{N.stopPropagation(),!a&&(V.current=!0)}})})]})]}),e.jsxs("div",{className:"flex items-center gap-sm",children:[e.jsx("input",{type:"text",className:g(Pe.colorInput,"flex-1"),value:p,onChange:N=>{m(N.target.value),c(N.target.value),setTimeout(()=>F(),0)},disabled:a}),e.jsxs("div",{className:"flex items-center gap-xxs",children:[e.jsxs("div",{className:"flex flex-col items-center overflow-hidden relative h-lg w-fit text-neutral-interaction-default",children:[C&&e.jsx("p",{className:"font-bold",style:{animation:"slide-down 0.6s ease"},children:de.toUpperCase()}),e.jsx("p",{className:"font-bold",style:{animation:C?"slide-down 0.6s ease":B?"slide-up 0.6s ease":void 0},children:Q.toUpperCase()}),B&&e.jsx("p",{className:"font-bold",style:{animation:"slide-up 0.6s ease"},children:ye.toUpperCase()})]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx(oe,{name:"arrow_drop_up",className:"cursor-pointer text-neutral-interaction-default text-sm leading-none",onClick:a?void 0:ae,style:{fontFamily:"Material Symbols Outlined",userSelect:"none"},"aria-label":"Previous color type"}),e.jsx(oe,{name:"arrow_drop_down",className:"cursor-pointer text-neutral-interaction-default text-sm leading-none",onClick:a?void 0:X,style:{fontFamily:"Material Symbols Outlined",userSelect:"none"},"aria-label":"Next color type"})]})]})]}),e.jsx("div",{className:Pe.typeToggles,children:Ke.map(N=>e.jsx("button",{type:"button",className:g(Pe.typeToggle,N===Q&&Pe.active),onClick:()=>{if(a)return;const G=Ke.indexOf(N);f(G),ie.current=G,Ne(G)},disabled:a,children:N.toUpperCase()},N))})]})}const De={input:"_input_1a8ld_2",inputContainer:"_inputContainer_1a8ld_2",focused:"_focused_1a8ld_2",error:"_error_1a8ld_2",disabled:"_disabled_1a8ld_2",inputContent:"_inputContent_1a8ld_2",left:"_left_1a8ld_2",center:"_center_1a8ld_2",right:"_right_1a8ld_2",labelRow:"_labelRow_1a8ld_2",counter:"_counter_1a8ld_2",errorMessage:"_errorMessage_1a8ld_2",numberArrows:"_numberArrows_1a8ld_2"};function En({children:t}){return e.jsx(e.Fragment,{children:t})}function Mn({children:t}){return e.jsx(e.Fragment,{children:t})}const Dt=u.forwardRef(function(s,n){const{value:o,defaultValue:a,onChange:r,labelValue:l,type:i="text",mask:c,max:d,min:f,step:p=1,errorMessage:m,infoMessage:b,disabled:v=!1,isError:x=!1,required:h=!1,placeholder:y="",textAlign:_,tooltipMinWidth:C,icon:$,appendIcon:B,onFocus:R,onBlur:k,children:w,className:D}=s,[V,H]=xe({value:o,defaultValue:a??"",onChange:r}),[L,E]=u.useState(!1),[T,P]=u.useState(!1),[K,Z]=u.useState(!1),[W,ue]=u.useState(""),ie=u.useRef(null),j=se=>{ie.current=se,typeof n=="function"?n(se):n&&(n.current=se)};let U=null,I=null;u.Children.forEach(w,se=>{if(!u.isValidElement(se))return;const Y=se.props;se.type===En&&(U=Y.children),se.type===Mn&&(I=Y.children)});const O=i==="password"?K?"text":"password":i==="number"||i==="search"||i==="email"||i==="url"||i==="domain"||i==="color"?"text":i;function re(se){let Y=se.target.value;if(c&&i==="text"&&(Y=Qt(Y,c)),d&&i==="text"&&(Y=Y.slice(0,d)),i==="number"){const z=Number(Y);isNaN(z)||(f!=null&&z<f?Y=String(f):d!=null&&z>d&&(Y=String(d)))}H(Y)}function be(){E(!0),R?.()}function ee(){E(!1);const se=V??"";if(i==="email")P(!Hs(se));else if(i==="domain"){const Y=!se||zs(se);P(!Y),ue(se&&!Y?"Invalid domain":"")}else if(i==="url"){const Y=!se||An(se);P(!Y),ue(se&&!Y?"Invalid URL":"")}k?.()}function me(){const Y=((isNaN(Number(V))?0:Number(V))*1e3+(p||1)*1e3)/1e3;H(String(d!=null?Math.min(Y,d):Y))}function _e(){const Y=((isNaN(Number(V))?0:Number(V))*1e3-(p||1)*1e3)/1e3;H(String(f!=null?Math.max(Y,f):Y))}const Se=x||T;if(i==="color"){const se=V??"#000000ff";return e.jsxs("div",{className:g(De.input,D),children:[(l||d!==void 0)&&e.jsx("div",{className:De.labelRow,children:e.jsx(gt,{labelValue:l,infoMessage:b,tooltipMinWidth:C,required:h})}),e.jsxs("div",{className:g(De.inputContainer,"flex items-center",v&&De.disabled),children:[e.jsx("input",{ref:j,type:"text",className:g(De.inputContent),value:se,onChange:Y=>{H(Y.target.value)},disabled:v,placeholder:"#000000ff"}),e.jsx(xt,{card:e.jsx(en,{value:se,onChange:Y=>H(Y)}),children:e.jsx("button",{type:"button",style:{width:"1.5em",height:"1.5em",background:se,border:"1px solid var(--color-neutral-default, #ccc)",borderRadius:"4px",cursor:v?"not-allowed":"pointer",flexShrink:0},disabled:v,"aria-label":"Open color picker"})})]}),(m||W)&&(Se||!!W)&&e.jsx("p",{className:De.errorMessage,children:m||W})]})}return e.jsxs("div",{className:g(De.input,D),children:[(l||d!==void 0)&&e.jsxs("div",{className:De.labelRow,children:[e.jsx(gt,{labelValue:l,infoMessage:b,tooltipMinWidth:C,required:h}),i==="text"&&d!==void 0&&e.jsxs("span",{className:De.counter,children:[(V??"").length,"/",d]})]}),e.jsxs("div",{className:"flex items-center h-fit",children:[e.jsxs("div",{className:g(De.inputContainer,"flex-1",L&&De.focused,Se&&De.error,v&&De.disabled),children:[i==="search"?e.jsx(oe,{name:"search",className:"text-neutral-foreground-low"}):$?e.jsx(oe,{name:$}):U||null,e.jsx("input",{ref:j,type:O,className:g(De.inputContent,_&&De[_]),value:V??"",onChange:re,onFocus:be,onBlur:ee,placeholder:y,disabled:v,spellCheck:!1}),i==="password"?e.jsx(oe,{name:K?"visibility_off":"visibility",className:"cursor-pointer",onClick:()=>Z(!K)}):B?e.jsx(oe,{name:B}):I||null]}),i==="number"&&e.jsxs("div",{className:g(De.numberArrows,"ml-xxs"),children:[e.jsx(oe,{name:"arrow_drop_up",className:"arrow-icon",onClick:me}),e.jsx(oe,{name:"arrow_drop_down",className:"arrow-icon",onClick:_e})]})]}),(m||W)&&(Se||!!W)&&e.jsx("p",{className:De.errorMessage,children:m||W})]})});Dt.PrependIcon=En,Dt.AppendIcon=Mn;function Gs({value:t,defaultValue:s,onChange:n,options:o,disabled:a=!1,labelValue:r="",isError:l=!1,errorMessage:i="",infoMessage:c="",required:d=!1,placeholder:f="Search...",className:p}){const[m,b]=xe({value:t,defaultValue:s??null,onChange:n}),[v,x]=u.useState(!1);let h=!1;function y(R,k){k?.source=="blur"?x(R&&h):x(h?!0:R)}function _(R){h=R}const C=o.filter(R=>String(R).toLowerCase().includes(m?.toLowerCase()||""));function $(R){a||(b(R),x(!1))}const B=C.length>0?C.map((R,k)=>e.jsx(Jt,{selected:m===R,onClick:()=>$(R),children:R},k)):[e.jsx("div",{className:Os.noResults,children:"No options match your search"},"no-results")];return e.jsx("div",{onClick:()=>setTimeout(()=>y(h)),children:e.jsx(Ot,{value:v,onChange:y,labelValue:r,absolute:!0,disabled:a,isError:l,errorMessage:i,infoMessage:c,required:d,options:B,label:e.jsx(Dt,{value:m,disabled:a,isError:l,infoMessage:c,placeholder:f,appendIcon:"unfold_more",onChange:b,onFocus:()=>{_(!0)},onBlur:()=>_(!1)}),className:g("auto-complete",p)})})}const Qe={avatar:"_avatar_qygx1_2",avatarImg:"_avatarImg_qygx1_2",avatarInitials:"_avatarInitials_qygx1_2",small:"_small_qygx1_2",smallInitials:"_smallInitials_qygx1_2",medium:"_medium_qygx1_2",mediumInitials:"_mediumInitials_qygx1_2",large:"_large_qygx1_2",largeInitials:"_largeInitials_qygx1_2"};function Ys(t){if(!t)return"";const s=t.trim().split(" ");return s.length>1?(s[0][0]+s[s.length-1][0]).toUpperCase():t.slice(0,2).toUpperCase()}function Bt({name:t,src:s,alt:n,size:o="medium",className:a}={}){const r=Ys(t),l=o==="small"?Qe.small:o==="large"?Qe.large:Qe.medium,i=o==="small"?Qe.smallInitials:o==="large"?Qe.largeInitials:Qe.mediumInitials;return e.jsxs("div",{className:g(Qe.avatar,l,a),children:[s&&e.jsx("img",{className:Qe.avatarImg,src:s,alt:n||t}),e.jsx("span",{className:g(Qe.avatarInitials,i,s&&"opacity-0"),children:r})]})}const Ln={spinner:"_spinner_e0zgt_2",path:"_path_e0zgt_2"};function tn({className:t}={}){return e.jsx("svg",{className:g(Ln.spinner,t),viewBox:"0 0 50 50",children:e.jsx("circle",{className:Ln.path,cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"8",shapeRendering:"geometricPrecision"})})}const et={badge:"_badge_3jfyt_2",label:"_label_3jfyt_2",small:"_small_3jfyt_2",medium:"_medium_3jfyt_2",large:"_large_3jfyt_2",secondary:"_secondary_3jfyt_2",heavy:"_heavy_3jfyt_2",colored:"_colored_3jfyt_2",clickable:"_clickable_3jfyt_2"};function On({labelValue:t="",color:s="",size:n="medium",type:o="default",loading:a=!1,closeable:r=!1,icon:l="",isAppendedIcon:i=!1,children:c,className:d,onClose:f}){const p=i?"":l,m=r?"close":i?l:"",[b,v]=u.useState(!1);u.useEffect(()=>{v(!0)},[]);const x=o==="secondary"?"transparent":!b||o==="heavy"?s:lt(s),h=s?{color:s,borderColor:s,background:x}:{};return e.jsx("div",{className:g(et.badge,et[n],et[o],d),style:h,children:a?e.jsx(tn,{className:et.colored}):e.jsxs(e.Fragment,{children:[p&&e.jsx(oe,{name:p,className:et.colored}),e.jsx("p",{className:g(et.colored,et.label),children:c||t}),m&&e.jsx("span",{className:g(r&&et.clickable,"leading-none"),onClick:r?f:void 0,children:e.jsx(oe,{name:m,className:et.colored})})]})})}const ut={breadcrumb:"_breadcrumb_130ur_2",itemWrapper:"_itemWrapper_130ur_2",option:"_option_130ur_2",active:"_active_130ur_2",moreOptions:"_moreOptions_130ur_2",subOption:"_subOption_130ur_2",moreIcon:"_moreIcon_130ur_2"};function Xs({value:t,defaultValue:s,onChange:n,options:o=[],labelKey:a="label",valueKey:r="value",getObject:l=!1,className:i}){const[c,d]=xe({value:t,defaultValue:s,onChange:n}),[f,p]=u.useState([]);function m(y){return $e(y)?y[a]:String(y)}function b(y){return $e(y)?y[r]:y}function v(y){const _=b(y);return b(c)==_}function x(y){const _=l?y:b(y);p(f.map(()=>!1)),setTimeout(()=>{d(_)},200)}const h=(()=>{if(!o?.length)return[];const y=[...o];let _=y.findIndex($=>v($));_===-1&&(_=0);const C=[];for(let $=0;$<y.length;$++)$===0||$===y.length-1||_===0&&$<2||_===y.length-1&&$>=y.length-2||_-1===$||_+1===$||_===$?C.push(y[$]):$===1&&_>1?C.push({icon:"more_horiz",options:y.slice(1,_-1)}):$===y.length-2&&_<y.length-2&&C.push({icon:"more_horiz",options:y.slice(_+2,y.length-1)});return C})();return e.jsx("div",{className:g(ut.breadcrumb,i),children:h.map((y,_)=>e.jsxs("span",{className:ut.itemWrapper,children:[$e(y)&&y.icon==="more_horiz"?e.jsx(xt,{value:f[_],onChange:C=>{const $=[...f];$[_]=C,p($)},card:e.jsx("div",{className:ut.moreOptions,children:y.options.map((C,$)=>e.jsx("div",{className:ut.subOption,onClick:()=>x(C),children:m(C)},$))}),children:e.jsx(oe,{name:"more_horiz",className:ut.moreIcon})}):e.jsx("h5",{className:g(ut.option,v(y)&&ut.active),onClick:()=>x(y),children:m(y)}),_<h.length-1&&e.jsx(oe,{name:"chevron_right"})]},_))})}const He={button:"_button_1m59u_2",progress:"_progress_1m59u_2",progressComplete:"_progressComplete_1m59u_2",buttonLabel:"_buttonLabel_1m59u_2",label:"_label_1m59u_2",invisible:"_invisible_1m59u_2",pointerEventsNone:"_pointerEventsNone_1m59u_2",disabled:"_disabled_1m59u_2",round:"_round_1m59u_2",alwaysOpen:"_alwaysOpen_1m59u_2",hovered:"_hovered_1m59u_2",spinner:"_spinner_1m59u_2"};function Be({id:t,name:s,type:n="button",color:o="primary",size:a="medium",variant:r="default",disabled:l=!1,loading:i=!1,progress:c=0,icon:d="",round:f=!1,alwaysOpen:p=!1,background:m="",children:b,className:v,onClick:x}){const[h,y]=u.useState(!1),[_,C]=u.useState(!1);u.useEffect(()=>{C(!0)},[]);const $=!!(c>0||i),B=d||(f?o==="danger"||o==="warning"||o==="neutral"?"close":"add":""),R=(()=>{const w={};if(l)return w;if(m&&r!=="plain"&&(w.borderColor=m),m&&r!=="default"?w.color=m:m&&(w.background=m),h&&_)if(m&&r==="default"){const D=lt(m,.5,[0,0,0]);w.background=D,w.borderColor=D}else m&&r==="reverse"?(w.background=m,w.color="white"):m&&(w.background=lt(m,.4));return w})(),k=s||t?"label":"div";return e.jsxs("button",{id:t,name:s||t,type:n,disabled:l,className:g(He.button,r,a,o,{[He.disabled]:l,disabled:l,[He.round]:f,round:f,[He.pointerEventsNone]:$,[He.alwaysOpen]:f&&p,"always-open":f&&p,[He.hovered]:h,hovered:h},v),style:R,onMouseOver:()=>y(!0),onMouseOut:()=>y(!1),onClick:x,children:[$&&e.jsx("div",{className:g(He.progress,c===1&&He.progressComplete),style:{width:`${c*100}%`}}),$&&e.jsx(tn,{className:He.spinner}),(b||f||B)&&e.jsxs(k,{htmlFor:s||t,className:g(He.buttonLabel,$&&He.invisible),children:[B&&e.jsx(oe,{name:B}),b&&e.jsx("span",{className:He.label,children:b})]})]})}const pe={calendar:"_calendar_7ms0e_2",header:"_header_7ms0e_2",monthYear:"_monthYear_7ms0e_2",navButton:"_navButton_7ms0e_2",weekdayHeader:"_weekdayHeader_7ms0e_2",dayCell:"_dayCell_7ms0e_2",disabled:"_disabled_7ms0e_2",outsideMonth:"_outsideMonth_7ms0e_2",selectedPrimary:"_selectedPrimary_7ms0e_2",selectedSecondary:"_selectedSecondary_7ms0e_2",noDate:"_noDate_7ms0e_2",dayLabel:"_dayLabel_7ms0e_2",hoveredPrimary:"_hoveredPrimary_7ms0e_2",rangePrimary:"_rangePrimary_7ms0e_2",hoveredSecondary:"_hoveredSecondary_7ms0e_2",rangeSecondary:"_rangeSecondary_7ms0e_2",isCompare:"_isCompare_7ms0e_2",isBigger:"_isBigger_7ms0e_2",isSmaller:"_isSmaller_7ms0e_2",start:"_start_7ms0e_2",middle:"_middle_7ms0e_2",end:"_end_7ms0e_2",splitOverlay:"_splitOverlay_7ms0e_2",halfPrimary:"_halfPrimary_7ms0e_2",halfSecondary:"_halfSecondary_7ms0e_2",halfHover:"_halfHover_7ms0e_2",today:"_today_7ms0e_2",grid:"_grid_7ms0e_2",doubleCalendar:"_doubleCalendar_7ms0e_2",doubleGrid:"_doubleGrid_7ms0e_2",slideContainer:"_slideContainer_7ms0e_2","slide-fade-forward":"_slide-fade-forward_7ms0e_2","slide-in-right":"_slide-in-right_7ms0e_1","slide-fade-back":"_slide-fade-back_7ms0e_2","slide-in-left":"_slide-in-left_7ms0e_1",dateDialog:"_dateDialog_7ms0e_2",dialogHeader:"_dialogHeader_7ms0e_2",headerToggle:"_headerToggle_7ms0e_2",headerToggleActive:"_headerToggleActive_7ms0e_2",monthGrid:"_monthGrid_7ms0e_2",monthButton:"_monthButton_7ms0e_2",monthActive:"_monthActive_7ms0e_2",yearList:"_yearList_7ms0e_2",yearButton:"_yearButton_7ms0e_2",yearActive:"_yearActive_7ms0e_2",dialogEnter:"_dialogEnter_7ms0e_2",dialogFadeIn:"_dialogFadeIn_7ms0e_1",dialogLeave:"_dialogLeave_7ms0e_2",dialogFadeOut:"_dialogFadeOut_7ms0e_1"};function Pn({date:t,rangePrimary:s,rangeSecondary:n,selectedPrimary:o,selectedSecondary:a,hoveredPrimary:r,hoveredSecondary:l,isCompare:i,differencePrimary:c,differenceSecondary:d,showSplit:f,splitIsSecondary:p,isToday:m,isOutsideMonth:b,isDisabled:v,position:x,onClick:h,onMouseEnter:y,onMouseLeave:_}){return t?e.jsxs("div",{className:g(pe.dayCell,pe[x],s&&pe.rangePrimary,n&&pe.rangeSecondary,o&&pe.selectedPrimary,a&&pe.selectedSecondary,r&&pe.hoveredPrimary,l&&pe.hoveredSecondary,i&&pe.isCompare,c&&pe[c],d&&pe[d],m&&pe.today,b&&pe.outsideMonth,v&&pe.disabled),onClick:v?void 0:h,onMouseEnter:y,onMouseLeave:_,role:"gridcell","aria-selected":o||a,children:[f&&e.jsxs("div",{className:pe.splitOverlay,children:[e.jsx("div",{className:pe.halfPrimary}),e.jsx("div",{className:p?pe.halfSecondary:pe.halfHover})]}),e.jsx("span",{className:pe.dayLabel,children:t.getDate()})]}):e.jsx("div",{className:pe.dayCell})}function Dn({months:t,currentMonth:s,currentYear:n,isOpen:o,header:a,onSelectMonth:r,onSelectYear:l}){const[i,c]=u.useState("month"),d=u.useRef(null),f=[];for(let m=n-10;m<=n+10;m++)f.push(m);function p(){if(typeof a=="function")return 0;const m=a.current;return`${m?m.scrollHeight:0}px`}return u.useEffect(()=>{if(i==="year"&&d.current){const m=d.current.querySelector(`.${pe.yearActive}`);m&&m.scrollIntoView({block:"center",behavior:"smooth"})}},[i]),e.jsxs(pt,{className:g(pe.dateDialog,o?pe.dialogEnter:pe.dialogLeave),style:{top:p()},children:[e.jsxs("div",{className:pe.dialogHeader,children:[e.jsx("button",{className:g(pe.headerToggle,i==="month"&&pe.headerToggleActive),onClick:()=>c(m=>m==="month"?null:"month"),children:t[s]?.label??""}),e.jsx("button",{className:g(pe.headerToggle,i==="year"&&pe.headerToggleActive),onClick:()=>c(m=>m==="year"?null:"year"),children:n})]}),i==="month"&&e.jsx("div",{className:pe.monthGrid,children:t.map(m=>e.jsx("button",{className:g(pe.monthButton,m.value===s&&pe.monthActive),onClick:()=>{r(m.value),c(null)},children:m.label},m.value))}),i==="year"&&e.jsx("div",{className:pe.yearList,ref:d,children:f.map(m=>e.jsx("button",{className:g(pe.yearButton,m===n&&pe.yearActive),onClick:()=>{l(m),c(null)},children:m},m))})]})}function nn(t,s){return t.getFullYear()===s.getFullYear()&&t.getMonth()===s.getMonth()&&t.getDate()===s.getDate()}function Zs(t,s,n,o){const a=t.toISOString().substring(0,10);return!!(s&&a<s.toISOString().substring(0,10)||n&&a>n.toISOString().substring(0,10)||o?.some(r=>nn(r,t)))}function St(t,s,n){return t?s==="compare"?t[n]??[]:t:[]}function Vt(t,s,n,o,a){if(!s||o>0&&n!=="compare")return!1;const r=St(s,n,o);return r.length>1&&r[0]instanceof Date&&r[1]instanceof Date?Sn(r[0],r[1],t,a):a&&r[0]instanceof Date&&r[0].toISOString().substring(0,10)===t.toISOString().substring(0,10)}function Bn(t,s,n,o,a){if(!o||!s||n==="date"||a>0)return!1;const r=St(s,n,a);return r.length===1&&Sn(r[0],o,t)}function Vn(t,s,n,o,a){if(!s||n==="date")return!1;const r=St(s,n,a),l=t.toISOString().substring(0,10);let i=o?.toISOString().substring(0,10);const c=r[0]?.toISOString().substring(0,10);return r.length>1&&(i=r[1]?.toISOString().substring(0,10)),c!==l&&l!==i||(i===l&&(i=c),!i||!l)?!1:l<i?"isBigger":l>i?"isSmaller":!1}function Js(t,s,n,o,a,r,l,i){const c=nn(t,o),d=Zs(t,r,l,i),f=n!=="date",p=Vt(t,s,n,0,!1),m=Vt(t,s,n,1,!1),b=Vt(t,s,n,0,!0),v=Vt(t,s,n,1,!0),x=Bn(t,s,n,a,0),h=Bn(t,s,n,a,1),y=Vn(t,s,n,a,0),_=Vn(t,s,n,a,1),C=St(s,n,0),$=St(s,n,1),B=n!=="date"&&b&&(a!==null&&nn(a,t)&&C.length>1||v)&&($.length<2||v);return{rangePrimary:p,rangeSecondary:m,selectedPrimary:b,selectedSecondary:v,hoveredPrimary:x,hoveredSecondary:h,isCompare:f,differencePrimary:y,differenceSecondary:_,showSplit:B,splitIsSecondary:v,isToday:c,isDisabled:d}}function Ks(t){const s=new Date;if(!t)return{month:s.getMonth(),year:s.getFullYear()};if(t instanceof Date)return{month:t.getMonth(),year:t.getFullYear()};if(Array.isArray(t)&&t.length>0){const n=Array.isArray(t[0])?t[0][0]:t[0];if(n instanceof Date)return{month:n.getMonth(),year:n.getFullYear()}}return{month:s.getMonth(),year:s.getFullYear()}}function Ft({value:t,defaultValue:s,onChange:n,type:o="date",doubleCalendar:a=!1,minDate:r,maxDate:l,disabledDates:i,lang:c="en",className:d}){const f=Ks(t??s),[p,m]=u.useState(f.month),[b,v]=u.useState(f.year),[x,h]=u.useState(!1),[y,_]=u.useState(0),[C,$]=u.useState(null),B=u.useRef(null),R=u.useRef(!1),{isMounted:k,isActive:w}=Je(y%2===0,{duration:300}),[D,V]=u.useState(()=>Kt(s,o)),H=t!==void 0?Kt(t,o):D,L=new Date,E=new Date(b,p,1),T=In(E),P=qs(c),K=p===11?0:p+1,Z=p===11?b+1:b,W=new Date(Z,K,1),ue=In(W),ie=[],j=new Date("2021-10-03T23:15:30");for(let Y=0;Y<7;Y++){const z=j.toLocaleDateString(c,{weekday:"short"});ie.push(z.charAt(0).toUpperCase()+z.charAt(1).toLowerCase()),j.setDate(j.getDate()+1)}const U=$n(new Date(b,p,1).toLocaleDateString(c,{year:"numeric",month:"long"})),I=$n(new Date(Z,K,1).toLocaleDateString(c,{year:"numeric",month:"long"}));function O(){R.current=!0,_(Y=>Y+1),p===0?(m(11),v(Y=>Y-1)):m(Y=>Y-1)}function re(){R.current=!1,_(Y=>Y+1),p===11?(m(0),v(Y=>Y+1)):m(Y=>Y+1)}function be(Y){let z;if(o==="date")z=[Y];else if(o==="period"){const le=H;if(le.length===0||le.length>=2)z=[Y];else{const[ce]=le;Y<ce?z=[Y,ce]:z=[ce,Y]}}else{const le=H;let ce=[...le[0]??[]],fe=[...le[1]??[]];(!le[0]||fe.length>1)&&(ce=[],fe=[]);const F=ce.length>1?1:0,X=F===0?ce:fe;let ae;X.length>1||X.length===0?ae=[Y]:Y<X[0]?ae=[Y,X[0]]:ae=[X[0],Y],F===0?z=[ae,fe]:z=[ce,ae]}t===void 0&&V(z),n&&(console.log("aqui"),n(o==="date"?Y:z))}function ee(Y){R.current=Y<p,_(z=>z+1),m(Y),h(!1)}function me(Y){R.current=Y<b,_(z=>z+1),v(Y),h(!1)}function _e(Y,z){return z===0?"start":Y.length-1===z?"end":"middle"}const Se=R.current?pe["slide-fade-back"]:pe["slide-fade-forward"];function se(Y,z){return e.jsxs("div",{role:"grid","aria-label":z,children:[e.jsx("div",{className:pe.grid,children:ie.map(le=>e.jsx("div",{className:pe.weekdayHeader,children:le},le))}),Y.filter(le=>le.some(ce=>ce)).map((le,ce)=>e.jsx("div",{className:pe.grid,children:le.map((fe,F)=>{if(!fe)return e.jsx("div",{className:pe.noDate},F);const X=Js(fe,H,o,L,C,r,l,i);return e.jsx(Pn,{date:fe,position:_e(le,F),...X,isOutsideMonth:!1,onClick:()=>be(fe),onMouseEnter:()=>$(fe),onMouseLeave:()=>$(null)},F)})},ce))]})}return e.jsxs("div",{className:g(pe.calendar,a&&pe.doubleCalendar,d),children:[e.jsxs("div",{className:pe.header,ref:B,children:[e.jsx("button",{className:pe.navButton,onClick:O,"aria-label":"Previous month",children:e.jsx(oe,{name:"chevron_left"})}),e.jsx("span",{className:pe.monthYear,onClick:()=>h(Y=>!Y),children:a?`${U} – ${I}`:U}),e.jsx("button",{className:pe.navButton,onClick:re,"aria-label":"Next month",children:e.jsx(oe,{name:"chevron_right"})})]}),x&&e.jsx(Dn,{header:B,months:P,currentMonth:p,currentYear:b,isOpen:x,onSelectMonth:ee,onSelectYear:me}),e.jsx("div",{className:pe.slideContainer,children:e.jsxs("div",{className:g(Se,a&&pe.doubleGrid),children:[se(T,U),a&&se(ue,I)]},y)})]})}Ft.Day=Pn,Ft.DateDialog=Dn;const Le={carousel:"_carousel_1dpr0_2",content:"_content_1dpr0_2",vertical:"_vertical_1dpr0_2",overflow:"_overflow_1dpr0_2",track:"_track_1dpr0_2",section:"_section_1dpr0_2",slide:"_slide_1dpr0_2",navButton:"_navButton_1dpr0_2",indicators:"_indicators_1dpr0_2",indicator:"_indicator_1dpr0_2",indicatorActive:"_indicatorActive_1dpr0_2",indicatorDisabled:"_indicatorDisabled_1dpr0_2"};function Qs({value:t,defaultValue:s,onChange:n,options:o,visible:a=1,vertical:r=!1,autoplay:l=!1,autoplayInterval:i=3e3,showArrows:c=!0,disabled:d=!1,circular:f=!1,children:p,className:m}){const[b,v]=xe({value:t,defaultValue:s??0,onChange:n}),x=u.useRef(null),[h,y]=u.useState("-0px"),[_,C]=u.useState({}),$=Math.ceil(o.length/a),B=b??0,R=[];for(let Z=0;Z<o.length;Z+=a)R.push(o.slice(Z,Z+a));const k=$-1;function w(Z){if(!d){if(Z>k){if(!f)return;Z=0}else if(Z<0){if(!f)return;Z=k}v(Z)}}function D(){if(!x.current){C({}),y("-0px");return}const Z=x.current.children;if(Z.length===0){C({}),y("-0px");return}const W=getComputedStyle(document.documentElement).getPropertyValue("--spacing-xs"),ue=parseFloat(W)||0;let ie=0,j=0;const U=Z[B];U&&(r?ie=Math.max(ie,U.offsetHeight):ie+=U.offsetWidth);for(let I=0;I<B;I++){const re=Z[I].getBoundingClientRect();r?j+=re.height:j+=re.width,B>0&&(j+=ue)}y(`-${Math.floor(j)}px`),C({width:r?"":`${ie}px`,height:r?`${ie}px`:""})}u.useLayoutEffect(()=>{D()},[b,o.length,a]);const V=u.useRef(B);V.current=B;const H=u.useRef(k);H.current=k;const L=u.useRef(f);L.current=f,u.useEffect(()=>{if(!l||d)return;const Z=setInterval(()=>{const W=V.current,ue=H.current,ie=L.current,j=W+1;j>ue?v(ie?0:W):v(j)},i);return()=>clearInterval(Z)},[l,i,o.length,a,d,f]);function E(){w(B-1)}function T(){w(B+1)}const P=d||B===0&&!f,K=d||B>=k&&!f;return e.jsxs("div",{className:g(Le.carousel,m),children:[e.jsxs("div",{className:g(Le.content,r&&Le.vertical),children:[c&&e.jsx("button",{className:g(Le.navButton,Le.prevButton,r&&Le.vertical),onClick:E,"aria-label":"Previous slide",disabled:P,children:e.jsx(oe,{name:r?"expand_less":"chevron_left"})}),e.jsx("div",{className:Le.overflow,style:{width:"100%",overflow:"hidden",..._},children:e.jsx("div",{ref:x,className:g(Le.track,r&&Le.vertical),style:{transform:`translate${r?"Y":"X"}(${h})`},children:R.map((Z,W)=>e.jsx("div",{className:Le.section,...W!==B?{inert:!0}:{},children:Z.map((ue,ie)=>e.jsx("div",{className:Le.slide,children:p?.(ue,W*a+ie)},ie))},W))})}),c&&e.jsx("button",{className:g(Le.navButton,Le.nextButton,r&&Le.vertical),onClick:T,"aria-label":"Next slide",disabled:K,children:e.jsx(oe,{name:r?"expand_more":"chevron_right"})})]}),e.jsx("div",{className:Le.indicators,children:Array.from({length:$}).map((Z,W)=>e.jsx("button",{className:g(Le.indicator,W===B&&Le.indicatorActive,d&&Le.indicatorDisabled),onClick:()=>!d&&v(W),"aria-label":`Go to slide ${W+1}`},W))})]})}const bt={checkbox:"_checkbox_19ecb_2",rhs:"_rhs_19ecb_2",disabled:"_disabled_19ecb_2",box:"_box_19ecb_2",active:"_active_19ecb_2",indeterminate:"_indeterminate_19ecb_2"};function dt({id:t,name:s,value:n,defaultValue:o,onChange:a,rhs:r=!1,allowIndeterminate:l=!1,disabled:i=!1,children:c,className:d}){const[f,p]=xe({value:n,defaultValue:o??!1,onChange:a});function m(){i||p(l?f===!0?null:f!==null:!f)}const b=()=>c?t||s?e.jsx("label",{htmlFor:t||s,className:"text-sm cursor-[inherit]",children:c}):e.jsx("span",{className:"text-sm",children:c}):null;return e.jsxs("div",{role:"checkbox","aria-checked":f===null?"mixed":!!f,"aria-disabled":i,className:g(bt.checkbox,r&&bt.rhs,i&&bt.disabled,d),onClick:m,children:[e.jsxs("div",{className:g(bt.box,f===!0&&bt.active,f===null&&bt.indeterminate),children:[f===!0&&e.jsx("svg",{viewBox:"0 0 16 16",className:"w-full h-full",fill:"none",children:e.jsx("path",{d:"M3.5 8L6.5 11L12.5 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),f===null&&e.jsx("svg",{viewBox:"0 0 16 16",className:"w-full h-full",fill:"none",children:e.jsx("line",{x1:"4",y1:"8",x2:"12",y2:"8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})]}),b()]})}function Fn({value:t=!1,zIndex:s=1e3,onClick:n,children:o,className:a}){const{isMounted:r,isActive:l}=Je(t,{duration:500});return e.jsx(e.Fragment,{children:r&&jt.createPortal(e.jsxs(e.Fragment,{children:[e.jsx("div",{className:g("overlay-backdrop",l&&"active",a),style:{zIndex:s},onClick:n}),o]}),document.body)})}function sn({value:t,onChange:s,width:n="fit-content",height:o="fit-content",noOutsideClose:a=!1,children:r,className:l}){const[i,c]=xe({value:t,defaultValue:!1,onChange:s}),{isMounted:d,isActive:f}=Je(i??!1,{duration:500}),p=u.useRef(null);function m(){a?(p.current?.classList.add("no-outside-close-warning"),setTimeout(()=>{p.current?.classList.remove("no-outside-close-warning")},100)):c(!1)}return e.jsx(Fn,{value:i,zIndex:1002,onClick:m,children:d&&e.jsx("div",{ref:p,className:g("dialog",f&&"active",l),style:{width:n,height:o},children:r})})}const qn=u.createContext(null),er=500;function Hn({children:t}){const[s,n]=u.useState(null),[o,a]=u.useState(!1),r=u.useRef(null),l=u.useRef(null);function i(d){return l.current&&(clearTimeout(l.current),l.current=null),new Promise(f=>{r.current=f,n({title:d.title??"",message:d.message??"",acceptLabel:d.acceptLabel??"Confirm",cancelLabel:d.cancelLabel??"Cancel"}),a(!0)})}function c(d){r.current?.(d),r.current=null,a(!1),l.current=setTimeout(()=>{n(null),l.current=null},er)}return e.jsxs(qn.Provider,{value:{confirm:i},children:[t,e.jsx(sn,{value:o,noOutsideClose:!0,className:"confirm",children:s&&e.jsxs("div",{className:"flex flex-col p-xl gap-sm",children:[s.title&&e.jsx("h2",{className:"font-bold text-lg text-neutral-foreground-high",children:s.title}),s.message&&e.jsx("p",{className:"text-sm text-neutral-foreground-low",children:s.message}),e.jsxs("div",{className:"flex justify-end w-full gap-xs mt-sm",children:[e.jsx(Be,{variant:"plain",onClick:()=>c(!1),children:s.cancelLabel}),e.jsx(Be,{onClick:()=>c(!0),children:s.acceptLabel})]})]})})]})}function tr(){const t=u.useContext(qn);if(!t)throw new Error("useConfirm must be used inside ConfirmProvider");return t}const rn={connector:"_connector_1gync_2",vert:"_vert_1gync_2",hor:"_hor_1gync_2"};function nr({vertical:t=!1,children:s,className:n}){return e.jsx("div",{className:g(rn.connector,t?rn.vert:rn.hor,n),children:s})}const Ae={slider:"_slider_rw7q0_2",small:"_small_rw7q0_2",medium:"_medium_rw7q0_2",large:"_large_rw7q0_2",vertical:"_vertical_rw7q0_2",disabled:"_disabled_rw7q0_2",stepSlider:"_stepSlider_rw7q0_2",neutralBg:"_neutralBg_rw7q0_2",track:"_track_rw7q0_2",fillBar:"_fillBar_rw7q0_2",fillBarVertical:"_fillBarVertical_rw7q0_2",haveFillColors:"_haveFillColors_rw7q0_2",cursor:"_cursor_rw7q0_2",dragging:"_dragging_rw7q0_2",stepsContainer:"_stepsContainer_rw7q0_2",step:"_step_rw7q0_2",stepActive:"_stepActive_rw7q0_2",stepNeutral:"_stepNeutral_rw7q0_2",stepMarker:"_stepMarker_rw7q0_2",stepMarkerActive:"_stepMarkerActive_rw7q0_2",stepMarkerNeutral:"_stepMarkerNeutral_rw7q0_2"},on=u.forwardRef(function(s,n){const{value:o,onChange:a,size:r="medium",max:l=0,unit:i="",color:c="",showTooltip:d=!1,disabled:f=!1,vertical:p=!1,fillColors:m,isRange:b=!1,steps:v,neutralBackground:x=!1,className:h}=s,y=o!==void 0,[_,C]=xe({value:o,defaultValue:b?[0,0]:0,onChange:a}),[$,B]=u.useState([!1,!1]),[R,k]=u.useState(!1),[w,D]=u.useState(void 0),V=u.useRef(null),H=u.useRef(null),L=u.useRef([]),E=u.useRef([!1,!1]),T=u.useRef(_),P=u.useRef(()=>{}),K=u.useRef(()=>{}),Z=u.useRef(()=>{}),W=u.useCallback(F=>{V.current=F,typeof n=="function"?n(F):n&&(n.current=F)},[n]);u.useEffect(()=>{k(!0),T.current=_},[_]);function ue(){return!R||x||!c?"":lt(c)}function ie(F){return F===void 0?[0,0]:Array.isArray(F)?[F[0],F[1]]:[F,F]}function j(F){return!l||l===0?Math.min(1,Math.max(0,F)):Math.min(1,Math.max(0,F/l))}function U(F){return!l||l===0?F:F*l}function I(F){return!v||!v.length?F:v.map(ae=>l?ae.value/l:ae.value).reduce((ae,Ne)=>Math.abs(Ne-F)<Math.abs(ae-F)?Ne:ae)}const O=u.useCallback(()=>{const F=V.current,X=H.current;if(!F)return;const ae=ie(T.current),Ne=b?[j(ae[0]),j(ae[1])]:[j(ae[0])],Q=L.current;if(Q.forEach((de,ye)=>{if(!de)return;const N=Ne[ye]??0;if(p){const G=F.clientHeight,M=Math.min(G,Math.max(0,G*N)),A=getComputedStyle(de).getPropertyValue("--border-width-xs"),q=parseFloat(A)/2||0;de.style.bottom=ae[ye]<(l*.99||.99)||v&&v.length?M-de.clientHeight/3-q+"px":M-de.clientHeight-q+"px",de.style.left="50%"}else{const G=F.clientWidth,M=Math.min(G,Math.max(0,G*N)),A=getComputedStyle(de).getPropertyValue("--border-width-xs"),q=parseFloat(A)/2||0;de.style.left=ae[ye]<(l*.99||.99)||v&&v.length?M-de.clientWidth/3-q+"px":M-de.clientWidth-q+"px",de.style.bottom="50%"}}),!!X)if(p){const de=F.clientHeight,ye=Q.map(q=>q?q.clientHeight/2:0),G=Q.map(q=>q?q.offsetTop:0).map((q,ne)=>de-q-ye[ne]),M=b?Math.min(...G):0,A=Math.max(0,Math.max(...G));X.style.bottom=M+"px",X.style.height=Math.abs(A-M)+"px",X.style.left="50%",X.style.width="100%"}else{const de=Q.filter(Boolean);if(!de.length)return;const ye=de.map(M=>M.offsetLeft+M.clientWidth/3),N=b?Math.min(...ye):0,G=Math.max(...ye);X.style.left=N+"px",X.style.width=Math.abs(G-N)+de[0].clientWidth/6+"px",X.style.bottom="50%",X.style.height="100%"}},[b,p,l,v]),re=u.useCallback(F=>{const X=[!1,!1];X[F]=!0,E.current=X,B([...X])},[]),be=u.useCallback((F,X)=>{const ae=V.current;ae&&E.current.forEach((Ne,Q)=>{if(!Ne)return;const de=L.current[Q];if(!de)return;let ye;if(p){const A=ae.getBoundingClientRect(),q=ae.clientHeight-de.clientHeight,ne=X-de.clientHeight/2-A.top,we=q,S=Math.min(we,Math.max(0,we-ne));ye=I(S/(q||1))}else{const A=ae.getBoundingClientRect(),q=ae.clientWidth-de.clientWidth,ne=F-de.clientWidth/2-A.left,we=Math.min(q,Math.max(0,ne));ye=I(we/(q||1))}const N=U(ye),G=ie(T.current);let M;if(b){const A=[...G];A[Q]=N,M=A}else M=N;T.current=M,C(M),D(M),setTimeout(()=>O(),0)})},[b,p,l,v,C,O]),ee=u.useCallback(()=>{E.current=[!1,!1],B([!1,!1]),y||D(void 0)},[]);u.useEffect(()=>{if(w===void 0)return;(Array.isArray(w)&&Array.isArray(_)?w[0]===_[0]&&w[1]===_[1]:w===_)&&D(void 0)},[_,w]),u.useEffect(()=>{P.current=F=>be(F.clientX,F.clientY),K.current=ee,Z.current=F=>{F.touches[0]&&be(F.touches[0].clientX,F.touches[0].clientY)}}),u.useEffect(()=>{const F=Q=>P.current(Q),X=()=>K.current(),ae=Q=>Z.current(Q),Ne=()=>K.current();return window.addEventListener("mousemove",F),window.addEventListener("mouseup",X),window.addEventListener("touchmove",ae),window.addEventListener("touchend",Ne),()=>{window.removeEventListener("mousemove",F),window.removeEventListener("mouseup",X),window.removeEventListener("touchmove",ae),window.removeEventListener("touchend",Ne)}},[]),u.useEffect(()=>{const F=setTimeout(()=>O(),200);return()=>clearTimeout(F)},[]),u.useEffect(()=>{const F=setTimeout(()=>O(),100);return()=>clearTimeout(F)},[_,r,p]);const me=F=>{const X=i||"%";return`${F.toFixed(1)}${X}`},_e=b?2:1,se=ie(w??_),Y=F=>{const X=l?F.value/l:F.value,ae={};return p?ae.bottom=X*100+"%":ae.left=X*100+"%",ae},z=F=>{const X=l?F.value/l:F.value;if(b){const ae=Math.min(j(se[0]),j(se[1])),Ne=Math.max(j(se[0]),j(se[1]));return X>=ae&&X<=Ne}return X>=0&&X<=j(se[0])},le=(F,X)=>{if(!X||f)return{};if(m&&m.length){const ae=l?F.value/l:F.value,Ne=b?Math.min(j(se[0]),j(se[1])):0,de=(b?Math.max(j(se[0]),j(se[1])):j(se[0]))-Ne;if(de<=0)return{};const ye=(ae-Ne)/de,N=Math.min(m.length-1,Math.max(0,Math.floor(ye*m.length)));return{backgroundColor:m[N]}}return c?{backgroundColor:c}:{}},ce={};c&&!(m&&m.length)&&!f&&(ce.backgroundColor=c);const fe=F=>{const X={};return c&&!f&&(X.borderColor=c),X};return e.jsxs("div",{ref:W,className:g(Ae.slider,Ae[r],p?Ae.vertical:Ae.horizontal,f&&Ae.disabled,v&&v.length&&Ae.stepSlider,x&&Ae.neutralBg,h),style:{background:ue()},"aria-disabled":f,onMouseDown:F=>{if(f)return;const X=V.current;if(!X)return;let ae=0;if(b&&L.current.length>1){let Ne=1/0;L.current.forEach((Q,de)=>{if(Q)if(p){const ye=X.getBoundingClientRect(),N=X.clientHeight-Q.offsetTop-Q.clientHeight/2,G=Math.abs(X.clientHeight-(F.clientY-ye.top)-N);G<Ne&&(Ne=G,ae=de)}else{const ye=Math.abs(Q.offsetLeft-(F.clientX-X.getBoundingClientRect().left));ye<Ne&&(Ne=ye,ae=de)}})}re(ae),be(F.clientX,F.clientY)},onTouchStart:F=>{f||F.touches[0]&&be(F.touches[0].clientX,F.touches[0].clientY)},children:[e.jsx("div",{ref:H,className:g(Ae.fillBar,p&&Ae.fillBarVertical,m&&m.length&&Ae.haveFillColors),style:ce,children:m&&m.map((F,X)=>e.jsx("div",{style:{background:F,width:"100%",height:"100%"}},X))}),Array.from({length:_e}).map((F,X)=>d?e.jsx(Ye,{labelValue:me(se[X]),position:p?"right":"top",children:e.jsx("div",{ref:ae=>{L.current[X]=ae},className:g(Ae.cursor,$[X]&&Ae.dragging,c&&Ae.coloredCursor),style:fe(),onMouseDown:ae=>{ae.stopPropagation(),re(X)},onTouchStart:ae=>{ae.stopPropagation(),re(X)}})},X):e.jsx("div",{ref:ae=>{L.current[X]=ae},className:g(Ae.cursor,$[X]&&Ae.dragging,c&&Ae.coloredCursor),style:fe(),onMouseDown:ae=>{ae.stopPropagation(),re(X)},onTouchStart:ae=>{ae.stopPropagation(),re(X)}},X)),v&&v.map((F,X)=>{const ae=z(F);return e.jsx("div",{className:g(Ae.step,ae&&Ae.stepActive,x&&Ae.stepNeutral),style:{...Y(F),...le(F,ae)},children:e.jsx("div",{className:g(Ae.stepMarker,ae&&Ae.stepMarkerActive,x&&!ae&&Ae.stepMarkerNeutral),style:le(F,ae)})},X)})]})});on.displayName="Slider";const qt={crop:"_crop_1pofj_2",cropArea:"_cropArea_1pofj_2",cropImg:"_cropImg_1pofj_2",footer:"_footer_1pofj_2"};function sr({src:t,onChange:s,width:n="360px",height:o="200px",className:a}){const r=u.useId(),l=u.useRef(null),i=u.useRef(null),c=u.useRef(null),d=u.useRef(!1),f=u.useRef(new Image),p=u.useRef(new Image),[m,b]=u.useState(0),[v,x]=u.useState({width:0,height:0}),[h,y]=u.useState(""),_=u.useCallback(()=>{l.current&&x({width:l.current.clientWidth?l.current.clientWidth+10:0,height:l.current.clientHeight?l.current.clientHeight+10:0})},[]),C=u.useCallback((V,H)=>{const L=V.getBoundingClientRect(),E=document.createElement("canvas"),T=E.getContext("2d");if(!T)return;E.width=L.width,E.height=L.height;const P=H.getBoundingClientRect(),K=L.left-P.left,Z=L.top-P.top;T.drawImage(f.current,K,Z,L.width,L.height,0,0,L.width,L.height);const W=E.toDataURL("image/png");s?.(W)},[s]),$=u.useCallback(V=>{if(!i.current||!i.current.parentElement||!c.current||!d.current)return;const H=Tn(V,i.current,i.current.parentElement,{left:!0,top:!0},{x:-1,y:-3});i.current.style.top=`${H.y}px`,i.current.style.left=`${H.x}px`,c.current.setAttribute("x",H.x.toString()),c.current.setAttribute("y",H.y.toString()),C(i.current,i.current.parentElement)},[C]),B=u.useCallback(V=>{const H=document.createElement("canvas"),L=H.getContext("2d");if(!i.current||!i.current.parentElement||!L)return;const E=p.current,T=V+1,P=i.current.parentElement.getBoundingClientRect(),K=i.current.getBoundingClientRect();H.width=P.width,H.height=P.height;const Z=(P.width-E.width)/2,W=(P.height-E.height)/2;L.drawImage(E,Z,W);const ue=K.left+K.width/2-P.left,ie=K.top+K.height/2-P.top;L.clearRect(0,0,H.width,H.height),L.save(),L.translate(ue,ie),L.scale(T,T),L.translate(-ue,-ie),L.drawImage(E,Z,W),L.restore();const j=H.toDataURL("image/png"),U=new Image;U.src=j,U.onload=()=>{f.current=U,y(j),i.current&&i.current.parentElement&&C(i.current,i.current.parentElement)}},[C]);u.useEffect(()=>{const V=P=>$(P),H=()=>{d.current=!1},L=P=>$(P.touches[0]),E=()=>{d.current=!1};window.addEventListener("mousemove",V),window.addEventListener("mouseup",H),window.addEventListener("touchmove",L),window.addEventListener("touchend",E);let T;return l.current&&(T=new ResizeObserver(_),T.observe(l.current,{box:"border-box"})),t&&(p.current.src=t,p.current.onload=()=>{y(t),f.current=p.current,B(0)}),()=>{window.removeEventListener("mousemove",V),window.removeEventListener("mouseup",H),window.removeEventListener("touchmove",L),window.removeEventListener("touchend",E),T?.disconnect()}},[]);function R(V){d.current=!0,$(V.nativeEvent)}function k(V){d.current=!0,$(V.touches[0])}function w(V){const H=typeof V=="number"?V:V[0];b(H),B(H)}const D=l.current&&getComputedStyle(l.current).getPropertyValue("--border-radius-xl")||"16px";return e.jsxs("div",{ref:l,className:`${qt.crop}${a?` ${a}`:""}`,children:[e.jsxs("div",{className:"relative w-full h-full bg-black rounded-xl",style:{minWidth:n,minHeight:o},children:[e.jsxs("div",{className:qt.cropImg,onClick:R,children:[e.jsxs("svg",{className:"absolute z-[1]",width:`${v.width||0}px`,height:`${v.height||0}px`,viewBox:`0 0 ${v.width||0} ${v.height||0}`,xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("defs",{children:e.jsxs("mask",{id:r,children:[e.jsx("rect",{width:"100%",height:"100%",fill:"white"}),e.jsx("rect",{ref:c,x:"0",y:"0",width:n,height:o,rx:D,ry:D,fill:"black"})]})}),e.jsx("rect",{width:"100%",height:"100%",fill:"rgba(255, 255, 255, 0.7)",mask:`url(#${r})`})]}),h&&e.jsx("img",{src:h,alt:"model value"}),t&&e.jsx("img",{src:t,style:{position:"relative",visibility:"hidden"},alt:""})]}),e.jsx("div",{ref:i,className:qt.cropArea,style:{width:n,height:o},onMouseDown:R,onTouchStart:k})]}),e.jsxs("footer",{className:qt.footer,children:[e.jsx(oe,{name:"zoom_out",className:"select-none"}),e.jsx(on,{value:m,onChange:w,size:"small",max:2}),e.jsx(oe,{name:"zoom_in",className:"select-none"})]})]})}const $t={actions:"_actions_1kvuy_2",displayLabel:"_displayLabel_1kvuy_2",presetSidebar:"_presetSidebar_1kvuy_2",presetOption:"_presetOption_1kvuy_2",presetActive:"_presetActive_1kvuy_2"};function it(t,s){return t.toLocaleDateString(s,{year:"numeric",month:"short",day:"2-digit"})}function rr(t){return t.includes("pt")?"e":"and"}function or(t,s,n,o){if(!t)return"";const a=Kt(t,s);if(s==="compare"){const i=a,c=i[0]??[],d=i[1]??[];if(d.length>0){const f=o??rr(n),p=it(c[0],n)+(c[1]?" - "+it(c[1],n):""),m=it(d[0],n)+(d[1]?" - "+it(d[1],n):"");return`${p} ${f} ${m}`}else if(c.length>0)return it(c[0],n)+(c[1]?" - "+it(c[1],n):"");return""}const r=a;return r.length===0?"":it(r[0],n)+(r[1]&&s!=="date"?" - "+it(r[1],n):"")}function ar({value:t,defaultValue:s,onChange:n,type:o="date",minDate:a,maxDate:r,disabledDates:l,disabled:i=!1,labelValue:c="",isError:d=!1,errorMessage:f="",infoMessage:p="",required:m=!1,clearLabel:b="Clear selection",applyLabel:v="Apply filters",compareLabel:x="Compare dates",lang:h="en",onApply:y,separator:_,isCompare:C=!1,allowChangeType:$=!1,expanded:B,onExpandedChange:R,options:k,hideActions:w=!1,onClear:D,onTypeChange:V,className:H}){const[L,E]=xe({value:t,defaultValue:s,onChange:n}),[T,P]=u.useState(L),[K,Z]=xe({value:o,defaultValue:o,onChange:V}),[W,ue]=xe({value:B,defaultValue:!1,onChange:R}),[ie,j]=u.useState(null),[U,I]=u.useState(C||K==="compare"),O=or(L,K,h,_);u.useEffect(()=>{P(L)},[L]);function re(ce){ce&&P(L),ue(ce)}function be(ce){E(ce),j(null)}function ee(){E(void 0),j(null),D?.()}function me(){E(T),ue(!1),y?.(T)}function _e(ce){if(j(ce.label),ce.calculate){const fe=ce.calculate();E(fe)}}function Se(ce){return ie===ce.label}function se(ce){const fe=!!ce;I(fe),Z(fe?"compare":"period"),console.log(fe,o,K),P(L),console.log(t,L,T)}const Y=e.jsxs("div",{className:g("flex items-center text-lg text-neutral-interaction-default",{expanded:W,error:d,disabled:i}),children:[e.jsx(oe,{name:"calendar_month"}),e.jsx("h5",{className:g("whitespace-nowrap ml-xs",{"font-bold":W}),children:e.jsx("span",{className:$t.displayLabel,children:O||c||" "})})]}),z=(k&&k.length||$)&&K!="date",le=e.jsx("div",{children:e.jsxs("div",{className:"flex",children:[z&&e.jsxs("div",{className:$t.presetSidebar,children:[e.jsx("div",{className:"flex flex-col",children:k&&k.map((ce,fe)=>e.jsx("button",{className:g($t.presetOption,Se(ce)&&$t.presetActive),onClick:()=>_e(ce),children:ce.label},fe))}),$&&e.jsx("div",{className:"px-xs py-sm",children:e.jsx(dt,{value:U,onChange:se,children:x})})]}),e.jsxs("div",{className:"flex flex-col items-end gap-base relative overflow-hidden flex-1",children:[e.jsx("div",{className:"px-sm pt-xxs w-full",children:e.jsx(Ft,{value:T,onChange:be,type:K,minDate:a,maxDate:r,disabledDates:l,lang:h})}),!w&&e.jsxs("div",{className:$t.actions,children:[e.jsx(Be,{size:"small",variant:"plain",color:"neutral",onClick:ee,children:b}),e.jsx(Be,{size:"small",variant:"default",color:"primary",onClick:me,children:v})]})]})]})});return e.jsx(Zt,{value:W,onChange:ce=>re(ce),disabled:i,isError:d,errorMessage:f,infoMessage:p,required:m,hideArrow:!0,disableLabelAutoWidth:!0,card:le,className:g("date-picker",H),labelValue:c,children:Y})}function lr({value:t,onChange:s,position:n="right",width:o="fit-content",height:a="fit-content",noOutsideClose:r=!1,children:l,className:i}){const[c,d]=xe({value:t,defaultValue:!1,onChange:s}),{isMounted:f,isActive:p}=Je(c??!1,{duration:500}),m=u.useRef(null),b=typeof window<"u"&&window.innerWidth<768,v=b?"bottom":n,x=b?"100%":o;function h(){return n=="top"||n=="bottom"?{height:a,maxHeight:"calc(100% - var(--spacing-xl))"}:{width:x,maxWidth:"calc(100% - var(--spacing-xl))"}}function y(){r?(m.current?.classList.add("no-outside-close-warning"),setTimeout(()=>{m.current?.classList.remove("no-outside-close-warning")},100)):d(!1)}return e.jsx(Fn,{value:c,zIndex:1001,onClick:y,children:f&&e.jsx("div",{ref:m,className:g("drawer",v,p&&"active",i),style:h(),children:l})})}const Ue={optionItem:"_optionItem_1grfr_2",selected:"_selected_1grfr_2",disabled:"_disabled_1grfr_2",optionsContainer:"_optionsContainer_1grfr_2",groupLabel:"_groupLabel_1grfr_2",flyoutCard:"_flyoutCard_1grfr_2"};function zn({value:t,defaultValue:s="",onChange:n,options:o,icon:a,expanded:r,defaultExpanded:l,onExpandedChange:i,searchable:c=!1,disabled:d=!1,isError:f=!1,secondary:p=!1,searchLabel:m,status:b,appendIcon:v,className:x}){const[h,y]=xe({value:t,defaultValue:s,onChange:B=>n?.(B,{index:-1})}),[_,C]=xe({value:r,defaultValue:l,onChange:B=>i?.(B,{source:"click"})}),$=u.useRef(null);return u.useEffect(()=>{r&&!d&&$.current&&$.current.focus()},[r,d]),e.jsxs(e.Fragment,{children:[a&&e.jsx(oe,{name:a,className:g("sc-icon",{expanded:_,disabled:d,error:f})}),e.jsxs("span",{className:g("flex items-center gap-xs truncate text-sm flex-1",x,{"text-neutral-foreground-low":!o}),children:[c&&!d&&e.jsxs("div",{className:g("flex items-center text-neutral-foreground-high w-full",{secondary:p,hidden:!_}),onClick:()=>C(!0),children:[e.jsx(oe,{name:"search",className:g("sc-icon",{expanded:_,disabled:d,error:f})}),!h?.length&&e.jsx("div",{className:"relative pointer-events-none",children:e.jsx("span",{className:"search-placeholder",children:m||"Search"})}),e.jsx("input",{ref:$,type:"search",className:"search",disabled:d,value:h??"",onChange:B=>y(B.target.value)}),v&&e.jsx(oe,{name:v,className:g("sc-icon",{expanded:_,disabled:d,error:f})})]}),b]})]})}const an={separator:"_separator_dbh0y_2",separatorLine:"_separatorLine_dbh0y_2"};function Rn({position:t="right",children:s,className:n}={}){return e.jsxs("div",{className:g(an.separator,n),children:[t!=="right"&&e.jsx("div",{className:an.separatorLine}),s,t!=="left"&&e.jsx("div",{className:an.separatorLine})]})}function Wn({option:t,labelKey:s,valueKey:n,selectedValue:o,onSelect:a,depth:r=0}){const[l,i]=u.useState(!1),c=p(t),d=m(t),f=o!=null&&o===d;function p(b){return $e(b)?b[s]||b.label:b}function m(b){return $e(b)?b[n]||b.value:b}if(t.options&&t.options.length>0){let b=function(v){return v.find(x=>{if(o==m(x))return!0;if(x?.options)return b(x.options)})};return e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:g(Ue.optionItem,{[Ue.disabled]:t.disabled,[Ue.selected]:b(t.options)},"justify-between"),onClick:()=>!t.disabled&&i(v=>!v),onKeyDown:v=>{v.key==="Enter"&&!t.disabled&&i(x=>!x)},tabIndex:t.disabled?-1:0,role:"option","aria-haspopup":"listbox","aria-expanded":l,children:[e.jsxs("div",{className:"flex item-center gap-xs",children:[t.icon&&e.jsx(oe,{className:"dropdown-icon",name:t.icon}),e.jsx("span",{className:Ue.groupLabel,children:c})]}),e.jsx(oe,{className:Ue.chevronIcon,name:"chevron_right"})]}),l&&e.jsx("div",{className:Ue.flyoutCard,children:e.jsx("div",{className:"bg-neutral-surface-default shadow-neutral-selected border-xxs border-neutral-default rounded-sm",children:e.jsx(ln,{options:t.options,labelKey:s,valueKey:n,selectedValue:o,onSelect:a,depth:r+1})})})]})}return e.jsxs("div",{className:g(Ue.optionItem,{[Ue.selected]:f,[Ue.disabled]:t.disabled}),onClick:()=>!t.disabled&&a(t),onKeyDown:b=>{b.key==="Enter"&&!t.disabled&&a(t)},tabIndex:t.disabled?-1:0,role:"option","aria-selected":f,children:[t.icon&&e.jsx(oe,{className:"dropdown-icon",name:t.icon}),e.jsx("span",{children:c})]})}function ln({options:t,labelKey:s,valueKey:n,selectedValue:o,onSelect:a,depth:r=0}){const l=[t.filter(i=>!i.bottom),t.filter(i=>i.bottom)].filter(i=>i.length);return e.jsx("div",{role:"listbox",className:Ue.optionsContainer,children:l.map((i,c)=>e.jsxs(e.Fragment,{children:[i.map((d,f)=>e.jsx(Wn,{option:d,labelKey:s,valueKey:n,selectedValue:o,onSelect:a,depth:r},f)),c==0&&l.length>1&&e.jsx(Rn,{})]}))})}function Un(t,s,n){const o=[];for(const a of t){const r=(a[n]??a.label??"").toString().toLowerCase();if(a.options&&a.options.length>0){const l=Un(a.options,s,n);(r.includes(s.toLowerCase())||l.length>0)&&o.push({...a,options:l.length>0?l:a.options})}else r.includes(s.toLowerCase())&&o.push(a)}return o}function Gn(t,s,n,o){for(const a of t){if((a[n]??a.value)===($e(s)?s[n]??s.value:s))return a;if(a.options&&a.options.length>0){const l=Gn(a.options,s,n);if(l)return l}}}function Ht({value:t,defaultValue:s,onChange:n,options:o,labelKey:a="label",valueKey:r="value",getObject:l=!1,disabled:i=!1,labelValue:c="",searchable:d=!1,alignRight:f=!1,isError:p=!1,errorMessage:m="",required:b=!1,infoMessage:v,maxHeight:x,minWidth:h,children:y,className:_}){const[C,$]=xe({value:t,defaultValue:s??null,onChange:n}),[B,R]=u.useState(""),[k,w]=u.useState(!1);function D(P){return $e(P)?P[r]??P.value:P}function V(P){const K=l?P:D(P);$(K),setTimeout(()=>w(!1)),R("")}const H=C!=null?Gn(o,C,r):void 0,L=d&&B?Un(o,B,a):o;let E;H?E=e.jsx("span",{className:Ue.displayLabel,children:H[a]??H.label??""}):E=y;const T=e.jsx(ln,{options:L,labelKey:a,valueKey:r,selectedValue:C!=null?D(C):null,onSelect:V});return e.jsx(Zt,{value:k,onChange:P=>w(P),labelValue:c,disabled:i,isError:p,errorMessage:m,alignRight:f,required:b,infoMessage:v,maxHeight:x,minWidth:h,card:T,className:g("dropdown",_),children:e.jsx(zn,{value:B,onChange:R,expanded:k,onExpandedChange:w,searchable:d,disabled:i,isError:p,status:E,options:H?o:void 0})})}Ht.Options=ln,Ht.Option=Wn;const tt={file:"_file_1b760_2",dragging:"_dragging_1b760_2",disabled:"_disabled_1b760_2",error:"_error_1b760_2",hiddenInput:"_hiddenInput_1b760_2",blurred:"_blurred_1b760_2",errorMessage:"_errorMessage_1b760_2",infoMessage:"_infoMessage_1b760_2",xs:"_xs_1b760_2",sm:"_sm_1b760_2",md:"_md_1b760_2",lg:"_lg_1b760_2",xl:"_xl_1b760_2"};function Yn({children:t}){return e.jsx(e.Fragment,{children:t})}const ir={xs:56,sm:66,md:76,lg:86,xl:96},cr={xs:"text-4xl",sm:"text-6xl",md:"text-7xl",lg:"text-8xl",xl:"text-9xl"},ur={xs:"text-base",sm:"text-lg",md:"text-xl",lg:"text-2xl",xl:"text-3xl"},dr={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"};function Xn({value:t,defaultValue:s,onChange:n,labelValue:o,errorMessage:a,infoMessage:r,size:l="md",disabled:i=!1,isError:c=!1,placeholder:d="or drag and drop it here",accept:f,multiple:p=!1,children:m,className:b}){const[v,x]=u.useState(t!==void 0?t:s??null),[h,y]=u.useState(!1),_=u.useRef(null);u.useEffect(()=>{t!==void 0&&x(t)},[t]);const C=v!==null&&(Array.isArray(v)?v.length>0:!0),$=p&&Array.isArray(v)?`${v.length} files selected`:v&&!Array.isArray(v)?v.name:"";function B(L){if(!(!L||L.length===0))if(p){const E=Array.from(L);x(E),n?.(E)}else x(L[0]),n?.(L[0])}function R(){x(null),n?.(null),_.current&&(_.current.value="")}const k=ir[l],w=cr[l],D=ur[l],V=dr[l];let H=null;return u.Children.forEach(m,L=>{u.isValidElement(L)&&L.type===Yn&&(H=L.props.children)}),e.jsxs("div",{className:b,children:[e.jsxs("div",{className:g(tt.file,tt[l],h&&tt.dragging,i&&tt.disabled,c&&tt.error),onDragEnter:L=>{L.preventDefault(),i||y(!0)},onDragLeave:()=>y(!1),onDragOver:L=>L.preventDefault(),onDrop:L=>{L.preventDefault(),y(!1),i||B(L.dataTransfer.files)},children:[!C&&e.jsx("input",{ref:_,type:"file",className:tt.hiddenInput,accept:f,multiple:p,disabled:i,onChange:L=>B(L.target.files)}),!C&&e.jsxs(e.Fragment,{children:[e.jsxs("svg",{width:k,height:k,viewBox:"0 0 76 76",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M63.5312 33.25H42.75C40.8603 33.25 39.0481 32.4993 37.7119 31.1631C36.3757 29.8269 35.625 28.0147 35.625 26.125V5.34375C35.625 5.18628 35.5624 5.03526 35.4511 4.92391C35.3397 4.81256 35.1887 4.75 35.0312 4.75H21.375C18.8554 4.75 16.4391 5.75089 14.6575 7.53249C12.8759 9.31408 11.875 11.7304 11.875 14.25V61.75C11.875 64.2696 12.8759 66.6859 14.6575 68.4675C16.4391 70.2491 18.8554 71.25 21.375 71.25H54.625C57.1446 71.25 59.5609 70.2491 61.3425 68.4675C63.1241 66.6859 64.125 64.2696 64.125 61.75V33.8438C64.125 33.6863 64.0624 33.5353 63.9511 33.4239C63.8397 33.3126 63.6887 33.25 63.5312 33.25Z",fill:"var(--neutral-border-default)"}),e.jsx("path",{d:"M62.228 27.9938L40.8812 6.647C40.8397 6.60573 40.7869 6.57766 40.7295 6.56631C40.672 6.55495 40.6125 6.56083 40.5584 6.5832C40.5043 6.60556 40.4581 6.64342 40.4254 6.69202C40.3928 6.74061 40.3752 6.79776 40.375 6.8563V26.125C40.375 26.7549 40.6252 27.3589 41.0706 27.8043C41.516 28.2497 42.1201 28.5 42.75 28.5H62.0187C62.0772 28.4997 62.1344 28.4822 62.183 28.4495C62.2315 28.4169 62.2694 28.3706 62.2918 28.3165C62.3141 28.2624 62.32 28.2029 62.3087 28.1455C62.2973 28.0881 62.2692 28.0353 62.228 27.9938Z",fill:"var(--neutral-border-default)"}),e.jsxs("g",{clipPath:"url(#clip0_2300_5309)",children:[e.jsx("circle",{cx:"63",cy:"63",r:"7",fill:"white"}),e.jsx("path",{d:"M63 50C55.8319 50 50 55.8319 50 63C50 70.1681 55.8319 76 63 76C70.1681 76 76 70.1681 76 63C76 55.8319 70.1681 50 63 50ZM68 64H64V68C64 68.2652 63.8946 68.5196 63.7071 68.7071C63.5196 68.8946 63.2652 69 63 69C62.7348 69 62.4804 68.8946 62.2929 68.7071C62.1054 68.5196 62 68.2652 62 68V64H58C57.7348 64 57.4804 63.8946 57.2929 63.7071C57.1054 63.5196 57 63.2652 57 63C57 62.7348 57.1054 62.4804 57.2929 62.2929C57.4804 62.1054 57.7348 62 58 62H62V58C62 57.7348 62.1054 57.4804 62.2929 57.2929C62.4804 57.1054 62.7348 57 63 57C63.2652 57 63.5196 57.1054 63.7071 57.2929C63.8946 57.4804 64 57.7348 64 58V62H68C68.2652 62 68.5196 62.1054 68.7071 62.2929C68.8946 62.4804 69 62.7348 69 63C69 63.2652 68.8946 63.5196 68.7071 63.7071C68.5196 63.8946 68.2652 64 68 64Z",fill:"var(--primary-interaction-default)"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_2300_5309",children:e.jsx("rect",{width:"26",height:"26",fill:"white",transform:"translate(50 50)"})})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-xs",children:[e.jsx("p",{className:"cursor-pointer text-primary-foreground-low",children:o||"Select a file"}),e.jsx("p",{className:"text-neutral-foreground-low",children:d})]})]}),C&&e.jsx("div",{className:g("flex gap-sm items-center justify-center",h&&tt.blurred),children:H??e.jsxs("div",{className:"flex flex-col items-center gap-xs",children:[e.jsx("span",{className:g("material-symbols-rounded text-neutral-foreground-low",w),children:"draft"}),e.jsxs("div",{className:"flex items-center gap-xs",children:[e.jsx("p",{className:g(V,"text-neutral-foreground-low truncate max-w-[96px]"),children:$}),!i&&e.jsx("span",{className:g("material-symbols-rounded cursor-pointer text-neutral-interaction-default hover:text-danger-interaction-default",D),onClick:R,"aria-label":"Remove file",children:"delete"})]})]})})]}),c&&a&&e.jsx("p",{className:tt.errorMessage,children:a}),r&&e.jsx("p",{className:tt.infoMessage,children:r})]})}Xn.Preview=Yn;const Ge={categoryHeader:"_categoryHeader_avnzh_2",categoryContent:"_categoryContent_avnzh_2",collapsed:"_collapsed_avnzh_2",chevron:"_chevron_avnzh_2",expanded:"_expanded_avnzh_2",subOption:"_subOption_avnzh_2",subOptionLabel:"_subOptionLabel_avnzh_2",actions:"_actions_avnzh_2",searchBox:"_searchBox_avnzh_2",searchInput:"_searchInput_avnzh_2",searchClear:"_searchClear_avnzh_2"};function fr({value:t,defaultValue:s,onChange:n,onApply:o,options:a=[],labelKey:r="label",valueKey:l="value",disabled:i=!1,searchable:c=!1,searchLabel:d="Search...",labelValue:f="",clearLabel:p="Clear selection",applyLabel:m="Apply filters",statusLabel:b="Status",isError:v=!1,errorMessage:x="",className:h}){const[y,_]=xe({value:t,defaultValue:s??{},onChange:n}),[C,$]=u.useState(!1),[B,R]=u.useState({}),[k,w]=u.useState(""),D=y??{};function V(O){return $e(O)?O[l]:String(O)}function H(O){return $e(O)?O[r]:String(O??"")}function L(O){return $e(O)?O[l]:O}function E(O){R(re=>({...re,[O]:!re[O]}))}function T(O,re){const be=D[O]??[],ee=L(re);return be.some(me=>L(me)===ee)}function P(O,re){if(i)return;const be=V(O),ee=[...D[be]??[]],me=L(re),_e=ee.findIndex(se=>L(se)===me);_e!==-1?ee.splice(_e,1):ee.push(me);const Se={...D,[be]:ee};_(Se)}function K(){_({})}function Z(){o?.(D)}const W=Object.values(D).reduce((O,re)=>O+(Array.isArray(re)?re.length:0),0),ue=k.toLowerCase(),ie=c&&k?a.map(O=>{const re=H(O).toLowerCase(),be=O.options.filter(ee=>H(ee).toLowerCase().includes(ue));return re.includes(ue)||be.length>0?{...O,options:re.includes(ue)?O.options:be}:null}).filter(Boolean):a,j=e.jsxs("div",{className:"w-full",children:[c&&e.jsxs("div",{className:Ge.searchBox,children:[e.jsx(oe,{name:"search",className:"text-lg text-neutral-foreground-low"}),e.jsx("input",{type:"text",className:Ge.searchInput,placeholder:d,value:k,onChange:O=>w(O.target.value)}),k&&e.jsx("button",{className:Ge.searchClear,onClick:()=>w(""),"aria-label":"Clear search",type:"button",children:e.jsx(oe,{name:"close",className:"text-base"})})]}),ie.map(O=>{const re=V(O),ee=c&&!!k||!!B[re],me=(D[re]??[]).length;return e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:Ge.categoryHeader,onClick:()=>E(re),role:"button",tabIndex:0,onKeyDown:_e=>{(_e.key===" "||_e.key==="Enter")&&E(re)},children:[e.jsx("span",{className:"text-sm text-neutral-interaction-default",children:H(O)}),e.jsxs("div",{className:"flex items-center gap-xs",children:[me>0&&e.jsx("span",{className:"flex items-center justify-center text-neutral-foreground-negative bg-primary-interaction-selected text-xs w-[1.6em] h-[1.6em] rounded-full",children:me}),e.jsx(oe,{name:"expand_more",className:g(Ge.chevron,{[Ge.expanded]:ee})})]})]}),e.jsx("div",{className:g(Ge.categoryContent,{[Ge.collapsed]:!ee}),style:{maxHeight:ee?"400px":"0"},children:e.jsx("ul",{className:"flex flex-col",children:O.options.map((_e,Se)=>e.jsxs("div",{className:Ge.subOption,role:"option","aria-selected":T(re,_e),onClick:()=>P(O,_e),children:[e.jsx(dt,{value:T(re,_e),className:"pointer-events-none"}),e.jsx("span",{className:Ge.subOptionLabel,children:H(_e)})]},Se))})})]},re)})]}),U=e.jsx("span",{className:"font-bold text-neutral-interaction-default",children:W>0?`${b}: ${W}`:b}),I=e.jsxs("div",{className:Ge.actions,children:[e.jsx(Be,{variant:"plain",size:"small",disabled:W===0,onClick:K,children:p}),e.jsx(Be,{size:"small",disabled:W===0,onClick:Z,children:m})]});return e.jsx(Ot,{value:C,onChange:O=>$(O),labelValue:f,disabled:i,isError:v,errorMessage:x,dontHaveMaxHeight:!0,minWidth:"22em",content:j,actions:I,className:g("filter",h),children:U})}const Ve={history:"_history_57k37_2",flex:"_flex_57k37_2",option:"_option_57k37_2",disabled:"_disabled_57k37_2",firstOption:"_firstOption_57k37_2",dataList:"_dataList_57k37_2",circle:"_circle_57k37_2",lastOption:"_lastOption_57k37_2",customBorder:"_customBorder_57k37_2",roundIcon:"_roundIcon_57k37_2",icon:"_icon_57k37_2",primary:"_primary_57k37_2",info:"_info_57k37_2",success:"_success_57k37_2",warning:"_warning_57k37_2",danger:"_danger_57k37_2",neutral:"_neutral_57k37_2",active:"_active_57k37_2",circleIcon:"_circleIcon_57k37_2",right:"_right_57k37_2",left:"_left_57k37_2",top:"_top_57k37_2",haveIcon:"_haveIcon_57k37_2",bottom:"_bottom_57k37_2"};function mr({value:t,defaultValue:s,onChange:n,options:o,position:a="right",type:r="primary",disabled:l=!1,renderOption:i,className:c}){const[d,f]=xe({value:t,defaultValue:s??null,onChange:n}),p=(b,v)=>v===0&&!d&&!l||b===d,m=a==="top"||a==="bottom";return e.jsx("div",{className:g(Ve.history,m&&Ve.flex,c),children:o.map((b,v)=>{const x=p(b,v),h=b.type??r,y=v===0,_=!o[v+1],C=!!b.icon,$=C&&!b.isIconRound,B=C&&b.isIconRound;return e.jsxs("div",{className:g(Ve.option,Ve[a],Ve[h],y&&Ve.firstOption,_&&Ve.lastOption,x&&Ve.active,l&&Ve.disabled),onClick:()=>!l&&f(b),children:[e.jsx("div",{className:g(Ve.circle,$&&Ve.circleIcon,B&&Ve.roundIcon),children:C&&e.jsx(oe,{name:b.icon,filled:!b.unfilled,className:Ve.icon})}),e.jsx("div",{className:g(Ve.customBorder,$&&Ve.haveIcon)}),e.jsx("div",{className:Ve.dataList,children:i?.(b,v,x)})]},v)})})}const ft={iconCard:"_iconCard_1d25o_2",iconContainer:"_iconContainer_1d25o_2",roundIcon:"_roundIcon_1d25o_2",cardTitle:"_cardTitle_1d25o_2"};function Zn({children:t}){return e.jsx(e.Fragment,{children:t})}function Jn({title:t="",icon:s="",color:n="",isIconRound:o=!1,children:a,className:r}){const l=[],i=[];return u.Children.forEach(a,c=>{u.isValidElement(c)&&c.type===Zn?l.push(c):i.push(c)}),e.jsxs("div",{className:g(ft.iconCard,r),children:[e.jsx("div",{className:g(ft.iconContainer,o&&ft.roundIcon,n&&ft.coloredBackground,n&&o&&ft.coloredText),style:n?{background:o?void 0:n,color:o?n:void 0}:void 0,children:e.jsx(oe,{name:s,filled:o})}),e.jsxs(pt,{className:"p-lg",children:[e.jsxs("header",{className:"flex justify-between",children:[e.jsx("h4",{className:g(ft.cardTitle,n&&ft.coloredText),style:n?{color:n}:void 0,children:t}),l]}),i]})]})}Jn.TitleActions=Zn;const Fe={image:"_image_74lyr_2",imageContent:"_imageContent_74lyr_2",imagePreviewOverlay:"_imagePreviewOverlay_74lyr_2",imagePreviewOverlayVisible:"_imagePreviewOverlayVisible_74lyr_2",imagePreviewOverlayContent:"_imagePreviewOverlayContent_74lyr_2",backdrop:"_backdrop_74lyr_2",backdropActive:"_backdropActive_74lyr_2",previewModal:"_previewModal_74lyr_2",imagePreviewContainer:"_imagePreviewContainer_74lyr_2",previewImageActive:"_previewImageActive_74lyr_2",imagePreviewToolbar:"_imagePreviewToolbar_74lyr_2",toolbarActive:"_toolbarActive_74lyr_2",imagePreview:"_imagePreview_74lyr_2",tool:"_tool_74lyr_2"};function hr({src:t,alt:s,width:n,height:o,icon:a="visibility",preview:r=!1,className:l,onShow:i,onHide:c}){const[d,f]=u.useState(!1),[p,m]=u.useState(!1),[b,v]=u.useState(0),[x,h]=u.useState(1),{isMounted:y,isActive:_}=Je(p,{duration:150}),C={};n&&(C.width=typeof n=="number"?`${n}px`:n),o&&(C.height=typeof o=="number"?`${o}px`:o);const $={transform:`rotate(${b}deg) scale(${x})`,transition:"transform 0.15s"};function B(){m(!0),document.body.style.overflow="hidden",i?.()}function R(){m(!1),document.body.style.overflow="",v(0),h(1),c?.()}function k(){v(T=>T-90)}function w(){v(T=>T+90)}function D(){h(T=>Math.min(T+.1,1.5))}function V(){h(T=>Math.max(T-.1,.5))}u.useEffect(()=>{function T(P){p&&P.code==="Escape"&&R()}return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[p]),u.useEffect(()=>()=>{document.body.style.overflow=""},[]);const H=[{icon:"rotate_left",label:"Rotate Left",disabled:!1,onClick:k},{icon:"rotate_right",label:"Rotate Right",disabled:!1,onClick:w},{icon:"zoom_out",label:"Zoom Out",disabled:x<=.5,onClick:V},{icon:"zoom_in",label:"Zoom In",disabled:x>=1.5,onClick:D},{icon:"close",label:"Close",disabled:!1,onClick:R}],L=u.useRef(null);function E(T){T.target===L.current&&R()}return e.jsxs("span",{className:g(Fe.image,l),onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[e.jsx("img",{src:t,alt:s,style:C,className:Fe.imageContent}),r&&e.jsx("div",{className:g(Fe.imagePreviewOverlay,d&&Fe.imagePreviewOverlayVisible),onClick:B,children:e.jsx("div",{className:Fe.imagePreviewOverlayContent,children:e.jsx(oe,{name:a})})}),y&&jt.createPortal(e.jsxs("div",{ref:L,className:g(Fe.backdrop,_&&Fe.backdropActive),onClick:E,children:[e.jsx("div",{className:g(Fe.previewModal,Fe.imagePreviewContainer,_&&Fe.previewImageActive),children:e.jsx("img",{src:t,alt:s,style:$,className:Fe.imagePreview})}),e.jsx("div",{className:g(Fe.previewModal,Fe.imagePreviewToolbar,_&&Fe.toolbarActive),role:"dialog","aria-modal":!0,children:H.map(T=>e.jsx(Be,{icon:T.icon,"aria-label":T.label,disabled:T.disabled,className:Fe.tool,color:"neutral",variant:"plain",round:!0,onClick:T.onClick},T.icon))})]}),document.body)]})}const pr={skeleton:"_skeleton_1tqah_2"};function vt({className:t}={}){return e.jsx("div",{className:g(pr.skeleton,t)})}const Ee={metricCard:"_metricCard_1rh9k_2",headerRow:"_headerRow_1rh9k_2",contentRow:"_contentRow_1rh9k_2",primary:"_primary_1rh9k_2",infoLabel:"_infoLabel_1rh9k_2",info:"_info_1rh9k_2",informative:"_informative_1rh9k_2",success:"_success_1rh9k_2",warning:"_warning_1rh9k_2",danger:"_danger_1rh9k_2",dashed:"_dashed_1rh9k_2",secondary:"_secondary_1rh9k_2",cardTitle:"_cardTitle_1rh9k_2",cardValue:"_cardValue_1rh9k_2","info-primary":"_info-primary_1rh9k_2","info-informative":"_info-informative_1rh9k_2","info-info":"_info-info_1rh9k_2","info-success":"_info-success_1rh9k_2","info-warning":"_info-warning_1rh9k_2","info-danger":"_info-danger_1rh9k_2","info-neutral":"_info-neutral_1rh9k_2",small:"_small_1rh9k_2",cardDescription:"_cardDescription_1rh9k_2",infoIcon:"_infoIcon_1rh9k_2",infoText:"_infoText_1rh9k_2",skeleton:"_skeleton_1rh9k_2",header:"_header_1rh9k_2",contentSkeleton:"_contentSkeleton_1rh9k_2",medium:"_medium_1rh9k_2",large:"_large_1rh9k_2",bold:"_bold_1rh9k_2"};function Kn({children:t}){return e.jsx(e.Fragment,{children:t})}function zt({title:t="",description:s="",value:n="",icon:o="",color:a="neutral",type:r="default",size:l="medium",infoMessage:i="",infoType:c="neutral",tooltipMinWidth:d="none",loading:f=!1,noTooltip:p=!1,boldTitle:m=!1,titleSlot:b,valueSlot:v,descriptionSlot:x,content:h,info:y,children:_,className:C}){const $=[],B=[];u.Children.forEach(_,w=>{u.isValidElement(w)&&w.type===Kn?$.push(w):B.push(w)});const R=x||($.length>0?$:null),k=(t||o||b)&&!f;return e.jsxs(pt,{className:g(Ee.metricCard,Ee[r],Ee[a],Ee[l],C),children:[k?e.jsxs("div",{className:Ee.headerRow,children:[o&&e.jsx(oe,{name:o,className:Ee.icon}),b||e.jsx("p",{className:g(Ee.cardTitle,m&&Ee.bold),children:t}),y||i&&(p?e.jsx("p",{className:g(Ee.infoText,Ee.infoLabel,Ee[`info-${c}`]),children:i}):e.jsx(Ye,{labelValue:i,children:e.jsx(oe,{name:"info",className:g(Ee.infoIcon,Ee.infoLabel,Ee[`info-${c}`])})}))]}):f?e.jsx(vt,{className:g(Ee.skeleton,Ee.header)}):null,f?e.jsx(vt,{className:g(Ee.skeleton,Ee.contentSkeleton)}):h||e.jsxs("div",{className:Ee.contentRow,children:[v||e.jsx("p",{className:Ee.cardValue,children:n}),R||e.jsx("p",{className:Ee.cardDescription,children:s})]}),!f&&B]})}zt.TitleSlot=function({children:s}){return e.jsx(e.Fragment,{children:s})},zt.Content=function({children:s}){return e.jsx(e.Fragment,{children:s})},zt.DescriptionSlot=Kn;const ct={navbar:"_navbar_13gv0_2",left:"_left_13gv0_2",right:"_right_13gv0_2",logoSection:"_logoSection_13gv0_2",title:"_title_13gv0_2",divider:"_divider_13gv0_2",notificationButton:"_notificationButton_13gv0_2",avatarWrapper:"_avatarWrapper_13gv0_2"};function _r(){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"41",height:"40",viewBox:"0 0 41 40",fill:"none",children:[e.jsx("path",{d:"M40.5 20C40.5 8.95431 31.5457 0 20.5 0C9.4543 0 0.5 8.95431 0.5 20C0.5 31.0457 9.4543 40 20.5 40C31.5457 40 40.5 31.0457 40.5 20Z",fill:"url(#paint0_linear_navbar)"}),e.jsx("path",{d:"M38.1604 20.0001C38.1604 10.2455 30.2528 2.33789 20.4982 2.33789C10.7436 2.33789 2.83594 10.2455 2.83594 20.0001C2.83594 29.7547 10.7436 37.6624 20.4982 37.6624C30.2528 37.6624 38.1604 29.7547 38.1604 20.0001Z",stroke:"#FAFAFA",strokeWidth:"2.40312",strokeMiterlimit:"10"}),e.jsx("defs",{children:e.jsxs("linearGradient",{id:"paint0_linear_navbar",x1:"34.6407",y1:"5.85756",x2:"6.35756",y2:"34.1424",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#97D991"}),e.jsx("stop",{offset:"0.11",stopColor:"#92D691"}),e.jsx("stop",{offset:"0.22",stopColor:"#86D091"}),e.jsx("stop",{offset:"0.33",stopColor:"#74C691"}),e.jsx("stop",{offset:"0.42",stopColor:"#6DC192"}),e.jsx("stop",{offset:"0.55",stopColor:"#5CB597"}),e.jsx("stop",{offset:"0.66",stopColor:"#47A79E"}),e.jsx("stop",{offset:"0.74",stopColor:"#3B9C98"}),e.jsx("stop",{offset:"0.89",stopColor:"#1E7F88"}),e.jsx("stop",{offset:"1",stopColor:"#02657A"})]})})]})}function gr({options:t=[],value:s,onChange:n,logo:o,title:a,profile:r,notifications:l,showNotifications:i=!0,actions:c,children:d,className:f}){return e.jsxs("nav",{className:g(ct.navbar,f),role:"navigation",children:[e.jsxs("div",{className:ct.left,children:[e.jsxs("div",{className:ct.logoSection,children:[o||e.jsx(_r,{}),a&&e.jsx("span",{className:ct.title,children:a})]}),e.jsx("div",{className:ct.divider}),d||e.jsx(Ht,{options:t,value:s,onChange:n})]}),e.jsx("div",{className:ct.right,children:c||e.jsxs(e.Fragment,{children:[i&&e.jsx(xt,{card:l,children:e.jsx("button",{className:ct.notificationButton,type:"button","aria-label":"Notifications",children:e.jsx(oe,{name:"notifications"})})}),e.jsx("div",{className:ct.avatarWrapper,children:e.jsx(Bt,{name:r?.name,src:r?.src})})]})})]})}const nt={pagination:"_pagination_t8vwo_2",pageButton:"_pageButton_t8vwo_2",active:"_active_t8vwo_2",ellipsis:"_ellipsis_t8vwo_2",navButton:"_navButton_t8vwo_2",navIcon:"_navIcon_t8vwo_2"};function xr(t,s){const n=[];if(s<1)return n;for(let o=1;o<=s;o++)o===1||o===s||t===1&&o<4||t===s&&o>=s-2||t-1===o||t+1===o||t===o?n.push(o):(t<=s-2&&o===s-1&&s>3||t>2&&s>3&&o===2)&&n.push(-1);for(let o=0;o<2;o++){const a=n.findIndex(r=>r===-1);a!==-1&&n[a+1]-n[a-1]===2&&(n[a]=n[a-1]+1)}return n}function Qn({value:t,defaultValue:s,onChange:n,length:o,className:a}){const[r,l]=xe({value:t,defaultValue:s??1,onChange:n});if(u.useEffect(()=>{r!==void 0&&o>=1&&r>o&&l(o)},[o]),o<1)return null;const i=xr(r??1,o),c=r??1;return e.jsxs("div",{className:g(nt.pagination,a),children:[e.jsx("button",{className:nt.navButton,disabled:c===1,onClick:()=>l(c-1),"aria-label":"Previous page",children:e.jsx(oe,{name:"chevron_left",className:g(nt.navIcon)})}),e.jsx("div",{className:"flex",children:i.map((d,f)=>e.jsx("div",{className:"flex gap-xs",children:d===-1?e.jsx("button",{className:g(nt.pageButton,nt.ellipsis),disabled:!0,children:"..."}):e.jsx("button",{className:g(nt.pageButton,d===c&&nt.active),onClick:()=>l(d),children:d})},`${d}-${f}`))}),e.jsx("button",{className:nt.navButton,disabled:c===o,onClick:()=>l(c+1),"aria-label":"Next page",children:e.jsx(oe,{name:"chevron_right",className:g(nt.navIcon)})})]})}const It={pinInput:"_pinInput_1l2sp_2",field:"_field_1l2sp_2",filled:"_filled_1l2sp_2",separator:"_separator_1l2sp_2",disabled:"_disabled_1l2sp_2"},br=u.forwardRef(function({value:s,defaultValue:n,onChange:o,onComplete:a,length:r=6,disabled:l=!1,placeholder:i,separator:c,type:d="text",otp:f=!1,className:p},m){const b=s!==void 0,[v,x]=u.useState(()=>{const k=b?s:n??"";return Array.from({length:r},(w,D)=>k?.[D]??"")}),h=u.useRef([]);u.useEffect(()=>{b&&s!==void 0&&x(Array.from({length:r},(k,w)=>s[w]??""))},[s,b,r]);const y=u.useRef("");u.useEffect(()=>{const k=v.join("");k!==y.current&&(y.current=k,o?.(k),k.length===r&&v.every(w=>w!=="")&&a?.(k))},[v,r,o,a]),u.useImperativeHandle(m,()=>({focus:()=>{const k=v.findIndex(w=>!w);h.current[k!==-1?k:0]?.focus()},clear:()=>{x(Array(r).fill("")),h.current[0]?.focus()}}));function _(k,w){const D=[...v];return D[k]=w,x(D),D}function C(k,w){const V=k.target.value.slice(-1);_(w,V),V&&w<r-1&&h.current[w+1]?.focus()}function $(k,w){if(k.key==="Backspace")if(!v[w]&&w>0){const D=h.current[w-1];D&&(D.focus(),D.select())}else _(w,"");else k.key==="ArrowLeft"&&w>0?(k.preventDefault(),h.current[w-1]?.focus()):k.key==="ArrowRight"&&w<r-1&&(k.preventDefault(),h.current[w+1]?.focus())}async function B(k,w){k.preventDefault();let D;try{D=await navigator.clipboard.readText()}catch{D=k.clipboardData.getData("text")}const V=[...v];D.split("").slice(0,r-w).forEach((E,T)=>{V[w+T]=E}),x(V);const H=V.reduce((E,T,P)=>T?P:E,w),L=Math.min(H+1,r-1);h.current[L]?.focus()}function R(k){k.target.select()}return e.jsx("div",{className:g(It.pinInput,p),children:Array.from({length:r},(k,w)=>e.jsxs(u.Fragment,{children:[c!==void 0&&w>0&&w%c===0&&e.jsx("span",{className:It.separator,children:"-"}),e.jsx("input",{ref:D=>{h.current[w]=D},className:g(It.field,v[w]&&It.filled,l&&It.disabled),value:v[w]||"",onChange:D=>C(D,w),onKeyDown:D=>$(D,w),onPaste:D=>B(D,w),onFocus:R,type:d,inputMode:"numeric",maxLength:1,placeholder:i,disabled:l,autoComplete:f?"one-time-code":void 0})]},w))})}),ze={profile:"_profile_19nii_2",absolute:"_absolute_19nii_2",dropdown:"_dropdown_19nii_2",disabled:"_disabled_19nii_2",trigger:"_trigger_19nii_2",profileOption:"_profileOption_19nii_2",profileOptionAction:"_profileOptionAction_19nii_2",searchIcon:"_searchIcon_19nii_2",inputDefault:"_inputDefault_19nii_2"};function es(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function vr({value:t,defaultValue:s,onChange:n,name:o,picture:a,options:r=[],labelKey:l="label",valueKey:i="value",absolute:c=!1,disabled:d=!1,getObject:f=!1,className:p,editLabel:m="Edit profile",editOptionLabel:b="Edit account",logoutLabel:v="Logout",privacyPolicyLabel:x="Privacy Policy",termsOfUseLabel:h="Terms of use",onLogout:y,onEdit:_,onEditOption:C,onPrivacyPolicy:$,onTermsOfUse:B,renderOption:R}){const[k,w]=xe({value:t,defaultValue:s,onChange:n}),[D,V]=u.useState(!1),[H,L]=u.useState(""),[E,T]=u.useState(!1),P=u.useRef(null);u.useEffect(()=>{function I(O){P.current&&!P.current.contains(O.target)&&V(!1)}return document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)}},[]);function K(I){return es(I)?String(I[l]??""):String(I??"")}function Z(I){return es(I)?I[i]:I}const W=r.find(I=>String(Z(I))===String(Z(k))),ue=H?r.filter(I=>K(I).toLowerCase().includes(H.toLowerCase())):r;function ie(I){V(!1);const O=f?I:Z(I);w(O)}function j(){d||V(I=>!I)}const U=k&&W&&K(W)||o;return e.jsxs("div",{ref:P,className:g(ze.profile,c&&ze.absolute,d&&ze.disabled,p),children:[!D&&e.jsxs("div",{className:g(ze.trigger,"flex items-center gap-xs text-2xl mr-xxs text-neutral-interaction-default"),onClick:j,children:[e.jsx(Bt,{name:o,src:a,size:"small",alt:"profile picture"}),e.jsx("p",{className:"text-sm font-bold",children:U})]}),D&&e.jsxs("div",{className:ze.dropdown,children:[e.jsxs("div",{className:"flex flex-col items-center gap-xs text-9xl px-xs py-sm text-neutral-interaction-default",children:[e.jsx(Bt,{name:o,src:a,size:"large",alt:"profile picture"}),!!(k&&K(W)&&o)&&e.jsx("p",{className:"text-sm text-center",children:o}),(k&&K(W)||o)&&e.jsx("h4",{className:"text-3xl font-bold m-xxs text-center",children:U}),e.jsx(Be,{type:"submit",color:"primary",onClick:_,className:"m-xxs truncate",disabled:!o&&!a,children:m})]}),r&&r.length>0&&e.jsxs("div",{className:"flex flex-col items-center text-neutral-interaction-default",children:[e.jsxs("div",{className:"flex items-center w-full relative",children:[e.jsx(oe,{name:"search",className:g(ze.searchIcon,E&&"text-primary-interaction-default")}),e.jsx("input",{type:"search",value:H,onChange:I=>L(I.target.value),className:ze.inputDefault,onFocus:()=>T(!0),onBlur:()=>T(!1),placeholder:"Search"})]}),e.jsx("div",{className:g("w-full text-neutral-interaction-default",ue.length>4&&"pr-xxs py-xxs"),children:e.jsx("div",{className:"w-full flex flex-col divide-y-xxs divide-neutral-default font-bold max-h-[12em] overflow-auto custom-scroll",children:ue.map((I,O)=>{const re=JSON.stringify(k||{})===JSON.stringify(I||{});return e.jsx("div",{className:g(ze.profileOption,"justify-start w-full [&>*]:text-sm hover:bg-neutral-surface-highlight"),onClick:()=>ie(I),children:R?R({option:I,index:O,active:re}):e.jsx("p",{className:g("text-sm",re&&"[&>*]:underline"),children:K(I)})},O)})})})]}),e.jsxs("div",{className:g("flex flex-col divide-y-xxs divide-neutral-default",ue&&ue.length?"border-t-xxs border-t-neutral-default":""),children:[!!k&&e.jsxs("div",{className:g(ze.profileOption,ze.profileOptionAction,"text-neutral-interaction-default hover:bg-neutral-surface-highlight"),onClick:C,children:[e.jsx(oe,{name:"person",size:"xl"}),e.jsx("p",{className:"text-sm font-bold",children:b})]}),e.jsxs("div",{className:g(ze.profileOption,ze.profileOptionAction,"text-danger-interaction-default hover:bg-danger-surface-default"),onClick:y,children:[e.jsx(oe,{name:"logout",size:"xl"}),e.jsx("p",{className:"text-sm font-bold",children:v})]})]}),e.jsxs("div",{className:"flex items-center justify-center px-xs py-sm pt-xl text-neutral-interaction-default font-bold text-xxs gap-5 [&>*]:cursor-pointer",children:[e.jsx("p",{onClick:$,className:"hover:underline",children:x}),e.jsx("p",{onClick:B,className:"hover:underline",children:h})]})]})]})}const Me={progressBar:"_progressBar_1gm9u_2",stepBar:"_stepBar_1gm9u_2",step:"_step_1gm9u_2",small:"_small_1gm9u_2",progressLabel:"_progressLabel_1gm9u_2",progressIcon:"_progressIcon_1gm9u_2",medium:"_medium_1gm9u_2",large:"_large_1gm9u_2",progressHolder:"_progressHolder_1gm9u_2",progressFill:"_progressFill_1gm9u_2",filled:"_filled_1gm9u_2",neutralBg:"_neutralBg_1gm9u_2",info:"_info_1gm9u_2",success:"_success_1gm9u_2",warning:"_warning_1gm9u_2",danger:"_danger_1gm9u_2",neutral:"_neutral_1gm9u_2",indeterminate:"_indeterminate_1gm9u_2",query:"_query_1gm9u_2"};function Cr({value:t=0,size:s="medium",type:n="primary",color:o="",icon:a="",infoMessage:r="",steps:l=0,animationType:i,displayPercentage:c,neutralBackground:d=!1,iconSlot:f,className:p}){const[m,b]=u.useState(!1);u.useEffect(()=>{b(!0)},[]);const x=(()=>{let C=t*100;return l?C=t/l*100:i&&(C=50),Math.max(0,Math.min(100,C))+"%"})(),h=()=>!m||d||!o?"":lt(o),y=!i&&(a||f),_=e.jsx(e.Fragment,{children:f??e.jsx(oe,{name:a})});return l?e.jsx("div",{className:g(Me.stepBar,"flex flex-row gap-xs",Me[s],Me[n],d&&Me.neutralBg,p),children:Array.from({length:l},(C,$)=>$+1).map(C=>e.jsx("div",{className:g(Me.step,C<=t&&Me.filled,d&&Me.neutralBg),style:{background:C<=t?o:h(),width:`${100/l}%`}},C))}):e.jsxs("div",{className:g(Me.progressBar,Me[s],Me[n],d&&Me.neutralBg,p),style:{background:h()},children:[e.jsxs("div",{className:Me.progressHolder,children:[e.jsx("div",{className:g(Me.progressFill,Me[s],i&&Me[i]),style:{background:o,width:x},children:c==="bar"&&!i&&e.jsx("label",{className:Me.progressLabel,children:x})}),c==="center"&&!i&&e.jsx("label",{className:g(Me.progressLabel,"absolute"),children:x})]}),y&&(r?e.jsx(Ye,{className:Me.progressIcon,style:{left:x,color:o},labelValue:r,position:"bottom",children:_}):e.jsx("div",{className:Me.progressIcon,style:{left:x,color:o},children:_}))]})}const cn={radioGroup:"_radioGroup_166p9_2",horizontal:"_horizontal_166p9_2",vertical:"_vertical_166p9_2"},ts=u.createContext(null);function yr({value:t,defaultValue:s,onChange:n,vertical:o=!1,disabled:a=!1,options:r,labelKey:l="label",valueKey:i="value",getObject:c=!1,children:d,className:f}){const[p,m]=xe({value:t,defaultValue:s,onChange:n});function b(_){if(c&&r){const C=r.find($=>x($)===_);if(C!==void 0){m(C);return}}m(_)}function v(_){return $e(_)?_[l]:String(_)}function x(_){return $e(_)?_[i]:_}function h(_){return $e(_)?_.disabled??!1:!1}const y=c&&$e(p)?p[i]:p;return e.jsx(ts.Provider,{value:{selected:y,disabled:a,select:b},children:e.jsx("div",{className:g(cn.radioGroup,o?cn.vertical:cn.horizontal,f),children:r?r.map(_=>{const C=x(_);return e.jsx(ns,{groupValue:C,disabled:h(_),children:v(_)},C)}):d})})}const st={radio:"_radio_1gg7x_2",onboarding:"_onboarding_1gg7x_2",outerCircle:"_outerCircle_1gg7x_2",radioLabel:"_radioLabel_1gg7x_2",radioText:"_radioText_1gg7x_2",selected:"_selected_1gg7x_2",disabled:"_disabled_1gg7x_2",innerCircle:"_innerCircle_1gg7x_2",innerCircleActive:"_innerCircleActive_1gg7x_2"};function ns({id:t,name:s,value:n,defaultValue:o,onChange:a,groupValue:r,disabled:l,variant:i="default",children:c,className:d}){const f=u.useContext(ts),[p,m]=xe({value:f&&r!==void 0?void 0:n,defaultValue:f&&r!==void 0?void 0:o??!1,onChange:f&&r!==void 0?void 0:a}),b=f!==null&&r!==void 0,v=b?f.selected===r:p??!1,x=(f?.disabled??!1)||(l??!1);function h(){x||(b?f.select(r):m(!0))}const y=c?t||s?e.jsx("label",{htmlFor:t||s,className:g(st.radioLabel,"cursor-[inherit]"),children:c}):e.jsx("div",{className:st.radioText,children:c}):null;return e.jsxs("div",{id:t,role:"radio","aria-checked":v,"aria-disabled":x,className:g(st.radio,st[i],v&&st.selected,x&&st.disabled,d),onClick:h,children:[e.jsx("span",{tabIndex:0,className:st.outerCircle,onKeyUp:_=>{_.key===" "&&h()},children:e.jsx("span",{className:g(st.innerCircle,v&&st.innerCircleActive)})}),y]})}const Ct={optionContent:"_optionContent_dkzu4_2",displayLabel:"_displayLabel_dkzu4_2",selectCount:"_selectCount_dkzu4_2"};function un({value:t,defaultValue:s,onChange:n,options:o=[],labelKey:a="label",valueKey:r="value",multiple:l=!1,searchable:i=!1,clearable:c=!1,disabled:d=!1,labelValue:f="",getObject:p=!1,isError:m=!1,errorMessage:b="",infoMessage:v="",required:x=!1,placeholder:h,secondary:y=!1,icon:_,expanded:C,onExpandedChange:$,renderSearchLabel:B,renderOption:R,renderStatus:k,renderStatusLabel:w,renderActions:D,renderClearLabel:V,children:H,className:L}){const E=l?Array.isArray(s)?s:s!=null?[s]:[]:Array.isArray(s)?s[0]:s??null,[T,P]=xe({value:t,defaultValue:E,onChange:n}),[K,Z]=u.useState(""),[W,ue]=xe({value:C,defaultValue:!1,onChange:$}),[ie,j]=u.useState(-1);function U(Q){return $e(Q)?Q[a]:String(Q??"")}function I(Q){return $e(Q)?Q[r]:Q}function O(Q){return l?(Array.isArray(T)?T:[]).some(ye=>I(ye)===I(Q)):I(T)===I(Q)}function re(Q){if(d)return;const de=p?Q:I(Q);if(l){const ye=Array.isArray(T)?[...T]:[],N=ye.findIndex(G=>I(G)===I(Q));N!==-1?ye.splice(N,1):ye.push(de),P(ye)}else P(de),ue(!1),j(-1)}function be(){P(l?[]:null)}const ee=i&&K?o.filter(Q=>U(Q).toLowerCase().includes(K.toLowerCase())):o;function me(){if(l){const de=Array.isArray(T)?T:[];return de.length===0?"":de.map(ye=>{const N=o.find(G=>I(G)===I(ye));return U(N||ye)}).join(", ")}if(T==null)return"";const Q=o.find(de=>I(de)===I(T));return U(Q||T)}const _e=me(),Se=l?Array.isArray(T)&&T.length>0:T!=null;function se(Q){if(!d)switch(Q.key){case"ArrowDown":Q.preventDefault(),W?j(de=>de<ee.length-1?de+1:de):(ue(!0),j(0));break;case"ArrowUp":Q.preventDefault(),W?j(de=>de>0?de-1:de):(ue(!0),j(ee.length-1));break;case"Home":Q.preventDefault(),W&&ee.length>0&&j(0);break;case"End":Q.preventDefault(),W&&ee.length>0&&j(ee.length-1);break;case"Enter":Q.preventDefault(),W&&ie>=0&&ie<ee.length&&re(ee[ie]);break;case"Escape":Q.preventDefault(),ue(!1),j(-1);break}}function Y(Q){ue(Q),Q||j(-1)}const z=typeof H=="function",le=z?void 0:H,ce=l&&Array.isArray(T)&&T.length>0&&!d&&(!W&&i||!i);let fe;(!W||!i)&&(Se&&k?fe=k(T,o):ce?fe=w?w(T.length):e.jsx("span",{className:"font-bold",children:"Selected"}):_e&&!l?fe=e.jsx("span",{className:Ct.displayLabel,children:_e}):Se||(le?fe=e.jsx("span",{className:g(Ct.displayLabel,"text-neutral-foreground-low"),children:le}):h&&(fe=e.jsx("span",{className:g(Ct.displayLabel,"text-neutral-foreground-low"),children:h}))));function F(Q,de){const ye=O(Q);return z?H(Q,de,ye):R?R(Q,ye):e.jsx("span",{children:U(Q)})}const X=ee.map((Q,de)=>e.jsxs(Jt,{selected:!l&&O(Q),disabled:Q?.disabled,secondary:y,noHover:l,className:g(Ct.optionContent,de===ie&&Ct.highlighted),onClick:()=>re(Q),children:[l&&e.jsx(dt,{value:O(Q),className:"pointer-events-none"}),F(Q,de)]},de)),ae=D?D():c?e.jsx(Be,{variant:"plain",size:"small",onClick:be,children:V?V():"Clear"}):void 0,Ne=ce&&l?e.jsx("span",{className:Ct.selectCount,children:T.length}):void 0;return e.jsx("div",{onKeyDown:se,children:e.jsx(Ot,{value:W,onChange:Y,labelValue:f,disabled:d,isError:m,errorMessage:b,infoMessage:v,required:x,secondary:y,options:X,actions:ae,complement:Ne,className:g("select",L),children:e.jsx(zn,{value:K,onChange:Q=>Z(Q),expanded:W,onExpandedChange:Q=>Y(Q),searchable:i,disabled:d,isError:m,secondary:y,icon:_,searchLabel:B?B():void 0,status:fe,options:Se?o:void 0})})})}const Ce={richTextEditor:"_richTextEditor_zftxo_2",noBorder:"_noBorder_zftxo_2",toolbar:"_toolbar_zftxo_2",toolbarGroup:"_toolbarGroup_zftxo_2",toolbarBtn:"_toolbarBtn_zftxo_2",toolbarBtnActive:"_toolbarBtnActive_zftxo_2",editorContent:"_editorContent_zftxo_2",focus:"_focus_zftxo_2",disabled:"_disabled_zftxo_2",error:"_error_zftxo_2",errorMessage:"_errorMessage_zftxo_2",colorPicker:"_colorPicker_zftxo_2",customColorPicker:"_customColorPicker_zftxo_2",colorColumn:"_colorColumn_zftxo_2",colorGrid:"_colorGrid_zftxo_2",colorRow:"_colorRow_zftxo_2",customRole:"_customRole_zftxo_2",colorOption:"_colorOption_zftxo_2",colorDivider:"_colorDivider_zftxo_2",addColorBtn:"_addColorBtn_zftxo_2",customColorActions:"_customColorActions_zftxo_2",imageInput:"_imageInput_zftxo_2",linkDialogContent:"_linkDialogContent_zftxo_2",linkInput:"_linkInput_zftxo_2",linkDialogActions:"_linkDialogActions_zftxo_2"};function jr(t){let s=0,n=0,o=0;if(t.startsWith("rgb(")){const r=t.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);r&&(s=parseInt(r[1]),n=parseInt(r[2]),o=parseInt(r[3]))}else if(t.startsWith("hsl(")){const r=t.match(/hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)/);if(r){const l=parseInt(r[1])/360,i=parseInt(r[2])/100,c=parseInt(r[3])/100,d=(f,p,m)=>(m<0&&(m+=1),m>1&&(m-=1),m<1/6?f+(p-f)*6*m:m<1/2?p:m<2/3?f+(p-f)*(2/3-m)*6:f);if(i===0)s=n=o=c;else{const f=c<.5?c*(1+i):c+i-c*i,p=2*c-f;s=d(p,f,l+1/3),n=d(p,f,l),o=d(p,f,l-1/3)}s=Math.round(s*255),n=Math.round(n*255),o=Math.round(o*255)}}else if(t.startsWith("#")){const r=t.replace("#","");/^[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$/i.test(r)&&(s=parseInt(r.substring(0,2),16),n=parseInt(r.substring(2,4),16),o=parseInt(r.substring(4,6),16))}return(.299*s+.587*n+.114*o)/255<.5?"text-white":"text-black"}function ss({color:t,selected:s,onClick:n,className:o}){const a=jr(t);return e.jsx("div",{className:g(Ce.colorOption,o),style:{backgroundColor:t},onClick:()=>n?.(t),children:s&&e.jsx(oe,{name:"check",className:a})})}function wr(){const t=[],s=[];for(let r=10;r>=0;r--)s.push(lt("#000000",r/10));t.push(s);const n=["hsl(0, 100%, 50%)","hsl(30, 100%, 50%)","hsl(60, 100%, 50%)","hsl(90, 100%, 50%)","hsl(120, 100%, 50%)","hsl(150, 100%, 50%)","hsl(180, 100%, 50%)","hsl(210, 100%, 50%)","hsl(240, 100%, 50%)","hsl(270, 100%, 50%)","hsl(300, 100%, 50%)"];t.push(n);const o=[];for(let r=0;r<3;r++){const l=[];n.forEach(i=>l.push(lt(i,r*.2+.2))),o.push(l)}t.push(...o);const a=[];for(let r=2;r>=0;r--){const l=[];n.forEach(i=>l.push(lt(i,r*.2+.2,[0,0,0]))),a.push(l)}return t.push(...a),t}function rs({value:t,expanded:s,custom:n,onValueChange:o,onExpandedChange:a,onCustomChange:r,children:l}){const[i,c]=u.useState(!1),[d,f]=u.useState(t),[p,m]=u.useState(!1);u.useEffect(()=>{m(!0)},[]);const b=p?wr():[];function v(y){o(y),f(y),a(!1)}function x(){o(d),n.includes(d)||r([...n,d]),setTimeout(()=>c(!1))}function h(){setTimeout(()=>c(!1))}return e.jsx(xt,{value:s,onChange:a,card:e.jsx("div",{className:g(Ce.colorPicker,i&&Ce.customColorPicker),children:i?e.jsxs(e.Fragment,{children:[e.jsx(en,{value:d,onChange:f,noShadow:!0}),e.jsxs("div",{className:Ce.customColorActions,children:[e.jsx(Be,{variant:"plain",color:"neutral",size:"small",onClick:h,children:"Cancel"}),e.jsx(Be,{size:"small",onClick:x,children:"Add"})]})]}):e.jsxs("div",{className:Ce.colorColumn,children:[e.jsx("div",{className:Ce.colorGrid,children:b.map((y,_)=>e.jsx("div",{className:Ce.colorRow,children:y.map(C=>e.jsx(ss,{color:C,selected:t===C,onClick:v},C))},_))}),e.jsx("hr",{className:Ce.colorDivider}),e.jsxs("div",{className:g(Ce.colorRow,Ce.customRole),children:[e.jsx("div",{className:Ce.addColorBtn,title:"Add custom color",onClick:()=>c(!0),children:e.jsx(oe,{name:"add_circle",className:"text-neutral-interactive-default cursor-pointer"})}),n.map(y=>e.jsx(ss,{color:y,selected:t===y,onClick:v},y))]})]})}),children:l})}const Nr=["b","i","u","strong","em","br","div","ul","ol","li","blockquote","a","img","span","font"],kr=["style","href","src","alt","title","color"],os=Array.from({length:10},(t,s)=>s*4+12);function as(t){const n=new DOMParser().parseFromString(t,"text/html"),o=document.createElement("div");for(const a of Array.from(n.body.childNodes)){const r=ls(a);r&&o.appendChild(r)}return o.innerHTML}function ls(t){if(t.nodeType===Node.TEXT_NODE)return t;if(t.nodeType!==Node.ELEMENT_NODE)return null;const s=t,n=s.tagName.toLowerCase();if(!Nr.includes(n))return document.createTextNode(s.textContent||"");const o=document.createElement(n);for(const a of Array.from(s.attributes))kr.includes(a.name)&&o.setAttribute(a.name,a.value);for(const a of Array.from(s.childNodes)){const r=ls(a);r&&o.appendChild(r)}return o}function Sr(t){return t.replace(/\s+/g," ").replace(/>\s+</g,"><").trim()}function $r({value:t,defaultValue:s,onChange:n,placeholder:o,disabled:a=!1,labelValue:r,errorMessage:l,hasError:i=!1,infoMessage:c,required:d=!1,minHeight:f="200px",maxHeight:p="400px",noBorder:m=!1,className:b}){const[v,x]=xe({value:t,defaultValue:s??"",onChange:n}),h=u.useRef(null),y=u.useRef(null),_=u.useRef([]),C=u.useRef(-1),$=u.useRef(!1),[B,R]=u.useState(!1),[k,w]=u.useState({}),[D,V]=u.useState(16),[H,L]=u.useState("#000000"),[E,T]=u.useState(!1),[P,K]=u.useState("#ffffff"),[Z,W]=u.useState(!1),[ue,ie]=u.useState([]),[j,U]=u.useState(!1),[I,O]=u.useState(""),[re,be]=u.useState(""),ee=u.useCallback(S=>{if($.current)return;const J=Sr(S);_.current[C.current]!==J&&(C.current<_.current.length-1&&(_.current=_.current.slice(0,C.current+1)),_.current.push(J),C.current=_.current.length-1,_.current.length>50&&(_.current.shift(),C.current--))},[]);function me(){try{const S=window.getSelection();if(!S||S.rangeCount===0)return;const J=S.getRangeAt(0);h.current?.contains(J.commonAncestorContainer)&&(y.current=J.cloneRange())}catch{y.current=null}}function _e(){try{const S=window.getSelection();if(!y.current||!h.current||!S)return;h.current.focus(),S.removeAllRanges();const J=y.current;if(h.current.contains(J.commonAncestorContainer))S.addRange(J);else{const he=document.createRange();he.setStart(h.current,0),he.collapse(!0),S.addRange(he)}}catch{y.current=null}}function Se(S){if(!h.current||!S||S.rangeCount===0)return!1;try{const J=S.getRangeAt(0);return h.current.contains(J.startContainer)&&h.current.contains(J.endContainer)&&h.current.contains(J.commonAncestorContainer)}catch{return!1}}const se=u.useCallback(()=>{w({bold:document.queryCommandState("bold"),italic:document.queryCommandState("italic"),underline:document.queryCommandState("underline"),strikeThrough:document.queryCommandState("strikeThrough"),insertUnorderedList:document.queryCommandState("insertUnorderedList"),insertOrderedList:document.queryCommandState("insertOrderedList"),justifyLeft:document.queryCommandState("justifyLeft"),justifyCenter:document.queryCommandState("justifyCenter"),justifyRight:document.queryCommandState("justifyRight"),justifyFull:document.queryCommandState("justifyFull")});const S=window.getSelection();if(!S||S.rangeCount===0||!h.current)return;let J=S.getRangeAt(0).startContainer,he=!1;for(;J&&J!==h.current;){if(J.nodeType===Node.ELEMENT_NODE){const ge=window.getComputedStyle(J),ke=parseInt(ge.fontSize),ve=os.find(Ie=>Math.abs(Ie-ke)<=1);if(ve){V(ve),he=!0;break}}J=J.parentNode}he||V(16)},[]);function Y(){if(!h.current)return;const S=getComputedStyle(h.current).getPropertyValue("--spacing-base");h.current.querySelectorAll("ul, ol").forEach(J=>{const he=J;he.style.listStyleType=J.tagName.toLowerCase()==="ul"?"disc":"decimal",he.style.paddingLeft=S,he.style.listStylePosition="outside"}),h.current.querySelectorAll("li").forEach(J=>{J.style.display="list-item",J.style.listStylePosition="outside"})}function z(S){if(!h.current||!S.length)return;const J=getComputedStyle(h.current),he=J.getPropertyValue("--border-width-sm"),ge=J.getPropertyValue("--primary-border-default"),ke=J.getPropertyValue("--primary-surface-default"),ve=J.getPropertyValue("--spacing-base"),Ie=J.getPropertyValue("--spacing-xxs"),Ze=J.getPropertyValue("--border-radius-sm");S.forEach(We=>{We.style.borderLeft=`${he} solid ${ge}`,We.style.fontStyle="italic",We.style.backgroundColor=ke,We.style.padding=ve,We.style.margin=`${Ie} 0`,We.style.borderRadius=`0 ${Ze} ${Ze} 0`,We.style.position="relative"})}function le(){requestAnimationFrame(()=>{if(!h.current)return;Y();const S=h.current.querySelectorAll("blockquote");S.length&&z(Array.from(S))})}u.useEffect(()=>{h.current&&(h.current.innerHTML=as(v??""),le(),ee(v??""))},[]),u.useEffect(()=>{!h.current||h.current.innerHTML===t||(h.current.innerHTML=as(t??""),le())},[t]);function ce(S,J){const he=window.getSelection();if(!(a||!h.current||!Se(he))){_e();try{document.execCommand(S,!1,J)}catch{}if(h.current?.focus(),se(),(S==="insertUnorderedList"||S==="insertOrderedList")&&setTimeout(()=>Y()),h.current){const ge=h.current.innerHTML;x(ge),ee(ge)}}}function fe(S){if(a||!h.current)return;const J=typeof S=="object"?S.value:S;_e();const he=window.getSelection();if(!he||he.rangeCount===0)return;const ge=he.getRangeAt(0);if(ge.collapsed){const ve=document.createElement("span");ve.style.fontSize=J+"px",ve.textContent="",ge.insertNode(ve),ge.setStartAfter(ve),ge.collapse(!0)}else{const ve=ge.extractContents(),Ie=document.createElement("span");Ie.style.fontSize=J+"px",Ie.appendChild(ve),ge.insertNode(Ie),ge.selectNodeContents(Ie)}he.removeAllRanges(),he.addRange(ge),h.current.focus(),V(J);const ke=h.current.innerHTML;x(ke),ee(ke),se()}function F(S,J){if(!window.getSelection()||a||!h.current)return;_e();try{document.execCommand(J,!1,S)}catch{}h.current.focus();const ge=h.current.innerHTML;x(ge),ee(ge),se()}function X(){if(C.current<=0||!h.current)return;$.current=!0,C.current--;const S=_.current[C.current];h.current.innerHTML=S,x(S),$.current=!1,h.current.focus(),se()}function ae(){if(C.current>=_.current.length-1||!h.current)return;$.current=!0,C.current++;const S=_.current[C.current];h.current.innerHTML=S,x(S),$.current=!1,h.current.focus(),se()}function Ne(){if(a)return;me();const S=window.getSelection();S&&!S.isCollapsed&&B?be(S.toString()):be(""),U(!0)}function Q(){if(!(!I.trim()||!An(I.trim())))try{_e();const S=window.getSelection();if(!S||!h.current)return;let J;S.rangeCount===0?(J=document.createRange(),h.current.lastChild?J.setStartAfter(h.current.lastChild):J.setStart(h.current,0),J.collapse(!0)):J=S.getRangeAt(0);const he=document.createElement("a");he.href=I.trim(),he.target="_blank",he.rel="noopener noreferrer",he.textContent=re.trim()||I.trim(),J.collapsed||J.deleteContents(),J.insertNode(he),J.setStartAfter(he),J.collapse(!0),S.removeAllRanges(),S.addRange(J),U(!1),O(""),be(""),h.current.focus();const ge=h.current.innerHTML;x(ge),ee(ge),se()}catch{}}function de(S){const J=S.target.files;!J||!h.current||(Array.from(J).forEach(he=>{if(h.current)try{const ge=URL.createObjectURL(he);_e();const ke=window.getSelection();if(!ke)return;let ve;ke.rangeCount===0?(ve=document.createRange(),h.current.lastChild?ve.setStartAfter(h.current.lastChild):ve.setStart(h.current,0),ve.collapse(!0)):ve=ke.getRangeAt(0);const Ie=document.createElement("img"),Ze=getComputedStyle(h.current);Ie.src=ge,Ie.alt=he.name,Ie.style.maxWidth="100%",Ie.style.height="auto",Ie.style.borderRadius=Ze.getPropertyValue("--border-radius-sm"),Ie.style.margin=Ze.getPropertyValue("--spacing-base"),ve.collapsed||ve.deleteContents(),ve.insertNode(Ie),ve.setStartAfter(Ie),ve.collapse(!0),ke.removeAllRanges(),ke.addRange(ve),h.current.focus();const We=h.current.innerHTML;x(We),ee(We),se()}catch{}}),S.target.value="")}function ye(){if(a||!h.current)return;const S=window.getSelection();if(!(!S||S.rangeCount===0))try{const J=S.getRangeAt(0),he=J.startContainer.nodeType===Node.TEXT_NODE?J.startContainer.parentElement?.closest("blockquote"):J.startContainer?.closest?.("blockquote");if(he){const ke=he.parentNode;if(!ke)return;const ve=document.createElement("div");ve.innerHTML=he.innerHTML,ke.replaceChild(ve,he);const Ie=document.createRange();Ie.selectNodeContents(ve),S.removeAllRanges(),S.addRange(Ie)}else{const ke=document.createElement("blockquote");if(z([ke]),J.collapsed)ke.innerHTML="Type your quote here...";else{const Ie=J.extractContents();if(Ie.childNodes.length===1&&Ie.firstChild?.nodeType===Node.TEXT_NODE){const Ze=document.createElement("span");Ze.appendChild(Ie),ke.appendChild(Ze)}else ke.appendChild(Ie)}J.insertNode(ke);const ve=document.createRange();ve.selectNodeContents(ke),S.removeAllRanges(),S.addRange(ve)}h.current.focus();const ge=h.current.innerHTML;x(ge),ee(ge),se()}catch{}}function N(){if($.current||!h.current)return;const S=h.current.innerHTML;x(S),ee(S),se()}function G(S){if(!a){if(S.ctrlKey&&!S.shiftKey&&S.key==="z"){S.preventDefault(),X();return}if(S.ctrlKey&&(S.shiftKey&&S.key==="Z"||S.key==="y")){S.preventDefault(),ae();return}if(S.key==="Tab"){S.preventDefault();const J=window.getSelection();if(!J||J.rangeCount===0)return;const he=J.getRangeAt(0);let ge=he.startContainer,ke=!1;for(;ge&&ge!==h.current;){if(ge.nodeType===Node.ELEMENT_NODE){const ve=ge.tagName?.toLowerCase();if(["li","ul","ol"].includes(ve)){ke=!0;break}}ge=ge.parentNode}if(ke&&!S.shiftKey)document.execCommand("indent",!1);else if(ke&&S.shiftKey)document.execCommand("outdent",!1);else if(!S.shiftKey){const ve=document.createElement("span");ve.classList.add("tab"),ve.innerHTML=" ",he.deleteContents(),he.insertNode(ve),he.setStartAfter(ve)}}["Enter","Tab","Backspace"].includes(S.key)&&(N(),se())}}function M(){R(!0),se()}function A(){R(!1)}function q(S){if(a)return;const J=window.getSelection();Se(J)||S.preventDefault()}function ne(S,J,he,ge){return e.jsx(Ye,{position:"bottom",labelValue:he,children:e.jsx("button",{className:g(Ce.toolbarBtn,k[S]&&Ce.toolbarBtnActive),title:he,onMouseDown:ke=>{ke.preventDefault(),me()},onClick:()=>ge?ge():ce(S),children:e.jsx(oe,{name:J})},S)})}const we=g(Ce.richTextEditor,B&&Ce.focus,a&&Ce.disabled,i&&Ce.error,m&&Ce.noBorder,b);return e.jsxs("div",{className:we,children:[r&&e.jsx(gt,{labelValue:r,infoMessage:c,required:d,className:"mb-xxs"}),e.jsxs("div",{className:Ce.toolbar,children:[e.jsxs("div",{className:Ce.toolbarGroup,children:[e.jsx("button",{className:Ce.toolbarBtn,title:"Undo (Ctrl+Z)",disabled:C.current<=0,onMouseDown:S=>S.preventDefault(),onClick:X,children:e.jsx(oe,{name:"undo"})}),e.jsx("button",{className:Ce.toolbarBtn,title:"Redo (Ctrl+Y)",disabled:C.current>=_.current.length-1,onMouseDown:S=>S.preventDefault(),onClick:ae,children:e.jsx(oe,{name:"redo"})})]}),e.jsx("div",{className:Ce.toolbarGroup,children:e.jsx(un,{value:D,onChange:fe,options:os.map(S=>({label:String(S),value:S})),disabled:a})}),e.jsxs("div",{className:Ce.toolbarGroup,children:[ne("bold","format_bold","Bold (Ctrl+B)"),ne("italic","format_italic","Italic (Ctrl+I)"),ne("underline","format_underlined","Underline (Ctrl+U)"),ne("strikeThrough","strikethrough_s","Strikethrough")]}),e.jsxs("div",{className:Ce.toolbarGroup,children:[e.jsx(rs,{value:H,expanded:E,custom:ue,onValueChange:S=>{L(S),F(S,"foreColor")},onExpandedChange:S=>{S&&me(),T(S)},onCustomChange:ie,children:e.jsx("button",{className:Ce.toolbarBtn,title:"Text color",onMouseDown:S=>{S.preventDefault(),me()},onClick:()=>T(!E),children:e.jsx(oe,{name:"format_color_text"})})}),e.jsx(rs,{value:P,expanded:Z,custom:ue,onValueChange:S=>{K(S),F(S,"backColor")},onExpandedChange:S=>{S&&me(),W(S)},onCustomChange:ie,children:e.jsx("button",{className:Ce.toolbarBtn,title:"Background color",onMouseDown:S=>{S.preventDefault(),me()},onClick:()=>W(!Z),children:e.jsx(oe,{name:"format_color_fill"})})})]}),e.jsxs("div",{className:Ce.toolbarGroup,children:[ne("insertUnorderedList","format_list_bulleted","Bulleted list"),ne("insertOrderedList","format_list_numbered","Numbered list")]}),e.jsxs("div",{className:Ce.toolbarGroup,children:[ne("justifyLeft","format_align_left","Align left"),ne("justifyCenter","format_align_center","Align center"),ne("justifyRight","format_align_right","Align right"),ne("justifyFull","format_align_justify","Justify")]}),e.jsxs("div",{className:Ce.toolbarGroup,children:[ne("createLink","link","Insert link",Ne),e.jsxs("button",{className:Ce.toolbarBtn,title:"Insert image",onMouseDown:S=>{S.preventDefault(),me()},children:[e.jsx(oe,{name:"image"}),e.jsx("input",{type:"file",accept:"image/*",className:Ce.imageInput,onChange:de})]}),ne("insertBlockquote","format_quote","Quote",ye)]}),e.jsx("div",{className:Ce.toolbarGroup,children:ne("removeFormat","format_clear","Remove formatting")})]}),e.jsx("div",{ref:h,className:Ce.editorContent,role:"textbox",style:{minHeight:f,maxHeight:p},contentEditable:!a,"data-placeholder":o,"aria-label":r,"aria-required":d,"aria-invalid":i,onInput:N,onFocus:M,onBlur:A,onKeyDown:G,onKeyUp:se,onMouseUp:se,onPaste:q}),e.jsx(sn,{value:j,onChange:U,children:e.jsxs("div",{className:Ce.linkDialogContent,children:[e.jsx("input",{type:"text",placeholder:"URL (e.g. https://example.com)",value:I,onChange:S=>O(S.target.value),onKeyDown:S=>{S.key==="Enter"&&Q()},className:Ce.linkInput,autoFocus:!0}),e.jsx("input",{type:"text",placeholder:"Link text (optional)",value:re,onChange:S=>be(S.target.value),onKeyDown:S=>{S.key==="Enter"&&Q()},className:Ce.linkInput}),e.jsxs("div",{className:Ce.linkDialogActions,children:[e.jsx(Be,{className:Ce.linkCancelBtn,variant:"plain",color:"neutral",onClick:()=>{U(!1),O(""),be("")},children:"Cancel"}),e.jsx(Be,{className:Ce.linkInsertBtn,disabled:!I.trim(),onClick:Q,children:"Insert Link"})]})]})}),i&&l&&e.jsx("small",{className:Ce.errorMessage,children:l})]})}const Tt={roundMenu:"_roundMenu_1f5g9_2",menuItem:"_menuItem_1f5g9_2",collapsed:"_collapsed_1f5g9_2",trigger:"_trigger_1f5g9_2"};function Ir({options:t,iconKey:s="icon",labelKey:n="label",radius:o=80,className:a}){const[r,l]=u.useState(!1);function i(c,d){const f=2*Math.PI*c/d-Math.PI/2,p=Math.cos(f)*o,m=Math.sin(f)*o;return{transform:`translate3d(${p}px, ${m}px, 0)`}}return e.jsxs("div",{className:g(Tt.roundMenu,a),children:[t.map((c,d)=>{const f=r?i(d,t.length):void 0;return e.jsx("div",{className:g(Tt.menuItem,!r&&Tt.collapsed),style:f,"aria-label":c[n]??c.label,title:c[n]??c.label,children:e.jsx(Be,{round:!0,background:c.background,icon:c[s]??c.icon,onClick:c.onClick,children:c[n]??c.label})},d)}),e.jsx(Be,{round:!0,className:g(Tt.trigger,r&&Tt.expanded),onClick:()=>l(c=>!c),color:r?"neutral":"success",icon:r?"close":"add"})]})}const Te={sidebar:"_sidebar_1bq5p_2",collapsed:"_collapsed_1bq5p_2",expanded:"_expanded_1bq5p_2",optionsList:"_optionsList_1bq5p_2",optionsContainer:"_optionsContainer_1bq5p_2",bottomOptions:"_bottomOptions_1bq5p_2",option:"_option_1bq5p_2",optionActive:"_optionActive_1bq5p_2",optionIcon:"_optionIcon_1bq5p_2",optionLabel:"_optionLabel_1bq5p_2",optionLink:"_optionLink_1bq5p_2",disabled:"_disabled_1bq5p_2",subPanel:"_subPanel_1bq5p_2",subPanelHidden:"_subPanelHidden_1bq5p_2",subPanelVisible:"_subPanelVisible_1bq5p_2",subOption:"_subOption_1bq5p_2",subOptionActive:"_subOptionActive_1bq5p_2",subOptionIcon:"_subOptionIcon_1bq5p_2",subOptionLabel:"_subOptionLabel_1bq5p_2",subOptionChevron:"_subOptionChevron_1bq5p_2",rotated:"_rotated_1bq5p_2",subOptionLink:"_subOptionLink_1bq5p_2"};let At=null;try{At=require("react-router-dom").Link}catch{}const is=u.createContext({currentValue:void 0,onChange:()=>{}});function mt(t){return $e(t)?t.value:t}function dn(t){return t?t.startsWith("/")?t:"/"+t:""}function cs({option:t,depth:s,parentPath:n=""}){const[o,a]=u.useState(!1),{currentValue:r,onChange:l}=u.useContext(is);let i=n;t.path&&(!i.endsWith("/")&&!t.path.startsWith("/")?i+="/":i.endsWith("/")&&t.path.startsWith("/")&&(i=i.slice(0,-1)),i+=t.path);const c=!!(t.options&&t.options.length);function d(y=t){return mt(r)===mt(y)||!!y.options&&y.options.some(_=>d(_))}const f=d();function p(y){t.disabled||(c?a(_=>!_):l(t))}function m(y){y.key==="Enter"&&p()}const b=[Te.subOption,f?Te.subOptionActive:"",o?Te.subOptionExpanded:"",t.disabled?Te.disabled:""].filter(Boolean).join(" "),v={paddingLeft:`${s*16+16}px`},x=e.jsxs("div",{className:b,style:v,tabIndex:0,onClick:p,onKeyUp:m,role:c?"button":void 0,children:[t.icon&&e.jsx("span",{className:`${Te.subOptionIcon} material-symbols-rounded`,children:t.icon}),e.jsx("span",{className:Te.subOptionLabel,children:t.label}),c&&e.jsx("span",{className:`${Te.subOptionChevron} material-symbols-rounded${o?` ${Te.rotated}`:""}`,children:"keyboard_arrow_down"})]});let h;return c?h=x:At&&t.path?h=e.jsx(At,{to:i,tabIndex:0,className:Te.subOptionLink,onClick:()=>l(t),children:x}):t.path?h=e.jsx("a",{href:i,tabIndex:0,className:Te.subOptionLink,children:x}):h=x,e.jsxs(e.Fragment,{children:[h,c&&o&&t.options?.map(y=>e.jsx(cs,{option:y,depth:s+1,parentPath:i},y.value))]})}function Tr({option:t,sidebarExpanded:s,onRailClick:n,activeParentValue:o}){const a=!!(t.options&&t.options.length),r=mt(t)===mt(o),l=[Te.option,r?Te.optionActive:"",t.disabled?Te.disabled:""].filter(Boolean).join(" ");function i(){t.disabled||n(t)}function c(f){f.key==="Enter"&&i()}const d=e.jsxs("div",{className:l,tabIndex:0,onClick:i,onKeyUp:c,role:a?"button":void 0,"aria-expanded":a?r:void 0,children:[e.jsx("span",{className:Te.optionIcon,children:t.icon&&e.jsx("span",{className:"material-symbols-rounded",children:t.icon})}),s&&e.jsx("span",{className:Te.optionLabel,children:t.label})]});return a?d:At&&t.path?e.jsx(At,{to:dn(t.path),tabIndex:0,className:Te.optionLink,children:d}):t.path?e.jsx("a",{href:dn(t.path),tabIndex:0,className:Te.optionLink,children:d}):d}function Ar({value:t,defaultValue:s,onChange:n,expanded:o=!1,options:a,getObject:r=!1,className:l}){const[i,c]=xe({value:t,defaultValue:s,onChange:n}),[d,f]=u.useState(!1),[p,m]=u.useState(void 0),[b,v]=u.useState("100vh"),x=u.useRef(null);u.useEffect(()=>{function E(){const T=document.querySelector(".navbar")?.getBoundingClientRect()?.height;v(T?`calc(100vh - ${T}px)`:"100vh")}return E(),window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]),u.useEffect(()=>{const E=h(a);E&&_(E)},[]);function h(E,T=""){for(const P of E){const K=y(T,P.path);if(Rs(K))return P;const Z=h(P.options||[],K);if(Z)return Z}}function y(E,T){if(!T)return E;let P=E;return!P.endsWith("/")&&!T.startsWith("/")?P+="/":P.endsWith("/")&&T.startsWith("/")&&(P=P.slice(0,-1)),P+T}function _(E){if(E.disabled)return;const T=r?E:mt(E);c(T)}function C(E,T){return E.find(P=>mt(P)===mt(T)?!0:!!C(P.options||[],T))}const $=C(a,i),B=a.filter(E=>!E.bottom),R=a.filter(E=>E.bottom);function k(E){if(E.disabled)return;!!(E.options&&E.options.length)?p?.value===E.value?f(P=>!P):(m(E),f(!0)):(f(!1),_(E))}function w(E){const T=E.relatedTarget,P=E.currentTarget;(!T||!P.contains(T))&&f(!1)}const D=[Te.sidebar,o?Te.expanded:Te.collapsed,l].filter(Boolean).join(" "),V=[Te.subPanel,d?Te.subPanelVisible:Te.subPanelHidden].filter(Boolean).join(" "),H={currentValue:i,onChange:_,getObject:r};function L(E){return e.jsx(Tr,{option:E,sidebarExpanded:o,onRailClick:k,activeParentValue:$},E.value)}return e.jsx(is.Provider,{value:H,children:e.jsxs("div",{ref:x,className:D,style:{height:b},tabIndex:0,onBlur:w,children:[e.jsxs("div",{className:Te.optionsList,children:[e.jsx("div",{className:Te.optionsContainer,children:B.map(L)}),R.length>0&&e.jsx("div",{className:Te.bottomOptions,children:R.map(L)})]}),e.jsx("div",{className:V,children:p&&p.options&&p.options.length>0&&p.options.map(E=>e.jsx(cs,{option:E,depth:0,parentPath:dn(p.path)},E.value))})]})})}const fn={statusBadge:"_statusBadge_xd68m_2",primary:"_primary_xd68m_2",info:"_info_xd68m_2",success:"_success_xd68m_2",warning:"_warning_xd68m_2",danger:"_danger_xd68m_2",neutral:"_neutral_xd68m_2",secondary:"_secondary_xd68m_2",heavy:"_heavy_xd68m_2"};function mn({labelValue:t="",color:s="primary",size:n="medium",type:o="default",loading:a=!1,closeable:r=!1,icon:l="",isAppendedIcon:i=!1,children:c,className:d,onClose:f}){return e.jsx(On,{className:g(fn.statusBadge,fn[s],fn[o],d),labelValue:t,type:o,size:n,loading:a,closeable:r,icon:l,isAppendedIcon:i,onClose:f,children:c||t})}const qe={stepper:"_stepper_iqqeu_2",stepContainer:"_stepContainer_iqqeu_2",noClick:"_noClick_iqqeu_2",step:"_step_iqqeu_2",small:"_small_iqqeu_2",large:"_large_iqqeu_2",past:"_past_iqqeu_2",active:"_active_iqqeu_2",future:"_future_iqqeu_2",label:"_label_iqqeu_2",connector:"_connector_iqqeu_2"};function Er({value:t,onChange:s,options:n,labelKey:o="label",valueKey:a="label",iconKey:r="icon",size:l="medium",getObject:i=!1,noClick:c=!1,allowSkip:d=!1,className:f}){const[p,m]=xe({value:t,defaultValue:void 0,onChange:s}),b=h(p),[v,x]=u.useState(()=>Math.max(0,b!=-1?b:0));u.useEffect(()=>{const k=h(t);k!=-1&&x(k)},[p]);function h(k){return n.findIndex(w=>_(w)==_(k))}function y(k){return $e(k)?k[o]:k}function _(k){return $e(k)?k[a]:k}function C(k){return $e(k)?k[r]:"image"}function $(k){const w=p??0;return k===w?"active":k<w||k<=v?"past":"future"}function B(k){return k<v?"past":"future"}function R(k,w){if(!c){const D=h(p);if(!d&&w-D>1)return;x(V=>Math.max(V,w)),m(i?k:_(k))}}return e.jsx("div",{className:g(qe.stepper,f),children:n.map((k,w)=>{const D=$(w);return e.jsxs("div",{className:g("flex items-center",n[w+1]?"w-full":"w-fit",l,qe[l]),children:[e.jsxs("div",{className:g(qe.stepContainer,c&&qe.noClick),onClick:()=>R(k,w),children:[e.jsx("div",{className:g(qe[l],qe[D],qe.step,_(p)==_(k)&&qe.active,{[qe.past]:w<v,[qe.future]:w>v}),children:e.jsx(oe,{className:"stepper-icon",name:C(k)})}),e.jsx("span",{className:qe.label,children:y(k)})]}),n[w+1]&&e.jsx("div",{className:g(qe.connector,qe[B(w)])})]},w)})})}const ht={switch:"_switch_1pjii_2",rhs:"_rhs_1pjii_2",disabled:"_disabled_1pjii_2",track:"_track_1pjii_2",active:"_active_1pjii_2",thumb:"_thumb_1pjii_2",thumbActive:"_thumbActive_1pjii_2"};function Mr({id:t,name:s,value:n,defaultValue:o,onChange:a,rhs:r=!1,disabled:l=!1,children:i,className:c}){const[d,f]=xe({value:n,defaultValue:o??!1,onChange:a});function p(){l||f(!d)}const m=()=>i?t||s?e.jsx("label",{htmlFor:t||s,className:"text-xs cursor-[inherit]",children:i}):e.jsx("span",{className:"text-xs",children:i}):null;return e.jsxs("div",{role:"switch","aria-checked":!!d,"aria-disabled":l,className:g(ht.switch,r&&ht.rhs,l&&ht.disabled,c),onClick:p,children:[e.jsx("div",{className:g(ht.track,d&&ht.active),children:e.jsx("div",{className:g(ht.thumb,d&&ht.thumbActive)})}),m()]})}const yt={container:"_container_1g3ce_2",notCard:"_notCard_1g3ce_2",tabButton:"_tabButton_1g3ce_2",icon:"_icon_1g3ce_2",active:"_active_1g3ce_2"};function Lr({value:t,defaultValue:s,onChange:n,options:o=[],labelKey:a="label",isIcon:r=!1,notCard:l=!1,children:i,className:c}){const[d,f]=xe({value:t,defaultValue:s??0,onChange:n});function p(m){return typeof m=="string"?m:m[a]}return e.jsxs("div",{className:g(yt.container,l&&yt.notCard,c),children:[e.jsx("div",{className:"flex font-bold text-sm gap-xs w-fit",children:o.map((m,b)=>e.jsx("button",{className:g(yt.tabButton,d===b&&yt.active),onClick:()=>f(b),children:typeof m=="object"&&m.icon?e.jsxs(e.Fragment,{children:[e.jsx(oe,{name:m.icon,className:yt.icon}),e.jsx("span",{children:p(m)})]}):r&&typeof m=="string"?e.jsx(oe,{name:m,className:yt.icon}):e.jsx("span",{children:p(m)})},b))}),i]})}const je={table:"_table_xchde_2",tableContent:"_tableContent_xchde_2",noShadow:"_noShadow_xchde_2",headerFixed:"_headerFixed_xchde_2",tableStyle:"_tableStyle_xchde_2",firstTh:"_firstTh_xchde_2",lastTh:"_lastTh_xchde_2",pointerNone:"_pointerNone_xchde_2",hoverBg:"_hoverBg_xchde_2",bgWhite:"_bgWhite_xchde_2",sortable:"_sortable_xchde_2",thContent:"_thContent_xchde_2",thLabel:"_thLabel_xchde_2",sortIcon:"_sortIcon_xchde_2",sortIconRotated:"_sortIconRotated_xchde_2",sortIconActive:"_sortIconActive_xchde_2",row:"_row_xchde_2",cell:"_cell_xchde_2",rowHover:"_rowHover_xchde_2",skeletonCell:"_skeletonCell_xchde_2",footer:"_footer_xchde_2",footerLeft:"_footerLeft_xchde_2",footerLabel:"_footerLabel_xchde_2"};function Or(t,s,n){return[...t].sort((o,a)=>{const r=o[s],l=a[s];if(typeof r=="string"&&typeof l=="string"){const i=r.toLowerCase(),c=l.toLowerCase();return n?i.localeCompare(c):c.localeCompare(i)}else{if(typeof r=="number"&&typeof l=="number")return n?r-l:l-r;if(r instanceof Date&&l instanceof Date)return n?r.getTime()-l.getTime():l.getTime()-r.getTime();{const i=String(r).toLowerCase(),c=String(l).toLowerCase();return n?i.localeCompare(c):c.localeCompare(i)}}})}function hn(t,s){return u.Children.toArray(t).find(a=>u.isValidElement(a)&&a.type===s)||null}function us({children:t}){return e.jsx(e.Fragment,{children:t})}function ds({children:t}){return e.jsx(e.Fragment,{children:t})}function fs({children:t}){return e.jsx(e.Fragment,{children:t})}function Rt({columns:t,items:s,sortOptions:n,page:o,defaultPage:a,itemsPerPage:r,defaultItemsPerPage:l,numberOfItems:i,renderPaginationInBackEnd:c=!1,hideFooter:d=!1,isHeaderFixed:f=!1,enableSelection:p=!1,enableAggregation:m=!1,loading:b=!1,noShadow:v=!1,hasHover:x=!1,onPageChange:h,onItemsPerPageChange:y,onSortBy:_,onPageItems:C,onSelectAll:$,onSelectRow:B,renderAggregation:R,renderSelect:k,renderActions:w,renderChilds:D,renderEmptyState:V,renderFooter:H,renderItemsPerPage:L,renderShowingPage:E,children:T,className:P}){const[K,Z]=xe({value:o,defaultValue:a??1,onChange:h}),[W,ue]=xe({value:r,defaultValue:l??10,onChange:y}),[ie,j]=u.useState(n?.by||null),[U,I]=u.useState(()=>{const A={};return t.forEach(q=>{A[q.value]=q.value===n?.by?!!n?.desc:!1}),A}),[O,re]=u.useState(new Set),[be,ee]=u.useState(!1),me=K??1,_e=W??10,Se=ie?Or(s,ie,U[ie]??!1):s,se=c?i??0:Se?.length??0,Y=Math.ceil(se/_e),z=c?Se:Se.slice((me-1)*_e,me*_e),le=me===1?1:(me-1)*_e+1,ce=(me-1)*_e+z.length;let fe=t.length;p&&fe++,m&&fe++;const F=hn(T,us),X=hn(T,ds),ae=hn(T,fs),Ne=!!w||!!F;Ne&&fe++;const Q=[5,10,20,50,100],de=A=>{if(!A.sortable)return;const q=A.value,ne=ie===q?!U[q]:!1;j(q),I(we=>({...we,[q]:ne})),_?.(q,ne)},ye=(A,q)=>{re(ne=>{const we=new Set(ne),S=we.has(A);return S?we.delete(A):we.add(A),B?.(q,!S),we})},N=A=>{const q=!!A;ee(q),re(q?new Set(z.map((ne,we)=>we)):new Set),s?.forEach(ne=>{ne.selected=q}),$?.(q)},G=A=>{Z(A),C?.(A,_e)},M=A=>{ue(A||10),Z(1),C?.(1,A)};return e.jsxs("div",{className:g(je.table,P),children:[e.jsx("div",{className:g(je.tableContent,v&&je.noShadow,f&&je.headerFixed),children:e.jsxs("table",{className:je.tableStyle,children:[b?e.jsx("thead",{children:e.jsx("tr",{children:Array.from({length:fe||3}).map((A,q)=>e.jsx("th",{className:je.skeletonCell,children:e.jsx(vt,{})},q))})}):e.jsx("thead",{children:e.jsxs("tr",{children:[m&&e.jsx("th",{className:g(je.firstTh,je.pointerNone),style:{width:"2%"}}),p&&e.jsx("th",{className:g(!m&&je.firstTh,je.hoverBg),style:{width:"2%"},children:e.jsx(dt,{value:be,onChange:N})}),t.map((A,q)=>e.jsx("th",{style:{width:A.width??"fit-content"},className:g(je.sortable,q===0&&!p&&!m&&je.firstTh,!t[q+1]&&!Ne&&je.lastTh,!A.sortable&&je.pointerNone),onClick:()=>de(A),children:e.jsxs("div",{className:je.thContent,style:{justifyContent:A.align??"flex-start"},children:[e.jsx("p",{className:je.thLabel,children:A.label}),A.sortable&&e.jsx("span",{className:g(je.sortIcon,U[A.value]&&je.sortIconRotated,A.value===ie&&je.sortIconActive),children:e.jsx(oe,{name:"arrow_upward"})})]})},A.value)),Ne&&e.jsx("th",{style:{flex:1},className:g(je.pointerNone,je.bgWhite)})]})}),b||!z.length?e.jsx("tbody",{children:b?Array.from({length:10}).map((A,q)=>e.jsxs("tr",{children:[Array.from({length:fe||3}).map((ne,we)=>e.jsx("td",{className:je.skeletonCell,children:e.jsx(vt,{})},we)),Ne&&e.jsx("td",{className:je.skeletonCell,children:e.jsx(vt,{})})]},`skeleton-${q}`)):e.jsx("tr",{children:e.jsx("td",{colSpan:fe,children:V?.()||ae||null})})}):e.jsx("tbody",{children:z.map((A,q)=>e.jsxs(u.Fragment,{children:[e.jsxs("tr",{className:g(je.row,x&&je.rowHover),children:[m&&e.jsx("td",{className:je.cell,children:R?.(A,q)}),p&&e.jsx("td",{className:je.cell,children:k?k(A,q):e.jsx(dt,{value:O.has(q),onChange:()=>ye(q,A)})}),t.map(ne=>e.jsx("td",{className:je.cell,style:{textAlign:ne.align==="center"?"center":ne.align==="flex-end"?"right":"left"},children:ne.render?ne.render(A[ne.value],A,q):A[ne.value]},ne.value)),w&&e.jsx("td",{className:je.cell,children:w(A,q)}),!w&&F&&e.jsx("td",{className:je.cell,children:F})]}),A.expanded&&D&&D(A,q)]},q))}),(H||X)&&e.jsx("tfoot",{children:H?.()||X})]})}),!d&&e.jsxs("footer",{className:je.footer,children:[e.jsxs("div",{className:je.footerLeft,children:[e.jsx("p",{className:je.footerLabel,children:L?.()||"Items per page"}),e.jsx(un,{value:_e,options:Q,onChange:A=>M(A)})]}),e.jsx(Qn,{value:me,onChange:G,length:Y}),e.jsx("div",{children:e.jsx("p",{className:je.footerLabel,children:E?E(le,ce,se):`Showing ${le}-${ce} of ${se}`})})]})]})}Rt.Actions=us,Rt.Footer=ds,Rt.EmptyState=fs;const rt={tagInput:"_tagInput_10sgc_2",labelRow:"_labelRow_10sgc_2",container:"_container_10sgc_2",focused:"_focused_10sgc_2",error:"_error_10sgc_2",shake:"_shake_10sgc_2",disabled:"_disabled_10sgc_2",textarea:"_textarea_10sgc_2",errorMessage:"_errorMessage_10sgc_2"},pn={DUPLICATE:"Duplicated values are not allowed",INVALID_INPUT:"Please provide a valid input",MAX_VALUES:"Max number of values reached"};function ms({children:t}){return e.jsx(e.Fragment,{children:t})}function hs({children:t}){return e.jsx(e.Fragment,{children:t})}function ps({children:t}){return e.jsx(e.Fragment,{children:t})}function Wt({value:t,defaultValue:s,onChange:n,labelValue:o,errorMessage:a,infoMessage:r,disabled:l=!1,required:i=!1,allowDuplicate:c=!1,max:d,isError:f=!1,placeholder:p="",mask:m,icon:b,appendIcon:v=!1,tooltipMinWidth:x,children:h,className:y}){const[_,C]=xe({value:t,defaultValue:s??[],onChange:n}),[$,B]=u.useState(""),[R,k]=u.useState(!1),[w,D]=u.useState(""),[V,H]=u.useState(!1),L=u.useRef(null),E=u.useRef(void 0);u.useEffect(()=>()=>clearTimeout(E.current),[]);function T(I){k(!0),D(I),clearTimeout(E.current),E.current=setTimeout(()=>{k(!1),D("")},2e3)}function P(I){const O=I.trim();if(kn(O))return;if(m&&Qt(O,m)!==O){T(pn.INVALID_INPUT);return}const re=_??[];if(!c&&re.includes(O)){T(pn.DUPLICATE);return}if(d!==void 0&&re.length>=d){T(pn.MAX_VALUES);return}C([...re,O]),B("")}function K(I){$===""&&C((_??[]).filter((O,re)=>re!==I))}function Z(I){I.key==="Enter"&&!I.shiftKey?(I.preventDefault(),P($)):I.key==="Tab"?(I.preventDefault(),$&&P($)):I.key==="Backspace"&&$===""&&K((_??[]).length-1)}function W(I){I.preventDefault();const re=I.clipboardData.getData("text").split(/[,\n]/).map(me=>me.trim()).filter(Boolean);if(re.length===0)return;const be=_??[],ee=[];for(const me of re){if(kn(me)||m&&Qt(me,m)!==me)continue;const _e=[...be,...ee];if(!(!c&&_e.includes(me))){if(d!==void 0&&_e.length>=d)break;ee.push(me)}}ee.length>0&&(C([...be,...ee]),B(""))}let ue=null,ie=null,j=null;u.Children.forEach(h,I=>{if(u.isValidElement(I)){const O=I.props;I.type===ms?ue=O.children:I.type===hs?ie=O.children:I.type===ps&&(j=O.children)}});const U=_??[];return e.jsxs("div",{className:g(rt.tagInput,y),children:[o&&e.jsxs("div",{className:rt.labelRow,children:[e.jsx(gt,{labelValue:o,infoMessage:r,tooltipMinWidth:x,required:i}),d!==void 0&&d>0&&e.jsxs("span",{className:"text-neutral-foreground-low font-bold text-xs",children:[U.length," / ",d]})]}),e.jsxs("div",{className:g(rt.container,V&&!l&&rt.focused,(f||R)&&rt.error,l&&rt.disabled,R&&rt.shake),onClick:()=>L.current?.focus(),children:[ue||b&&!v&&e.jsx("span",{className:"material-symbols-rounded text-neutral-interaction-default",children:b}),U.map((I,O)=>e.jsxs(Ye,{className:"max-w-full",children:[e.jsx(Ye.Label,{children:e.jsx("div",{className:"max-w-[100%]",children:e.jsx("span",{className:"whitespace-normal break-all",children:String(I)})})}),e.jsx(mn,{labelValue:String(I),color:"neutral",closeable:!0,onClose:()=>K(O),className:"py-xxs"})]},O)),e.jsx("textarea",{ref:L,className:rt.textarea,rows:1,value:$,onChange:I=>B(I.target.value),onKeyDown:Z,onPaste:W,onFocus:()=>H(!0),onBlur:()=>H(!1),placeholder:U.length===0?p:"",disabled:l}),ie||v&&b&&e.jsx("span",{className:"material-symbols-rounded text-neutral-interaction-default",children:b})]}),j&&e.jsx("label",{className:"text-neutral-foreground-low text-sm",children:j}),(f||R)&&e.jsx("p",{className:rt.errorMessage,children:w||a})]})}Wt.PrependIcon=ms,Wt.AppendIcon=hs,Wt.Hint=ps;const Ut={tagContainer:"_tagContainer_1fr0s_2",optionContainer:"_optionContainer_1fr0s_2",containerText:"_containerText_1fr0s_2"};function Pr({value:t,defaultValue:s,onChange:n,options:o=[],labelKey:a="label",valueKey:r="value",getObject:l=!1,disabled:i=!1,labelValue:c="",searchable:d=!1,creatable:f=!1,isError:p=!1,errorMessage:m="",infoMessage:b="",required:v=!1,placeholder:x,icon:h,expanded:y,onExpandedChange:_,absolute:C=!0,buttonLabel:$,className:B}){const[R,k]=xe({value:t,defaultValue:s??[],onChange:n}),[w,D]=u.useState(""),[V,H]=u.useState([]),[L,E]=xe({value:y,defaultValue:!1,onChange:_}),T=L??!1,P=u.useRef(null),K=Array.isArray(R)?R:[];u.useEffect(()=>{L?P.current?.focus():P.current?.blur()},[L]);function Z(z){return $e(z)?z[a]:String(z??"")}function W(z){return $e(z)?z[r]:z}function ue(z,le){const ce=$e(le)?le[r]:le;return z.some(fe=>($e(fe)?fe[r]:fe)===ce)}function ie(z){if(i)return;const le=l?z:W(z),ce=[...K],fe=ce.findIndex(F=>$e(z)?Z(F)===Z(z):W(F)===W(z));fe!==-1?ce.splice(fe,1):ce.push(le),k(ce)}function j(z){const le=[...K];le.splice(z,1),k(le)}function U(){if(!f||!w||p)return;const le=[...o,...V].find(X=>Z(X).toLowerCase()===w.toLowerCase());if(le){ue(K,le)||ie(le),D("");return}if(ue(K,w)){D("");return}const ce={[a]:w,[r]:w};H(X=>[...X,ce]);const fe=l?ce:w,F=[...K,fe];k(F),D("")}const I=[...o,...V],O=w?I.filter(z=>Z(z).toLowerCase().includes(w.toLowerCase())):I,re=f&&w&&!O.some(z=>Z(z).toLowerCase()===w.toLowerCase()),be=K.length>0?e.jsx("div",{className:g(Ut.tagContainer),onClick:()=>setTimeout(()=>E(!1)),children:K.map((z,le)=>e.jsx(mn,{color:"neutral",className:"py-none max-w-full",closeable:!0,onClose:()=>j(le),children:$e(z)?z[a]:z},le))}):void 0,ee=e.jsx("div",{className:"flex items-center gap-xs w-full",children:(d||f)&&e.jsx("input",{ref:P,type:"text",value:w,onChange:z=>D(z.target.value),onKeyDown:z=>{z.key==="Enter"&&f&&U()},placeholder:x??"Search",disabled:i,className:g("text-neutral-interaction-default h-full w-full p-none m-none border-none shadow-none outline-none text-sm",{"text-danger-foreground-low":p,"bg-neutral-surface-disabled text-neutral-foreground-low":i}),style:{boxShadow:"none"},onClick:()=>setTimeout(()=>E(!0))})}),me=!T&&K.length>0?be:d||f?ee:void 0;function _e(z){const le=Array.from(z.currentTarget.querySelectorAll('[role="option"],[data-option]'));if(le.length===0)return;const ce=document.activeElement,fe=le.indexOf(ce);z.key==="ArrowDown"?(z.preventDefault(),(fe<le.length-1?le[fe+1]:le[0])?.focus()):z.key==="ArrowUp"?(z.preventDefault(),(fe>0?le[fe-1]:le[le.length-1])?.focus()):z.key==="Home"?(z.preventDefault(),le[0]?.focus()):z.key==="End"?(z.preventDefault(),le[le.length-1]?.focus()):z.key==="Tab"&&f&&w&&(z.preventDefault(),U())}const Se=e.jsx("div",{className:Ut.optionContainer,onKeyDown:_e,children:O.length===0&&w?e.jsx("div",{className:Ut.containerText,children:"No result found"}):I.length===0?e.jsx("div",{className:Ut.containerText,children:"No tags created yet"}):O.map((z,le)=>e.jsx(Jt,{selected:ue(K,z),onClick:()=>ie(z),className:g({"font-bold":ue(K,z)},"p-xs"),children:Z(z)},le))}),se=re?e.jsx("div",{className:"flex justify-center w-full",children:e.jsxs("button",{type:"button",className:"text-xs text-primary-interaction-default hover:underline px-xs py-xxs",onClick:U,children:['Add "',w,'"']})}):void 0,Y=h?e.jsx(oe,{name:h,className:"text-neutral-interaction-default"}):void 0;return e.jsx(Ot,{value:T,onChange:z=>E(z),labelValue:$??c,disabled:i,isError:p,errorMessage:m,infoMessage:b,required:v,absolute:C,maxHeight:"none",minWidth:"12em",leadingComplement:Y,options:Se,actions:se,className:g("tag-select",B),children:me})}const ot={textarea:"_textarea_187gm_2",labelRow:"_labelRow_187gm_2",counter:"_counter_187gm_2",textareaContainer:"_textareaContainer_187gm_2",focused:"_focused_187gm_2",error:"_error_187gm_2",disabled:"_disabled_187gm_2",textareaContent:"_textareaContent_187gm_2",errorMessage:"_errorMessage_187gm_2"},Dr=u.forwardRef(function({value:s,onChange:n,labelValue:o,max:a,errorMessage:r,infoMessage:l,disabled:i=!1,isError:c=!1,required:d=!1,placeholder:f,textAlign:p,tooltipMinWidth:m,onFocus:b,onBlur:v,className:x},h){const[y,_]=xe({value:s,defaultValue:"",onChange:n}),[C,$]=u.useState(!1);function B(){$(!0),b?.()}function R(){$(!1),v?.()}function k(V){const H=a?V.target.value.slice(0,a):V.target.value;_(H)}const w=y?.length??0,D=o||a!==void 0;return e.jsxs("div",{className:g(ot.textarea,x),children:[D&&e.jsxs("div",{className:ot.labelRow,children:[e.jsx(gt,{labelValue:o,infoMessage:l,tooltipMinWidth:m,required:d}),a!==void 0&&e.jsxs("span",{className:ot.counter,children:[w,"/",a]})]}),e.jsx("div",{className:g(ot.textareaContainer,C&&ot.focused,c&&ot.error,i&&ot.disabled),children:e.jsx("textarea",{ref:h,className:ot.textareaContent,value:y??"",onChange:k,onFocus:B,onBlur:R,placeholder:f,disabled:i,style:p?{textAlign:p}:void 0})}),(c||r)&&r&&e.jsx("small",{className:ot.errorMessage,children:r})]})});function Br(t,s){switch(s.type){case"ADD":return[...t,s.toast];case"HIDE":return t.map(n=>n.id===s.id?{...n,visible:!1}:n);case"REMOVE":return t.filter(n=>n.id!==s.id)}}const _s=u.createContext(null);function Vr({toast:t,onClose:s}){const{isMounted:n,isActive:o}=Je(t.visible,{duration:600}),a=t.right?"slide-right":"slide-left";return n?e.jsx("div",{className:g("toast-wrapper",a,o&&"active"),children:e.jsx(Xt,{title:t.title,message:t.message,type:t.type,iconPosition:"center",closable:!0,onClose:()=>s(t.id),actions:t.buttonLabel?e.jsx(Be,{size:"small",variant:"secondary",color:t.type,className:"whitespace-nowrap",onClick:t.action,children:t.buttonLabel}):void 0,className:"toast"})}):null}const Fr=[{vertical:"top",horizontal:"left"},{vertical:"top",horizontal:"right"},{vertical:"bottom",horizontal:"left"},{vertical:"bottom",horizontal:"right"}];function qr({toasts:t,onClose:s}){return e.jsx(e.Fragment,{children:Fr.map(n=>e.jsx("div",{className:g("toast-container",n.vertical,n.horizontal),children:t.filter(o=>o[n.vertical]&&o[n.horizontal]).map(o=>e.jsx(Vr,{toast:o,onClose:s},o.id))},`${n.vertical}-${n.horizontal}`))})}function gs({children:t}){const[s,n]=u.useReducer(Br,[]),[o,a]=u.useState(!1),r=u.useRef(new Map);u.useEffect(()=>(a(!0),()=>{r.current.forEach(c=>clearTimeout(c))}),[]);function l(c){const d=r.current.get(c);d!==void 0&&(clearTimeout(d),r.current.delete(c)),n({type:"HIDE",id:c}),setTimeout(()=>n({type:"REMOVE",id:c}),600)}function i(c){const d=c.id??crypto.randomUUID(),f={id:d,title:"",message:"",type:"danger",top:!1,bottom:!1,right:!1,left:!1,buttonLabel:"",action:void 0,...c,visible:!0,timeout:c.timeout};n({type:"ADD",toast:f});const p=c.timeout;if(p){const m=setTimeout(()=>l(d),p);r.current.set(d,m)}return{id:d,close:()=>l(d)}}return e.jsxs(_s.Provider,{value:{toast:i},children:[t,o&&jt.createPortal(e.jsx(qr,{toasts:s,onClose:l}),document.body)]})}function Hr(){const t=u.useContext(_s);if(!t)throw new Error("useToast must be used inside ToastProvider");return t}const Et={toggleGroup:"_toggleGroup_1jngx_2",vertical:"_vertical_1jngx_2",default:"_default_1jngx_2",secondary:"_secondary_1jngx_2",secondaryVertical:"_secondaryVertical_1jngx_2"},xs=u.createContext(null);function zr({value:t,defaultValue:s,onChange:n,vertical:o=!1,disabled:a=!1,type:r="default",options:l,labelKey:i="label",valueKey:c="value",getObject:d=!1,children:f,className:p}){const[m,b]=xe({value:t,defaultValue:s,onChange:n});function v(C){return $e(C)?C[i]:C}function x(C){return $e(C)?C[c]:C}function h(C){return $e(C)?C.disabled:!1}function y(C){let $=C;if(d&&l){const B=l.find(R=>x(R)===C);B!==void 0&&($=B)}b($)}const _={selected:m,disabled:a,type:r,select:y};return e.jsx(xs.Provider,{value:_,children:e.jsx("div",{className:g(Et.toggleGroup,o&&Et.vertical,r==="default"&&Et.default,r==="secondary"&&!o&&Et.secondary,r==="secondary"&&o&&Et.secondaryVertical,p),children:l?l.map(C=>e.jsx(bs,{groupValue:x(C),disabled:h(C),children:v(C)},x(C))):f})})}const Mt={toggle:"_toggle_1mzau_2",default:"_default_1mzau_2",secondary:"_secondary_1mzau_2",active:"_active_1mzau_2",disabled:"_disabled_1mzau_2"};function bs({value:t,defaultValue:s,onChange:n,id:o,name:a,groupValue:r,disabled:l,type:i,children:c,className:d}){const f=u.useContext(xs),[p,m]=xe({value:f&&r!==void 0?void 0:t,defaultValue:f&&r!==void 0?void 0:s??!1,onChange:n}),b=f&&r!==void 0?f.selected===r:p??!1,v=f?.type??i??"default",x=!!(f?.disabled||l);function h(){x||(f&&r!==void 0?f.select(r):m(!0))}return e.jsx("button",{id:o,name:a||o,type:"button",role:"button","aria-pressed":b,"aria-disabled":x,disabled:x,tabIndex:0,className:g(Mt.toggle,v==="secondary"?Mt.secondary:Mt.default,b&&Mt.active,x&&Mt.disabled,d),onClick:h,children:c})}const Xe={tree:"_tree_1wlbq_2",treeOption:"_treeOption_1wlbq_2",nodeRow:"_nodeRow_1wlbq_2",multiple:"_multiple_1wlbq_2",nodeIcon:"_nodeIcon_1wlbq_2",selected:"_selected_1wlbq_2",disabled:"_disabled_1wlbq_2",expandIcon:"_expandIcon_1wlbq_2",expandIconOpen:"_expandIconOpen_1wlbq_2",nodeLabel:"_nodeLabel_1wlbq_2"},vs=u.createContext(null);function Re(t,s){return typeof t=="object"&&t!==null?t[s]:t}function Cs(t,s,n){return s?.find(o=>{if(!o.options||!o.options.length)return!1;const a=o.options.find(r=>Re(r,n)===Re(t,n));return a||Cs(t,o.options,n)})}function ys(t,s,n,o){const a=s.findIndex(r=>Re(r,o)===Re(t,o));a!==-1&&s.splice(a,1),n&&s.push(JSON.parse(JSON.stringify(t)))}function js(t,s,n,o,a){if(!s.options)return;const r=s.options.findIndex(i=>Re(i,a)===Re(t,a));let l=n.findIndex(i=>Re(i,a)===Re(s,a));if((!n.length||l===-1)&&o&&(l=n.length,n.push({...s,options:[]})),r===-1){const i=Cs(t,s.options,a);n[l]?.options&&i&&js(t,i,n[l].options,o,a);return}ys(t,n[l].options,o,a),l!==-1&&n[l]?.options&&!n[l]?.options?.length&&!o&&n.splice(l,1)}function ws(t,s,n,o,a){const r=[...n];if(a){const l=(()=>{for(const i of r)if(i.options&&i.options.find(d=>Re(d,o)===Re(t,o)))return i})();return l?js(t,l,r,s,o):ys(t,r,s,o),r.filter(i=>i.options?.length)}else{const l=Re(t,o),i=r.findIndex(c=>Re(c,o)===l);return i!==-1?r.splice(i,1):t.options?.length||r.push(l),t.options?.length&&t.options.forEach(c=>{const d=ws(c,s,r,o,a);r.length=0,d.forEach(f=>r.push(f))}),r}}function Ns(t,s){const n=[];for(const o of t)o.options?.length?n.push(...Ns(o.options,s)):n.push(o[s]);return n}function Rr(t,s,n,o){if(n.multiple){if(!Array.isArray(t))return!1;const a=l=>n.getObject&&typeof l=="object"&&l!==null?l[n.valueKey]===s:(typeof l=="object"&&l!==null?l[n.valueKey]:l)===s;if(t.some(a))return!0;if(o?.options?.length){const l=Ns(o.options,n.valueKey),i=f=>t.some(p=>n.getObject&&typeof p=="object"&&p!==null?p[n.valueKey]===f:(typeof p=="object"&&p!==null?p[n.valueKey]:p)===f),c=l.some(i);if(l.length>0&&l.every(i))return!0;if(c)return null}return!1}else return n.getObject&&typeof t=="object"&&t!==null?t[n.valueKey]===s:t===s}function ks({option:t,depth:s=0}){const n=u.useContext(vs),o=t[n.valueKey],a=t[n.labelKey],r=n.expandedNodes.has(o),l=!!(t.options&&t.options.length>0),i=Rr(n.selectedValue,o,n,t);return e.jsxs("div",{className:Xe.treeOption,style:{paddingLeft:s*16},children:[e.jsxs("div",{className:g(Xe.nodeRow,i===!0&&Xe.selected,n.multiple&&Xe.multiple,(n.disabled||t.disabled)&&Xe.disabled),onClick:()=>{!n.disabled&&!t.disabled&&n.onSelect(t,!i)},children:[l&&e.jsx(oe,{name:"keyboard_arrow_right",className:g(Xe.expandIcon,r&&Xe.expandIconOpen),onClick:c=>{c.stopPropagation(),n.onToggleExpand(o)}}),n.multiple&&e.jsx(dt,{value:i,onChange:()=>{},disabled:n.disabled||t.disabled,allowIndeterminate:!0}),t.icon&&e.jsx(oe,{name:t.icon,className:Xe.nodeIcon}),e.jsx("span",{className:g(Xe.nodeLabel),children:a})]}),r&&l&&t.options.map(c=>e.jsx(ks,{option:c,depth:s+1},c[n.valueKey]))]})}function Wr({value:t,defaultValue:s,onChange:n,options:o,labelKey:a="label",valueKey:r="value",getObject:l=!1,multiple:i=!1,disabled:c=!1,className:d}){const[f,p]=xe({value:t,defaultValue:s??(i?[]:void 0),onChange:n}),[m,b]=u.useState(new Set),v=h=>{b(y=>{const _=new Set(y);return _.has(h)?_.delete(h):_.add(h),_})},x=(h,y)=>{if(i){const _=ws(h,y,f??[],r,l);p(_)}else{const _=l?h:h[r];p(_)}};return e.jsx(vs.Provider,{value:{selectedValue:f,onSelect:x,expandedNodes:m,onToggleExpand:v,labelKey:a,valueKey:r,getObject:l,multiple:i,disabled:c},children:e.jsx("div",{className:g(Xe.tree,d),children:o.map(h=>e.jsx(ks,{option:h},h[r]))})})}function Ur({children:t}){return e.jsx(Hn,{children:e.jsx(gs,{children:t})})}te.Accordion=As,te.ActionCard=Cn,te.Alert=Xt,te.AutoComplete=Gs,te.Avatar=Bt,te.Badge=On,te.Breadcrumb=Xs,te.Button=Be,te.Calendar=Ft,te.Card=pt,te.Carousel=Qs,te.Checkbox=dt,te.ColorPicker=en,te.ConfirmProvider=Hn,te.Connector=nr,te.Crop=sr,te.DatePicker=ar,te.DesignSystemProvider=Ur,te.Dialog=sn,te.Drawer=lr,te.Dropdown=Ht,te.FileUpload=Xn,te.Filter=fr,te.FloatCard=xt,te.History=mr,te.Icon=oe,te.IconCard=Jn,te.Image=hr,te.Input=Dt,te.MetricCard=zt,te.Navbar=gr,te.PINInput=br,te.Pagination=Qn,te.Profile=vr,te.ProgressBar=Cr,te.Radio=ns,te.RadioGroup=yr,te.RichTextEditor=$r,te.RoundMenu=Ir,te.Select=un,te.Separator=Rn,te.Sidebar=Ar,te.Skeleton=vt,te.Slider=on,te.Spinner=tn,te.StatusBadge=mn,te.Stepper=Er,te.Switch=Mr,te.Tab=Lr,te.Table=Rt,te.TagInput=Wt,te.TagSelect=Pr,te.Textarea=Dr,te.ToastProvider=gs,te.Toggle=bs,te.ToggleGroup=zr,te.Tooltip=Ye,te.Tree=Wr,te.useConfirm=tr,te.useControllable=xe,te.useToast=Hr,te.useTransition=Je,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})}));
|